soma-kit 0.1.14 → 0.1.15

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 (287) hide show
  1. package/package.json +3 -3
  2. package/packs/finance/reconcile-desk/compile.ts +1 -1
  3. package/packs/finance/reconcile-desk/shell.ts +1 -1
  4. package/spec/generated/kit-app.schema.json +4 -2
  5. package/spec/generated/kit-page.schema.json +72 -2
  6. package/spec/kit-grammar.json +163 -57
  7. package/spec/kit-grammar.schema.json +0 -24
  8. package/src/app/app-config.ts +1 -1
  9. package/src/app/component-gate.ts +2 -2
  10. package/src/app/compose-apps.ts +5 -2
  11. package/src/app/define-kit-actions.ts +82 -10
  12. package/src/app/define-kit-app.ts +6 -5
  13. package/src/app/define-kit-view.ts +1 -1
  14. package/src/app/index.ts +7 -7
  15. package/src/app/kit-view-context.ts +11 -2
  16. package/src/app/theme-endpoint.ts +1 -1
  17. package/src/app/theme-runtime.ts +7 -2
  18. package/src/base/alert.ts +23 -20
  19. package/src/base/anchored-layer.ts +1 -1
  20. package/src/base/button.ts +30 -15
  21. package/src/base/cascader.ts +8 -4
  22. package/src/base/check-core.ts +9 -6
  23. package/src/base/color-picker.ts +10 -6
  24. package/src/base/command-palette.ts +10 -4
  25. package/src/base/context-menu.ts +5 -2
  26. package/src/base/date-range.ts +9 -6
  27. package/src/base/date.ts +10 -6
  28. package/src/base/delta.ts +4 -2
  29. package/src/base/divider.ts +15 -66
  30. package/src/base/fab.ts +11 -6
  31. package/src/base/gap-value.ts +1 -1
  32. package/src/base/hint-tips.ts +1 -1
  33. package/src/base/index.ts +15 -4
  34. package/src/base/inline-error.ts +84 -0
  35. package/src/base/input.ts +54 -18
  36. package/src/base/kbd.ts +4 -3
  37. package/src/base/link.ts +1 -1
  38. package/src/base/listbox-core.ts +70 -22
  39. package/src/base/mentions.ts +6 -3
  40. package/src/base/menu-button.ts +63 -27
  41. package/src/base/menu-core.ts +9 -2
  42. package/src/base/motion/hover-3d.ts +4 -1
  43. package/src/base/motion/hover-gallery.ts +4 -1
  44. package/src/base/otp.ts +7 -3
  45. package/src/base/overlay-runtime.ts +3 -2
  46. package/src/base/overlay-shell.ts +141 -0
  47. package/src/base/popover.ts +2 -2
  48. package/src/base/popup.ts +47 -41
  49. package/src/base/qty-stepper.ts +14 -9
  50. package/src/base/reason-tip.ts +2 -2
  51. package/src/{frames → base}/resize-handle.ts +1 -1
  52. package/src/base/segmented.ts +35 -36
  53. package/src/base/select.ts +1 -0
  54. package/src/base/shared.ts +43 -7
  55. package/src/base/status-tone.ts +1 -1
  56. package/src/base/tag-input.ts +13 -8
  57. package/src/base/tag.ts +53 -59
  58. package/src/base/text.ts +37 -13
  59. package/src/base/textarea.ts +1 -1
  60. package/src/base/time-picker.ts +9 -5
  61. package/src/base/tree-select.ts +12 -9
  62. package/src/base/upload.ts +21 -13
  63. package/src/biz/approval-desk/compile.ts +28 -1
  64. package/src/biz/approval-desk/shell.ts +2 -2
  65. package/src/biz/auth-panel/compile.ts +1 -1
  66. package/src/biz/auth-panel/shell.ts +2 -2
  67. package/src/biz/category-crud/compile.ts +17 -4
  68. package/src/biz/category-crud/shell.ts +7 -5
  69. package/src/biz/checkout-page/compile.ts +1 -1
  70. package/src/biz/checkout-page/shell.ts +7 -6
  71. package/src/biz/compose.ts +3 -3
  72. package/src/biz/define.ts +1 -1
  73. package/src/biz/import-wizard/compile.ts +1 -1
  74. package/src/biz/import-wizard/shell.ts +6 -4
  75. package/src/biz/index.ts +4 -3
  76. package/src/biz/landing-page/compile.ts +1 -1
  77. package/src/biz/landing-page/shell.ts +5 -4
  78. package/src/biz/link/shared.ts +8 -1
  79. package/src/biz/master-sub/compile.ts +162 -19
  80. package/src/biz/master-sub/detail-head.ts +7 -6
  81. package/src/biz/master-sub/index.ts +3 -3
  82. package/src/biz/master-sub/shell.ts +90 -53
  83. package/src/biz/multi-board/compile.ts +3 -3
  84. package/src/biz/multi-board/index.ts +24 -9
  85. package/src/biz/multi-board/prose-fold.ts +2 -2
  86. package/src/biz/multi-board/shell.ts +17 -13
  87. package/src/biz/names.ts +1 -0
  88. package/src/biz/notification-center/compile.ts +9 -2
  89. package/src/biz/notification-center/shell.ts +9 -2
  90. package/src/biz/page-templates/domain-templates.ts +6 -2
  91. package/src/biz/page-templates/result-page/compile.ts +1 -1
  92. package/src/biz/page-templates/result-page/shell.ts +4 -3
  93. package/src/biz/page-templates/shared.ts +1 -1
  94. package/src/biz/page-templates/sign-in-page/compile.ts +1 -1
  95. package/src/biz/page-templates/sign-in-page/shell.ts +4 -4
  96. package/src/biz/record-detail/compile.ts +5 -2
  97. package/src/biz/record-detail/shell.ts +4 -4
  98. package/src/biz/settings-center/compile.ts +1 -1
  99. package/src/biz/settings-center/shell.ts +8 -5
  100. package/src/biz/shared/action-host.ts +12 -5
  101. package/src/biz/shared/compile-helpers.ts +4 -4
  102. package/src/biz/shared/coordinator.ts +104 -21
  103. package/src/biz/shared/overlay-compile.ts +48 -18
  104. package/src/biz/shared/overlay-shell.ts +63 -112
  105. package/src/biz/single-form/compile.ts +2 -2
  106. package/src/biz/single-form/shell.ts +8 -4
  107. package/src/biz/standard-crud/compile.ts +11 -4
  108. package/src/biz/standard-crud/shell.ts +26 -9
  109. package/src/biz/standard-crud/summary.ts +3 -1
  110. package/src/biz/step-form/compile.ts +1 -1
  111. package/src/biz/step-form/hub.ts +4 -0
  112. package/src/biz/step-form/shell.ts +6 -4
  113. package/src/biz/types.ts +11 -4
  114. package/src/cli/app-layer-check.ts +375 -0
  115. package/src/cli/kit-cli.ts +35 -8
  116. package/src/cli/kit-init.ts +149 -0
  117. package/src/compile/access-gate-attach.ts +1 -1
  118. package/src/compile/action-host-attach.ts +1 -1
  119. package/src/compile/compile-page.ts +29 -234
  120. package/src/compile/component-candidates.ts +2 -1
  121. package/src/compile/hints.ts +5 -58
  122. package/src/compile/index.ts +2 -2
  123. package/src/compile/layout-lint/index.ts +4 -1
  124. package/src/compile/layout-lint/rules-composition.ts +43 -13
  125. package/src/compile/page-composition.ts +33 -31
  126. package/src/compile/redirect.ts +1 -1
  127. package/src/compile/stages.ts +169 -0
  128. package/src/compile/styles.ts +70 -32
  129. package/src/compile/types.ts +2 -2
  130. package/src/data/amount-breakdown.ts +4 -2
  131. package/src/data/anchor-nav.ts +4 -1
  132. package/src/data/approval-flow.ts +9 -4
  133. package/src/data/assignment-picker.ts +28 -18
  134. package/src/data/async-result-panel.ts +6 -2
  135. package/src/data/breadcrumbs.ts +13 -9
  136. package/src/data/calendar.ts +4 -3
  137. package/src/data/carousel.ts +11 -5
  138. package/src/data/chart.ts +153 -23
  139. package/src/data/checklist.ts +5 -4
  140. package/src/data/code-view.ts +220 -26
  141. package/src/data/comment-thread.ts +7 -2
  142. package/src/data/confirm-dialog.ts +56 -13
  143. package/src/data/diff.ts +4 -1
  144. package/src/data/dock.ts +5 -1
  145. package/src/data/embed.ts +1 -1
  146. package/src/data/engine-ports.ts +126 -0
  147. package/src/data/field-mapper.ts +12 -6
  148. package/src/data/flow-editor.ts +105 -29
  149. package/src/data/footer.ts +6 -2
  150. package/src/data/gantt.ts +11 -8
  151. package/src/data/hero.ts +6 -2
  152. package/src/data/image-viewer.ts +7 -3
  153. package/src/data/index.ts +12 -5
  154. package/src/data/item-list.ts +6 -5
  155. package/src/data/json-view.ts +844 -0
  156. package/src/data/kanban.ts +11 -8
  157. package/src/data/markdown-view.ts +487 -0
  158. package/src/data/matrix.ts +23 -14
  159. package/src/data/media-grid.ts +5 -2
  160. package/src/data/mega-menu.ts +4 -3
  161. package/src/data/menu-dom.ts +9 -8
  162. package/src/data/menu.ts +15 -9
  163. package/src/data/mockup.ts +9 -5
  164. package/src/data/modal-dialog.ts +39 -88
  165. package/src/data/navbar.ts +11 -7
  166. package/src/data/notice-list.ts +1 -1
  167. package/src/data/notify-renderer.ts +21 -10
  168. package/src/data/object-form.ts +129 -48
  169. package/src/data/pager.ts +12 -8
  170. package/src/data/panel-head.ts +1 -1
  171. package/src/data/permission-matrix.ts +15 -8
  172. package/src/data/permission-tree.ts +24 -11
  173. package/src/data/pricing-table.ts +8 -3
  174. package/src/data/reaction-bar.ts +6 -3
  175. package/src/data/record-card.ts +13 -9
  176. package/src/data/record-picker.ts +8 -4
  177. package/src/data/redirect.ts +1 -1
  178. package/src/data/request-console.ts +20 -7
  179. package/src/data/resident.ts +0 -12
  180. package/src/data/result-panel.ts +2 -2
  181. package/src/data/rich-text.ts +58 -96
  182. package/src/data/row-editor.ts +10 -5
  183. package/src/data/rule-builder.ts +14 -8
  184. package/src/data/shape-util.ts +14 -3
  185. package/src/data/stat-group.ts +63 -22
  186. package/src/data/static-lazy.ts +3 -0
  187. package/src/data/static-registry.ts +8 -2
  188. package/src/data/steps.ts +6 -2
  189. package/src/data/survey.ts +9 -3
  190. package/src/data/system-switcher.ts +15 -6
  191. package/src/data/text-diff.ts +663 -0
  192. package/src/data/timeline.ts +1 -1
  193. package/src/data/tour-guide.ts +6 -3
  194. package/src/data/transfer.ts +19 -10
  195. package/src/data/tree-table.ts +77 -12
  196. package/src/data/tree.ts +5 -2
  197. package/src/data/virtual-rows.ts +17 -7
  198. package/src/data/wrap.ts +2 -2
  199. package/src/frames/index.ts +3 -2
  200. package/src/frames/inherited-shell.ts +178 -0
  201. package/src/frames/list-summary.ts +59 -36
  202. package/src/frames/page-bar.ts +4 -2
  203. package/src/frames/resident-components.ts +20 -0
  204. package/src/frames/shared.ts +18 -14
  205. package/src/frames/split-frame/shell.ts +17 -11
  206. package/src/frames/split-frame/wiring.ts +2 -2
  207. package/src/frames/tabs-frame/shell.ts +12 -6
  208. package/src/frames/types.ts +3 -2
  209. package/src/frames/workspace-frame/extras.ts +19 -5
  210. package/src/frames/workspace-frame/shell.ts +2 -1
  211. package/src/frames/workspace-frame/state.ts +8 -2
  212. package/src/frames/workspace-frame/view.ts +125 -76
  213. package/src/generated/kit-grammar-runtime.ts +61 -39
  214. package/src/i18n/kit-text.ts +114 -2
  215. package/src/i18n/resolve-text-refs.ts +1 -1
  216. package/src/object-renderer/action-group.ts +31 -1
  217. package/src/object-renderer/action-more.ts +28 -12
  218. package/src/object-renderer/arrange.ts +37 -7
  219. package/src/object-renderer/collection-parts.ts +38 -7
  220. package/src/object-renderer/collection-table.ts +68 -23
  221. package/src/object-renderer/collection.ts +63 -30
  222. package/src/object-renderer/compile-data.ts +1 -1
  223. package/src/object-renderer/defaults.ts +8 -0
  224. package/src/object-renderer/emit-events.ts +1 -1
  225. package/src/object-renderer/emit-object.ts +3 -0
  226. package/src/object-renderer/emit-static.ts +140 -37
  227. package/src/object-renderer/field-value.ts +12 -239
  228. package/src/object-renderer/filter-toolbar.ts +103 -0
  229. package/src/{compile → object-renderer}/fragment.ts +2 -2
  230. package/src/object-renderer/index.ts +1 -1
  231. package/src/object-renderer/layout-facts.ts +37 -5
  232. package/src/object-renderer/overlay-decide.ts +82 -0
  233. package/src/object-renderer/render-object.ts +1 -1
  234. package/src/object-renderer/table-actions.ts +70 -23
  235. package/src/object-renderer/table-tools.ts +12 -5
  236. package/src/object-renderer/types.ts +9 -15
  237. package/src/recipes/app-blocks.ts +66 -0
  238. package/src/recipes/code-view.ts +56 -0
  239. package/src/recipes/compact-group.ts +31 -0
  240. package/src/recipes/container.ts +25 -15
  241. package/src/recipes/control.ts +21 -3
  242. package/src/recipes/desc-list.ts +14 -0
  243. package/src/recipes/divider.ts +53 -0
  244. package/src/recipes/emphasis.ts +12 -8
  245. package/src/recipes/frame-bleed.ts +3 -3
  246. package/src/recipes/index.ts +11 -1
  247. package/src/recipes/inherited-shell.ts +37 -0
  248. package/src/recipes/json-view.ts +49 -0
  249. package/src/recipes/markdown.ts +86 -0
  250. package/src/recipes/overlay.ts +112 -26
  251. package/src/recipes/page-width.ts +20 -0
  252. package/src/recipes/placeholder.ts +1 -1
  253. package/src/recipes/stat-state.ts +1 -1
  254. package/src/recipes/state.ts +10 -8
  255. package/src/recipes/status.ts +13 -12
  256. package/src/recipes/strip.ts +72 -0
  257. package/src/recipes/surface.ts +10 -6
  258. package/src/recipes/table-gap.ts +1 -1
  259. package/src/recipes/table-native-edit.ts +4 -4
  260. package/src/recipes/table-row.ts +11 -8
  261. package/src/recipes/tabs.ts +108 -31
  262. package/src/recipes/text-diff.ts +90 -0
  263. package/src/recipes/title-row.ts +4 -2
  264. package/src/recipes/typography.ts +2 -2
  265. package/src/shared/diagnostics.ts +16 -0
  266. package/src/shared/envelope.ts +1 -1
  267. package/src/shared/field-value-format.ts +246 -0
  268. package/src/shared/focus-ring.ts +8 -0
  269. package/src/shared/hints.ts +56 -0
  270. package/src/{base → shared}/icons.ts +12 -0
  271. package/src/shared/kit-error.ts +1 -1
  272. package/src/{object-renderer → shared}/merge-class.ts +3 -2
  273. package/src/shared/path-guard.ts +1 -1
  274. package/src/shared/primitives-types.ts +8 -0
  275. package/src/shared/theme-runtime-shared.ts +19 -0
  276. package/src/theme/kit-theme-text.ts +1 -1
  277. package/src/theme/kit-theme.css +38 -14
  278. package/src/theme/kit-theme.tpl +38 -14
  279. package/src/theme/nine-dim-structure.ts +66 -41
  280. package/src/theme/surface-layers.ts +11 -3
  281. package/src/theme/theme-tokens.ts +5 -1
  282. package/src/app/envelope.ts +0 -1
  283. package/src/app/notify-renderer.ts +0 -1
  284. package/src/app/paged-list-adapter.ts +0 -1
  285. package/src/app/theme-runtime-shared.ts +0 -1
  286. package/src/compile/kit-error.ts +0 -1
  287. /package/src/{base → shared}/class-candidates.ts +0 -0
