@robot-admin/layout 3.1.0 → 3.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/CHANGELOG.md +164 -153
- package/README.md +518 -469
- package/dist/core/index.cjs +8 -1
- package/dist/core/index.cjs.map +1 -1
- package/dist/core/index.d.cts +6 -1
- package/dist/core/index.d.ts +6 -1
- package/dist/core/index.js +7 -1
- package/dist/core/index.js.map +1 -1
- package/dist/index.cjs +1 -39
- package/dist/index.css +1 -1
- package/dist/index.d.cts +1336 -348
- package/dist/index.d.ts +1336 -348
- package/dist/index.js +3 -2338
- package/dist/naive/index.cjs +1 -0
- package/dist/naive/index.d.cts +2927 -0
- package/dist/naive/index.d.ts +2927 -0
- package/dist/naive/index.js +3 -0
- package/dist/naive-Bd8pxcrF.js +1635 -0
- package/dist/naive-Bd8pxcrF.js.map +1 -0
- package/dist/naive-BfZUS_c8.cjs +28 -0
- package/dist/naive-BfZUS_c8.cjs.map +1 -0
- package/dist/vue/index.cjs +1 -0
- package/dist/vue/index.d.cts +1181 -0
- package/dist/vue/index.d.ts +1181 -0
- package/dist/vue/index.js +2 -0
- package/dist/vue-BRQ1Fg0b.js +739 -0
- package/dist/vue-BRQ1Fg0b.js.map +1 -0
- package/dist/vue-DhbxgFgz.cjs +2 -0
- package/dist/vue-DhbxgFgz.cjs.map +1 -0
- package/package.json +128 -102
- package/src/styles/layouts.scss +137 -82
- package/src/styles/settings.scss +421 -391
- package/dist/index.cjs.map +0 -1
- package/dist/index.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,153 +1,164 @@
|
|
|
1
|
-
# Changelog
|
|
2
|
-
|
|
3
|
-
## 3.
|
|
4
|
-
|
|
5
|
-
### Minor Changes
|
|
6
|
-
|
|
7
|
-
- Add `
|
|
8
|
-
-
|
|
9
|
-
-
|
|
10
|
-
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
-
|
|
30
|
-
-
|
|
31
|
-
-
|
|
32
|
-
-
|
|
33
|
-
-
|
|
34
|
-
-
|
|
35
|
-
|
|
36
|
-
## 2.2
|
|
37
|
-
|
|
38
|
-
###
|
|
39
|
-
|
|
40
|
-
-
|
|
41
|
-
-
|
|
42
|
-
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
- **
|
|
53
|
-
- **
|
|
54
|
-
|
|
55
|
-
###
|
|
56
|
-
|
|
57
|
-
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
-
|
|
79
|
-
-
|
|
80
|
-
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
- **
|
|
99
|
-
|
|
100
|
-
- Removed
|
|
101
|
-
-
|
|
102
|
-
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
- Removed
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
- `
|
|
119
|
-
- `
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
- Removed
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
-
|
|
130
|
-
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
-
|
|
141
|
-
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
-
|
|
152
|
-
-
|
|
153
|
-
-
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## 3.2.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- Add layered `@robot-admin/layout/vue` and `@robot-admin/layout/naive` entrypoints. The Naive entry aggregates the Vue API for one-entry consumption, all runtime entries preserve shared InjectionKey/Store identity, and the Vue entry contains no Naive UI or Element Plus imports; the 3.x root entry remains fully compatible.
|
|
8
|
+
- Decouple `createLayoutContext()` from the package Pinia Store through the structural `LayoutSettingsSource` contract and add safe host-menu normalization.
|
|
9
|
+
- Extract UI-independent settings transactions, responsive-menu measurement, icon fallback, CSS-variable binding, and the shared routed-content renderer for reuse by future UI adapters.
|
|
10
|
+
- Scope layout selectors and animation names, add `--ra-layout-*` variables, support reactive custom CSS variable targets, and restore detached/disposed targets without allowing post-disposal writes while preserving 3.x legacy variables by default.
|
|
11
|
+
- Restore custom Store defaults correctly from SettingsDrawer, establish `C_*Layout` as the single canonical component naming system, and retain unprefixed 3.1 names only as deprecated compatibility exports until 4.0.
|
|
12
|
+
- Add browser contracts for all six layouts, typed/legacy collapse interoperability, scoped side effects, structural Store adapters, and CI verification of source, package, ESM/CJS and dependency boundaries.
|
|
13
|
+
|
|
14
|
+
## 3.1.0
|
|
15
|
+
|
|
16
|
+
### Minor Changes
|
|
17
|
+
|
|
18
|
+
- Add `createLayoutContext()` and `provideLayout()` to derive the complete reactive layout contract from a settings Store, menus, dark state, brand data, and an optional icon component.
|
|
19
|
+
- Keep the advanced `LayoutContext` API intact while formally deprecating the legacy `C_*Layout` aliases for removal in 4.0.
|
|
20
|
+
- Add browser interaction coverage for SettingsDrawer providers, atomic imports, reset rollback, host-owned cache clearing, and global visual-effect cleanup.
|
|
21
|
+
- Correct integration prerequisites, host-owned setting semantics, migration guidance, architecture diagrams, and stale version references without changing existing layout visuals or interactions.
|
|
22
|
+
|
|
23
|
+
## 3.0.0
|
|
24
|
+
|
|
25
|
+
### Major Changes
|
|
26
|
+
|
|
27
|
+
- Release the 3.0 architecture upgrade while preserving the existing Naive UI layouts, interactions, slots, and visual styling.
|
|
28
|
+
|
|
29
|
+
- Add a UI-independent `@robot-admin/layout/core` entrypoint for validated settings and shared contracts.
|
|
30
|
+
- Make layout/store injection and collapsed state work reliably with custom stores and multi-instance hosts.
|
|
31
|
+
- Replace destructive built-in storage clearing with explicit host actions and add stable SettingsDrawer extension slots.
|
|
32
|
+
- Validate complete imported configuration files before applying state and restore host-owned global classes on teardown.
|
|
33
|
+
- Respect the transition enable switch, harden route caching and responsive measurement, and improve built-in menu keyboard semantics.
|
|
34
|
+
- Verify all six layout modes in SSR and validate both ESM and CommonJS package entrypoints before publishing.
|
|
35
|
+
|
|
36
|
+
## 2.3.2
|
|
37
|
+
|
|
38
|
+
### Patch Changes
|
|
39
|
+
|
|
40
|
+
- Validate imported settings at runtime, support short hex colors safely, and preserve invalid color input instead of silently turning it black.
|
|
41
|
+
- Use route-segment-aware menu matching so `/users` no longer activates `/users-admin`.
|
|
42
|
+
- Disable cache debug logging and global window helpers by default; add configurable Settings Store ids.
|
|
43
|
+
- Standardize the automatic theme value on `system` and roll back settings if asynchronous theme synchronization fails.
|
|
44
|
+
- Improve menu/drawer keyboard navigation, focus restoration and ARIA state; guard browser and Canvas APIs for SSR or unsupported environments.
|
|
45
|
+
- Synchronize the exported version constant with package version 2.3.2 and add regression tests for the critical settings and routing contracts.
|
|
46
|
+
|
|
47
|
+
## 2.2.0
|
|
48
|
+
|
|
49
|
+
### 🐛 Bug 修复
|
|
50
|
+
|
|
51
|
+
- **ReverseHorizontalMixLayout 右侧菜单错位**: 修复右侧菜单显示在底部而非右侧的问题(`.main-area` 添加 `flex-direction: row`)
|
|
52
|
+
- **MixLayout 二级菜单消失**: 修复鼠标离开后二级菜单内容消失的问题(新增 `displayMenuItem` 作为 `hoveredMenuItem` 的 fallback)
|
|
53
|
+
- **MixTopLayout 全局 CSS 泄漏**: 修复 `.main-area`、`.content-layout` 等选择器污染其他布局的问题(嵌套到 `.mix-top-layout-container` 内)
|
|
54
|
+
|
|
55
|
+
### ✨ 功能优化
|
|
56
|
+
|
|
57
|
+
- **ResponsiveMenu 字符宽度估算**: 区分 CJK 字符(15px)和 ASCII 字符(8px),顶部菜单文字完整显示不截断
|
|
58
|
+
- **ReverseHorizontalMixLayout 折叠动画**: 用 width 过渡替代 Transition,避免黑色闪烁,动画更流畅(0.35s cubic-bezier)
|
|
59
|
+
- **MixLayout 交互模式**: 从悬停触发改为纯点击模式,点击同一菜单切换展开/折叠,点击不同菜单切换内容不关闭
|
|
60
|
+
|
|
61
|
+
### 🎨 视觉设计
|
|
62
|
+
|
|
63
|
+
- **ReverseHorizontalMixLayout 玻璃质感**: 参考搜索组件样式,应用 indigo 渐变玻璃设计(`linear-gradient` + `backdrop-filter` + 顶部高光线)
|
|
64
|
+
- **pure CSS 图标**: 替换所有 UnoCSS 图标(`i-ri:*`)为纯 CSS 实现(dots-icon、grid-icon、hamburger-icon、collapse-arrow),减少外部依赖
|
|
65
|
+
|
|
66
|
+
### 📦 依赖
|
|
67
|
+
|
|
68
|
+
- 移除对 UnoCSS 图标的依赖,提升包的独立性
|
|
69
|
+
|
|
70
|
+
---
|
|
71
|
+
|
|
72
|
+
## 2.1.0
|
|
73
|
+
|
|
74
|
+
### Minor Changes
|
|
75
|
+
|
|
76
|
+
- 重构目录结构 + 代码优化
|
|
77
|
+
|
|
78
|
+
- **目录重构**: 6 种布局骨架迁入 `components/layouts/` 子目录,层次更清晰
|
|
79
|
+
- **文件分离**: 每个布局的样式从 `<style>` 标签提取到独立的 `index.scss` 文件
|
|
80
|
+
- **注释统一**: 所有组件注释标准化为 `@robot-admin/layout - ComponentName` 格式
|
|
81
|
+
- **文档优化**: 重写 README,精简核心内容、添加目录树、API 参考更清晰
|
|
82
|
+
|
|
83
|
+
All notable changes to this project will be documented in this file.
|
|
84
|
+
|
|
85
|
+
## [2.0.2] - 2026-02-11
|
|
86
|
+
|
|
87
|
+
### 🗑️ Removed
|
|
88
|
+
|
|
89
|
+
- **Dead files**: Removed unused `tsup.config.ts` (actual build uses Vite)
|
|
90
|
+
- **Empty directories**: Removed `composables/`, `core/`, `layouts/` (8 empty directories total)
|
|
91
|
+
- **Unused dependencies**: Removed `vue-router` from peerDependencies and devDependencies (never used in source code)
|
|
92
|
+
|
|
93
|
+
### 🔧 Fixed
|
|
94
|
+
|
|
95
|
+
- **package.json**:
|
|
96
|
+
- Refined `sideEffects` to `["*.css", "*.scss"]` for better tree-shaking
|
|
97
|
+
- Removed blocking patterns `"*.vue"` and `"src/index.ts"`
|
|
98
|
+
- **Source code**:
|
|
99
|
+
|
|
100
|
+
- `constants/index.ts`: Removed commented-out code, fixed version from `"1.0.0"` to `"2.0.2"`
|
|
101
|
+
- `types/index.ts`: Removed unimplemented `storageKey` option from `SettingsStoreOptions`
|
|
102
|
+
- `stores/settings.ts`:
|
|
103
|
+
- Exported `adjustColor` utility function (was private)
|
|
104
|
+
- Removed redundant `|| false` in collapsed state initialization
|
|
105
|
+
- `data.ts`:
|
|
106
|
+
- Fixed `COLOR_SWATCHES` duplication (now imports from constants)
|
|
107
|
+
- Renamed `LAYOUT_MODES` to `LAYOUT_MODE_OPTIONS` to avoid naming conflict
|
|
108
|
+
|
|
109
|
+
- **SettingsDrawer component**:
|
|
110
|
+
|
|
111
|
+
- Removed unimplemented `storageKey` prop
|
|
112
|
+
- Fixed hardcoded timezone `"XIAn"` → `Intl.DateTimeFormat().resolvedOptions().timeZone`
|
|
113
|
+
- Fixed `handleResetLayout` missing `fixedHeader` and `tagsViewStyle` resets
|
|
114
|
+
- Fixed `handleImportConfig` to use `$patch` instead of `Object.assign` for proper reactivity
|
|
115
|
+
|
|
116
|
+
- **Styles (`settings.scss`)**:
|
|
117
|
+
|
|
118
|
+
- Replaced hardcoded `#409EFF` with `var(--primary-color, #409eff)` for theme color support
|
|
119
|
+
- Replaced hardcoded `rgba(32, 128, 240)` shadows with CSS variable fallbacks
|
|
120
|
+
|
|
121
|
+
- **Build config**:
|
|
122
|
+
- Removed unused `globals` from `vite.config.ts` (no UMD output)
|
|
123
|
+
|
|
124
|
+
### 📖 Documentation
|
|
125
|
+
|
|
126
|
+
- **README.md**: Fixed multiple inconsistencies with actual code:
|
|
127
|
+
- `themeMode` default: `'system'` → `'light'`
|
|
128
|
+
- `transitionType` default: `'fade'` → `'slide'`
|
|
129
|
+
- `tagsViewHeight` default: `40` → `44`
|
|
130
|
+
- `showFooter` default: `false` → `true`
|
|
131
|
+
- Removed non-existent store properties: `enableWatermark`, `watermarkText`, `enableGrayMode`, `enableColorWeakMode`
|
|
132
|
+
- Removed non-existent methods: `exportSettings()`, `importSettings()`
|
|
133
|
+
- Removed unimplemented feature: "持久化存储"
|
|
134
|
+
- Removed all `storageKey` parameter references
|
|
135
|
+
- Added `adjustColor` utility function documentation
|
|
136
|
+
- Fixed `ThemeMode` type: `'system'` → `'auto'`
|
|
137
|
+
|
|
138
|
+
### ✨ Enhanced
|
|
139
|
+
|
|
140
|
+
- Exported `adjustColor` utility function for external use
|
|
141
|
+
- Improved CSS variable support for theme customization
|
|
142
|
+
|
|
143
|
+
---
|
|
144
|
+
|
|
145
|
+
## [2.0.1] - 2026-02-09
|
|
146
|
+
|
|
147
|
+
### ✨ Added
|
|
148
|
+
|
|
149
|
+
- Initial v2.0 release with decoupled architecture
|
|
150
|
+
- Complete settings management system
|
|
151
|
+
- SettingsDrawer UI component
|
|
152
|
+
- 6 layout mode presets
|
|
153
|
+
- Theme customization with CSS variables
|
|
154
|
+
- Full TypeScript support
|
|
155
|
+
|
|
156
|
+
---
|
|
157
|
+
|
|
158
|
+
## [2.0.0] - 2026-02-09
|
|
159
|
+
|
|
160
|
+
### 🎉 Initial Release
|
|
161
|
+
|
|
162
|
+
- Layout and settings management system
|
|
163
|
+
- Integration with @robot-admin/theme
|
|
164
|
+
- Naive UI components support
|