@djangocfg/layouts 2.1.233 → 2.1.234
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": "2.1.
|
|
3
|
+
"version": "2.1.234",
|
|
4
4
|
"description": "Simple, straightforward layout components for Next.js - import and use with props",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"layouts",
|
|
@@ -74,14 +74,14 @@
|
|
|
74
74
|
"check": "tsc --noEmit"
|
|
75
75
|
},
|
|
76
76
|
"peerDependencies": {
|
|
77
|
-
"@djangocfg/api": "^2.1.
|
|
78
|
-
"@djangocfg/centrifugo": "^2.1.
|
|
79
|
-
"@djangocfg/i18n": "^2.1.
|
|
80
|
-
"@djangocfg/monitor": "^2.1.
|
|
81
|
-
"@djangocfg/debuger": "^2.1.
|
|
82
|
-
"@djangocfg/ui-core": "^2.1.
|
|
83
|
-
"@djangocfg/ui-nextjs": "^2.1.
|
|
84
|
-
"@djangocfg/ui-tools": "^2.1.
|
|
77
|
+
"@djangocfg/api": "^2.1.234",
|
|
78
|
+
"@djangocfg/centrifugo": "^2.1.234",
|
|
79
|
+
"@djangocfg/i18n": "^2.1.234",
|
|
80
|
+
"@djangocfg/monitor": "^2.1.234",
|
|
81
|
+
"@djangocfg/debuger": "^2.1.234",
|
|
82
|
+
"@djangocfg/ui-core": "^2.1.234",
|
|
83
|
+
"@djangocfg/ui-nextjs": "^2.1.234",
|
|
84
|
+
"@djangocfg/ui-tools": "^2.1.234",
|
|
85
85
|
"@hookform/resolvers": "^5.2.2",
|
|
86
86
|
"consola": "^3.4.2",
|
|
87
87
|
"lucide-react": "^0.545.0",
|
|
@@ -109,15 +109,15 @@
|
|
|
109
109
|
"uuid": "^11.1.0"
|
|
110
110
|
},
|
|
111
111
|
"devDependencies": {
|
|
112
|
-
"@djangocfg/api": "^2.1.
|
|
113
|
-
"@djangocfg/i18n": "^2.1.
|
|
114
|
-
"@djangocfg/centrifugo": "^2.1.
|
|
115
|
-
"@djangocfg/monitor": "^2.1.
|
|
116
|
-
"@djangocfg/debuger": "^2.1.
|
|
117
|
-
"@djangocfg/typescript-config": "^2.1.
|
|
118
|
-
"@djangocfg/ui-core": "^2.1.
|
|
119
|
-
"@djangocfg/ui-nextjs": "^2.1.
|
|
120
|
-
"@djangocfg/ui-tools": "^2.1.
|
|
112
|
+
"@djangocfg/api": "^2.1.234",
|
|
113
|
+
"@djangocfg/i18n": "^2.1.234",
|
|
114
|
+
"@djangocfg/centrifugo": "^2.1.234",
|
|
115
|
+
"@djangocfg/monitor": "^2.1.234",
|
|
116
|
+
"@djangocfg/debuger": "^2.1.234",
|
|
117
|
+
"@djangocfg/typescript-config": "^2.1.234",
|
|
118
|
+
"@djangocfg/ui-core": "^2.1.234",
|
|
119
|
+
"@djangocfg/ui-nextjs": "^2.1.234",
|
|
120
|
+
"@djangocfg/ui-tools": "^2.1.234",
|
|
121
121
|
"@types/node": "^24.7.2",
|
|
122
122
|
"@types/react": "^19.1.0",
|
|
123
123
|
"@types/react-dom": "^19.1.0",
|
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
'use client';
|
|
8
8
|
|
|
9
|
+
import { isDev } from "@djangocfg/ui-core/lib";
|
|
9
10
|
import React, { Component, ErrorInfo, ReactNode } from 'react';
|
|
10
11
|
|
|
11
12
|
import { getT } from '@djangocfg/i18n';
|
|
@@ -38,7 +39,7 @@ export class ErrorBoundary extends Component<ErrorBoundaryProps, ErrorBoundarySt
|
|
|
38
39
|
}
|
|
39
40
|
|
|
40
41
|
// Log to console in development
|
|
41
|
-
if (
|
|
42
|
+
if (isDev) {
|
|
42
43
|
console.error('ErrorBoundary caught an error:', error, errorInfo);
|
|
43
44
|
}
|
|
44
45
|
}
|
|
@@ -36,6 +36,7 @@
|
|
|
36
36
|
|
|
37
37
|
'use client';
|
|
38
38
|
|
|
39
|
+
import { nodeEnv } from "@djangocfg/ui-core/lib";
|
|
39
40
|
import dynamic from 'next/dynamic';
|
|
40
41
|
import NextTopLoader from 'nextjs-toploader';
|
|
41
42
|
import { SWRConfig } from 'swr';
|
|
@@ -98,14 +99,14 @@ export function BaseApp({
|
|
|
98
99
|
const centrifugoUrl = centrifugo?.url || process.env.NEXT_PUBLIC_CENTRIFUGO_URL;
|
|
99
100
|
const centrifugoEnabled = centrifugo?.enabled !== false;
|
|
100
101
|
|
|
101
|
-
// Debug panel —
|
|
102
|
+
// Debug panel — DebugButton self-hides in production, just pass through props
|
|
102
103
|
const { enabled: debugEnabled = true, ...debugProps } = debug ?? {};
|
|
103
104
|
|
|
104
105
|
|
|
105
106
|
// Monitor — project prop as default, override with monitor config
|
|
106
107
|
const monitorConfig = {
|
|
107
108
|
project,
|
|
108
|
-
environment:
|
|
109
|
+
environment: nodeEnv,
|
|
109
110
|
...monitor,
|
|
110
111
|
};
|
|
111
112
|
|
|
@@ -169,7 +170,7 @@ export function BaseApp({
|
|
|
169
170
|
{/* Auth Dialog - global auth prompt */}
|
|
170
171
|
<AuthDialog authPath={auth?.routes?.auth} />
|
|
171
172
|
|
|
172
|
-
{/* Debug Panel — enabled by default, disable with debug={{ enabled: false }} */}
|
|
173
|
+
{/* Debug Panel — enabled in development by default, disable with debug={{ enabled: false }} */}
|
|
173
174
|
{debugEnabled && <DebugButton {...debugProps} />}
|
|
174
175
|
</ErrorTrackingProvider>
|
|
175
176
|
</PwaProvider>
|
|
@@ -64,9 +64,9 @@ export interface BaseLayoutProps {
|
|
|
64
64
|
debug?: DebugConfig;
|
|
65
65
|
}
|
|
66
66
|
|
|
67
|
-
/** Debug panel config — enabled by default, pass enabled: false to
|
|
67
|
+
/** Debug panel config — enabled in development by default, pass enabled: true/false to override */
|
|
68
68
|
export interface DebugConfig extends DebugButtonProps {
|
|
69
|
-
/** Set false to disable
|
|
69
|
+
/** Set false to disable, true to force-enable. Default: process.env.NODE_ENV === 'development' */
|
|
70
70
|
enabled?: boolean;
|
|
71
71
|
}
|
|
72
72
|
|
|
@@ -15,7 +15,7 @@ import ReactGA from 'react-ga4';
|
|
|
15
15
|
import { useAuth } from '@djangocfg/api/auth';
|
|
16
16
|
|
|
17
17
|
// Check if we're in production
|
|
18
|
-
|
|
18
|
+
import { isProd as isProduction } from '@djangocfg/ui-core/lib';
|
|
19
19
|
|
|
20
20
|
// Tracking state
|
|
21
21
|
let isInitialized = false;
|
package/src/utils/config.ts
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Frontend configuration from environment variables
|
|
3
3
|
*/
|
|
4
|
+
import { isDev } from '@djangocfg/ui-core/lib';
|
|
5
|
+
|
|
4
6
|
export const config = {
|
|
5
7
|
/**
|
|
6
8
|
* Development mode flag
|
|
7
9
|
* In development mode, any OTP code is accepted for authentication
|
|
8
10
|
*/
|
|
9
|
-
isDevelopment:
|
|
11
|
+
isDevelopment: isDev,
|
|
10
12
|
} as const;
|
package/src/utils/logger.ts
CHANGED
|
@@ -12,7 +12,7 @@ import { createConsola } from 'consola';
|
|
|
12
12
|
* - 4: debug
|
|
13
13
|
* - 5: trace, verbose
|
|
14
14
|
*/
|
|
15
|
-
|
|
15
|
+
import { isDev as isDevelopment } from '@djangocfg/ui-core/lib';
|
|
16
16
|
const isStaticBuild = process.env.NEXT_PUBLIC_STATIC_BUILD === 'true';
|
|
17
17
|
const showLogs = isDevelopment || isStaticBuild;
|
|
18
18
|
|