@@ -15,10 +15,13 @@ import {
15
15
  } from './shared';
16
16
  import { safeSrc } from './avatar';
17
17
  import { kitLocaleAt, kitText } from '../i18n/kit-text';
18
- import { kitIcon } from './icons';
18
+ import { kitIcon } from '../shared/icons';
19
19
  import { setKitFace } from '../recipes';
20
+ import { kitControlEdgeRecipe } from '../recipes/control';
21
+ import { kitDivideRecipe } from '../recipes/divider';
22
+ import { kitShellRecipe } from '../recipes/container';
20
23
  import { kitEmphasisButtonRecipe } from '../recipes/emphasis';
21
- import { mergeClass } from '../object-renderer/merge-class';
24
+ import { mergeClass } from '../shared/merge-class';
22
25
 
23
26
  type FileStatus = 'pending' | 'uploading' | 'done' | 'error';
24
27
  type RejectReason = 'type' | 'size' | 'count';
@@ -40,24 +43,29 @@ const PICK_CLASS: Record<KitSize, string> = {
40
43
  lg: mergeClass(kitEmphasisButtonRecipe('button.toolbar', { size: 'lg' }), 'w-fit cursor-pointer'),
41
44
  };
42
45
  // 投放区:静止 / 拖入高亮 / 禁用,各一整串
