@done-coding/forge-core 0.0.0-placeholder.0 → 0.100.0-alpha.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.
Files changed (283) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +49 -0
  3. package/es/_virtual/_plugin-vue_export-helper.mjs +10 -0
  4. package/es/bridge/badge.mjs +37 -0
  5. package/es/bridge/config-hook.mjs +58 -0
  6. package/es/bridge/contracts/event.mjs +102 -0
  7. package/es/bridge/contracts/index.mjs +5 -0
  8. package/es/bridge/event.mjs +87 -0
  9. package/es/bridge/index.mjs +331 -0
  10. package/es/bridge/layout.mjs +100 -0
  11. package/es/bridge/permission.mjs +91 -0
  12. package/es/bridge/plugin.mjs +39 -0
  13. package/es/bridge/route.mjs +78 -0
  14. package/es/bridge/state.mjs +61 -0
  15. package/es/bridge/storage.mjs +26 -0
  16. package/es/bridge/theme/index.mjs +233 -0
  17. package/es/bridge/theme/persist.mjs +18 -0
  18. package/es/bridge/theme/system-dark.mjs +18 -0
  19. package/es/components/basic/AppCollapseToggle.vue.mjs +7 -0
  20. package/es/components/basic/AppCollapseToggle.vue2.mjs +63 -0
  21. package/es/components/basic/action-btn/ActionBtn.vue.mjs +200 -0
  22. package/es/components/basic/action-btn/ActionBtn.vue2.mjs +4 -0
  23. package/es/components/basic/action-btn/index.mjs +4 -0
  24. package/es/components/basic/action-btn/use-action-btn-report.mjs +54 -0
  25. package/es/components/basic/action-btn-group/ActionBtnGroup.vue.mjs +69 -0
  26. package/es/components/basic/action-btn-group/ActionBtnGroup.vue2.mjs +4 -0
  27. package/es/components/basic/action-btn-group/index.mjs +4 -0
  28. package/es/components/basic/action-btn-group/use-action-btn-group-report.mjs +30 -0
  29. package/es/components/basic/display-contracts/index.mjs +1 -0
  30. package/es/components/basic/drag-float/DragFloat.vue.mjs +7 -0
  31. package/es/components/basic/drag-float/DragFloat.vue2.mjs +109 -0
  32. package/es/components/basic/drag-float/index.mjs +4 -0
  33. package/es/components/basic/height-provider/HeightProvider.vue.mjs +62 -0
  34. package/es/components/basic/height-provider/HeightProvider.vue2.mjs +4 -0
  35. package/es/components/basic/height-provider/index.mjs +4 -0
  36. package/es/components/basic/index.mjs +4 -0
  37. package/es/components/basic/shadow-clone/ShadowClone.vue.mjs +32 -0
  38. package/es/components/basic/shadow-clone/ShadowClone.vue2.mjs +4 -0
  39. package/es/components/basic/shadow-clone/index.mjs +4 -0
  40. package/es/components/basic/shadow-clone/use-shadow-target.mjs +76 -0
  41. package/es/components/basic/slot-layout-flow-aside/SlotLayoutFlowAside.vue.mjs +7 -0
  42. package/es/components/basic/slot-layout-flow-aside/SlotLayoutFlowAside.vue2.mjs +68 -0
  43. package/es/components/basic/slot-layout-flow-aside/index.mjs +4 -0
  44. package/es/components/basic/slot-layout-template/SlotLayoutTemplate.vue.mjs +30 -0
  45. package/es/components/basic/slot-layout-template/SlotLayoutTemplate.vue2.mjs +4 -0
  46. package/es/components/basic/slot-layout-template/index.mjs +4 -0
  47. package/es/components/basic/watch-size/WatchSize.vue.mjs +73 -0
  48. package/es/components/basic/watch-size/WatchSize.vue2.mjs +4 -0
  49. package/es/components/basic/watch-size/index.mjs +4 -0
  50. package/es/components/config/app-theme/AppTheme.vue.mjs +7 -0
  51. package/es/components/config/app-theme/AppTheme.vue2.mjs +82 -0
  52. package/es/components/config/app-theme/index.mjs +4 -0
  53. package/es/components/data/badge-mark/BadgeMark.vue.mjs +7 -0
  54. package/es/components/data/badge-mark/BadgeMark.vue2.mjs +80 -0
  55. package/es/components/data/badge-mark/index.mjs +4 -0
  56. package/es/components/data/badge-mark/use-badge-mask.mjs +82 -0
  57. package/es/components/data/badge-mark/use-badge.mjs +106 -0
  58. package/es/components/data/boolean-tag/BooleanTag.vue.mjs +36 -0
  59. package/es/components/data/boolean-tag/BooleanTag.vue2.mjs +4 -0
  60. package/es/components/data/boolean-tag/index.mjs +4 -0
  61. package/es/components/data/image-preview-trigger/ImagePreviewTrigger.vue.mjs +38 -0
  62. package/es/components/data/image-preview-trigger/ImagePreviewTrigger.vue2.mjs +4 -0
  63. package/es/components/data/image-preview-trigger/index.mjs +4 -0
  64. package/es/components/data/modal-image-preview/ModalImagePreview.vue.mjs +52 -0
  65. package/es/components/data/modal-image-preview/ModalImagePreview.vue2.mjs +4 -0
  66. package/es/components/data/modal-image-preview/index.mjs +4 -0
  67. package/es/components/feedback/action-confirm/ActionConfirm.vue.mjs +7 -0
  68. package/es/components/feedback/action-confirm/ActionConfirm.vue2.mjs +143 -0
  69. package/es/components/feedback/action-confirm/index.mjs +4 -0
  70. package/es/components/feedback/modal-confirm/ModalConfirm.vue.mjs +8 -0
  71. package/es/components/feedback/modal-confirm/ModalConfirm.vue2.mjs +243 -0
  72. package/es/components/feedback/modal-confirm/index.mjs +4 -0
  73. package/es/components/feedback/modal-video-preview/ModalVideoPreview.vue.mjs +8 -0
  74. package/es/components/feedback/modal-video-preview/ModalVideoPreview.vue2.mjs +93 -0
  75. package/es/components/feedback/modal-video-preview/index.mjs +4 -0
  76. package/es/components/feedback/preview-keys/index.mjs +7 -0
  77. package/es/components/feedback/preview-keys/keys.mjs +7 -0
  78. package/es/components/feedback/shelf-contracts/index.mjs +1 -0
  79. package/es/components/feedback/video-preview-trigger/VideoPreviewTrigger.vue.mjs +7 -0
  80. package/es/components/feedback/video-preview-trigger/VideoPreviewTrigger.vue2.mjs +133 -0
  81. package/es/components/feedback/video-preview-trigger/index.mjs +4 -0
  82. package/es/components/other/TriggerAutoImport.vue.mjs +12 -0
  83. package/es/components/other/TriggerAutoImport.vue2.mjs +4 -0
  84. package/es/components/other/auto-refresh/AutoRefresh.vue.mjs +7 -0
  85. package/es/components/other/auto-refresh/AutoRefresh.vue2.mjs +96 -0
  86. package/es/components/other/auto-refresh/index.mjs +4 -0
  87. package/es/components/other/auto-refresh/use-auto-refresh-report.mjs +31 -0
  88. package/es/components/other/auto-refresh-contracts/index.mjs +1 -0
  89. package/es/components/other/auto-refresh-group/AutoRefreshGroup.vue.mjs +7 -0
  90. package/es/components/other/auto-refresh-group/AutoRefreshGroup.vue2.mjs +69 -0
  91. package/es/components/other/auto-refresh-group/index.mjs +4 -0
  92. package/es/components/other/auto-refresh-group/use-auto-refresh-group-report.mjs +12 -0
  93. package/es/components/other/index.mjs +4 -0
  94. package/es/config/badge-attr.mjs +6 -0
  95. package/es/config/index.mjs +19 -0
  96. package/es/config/list-model.mjs +13 -0
  97. package/es/config/modal-keys.mjs +6 -0
  98. package/es/config/route.mjs +6 -0
  99. package/es/config/slot-region.mjs +45 -0
  100. package/es/helpers/form.mjs +25 -0
  101. package/es/helpers/index.mjs +10 -0
  102. package/es/helpers/list-helper.mjs +77 -0
  103. package/es/hooks/activated.mjs +64 -0
  104. package/es/hooks/feel-size.mjs +46 -0
  105. package/es/hooks/index.mjs +31 -0
  106. package/es/hooks/menus-dispatch.mjs +85 -0
  107. package/es/hooks/timeout.mjs +36 -0
  108. package/es/hooks/use-active-record.mjs +104 -0
  109. package/es/hooks/use-breakpoint.mjs +48 -0
  110. package/es/hooks/use-bridge-report.mjs +12 -0
  111. package/es/hooks/use-channel-viewport-height.mjs +43 -0
  112. package/es/hooks/use-context-defaults.mjs +44 -0
  113. package/es/hooks/use-custom-breakpoint.mjs +69 -0
  114. package/es/hooks/use-is-dev.mjs +16 -0
  115. package/es/hooks/use-observe-size.mjs +43 -0
  116. package/es/hooks/use-permission.mjs +12 -0
  117. package/es/hooks/use-surface.mjs +35 -0
  118. package/es/hooks/use-theme-apply.mjs +496 -0
  119. package/es/hooks/use-viewport-apply.mjs +52 -0
  120. package/es/index.mjs +179 -0
  121. package/es/inject/index.mjs +19 -0
  122. package/es/inject/key.mjs +70 -0
  123. package/es/injection-namespace.mjs +4 -0
  124. package/es/internals/index.mjs +16 -0
  125. package/es/router/group-redirect.mjs +26 -0
  126. package/es/router/guard/index.mjs +36 -0
  127. package/es/router/guard/login.mjs +6 -0
  128. package/es/router/guard/permission.mjs +6 -0
  129. package/es/router/index.mjs +10 -0
  130. package/es/store/app.mjs +306 -0
  131. package/es/store/index.mjs +8 -0
  132. package/es/store/router-permission.mjs +94 -0
  133. package/es/store/user.mjs +128 -0
  134. package/es/style.css +339 -0
  135. package/es/types/index.mjs +1 -0
  136. package/es/utils/dom.mjs +42 -0
  137. package/es/utils/export.mjs +39 -0
  138. package/es/utils/gap-scale.mjs +25 -0
  139. package/es/utils/id.mjs +7 -0
  140. package/es/utils/index.mjs +37 -0
  141. package/es/utils/permission.mjs +31 -0
  142. package/es/utils/router.mjs +42 -0
  143. package/es/utils/theme-scale.mjs +86 -0
  144. package/es/utils/time.mjs +24 -0
  145. package/package.json +232 -1
  146. package/types/bridge/badge.d.ts +215 -0
  147. package/types/bridge/config-hook.d.ts +12 -0
  148. package/types/bridge/contracts/bridge.d.ts +339 -0
  149. package/types/bridge/contracts/config.d.ts +519 -0
  150. package/types/bridge/contracts/event.d.ts +546 -0
  151. package/types/bridge/contracts/index.d.ts +3 -0
  152. package/types/bridge/event.d.ts +3 -0
  153. package/types/bridge/index.d.ts +28 -0
  154. package/types/bridge/layout.d.ts +102 -0
  155. package/types/bridge/permission.d.ts +31 -0
  156. package/types/bridge/plugin.d.ts +11 -0
  157. package/types/bridge/route.d.ts +36 -0
  158. package/types/bridge/state.d.ts +26 -0
  159. package/types/bridge/storage.d.ts +10 -0
  160. package/types/bridge/theme/index.d.ts +10 -0
  161. package/types/bridge/theme/persist.d.ts +23 -0
  162. package/types/bridge/theme/system-dark.d.ts +14 -0
  163. package/types/bridge/theme/types.d.ts +346 -0
  164. package/types/components/basic/AppCollapseToggle.vue.d.ts +14 -0
  165. package/types/components/basic/action-btn/ActionBtn.vue.d.ts +19 -0
  166. package/types/components/basic/action-btn/index.d.ts +1 -0
  167. package/types/components/basic/action-btn/use-action-btn-report.d.ts +12 -0
  168. package/types/components/basic/action-btn-group/ActionBtnGroup.vue.d.ts +18 -0
  169. package/types/components/basic/action-btn-group/index.d.ts +1 -0
  170. package/types/components/basic/action-btn-group/use-action-btn-group-report.d.ts +6 -0
  171. package/types/components/basic/display-contracts/index.d.ts +1 -0
  172. package/types/components/basic/display-contracts/types.d.ts +280 -0
  173. package/types/components/basic/drag-float/DragFloat.vue.d.ts +35 -0
  174. package/types/components/basic/drag-float/index.d.ts +1 -0
  175. package/types/components/basic/height-provider/HeightProvider.vue.d.ts +28 -0
  176. package/types/components/basic/height-provider/index.d.ts +1 -0
  177. package/types/components/basic/index.d.ts +1 -0
  178. package/types/components/basic/shadow-clone/ShadowClone.vue.d.ts +20 -0
  179. package/types/components/basic/shadow-clone/index.d.ts +1 -0
  180. package/types/components/basic/shadow-clone/use-shadow-target.d.ts +9 -0
  181. package/types/components/basic/slot-layout-flow-aside/SlotLayoutFlowAside.vue.d.ts +32 -0
  182. package/types/components/basic/slot-layout-flow-aside/index.d.ts +2 -0
  183. package/types/components/basic/slot-layout-flow-aside/types.d.ts +10 -0
  184. package/types/components/basic/slot-layout-template/SlotLayoutTemplate.vue.d.ts +48 -0
  185. package/types/components/basic/slot-layout-template/index.d.ts +1 -0
  186. package/types/components/basic/watch-size/WatchSize.vue.d.ts +45 -0
  187. package/types/components/basic/watch-size/index.d.ts +1 -0
  188. package/types/components/config/app-theme/AppTheme.vue.d.ts +2 -0
  189. package/types/components/config/app-theme/index.d.ts +1 -0
  190. package/types/components/data/badge-mark/BadgeMark.vue.d.ts +212 -0
  191. package/types/components/data/badge-mark/index.d.ts +1 -0
  192. package/types/components/data/badge-mark/use-badge-mask.d.ts +8 -0
  193. package/types/components/data/badge-mark/use-badge.d.ts +78 -0
  194. package/types/components/data/boolean-tag/BooleanTag.vue.d.ts +8 -0
  195. package/types/components/data/boolean-tag/index.d.ts +1 -0
  196. package/types/components/data/image-preview-trigger/ImagePreviewTrigger.vue.d.ts +41 -0
  197. package/types/components/data/image-preview-trigger/index.d.ts +1 -0
  198. package/types/components/data/modal-image-preview/ModalImagePreview.vue.d.ts +31 -0
  199. package/types/components/data/modal-image-preview/index.d.ts +1 -0
  200. package/types/components/feedback/action-confirm/ActionConfirm.vue.d.ts +33 -0
  201. package/types/components/feedback/action-confirm/index.d.ts +1 -0
  202. package/types/components/feedback/modal-confirm/ModalConfirm.vue.d.ts +120 -0
  203. package/types/components/feedback/modal-confirm/index.d.ts +2 -0
  204. package/types/components/feedback/modal-confirm/types.d.ts +4 -0
  205. package/types/components/feedback/modal-video-preview/ModalVideoPreview.vue.d.ts +40 -0
  206. package/types/components/feedback/modal-video-preview/index.d.ts +1 -0
  207. package/types/components/feedback/preview-keys/index.d.ts +2 -0
  208. package/types/components/feedback/preview-keys/keys.d.ts +14 -0
  209. package/types/components/feedback/shelf-contracts/index.d.ts +1 -0
  210. package/types/components/feedback/shelf-contracts/types.d.ts +1 -0
  211. package/types/components/feedback/video-preview-trigger/VideoPreviewTrigger.vue.d.ts +46 -0
  212. package/types/components/feedback/video-preview-trigger/index.d.ts +1 -0
  213. package/types/components/other/TriggerAutoImport.vue.d.ts +17 -0
  214. package/types/components/other/auto-refresh/AutoRefresh.vue.d.ts +14 -0
  215. package/types/components/other/auto-refresh/index.d.ts +1 -0
  216. package/types/components/other/auto-refresh/use-auto-refresh-report.d.ts +1 -0
  217. package/types/components/other/auto-refresh-contracts/index.d.ts +1 -0
  218. package/types/components/other/auto-refresh-contracts/types.d.ts +17 -0
  219. package/types/components/other/auto-refresh-group/AutoRefreshGroup.vue.d.ts +18 -0
  220. package/types/components/other/auto-refresh-group/index.d.ts +1 -0
  221. package/types/components/other/auto-refresh-group/use-auto-refresh-group-report.d.ts +3 -0
  222. package/types/components/other/index.d.ts +1 -0
  223. package/types/config/badge-attr.d.ts +26 -0
  224. package/types/config/index.d.ts +5 -0
  225. package/types/config/list-model.d.ts +49 -0
  226. package/types/config/modal-keys.d.ts +12 -0
  227. package/types/config/route.d.ts +4 -0
  228. package/types/config/slot-region.d.ts +72 -0
  229. package/types/helpers/form.d.ts +8 -0
  230. package/types/helpers/index.d.ts +3 -0
  231. package/types/helpers/list-helper.d.ts +35 -0
  232. package/types/helpers/types.d.ts +15 -0
  233. package/types/hooks/activated.d.ts +36 -0
  234. package/types/hooks/feel-size.d.ts +10 -0
  235. package/types/hooks/index.d.ts +12 -0
  236. package/types/hooks/menus-dispatch.d.ts +35 -0
  237. package/types/hooks/timeout.d.ts +7 -0
  238. package/types/hooks/use-active-record.d.ts +64 -0
  239. package/types/hooks/use-breakpoint.d.ts +4 -0
  240. package/types/hooks/use-bridge-report.d.ts +3 -0
  241. package/types/hooks/use-channel-viewport-height.d.ts +22 -0
  242. package/types/hooks/use-context-defaults.d.ts +39 -0
  243. package/types/hooks/use-custom-breakpoint.d.ts +17 -0
  244. package/types/hooks/use-is-dev.d.ts +24 -0
  245. package/types/hooks/use-observe-size.d.ts +36 -0
  246. package/types/hooks/use-permission.d.ts +14 -0
  247. package/types/hooks/use-surface.d.ts +45 -0
  248. package/types/hooks/use-theme-apply.d.ts +34 -0
  249. package/types/hooks/use-viewport-apply.d.ts +20 -0
  250. package/types/index.d.ts +33 -0
  251. package/types/inject/index.d.ts +1 -0
  252. package/types/inject/key.d.ts +247 -0
  253. package/types/injection-namespace.d.ts +4 -0
  254. package/types/internals/index.d.ts +6 -0
  255. package/types/router/group-redirect.d.ts +14 -0
  256. package/types/router/guard/index.d.ts +20 -0
  257. package/types/router/guard/login.d.ts +4 -0
  258. package/types/router/guard/permission.d.ts +4 -0
  259. package/types/router/guard/types.d.ts +14 -0
  260. package/types/router/index.d.ts +2 -0
  261. package/types/store/app.d.ts +219 -0
  262. package/types/store/index.d.ts +3 -0
  263. package/types/store/router-permission.d.ts +79 -0
  264. package/types/store/user.d.ts +64 -0
  265. package/types/types/app-layout.d.ts +42 -0
  266. package/types/types/dc-path.d.ts +2 -0
  267. package/types/types/dot-path.d.ts +13 -0
  268. package/types/types/index.d.ts +9 -0
  269. package/types/types/list-api.d.ts +17 -0
  270. package/types/types/modal-shelf.d.ts +123 -0
  271. package/types/types/nest-form.d.ts +8 -0
  272. package/types/types/permission.d.ts +31 -0
  273. package/types/types/route.d.ts +141 -0
  274. package/types/types/utility-types.d.ts +25 -0
  275. package/types/utils/dom.d.ts +61 -0
  276. package/types/utils/export.d.ts +35 -0
  277. package/types/utils/gap-scale.d.ts +46 -0
  278. package/types/utils/id.d.ts +2 -0
  279. package/types/utils/index.d.ts +8 -0
  280. package/types/utils/permission.d.ts +16 -0
  281. package/types/utils/router.d.ts +18 -0
  282. package/types/utils/theme-scale.d.ts +78 -0
  283. package/types/utils/time.d.ts +2 -0
