soma-kit 0.1.10 → 0.1.12

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 (302) hide show
  1. package/README.md +103 -110
  2. package/bin/soma-kit.mjs +1 -1
  3. package/bin/soma.mjs +22 -0
  4. package/package.json +13 -7
  5. package/packs/finance/reconcile-board.ts +5 -2
  6. package/packs/finance/reconcile-desk/compile.ts +3 -2
  7. package/spec/generated/kit-app.schema.json +776 -38
  8. package/spec/generated/kit-page.schema.json +1613 -224
  9. package/spec/kit-grammar.json +770 -529
  10. package/spec/kit-grammar.schema.json +1962 -392
  11. package/src/app/app-config.ts +371 -347
  12. package/src/app/component-gate.ts +12 -15
  13. package/src/app/compose-apps.ts +79 -8
  14. package/src/app/define-kit-actions.ts +245 -41
  15. package/src/app/define-kit-app.ts +174 -31
  16. package/src/app/define-kit-view.ts +100 -0
  17. package/src/app/envelope.ts +1 -161
  18. package/src/app/index.ts +13 -2
  19. package/src/app/kit-view-context.ts +290 -0
  20. package/src/app/notify-renderer.ts +1 -115
  21. package/src/app/paged-list-adapter.ts +1 -240
  22. package/src/app/server-pages.ts +8 -2
  23. package/src/app/server.ts +491 -101
  24. package/src/app/submit.types.ts +1 -1
  25. package/src/app/theme-endpoint.ts +63 -0
  26. package/src/app/theme-runtime-shared.ts +1 -0
  27. package/src/app/theme-runtime.ts +663 -0
  28. package/src/base/action-busy.ts +2 -2
  29. package/src/base/action-gate.ts +4 -255
  30. package/src/base/action-slots.ts +47 -0
  31. package/src/base/alert.ts +5 -3
  32. package/src/base/avatar.ts +2 -2
  33. package/src/base/button.ts +46 -29
  34. package/src/base/cascader.ts +11 -12
  35. package/src/base/check-core.ts +1 -1
  36. package/src/base/choice.ts +28 -26
  37. package/src/base/class-candidates.ts +17 -0
  38. package/src/base/color-picker.ts +6 -6
  39. package/src/base/combobox.ts +5 -3
  40. package/src/base/command-palette.ts +9 -5
  41. package/src/base/countdown.ts +1 -1
  42. package/src/base/date-range.ts +25 -11
  43. package/src/base/date.ts +85 -17
  44. package/src/base/divider.ts +2 -2
  45. package/src/base/fab.ts +11 -4
  46. package/src/base/image.ts +1 -1
  47. package/src/base/index.ts +9 -3
  48. package/src/base/input.ts +42 -13
  49. package/src/base/kbd.ts +3 -1
  50. package/src/base/link.ts +4 -4
  51. package/src/base/listbox-core.ts +50 -30
  52. package/src/base/loading-gate.ts +133 -0
  53. package/src/base/mentions.ts +5 -5
  54. package/src/base/menu-button.ts +6 -1
  55. package/src/base/menu-core.ts +4 -0
  56. package/src/base/motion/aura.ts +2 -2
  57. package/src/base/motion/hover-3d.ts +2 -2
  58. package/src/base/motion/hover-gallery.ts +2 -2
  59. package/src/base/motion/marquee.ts +2 -2
  60. package/src/base/motion/text-rotate.ts +2 -2
  61. package/src/base/number.ts +93 -80
  62. package/src/base/otp.ts +4 -1
  63. package/src/base/permission-gate.ts +6 -0
  64. package/src/base/popover.ts +40 -8
  65. package/src/base/popup.ts +79 -14
  66. package/src/base/price-text.ts +2 -2
  67. package/src/base/progress.ts +2 -2
  68. package/src/base/qr-code.ts +4 -4
  69. package/src/base/qty-stepper.ts +9 -3
  70. package/src/base/range.ts +2 -2
  71. package/src/base/rating.ts +1 -1
  72. package/src/base/segmented.ts +4 -0
  73. package/src/base/select.ts +4 -3
  74. package/src/base/shared.ts +221 -29
  75. package/src/base/swap.ts +4 -1
  76. package/src/base/switch.ts +1 -1
  77. package/src/base/tag-input.ts +14 -10
  78. package/src/base/tag.ts +5 -1
  79. package/src/base/text.ts +39 -6
  80. package/src/base/textarea.ts +37 -11
  81. package/src/base/time-picker.ts +12 -9
  82. package/src/base/tree-select.ts +15 -8
  83. package/src/base/upload.ts +34 -5
  84. package/src/base/virtual-list.ts +107 -1
  85. package/src/biz/approval-desk/compile.ts +23 -41
  86. package/src/biz/auth-panel/compile.ts +37 -52
  87. package/src/biz/auth-panel/index.ts +1 -1
  88. package/src/biz/category-crud/compile.ts +22 -36
  89. package/src/biz/checkout-page/compile.ts +21 -5
  90. package/src/biz/compose.ts +13 -27
  91. package/src/biz/define.ts +5 -4
  92. package/src/biz/import-wizard/compile.ts +22 -26
  93. package/src/biz/import-wizard/hub.ts +126 -61
  94. package/src/biz/import-wizard/shell.ts +3 -3
  95. package/src/biz/index.ts +3 -3
  96. package/src/biz/landing-page/compile.ts +19 -3
  97. package/src/biz/link/hub.ts +49 -20
  98. package/src/biz/link/shared.ts +115 -118
  99. package/src/biz/master-sub/compile.ts +31 -44
  100. package/src/biz/multi-board/compile.ts +34 -49
  101. package/src/biz/multi-board/index.ts +18 -1
  102. package/src/biz/multi-board/shell.ts +24 -15
  103. package/src/biz/notification-center/compile.ts +21 -33
  104. package/src/biz/page-templates/domain-templates.ts +80 -13
  105. package/src/biz/page-templates/result-page/compile.ts +11 -2
  106. package/src/biz/page-templates/shared.ts +34 -36
  107. package/src/biz/record-detail/compile.ts +47 -42
  108. package/src/biz/record-detail/index.ts +11 -1
  109. package/src/biz/settings-center/compile.ts +6 -5
  110. package/src/biz/shared/action-host.ts +91 -211
  111. package/src/biz/shared/compile-helpers.ts +80 -0
  112. package/src/biz/shared/coordinator.ts +486 -83
  113. package/src/biz/shared/index.ts +8 -2
  114. package/src/biz/shared/overlay-shell.ts +80 -0
  115. package/src/biz/shared/pipes.ts +43 -30
  116. package/src/biz/shared/remove-key.ts +6 -0
  117. package/src/biz/shared/remove-wire.ts +29 -0
  118. package/src/biz/shared/runtime-hub.ts +216 -24
  119. package/src/biz/single-form/compile.ts +15 -37
  120. package/src/biz/standard-crud/compile.ts +62 -107
  121. package/src/biz/standard-crud/shell.ts +16 -66
  122. package/src/biz/step-form/compile.ts +26 -97
  123. package/src/biz/step-form/hub.ts +34 -41
  124. package/src/biz/types.ts +4 -3
  125. package/src/cli/core-imports.ts +54 -0
  126. package/src/cli/kit-cli.ts +130 -26
  127. package/src/cli/kit-init.ts +222 -0
  128. package/src/cli/service-endpoint-check.ts +425 -0
  129. package/src/cli/source-path-check.d.mts +17 -0
  130. package/src/cli/source-path-check.mjs +334 -0
  131. package/src/cli/view-writes.ts +752 -0
  132. package/src/compile/action-host-attach.ts +21 -29
  133. package/src/compile/closed-set.ts +509 -0
  134. package/src/compile/compile-page.ts +219 -72
  135. package/src/compile/component-candidates.ts +1 -1
  136. package/src/compile/hints.ts +30 -1
  137. package/src/compile/index.ts +1 -0
  138. package/src/compile/kit-error.ts +1 -0
  139. package/src/compile/locate.ts +21 -1
  140. package/src/compile/parse.ts +370 -41
  141. package/src/compile/redirect.ts +6 -2
  142. package/src/compile/styles.ts +35 -2
  143. package/src/compile/types.ts +18 -2
  144. package/src/compile/view-check.ts +151 -0
  145. package/src/data/amount-breakdown.ts +2 -2
  146. package/src/data/anchor-nav.ts +2 -2
  147. package/src/data/approval-flow.ts +2 -2
  148. package/src/data/assignment-picker.ts +40 -29
  149. package/src/data/async-result-panel.ts +62 -6
  150. package/src/data/breadcrumbs.ts +2 -2
  151. package/src/data/calendar.ts +22 -25
  152. package/src/data/carousel.ts +5 -2
  153. package/src/data/chart.ts +42 -34
  154. package/src/data/checklist.ts +2 -2
  155. package/src/data/code-view.ts +4 -2
  156. package/src/data/comment-thread.ts +5 -2
  157. package/src/data/confirm-dialog.ts +10 -0
  158. package/src/data/context-menu.ts +29 -37
  159. package/src/data/d9-util.ts +2 -18
  160. package/src/data/diff.ts +4 -2
  161. package/src/data/dock.ts +2 -2
  162. package/src/data/embed.ts +2 -1
  163. package/src/data/field-mapper.ts +31 -26
  164. package/src/data/flow-editor-contract.ts +1 -1
  165. package/src/data/flow-editor.ts +89 -100
  166. package/src/data/flow-node-options.ts +90 -0
  167. package/src/data/flow-remote-options.ts +0 -103
  168. package/src/data/footer.ts +2 -2
  169. package/src/data/form-draft-registry.ts +2 -4
  170. package/src/data/gantt.ts +14 -17
  171. package/src/data/hero.ts +2 -2
  172. package/src/data/image-viewer.ts +20 -26
  173. package/src/data/index.ts +0 -2
  174. package/src/data/item-list.ts +31 -22
  175. package/src/data/kanban.ts +43 -42
  176. package/src/data/media-grid.ts +14 -19
  177. package/src/data/menu.ts +2 -2
  178. package/src/data/mockup.ts +2 -2
  179. package/src/data/modal-dialog.ts +22 -18
  180. package/src/data/navbar.ts +7 -2
  181. package/src/data/notify-renderer.ts +235 -0
  182. package/src/data/object-form.ts +1036 -648
  183. package/src/data/pager.ts +65 -29
  184. package/src/data/permission-matrix.ts +20 -21
  185. package/src/data/permission-tree.ts +28 -26
  186. package/src/data/pricing-table.ts +9 -3
  187. package/src/data/reaction-bar.ts +77 -88
  188. package/src/data/read-rollback.ts +73 -0
  189. package/src/data/record-card.ts +3 -3
  190. package/src/data/record-picker.ts +93 -50
  191. package/src/data/redirect.ts +32 -32
  192. package/src/data/remote-options.ts +13 -6
  193. package/src/data/request-console.ts +5 -3
  194. package/src/data/resident.ts +2 -1
  195. package/src/data/result-panel.ts +4 -2
  196. package/src/data/rich-text.ts +45 -55
  197. package/src/data/row-editor.ts +285 -52
  198. package/src/data/rule-builder.ts +18 -12
  199. package/src/data/shape-util.ts +4 -0
  200. package/src/data/stat-group.ts +243 -101
  201. package/src/data/static-registry.ts +22 -11
  202. package/src/data/steps.ts +2 -2
  203. package/src/data/survey.ts +24 -29
  204. package/src/data/system-switcher.ts +2 -2
  205. package/src/data/timeline.ts +2 -2
  206. package/src/data/tour-guide.ts +22 -29
  207. package/src/data/transfer.ts +27 -23
  208. package/src/data/tree-table.ts +96 -48
  209. package/src/data/tree.ts +27 -34
  210. package/src/data/trend-line.ts +6 -24
  211. package/src/data/virtual-rows.ts +118 -76
  212. package/src/data/watermark.ts +2 -2
  213. package/src/data/wrap.ts +63 -38
  214. package/src/frames/blank-frame.ts +1 -0
  215. package/src/frames/index.ts +2 -2
  216. package/src/frames/page-bar.ts +12 -11
  217. package/src/frames/page-header.ts +14 -5
  218. package/src/frames/page-status.ts +2 -2
  219. package/src/frames/shared.ts +23 -17
  220. package/src/frames/single-frame.ts +1 -0
  221. package/src/frames/split-frame/shell.ts +5 -5
  222. package/src/frames/split-frame/wiring.ts +2 -2
  223. package/src/frames/tabs-frame/shell.ts +2 -13
  224. package/src/frames/tabs-frame/wiring.ts +4 -8
  225. package/src/frames/top-main-frame.ts +1 -0
  226. package/src/frames/types.ts +13 -2
  227. package/src/frames/workspace-frame/extras.ts +20 -4
  228. package/src/frames/workspace-frame/index.ts +1 -1
  229. package/src/frames/workspace-frame/shell.ts +1 -0
  230. package/src/frames/workspace-frame/state.ts +13 -6
  231. package/src/frames/workspace-frame/view.ts +119 -25
  232. package/src/generated/kit-grammar-runtime.ts +430 -366
  233. package/src/generated/page-origin.ts +0 -11
  234. package/src/i18n/kit-text.ts +23 -27
  235. package/src/index.ts +2 -1
  236. package/src/object-renderer/action-gate.ts +11 -147
  237. package/src/object-renderer/arrange.ts +71 -77
  238. package/src/object-renderer/collapse-wiring.ts +2 -2
  239. package/src/object-renderer/collection-expand.ts +2 -2
  240. package/src/object-renderer/collection-parts.ts +216 -100
  241. package/src/object-renderer/collection-table.ts +180 -42
  242. package/src/object-renderer/collection.ts +95 -79
  243. package/src/object-renderer/compile-data.ts +85 -100
  244. package/src/object-renderer/crud-bridge.ts +32 -0
  245. package/src/object-renderer/defaults.ts +8 -14
  246. package/src/object-renderer/display-checks.ts +3 -24
  247. package/src/object-renderer/emit-events.ts +186 -172
  248. package/src/object-renderer/emit-object.ts +15 -2
  249. package/src/object-renderer/emit-static.ts +174 -132
  250. package/src/object-renderer/field-value.ts +593 -396
  251. package/src/object-renderer/filter-reload.ts +70 -0
  252. package/src/object-renderer/form-detail.ts +112 -2
  253. package/src/object-renderer/index.ts +26 -0
  254. package/src/object-renderer/key-field.ts +12 -0
  255. package/src/object-renderer/linkage.ts +7 -270
  256. package/src/object-renderer/merge-class.ts +18 -1
  257. package/src/object-renderer/path-pick.ts +27 -0
  258. package/src/object-renderer/render-object.ts +405 -86
  259. package/src/object-renderer/request-actions.ts +230 -249
  260. package/src/object-renderer/table-actions.ts +195 -95
  261. package/src/object-renderer/table-summary.ts +2 -2
  262. package/src/object-renderer/table-tools.ts +418 -84
  263. package/src/object-renderer/types.ts +128 -122
  264. package/src/object-renderer/view-binding.ts +196 -0
  265. package/src/page-target/ai-surface.ts +37 -0
  266. package/src/page-target/compile.ts +48 -8
  267. package/src/page-target/index.ts +8 -1
  268. package/src/page-target/intent-schema.ts +154 -28
  269. package/src/page-target/target.ts +257 -50
  270. package/src/page-target/writer-policy.ts +14 -3
  271. package/src/recipes/container.ts +165 -0
  272. package/src/recipes/control.ts +219 -0
  273. package/src/recipes/index.ts +263 -0
  274. package/src/recipes/overlay.ts +182 -0
  275. package/src/recipes/state.ts +70 -0
  276. package/src/recipes/table-row.ts +51 -0
  277. package/src/recipes/typography.ts +87 -0
  278. package/src/shared/action-field-guard.ts +41 -0
  279. package/src/shared/envelope.ts +207 -0
  280. package/src/shared/escape.ts +57 -0
  281. package/src/shared/kit-error.ts +21 -0
  282. package/src/shared/paged-list-adapter.ts +240 -0
  283. package/src/shared/path-guard.ts +127 -0
  284. package/src/shared/theme-runtime-shared.ts +175 -0
  285. package/src/shared/view-info.ts +10 -0
  286. package/src/theme/index.ts +12 -0
  287. package/src/theme/kit-theme-text.ts +1 -1
  288. package/src/theme/kit-theme.css +38 -1
  289. package/src/theme/kit-theme.tpl +38 -1
  290. package/src/theme/nine-dim-structure.ts +77 -0
  291. package/src/theme/surface-layers.ts +97 -0
  292. package/src/theme/theme-tokens.ts +85 -79
  293. package/src/theme/theme-types.ts +71 -0
  294. package/src/theme/typography.ts +17 -17
  295. package/src/biz/shared/step-values.ts +0 -25
  296. package/src/biz/step-form/steps-ref.ts +0 -112
  297. package/src/data/options-bus.ts +0 -24
  298. package/src/data/prompt-dialog.ts +0 -235
  299. package/src/object-renderer/adopt-gate.ts +0 -333
  300. package/src/object-renderer/field-policy.ts +0 -89
  301. package/src/object-renderer/outcome-draft.ts +0 -61
  302. package/src/theme/nine-dim-palettes.ts +0 -1278