46
+ // 投放区与「+」添加格是控件(投放目标):边 = 控件轮廓出口(KT-B1 / §4 C6)+ 虚线;拖入 / 悬停变主色(强调指示)
47
+ const DROP_LINE = kitControlEdgeRecipe({ wrapper: true, hover: false });
48
+ const DROP_EDGE = `${DROP_LINE} border-dashed`;
43
49
  const DROP_CLASS = {
44
- idle: 'flex w-full cursor-pointer flex-col items-center justify-center gap-1 rounded-lg border-2 border-dashed border-border bg-surface px-4 py-6 text-sm text-fg-muted transition-colors hover:border-primary state-layer focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring',
45
- over: 'flex w-full cursor-pointer flex-col items-center justify-center gap-1 rounded-lg border-2 border-dashed border-primary bg-primary-soft px-4 py-6 text-sm text-primary-on-soft focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring',
46
- disabled: 'flex w-full cursor-not-allowed flex-col items-center justify-center gap-1 rounded-lg border-2 border-dashed border-border bg-surface-sunken px-4 py-6 text-sm text-fg-subtle opacity-60',
50
+ idle: `flex w-full cursor-pointer flex-col items-center justify-center gap-1 rounded-lg ${DROP_EDGE} bg-surface px-4 py-6 text-sm text-fg-muted transition-colors hover:border-primary state-layer focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring`,
51
+ over: 'flex w-full cursor-pointer flex-col items-center justify-center gap-1 rounded-lg border border-dashed border-primary bg-primary-soft px-4 py-6 text-sm text-primary-on-soft focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring',
52
+ disabled: `flex w-full cursor-not-allowed flex-col items-center justify-center gap-1 rounded-lg ${DROP_EDGE} bg-surface-sunken px-4 py-6 text-sm text-fg-subtle opacity-60`,
47
53
  } as const;
48
54
  const HINT_CLASS = 'text-xs text-fg-subtle';
49
55
  const REJECT_NOTE_CLASS = 'text-danger-on-soft';
50
56
  // 无 preflight:ul 默认的圆点与缩进要自己清掉
51
- const LIST_CLASS = 'm-0 flex list-none flex-col gap-1 p-0';
52
- const ITEM_CLASS = 'flex items-center gap-2 rounded-md border border-border-subtle bg-surface px-3 py-2 text-sm text-fg';
57
+ // 文件列表 = 一个列表框(壳配方的容器边,KT-B2),文件行之间的线由父出(kitDivideRecipe,KT-B5),行自己不描边
58
+ const LIST_CLASS = mergeClass('m-0 flex list-none flex-col p-0 overflow-hidden', `${kitShellRecipe({ tone: 'base', shadow: false })} ${kitDivideRecipe('y')}`);
59
+ const ITEM_CLASS = 'flex items-center gap-2 bg-surface px-3 py-2 text-sm text-fg';
53
60
  const THUMB_CLASS = 'h-8 w-8 shrink-0 rounded-md object-cover';
54
61
  const NAME_CLASS = 'min-w-0 flex-1 truncate';
55
62
  const SIZE_TEXT_CLASS = 'shrink-0 text-xs text-fg-subtle';