@@ -0,0 +1,519 @@
1
+ import { CSSProperties, DeepReadonly } from 'vue';
2
+ /**
3
+ * pinia persist storage 适配器最小接口。
4
+ *
5
+ * 仅约束 `store/app.ts` persist 适配器实际依赖的三方法,是浏览器 `Storage`
6
+ * 的结构子集——`createStorageWithNamespace()` 返回的命名空间 Storage 可直接赋值兼容。
7
+ */
8
+ export interface StorageLike {
9
+ /** 读取键值,未命中返回 null */
10
+ getItem: (key: string) => string | null;
11
+ /** 写入键值 */
12
+ setItem: (key: string, value: string) => void;
13
+ /** 删除键值 */
14
+ removeItem: (key: string) => void;
15
+ }
16
+ /**
17
+ * 应用主题颜色类型。
18
+ *
19
+ * 镜像 app 端 `@/config` `AppThemeColor` 全字段——store/app 的 `theme`
20
+ * computed 透出后由 app-layout 消费点访问 `primaryColor` 等全字段,故 [MUST]
21
+ * 完整镜像,[MUST NOT] 收窄到 store/app 体内直接读的子集(否则消费点 TS2339)。
22
+ */
23
+ export interface AppThemeColor {
24
+ /** 背景色 */
25
+ bodyColor: string;
26
+ /** 基础色 */
27
+ baseColor: string;
28
+ /** 主色调 */
29
+ primaryColor: string;
30
+ /** 成功色 */
31
+ successColor: string;
32
+ /** 警告色 */
33
+ warningColor: string;
34
+ /** 危险色 */
35
+ dangerColor: string;
36
+ /** 错误色 */
37
+ errorColor: string;
38
+ /** 信息色 */
39
+ infoColor: string;
40
+ /** 圆角(风格可选;core 挂 --dc-core-radius + --el-border-radius-base) */
41
+ radius?: string;
42
+ /** 边框色(风格可选;core 挂 --dc-core-border-color + --el-border-color) */
43
+ borderColor?: string;
44
+ /** 阴影(风格可选;core 挂 --dc-core-shadow + --el-box-shadow) */
45
+ shadow?: string;
46
+ /** 边框宽(风格可选;core 挂 --dc-core-border-width + --el-border-width) */
47
+ borderWidth?: string;
48
+ /** 强调色(风格可选;core 仅挂 --dc-core-accent,EP 无对应) */
49
+ accent?: string;
50
+ /** 辉光(风格可选;core 仅挂 --dc-core-glow,EP 无对应) */
51
+ glow?: string;
52
+ /** 模糊(风格可选;core 仅挂 --dc-core-blur,EP 无对应) */
53
+ blur?: string;
54
+ /** 聚焦环(风格可选;core 仅挂 --dc-core-focus-ring,EP 无对应) */
55
+ focusRing?: string;
56
+ /**
57
+ * 抬升面色(overlay 档,风格可选;挂 --dc-core-surface + --el-bg-color-overlay)。
58
+ * 缺省由 bodyColor 派生(暗色向白一步、亮色 = bodyColor,见 use-theme-apply
59
+ * buildElevationDecls);显式给值以显式为准。[MUST NOT] 与 bodyColor(面)语义重叠。
60
+ */
61
+ surface?: string;
62
+ /**
63
+ * 布局底色(page 档,风格可选;挂 --dc-core-ground + --el-bg-color-page)。
64
+ * 缺省由 bodyColor 向黑压一步派生(`themeScalePageColor`);显式给值以显式为准。
65
+ *
66
+ * 🔴 [MUST NOT] 与 bodyColor 语义重叠:**bodyColor 是「面」(默认背景色),本字段是「底」**
67
+ * (页面地面 —— 模块间距的缝、header 上方滚动遮挡条露出的就是它)。
68
+ *
69
+ * 显式给值能解决派生的三个退化点(派生 Δ = min(0.5×最亮通道, 18)):
70
+ * - 近黑(`#000000` ⇒ Δ=0、`#0c0c0c` ⇒ Δ=6):底≈面、缝不可见 —— 不给 ground 时走近黑翻转兜底;
71
+ * - 非 hex 的 bodyColor(`var()` / `rgba()` / 渐变):派生原样返回 ⇒ 底 = 面;
72
+ * - 品牌规范指定了具体的底色灰阶。
73
+ */
74
+ ground?: string;
75
+ }
76
+ /**
77
+ * 布局模块 `style` 逃生舱排除的「引擎托管键」联合(甲方终锁键集)。
78
+ *
79
+ * 这些 CSS 属性由布局引擎(store/app 几何 calc + 主题色兜底 + fixed 定位 + sidebar/aside
80
+ * 让位)独占计算,消费方 `style` [MUST NOT] 染指——否则破布局。分类:
81
+ * - 尺寸:width / height(几何算)
82
+ * - 定位:position / top / right / bottom / left / inset(fixed 锚点)
83
+ * - 显示 / 盒外:display(破布局流)/ margin 家族(破 fixed 定位)
84
+ * - 盒内:padding 家族(sidebar/aside 用 paddingTop 让位 header,整族锁防破让位)
85
+ * - 颜色:color / background / backgroundColor(走 config.color|background + --dc-core-* 兜底,规则 14)
86
+ */
87
+ type AppLayoutManagedStyleKey = "width" | "height" | "position" | "top" | "right" | "bottom" | "left" | "inset" | "display" | "margin" | "marginTop" | "marginRight" | "marginBottom" | "marginLeft" | "padding" | "paddingTop" | "paddingRight" | "paddingBottom" | "paddingLeft" | "color" | "background" | "backgroundColor";
88
+ /**
89
+ * 布局模块(Header/Footer/Sidebar/Aside)`style` 逃生舱类型。
90
+ *
91
+ * = `Omit<CSSProperties, 托管键>`——消费方显式自定义装饰(borderRadius / boxShadow /
92
+ * border / backdropFilter / opacity / transition 等),走规则 14「组件 prop 显式自定义值
93
+ * → 内联 :style 直值」例外条款。托管键经类型 `Omit` 编译期拦截 + store 合并运行时压过(双保险)。
94
+ */
95
+ export type AppLayoutModuleStyle = Omit<CSSProperties, AppLayoutManagedStyleKey>;
96
+ /**
97
+ * `store/app.ts` 实际消费的 app config 子集结构。
98
+ *
99
+ * 字段名与层级镜像 app 端 `@/config` 原结构([MUST NOT] 重命名);覆盖
100
+ * store/app 现消费字段(含 `theme` 透出后消费点所需全字段),[MUST NOT] 扩面
101
+ * 到全量 app config。core 不能 import app,故在此显式定义等价 interface。
102
+ */
103
+ export interface AppConfig {
104
+ /** 应用基础信息(store/app 仅取 name) */
105
+ APP_BASE_INFO: {
106
+ /** 应用名称 */
107
+ name: string;
108
+ };
109
+ /** 应用布局-header 配置 */
110
+ APP_LAYOUT_HEADER_CONFIG: {
111
+ /** header 高度(px) */
112
+ height: number;
113
+ /** 字体色;缺省 → 不写 color、CSS 继承 :root 全局 color(= baseColor);[MUST NOT] 写死字面量 */
114
+ color?: string;
115
+ /** 背景(color / image / gradient 等 CSS background);缺省 → bodyColor(经 --dc-core-* var);[MUST NOT] 写死字面量 */
116
+ background?: string;
117
+ /** 装饰逃生舱(borderRadius/boxShadow/... ;排除引擎托管键,见 {@link AppLayoutModuleStyle}) */
118
+ style?: AppLayoutModuleStyle;
119
+ };
120
+ /** 应用布局-footer 配置 */
121
+ APP_LAYOUT_FOOTER_CONFIG: {
122
+ /** footer 高度(px) */
123
+ height: number;
124
+ /** 字体色;缺省 → 继承 :root color(baseColor) */
125
+ color?: string;
126
+ /** 背景(color / image / gradient 等 CSS background);缺省 → bodyColor */
127
+ background?: string;
128
+ /** 装饰逃生舱(见 {@link AppLayoutModuleStyle}) */
129
+ style?: AppLayoutModuleStyle;
130
+ };
131
+ /** 应用布局-sidebar 配置(store/app 取 collapseWidth / width / menuGroupMode) */
132
+ APP_LAYOUT_SIDEBAR_CONFIG: {
133
+ /** [展开的]宽度(px) */
134
+ width: number;
135
+ /** 折叠起来的宽度(px) */
136
+ collapseWidth: number;
137
+ /**
138
+ * 侧栏菜单渲染形态:`false`(缺省) = 树形(父级 ElSubMenu 手风琴,默认收起);
139
+ * `true` = 分组(父级降格为 ElMenuItemGroup 分组标题——小字号弱色、不可点不可折叠,
140
+ * 子项常驻全展开,即业界 grouped / sectioned navigation 范式)。
141
+ *
142
+ * 开启后:AppSidebar 不渲染折叠把手、宽度恒取 `width`(`collapseWidth` 失效),
143
+ * 且 store 侧把 `bridge.layout.sidebarCollapsed` 的**读取**闸为 false
144
+ * (避免历史持久化的 true 把无把手的侧栏锁死在窄条);持久化值原样保留。
145
+ */
146
+ menuGroupMode?: boolean;
147
+ /** 字体色;缺省 → 继承 :root color(baseColor) */
148
+ color?: string;
149
+ /** 背景(color / image / gradient 等 CSS background);缺省 → bodyColor */
150
+ background?: string;
151
+ /** 装饰逃生舱(见 {@link AppLayoutModuleStyle}) */
152
+ style?: AppLayoutModuleStyle;
153
+ };
154
+ /**
155
+ * 应用布局-aside 右侧补充区配置(P1' 新增 additive,对称 sidebar)。
156
+ * 仅自定义 shell 渲染右侧区时生效;不配则 aside 不存在(经典布局零影响)。
157
+ */
158
+ APP_LAYOUT_ASIDE_CONFIG: {
159
+ /** aside 宽度(px) */
160
+ width: number;
161
+ /** 字体色;缺省 → 继承 :root color(baseColor) */
162
+ color?: string;
163
+ /** 背景(color / image / gradient 等 CSS background);缺省 → bodyColor */
164
+ background?: string;
165
+ /** 装饰逃生舱(见 {@link AppLayoutModuleStyle}) */
166
+ style?: AppLayoutModuleStyle;
167
+ };
168
+ /** 应用布局-页面主体配置(store/app 仅取 shimPadding) */
169
+ APP_LAYOUT_BODY_CONFIG: {
170
+ /**
171
+ * @deprecated huhyx7 起**不再读取、不影响任何渲染**;配了非 0 值只会得到一条
172
+ * `console.warn`。字段保留一个版本供下游过渡,之后移除。
173
+ *
174
+ * **替代**:内容四周留白改由**间距阶梯的外圈档**(`APP_LAYOUT_GAP_CONFIG.size × 2`)
175
+ * 一处给出 —— 此前这段空白由 `gap + shimPadding` 两个来源各给一半,
176
+ * `akw76r` 让容器层露底后两者在视觉上就是同一段空白,冗余由此产生。
177
+ * 要调留白 ⇒ 改 `APP_LAYOUT_GAP_CONFIG.size`(一个旋钮按比例缩放
178
+ * 外圈 ×2 / 呼吸 ×1.5 / 模块 ×1 / 分段 ×0.5 四档,见 `utils/gap-scale.ts`)。
179
+ *
180
+ * 已由必填改为**可选**(类型放宽,非 breaking):下游删掉该键即可,不会 TS 报错。
181
+ */
182
+ shimPadding?: number;
183
+ /**
184
+ * 内容主体背景(color / image / gradient 等 CSS background)。
185
+ *
186
+ * **缺省不铺**(akw76r)——`.app-body` 是容器、容器一律透明;布局底由全局 `html`
187
+ * 一处铺(core 在 `:root{}` 挂 `background: var(--el-bg-color-page)`),一路透到这里。
188
+ * **模块间距(`APP_LAYOUT_GAP_CONFIG`)的缝**与 **header 上方的滚动遮挡条**
189
+ * 露出的都是全局那层底。
190
+ *
191
+ * 显式给值 = 在 `.app-body` 这一层铺一块面(只影响内容区,不影响 chrome 模块与外框)。
192
+ * 🔴 [MUST NOT] 拿它铺「与全局底同色」的面 —— 那是把一个会变的值复制到第二处,
193
+ * 换底 / 换主题时必留补丁。要改底色 → 改**主题的 `ground` / `bodyColor`**(r8kge2)。
194
+ */
195
+ background?: string;
196
+ };
197
+ /**
198
+ * 应用布局-模块间距配置(内缝;模块间露 size px 条带,漏出 `.app-body` 的布局底)。
199
+ *
200
+ * 与 viewport 边框(整体外框)正交:gap 是模块**之间**的缝。默认 `{ size: 8 }` = 开缝
201
+ * (底/面分离后缝天然可见:模块面 = bodyColor、`.app-body` 底 = 派生 page 档);
202
+ * 要模块贴合显式传 `{ size: 0 }`。`size>0` 时 store 几何 calc 在相邻模块间叠加该间距
203
+ * (缺位侧不留悬空缝)。布局插件经 `bridge.update("APP_LAYOUT_GAP_CONFIG", { size })` 设值。
204
+ */
205
+ /**
206
+ * 应用表单配置。
207
+ *
208
+ * 🔴 `layoutByContainer` 缺省 **`true`**:`ElCol` 的响应式 span 是按 **window 宽**解析的
209
+ * CSS 媒体查询,而表单**几乎从不满宽**(要扣侧栏 / 各层 padding / 卡片内呼吸)——
210
+ * 实测一个普通全宽列表页,视口 1280(`lg`) 而表单容器只有 924(`sm`),**差两档**;
211
+ * 弹窗内更极端(视口 1280 而弹窗 420)⇒ 按视口解析必然挤爆。
212
+ * ⇒ 容器宽才是真相源,视口宽只是它的**代理**,而这个代理在不满宽时就是错的。
213
+ *
214
+ * ⚠️ **出问题可随时关掉、不必等发版**:`createCoreBridge({ APP_FORM_CONFIG: { layoutByContainer: false } })`
215
+ * 即全局回到按视口解析(本字段存在的理由就是这个逃生口)。
216
+ * 组件上显式传的 `layoutByContainer` **恒优先**于本配置。
217
+ */
218
+ APP_FORM_CONFIG: {
219
+ /** 表单布局按**容器断点**校准;缺省 `true`(见上方说明),显式 prop 恒优先 */
220
+ layoutByContainer: boolean;
221
+ };
222
+ APP_LAYOUT_GAP_CONFIG: {
223
+ /** 模块间距(px);缺省 8 = 开缝,0 = 贴合 */
224
+ size: number;
225
+ };
226
+ /**
227
+ * 应用布局-视口边框配置(整个 app-shell 相对浏览器视口四边内缩,套"边框"留白观感)。
228
+ *
229
+ * Header/Sidebar 的 fixed 锚点由 `0` 改贴四边 padding 值;AppBody 在原扣 header 高 /
230
+ * sidebar 宽基础上经 calc 再叠加对应 viewport 边距。app 端可整体不传(核内默认四边 0
231
+ * = 不套框,现状不变);布局插件经 `bridge.update("APP_LAYOUT_VIEWPORT_CONFIG", ...)` 设值。
232
+ */
233
+ APP_LAYOUT_VIEWPORT_CONFIG: {
234
+ /** 视口上内边距(px) */
235
+ paddingTop: number;
236
+ /** 视口右内边距(px) */
237
+ paddingRight: number;
238
+ /** 视口下内边距(px) */
239
+ paddingBottom: number;
240
+ /** 视口左内边距(px) */
241
+ paddingLeft: number;
242
+ };
243
+ /** 应用主题配置(store/app 取 dark / light,各为完整 AppThemeColor) */
244
+ APP_THEME_CONFIG: {
245
+ /** 亮色主题 */
246
+ light: AppThemeColor;
247
+ /** 暗色主题 */
248
+ dark: AppThemeColor;
249
+ };
250
+ /** 应用路由元信息默认配置(store/app 取 show* 四项;createUserStore 经此取 menuShow/needLogin 默认) */
251
+ APP_ROUTER_META_DEFAULT_CONFIG: {
252
+ /** 各路由[未配置情况下]默认是否展示 header */
253
+ showHeader: boolean;
254
+ /** 各路由[未配置情况下]默认是否展示 footer */
255
+ showFooter: boolean;
256
+ /** 各路由[未配置情况下]默认是否展示 sidebar */
257
+ showSidebar: boolean;
258
+ /** 各路由[未配置情况下]默认是否展示右侧 aside(additive 可选;缺省 false,store `?? false` 兜底) */
259
+ showAside?: boolean;
260
+ /** 默认是否展示 breadcrumb */
261
+ showBreadcrumb: boolean;
262
+ /** 各路由[未配置情况下]默认是否展示在菜单 */
263
+ menuShow: boolean;
264
+ /** 各路由[未配置情况下]默认是否需要登录 */
265
+ needLogin: boolean;
266
+ };
267
+ /** 应用缓存配置(#4e additive 第 8 项;createUserStore 经 namespace 实例化 useState) */
268
+ APP_CACHE_CONFIG: {
269
+ /** 缓存命名空间 */
270
+ namespace: string;
271
+ };
272
+ }
273
+ /**
274
+ * 应用环境信息(#2.5 期新增,per ADR-6)。
275
+ *
276
+ * 镜像 app 端 `@/config` `APP_ENV_INFO` 字面量推导结构。`mode` 取自
277
+ * `import.meta.env.MODE`,`isProd` / `isDev` 派生自 mode 比较;本类型对外
278
+ * 显式声明便于下游业务项目直接 import 使用。
279
+ */
280
+ export interface AppEnvInfo {
281
+ /** 环境模式(如 "production" / "development") */
282
+ mode: string;
283
+ /** 是生产环境 */
284
+ isProd: boolean;
285
+ /** 是开发环境 */
286
+ isDev: boolean;
287
+ }
288
+ /**
289
+ * 应用布局-面包屑配置(#2.5 期新增,per ADR-6)。
290
+ */
291
+ export interface AppLayoutBreadcrumbConfig {
292
+ /** 面包屑高度(px) */
293
+ height: number;
294
+ }
295
+ /**
296
+ * 应用布局聚合配置(#2.5 期新增,per ADR-3 候选 b bridge 内部派生)。
297
+ *
298
+ * 由 `createCoreBridge` 内部从 5 子布局配置(HEADER/FOOTER/SIDEBAR/BREADCRUMB/BODY)
299
+ * Object.freeze 聚合派生,挂载到 `bridge.APP_LAYOUT_CONFIG` readonly 属性。
300
+ */
301
+ export interface AppLayoutConfig {
302
+ /** header 配置 */
303
+ header: AppConfig["APP_LAYOUT_HEADER_CONFIG"];
304
+ /** footer 配置 */
305
+ footer: AppConfig["APP_LAYOUT_FOOTER_CONFIG"];
306
+ /** sidebar 配置 */
307
+ sidebar: AppConfig["APP_LAYOUT_SIDEBAR_CONFIG"];
308
+ /** aside 右侧补充区配置(P1' additive) */
309
+ aside: AppConfig["APP_LAYOUT_ASIDE_CONFIG"];
310
+ /** 面包屑配置 */
311
+ breadcrumb: AppLayoutBreadcrumbConfig;
312
+ /** 页面主体配置 */
313
+ body: AppConfig["APP_LAYOUT_BODY_CONFIG"];
314
+ /** 视口边框配置 */
315
+ viewport: AppConfig["APP_LAYOUT_VIEWPORT_CONFIG"];
316
+ /** 模块间距配置(内缝 gap) */
317
+ gap: AppConfig["APP_LAYOUT_GAP_CONFIG"];
318
+ }
319
+ /**
320
+ * 应用路由配置(#2.5 期新增,per ADR-6)。
321
+ *
322
+ * 镜像 app 端 `@/config/router.ts` `APP_ROUTER_CONFIG` 字面量结构。
323
+ */
324
+ export interface AppRouterConfig {
325
+ /** 是否使用 hash 路由 */
326
+ isHash: boolean;
327
+ /** 路由根路径(同一域名不同 pathname 对应不同应用) */
328
+ basePath: string;
329
+ /** 相同层级路由缓存最大数量 */
330
+ keepAliveMaxCount: number;
331
+ /** 路由 meta 默认值(复用 AppConfig 字段类型) */
332
+ metaDefault: AppConfig["APP_ROUTER_META_DEFAULT_CONFIG"];
333
+ }
334
+ /**
335
+ * 应用路由路径配置——8 path 聚合(#7.3 期新增)。
336
+ *
337
+ * 镜像 app 端 `@/config/router.ts` `APP_ROUTER_PATHS_CONFIG` 聚合结构;供
338
+ * layout 族下沉 core 时通过 `appBridge.APP_ROUTER_PATHS_CONFIG.homePath`
339
+ * 等读取路径常量,避免直 import 业务侧 `@/config` 路径符号。
340
+ *
341
+ * `loginNoCheckPath` / `authNoCheckPath` 标 `readonly string[]` 表只读语义;
342
+ * 业务侧 `string[]` 协变兼容 `readonly string[]`(赋值方向单向)。
343
+ */
344
+ export interface AppRouterPathsConfig {
345
+ /** 根路径[!!!必设重定向] */
346
+ rootPath: string;
347
+ /** 首页路径 */
348
+ homePath: string;
349
+ /** 登录路径 */
350
+ loginPath: string;
351
+ /** 注册路径 */
352
+ registerPath: string;
353
+ /** 404 路径 */
354
+ noFoundPath: string;
355
+ /** 无权限路径 */
356
+ noPermissionPath: string;
357
+ /** 登录免检路径 */
358
+ loginNoCheckPath: readonly string[];
359
+ /** 权限免检路径 */
360
+ authNoCheckPath: readonly string[];
361
+ }
362
+ /** 应用基础信息 type 别名(#2.5 期 type 别名复用,per ADR-6) */
363
+ export type AppBaseInfo = AppConfig["APP_BASE_INFO"];
364
+ /** 应用布局-header 配置 type 别名 */
365
+ export type AppLayoutHeaderConfig = AppConfig["APP_LAYOUT_HEADER_CONFIG"];
366
+ /** 应用布局-footer 配置 type 别名 */
367
+ export type AppLayoutFooterConfig = AppConfig["APP_LAYOUT_FOOTER_CONFIG"];
368
+ /** 应用布局-sidebar 配置 type 别名 */
369
+ export type AppLayoutSidebarConfig = AppConfig["APP_LAYOUT_SIDEBAR_CONFIG"];
370
+ /** 应用布局-aside 右侧补充区配置 type 别名(P1' additive) */
371
+ export type AppLayoutAsideConfig = AppConfig["APP_LAYOUT_ASIDE_CONFIG"];
372
+ /** 应用布局-页面主体配置 type 别名 */
373
+ export type AppLayoutBodyConfig = AppConfig["APP_LAYOUT_BODY_CONFIG"];
374
+ /** 应用布局-视口边框配置 type 别名 */
375
+ export type AppLayoutViewportConfig = AppConfig["APP_LAYOUT_VIEWPORT_CONFIG"];
376
+ /** 应用布局-模块间距配置 type 别名(内缝 gap) */
377
+ export type AppLayoutGapConfig = AppConfig["APP_LAYOUT_GAP_CONFIG"];
378
+ /** 表单配置(见 {@link AppConfig.APP_FORM_CONFIG}) */
379
+ export type AppFormConfig = AppConfig["APP_FORM_CONFIG"];
380
+ /** 应用主题配置 type 别名 */
381
+ export type AppThemeConfig = AppConfig["APP_THEME_CONFIG"];
382
+ /** 应用路由元信息默认配置 type 别名 */
383
+ export type AppRouterMetaDefaultConfig = AppConfig["APP_ROUTER_META_DEFAULT_CONFIG"];
384
+ /** 应用缓存配置 type 别名 */
385
+ export type AppCacheConfig = AppConfig["APP_CACHE_CONFIG"];
386
+ /**
387
+ * token / refreshToken 字段访问器(含 get + set)。
388
+ *
389
+ * 第一宪法:core 对业务 `UserInfo` shape 完全不透明——业务自存自取,经本 adapter
390
+ * 注入读写两字段的纯函数,core [MUST NOT] 硬编字面字段名/路径耦合业务字段位置。
391
+ * `set` [MUST] 产新对象([MUST NOT] 原地 mutate,破响应式 + 破不可变)。
392
+ */
393
+ export interface UserInfoFieldAccessor<UserInfo = unknown> {
394
+ /** 读字段值;[MUST] 返回 string——业务经 getUserInfoInitFn 把该字段初值置 `""`,保证空态为 `""` 而非 undefined(类型恒定,免下游满屏 `token!`) */
395
+ get: (info: Partial<UserInfo>) => string;
396
+ /**
397
+ * 写入字段值,返回**保留 info 其余全部字段**的新对象。
398
+ *
399
+ * [MUST] 含 info 全字段(如 `{ ...info, <业务字段>: value }`)——createUserStore
400
+ * getInfo 顺势更新全部用户信息时以 data 为基,依赖本契约把 token/refreshToken
401
+ * 贴回而不丢失 data 其余字段;[MUST NOT] 只返回单字段对象,[MUST NOT] 原地 mutate info。
402
+ */
403
+ set: (info: Partial<UserInfo>, value: string) => Partial<UserInfo>;
404
+ }
405
+ /**
406
+ * permission 字段访问器(仅 get)。
407
+ *
408
+ * 权限由服务端下发只读,core 不写——仅 get 无 set;返回权限 key 列表(业务侧保底 `[]`)。
409
+ */
410
+ export interface UserInfoPermissionAccessor<UserInfo = unknown> {
411
+ /** 从用户信息读取权限列表 */
412
+ get: (info: Partial<UserInfo>) => (string | number)[];
413
+ }
414
+ /**
415
+ * 用户信息字段访问器集(token / refreshToken / permission 三字段注入)。
416
+ *
417
+ * createUserStore 经 `bridge.userInfoAccess.<字段>.get/set` 读写业务 UserInfo,
418
+ * core 零字段名耦合(第一宪法)。业务 shape 完全自由(嵌套 / 组合 / 任意命名),
419
+ * core 只认 adapter 契约不认数据结构。
420
+ */
421
+ export interface UserInfoAccess<UserInfo = unknown> {
422
+ /** token 字段访问器 */
423
+ token: UserInfoFieldAccessor<UserInfo>;
424
+ /** refreshToken 字段访问器 */
425
+ refreshToken: UserInfoFieldAccessor<UserInfo>;
426
+ /** permission 字段访问器(仅 get) */
427
+ permission: UserInfoPermissionAccessor<UserInfo>;
428
+ }
429
+ /**
430
+ * 可 update 的响应式配置字段 key 联合(插件系统一期 7 个 + viewport 边框期补 1 = 8 个)。
431
+ *
432
+ * #插件系统一期:bridge 的布局/主题/基础信息字段下沉为 reactive 响应式,
433
+ * 经 `update(key, partial)` 单字段一级浅合并触发。viewport 边框期新增
434
+ * `APP_LAYOUT_VIEWPORT_CONFIG`(同属布局子,纳入本联合 + layoutAggregate)。
435
+ * 其余 init 字段(env / cache / router 族 / userInfoAccess)非响应式范围,[MUST NOT] 纳入本联合。
436
+ */
437
+ export type UpdatableConfigKey = "APP_BASE_INFO" | "APP_LAYOUT_HEADER_CONFIG" | "APP_LAYOUT_FOOTER_CONFIG" | "APP_LAYOUT_SIDEBAR_CONFIG" | "APP_LAYOUT_ASIDE_CONFIG" | "APP_LAYOUT_BREADCRUMB_CONFIG" | "APP_LAYOUT_BODY_CONFIG" | "APP_LAYOUT_VIEWPORT_CONFIG" | "APP_LAYOUT_GAP_CONFIG" | "APP_FORM_CONFIG" | "APP_THEME_CONFIG";
438
+ /**
439
+ * 7 个可 update 字段 key → 值类型映射。
440
+ *
441
+ * `update<K>(key, partial)` 的 `partial` 类型经 `Partial<UpdatableConfigMap[K]>`
442
+ * 推导;`createBridgeConfigHook` 的 init 入参亦以本映射约束(见 `BridgeConfigInit`)。
443
+ */
444
+ export interface UpdatableConfigMap {
445
+ /** 应用基础信息 */
446
+ APP_BASE_INFO: AppBaseInfo;
447
+ /** 应用布局-header 配置 */
448
+ APP_LAYOUT_HEADER_CONFIG: AppLayoutHeaderConfig;
449
+ /** 应用布局-footer 配置 */
450
+ APP_LAYOUT_FOOTER_CONFIG: AppLayoutFooterConfig;
451
+ /** 应用布局-sidebar 配置 */
452
+ APP_LAYOUT_SIDEBAR_CONFIG: AppLayoutSidebarConfig;
453
+ /** 应用布局-aside 右侧补充区配置(P1' additive) */
454
+ APP_LAYOUT_ASIDE_CONFIG: AppLayoutAsideConfig;
455
+ /** 应用布局-面包屑配置 */
456
+ APP_LAYOUT_BREADCRUMB_CONFIG: AppLayoutBreadcrumbConfig;
457
+ /** 应用布局-页面主体配置 */
458
+ APP_LAYOUT_BODY_CONFIG: AppLayoutBodyConfig;
459
+ /** 应用布局-视口边框配置 */
460
+ APP_LAYOUT_VIEWPORT_CONFIG: AppLayoutViewportConfig;
461
+ /** 应用布局-模块间距配置(内缝 gap) */
462
+ APP_LAYOUT_GAP_CONFIG: AppLayoutGapConfig;
463
+ APP_FORM_CONFIG: AppFormConfig;
464
+ /** 应用主题配置 */
465
+ APP_THEME_CONFIG: AppThemeConfig;
466
+ }
467
+ /**
468
+ * `createBridgeConfigHook` 入参类型——7 个本期响应式字段的初值(= `UpdatableConfigMap`)。
469
+ *
470
+ * 由 `createCoreBridge` 闭包内从 `options` 的对应 7 字段直传;入参字段对象将被
471
+ * 直接 `reactive()` 化(方案 A,[MUST NOT] 浅拷贝),故 [MUST] 为去 freeze 后的非
472
+ * frozen 裸对象(app 端去字段级 freeze 保证)。
473
+ */
474
+ export type BridgeConfigInit = UpdatableConfigMap;
475
+ /**
476
+ * configHook 内部返回契约——`update` 方法 + 8 个对外 readonly 视图。
477
+ *
478
+ * **不对外 export**:`createBridgeConfigHook` / 本 interface / 上述类型符号 [MUST NOT]
479
+ * 在 `bridge/index.ts` re-export(守封装边界)。`bridge/index.ts` 仅内部 import 工厂,
480
+ * 把 `update` 与各 `roXxx` 视图组装进 `CoreBridge` 公开面。
481
+ *
482
+ * 7 个 readonly 视图各为对应 reactive 子配置的 `readonly()` 深只读包装;`roLayout`
483
+ * 为 5 布局子的 `reactive({...})` 聚合的 readonly 包装——5 字段指向各 reactive 子配置,
484
+ * 任一布局子 `update` 原地改经叶子代理同步跟随(Vue reactive 深度转换保留嵌套响应式),零拷贝。
485
+ */
486
+ export interface BridgeConfigHook {
487
+ /** 单字段一级浅合并 update(`Object.assign` 派发到对应 reactive 子配置) */
488
+ update: <K extends UpdatableConfigKey>(key: K, partial: Partial<UpdatableConfigMap[K]>) => void;
489
+ /** 应用基础信息对外只读视图 */
490
+ roBaseInfo: DeepReadonly<AppBaseInfo>;
491
+ /** 应用布局-header 配置对外只读视图 */
492
+ roHeader: DeepReadonly<AppLayoutHeaderConfig>;
493
+ /** 应用布局-footer 配置对外只读视图 */
494
+ roFooter: DeepReadonly<AppLayoutFooterConfig>;
495
+ /** 应用布局-sidebar 配置对外只读视图 */
496
+ roSidebar: DeepReadonly<AppLayoutSidebarConfig>;
497
+ /** 应用布局-aside 右侧补充区配置对外只读视图(P1' additive) */
498
+ roAside: DeepReadonly<AppLayoutAsideConfig>;
499
+ /** 应用布局-面包屑配置对外只读视图 */
500
+ roBreadcrumb: DeepReadonly<AppLayoutBreadcrumbConfig>;
501
+ /** 应用布局-页面主体配置对外只读视图 */
502
+ roBody: DeepReadonly<AppLayoutBodyConfig>;
503
+ /** 应用布局-视口边框配置对外只读视图 */
504
+ roViewport: DeepReadonly<AppLayoutViewportConfig>;
505
+ /** 应用布局-模块间距配置对外只读视图(内缝 gap) */
506
+ roGap: DeepReadonly<AppLayoutGapConfig>;
507
+ /** 表单配置只读视图(`bridge.update("APP_FORM_CONFIG", …)` 后响应式生效) */
508
+ roForm: DeepReadonly<AppFormConfig>;
509
+ /** 应用主题配置对外只读视图 */
510
+ roTheme: DeepReadonly<AppThemeConfig>;
511
+ /**
512
+ * 应用布局聚合配置只读视图(5 布局子 reactive 聚合的 readonly 包装)。
513
+ *
514
+ * `reactive({header: reactiveHeader, ...})` 5 字段指向各 reactive 子配置,任一布局子
515
+ * update 原地改经叶子代理同步跟随(Vue reactive 深度转换保留嵌套响应式),零拷贝。
516
+ */
517
+ roLayout: DeepReadonly<AppLayoutConfig>;
518
+ }
519
+ export {};