@djangocfg/layouts 2.1.460 → 2.1.463
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 +9 -8
- package/package.json +13 -13
- package/src/layouts/AppLayout/BaseApp.tsx +0 -2
- package/src/layouts/PublicLayout/primitives/NavDesktopItems.tsx +3 -3
- package/src/layouts/types/index.ts +0 -3
- package/src/layouts/types/providers.types.ts +1 -9
- package/src/theme/index.ts +2 -13
- package/src/theme/ThemeStyleBridge.tsx +0 -39
package/README.md
CHANGED
|
@@ -103,16 +103,17 @@ Architecture: `AuthShell` orchestrator dispatches to `CenteredShell` or `SplitSh
|
|
|
103
103
|
|
|
104
104
|
## Theme
|
|
105
105
|
|
|
106
|
-
|
|
106
|
+
Themes are selected by the host application's CSS import. `BaseApp` owns only
|
|
107
|
+
the light/dark class and does not inject token styles at runtime:
|
|
107
108
|
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
Playground-only buckets (shadows, typography, spacing) are **not** injected — export full CSS from the Theme Configurator when you need them.
|
|
109
|
+
```css
|
|
110
|
+
@import "@djangocfg/ui-core/styles/full";
|
|
111
|
+
@import "@djangocfg/ui-core/styles/presets/macos";
|
|
112
|
+
```
|
|
114
113
|
|
|
115
|
-
|
|
114
|
+
The package exports `ThemeStylePresetId` and `THEME_STYLE_PRESET_ORDER` for
|
|
115
|
+
metadata and selectors. Preset tokens live exclusively in the static CSS
|
|
116
|
+
files shipped by `@djangocfg/ui-core`.
|
|
116
117
|
|
|
117
118
|
---
|
|
118
119
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@djangocfg/layouts",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.463",
|
|
4
4
|
"description": "Simple, straightforward layout components for Next.js - import and use with props",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"layouts",
|
|
@@ -89,10 +89,10 @@
|
|
|
89
89
|
"check": "tsc --noEmit"
|
|
90
90
|
},
|
|
91
91
|
"peerDependencies": {
|
|
92
|
-
"@djangocfg/api": "^2.1.
|
|
93
|
-
"@djangocfg/centrifugo": "^2.1.
|
|
94
|
-
"@djangocfg/i18n": "^2.1.
|
|
95
|
-
"@djangocfg/ui-core": "^2.1.
|
|
92
|
+
"@djangocfg/api": "^2.1.463",
|
|
93
|
+
"@djangocfg/centrifugo": "^2.1.463",
|
|
94
|
+
"@djangocfg/i18n": "^2.1.463",
|
|
95
|
+
"@djangocfg/ui-core": "^2.1.463",
|
|
96
96
|
"@hookform/resolvers": "^5.2.2",
|
|
97
97
|
"consola": "^3.4.2",
|
|
98
98
|
"lucide-react": "^0.545.0",
|
|
@@ -109,7 +109,7 @@
|
|
|
109
109
|
"tailwindcss-animate": "^1.0.7",
|
|
110
110
|
"zod": "^4.3.6",
|
|
111
111
|
"zustand": "^5.0.0",
|
|
112
|
-
"@djangocfg/devtools": "^2.1.
|
|
112
|
+
"@djangocfg/devtools": "^2.1.463"
|
|
113
113
|
},
|
|
114
114
|
"peerDependenciesMeta": {
|
|
115
115
|
"@djangocfg/devtools": {
|
|
@@ -124,12 +124,12 @@
|
|
|
124
124
|
"uuid": "^11.1.0"
|
|
125
125
|
},
|
|
126
126
|
"devDependencies": {
|
|
127
|
-
"@djangocfg/api": "^2.1.
|
|
128
|
-
"@djangocfg/centrifugo": "^2.1.
|
|
129
|
-
"@djangocfg/i18n": "^2.1.
|
|
130
|
-
"@djangocfg/typescript-config": "^2.1.
|
|
131
|
-
"@djangocfg/ui-core": "^2.1.
|
|
132
|
-
"@djangocfg/ui-tools": "^2.1.
|
|
127
|
+
"@djangocfg/api": "^2.1.463",
|
|
128
|
+
"@djangocfg/centrifugo": "^2.1.463",
|
|
129
|
+
"@djangocfg/i18n": "^2.1.463",
|
|
130
|
+
"@djangocfg/typescript-config": "^2.1.463",
|
|
131
|
+
"@djangocfg/ui-core": "^2.1.463",
|
|
132
|
+
"@djangocfg/ui-tools": "^2.1.463",
|
|
133
133
|
"@types/node": "^25.2.3",
|
|
134
134
|
"@types/react": "^19.2.15",
|
|
135
135
|
"@types/react-dom": "^19.2.3",
|
|
@@ -137,7 +137,7 @@
|
|
|
137
137
|
"next-intl": "^4.9.1",
|
|
138
138
|
"typescript": "^5.9.3",
|
|
139
139
|
"zustand": "^5.0.9",
|
|
140
|
-
"@djangocfg/devtools": "^2.1.
|
|
140
|
+
"@djangocfg/devtools": "^2.1.463"
|
|
141
141
|
},
|
|
142
142
|
"publishConfig": {
|
|
143
143
|
"access": "public"
|
|
@@ -56,7 +56,6 @@ import { UiProviders } from '@djangocfg/ui-core/providers';
|
|
|
56
56
|
import { NextRouterAdapter, NextLinkProvider } from '@djangocfg/ui-core/adapters/nextjs';
|
|
57
57
|
import { NextIntlLinkBridge } from './NextIntlLinkBridge';
|
|
58
58
|
import { ThemeProvider } from '@djangocfg/ui-core/theme';
|
|
59
|
-
import { ThemeStyleBridge } from '../../theme/ThemeStyleBridge';
|
|
60
59
|
import type { BoundaryRenderProps } from '@djangocfg/ui-core/components';
|
|
61
60
|
import { getT } from '@djangocfg/i18n';
|
|
62
61
|
import { ErrorTrackingProvider } from '../../components/errors/ErrorsTracker';
|
|
@@ -160,7 +159,6 @@ export function BaseApp({
|
|
|
160
159
|
defaultTheme={theme?.defaultTheme || 'system'}
|
|
161
160
|
storageKey={theme?.storageKey}
|
|
162
161
|
>
|
|
163
|
-
<ThemeStyleBridge style={theme?.style} />
|
|
164
162
|
{/*
|
|
165
163
|
* NextRouterAdapter wires @djangocfg/ui-core router hooks
|
|
166
164
|
* (useNavigate, useQueryState, etc.) to next/navigation so
|
|
@@ -46,10 +46,10 @@ function subMenuLinkCls(active: boolean) {
|
|
|
46
46
|
}
|
|
47
47
|
|
|
48
48
|
// Real glass: low-opacity surface so the blur actually shows the page behind
|
|
49
|
-
// it.
|
|
50
|
-
//
|
|
49
|
+
// it. The package-level nav-dropdown-glass utility keeps the frosted effect
|
|
50
|
+
// present even when the consuming app does not scan layout sources.
|
|
51
51
|
const popoverCls =
|
|
52
|
-
'absolute left-0 top-full mt-1 z-[1200] min-w-[14.5rem] rounded-xl border border-white/10
|
|
52
|
+
'absolute left-0 top-full mt-1 z-[1200] min-w-[14.5rem] rounded-xl border border-white/10 nav-dropdown-glass p-1.5 shadow-[0_1px_2px_rgba(0,0,0,0.05),0_8px_28px_rgba(0,0,0,0.18)] dark:shadow-[0_8px_30px_rgba(0,0,0,0.45)]';
|
|
53
53
|
|
|
54
54
|
function NavDesktopItemsRaw({
|
|
55
55
|
items,
|
|
@@ -5,10 +5,7 @@
|
|
|
5
5
|
* Note: Analytics, PWA, Push, and Error types are defined in their respective modules
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
// Re-export for consumers that only import from `layouts/types`
|
|
11
|
-
export type { ThemeStyleConfig, ThemeCssVarKey, ThemeCssVarMap, ThemeStylePresetId } from '@djangocfg/ui-core/styles/presets';
|
|
8
|
+
export type { ThemeStylePresetId } from '@djangocfg/ui-core/styles/presets';
|
|
12
9
|
|
|
13
10
|
// ============================================================================
|
|
14
11
|
// Theme Configuration
|
|
@@ -17,11 +14,6 @@ export type { ThemeStyleConfig, ThemeCssVarKey, ThemeCssVarMap, ThemeStylePreset
|
|
|
17
14
|
export interface ThemeConfig {
|
|
18
15
|
defaultTheme?: 'light' | 'dark' | 'system';
|
|
19
16
|
storageKey?: string;
|
|
20
|
-
/**
|
|
21
|
-
* Typed CSS variable presets and per-mode overrides (see `ThemeStyleBridge` in BaseApp).
|
|
22
|
-
* For heavy visual editing, use the playground Theme Configurator and export CSS instead.
|
|
23
|
-
*/
|
|
24
|
-
style?: ThemeStyleConfig;
|
|
25
17
|
}
|
|
26
18
|
|
|
27
19
|
// ============================================================================
|
package/src/theme/index.ts
CHANGED
|
@@ -1,14 +1,3 @@
|
|
|
1
|
-
export type {
|
|
2
|
-
ThemeCssVarChartKey,
|
|
3
|
-
ThemeCssVarChromeKey,
|
|
4
|
-
ThemeCssVarColorKey,
|
|
5
|
-
ThemeCssVarKey,
|
|
6
|
-
ThemeCssVarMap,
|
|
7
|
-
ThemeCssVarSidebarKey,
|
|
8
|
-
ThemeStyleConfig,
|
|
9
|
-
ThemeStylePresetId,
|
|
10
|
-
} from '@djangocfg/ui-core/styles/presets';
|
|
1
|
+
export type { ThemeStylePresetId } from '@djangocfg/ui-core/styles/presets';
|
|
11
2
|
|
|
12
|
-
export {
|
|
13
|
-
|
|
14
|
-
export { ThemeStyleBridge, type ThemeStyleBridgeProps } from './ThemeStyleBridge';
|
|
3
|
+
export { THEME_STYLE_PRESET_ORDER } from '@djangocfg/ui-core/styles/presets';
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
|
|
3
|
-
import { useEffect, useMemo } from 'react';
|
|
4
|
-
|
|
5
|
-
import { buildThemeStyleSheet, type ThemeStyleConfig } from '@djangocfg/ui-core/styles/presets';
|
|
6
|
-
|
|
7
|
-
const STYLE_ELEMENT_ID = 'djangocfg-baseapp-theme-style';
|
|
8
|
-
|
|
9
|
-
export interface ThemeStyleBridgeProps {
|
|
10
|
-
style?: ThemeStyleConfig;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
/**
|
|
14
|
-
* Injects merged theme CSS variables after globals (preset + typed overrides).
|
|
15
|
-
* Renders nothing; safe to mount once under ThemeProvider.
|
|
16
|
-
*/
|
|
17
|
-
export function ThemeStyleBridge({ style }: ThemeStyleBridgeProps) {
|
|
18
|
-
const css = useMemo(() => buildThemeStyleSheet(style), [style]);
|
|
19
|
-
|
|
20
|
-
useEffect(() => {
|
|
21
|
-
if (typeof document === 'undefined') return;
|
|
22
|
-
|
|
23
|
-
let el = document.getElementById(STYLE_ELEMENT_ID) as HTMLStyleElement | null;
|
|
24
|
-
if (!css) {
|
|
25
|
-
el?.remove();
|
|
26
|
-
return;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
if (!el) {
|
|
30
|
-
el = document.createElement('style');
|
|
31
|
-
el.id = STYLE_ELEMENT_ID;
|
|
32
|
-
document.head.appendChild(el);
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
el.textContent = css;
|
|
36
|
-
}, [css]);
|
|
37
|
-
|
|
38
|
-
return null;
|
|
39
|
-
}
|