56
63
  const STATUS_CLASS: Record<FileStatus, string> = {
57
- pending: 'shrink-0 rounded-md border border-border-subtle bg-surface-sunken px-1.5 py-0.5 text-xs font-medium text-fg-muted',
58
- uploading: 'shrink-0 rounded-md border border-info-on-soft/20 bg-info-soft px-1.5 py-0.5 text-xs font-medium text-info-on-soft',
59
- done: 'shrink-0 rounded-md border border-success-on-soft/20 bg-success-soft px-1.5 py-0.5 text-xs font-medium text-success-on-soft',
60
- error: 'shrink-0 rounded-md border border-danger-on-soft/20 bg-danger-soft px-1.5 py-0.5 text-xs font-medium text-danger-on-soft',
64
+ // 状态芯片:浅底、无描边(芯片一种形体)
65
+ pending: 'shrink-0 rounded-md bg-surface-sunken px-1.5 py-0.5 text-xs font-medium text-fg-muted',
66
+ uploading: 'shrink-0 rounded-md bg-info-soft px-1.5 py-0.5 text-xs font-medium text-info-on-soft',
67
+ done: 'shrink-0 rounded-md bg-success-soft px-1.5 py-0.5 text-xs font-medium text-success-on-soft',
68
+ error: 'shrink-0 rounded-md bg-danger-soft px-1.5 py-0.5 text-xs font-medium text-danger-on-soft',
61
69
  };
62
70
  const statusText = (status: FileStatus, at: Element): string => kitText(
63
71
  status === 'pending' ? 'soma.kit.upload_pending' : status === 'uploading' ? 'soma.kit.upload_uploading' : status === 'done' ? 'soma.kit.upload_done' : 'soma.kit.upload_error',
@@ -67,12 +75,12 @@ const REMOVE_CLASS = 'shrink-0 cursor-pointer rounded-md px-1 text-fg-subtle hov
67
75
  const HIDDEN_CLASS = 'hidden';
68
76
  // 照片墙(list: picture):方形缩略图格 + 末尾的「+」添加格
69
77
  const WALL_CLASS = 'm-0 grid list-none grid-cols-4 gap-2 p-0';
70
- const TILE_CLASS = 'relative flex aspect-square items-center justify-center overflow-hidden rounded-lg border border-border-subtle bg-surface-sunken';
78
+ const TILE_CLASS = mergeClass('relative flex aspect-square items-center justify-center overflow-hidden', kitShellRecipe({ tone: 'sunken', shadow: false }));
71
79
  const TILE_IMG_CLASS = 'h-full w-full object-cover';
72
80
  const TILE_NAME_CLASS = 'break-all px-2 text-center text-xs text-fg-muted';
73
81
  const TILE_STATUS_CLASS = 'absolute bottom-1 start-1';
74
82
  const TILE_REMOVE_CLASS = 'absolute end-1 top-1 cursor-pointer rounded-md bg-surface/80 px-1.5 text-sm text-fg transition-colors hover:bg-surface focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring';
75
- const ADD_TILE_CLASS = 'flex aspect-square w-full cursor-pointer flex-col items-center justify-center gap-1 rounded-lg border-2 border-dashed border-border bg-surface text-sm text-fg-muted transition-colors hover:border-primary state-layer focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring';
83
+ const ADD_TILE_CLASS = `flex aspect-square w-full cursor-pointer flex-col items-center justify-center gap-1 rounded-lg ${DROP_EDGE} bg-surface text-sm text-fg-muted transition-colors hover:border-primary state-layer focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring`;
76
84
  const ADD_TILE_PLUS_CLASS = 'text-xl text-fg-subtle';
77
85
  // 手动上传按钮:主色实心,文字 -fg
78
86
  const START_CLASS: Record<KitSize, string> = {
@@ -15,7 +15,7 @@
15
15
 
16
16
  import type { SomaScopeMirrorDecl } from 'soma-core';
17
17
  import type { KitObject } from '../../object-renderer/types';
18
- import type { KitFragment } from '../../compile/fragment';
18
+ import type { KitFragment } from '../../object-renderer/fragment';
19
19
  import type { KitBizContext, KitBizInput } from '../types';
20
20
  import { KIT_LINK_MIRRORS, KIT_SEL_PATH } from '../link/hub';
21
21
  import { bizObjectName, finishBizCompile, validateBizAreaClass } from '../shared/compile-helpers';
@@ -35,6 +35,32 @@ function isStaticView(s: unknown): boolean {
35
35
  return !!v && (v.staticComponent !== undefined || (isRec(v.summary) && v.summary.staticComponent !== undefined) || (isRec(v.list) && v.list.staticComponent !== undefined));
36
36
  }
37
37
 
38
+ /** 审批单摘要里的按钮型虚拟字段(component: Button)隐藏冗余上方字段名标签,避免按钮上方重复显示按钮文字 */
39
+ function hideButtonFieldLabels(obj: KitObject): void {
40
+ const summary = obj.view?.summary;
41
+ if (summary === undefined) return;
42
+ const patchList = (list: unknown): void => {
43
+ if (!Array.isArray(list)) return;
44
+ for (const item of list) {
45
+ if (!isRec(item)) continue;
46
+ if (item.component === 'Button') {
47
+ if (item.label === undefined) item.label = '';
48
+ continue;
49
+ }
50
+ // YAML 短写:{ ok: { component: 'Button', ... } }
51
+ const keys = Object.keys(item);
52
+ if (keys.length === 1 && isRec(item[keys[0]!])) {
53
+ const inner = item[keys[0]!] as Rec;
54
+ if (inner.component === 'Button' && inner.label === undefined) inner.label = '';
55
+ }
56
+ }
57
+ };
58
+ patchList(summary.fields);
59
+ if (Array.isArray(summary.groups)) {
60
+ for (const g of summary.groups) if (isRec(g)) patchList(g.fields);
61
+ }
62
+ }
63
+
38
64
  export function compileApprovalDesk(input: KitBizInput, ctx: KitBizContext): KitFragment {
39
65
  const out = newParts(['KitLinkHub', 'KitCrudBridge']);
40
66
  const fail = (code: string, message: string, path: string): void => { out.diagnostics.push({ code, message, path }); };
@@ -101,6 +127,7 @@ export function compileApprovalDesk(input: KitBizInput, ctx: KitBizContext): Kit
101
127
  requireLink: true,
102
128
  });
103
129
  out.diagnostics.push(...norm.diagnostics);
130
+ if (role === 'request') hideButtonFieldLabels(norm.obj);
104
131
  const object = approvalDeskObjectName(ctx.pageId, role);
105
132
  members.push({ role, object, scope: `${object}_scope`, obj: norm.obj, title: typeof raw.title === 'string' ? raw.title : '' });
106
133
  }
@@ -2,7 +2,7 @@
2
2
  // 三栏靠容器查询变体 `@md:`:窄容器下上下堆叠;达到 md 档左 3 / 中 5 / 右 4(共 12 份)。
3
3
 
4
4
  import { KIT_TIPS_SCOPE_ATTR } from '../../base/hint-tips';
5
- import { mergeClass } from '../../object-renderer/merge-class';
5
+ import { mergeClass } from '../../shared/merge-class';
6
6
  import { KIT_SHELL_FLAT_MARK, kitShellRecipe } from '../../recipes/container';
7
7
  import { kitTypographyRecipe } from '../../recipes/typography';
8
8
  import { cls, esc, host } from '../link/shared';
@@ -42,7 +42,7 @@ export function approvalDeskHtml(
42
42
  // 截断的标题悬停 / 聚焦时由 hint-tips 按需挂全文气泡(作用范围标记就在标题元素自身)
43
43
  const title = c.title === '' ? '' : `<h3${cls(APPROVAL_DESK_CLASS.title)} ${KIT_TIPS_SCOPE_ATTR}="">${esc(c.title)}</h3>`;
44
44
  const base = wide === undefined ? APPROVAL_DESK_CLASS[area] : wide;
45
- return `<section${cls(mergeClass(base, areaClass[area]))}${KIT_SHELL_FLAT_MARK}>${title}${c.html}</section>`;
45
+ return `<section data-kit-container="card"${cls(mergeClass(base, areaClass[area]))}${KIT_SHELL_FLAT_MARK}>${title}${c.html}</section>`;
46
46
  };