@@ -2,7 +2,7 @@
2
2
  "$schema": "http://json-schema.org/draft-07/schema#",
3
3
  "$id": "soma-kit/kit-app.schema.json",
4
4
  "title": "soma-kit 应用配置(kit.app.yaml)",
5
- "description": "键闭集对应 src/app/app-config.ts;勿手改,重新生成:npm run schema:build -w soma-kit",
5
+ "description": "键闭集读 src/app/app-config.ts,九维取值域读 soma-foundation 的 KIT_NINE_DIM_DOMAINS 投影;勿手改,重新生成:npm run schema:build -w soma-kit",
6
6
  "type": "object",
7
7
  "additionalProperties": false,
8
8
  "properties": {
@@ -10,68 +10,334 @@
10
10
  "type": "string",
11
11
  "description": "主题头文件路径(相对应用根);缺省用内置 kit-theme.css"
12
12
  },
13
- "envelope": {
14
- "type": "object",
15
- "additionalProperties": false,
16
- "description": "业务信封约定:failWhen 命中即业务失败(编进 core 的 failWhen);messagePath 失败文案位置;dataPath 成功数据位置",
17
- "properties": {
18
- "failWhen": {
19
- "type": "object",
20
- "description": "闭集谓词 { field, op, value } 或 all_of / any_of / none_of"
21
- },
22
- "messagePath": {
23
- "type": "string",
24
- "description": "失败时业务文案在响应里的点路径(须与 failWhen 一起写)"
25
- },
26
- "dataPath": {
27
- "type": "string",
28
- "description": "成功时数据在响应里的点路径(缺省不拆)"
29
- }
30
- }
31
- },
32
13
  "theme": {
33
14
  "type": "object",
34
15
  "additionalProperties": false,
35
- "description": "主题声明,交 soma-foundation 求解令牌",
16
+ "description": "主题声明(只支持九维 + mode,蛇形 / 驼峰两写法均可),交 soma-foundation 求解令牌",
36
17
  "properties": {
37
18
  "palette": {
38
- "type": "string"
19
+ "enum": [
20
+ "CLASSIC_TECH_BLUE",
21
+ "BUSINESS_INDIGO_BLUE",
22
+ "FAR_MOUNTAIN_SKY",
23
+ "GLACIER_STEEL_BLUE",
24
+ "GOVERNMENT_RED",
25
+ "PROSPEROUS_CHINA_RED",
26
+ "AMBER_TERRACOTTA",
27
+ "GILT_BUSINESS_BROWN",
28
+ "FINANCIAL_EMERALD",
29
+ "BAMBOO_FOREST_CYAN",
30
+ "TURQUOISE_LAKE",
31
+ "OLIVE_EARTH_GREEN",
32
+ "INNOVATIVE_VIOLET",
33
+ "LILAC_TWILIGHT",
34
+ "CORAL_PEACH_PINK",
35
+ "NEBULA_PLUM_PURPLE",
36
+ "MINIMAL_MONOCHROME",
37
+ "INDUSTRIAL_STEEL_GRAY",
38
+ "WARM_XUAN_PAPER",
39
+ "MATCHA_EYE_CARE",
40
+ "DEEP_OCEAN_DARK",
41
+ "GEEK_VIOLET_DARK",
42
+ "OBSIDIAN_NIGHT_DARK",
43
+ "FOREST_PINE_DARK"
44
+ ],
45
+ "description": "01 配色(24 套人工精调)(取值域读 soma-design kit-nine-dim.json 的投影)"
39
46
  },
40
47
  "color_depth": {
41
- "type": "string"
48
+ "enum": [
49
+ "VERY_LIGHT",
50
+ "SLIGHTLY_LIGHT",
51
+ "STANDARD_DEPTH",
52
+ "SLIGHTLY_DEEP",
53
+ "VERY_DEEP"
54
+ ],
55
+ "description": "02 颜色深浅(取值域读 soma-design kit-nine-dim.json 的投影)"
56
+ },
57
+ "colorDepth": {
58
+ "enum": [
59
+ "VERY_LIGHT",
60
+ "SLIGHTLY_LIGHT",
61
+ "STANDARD_DEPTH",
62
+ "SLIGHTLY_DEEP",
63
+ "VERY_DEEP"
64
+ ],
65
+ "description": "02 颜色深浅(取值域读 soma-design kit-nine-dim.json 的投影)"
42
66
  },
43
67
  "color_saturation": {
44
- "type": "string"
68
+ "enum": [
69
+ "VIVID",
70
+ "STANDARD_SATURATION",
71
+ "SOFT_MUTED",
72
+ "LOW_COLOR"
73
+ ],
74
+ "description": "03 颜色鲜艳度(取值域读 soma-design kit-nine-dim.json 的投影)"
75
+ },
76
+ "colorSaturation": {
77
+ "enum": [
78
+ "VIVID",
79
+ "STANDARD_SATURATION",
80
+ "SOFT_MUTED",
81
+ "LOW_COLOR"
82
+ ],
83
+ "description": "03 颜色鲜艳度(取值域读 soma-design kit-nine-dim.json 的投影)"
45
84
  },
46
85
  "font_family": {
47
- "type": "string"
86
+ "enum": [
87
+ "SYSTEM_SANS",
88
+ "GEOMETRIC_ROUNDED",
89
+ "INDUSTRIAL_REPORT",
90
+ "EDITORIAL_SERIF",
91
+ "GEEK_MONO",
92
+ "BOLD_DISPLAY"
93
+ ],
94
+ "description": "04 字体类型(取值域读 soma-design kit-nine-dim.json 的投影)"
95
+ },
96
+ "fontFamily": {
97
+ "enum": [
98
+ "SYSTEM_SANS",
99
+ "GEOMETRIC_ROUNDED",
100
+ "INDUSTRIAL_REPORT",
101
+ "EDITORIAL_SERIF",
102
+ "GEEK_MONO",
103
+ "BOLD_DISPLAY"
104
+ ],
105
+ "description": "04 字体类型(取值域读 soma-design kit-nine-dim.json 的投影)"
48
106
  },
49
107
  "font_scale": {
50
- "type": "string"
108
+ "enum": [
109
+ "SMALL_COMPACT",
110
+ "MEDIUM_STANDARD",
111
+ "LARGE_LOOSE",
112
+ "XLARGE_DISPLAY"
113
+ ],
114
+ "description": "05 字号与行距档(取值域读 soma-design kit-nine-dim.json 的投影)"
115
+ },
116
+ "fontScale": {
117
+ "enum": [
118
+ "SMALL_COMPACT",
119
+ "MEDIUM_STANDARD",
120
+ "LARGE_LOOSE",
121
+ "XLARGE_DISPLAY"
122
+ ],
123
+ "description": "05 字号与行距档(取值域读 soma-design kit-nine-dim.json 的投影)"
51
124
  },
52
125
  "boundary": {
53
- "type": "string"
126
+ "enum": [
127
+ "HAIRLINE_BORDER",
128
+ "BORDERLESS_SHADOW"
129
+ ],
130
+ "description": "06 组件边界方案(取值域读 soma-design kit-nine-dim.json 的投影)"
54
131
  },
55
132
  "shape": {
56
- "type": "string"
133
+ "enum": [
134
+ "STANDARD_ROUNDED",
135
+ "SMALL_SHARP",
136
+ "PILL_CAPSULE",
137
+ "PURE_SQUARE"
138
+ ],
139
+ "description": "07 圆角与形状(取值域读 soma-design kit-nine-dim.json 的投影)"
57
140
  },
58
141
  "surface_texture": {
59
- "type": "string"
142
+ "enum": [
143
+ "SOLID_MATTE",
144
+ "FROSTED_GLASS",
145
+ "SUBTLE_RELIEF"
146
+ ],
147
+ "description": "08 表面质感(取值域读 soma-design kit-nine-dim.json 的投影)"
148
+ },
149
+ "surfaceTexture": {
150
+ "enum": [
151
+ "SOLID_MATTE",
152
+ "FROSTED_GLASS",
153
+ "SUBTLE_RELIEF"
154
+ ],
155
+ "description": "08 表面质感(取值域读 soma-design kit-nine-dim.json 的投影)"
60
156
  },
61
157
  "density": {
62
- "type": "string"
158
+ "enum": [
159
+ "COMPACT_DENSE",
160
+ "STANDARD_BALANCED",
161
+ "SPACIOUS_AIRY"
162
+ ],
163
+ "description": "09 空间松紧度(取值域读 soma-design kit-nine-dim.json 的投影)"
164
+ },
165
+ "mode": {
166
+ "enum": [
167
+ "light",
168
+ "dark",
169
+ "system",
170
+ "soft"
171
+ ],
172
+ "description": "极性(light / dark / system / soft)"
173
+ }
174
+ }
175
+ },
176
+ "layout": {
177
+ "type": "object",
178
+ "additionalProperties": false,
179
+ "description": "应用级默认页面外框与导航继承配置(键名为蛇形:max_width / sticky_header)",
180
+ "properties": {
181
+ "frame": {
182
+ "type": "string",
183
+ "description": "默认页面框(非空字符串)"
63
184
  },
64
- "palette_scheme": {
65
- "type": "string"
185
+ "max_width": {
186
+ "enum": [
187
+ "narrow",
188
+ "medium",
189
+ "wide",
190
+ "full"
191
+ ],
192
+ "description": "内容最大宽度档"
66
193
  },
67
- "font_scheme": {
68
- "type": "string"
194
+ "sticky_header": {
195
+ "type": "boolean"
69
196
  },
70
- "color": {
71
- "type": "string"
197
+ "header": {
198
+ "type": "object",
199
+ "additionalProperties": false,
200
+ "properties": {
201
+ "brand": {
202
+ "type": "object",
203
+ "additionalProperties": false,
204
+ "required": [
205
+ "text"
206
+ ],
207
+ "properties": {
208
+ "text": {
209
+ "type": "string"
210
+ },
211
+ "href": {
212
+ "type": "string"
213
+ }
214
+ }
215
+ },
216
+ "nav": {
217
+ "type": "array",
218
+ "items": {
219
+ "type": "object",
220
+ "additionalProperties": false,
221
+ "required": [
222
+ "id",
223
+ "label"
224
+ ],
225
+ "properties": {
226
+ "id": {
227
+ "type": "string"
228
+ },
229
+ "label": {
230
+ "type": "string"
231
+ },
232
+ "href": {
233
+ "type": "string"
234
+ },
235
+ "url": {
236
+ "type": "string"
237
+ },
238
+ "icon": {
239
+ "type": "string"
240
+ }
241
+ }
242
+ }
243
+ },
244
+ "actions": {
245
+ "type": "array",
246
+ "items": {
247
+ "type": "object",
248
+ "additionalProperties": false,
249
+ "required": [
250
+ "id",
251
+ "label"
252
+ ],
253
+ "properties": {
254
+ "id": {
255
+ "type": "string"
256
+ },
257
+ "label": {
258
+ "type": "string"
259
+ },
260
+ "href": {
261
+ "type": "string"
262
+ },
263
+ "url": {
264
+ "type": "string"
265
+ },
266
+ "icon": {
267
+ "type": "string"
268
+ }
269
+ }
270
+ }
271
+ }
272
+ }
72
273
  },
73
- "mode": {
74
- "type": "string"
274
+ "sidebar": {
275
+ "type": "object",
276
+ "additionalProperties": false,
277
+ "properties": {
278
+ "title": {
279
+ "type": "string"
280
+ },
281
+ "width": {
282
+ "type": "number"
283
+ },
284
+ "menu": {
285
+ "type": "array",
286
+ "items": {
287
+ "type": "object",
288
+ "additionalProperties": false,
289
+ "required": [
290
+ "id",
291
+ "label"
292
+ ],
293
+ "properties": {
294
+ "id": {
295
+ "type": "string"
296
+ },
297
+ "label": {
298
+ "type": "string"
299
+ },
300
+ "href": {
301
+ "type": "string"
302
+ },
303
+ "url": {
304
+ "type": "string"
305
+ },
306
+ "icon": {
307
+ "type": "string"
308
+ }
309
+ }
310
+ }
311
+ }
312
+ }
313
+ },
314
+ "footer": {
315
+ "type": "object",
316
+ "additionalProperties": false,
317
+ "properties": {
318
+ "text": {
319
+ "type": "string"
320
+ },
321
+ "links": {
322
+ "type": "array",
323
+ "items": {
324
+ "type": "object",
325
+ "additionalProperties": false,
326
+ "required": [
327
+ "label",
328
+ "href"
329
+ ],
330
+ "properties": {
331
+ "label": {
332
+ "type": "string"
333
+ },
334
+ "href": {
335
+ "type": "string"
336
+ }
337
+ }
338
+ }
339
+ }
340
+ }
75
341
  }
76
342
  }
77
343
  },
@@ -106,6 +372,478 @@
106
372
  }
107
373
  }
108
374
  }
375
+ },
376
+ "envelope": {
377
+ "type": "object",
378
+ "additionalProperties": false,
379
+ "description": "业务信封约定:failWhen 命中即业务失败(编进 core 的 failWhen);messagePath 失败文案位置;dataPath 成功数据位置",
380
+ "properties": {
381
+ "failWhen": {
382
+ "type": "object",
383
+ "description": "闭集谓词 { field, op, value } 或 all_of / any_of / none_of"
384
+ },
385
+ "messagePath": {
386
+ "type": "string",
387
+ "description": "失败时业务文案在响应里的点路径(须与 failWhen 一起写)"
388
+ },
389
+ "dataPath": {
390
+ "type": "string",
391
+ "description": "成功时数据在响应里的点路径(缺省不拆)"
392
+ }
393
+ }
394
+ },
395
+ "dicts": {
396
+ "type": "object",
397
+ "description": "应用级共享枚举字典:字典名 -> [{ value, label, tone? }],页面字段 options: \"$dict.<名>\" 引用",
398
+ "propertyNames": {
399
+ "pattern": "^[A-Za-z_][A-Za-z0-9_]*$"
400
+ },
401
+ "additionalProperties": {
402
+ "type": "array",
403
+ "minItems": 1,
404
+ "items": {
405
+ "type": "object",
406
+ "additionalProperties": false,
407
+ "required": [
408
+ "value",
409
+ "label"
410
+ ],
411
+ "properties": {
412
+ "value": {
413
+ "type": [
414
+ "string",
415
+ "number",
416
+ "boolean"
417
+ ]
418
+ },
419
+ "label": {
420
+ "type": "string",
421
+ "minLength": 1
422
+ },
423
+ "tone": {
424
+ "type": "string",
425
+ "minLength": 1
426
+ }
427
+ }
428
+ }
429
+ }
430
+ },
431
+ "entities": {
432
+ "type": "object",
433
+ "description": "应用级共享实体字段定义:实体名 -> { 字段名: 字段声明 },页面对象 schema: \"$entity.<名>\" 引用(字段声明内部由编译器校验)",
434
+ "propertyNames": {
435
+ "pattern": "^[A-Za-z_][A-Za-z0-9_]*$"
436
+ },
437
+ "additionalProperties": {
438
+ "type": "object"
439
+ }
440
+ },
441
+ "app": {
442
+ "type": "object",
443
+ "additionalProperties": false,
444
+ "description": "应用级配置块:与顶层同名同形的键写在这里等价(两处都写时 app 内的键覆盖顶层)",
445
+ "properties": {
446
+ "style": {
447
+ "type": "string",
448
+ "description": "主题头文件路径(相对应用根);缺省用内置 kit-theme.css"
449
+ },
450
+ "theme": {
451
+ "type": "object",
452
+ "additionalProperties": false,
453
+ "description": "主题声明(只支持九维 + mode,蛇形 / 驼峰两写法均可),交 soma-foundation 求解令牌",
454
+ "properties": {
455
+ "palette": {
456
+ "enum": [
457
+ "CLASSIC_TECH_BLUE",
458
+ "BUSINESS_INDIGO_BLUE",
459
+ "FAR_MOUNTAIN_SKY",
460
+ "GLACIER_STEEL_BLUE",
461
+ "GOVERNMENT_RED",
462
+ "PROSPEROUS_CHINA_RED",
463
+ "AMBER_TERRACOTTA",
464
+ "GILT_BUSINESS_BROWN",
465
+ "FINANCIAL_EMERALD",
466
+ "BAMBOO_FOREST_CYAN",
467
+ "TURQUOISE_LAKE",
468
+ "OLIVE_EARTH_GREEN",
469
+ "INNOVATIVE_VIOLET",
470
+ "LILAC_TWILIGHT",
471
+ "CORAL_PEACH_PINK",
472
+ "NEBULA_PLUM_PURPLE",
473
+ "MINIMAL_MONOCHROME",
474
+ "INDUSTRIAL_STEEL_GRAY",
475
+ "WARM_XUAN_PAPER",
476
+ "MATCHA_EYE_CARE",
477
+ "DEEP_OCEAN_DARK",
478
+ "GEEK_VIOLET_DARK",
479
+ "OBSIDIAN_NIGHT_DARK",
480
+ "FOREST_PINE_DARK"
481
+ ],
482
+ "description": "01 配色(24 套人工精调)(取值域读 soma-design kit-nine-dim.json 的投影)"
483
+ },
484
+ "color_depth": {
485
+ "enum": [
486
+ "VERY_LIGHT",
487
+ "SLIGHTLY_LIGHT",
488
+ "STANDARD_DEPTH",
489
+ "SLIGHTLY_DEEP",
490
+ "VERY_DEEP"
491
+ ],
492
+ "description": "02 颜色深浅(取值域读 soma-design kit-nine-dim.json 的投影)"
493
+ },
494
+ "colorDepth": {
495
+ "enum": [
496
+ "VERY_LIGHT",
497
+ "SLIGHTLY_LIGHT",
498
+ "STANDARD_DEPTH",
499
+ "SLIGHTLY_DEEP",
500
+ "VERY_DEEP"
501
+ ],
502
+ "description": "02 颜色深浅(取值域读 soma-design kit-nine-dim.json 的投影)"
503
+ },
504
+ "color_saturation": {
505
+ "enum": [
506
+ "VIVID",
507
+ "STANDARD_SATURATION",
508
+ "SOFT_MUTED",
509
+ "LOW_COLOR"
510
+ ],
511
+ "description": "03 颜色鲜艳度(取值域读 soma-design kit-nine-dim.json 的投影)"
512
+ },
513
+ "colorSaturation": {
514
+ "enum": [
515
+ "VIVID",
516
+ "STANDARD_SATURATION",
517
+ "SOFT_MUTED",
518
+ "LOW_COLOR"
519
+ ],
520
+ "description": "03 颜色鲜艳度(取值域读 soma-design kit-nine-dim.json 的投影)"
521
+ },
522
+ "font_family": {
523
+ "enum": [
524
+ "SYSTEM_SANS",
525
+ "GEOMETRIC_ROUNDED",
526
+ "INDUSTRIAL_REPORT",
527
+ "EDITORIAL_SERIF",
528
+ "GEEK_MONO",
529
+ "BOLD_DISPLAY"
530
+ ],
531
+ "description": "04 字体类型(取值域读 soma-design kit-nine-dim.json 的投影)"
532
+ },
533
+ "fontFamily": {
534
+ "enum": [
535
+ "SYSTEM_SANS",
536
+ "GEOMETRIC_ROUNDED",
537
+ "INDUSTRIAL_REPORT",
538
+ "EDITORIAL_SERIF",
539
+ "GEEK_MONO",
540
+ "BOLD_DISPLAY"
541
+ ],
542
+ "description": "04 字体类型(取值域读 soma-design kit-nine-dim.json 的投影)"
543
+ },
544
+ "font_scale": {
545
+ "enum": [
546
+ "SMALL_COMPACT",
547
+ "MEDIUM_STANDARD",
548
+ "LARGE_LOOSE",
549
+ "XLARGE_DISPLAY"
550
+ ],
551
+ "description": "05 字号与行距档(取值域读 soma-design kit-nine-dim.json 的投影)"
552
+ },
553
+ "fontScale": {
554
+ "enum": [
555
+ "SMALL_COMPACT",
556
+ "MEDIUM_STANDARD",
557
+ "LARGE_LOOSE",
558
+ "XLARGE_DISPLAY"
559
+ ],
560
+ "description": "05 字号与行距档(取值域读 soma-design kit-nine-dim.json 的投影)"
561
+ },
562
+ "boundary": {
563
+ "enum": [
564
+ "HAIRLINE_BORDER",
565
+ "BORDERLESS_SHADOW"
566
+ ],
567
+ "description": "06 组件边界方案(取值域读 soma-design kit-nine-dim.json 的投影)"
568
+ },
569
+ "shape": {
570
+ "enum": [
571
+ "STANDARD_ROUNDED",
572
+ "SMALL_SHARP",
573
+ "PILL_CAPSULE",
574
+ "PURE_SQUARE"
575
+ ],
576
+ "description": "07 圆角与形状(取值域读 soma-design kit-nine-dim.json 的投影)"
577
+ },
578
+ "surface_texture": {
579
+ "enum": [
580
+ "SOLID_MATTE",
581
+ "FROSTED_GLASS",
582
+ "SUBTLE_RELIEF"
583
+ ],
584
+ "description": "08 表面质感(取值域读 soma-design kit-nine-dim.json 的投影)"
585
+ },
586
+ "surfaceTexture": {
587
+ "enum": [
588
+ "SOLID_MATTE",
589
+ "FROSTED_GLASS",
590
+ "SUBTLE_RELIEF"
591
+ ],
592
+ "description": "08 表面质感(取值域读 soma-design kit-nine-dim.json 的投影)"
593
+ },
594
+ "density": {
595
+ "enum": [
596
+ "COMPACT_DENSE",
597
+ "STANDARD_BALANCED",
598
+ "SPACIOUS_AIRY"
599
+ ],
600
+ "description": "09 空间松紧度(取值域读 soma-design kit-nine-dim.json 的投影)"
601
+ },
602
+ "mode": {
603
+ "enum": [
604
+ "light",
605
+ "dark",
606
+ "system",
607
+ "soft"
608
+ ],
609
+ "description": "极性(light / dark / system / soft)"
610
+ }
611
+ }
612
+ },
613
+ "layout": {
614
+ "type": "object",
615
+ "additionalProperties": false,
616
+ "description": "应用级默认页面外框与导航继承配置(键名为蛇形:max_width / sticky_header)",
617
+ "properties": {
618
+ "frame": {
619
+ "type": "string",
620
+ "description": "默认页面框(非空字符串)"
621
+ },
622
+ "max_width": {
623
+ "enum": [
624
+ "narrow",
625
+ "medium",
626
+ "wide",
627
+ "full"
628
+ ],
629
+ "description": "内容最大宽度档"
630
+ },
631
+ "sticky_header": {
632
+ "type": "boolean"
633
+ },
634
+ "header": {
635
+ "type": "object",
636
+ "additionalProperties": false,
637
+ "properties": {
638
+ "brand": {
639
+ "type": "object",
640
+ "additionalProperties": false,
641
+ "required": [
642
+ "text"
643
+ ],
644
+ "properties": {
645
+ "text": {
646
+ "type": "string"
647
+ },
648
+ "href": {
649
+ "type": "string"
650
+ }
651
+ }
652
+ },
653
+ "nav": {
654
+ "type": "array",
655
+ "items": {
656
+ "type": "object",
657
+ "additionalProperties": false,
658
+ "required": [
659
+ "id",
660
+ "label"
661
+ ],
662
+ "properties": {
663
+ "id": {
664
+ "type": "string"
665
+ },
666
+ "label": {
667
+ "type": "string"
668
+ },
669
+ "href": {
670
+ "type": "string"
671
+ },
672
+ "url": {
673
+ "type": "string"
674
+ },
675
+ "icon": {
676
+ "type": "string"
677
+ }
678
+ }
679
+ }
680
+ },
681
+ "actions": {
682
+ "type": "array",
683
+ "items": {
684
+ "type": "object",
685
+ "additionalProperties": false,
686
+ "required": [
687
+ "id",
688
+ "label"
689
+ ],
690
+ "properties": {
691
+ "id": {
692
+ "type": "string"
693
+ },
694
+ "label": {
695
+ "type": "string"
696
+ },
697
+ "href": {
698
+ "type": "string"
699
+ },
700
+ "url": {
701
+ "type": "string"
702
+ },
703
+ "icon": {
704
+ "type": "string"
705
+ }
706
+ }
707
+ }
708
+ }
709
+ }
710
+ },
711
+ "sidebar": {
712
+ "type": "object",
713
+ "additionalProperties": false,
714
+ "properties": {
715
+ "title": {
716
+ "type": "string"
717
+ },
718
+ "width": {
719
+ "type": "number"
720
+ },
721
+ "menu": {
722
+ "type": "array",
723
+ "items": {
724
+ "type": "object",
725
+ "additionalProperties": false,
726
+ "required": [
727
+ "id",
728
+ "label"
729
+ ],
730
+ "properties": {
731
+ "id": {
732
+ "type": "string"
733
+ },
734
+ "label": {
735
+ "type": "string"
736
+ },
737
+ "href": {
738
+ "type": "string"
739
+ },
740
+ "url": {
741
+ "type": "string"
742
+ },
743
+ "icon": {
744
+ "type": "string"
745
+ }
746
+ }
747
+ }
748
+ }
749
+ }
750
+ },
751
+ "footer": {
752
+ "type": "object",
753
+ "additionalProperties": false,
754
+ "properties": {
755
+ "text": {
756
+ "type": "string"
757
+ },
758
+ "links": {
759
+ "type": "array",
760
+ "items": {
761
+ "type": "object",
762
+ "additionalProperties": false,
763
+ "required": [
764
+ "label",
765
+ "href"
766
+ ],
767
+ "properties": {
768
+ "label": {
769
+ "type": "string"
770
+ },
771
+ "href": {
772
+ "type": "string"
773
+ }
774
+ }
775
+ }
776
+ }
777
+ }
778
+ }
779
+ }
780
+ },
781
+ "envelope": {
782
+ "type": "object",
783
+ "additionalProperties": false,
784
+ "description": "业务信封约定:failWhen 命中即业务失败(编进 core 的 failWhen);messagePath 失败文案位置;dataPath 成功数据位置",
785
+ "properties": {
786
+ "failWhen": {
787
+ "type": "object",
788
+ "description": "闭集谓词 { field, op, value } 或 all_of / any_of / none_of"
789
+ },
790
+ "messagePath": {
791
+ "type": "string",
792
+ "description": "失败时业务文案在响应里的点路径(须与 failWhen 一起写)"
793
+ },
794
+ "dataPath": {
795
+ "type": "string",
796
+ "description": "成功时数据在响应里的点路径(缺省不拆)"
797
+ }
798
+ }
799
+ },
800
+ "dicts": {
801
+ "type": "object",
802
+ "description": "应用级共享枚举字典:字典名 -> [{ value, label, tone? }],页面字段 options: \"$dict.<名>\" 引用",
803
+ "propertyNames": {
804
+ "pattern": "^[A-Za-z_][A-Za-z0-9_]*$"
805
+ },
806
+ "additionalProperties": {
807
+ "type": "array",
808
+ "minItems": 1,
809
+ "items": {
810
+ "type": "object",
811
+ "additionalProperties": false,
812
+ "required": [
813
+ "value",
814
+ "label"
815
+ ],
816
+ "properties": {
817
+ "value": {
818
+ "type": [
819
+ "string",
820
+ "number",
821
+ "boolean"
822
+ ]
823
+ },
824
+ "label": {
825
+ "type": "string",
826
+ "minLength": 1
827
+ },
828
+ "tone": {
829
+ "type": "string",
830
+ "minLength": 1
831
+ }
832
+ }
833
+ }
834
+ }
835
+ },
836
+ "entities": {
837
+ "type": "object",
838
+ "description": "应用级共享实体字段定义:实体名 -> { 字段名: 字段声明 },页面对象 schema: \"$entity.<名>\" 引用(字段声明内部由编译器校验)",
839
+ "propertyNames": {
840
+ "pattern": "^[A-Za-z_][A-Za-z0-9_]*$"
841
+ },
842
+ "additionalProperties": {
843
+ "type": "object"
844
+ }
845
+ }
846
+ }
109
847
  }
110
848
  }
111
849
  }