@djangocfg/layouts 1.1.0 → 1.2.0
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.
|
|
3
|
+
"version": "1.2.0",
|
|
4
4
|
"description": "Layout system and components for Unrealon applications",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "DjangoCFG",
|
|
@@ -53,9 +53,9 @@
|
|
|
53
53
|
"check": "tsc --noEmit"
|
|
54
54
|
},
|
|
55
55
|
"peerDependencies": {
|
|
56
|
-
"@djangocfg/api": "^1.
|
|
57
|
-
"@djangocfg/og-image": "^1.
|
|
58
|
-
"@djangocfg/ui": "^1.
|
|
56
|
+
"@djangocfg/api": "^1.2.0",
|
|
57
|
+
"@djangocfg/og-image": "^1.2.0",
|
|
58
|
+
"@djangocfg/ui": "^1.2.0",
|
|
59
59
|
"@hookform/resolvers": "^5.2.0",
|
|
60
60
|
"consola": "^3.4.2",
|
|
61
61
|
"lucide-react": "^0.468.0",
|
|
@@ -76,7 +76,7 @@
|
|
|
76
76
|
"vidstack": "0.6.15"
|
|
77
77
|
},
|
|
78
78
|
"devDependencies": {
|
|
79
|
-
"@djangocfg/typescript-config": "^1.
|
|
79
|
+
"@djangocfg/typescript-config": "^1.2.0",
|
|
80
80
|
"@types/node": "^24.7.2",
|
|
81
81
|
"@types/react": "19.2.2",
|
|
82
82
|
"@types/react-dom": "19.2.1",
|
|
@@ -160,6 +160,8 @@ function LayoutRouter({
|
|
|
160
160
|
* ```
|
|
161
161
|
*/
|
|
162
162
|
export function AppLayout({ children, config, disableLayout = false, forceLayout, fontFamily }: AppLayoutProps) {
|
|
163
|
+
const router = useRouter();
|
|
164
|
+
|
|
163
165
|
// Check if ErrorBoundary is enabled (default: true)
|
|
164
166
|
const enableErrorBoundary = config.errors?.enableErrorBoundary !== false;
|
|
165
167
|
const supportEmail = config.errors?.supportEmail;
|
|
@@ -205,7 +207,11 @@ export function AppLayout({ children, config, disableLayout = false, forceLayout
|
|
|
205
207
|
// Wrap with ErrorBoundary if enabled
|
|
206
208
|
if (enableErrorBoundary) {
|
|
207
209
|
return (
|
|
208
|
-
<ErrorBoundary
|
|
210
|
+
<ErrorBoundary
|
|
211
|
+
key={router.pathname}
|
|
212
|
+
supportEmail={supportEmail}
|
|
213
|
+
onError={onError}
|
|
214
|
+
>
|
|
209
215
|
{content}
|
|
210
216
|
</ErrorBoundary>
|
|
211
217
|
);
|
|
@@ -3,13 +3,13 @@
|
|
|
3
3
|
* Type definitions for RAG-powered chat widget
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
import type { ChatMessage
|
|
6
|
+
import type { ChatMessage, ChatSource } from '@djangocfg/api/cfg/contexts';
|
|
7
7
|
|
|
8
8
|
// ─────────────────────────────────────────────────────────────────────────
|
|
9
9
|
// Extended Message Type (for UI with sources)
|
|
10
10
|
// ─────────────────────────────────────────────────────────────────────────
|
|
11
11
|
|
|
12
|
-
export interface ChatMessageWithSources extends
|
|
12
|
+
export interface ChatMessageWithSources extends ChatMessage {
|
|
13
13
|
sources?: ChatSource[];
|
|
14
14
|
}
|
|
15
15
|
|
|
@@ -74,6 +74,5 @@ export interface SessionListProps {
|
|
|
74
74
|
// Re-export types from API
|
|
75
75
|
// ─────────────────────────────────────────────────────────────────────────
|
|
76
76
|
|
|
77
|
-
export type { ChatSource } from '@djangocfg/api/cfg/contexts';
|
|
78
|
-
export type { ChatMessage as BaseChatMessage } from '@djangocfg/api/cfg/contexts';
|
|
77
|
+
export type { ChatSource, ChatMessage } from '@djangocfg/api/cfg/contexts';
|
|
79
78
|
|