47
47
  // 没有历史栏时,审批单栏吃掉右侧 4 份
48
48
  const requestBase = parts.history === null ? APPROVAL_DESK_CLASS.requestWide : undefined;
@@ -13,7 +13,7 @@
13
13
  import type { SomaScopeMirrorDecl } from 'soma-core';
14
14
  import { viewAnchor } from '../../object-renderer/emit-static';
15
15
  import type { KitObject } from '../../object-renderer/types';
16
- import type { KitFragment } from '../../compile/fragment';
16
+ import type { KitFragment } from '../../object-renderer/fragment';
17
17
  import type { KitBizContext, KitBizInput } from '../types';
18
18
  import {
19
19
  bizObjectName, finishBizCompile, validateBizAreaClass,
@@ -1,7 +1,7 @@
1
1
  // AuthPanel 的 HTML 代码壳:顶部当前用户摘要,下方左角色列表 + 右权限矩阵。只有结构与 Tailwind 类,不写原生 CSS。
2
2
  // 分栏靠容器查询变体 `@md:`:窄容器下上下堆叠;达到 md 档角色 4 / 矩阵 8(共 12 份)。
3
3
 
4
- import { mergeClass } from '../../object-renderer/merge-class';
4
+ import { mergeClass } from '../../shared/merge-class';
5
5
  import { KIT_SHELL_FLAT_MARK, kitShellRecipe } from '../../recipes/container';
6
6
  import { kitTypographyRecipe } from '../../recipes/typography';
7
7
  import { cls, esc, host } from '../link/shared';
@@ -39,7 +39,7 @@ export function authPanelHtml(
39
39
  ): string {
40
40
  const block = (area: 'user' | 'roles' | 'matrix', b: AuthBlock): string => {
41
41
  const title = b.title === '' ? '' : `<h3${cls(AUTH_PANEL_CLASS.title)}>${esc(b.title)}</h3>`;
42
- return `<section${cls(mergeClass(AUTH_PANEL_CLASS[area], areaClass[area]))}${KIT_SHELL_FLAT_MARK}>${title}${b.html}</section>`;
42
+ return `<section data-kit-container="card"${cls(mergeClass(AUTH_PANEL_CLASS[area], areaClass[area]))}${KIT_SHELL_FLAT_MARK}>${title}${b.html}</section>`;
43
43
  };
44
44
  const user = parts.user === null ? '' : `${block('user', parts.user)}\n`;
45
45
  const root = mergeClass(mergeClass(AUTH_PANEL_CLASS.root, areaClass.root), extra);
@@ -9,14 +9,16 @@
9
9
  // 缺分类键不取数:条目的 from 编成 core `from[].require`(requireLink),尚未选分类时对象落 idle,不发请求。
10
10
 
11
11
  import type { SomaScopeMirrorDecl } from 'soma-core';
12
- import { viewAnchor } from '../../object-renderer/emit-static';
12
+ import { stateAnchor, viewAnchor } from '../../object-renderer/emit-static';
13
13
  import type { KitObject, KitType } from '../../object-renderer/types';
14
- import type { KitFragment } from '../../compile/fragment';
14
+ import type { KitFragment } from '../../object-renderer/fragment';
15
15
  import type { KitBizContext, KitBizInput } from '../types';
16
16
  import { KIT_COORD_EVENTS, KIT_COORD_MIRRORS } from '../shared/coordinator';
17
17
  import { bizObjectName, finishBizCompile, listPanelBody, validateBizAreaClass } from '../shared/compile-helpers';
18
18
  import { wireDialogForm } from '../shared/pipes';
19
- import { OVERLAY_SHELL_CLASS, dialogHtml, dialogIds, dialogTitles, dialogWidthOf } from '../shared/overlay-shell';
19
+ import { OVERLAY_SHELL_CLASS, dialogHtml, dialogIds, dialogTitles } from '../shared/overlay-shell';
20
+ import { adviseDialogFooter } from '../shared/overlay-compile';
21
+ import { dialogWidthOf } from '../../object-renderer/overlay-decide';
20
22
  import { KIT_LINK_MIRRORS, KIT_SEL_PATH } from '../link/hub';
21
23
  import {
22
24
  IDENT, classesIn, emitMember, grantPageReset, isRec, keyFieldOf, linkRemoveProps, mirrorPath, newParts,
@@ -139,11 +141,22 @@ export function compileCategoryCrud(input: KitBizInput, ctx: KitBizContext): Kit
139
141
  const createName = item.behavior.actions?.find((a) => a.builtin === 'openCreate')?.name ?? kitText('soma.kit.create', undefined, ctx.locale);
140
142
  const editName = item.behavior.actions?.find((a) => a.builtin === 'openEdit')?.name ?? kitText('soma.kit.edit', undefined, ctx.locale);
141
143
  dialog = dialogHtml(d, dialogTitles(item.view?.form?.title, { create: createName, edit: editName }), it.r.parts.form ?? '', { dialog: areaClass.dialog ?? '' }, CLOSE_LABEL, '', dialogWidthOf({ form: item.view?.form, schema: item.schema }));
144
+ adviseDialogFooter(ctx, item.view?.form, 'product.objects.item.view.form.footerActions');
142
145
  for (const cl of Object.values(OVERLAY_SHELL_CLASS)) for (const t of cl.split(/\s+/)) if (t !== '') out.candidates.add(t);
143
146
  }
144
147
 
145
148
  // ---- 枢纽与协调组件
146
- out.show[ids.hub] = { props: { scope: link, keyField: catKey, linkKey, autoSelect: false, rows: [], pageScopes } };
149
+ // 分类为普通列表时 selection 归枢纽所有,启用 autoSelect 自动选中首项;分类为树(selection 归树)时在未选分类的 idle 态展示明确引导文案,不卡在加载骨架
150
+ const catRowsPath = `page.data.${catName}.${c.r.compiled.listShape.rows}`;
151
+ const hubAutoSelect = staticView === undefined;
152
+ out.show[ids.hub] = {
153
+ props: { scope: link, keyField: catKey, linkKey, autoSelect: hubAutoSelect, rows: hubAutoSelect ? catRowsPath : [], pageScopes },
154
+ };
155
+ const itemStateShow = out.show[stateAnchor(itemName)] as { props?: { config?: Record<string, unknown> } } | undefined;
156
+ if (itemStateShow?.props?.config !== undefined && itemStateShow.props.config.idle === undefined) {
157
+ // 文案只走 i18n 唯一出口(接入核对 C4:不在编译器里写中英两句)
158
+ itemStateShow.props.config = { ...itemStateShow.props.config, idle: kitText('soma.kit.pick_category_first', undefined, ctx.locale) };
159
+ }
147
160
  out.show[ids.coord] = {
148
161
  props: {
149
162
  scope: link, object: itemName, keyField: keyFieldOf(item) ?? '', reloads: [], overlays: {}, rowsPath: it.r.compiled.listShape.rows,
@@ -1,6 +1,6 @@
1
1
  // CategoryCrud 的 HTML 代码壳:左侧固定紧凑分类栏(默认 w-56)+ 右侧条目管理区。只有结构与 Tailwind 类,分栏靠容器查询变体。
2
2
 
3
- import { mergeClass } from '../../object-renderer/merge-class';
3
+ import { mergeClass } from '../../shared/merge-class';
4
4
  import { kitShellRecipe } from '../../recipes/container';
5
5
  import { cls, esc, host } from '../link/shared';
6
6
 
@@ -8,7 +8,9 @@ import { cls, esc, host } from '../link/shared';
8
8
  export const CATEGORY_CRUD_AREAS = ['root', 'categorySidebar', 'itemWorkspace', 'dialog'] as const;
9
9
 
10
10
  export const CATEGORY_CRUD_CLASS = {
11
- root: '@container flex flex-col gap-section @md:flex-row',
11
+ // 外层只做容器查询宿主(@container 不能自查询,@md:flex-row 放在内层容器上)
12
+ root: '@container w-full',
13
+ layout: 'flex flex-col gap-section @md:flex-row',
12
14
  categorySidebar: mergeClass('w-full shrink-0 @md:w-56 p-inset-compact flex flex-col gap-cluster', kitShellRecipe()),
13
15
  // 条目工作区是一张面板(单一面板:工具条区 + hairline + 集合共用一个面,面板持有内边距 p-card),与 StandardCrud 的列表卡同一结构
14
16
  itemWorkspace: mergeClass('flex min-w-0 flex-1 flex-col gap-region p-card', kitShellRecipe({ tone: 'base', shadow: false })),
@@ -24,8 +26,8 @@ export function categoryCrudHtml(
24
26
  areaClass: Record<string, string>,
25
27
  extra: string | undefined,
26
28
  ): string {
27
- const side = `<aside${cls(mergeClass(CATEGORY_CRUD_CLASS.categorySidebar, areaClass.categorySidebar))}>${parts.category}</aside>`;
28
- const main = `<section${cls(mergeClass(CATEGORY_CRUD_CLASS.itemWorkspace, areaClass.itemWorkspace))}>${parts.item}</section>`;
29
+ const side = `<aside data-kit-container="card"${cls(mergeClass(CATEGORY_CRUD_CLASS.categorySidebar, areaClass.categorySidebar))}>${parts.category}</aside>`;
30
+ const main = `<section data-kit-container="card"${cls(mergeClass(CATEGORY_CRUD_CLASS.itemWorkspace, areaClass.itemWorkspace))}>${parts.item}</section>`;
29
31
  const root = mergeClass(mergeClass(CATEGORY_CRUD_CLASS.root, areaClass.root), extra);
30
- return `<div data-soma-id="${esc(ids.root)}"${cls(root)}>\n${host('KitLinkHub', ids.hub)}${host('KitCrudBridge', ids.coord)}\n${side}\n${main}\n${parts.dialog}\n</div>`;
32
+ return `<div data-soma-id="${esc(ids.root)}"${cls(root)}>\n${host('KitLinkHub', ids.hub)}${host('KitCrudBridge', ids.coord)}\n<div${cls(CATEGORY_CRUD_CLASS.layout)}>\n${side}\n${main}\n</div>\n${parts.dialog}\n</div>`;
31
33
  }
@@ -10,7 +10,7 @@ import { emitObject } from '../../object-renderer/emit-object';
10
10
  import { savedNoticePipe } from '../../object-renderer/form-notify';
11
11
  import { viewAnchor } from '../../object-renderer/emit-static';
12
12
  import type { KitObject, KitViewForm } from '../../object-renderer/types';
13
- import type { KitFragment } from '../../compile/fragment';
13
+ import type { KitFragment } from '../../object-renderer/fragment';
14
14
  import type { KitBizContext, KitBizInput } from '../types';
15
15
  import { addEmit, classesIn, isRec, newParts, patchProps, type Rec } from '../link/shared';
16
16
  import {
@@ -1,8 +1,9 @@
1
1
  // CheckoutPage 的 HTML 代码壳:左信息表单卡 + 右订单摘要栏(明细 + 金额汇总)。只有结构与 Tailwind 类,分栏靠容器查询变体 `@md:`:
2
2
  // 窄容器下摘要在表单之后上下堆叠;达到 md 档左 7 / 右 5(共 12 份)。
3
3
 
4
- import { mergeClass } from '../../object-renderer/merge-class';
4
+ import { mergeClass } from '../../shared/merge-class';
5
5
  import { kitShellRecipe } from '../../recipes/container';
6
+ import { KIT_DIVIDER_FOOT_CLASS } from '../../recipes/divider';
6
7
  import { kitTypographyRecipe } from '../../recipes/typography';
7
8
  import { cls, esc } from '../link/shared';
8
9
 
@@ -18,7 +19,7 @@ export const CHECKOUT_PAGE_CLASS = {
18
19
  amounts: mergeClass('flex flex-col gap-region p-card', kitShellRecipe({ tone: 'sunken', shadow: false })),
19
20
  title: kitTypographyRecipe('sectionTitle'),
20
21
  /** 表单底部提交栏(表单 actions 区);动作组恒单行不折行(排布引擎动作组规则) */
21
- footer: 'mt-2 flex flex-nowrap items-end gap-cluster border-t border-border-subtle pt-4',
22
+ footer: `mt-2 flex flex-nowrap items-end gap-cluster ${KIT_DIVIDER_FOOT_CLASS} pt-4`,
22
23
  } as const;
23
24
 
24
25
  export function checkoutPageIds(pageId: string): { root: string } {
@@ -41,12 +42,12 @@ export function checkoutPageHtml(
41
42
  extra: string | undefined,
42
43
  ): string {
43
44
  const head = (t: string): string => (t === '' ? '' : `<h2${cls(CHECKOUT_PAGE_CLASS.title)}>${esc(t)}</h2>`);
44
- const form = `<section${cls(mergeClass(CHECKOUT_PAGE_CLASS.form, areaClass.form))}>${head(parts.formTitle)}${parts.form}</section>`;
45
- const items = `<section${cls(mergeClass(CHECKOUT_PAGE_CLASS.items, areaClass.items))}>${head(parts.itemsTitle)}${parts.items}</section>`;
45
+ const form = `<section data-kit-container="card"${cls(mergeClass(CHECKOUT_PAGE_CLASS.form, areaClass.form))}>${head(parts.formTitle)}${parts.form}</section>`;
46
+ const items = `<section data-kit-container="card"${cls(mergeClass(CHECKOUT_PAGE_CLASS.items, areaClass.items))}>${head(parts.itemsTitle)}${parts.items}</section>`;
46
47
  const amounts = parts.amounts === ''
47
48
  ? ''
48
- : `\n<section${cls(mergeClass(CHECKOUT_PAGE_CLASS.amounts, areaClass.amounts))}>${head(parts.amountsTitle)}${parts.amounts}</section>`;
49
- const summary = `<aside${cls(mergeClass(CHECKOUT_PAGE_CLASS.summary, areaClass.summary))}>\n${items}${amounts}\n</aside>`;
49
+ : `\n<section data-kit-container="card"${cls(mergeClass(CHECKOUT_PAGE_CLASS.amounts, areaClass.amounts))}>${head(parts.amountsTitle)}${parts.amounts}</section>`;
50
+ const summary = `<aside data-kit-container="card"${cls(mergeClass(CHECKOUT_PAGE_CLASS.summary, areaClass.summary))}>\n${items}${amounts}\n</aside>`;
50
51
  const root = mergeClass(mergeClass(CHECKOUT_PAGE_CLASS.root, areaClass.root), extra);
51
52
  return `<div data-soma-id="${esc(ids.root)}"${cls(root)}>\n${form}\n${summary}\n</div>`;
52
53
  }
@@ -5,13 +5,13 @@
5
5
  // 2. composeKitBizComponents:将多个业务组件按角色映射与独立子前缀(`${ctx.pageId}_${part}`)无冲突组合,
6
6
  // 经 mergeFragments 合并数据、区域切片与事件,并嵌入应用写死的异形网格或装饰外壳 HTML。
7
7
 
8
- import { emptyFragment, mergeFragments, type KitFragment } from '../compile/fragment';
9
- import { checkClasses, mergeClass } from '../object-renderer/merge-class';
8
+ import { emptyFragment, mergeFragments, type KitFragment } from '../object-renderer/fragment';
9
+ import { checkClasses, mergeClass } from '../shared/merge-class';
10
10
  import type { KitDiagnostic, KitObject } from '../object-renderer/types';
11
11
  import { defineKitBizComponent } from './define';
12
12
  import { validateBizAreaClass } from './shared/compile-helpers';
13
13
  import type { KitBizContext, KitBizDefinition, KitBizInput, KitBizRole } from './types';
14
- import { kitFail } from '../compile/kit-error';
14
+ import { kitFail } from '../shared/kit-error';
15
15
 
16
16
  export interface WrapBizShellContext {
17
17
  input: KitBizInput;
package/src/biz/define.ts CHANGED
@@ -2,7 +2,7 @@
2
2
  // 业务组件的 kind 必须是 PascalCase;roles 至少一个必填角色;areas 不得重名。
3
3
 
4
4
  import type { KitBizDefinition } from './types';
5
- import { kitFail } from '../compile/kit-error';
5
+ import { kitFail } from '../shared/kit-error';
6
6
 
7
7
  const KIND = /^[A-Z][A-Za-z0-9]*$/;
8
8
 
@@ -12,7 +12,7 @@
12
12
  import type { SomaScopeMirrorDecl } from 'soma-core';
13
13
  import { emitObject } from '../../object-renderer/emit-object';
14
14
  import type { KitFieldSchema, KitObject } from '../../object-renderer/types';
15
- import type { KitFragment } from '../../compile/fragment';
15
+ import type { KitFragment } from '../../object-renderer/fragment';
16
16
  import type { KitBizContext, KitBizInput } from '../types';
17
17
  import { kitText, type KitTextKey } from '../../i18n/kit-text';
18
18
  import { finishBizCompile, validateBizAreaClass } from '../shared/compile-helpers';
@@ -2,12 +2,14 @@
2
2
  // 只有结构与 Tailwind 类(语义色名 + utilityScales 里有的尺度),不写原生 CSS。
3
3
  // 显隐规则同 StepForm:面板 / 步骤条变体 / 按钮都是「外层只放 core 写的 hidden、内层放布局类」两层;各步组件一直挂着,只靠外层显隐切换。
4
4
 
5
- import { mergeClass } from '../../object-renderer/merge-class';
5
+ import { mergeClass } from '../../shared/merge-class';
6
6
  import { kitShellRecipe } from '../../recipes/container';
7
+ import { KIT_DIVIDER_FOOT_CLASS } from '../../recipes/divider';
8
+ import { KIT_PAGE_READ_WIDTH_CLASS } from '../../recipes/page-width';
7
9
  import { kitTypographyRecipe } from '../../recipes/typography';
8
10
  import { cls, esc, host } from '../link/shared';
9
11
  import { kitText } from '../../i18n/kit-text';
10
- import { kitIconHtml } from '../../base/icons';
12
+ import { kitIconHtml } from '../../shared/icons';
11
13
 
12
14
  /** 壳的内部区域名(`areaClass` 的合法键) */
13
15
  export const IMPORT_WIZARD_AREAS = ['root', 'card', 'steps', 'panel', 'preview', 'done'] as const;
@@ -20,7 +22,7 @@ export const IMPORT_WIZARD_STEP_TITLES = [
20
22
 
21
23
  export const IMPORT_WIZARD_CLASS = {
22
24
  root: '@container flex justify-center',
23
- card: mergeClass('flex w-full max-w-3xl flex-col gap-stack p-inset-roomy', kitShellRecipe()),
25
+ card: mergeClass(`flex w-full ${KIT_PAGE_READ_WIDTH_CLASS} flex-col gap-stack p-inset-roomy`, kitShellRecipe()),
24
26
  title: kitTypographyRecipe('sectionTitle'),
25
27
  steps: 'flex flex-wrap items-center gap-cluster',
26
28
  stepItem: 'flex items-center gap-cluster',
@@ -31,7 +33,7 @@ export const IMPORT_WIZARD_CLASS = {
31
33
  labelAt: 'text-sm font-semibold text-fg',
32
34
  labelPast: 'text-sm text-fg',
33
35
  labelFut: 'text-sm text-fg-muted',
34
- joint: 'w-6 border-t border-border-subtle',
36
+ joint: `w-6 ${KIT_DIVIDER_FOOT_CLASS}`,
35
37
  panel: 'flex flex-col gap-section',
36
38
  panelTitle: kitTypographyRecipe('sectionTitle'),
37
39
  hint: 'text-sm text-fg-muted',
package/src/biz/index.ts CHANGED
@@ -1,12 +1,12 @@
1
1
  // 业务组件登记表:内置闭集。编译器按 `product.kind` 查 KIT_BIZ_COMPONENTS。
2
- // 15 个内置业务组件闭集(StandardCrud / MasterSubWorkstation / CategoryCrud / MultiObjectBoard / SingleObjectForm / ApprovalDesk / RecordDetail / StepForm / NotificationCenter / AuthPanel / SettingsCenter / CheckoutPage / LandingPage / ResultPage / ImportWizard)+ KIT_PAGE_TEMPLATES 10 个可选页面模板。
2
+ // 16 个内置业务组件闭集(StandardCrud / MasterSubWorkstation / CategoryCrud / MultiObjectBoard / ReportBoard(报告阅读页:同看板构成、阅读版心)/ SingleObjectForm / ApprovalDesk / RecordDetail / StepForm / NotificationCenter / AuthPanel / SettingsCenter / CheckoutPage / LandingPage / ResultPage / ImportWizard)+ KIT_PAGE_TEMPLATES 10 个可选页面模板。
3
3
  // 业务组件壳依赖两个无界面协作数据组件:KitCrudBridge(focus 切片 owner:浮层开合、预填、保存后重取、删除)
4
4
  // 与 KitLinkHub(selection 切片 owner:主子 / 分类联动选中、默认首条、字段动作带当前行),登记在 KIT_BIZ_DATA_COMPONENTS,
5
5
  // 由应用装配并入数据组件表(与 createKitDataComponents 的产物合并,重名要显式 overrides)。
6
6
 
7
7
  import { CategoryCrud } from './category-crud';
8
8
  import { MasterSubWorkstation } from './master-sub';
9
- import { MultiObjectBoard } from './multi-board';
9
+ import { MultiObjectBoard, ReportBoard } from './multi-board';
10
10
  import { SingleObjectForm } from './single-form';
11
11
  import { StandardCrud } from './standard-crud';
12
12
  import { ApprovalDesk } from './approval-desk';
@@ -43,7 +43,7 @@ export * from './shared';
43
43
  export { StandardCrud, compileStandardCrud, CRUD_CLASS } from './standard-crud';
44
44
  export { MasterSubWorkstation, compileMasterSub, masterSubObjectName } from './master-sub';
45
45
  export { CategoryCrud, compileCategoryCrud, categoryObjectName } from './category-crud';
46
- export { MultiObjectBoard, compileMultiBoard, boardFilterName, boardPanelName } from './multi-board';
46
+ export { MultiObjectBoard, ReportBoard, compileMultiBoard, boardFilterName, boardPanelName } from './multi-board';
47
47
  export { SingleObjectForm, compileSingleForm, singleFormObjectName } from './single-form';
48
48
  export { createKitLinkHub, KIT_LINK_EVENTS, KIT_LINK_MIRRORS } from './link/hub';
49
49
  export { ApprovalDesk, compileApprovalDesk, approvalDeskObjectName } from './approval-desk';
@@ -93,6 +93,7 @@ export const KIT_BIZ_COMPONENTS: Record<string, KitBizDefinition> = {
93
93
  MasterSubWorkstation,
94
94
  CategoryCrud,
95
95
  MultiObjectBoard,
96
+ ReportBoard,
96
97
  SingleObjectForm,
97
98
  ApprovalDesk,
98
99
  RecordDetail,
@@ -7,7 +7,7 @@
7
7
  // 展示对象一律只读(不允许 behavior.actions / write);行动入口只来自写死形状组件自己抛的事件。
8
8
  // 与 RecordDetail / MultiObjectBoard 的区别:没有卡片边框与栅格,段落间留白堆叠,面向对外页面而不是工作台。
9
9
 
10
- import type { KitFragment } from '../../compile/fragment';
10
+ import type { KitFragment } from '../../object-renderer/fragment';
11
11
  import type { KitBizContext, KitBizInput } from '../types';
12
12
  import { IDENT, classesIn, isRec, newParts, type Rec } from '../link/shared';
13
13
  import {
@@ -1,8 +1,9 @@
1
1
  // LandingPage 的 HTML 代码壳:自上而下的纵向堆叠——主视觉 + 若干内容段(特性 / 定价 / 其它)+ 可选页脚。只有结构与 Tailwind 类。
2
2
  // 内容段是「居中标题 + 展示对象」,不带卡片边框(展示对象自己有表面,如 Hero / PricingTable)。
3
3
 
4
- import { mergeClass } from '../../object-renderer/merge-class';
4
+ import { mergeClass } from '../../shared/merge-class';
5
5
  import { cls, esc } from '../link/shared';
6
+ import { KIT_DIVIDER_FOOT_CLASS } from '../../recipes/divider';
6
7
 
7
8
  /** 壳的内部区域名(`areaClass` 的合法键) */
8
9
  export const LANDING_PAGE_AREAS = ['root', 'hero', 'sections', 'section', 'footer'] as const;
@@ -14,7 +15,7 @@ export const LANDING_PAGE_CLASS = {
14
15
  sections: 'flex flex-col gap-12',
15
16
  section: 'flex min-w-0 flex-col gap-stack',
16
17
  sectionTitle: 'text-center text-2xl font-semibold text-fg',
17
- footer: 'flex flex-col gap-cluster border-t border-border-subtle pt-6 text-sm text-fg-muted',
18
+ footer: `flex flex-col gap-cluster ${KIT_DIVIDER_FOOT_CLASS} pt-6 text-sm text-fg-muted`,
18
19
  } as const;
19
20
 
20
21
  export function landingPageIds(pageId: string): { root: string } {
@@ -32,10 +33,10 @@ export function landingPageHtml(
32
33
  areaClass: Record<string, string>,
33
34
  extra: string | undefined,
34
35
  ): string {
35
- const hero = `<section${cls(mergeClass(LANDING_PAGE_CLASS.hero, areaClass.hero))}>${parts.hero}</section>`;
36
+ const hero = `<section data-kit-container="card"${cls(mergeClass(LANDING_PAGE_CLASS.hero, areaClass.hero))}>${parts.hero}</section>`;
36
37
  const blocks = parts.sections.map((s) => {
37
38
  const title = s.title === '' ? '' : `<h2${cls(LANDING_PAGE_CLASS.sectionTitle)}>${esc(s.title)}</h2>`;
38
- return `<section${cls(mergeClass(LANDING_PAGE_CLASS.section, areaClass.section))}>${title}${s.html}</section>`;
39
+ return `<section data-kit-container="card"${cls(mergeClass(LANDING_PAGE_CLASS.section, areaClass.section))}>${title}${s.html}</section>`;
39
40
  });
40
41
  const sections = blocks.length === 0
41
42
  ? ''
@@ -280,6 +280,11 @@ export interface MemberArgs {
280
280
  * (载荷带当前行;浮层目标由协调组件按动作 id 反查);不给(没有浮层的 link 系组件)保持原样。
281
281
  */
282
282
  overlayTargets?: ReadonlySet<string>;
283
+ /**
284
+ * 详情头动作区(主从页):行动作不在列表条目里,而在这个页面直接实例(KitTableActions look: button,row = 选中行镜像)上;
285
+ * ids = 它 actions prop 里的动作 id 顺序(槽位序号 = 位置),事件照同一套路由写到它的锚点上。
286
+ */
287
+ headActions?: { anchor: string; ids: readonly string[] };
283
288
  }
284
289
 
285
290
  export interface MemberResult {
@@ -390,6 +395,7 @@ export function emitMember(out: Parts, a: MemberArgs): MemberResult {
390
395
  { anchor: ctxMenuAnchor(object), ids: slots.menu },
391
396
  { anchor: staticCtxAnchor(object, 'list'), ids: slots.staticMenus.list ?? [] },
392
397
  { anchor: staticCtxAnchor(object, 'summary'), ids: slots.staticMenus.summary ?? [] },
398
+ ...(a.headActions !== undefined ? [{ anchor: a.headActions.anchor, ids: a.headActions.ids, force: true }] : []),
393
399
  ],
394
400
  });
395
401
  }
@@ -491,7 +497,8 @@ export function cls(value: string): string {
491
497
  }
492
498
 
493
499
  /** 无界面协作宿主(只持有切片 / 事件的数据组件):不占版面,不然业务壳根的 flex gap 会给每个零高度宿主各多量出一份间距(页面标题到首块多出 16~32px) */
494
- const HEADLESS_HOSTS: ReadonlySet<string> = new Set(['KitLinkHub', 'KitCrudBridge']);
500
+ // KitBoardProse(看板说明收纳,无界面)漏在表外时,talent 看板 / 画像 / 周报的页头底到首块是 32 而不是 16(layout-accept L09,工具线第七段)
501
+ export const HEADLESS_HOSTS: ReadonlySet<string> = new Set(['KitLinkHub', 'KitCrudBridge', 'KitBoardProse']);
495
502
 
496
503
  export function host(component: string, id: string): string {
497
504
  const cls = HEADLESS_HOSTS.has(component) ? ' class="hidden"' : '';