soma-kit 0.1.14 → 0.1.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/package.json +8 -5
- package/packs/ai/model-card.ts +3 -3
- package/packs/finance/reconcile-desk/compile.ts +1 -1
- package/packs/finance/reconcile-desk/shell.ts +1 -1
- package/packs/ops/error-budget-card.ts +3 -3
- package/packs/ops/release-readiness-card.ts +3 -3
- package/packs/security/control-evidence-card.ts +3 -3
- package/packs/security/finding-card.ts +3 -2
- package/packs/shared/card-util.ts +17 -0
- package/spec/generated/kit-app.schema.json +2148 -338
- package/spec/generated/kit-page.schema.json +1152 -87
- package/spec/kit-grammar.json +1084 -136
- package/spec/kit-grammar.schema.json +167 -26
- package/src/app/app-config.ts +220 -187
- package/src/app/component-gate.ts +2 -2
- package/src/app/compose-apps.ts +5 -2
- package/src/app/define-kit-actions.ts +200 -22
- package/src/app/define-kit-app.ts +54 -8
- package/src/app/define-kit-view.ts +1 -1
- package/src/app/index.ts +12 -7
- package/src/app/kit-view-context.ts +50 -3
- package/src/app/list-page-defaults.ts +14 -0
- package/src/app/server-pages.ts +239 -7
- package/src/app/server.ts +466 -25
- package/src/app/theme-endpoint.ts +68 -24
- package/src/app/theme-runtime.ts +421 -87
- package/src/app/theme-shards.ts +69 -0
- package/src/app/tier-compat.ts +107 -0
- package/src/base/action-busy.ts +215 -38
- package/src/base/affix.ts +137 -0
- package/src/base/alert.ts +107 -59
- package/src/base/anchored-layer.ts +8 -7
- package/src/base/avatar.ts +147 -61
- package/src/base/badge.ts +186 -0
- package/src/base/button-group.ts +227 -0
- package/src/base/button.ts +365 -53
- package/src/base/card.ts +233 -0
- package/src/base/cascader.ts +147 -32
- package/src/base/check-core.ts +196 -33
- package/src/base/checkbox.ts +67 -2
- package/src/base/choice.ts +132 -31
- package/src/base/collapse.ts +249 -0
- package/src/base/color-picker.ts +404 -28
- package/src/base/combobox.ts +6 -2
- package/src/base/command-palette.ts +155 -37
- package/src/base/context-menu.ts +26 -6
- package/src/base/countdown.ts +37 -15
- package/src/base/date-range.ts +115 -94
- package/src/base/date.ts +487 -76
- package/src/base/delta.ts +20 -11
- package/src/base/divider.ts +64 -97
- package/src/base/end-edge.ts +10 -4
- package/src/base/fab.ts +64 -23
- package/src/base/gap-value.ts +35 -16
- package/src/base/hint-tips.ts +100 -30
- package/src/base/identity-cells.ts +839 -0
- package/src/base/illustrations.ts +6 -4
- package/src/base/image.ts +40 -19
- package/src/base/index.ts +92 -24
- package/src/base/inline-error.ts +90 -0
- package/src/base/input.ts +174 -38
- package/src/base/kbd.ts +31 -17
- package/src/base/kit-contract.ts +400 -0
- package/src/base/link.ts +41 -20
- package/src/base/listbox-core.ts +324 -95
- package/src/base/loading-gate.ts +3 -0
- package/src/base/look.ts +197 -0
- package/src/base/mentions.ts +58 -22
- package/src/base/menu-button.ts +129 -42
- package/src/base/menu-core.ts +210 -26
- package/src/base/month-grid.ts +60 -3
- package/src/base/motion/aura.ts +52 -10
- package/src/base/motion/hover-3d.ts +10 -5
- package/src/base/motion/hover-gallery.ts +19 -12
- package/src/base/motion/limits.ts +10 -0
- package/src/base/motion/marquee.ts +18 -11
- package/src/base/motion/text-rotate.ts +34 -16
- package/src/base/notification.ts +292 -0
- package/src/base/number.ts +93 -12
- package/src/base/otp.ts +143 -27
- package/src/base/overlay-runtime.ts +32 -24
- package/src/base/overlay-shell.ts +186 -0
- package/src/base/period-picker.ts +868 -0
- package/src/base/popover.ts +625 -74
- package/src/base/popup.ts +219 -78
- package/src/base/portal-core.ts +99 -2
- package/src/base/price-text.ts +51 -17
- package/src/base/progress.ts +100 -18
- package/src/base/qr-code.ts +64 -17
- package/src/base/qty-stepper.ts +145 -21
- package/src/base/radio.ts +43 -2
- package/src/base/range.ts +194 -39
- package/src/base/rating.ts +117 -31
- package/src/base/reason-tip.ts +60 -18
- package/src/base/relation-cells.ts +541 -0
- package/src/{frames → base}/resize-handle.ts +6 -4
- package/src/base/row-fresh.ts +84 -0
- package/src/base/section-spy.ts +79 -0
- package/src/base/segmented.ts +99 -56
- package/src/base/select.ts +8 -2
- package/src/base/shared.ts +520 -73
- package/src/base/spinner.ts +107 -0
- package/src/base/state-panel.ts +77 -22
- package/src/base/status-tone.ts +1 -1
- package/src/base/sticky-edge.ts +96 -29
- package/src/base/swap.ts +39 -21
- package/src/base/switch.ts +158 -38
- package/src/base/tabs.ts +292 -0
- package/src/base/tag-input.ts +129 -55
- package/src/base/tag.ts +203 -91
- package/src/base/text.ts +491 -77
- package/src/base/textarea.ts +89 -40
- package/src/base/time-picker.ts +341 -57
- package/src/base/time-range.ts +846 -0
- package/src/base/tree-select.ts +346 -89
- package/src/base/upload.ts +612 -158
- package/src/base/view-transition.ts +7 -3
- package/src/base/virtual-list.ts +49 -14
- package/src/biz/approval-desk/compile.ts +98 -6
- package/src/biz/approval-desk/index.ts +2 -0
- package/src/biz/approval-desk/shell.ts +53 -13
- package/src/biz/auth-panel/compile.ts +14 -4
- package/src/biz/auth-panel/shell.ts +28 -8
- package/src/biz/category-crud/compile.ts +64 -13
- package/src/biz/category-crud/index.ts +2 -0
- package/src/biz/category-crud/shell.ts +30 -8
- package/src/biz/checkout-page/compile.ts +38 -4
- package/src/biz/checkout-page/index.ts +1 -0
- package/src/biz/checkout-page/shell.ts +28 -10
- package/src/biz/compose.ts +9 -4
- package/src/biz/data-components.ts +2 -0
- package/src/biz/define.ts +1 -1
- package/src/biz/import-wizard/compile.ts +5 -2
- package/src/biz/import-wizard/index.ts +1 -0
- package/src/biz/import-wizard/shell.ts +36 -20
- package/src/biz/index.ts +5 -4
- package/src/biz/landing-page/compile.ts +4 -3
- package/src/biz/landing-page/shell.ts +25 -5
- package/src/biz/layout-contracts.ts +918 -0
- package/src/biz/link/hub.ts +199 -8
- package/src/biz/link/shared.ts +62 -16
- package/src/biz/master-sub/compile.ts +318 -38
- package/src/biz/master-sub/detail-head.ts +145 -21
- package/src/biz/master-sub/index.ts +6 -3
- package/src/biz/master-sub/shell.ts +232 -66
- package/src/biz/multi-board/compile.ts +89 -38
- package/src/biz/multi-board/composition.ts +7 -20
- package/src/biz/multi-board/index.ts +25 -9
- package/src/biz/multi-board/prose-fold.ts +17 -13
- package/src/biz/multi-board/shell.ts +153 -38
- package/src/biz/names.ts +1 -0
- package/src/biz/notification-center/compile.ts +28 -7
- package/src/biz/notification-center/index.ts +2 -0
- package/src/biz/notification-center/shell.ts +51 -11
- package/src/biz/page-templates/domain-templates.ts +147 -20
- package/src/biz/page-templates/result-page/compile.ts +5 -2
- package/src/biz/page-templates/result-page/index.ts +1 -0
- package/src/biz/page-templates/result-page/shell.ts +20 -6
- package/src/biz/page-templates/shared.ts +1 -1
- package/src/biz/page-templates/sign-in-page/compile.ts +20 -9
- package/src/biz/page-templates/sign-in-page/index.ts +1 -0
- package/src/biz/page-templates/sign-in-page/shell.ts +30 -14
- package/src/biz/record-detail/compile.ts +43 -12
- package/src/biz/record-detail/index.ts +1 -0
- package/src/biz/record-detail/shell.ts +42 -11
- package/src/biz/settings-center/compile.ts +5 -2
- package/src/biz/settings-center/index.ts +1 -0
- package/src/biz/settings-center/shell.ts +33 -9
- package/src/biz/shared/action-host.ts +146 -48
- package/src/biz/shared/compile-helpers.ts +134 -32
- package/src/biz/shared/coordinator.ts +727 -163
- package/src/biz/shared/focus-return.ts +180 -0
- package/src/biz/shared/object-aliases.ts +7 -1
- package/src/biz/shared/overlay-compile.ts +102 -24
- package/src/biz/shared/overlay-shell.ts +97 -116
- package/src/biz/shared/page-form-actions.ts +151 -0
- package/src/biz/shared/page-form.ts +255 -0
- package/src/biz/shared/pipeline.ts +74 -0
- package/src/biz/shared/runtime-hub.ts +101 -8
- package/src/biz/shared/verbs.ts +129 -0
- package/src/biz/single-form/compile.ts +6 -4
- package/src/biz/single-form/index.ts +2 -0
- package/src/biz/single-form/shell.ts +22 -8
- package/src/biz/standard-crud/compile.ts +213 -38
- package/src/biz/standard-crud/index.ts +2 -1
- package/src/biz/standard-crud/shell.ts +90 -13
- package/src/biz/standard-crud/summary.ts +2 -35
- package/src/biz/step-form/compile.ts +13 -4
- package/src/biz/step-form/hub.ts +168 -49
- package/src/biz/step-form/index.ts +1 -0
- package/src/biz/step-form/shell.ts +35 -17
- package/src/biz/types.ts +49 -6
- package/src/cli/app-layer-check.ts +375 -0
- package/src/cli/kit-cli.ts +179 -33
- package/src/cli/kit-init.ts +152 -3
- package/src/cli/migrate/theme-map.ts +35 -28
- package/src/cli/migrate/ts-rules.ts +2 -2
- package/src/cli/migrate/types.ts +3 -3
- package/src/cli/migrate/yaml-rules.ts +11 -9
- package/src/cli/view-writes.ts +13 -0
- package/src/compile/access-gate-attach.ts +1 -1
- package/src/compile/action-host-attach.ts +1 -1
- package/src/compile/closed-set.ts +102 -6
- package/src/compile/compile-page.ts +461 -273
- package/src/compile/component-candidates.ts +58 -5
- package/src/compile/danger-tier.ts +65 -0
- package/src/compile/hints.ts +6 -59
- package/src/compile/index.ts +2 -2
- package/src/compile/info-structure.ts +155 -0
- package/src/compile/layout-lint/index.ts +4 -1
- package/src/compile/layout-lint/rules-composition.ts +44 -13
- package/src/compile/layout-lint/rules-table.ts +4 -19
- package/src/compile/look-page.ts +551 -0
- package/src/compile/look.ts +376 -0
- package/src/compile/page-composition.ts +405 -67
- package/src/compile/page-hierarchy.ts +131 -0
- package/src/compile/page-pipeline-look.ts +156 -0
- package/src/compile/page-pipeline.ts +200 -0
- package/src/compile/parse.ts +12 -11
- package/src/compile/redirect.ts +1 -1
- package/src/compile/relation-render.ts +120 -0
- package/src/compile/remove-guard.ts +115 -41
- package/src/compile/stages.ts +786 -0
- package/src/compile/styles.ts +286 -48
- package/src/compile/types.ts +63 -6
- package/src/compile/view-check.ts +190 -1
- package/src/data/access-gate.ts +17 -9
- package/src/data/amount-breakdown.ts +52 -23
- package/src/data/anchor-nav.ts +77 -16
- package/src/data/approval-flow.ts +217 -126
- package/src/data/assignment-picker.ts +182 -94
- package/src/data/async-result-panel.ts +114 -46
- package/src/data/audit-log.ts +461 -0
- package/src/data/breadcrumbs.ts +150 -24
- package/src/data/calendar.ts +436 -97
- package/src/data/card-grid.ts +319 -0
- package/src/data/carousel.ts +81 -41
- package/src/data/cell-value.ts +253 -0
- package/src/data/chart.ts +1053 -96
- package/src/data/checklist.ts +82 -38
- package/src/data/code-view.ts +296 -44
- package/src/data/comment-thread.ts +611 -86
- package/src/data/compare-view.ts +227 -0
- package/src/data/confirm-dialog.ts +250 -39
- package/src/data/context-menu.ts +95 -21
- package/src/data/d9-limits.ts +2 -0
- package/src/data/d9-util.ts +13 -5
- package/src/data/diff.ts +109 -49
- package/src/data/display-util.ts +9 -4
- package/src/data/dock.ts +38 -18
- package/src/data/embed.ts +143 -8
- package/src/data/engine-ports.ts +135 -0
- package/src/data/field-mapper.ts +116 -54
- package/src/data/file-list.ts +522 -0
- package/src/data/flow-editor.ts +695 -158
- package/src/data/flow-node-options.ts +24 -5
- package/src/data/flow-remote-options.ts +94 -19
- package/src/data/footer.ts +88 -26
- package/src/data/form-draft-registry.ts +183 -12
- package/src/data/gantt.ts +640 -117
- package/src/data/graph-view.ts +51 -0
- package/src/data/heat-calendar.ts +412 -0
- package/src/data/hero.ts +40 -13
- package/src/data/image-viewer.ts +265 -62
- package/src/data/index.ts +75 -6
- package/src/data/item-list.ts +219 -58
- package/src/data/json-view.ts +909 -0
- package/src/data/kanban.ts +346 -91
- package/src/data/kit-contract.ts +230 -0
- package/src/data/leaderboard.ts +343 -0
- package/src/data/level-class.ts +21 -0
- package/src/data/log-stream.ts +347 -0
- package/src/data/markdown-view.ts +597 -0
- package/src/data/matrix.ts +234 -120
- package/src/data/media-grid.ts +165 -38
- package/src/data/mega-menu.ts +43 -26
- package/src/data/menu-bar.ts +254 -0
- package/src/data/menu-dom.ts +55 -19
- package/src/data/menu.ts +138 -48
- package/src/data/mockup.ts +37 -25
- package/src/data/modal-dialog.ts +126 -98
- package/src/data/navbar.ts +152 -66
- package/src/data/notice-list.ts +101 -49
- package/src/data/notify-renderer.ts +80 -15
- package/src/data/object-form.ts +1504 -164
- package/src/data/org-chart.ts +544 -0
- package/src/data/outcome-watch.ts +90 -21
- package/src/data/pager.ts +129 -45
- package/src/data/panel-head.ts +238 -76
- package/src/data/permission-matrix.ts +379 -120
- package/src/data/permission-tree.ts +146 -78
- package/src/data/pricing-table.ts +112 -43
- package/src/data/prompt-dialog.ts +49 -21
- package/src/data/reaction-bar.ts +67 -32
- package/src/data/record-card.ts +245 -72
- package/src/data/record-picker.ts +61 -28
- package/src/data/redirect.ts +39 -15
- package/src/data/request-console.ts +141 -38
- package/src/data/resident.ts +11 -13
- package/src/data/result-panel.ts +65 -27
- package/src/data/rich-text.ts +260 -127
- package/src/data/row-confirm.ts +47 -0
- package/src/data/row-editor.ts +384 -105
- package/src/data/rule-builder.ts +136 -81
- package/src/data/schedule-grid.ts +238 -0
- package/src/data/segment-bar.ts +221 -0
- package/src/data/shape-util.ts +90 -36
- package/src/data/stage-flow.ts +244 -0
- package/src/data/staged-rows.ts +207 -24
- package/src/data/stat-group.ts +493 -100
- package/src/data/static-lazy.ts +21 -0
- package/src/data/static-registry.ts +46 -4
- package/src/data/status-strip.ts +171 -0
- package/src/data/steps.ts +69 -36
- package/src/data/summary-strip.ts +136 -0
- package/src/data/summary-util.ts +116 -0
- package/src/data/survey.ts +134 -47
- package/src/data/system-switcher.ts +53 -24
- package/src/data/target-progress.ts +208 -0
- package/src/data/text-action-button.ts +28 -7
- package/src/data/text-diff.ts +731 -0
- package/src/data/tile-grid.ts +343 -0
- package/src/data/timeline.ts +205 -36
- package/src/data/tour-guide.ts +113 -47
- package/src/data/transfer.ts +204 -47
- package/src/data/tree-table.ts +228 -81
- package/src/data/tree.ts +193 -69
- package/src/data/trend-line.ts +68 -12
- package/src/data/virtual-rows.ts +248 -98
- package/src/data/waterfall.ts +171 -0
- package/src/data/watermark.ts +35 -6
- package/src/data/wrap.ts +28 -6
- package/src/frames/blank-frame.ts +6 -4
- package/src/frames/index.ts +4 -4
- package/src/frames/inherited-shell.ts +219 -0
- package/src/frames/page-bar.ts +208 -28
- package/src/frames/page-status.ts +3 -2
- package/src/frames/resident-components.ts +18 -0
- package/src/frames/shared.ts +73 -26
- package/src/frames/single-frame.ts +20 -4
- package/src/frames/split-frame/shell.ts +27 -17
- package/src/frames/split-frame/wiring.ts +16 -12
- package/src/frames/tabs-frame/shell.ts +14 -7
- package/src/frames/tabs-frame/wiring.ts +2 -1
- package/src/frames/top-main-frame.ts +55 -3
- package/src/frames/types.ts +5 -2
- package/src/frames/workspace-frame/extras.ts +23 -7
- package/src/frames/workspace-frame/index.ts +1 -1
- package/src/frames/workspace-frame/pipeline-key.ts +6 -0
- package/src/frames/workspace-frame/shell.ts +24 -3
- package/src/frames/workspace-frame/state.ts +42 -8
- package/src/frames/workspace-frame/view.ts +773 -194
- package/src/generated/kit-grammar-runtime.ts +1061 -77
- package/src/generated/kit-page.ts +272 -0
- package/src/i18n/index.ts +2 -0
- package/src/i18n/kit-text.ts +210 -5
- package/src/i18n/resolve-text-refs.ts +1 -1
- package/src/object-renderer/action-group.ts +204 -22
- package/src/object-renderer/action-more.ts +66 -19
- package/src/object-renderer/arrange.ts +270 -28
- package/src/object-renderer/category-tone.ts +96 -0
- package/src/object-renderer/collapse-wiring.ts +19 -9
- package/src/object-renderer/collection-expand.ts +3 -3
- package/src/object-renderer/collection-parts.ts +459 -103
- package/src/object-renderer/collection-table.ts +406 -59
- package/src/object-renderer/collection.ts +333 -71
- package/src/object-renderer/compile-data.ts +13 -3
- package/src/object-renderer/defaults.ts +14 -5
- package/src/object-renderer/emit-events.ts +46 -20
- package/src/object-renderer/emit-object.ts +35 -6
- package/src/object-renderer/emit-static.ts +831 -153
- package/src/object-renderer/field-value.ts +12 -239
- package/src/object-renderer/filter-plan.ts +3 -3
- package/src/object-renderer/filter-toolbar.ts +190 -0
- package/src/object-renderer/form-detail.ts +87 -2
- package/src/{compile → object-renderer}/fragment.ts +2 -2
- package/src/object-renderer/index.ts +1 -1
- package/src/object-renderer/key-field.ts +21 -0
- package/src/object-renderer/layout-facts.ts +55 -7
- package/src/object-renderer/layout-plan.ts +6 -3
- package/src/object-renderer/overlay-decide.ts +124 -0
- package/src/object-renderer/pick-component.ts +8 -2
- package/src/object-renderer/pipeline-mode.ts +6 -0
- package/src/object-renderer/relation-field.ts +79 -0
- package/src/object-renderer/render-object.ts +72 -27
- package/src/object-renderer/request-actions.ts +119 -21
- package/src/object-renderer/table-actions.ts +479 -111
- package/src/object-renderer/table-gap.ts +2 -1
- package/src/object-renderer/table-reorder.ts +237 -0
- package/src/object-renderer/table-summary.ts +26 -12
- package/src/object-renderer/table-tools.ts +437 -130
- package/src/object-renderer/types.ts +100 -17
- package/src/object-renderer/value-present.ts +49 -0
- package/src/page-target/ai-surface.ts +15 -22
- package/src/page-target/compile.ts +5 -6
- package/src/page-target/drift.ts +0 -7
- package/src/page-target/intent-schema.ts +46 -43
- package/src/page-target/target.ts +4 -5
- package/src/page-target/writer-policy.ts +4 -5
- package/src/recipes/app-blocks.ts +66 -0
- package/src/recipes/chrome-surface.ts +20 -0
- package/src/recipes/code-view.ts +57 -0
- package/src/recipes/color-role.ts +442 -0
- package/src/recipes/compact-group.ts +32 -0
- package/src/recipes/composition-projector.ts +321 -0
- package/src/recipes/container.ts +93 -26
- package/src/recipes/control.ts +85 -8
- package/src/recipes/desc-list.ts +108 -0
- package/src/recipes/divider.ts +74 -0
- package/src/recipes/emphasis.ts +102 -13
- package/src/recipes/field-text.ts +72 -0
- package/src/recipes/form-section.ts +177 -0
- package/src/recipes/frame-bleed.ts +6 -5
- package/src/recipes/index.ts +39 -5
- package/src/recipes/inherited-shell.ts +43 -0
- package/src/recipes/json-view.ts +50 -0
- package/src/recipes/look.ts +56 -0
- package/src/recipes/mark.ts +138 -0
- package/src/recipes/markdown.ts +96 -0
- package/src/recipes/overlay.ts +151 -37
- package/src/recipes/page-width.ts +51 -0
- package/src/recipes/pipeline-runtime.ts +366 -0
- package/src/recipes/placeholder.ts +38 -20
- package/src/recipes/rail-grid.ts +6 -3
- package/src/recipes/self-owned.ts +59 -0
- package/src/recipes/slot-align.ts +5 -3
- package/src/recipes/stat-state.ts +6 -6
- package/src/recipes/state.ts +64 -11
- package/src/recipes/status.ts +21 -20
- package/src/recipes/strip.ts +114 -0
- package/src/recipes/surface-edge.ts +3 -1
- package/src/recipes/surface.ts +40 -7
- package/src/recipes/table-gap.ts +4 -3
- package/src/recipes/table-native-edit.ts +25 -12
- package/src/recipes/table-row.ts +56 -20
- package/src/recipes/tabs.ts +140 -31
- package/src/recipes/text-diff.ts +97 -0
- package/src/recipes/text-fit.ts +132 -0
- package/src/recipes/title-row.ts +72 -5
- package/src/recipes/typography.ts +2 -2
- package/src/shared/action-func.ts +106 -0
- package/src/shared/color-scheme.ts +127 -0
- package/src/shared/confirm-decl.ts +5 -2
- package/src/shared/danger-facts.ts +55 -0
- package/src/shared/diagnostics.ts +16 -0
- package/src/shared/dom-attrs-registry.ts +1009 -0
- package/src/shared/dom-attrs.ts +743 -0
- package/src/shared/envelope.ts +1 -1
- package/src/shared/field-kind.ts +49 -0
- package/src/shared/field-value-format.ts +292 -0
- package/src/shared/focus-ring.ts +8 -0
- package/src/shared/glyphs.ts +127 -0
- package/src/shared/hints.ts +56 -0
- package/src/{base → shared}/icons.ts +40 -1
- package/src/shared/identifier-field.ts +66 -0
- package/src/shared/kit-error.ts +1 -1
- package/src/shared/list-pager.ts +23 -0
- package/src/shared/list-title.ts +29 -0
- package/src/{object-renderer → shared}/merge-class.ts +3 -2
- package/src/shared/order-value.ts +15 -0
- package/src/shared/page-attrs-runtime.ts +327 -0
- package/src/shared/page-attrs.ts +262 -0
- package/src/shared/path-guard.ts +1 -1
- package/src/shared/pipeline-mode.ts +64 -0
- package/src/shared/primitives-types.ts +8 -0
- package/src/shared/row-key.ts +15 -0
- package/src/shared/theme-runtime-shared.ts +181 -21
- package/src/shared/theme-usage.ts +16 -0
- package/src/shared/value-table-contract.ts +68 -0
- package/src/spatial/action-func.ts +4 -0
- package/src/spatial/declared-actions.ts +116 -0
- package/src/spatial/emit.ts +660 -0
- package/src/spatial/expand.ts +1482 -0
- package/src/spatial/field-types.ts +48 -0
- package/src/spatial/index.ts +82 -0
- package/src/spatial/layout.ts +697 -0
- package/src/spatial/look-apply.ts +206 -0
- package/src/spatial/page-decl.ts +44 -0
- package/src/spatial/page-object.ts +349 -0
- package/src/spatial/recognize.ts +491 -0
- package/src/spatial/self-report.ts +571 -0
- package/src/spatial/shape.ts +205 -0
- package/src/spatial/spatial-map.ts +136 -0
- package/src/spatial/tone.ts +145 -0
- package/src/theme/index.ts +11 -2
- package/src/theme/kit-theme-text.ts +1 -1
- package/src/theme/kit-theme.css +563 -28
- package/src/theme/kit-theme.tpl +527 -28
- package/src/theme/look-carrier.ts +65 -0
- package/src/theme/nine-dim-structure.ts +538 -176
- package/src/theme/private-vars.ts +153 -0
- package/src/theme/surface-layers.ts +12 -3
- package/src/theme/theme-tokens.ts +1602 -90
- package/src/theme/theme-types.ts +38 -59
- package/src/theme/value-table.ts +2379 -0
- package/src/app/envelope.ts +0 -1
- package/src/app/notify-renderer.ts +0 -1
- package/src/app/paged-list-adapter.ts +0 -1
- package/src/app/theme-runtime-shared.ts +0 -1
- package/src/compile/kit-error.ts +0 -1
- package/src/frames/list-summary.ts +0 -100
- package/src/recipes/nowrap.ts +0 -16
- package/src/theme/block-theme.ts +0 -202
- /package/src/{base → shared}/class-candidates.ts +0 -0
|
@@ -9,21 +9,32 @@
|
|
|
9
9
|
// 7. TraceDiagnosticDesk(调用链瀑布流与服务拓扑诊断台:roles topology? + traces + spans?)
|
|
10
10
|
// 8. TicketServiceDesk(全渠道工单客服与协同评论台:roles queue + ticket + comments?)
|
|
11
11
|
|
|
12
|
+
import { isNextPipeline, kitNeutralSpanClass } from "../shared/pipeline";
|
|
13
|
+
import { KIT_ARRANGE, arrangeComposition, arrangeTiers } from "soma-foundation/arrange";
|
|
14
|
+
import { KIT_DOMAIN_GRID, KIT_DOMAIN_TOPOLOGY, kitDomainCompositionInput, kitDomainItemOf, kitDomainRegions } from "../layout-contracts";
|
|
12
15
|
import { defineKitBizComponent } from "../define";
|
|
13
|
-
import type { KitBizContext, KitBizDefinition, KitBizInput, KitBizRole } from "../types";
|
|
14
|
-
import type { KitFragment } from "../../
|
|
15
|
-
import type { KitObject } from "../../object-renderer/types";
|
|
16
|
+
import type { KitBizContext, KitBizDefinition, KitBizEnvelopeTrait, KitBizInput, KitBizRole } from "../types";
|
|
17
|
+
import type { KitFragment } from "../../object-renderer/fragment";
|
|
18
|
+
import type { KitObject, KitViewForm } from "../../object-renderer/types";
|
|
16
19
|
import { filterAnchor } from "../../object-renderer/compile-data";
|
|
17
20
|
import { emitObject } from "../../object-renderer/emit-object";
|
|
18
21
|
import { dropSliceReload, registerSliceReload } from "../../object-renderer/filter-reload";
|
|
19
22
|
import { checkRoleAllowedViews } from "../shared/compile-helpers";
|
|
20
|
-
import { addEmit, classesIn, isRec, newParts, type Rec } from "../link/shared";
|
|
23
|
+
import { addEmit, classesIn, isRec, newParts, normalizeList, type Rec } from "../link/shared";
|
|
21
24
|
import { checkAreas, finishTemplate, templateObjectName } from "./shared";
|
|
25
|
+
import { projectComposition, type CompositionRegionItem } from "../../recipes/composition-projector";
|
|
26
|
+
import { mergeClass } from "../../shared/merge-class";
|
|
27
|
+
|
|
28
|
+
const DOMAIN_DESK_ENVELOPE: KitBizEnvelopeTrait = { surface: "board", horizontalPanes: 2 };
|
|
22
29
|
|
|
23
30
|
function cloneRec(raw: Rec): Rec {
|
|
24
31
|
return JSON.parse(JSON.stringify(raw)) as Rec;
|
|
25
32
|
}
|
|
26
33
|
|
|
34
|
+
/**
|
|
35
|
+
* 领域模板编译。构成拓扑(顶带 / 导航轨 / 主工作面 / 辅栏)取版式契约旁的 KIT_DOMAIN_TOPOLOGY,构件名推导、构成节点与投影参数取 biz/layout-contracts.ts
|
|
36
|
+
* 的同一组函数(kitDomainRegions / kitDomainCompositionInput / kitDomainItemOf / KIT_DOMAIN_GRID):页面线在 next 下按同一份输入求份数(SCON-151 构成同源)
|
|
37
|
+
*/
|
|
27
38
|
function compileDomainTemplate(
|
|
28
39
|
input: KitBizInput,
|
|
29
40
|
ctx: KitBizContext,
|
|
@@ -31,6 +42,7 @@ function compileDomainTemplate(
|
|
|
31
42
|
roleDefs: Record<string, KitBizRole>,
|
|
32
43
|
areas: readonly string[],
|
|
33
44
|
): KitFragment {
|
|
45
|
+
const topology = KIT_DOMAIN_TOPOLOGY[kind]!;
|
|
34
46
|
const out = newParts([]);
|
|
35
47
|
const fail = (code: string, message: string, path: string): void => {
|
|
36
48
|
out.diagnostics.push({ code, message, path });
|
|
@@ -62,7 +74,7 @@ function compileDomainTemplate(
|
|
|
62
74
|
if (out.diagnostics.length > 0) return finishTemplate(out, "");
|
|
63
75
|
|
|
64
76
|
const areaClass = input.areaClass ?? {};
|
|
65
|
-
const
|
|
77
|
+
const emittedSections = new Map<string, { objectName: string; html: string }>();
|
|
66
78
|
const filterParams: Record<string, string> = {};
|
|
67
79
|
const reloadableScopes: string[] = [];
|
|
68
80
|
let filterScope: string | undefined;
|
|
@@ -77,6 +89,11 @@ function compileDomainTemplate(
|
|
|
77
89
|
const scopeName = `${objectName}_scope`;
|
|
78
90
|
const behavior: Rec = isRec(raw.behavior) ? { ...raw.behavior } : {};
|
|
79
91
|
const view: Rec = isRec(raw.view) ? { ...raw.view } : {};
|
|
92
|
+
// 规整 list 槽里的书写面键(page / rowActions / contextMenu 并入 collection),与其它业务模板一致,避免行动作与分页配置静默丢失
|
|
93
|
+
if (isRec(view.list)) {
|
|
94
|
+
view.list = normalizeList(view.list as KitViewForm & Rec);
|
|
95
|
+
raw.view = view;
|
|
96
|
+
}
|
|
80
97
|
|
|
81
98
|
if (rName === "filter") {
|
|
82
99
|
if (view.filter === undefined) {
|
|
@@ -126,11 +143,7 @@ function compileDomainTemplate(
|
|
|
126
143
|
reloadableScopes.push(scopeName);
|
|
127
144
|
}
|
|
128
145
|
|
|
129
|
-
|
|
130
|
-
const sectionClass = customClass ? ` ${customClass}` : "";
|
|
131
|
-
sectionHtmls.push(
|
|
132
|
-
`<section class="p-card rounded-lg bg-surface border border-border-subtle${sectionClass}" data-soma-id="${objectName}__root">\n${emitRes.html}\n</section>`,
|
|
133
|
-
);
|
|
146
|
+
emittedSections.set(rName, { objectName, html: emitRes.html });
|
|
134
147
|
}
|
|
135
148
|
|
|
136
149
|
if (out.diagnostics.length > 0) return finishTemplate(out, "");
|
|
@@ -147,9 +160,107 @@ function compileDomainTemplate(
|
|
|
147
160
|
});
|
|
148
161
|
}
|
|
149
162
|
|
|
150
|
-
|
|
151
|
-
const
|
|
163
|
+
// 4. 调用 soma-foundation/arrange 通用构成引擎求解各角色强调级与角色语义,经统一 F5 投影器 projectComposition 投影为顶栏带 + 12 栏主次栅格
|
|
164
|
+
const tiers = arrangeTiers();
|
|
165
|
+
const wideTier = tiers.find((t) => t.name === KIT_ARRANGE.composition.span.wideTier) ?? tiers[tiers.length - 1]!;
|
|
166
|
+
// 区块(按拓扑次序:顶带、导航轨、主工作面、辅栏)与构成节点:与页面线同一个构造(biz/layout-contracts.ts),只列已发射的角色
|
|
167
|
+
const regions = kitDomainRegions(topology, roleCopies).filter((r) => emittedSections.has(r.name));
|
|
168
|
+
const comp = kitDomainCompositionInput(regions);
|
|
169
|
+
const compPlan = arrangeComposition({
|
|
170
|
+
nodes: comp.nodes,
|
|
171
|
+
frame: "single",
|
|
172
|
+
tier: wideTier,
|
|
173
|
+
...(comp.master !== undefined ? { relations: { master: comp.master } } : {}),
|
|
174
|
+
});
|
|
175
|
+
|
|
176
|
+
const regionItems: CompositionRegionItem[] = [];
|
|
177
|
+
for (const r of regions) {
|
|
178
|
+
const entry = emittedSections.get(r.name)!;
|
|
179
|
+
const item = kitDomainItemOf(r.part);
|
|
180
|
+
regionItems.push({
|
|
181
|
+
id: r.name,
|
|
182
|
+
html: entry.html,
|
|
183
|
+
anchorId: `${entry.objectName}__root`,
|
|
184
|
+
...(areaClass[r.name] !== undefined ? { areaClass: areaClass[r.name] } : {}),
|
|
185
|
+
...(item.slot !== undefined ? { slot: item.slot } : {}),
|
|
186
|
+
role: item.role,
|
|
187
|
+
});
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
const extraRootCls = mergeClass(areaClass.root ?? "", input.class);
|
|
191
|
+
const nextMode = isNextPipeline(ctx);
|
|
192
|
+
const projected = projectComposition({
|
|
193
|
+
plan: compPlan,
|
|
194
|
+
items: regionItems,
|
|
195
|
+
primaryId: topology.primary,
|
|
196
|
+
...(topology.navRail !== undefined ? { navRailId: topology.navRail } : {}),
|
|
197
|
+
breakpoint: "lg",
|
|
198
|
+
navRailSpan: KIT_DOMAIN_GRID.navRailSpan,
|
|
199
|
+
mainAsideSpans: KIT_DOMAIN_GRID.mainAsideSpans,
|
|
200
|
+
rootId: `${ctx.pageId}__${kind.toLowerCase()}_root`,
|
|
201
|
+
...(extraRootCls !== "" ? { rootClass: extraRootCls } : {}),
|
|
202
|
+
shellFlat: true,
|
|
203
|
+
cardTone: "base",
|
|
204
|
+
cardShadow: false,
|
|
205
|
+
// 新模式:区块只出中性结构容器(锚点沿用 <对象>__root,版式契约里的领域模板角色按这个拼法登记)
|
|
206
|
+
...(nextMode ? { next: { neutral: kitNeutralSpanClass } } : {}),
|
|
207
|
+
});
|
|
208
|
+
|
|
209
|
+
// PW-3 R1-P1-03:TicketServiceDesk 左侧工单队列含 4 列,在保持 @lg 4:8 版式契约的同时,
|
|
210
|
+
// 于宽容器(@4xl / 1024px+,含 1440/1920 桌面端)平滑升级为 5:7 配比,消除工单主题大面积截断与右侧过剩空白
|
|
211
|
+
let html = projected.html;
|
|
212
|
+
if (
|
|
213
|
+
kind === "TicketServiceDesk"
|
|
214
|
+
&& !nextMode
|
|
215
|
+
&& !/\bcol-span-/.test(areaClass.queue ?? "")
|
|
216
|
+
&& html.includes("@lg:col-span-4")
|
|
217
|
+
&& html.includes("@lg:col-span-8")
|
|
218
|
+
) {
|
|
219
|
+
html = html
|
|
220
|
+
.replace("@lg:col-span-4", "@lg:col-span-4 @4xl:col-span-5")
|
|
221
|
+
.replace("@lg:col-span-8", "@lg:col-span-8 @4xl:col-span-7");
|
|
222
|
+
} else if (
|
|
223
|
+
// BizAudit-4:JobQueueMonitor 在宽桌面容器(@4xl / 1024px+)下,queue 含 8 列 + 行动作(需 >896px 才完整展开操作列),
|
|
224
|
+
// logs 含长日志内容(4 栏下被压至 64px 截断为 1.5 字);保持 @lg 8:4 契约,于 @4xl 升级为双通栏 12+12 堆叠
|
|
225
|
+
kind === "JobQueueMonitor"
|
|
226
|
+
&& !nextMode
|
|
227
|
+
&& !/\bcol-span-/.test(areaClass.queue ?? "")
|
|
228
|
+
&& !/\bcol-span-/.test(areaClass.logs ?? "")
|
|
229
|
+
&& html.includes("@lg:col-span-8")
|
|
230
|
+
&& html.includes("@lg:col-span-4")
|
|
231
|
+
) {
|
|
232
|
+
html = html
|
|
233
|
+
.replace("@lg:col-span-8", "@lg:col-span-8 @4xl:col-span-12")
|
|
234
|
+
.replace("@lg:col-span-4", "@lg:col-span-4 @4xl:col-span-12");
|
|
235
|
+
} else if (
|
|
236
|
+
// BizAudit-4:RuleEngineDesk 左侧规则集仅 3 窄列而右侧规则列表含长触发条件,在保持 @lg 4:8 契约的同时,
|
|
237
|
+
// 于宽容器(@4xl)平滑升级为 3:9 配比,消除触发条件大面积截断
|
|
238
|
+
kind === "RuleEngineDesk"
|
|
239
|
+
&& !nextMode
|
|
240
|
+
&& !/\bcol-span-/.test(areaClass.catalog ?? "")
|
|
241
|
+
&& !/\bcol-span-/.test(areaClass.rules ?? "")
|
|
242
|
+
&& html.includes("@lg:col-span-4")
|
|
243
|
+
&& html.includes("@lg:col-span-8")
|
|
244
|
+
) {
|
|
245
|
+
html = html
|
|
246
|
+
.replace("@lg:col-span-4", "@lg:col-span-4 @4xl:col-span-3")
|
|
247
|
+
.replace("@lg:col-span-8", "@lg:col-span-8 @4xl:col-span-9");
|
|
248
|
+
} else if (
|
|
249
|
+
// BizAudit-4:KanbanBoardDesk 右侧指标摘要较窄而左侧多泳道看板需要横向呼吸空间,保持 @lg 8:4 契约,
|
|
250
|
+
// 于宽容器(@4xl)平滑升级为 9:3 配比,减少第 4 泳道腰斩并收紧指标栏留白
|
|
251
|
+
kind === "KanbanBoardDesk"
|
|
252
|
+
&& !nextMode
|
|
253
|
+
&& !/\bcol-span-/.test(areaClass.board ?? "")
|
|
254
|
+
&& !/\bcol-span-/.test(areaClass.summary ?? "")
|
|
255
|
+
&& html.includes("@lg:col-span-8")
|
|
256
|
+
&& html.includes("@lg:col-span-4")
|
|
257
|
+
) {
|
|
258
|
+
html = html
|
|
259
|
+
.replace("@lg:col-span-8", "@lg:col-span-8 @4xl:col-span-9")
|
|
260
|
+
.replace("@lg:col-span-4", "@lg:col-span-4 @4xl:col-span-3");
|
|
261
|
+
}
|
|
152
262
|
|
|
263
|
+
for (const c of projected.candidates) out.candidates.add(c);
|
|
153
264
|
for (const c of classesIn(html)) out.candidates.add(c);
|
|
154
265
|
return finishTemplate(out, html);
|
|
155
266
|
}
|
|
@@ -163,7 +274,9 @@ export const KanbanBoardDesk: KitBizDefinition = defineKitBizComponent({
|
|
|
163
274
|
summary: { required: false, views: ["summary", "list"] },
|
|
164
275
|
},
|
|
165
276
|
areas: ["root", "filter", "board", "summary"],
|
|
166
|
-
|
|
277
|
+
envelope: DOMAIN_DESK_ENVELOPE,
|
|
278
|
+
compile: (input, ctx) =>
|
|
279
|
+
compileDomainTemplate(input, ctx, "KanbanBoardDesk", KanbanBoardDesk.roles, KanbanBoardDesk.areas),
|
|
167
280
|
});
|
|
168
281
|
|
|
169
282
|
// 2. 里程碑甘特排期工作台
|
|
@@ -175,7 +288,9 @@ export const ScheduleGanttDesk: KitBizDefinition = defineKitBizComponent({
|
|
|
175
288
|
milestones: { required: false, views: ["list", "summary"] },
|
|
176
289
|
},
|
|
177
290
|
areas: ["root", "filter", "schedule", "milestones"],
|
|
178
|
-
|
|
291
|
+
envelope: DOMAIN_DESK_ENVELOPE,
|
|
292
|
+
compile: (input, ctx) =>
|
|
293
|
+
compileDomainTemplate(input, ctx, "ScheduleGanttDesk", ScheduleGanttDesk.roles, ScheduleGanttDesk.areas),
|
|
179
294
|
});
|
|
180
295
|
|
|
181
296
|
// 3. 异步任务队列与执行日志调度台
|
|
@@ -187,7 +302,9 @@ export const JobQueueMonitor: KitBizDefinition = defineKitBizComponent({
|
|
|
187
302
|
logs: { required: false, views: ["list", "summary"] },
|
|
188
303
|
},
|
|
189
304
|
areas: ["root", "metrics", "queue", "logs"],
|
|
190
|
-
|
|
305
|
+
envelope: DOMAIN_DESK_ENVELOPE,
|
|
306
|
+
compile: (input, ctx) =>
|
|
307
|
+
compileDomainTemplate(input, ctx, "JobQueueMonitor", JobQueueMonitor.roles, JobQueueMonitor.areas),
|
|
191
308
|
});
|
|
192
309
|
|
|
193
310
|
// 4. 批量编辑与重复记录合并去重台
|
|
@@ -199,7 +316,9 @@ export const BulkMergeDesk: KitBizDefinition = defineKitBizComponent({
|
|
|
199
316
|
target: { required: false, views: ["form", "summary"] },
|
|
200
317
|
},
|
|
201
318
|
areas: ["root", "candidates", "comparison", "target"],
|
|
202
|
-
|
|
319
|
+
envelope: DOMAIN_DESK_ENVELOPE,
|
|
320
|
+
compile: (input, ctx) =>
|
|
321
|
+
compileDomainTemplate(input, ctx, "BulkMergeDesk", BulkMergeDesk.roles, BulkMergeDesk.areas),
|
|
203
322
|
});
|
|
204
323
|
|
|
205
324
|
// 5. 可视化规则引擎与流程编排台
|
|
@@ -211,7 +330,9 @@ export const RuleEngineDesk: KitBizDefinition = defineKitBizComponent({
|
|
|
211
330
|
simulation: { required: false, views: ["form", "summary"] },
|
|
212
331
|
},
|
|
213
332
|
areas: ["root", "catalog", "rules", "simulation"],
|
|
214
|
-
|
|
333
|
+
envelope: DOMAIN_DESK_ENVELOPE,
|
|
334
|
+
compile: (input, ctx) =>
|
|
335
|
+
compileDomainTemplate(input, ctx, "RuleEngineDesk", RuleEngineDesk.roles, RuleEngineDesk.areas),
|
|
215
336
|
});
|
|
216
337
|
|
|
217
338
|
// 6. 排班轮值与资源容量看板
|
|
@@ -223,7 +344,9 @@ export const CapacityScheduleDesk: KitBizDefinition = defineKitBizComponent({
|
|
|
223
344
|
rotation: { required: false, views: ["list", "summary"] },
|
|
224
345
|
},
|
|
225
346
|
areas: ["root", "filter", "capacity", "rotation"],
|
|
226
|
-
|
|
347
|
+
envelope: DOMAIN_DESK_ENVELOPE,
|
|
348
|
+
compile: (input, ctx) =>
|
|
349
|
+
compileDomainTemplate(input, ctx, "CapacityScheduleDesk", CapacityScheduleDesk.roles, CapacityScheduleDesk.areas),
|
|
227
350
|
});
|
|
228
351
|
|
|
229
352
|
// 7. 调用链瀑布流与服务拓扑诊断台
|
|
@@ -235,7 +358,9 @@ export const TraceDiagnosticDesk: KitBizDefinition = defineKitBizComponent({
|
|
|
235
358
|
spans: { required: false, views: ["list", "summary"] },
|
|
236
359
|
},
|
|
237
360
|
areas: ["root", "topology", "traces", "spans"],
|
|
238
|
-
|
|
361
|
+
envelope: DOMAIN_DESK_ENVELOPE,
|
|
362
|
+
compile: (input, ctx) =>
|
|
363
|
+
compileDomainTemplate(input, ctx, "TraceDiagnosticDesk", TraceDiagnosticDesk.roles, TraceDiagnosticDesk.areas),
|
|
239
364
|
});
|
|
240
365
|
|
|
241
366
|
// 8. 全渠道工单客服与协同评论台
|
|
@@ -247,5 +372,7 @@ export const TicketServiceDesk: KitBizDefinition = defineKitBizComponent({
|
|
|
247
372
|
comments: { required: false, views: ["list", "summary"] },
|
|
248
373
|
},
|
|
249
374
|
areas: ["root", "queue", "ticket", "comments"],
|
|
250
|
-
|
|
375
|
+
envelope: DOMAIN_DESK_ENVELOPE,
|
|
376
|
+
compile: (input, ctx) =>
|
|
377
|
+
compileDomainTemplate(input, ctx, "TicketServiceDesk", TicketServiceDesk.roles, TicketServiceDesk.areas),
|
|
251
378
|
});
|
|
@@ -5,7 +5,8 @@
|
|
|
5
5
|
// detail 可选,只读展示对象,卡片下半的明细(错误详情 / 回执摘要,常用 summary)
|
|
6
6
|
// 状态码不由本模板判定:页面是 403 还是 404 由路由与服务端决定,模板只负责把它摆好看。
|
|
7
7
|
|
|
8
|
-
import
|
|
8
|
+
import { isNextPipeline } from '../../shared/pipeline';
|
|
9
|
+
import type { KitFragment } from '../../../object-renderer/fragment';
|
|
9
10
|
import type { KitBizContext, KitBizInput } from '../../types';
|
|
10
11
|
import { classesIn, isRec, newParts } from '../../link/shared';
|
|
11
12
|
import {
|
|
@@ -48,8 +49,10 @@ export function compileResultPage(input: KitBizInput, ctx: KitBizContext): KitFr
|
|
|
48
49
|
}
|
|
49
50
|
if (out.diagnostics.length > 0 || result === undefined) return finishTemplate(out, '');
|
|
50
51
|
|
|
51
|
-
const html = resultPageHtml(resultPageIds(ctx.pageId), { result: result.html, detail }, input.areaClass ?? {}, input.class);
|
|
52
|
+
const html = resultPageHtml(resultPageIds(ctx.pageId), { result: result.html, detail, ...(isNextPipeline(ctx) ? { next: { result: resultPageObjectName(ctx.pageId, 'result'), detail: resultPageObjectName(ctx.pageId, 'detail') } } : {}) }, input.areaClass ?? {}, input.class);
|
|
52
53
|
for (const c of classesIn(html)) out.candidates.add(c);
|
|
54
|
+
out.candidates.add('min-h-screen');
|
|
55
|
+
out.candidates.add('p-page');
|
|
53
56
|
addClassTokens(out, RESULT_PAGE_CLASS);
|
|
54
57
|
return finishTemplate(out, html);
|
|
55
58
|
}
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
// ResultPage 的 HTML 代码壳:整页居中承载一个结果面板(成功 / 失败 / 403 / 404 / 500 / 空),可选附一块明细。
|
|
2
2
|
// 只有结构与 Tailwind 类。放进 blank-frame 时垂直水平居中;放进 single-frame 时只是顶部居中的一张卡。
|
|
3
3
|
|
|
4
|
-
import {
|
|
4
|
+
import { kitNeutralClass, kitObjectAnchor } from '../../shared/pipeline';
|
|
5
|
+
import { mergeClass } from '../../../shared/merge-class';
|
|
6
|
+
import { KIT_ATTR_CONTAINER } from '../../../shared/dom-attrs';
|
|
5
7
|
import { kitShellRecipe } from '../../../recipes/container';
|
|
8
|
+
import { KIT_DIVIDER_FOOT_CLASS } from '../../../recipes/divider';
|
|
6
9
|
import { cls, esc } from '../../link/shared';
|
|
7
10
|
|
|
8
11
|
/** 壳的内部区域名(`areaClass` 的合法键) */
|
|
@@ -10,9 +13,11 @@ export const RESULT_PAGE_AREAS = ['root', 'card', 'detail'] as const;
|
|
|
10
13
|
export type ResultPageArea = (typeof RESULT_PAGE_AREAS)[number];
|
|
11
14
|
|
|
12
15
|
export const RESULT_PAGE_CLASS = {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
+
// 外层页面框已持 min-h-screen,旧版内层使用 min-h-full flex-1 避免单页恒定拉出多余滚动条;
|
|
17
|
+
// 结果卡收束在 max-w-lg(512px),避免落入无 frame__width 的 blank-frame 时在 1440px 桌面拉伸成全宽横条
|
|
18
|
+
root: '@container flex w-full min-w-0 min-h-full flex-1 items-center justify-center p-inset-roomy',
|
|
19
|
+
card: mergeClass('flex w-full max-w-lg flex-col', kitShellRecipe()),
|
|
20
|
+
detail: `${KIT_DIVIDER_FOOT_CLASS} p-inset-roomy`,
|
|
16
21
|
} as const;
|
|
17
22
|
|
|
18
23
|
export function resultPageIds(pageId: string): { root: string } {
|
|
@@ -21,12 +26,21 @@ export function resultPageIds(pageId: string): { root: string } {
|
|
|
21
26
|
|
|
22
27
|
export function resultPageHtml(
|
|
23
28
|
ids: ReturnType<typeof resultPageIds>,
|
|
24
|
-
parts: { result: string; detail: string },
|
|
29
|
+
parts: { result: string; detail: string; /** 新模式(主题流水线 next):结果与明细对象的运行期名;旧版不给 */ next?: { readonly result: string; readonly detail: string } },
|
|
25
30
|
areaClass: Record<string, string>,
|
|
26
31
|
extra: string | undefined,
|
|
27
32
|
): string {
|
|
33
|
+
if (parts.next !== undefined) {
|
|
34
|
+
// 新模式:结果面是结果对象的容器,明细节嵌在结果面里(契约:明细呈现为节、依附结果),两者都补对象锚点;不写容器形态与外观类。
|
|
35
|
+
// 同 SignInPage:next 下 blank-frame 内层以 min-h-screen + p-page 满屏垂直居中,且保留卡片 max-w-lg 均衡比例
|
|
36
|
+
const nx = parts.next;
|
|
37
|
+
const rootNext = mergeClass(kitNeutralClass(RESULT_PAGE_CLASS.root).replace(/\bmin-h-full\b/g, 'min-h-screen'), 'p-page');
|
|
38
|
+
const detailN = parts.detail === '' ? '' : `\n<div data-soma-id="${esc(kitObjectAnchor(nx.detail))}"${cls(kitNeutralClass(mergeClass(RESULT_PAGE_CLASS.detail, areaClass.detail)))}>${parts.detail}</div>`;
|
|
39
|
+
const cardN = `<section data-soma-id="${esc(kitObjectAnchor(nx.result))}"${cls(kitNeutralClass(mergeClass(RESULT_PAGE_CLASS.card, areaClass.card)))}>\n${parts.result}${detailN}\n</section>`;
|
|
40
|
+
return `<div data-soma-id="${esc(ids.root)}"${cls(mergeClass(mergeClass(rootNext, areaClass.root), extra))}>\n${cardN}\n</div>`;
|
|
41
|
+
}
|
|
28
42
|
const detail = parts.detail === '' ? '' : `\n<div${cls(mergeClass(RESULT_PAGE_CLASS.detail, areaClass.detail))}>${parts.detail}</div>`;
|
|
29
|
-
const card = `<section${cls(mergeClass(RESULT_PAGE_CLASS.card, areaClass.card))}>\n${parts.result}${detail}\n</section>`;
|
|
43
|
+
const card = `<section ${KIT_ATTR_CONTAINER}="card"${cls(mergeClass(RESULT_PAGE_CLASS.card, areaClass.card))}>\n${parts.result}${detail}\n</section>`;
|
|
30
44
|
const root = mergeClass(mergeClass(RESULT_PAGE_CLASS.root, areaClass.root), extra);
|
|
31
45
|
return `<div data-soma-id="${esc(ids.root)}"${cls(root)}>\n${card}\n</div>`;
|
|
32
46
|
}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
import { KIT_VIEW_FORM_KEYS, KIT_VIEW_SLOTS } from '../../object-renderer/defaults';
|
|
5
5
|
import { emitObject } from '../../object-renderer/emit-object';
|
|
6
6
|
import type { KitDiagnostic, KitObject } from '../../object-renderer/types';
|
|
7
|
-
import type { KitFragment } from '../../
|
|
7
|
+
import type { KitFragment } from '../../object-renderer/fragment';
|
|
8
8
|
import type { KitBizContext, KitBizInput, KitBizRole } from '../types';
|
|
9
9
|
import {
|
|
10
10
|
bizObjectName, checkRoleAllowedViews, finishBizCompile, validateBizAreaClass,
|
|
@@ -12,13 +12,15 @@
|
|
|
12
12
|
// links [{ label, href?, action?, align?: start|end }]:表单下方的链接(忘记密码 / 去注册);至少给 href 或 action 之一
|
|
13
13
|
// social { label?, items[{ key, label, action }] }:第三方登录按钮,action 必须是已登记的具名动作
|
|
14
14
|
|
|
15
|
+
import { isNextPipeline } from '../../shared/pipeline';
|
|
15
16
|
import { KIT_BIZ_COMPONENT_LIMITS } from 'soma-foundation/kit-limits';
|
|
16
17
|
import type { KitDiagnostic } from '../../../object-renderer/types';
|
|
17
|
-
import type { KitFragment } from '../../../
|
|
18
|
+
import type { KitFragment } from '../../../object-renderer/fragment';
|
|
18
19
|
import { safeHref } from '../../../base/link';
|
|
19
20
|
import { classesIn, isRec, IDENT, type Rec } from '../../link/shared';
|
|
20
21
|
import { wrapKitBizComponent } from '../../compose';
|
|
21
|
-
import { SingleObjectForm } from '../../single-form';
|
|
22
|
+
import { SingleObjectForm, singleFormObjectName } from '../../single-form';
|
|
23
|
+
import { viewAnchor } from '../../../object-renderer/emit-static';
|
|
22
24
|
import type { KitBizContext, KitBizDefinition, KitBizInput } from '../../types';
|
|
23
25
|
import {
|
|
24
26
|
SIGN_IN_CLASS, SIGN_IN_EXTRA_AREAS, SIGN_IN_LAYOUTS, signInHtml, signInIds,
|
|
@@ -76,7 +78,8 @@ export function parseSignInConfig(raw: unknown, registeredActions: ReadonlySet<s
|
|
|
76
78
|
if (raw.links.length > LIMITS.links) bad(`links 至多 ${LIMITS.links} 项`, 'product.config.links');
|
|
77
79
|
raw.links.slice(0, LIMITS.links).forEach((l, i) => {
|
|
78
80
|
const at = `product.config.links[${i}]`;
|
|
79
|
-
|
|
81
|
+
const label = isRec(l) ? text(l.label).trim() : '';
|
|
82
|
+
if (!isRec(l) || label === '') { bad('links 的每项需要 label', at); return; }
|
|
80
83
|
const href = text(l.href) === '' ? '' : safeHref(text(l.href));
|
|
81
84
|
const action = text(l.action);
|
|
82
85
|
if (text(l.href) !== '' && href === '') bad('href 不是允许的地址(只放行相对地址、锚点、http(s)、mailto、tel)', `${at}.href`);
|
|
@@ -84,7 +87,7 @@ export function parseSignInConfig(raw: unknown, registeredActions: ReadonlySet<s
|
|
|
84
87
|
if (action !== '' && !registeredActions.has(action)) bad(`action "${action}" 未在应用的具名动作中登记`, `${at}.action`, 'KIT-EVT-001');
|
|
85
88
|
const align = l.align === 'end' ? 'end' : 'start';
|
|
86
89
|
if (l.align !== undefined && l.align !== 'start' && l.align !== 'end') bad('align 只能是 start / end', `${at}.align`);
|
|
87
|
-
cfg.links.push({ label
|
|
90
|
+
cfg.links.push({ label, href, action, align });
|
|
88
91
|
});
|
|
89
92
|
}
|
|
90
93
|
}
|
|
@@ -99,14 +102,15 @@ export function parseSignInConfig(raw: unknown, registeredActions: ReadonlySet<s
|
|
|
99
102
|
const seen = new Set<string>();
|
|
100
103
|
items.slice(0, LIMITS.social).forEach((it, i) => {
|
|
101
104
|
const at = `product.config.social.items[${i}]`;
|
|
102
|
-
|
|
105
|
+
const label = isRec(it) ? text(it.label).trim() : '';
|
|
106
|
+
if (!isRec(it) || label === '' || !IDENT.test(text(it.key))) { bad('social 的每项需要标识符 key 与 label', at); return; }
|
|
103
107
|
const key = text(it.key);
|
|
104
108
|
if (seen.has(key)) bad(`key "${key}" 重复`, `${at}.key`);
|
|
105
109
|
seen.add(key);
|
|
106
110
|
const action = text(it.action);
|
|
107
111
|
if (action === '') bad('social 的每项需要 action(具名动作,由应用处理授权跳转)', `${at}.action`);
|
|
108
112
|
else if (!registeredActions.has(action)) bad(`action "${action}" 未在应用的具名动作中登记`, `${at}.action`, 'KIT-EVT-001');
|
|
109
|
-
cfg.social.push({ key, label
|
|
113
|
+
cfg.social.push({ key, label, action });
|
|
110
114
|
});
|
|
111
115
|
}
|
|
112
116
|
}
|
|
@@ -115,7 +119,7 @@ export function parseSignInConfig(raw: unknown, registeredActions: ReadonlySet<s
|
|
|
115
119
|
}
|
|
116
120
|
|
|
117
121
|
function candidatesOf(): string[] {
|
|
118
|
-
const out = new Set<string>();
|
|
122
|
+
const out = new Set<string>(['min-h-screen']);
|
|
119
123
|
for (const c of Object.values(SIGN_IN_CLASS)) for (const t of c.split(/\s+/)) if (t !== '') out.add(t);
|
|
120
124
|
return [...out];
|
|
121
125
|
}
|
|
@@ -139,7 +143,7 @@ const wrapped: KitBizDefinition = wrapKitBizComponent(SingleObjectForm, {
|
|
|
139
143
|
: { label: cfg.socialLabel, ids: cfg.social.map((_, i) => ids.social(i)) };
|
|
140
144
|
const areaClass: Record<string, string> = {};
|
|
141
145
|
for (const area of SIGN_IN_EXTRA_AREAS) areaClass[area] = shell.input.areaClass?.[area] ?? '';
|
|
142
|
-
return signInHtml(innerHtml, { layout: cfg.layout, brand: cfg.brand, links, social }, areaClass);
|
|
146
|
+
return signInHtml(innerHtml, { layout: cfg.layout, brand: cfg.brand, links, social, ...(isNextPipeline(shell.bizCtx) ? { next: true } : {}) }, areaClass);
|
|
143
147
|
},
|
|
144
148
|
});
|
|
145
149
|
|
|
@@ -148,11 +152,18 @@ function attachActions(frag: KitFragment, input: KitBizInput, ctx: KitBizContext
|
|
|
148
152
|
const cfg = parseSignInConfig(input.config, ctx.registeredActions, []);
|
|
149
153
|
const ids = signInIds(ctx.pageId);
|
|
150
154
|
const show: Rec = { ...(frag.ui.show ?? {}) };
|
|
155
|
+
// 登录 / 注册 / 找回表单不需要「重置」按钮:关闭内层 SingleObjectForm 默认注入的 resetLabel,保持主 CTA 聚焦
|
|
156
|
+
const formId = viewAnchor(singleFormObjectName(ctx.pageId), 'form');
|
|
157
|
+
const formEntry = show[formId];
|
|
158
|
+
if (isRec(formEntry) && isRec(formEntry.props)) {
|
|
159
|
+
show[formId] = { ...formEntry, props: { ...formEntry.props, resetLabel: '' } };
|
|
160
|
+
}
|
|
151
161
|
const events: Rec = { ...frag.events };
|
|
152
162
|
const components = new Set(frag.components);
|
|
153
163
|
cfg.links.forEach((l, i) => {
|
|
154
164
|
const id = ids.link(i);
|
|
155
|
-
|
|
165
|
+
// hover 下划线:既保留交互提示,也避免中文全角问号(如「忘记密码?」)右侧字形留白被常驻下划线拖出多余尾巴
|
|
166
|
+
show[id] = { props: { label: l.label, underline: 'hover', ...(l.href !== '' ? { href: l.href } : {}) } };
|
|
156
167
|
if (l.action !== '') events[`${id}.click`] = `ACTION | ${l.action}`;
|
|
157
168
|
components.add('Link');
|
|
158
169
|
});
|
|
@@ -5,9 +5,13 @@
|
|
|
5
5
|
// split 左品牌右表单:窄容器上下堆叠,够宽时左右各半;左栏是品牌区(名称 / 标语 / 要点),右栏同 center 的表单列
|
|
6
6
|
// 表单卡就是内层 SingleObjectForm 的产物;本壳只负责它周围的内容。链接与第三方按钮是 Link / Button 实例,只抛 click 事件。
|
|
7
7
|
|
|
8
|
-
import {
|
|
8
|
+
import { kitNeutralClass } from '../../shared/pipeline';
|
|
9
|
+
import { KIT_ATTR_CONTAINER } from '../../../shared/dom-attrs';
|
|
10
|
+
import { kitSelfAttrs } from '../../../shared/page-attrs-runtime';
|
|
11
|
+
import { mergeClass } from '../../../shared/merge-class';
|
|
9
12
|
import { cls, esc, host } from '../../link/shared';
|
|
10
|
-
import { kitIconHtml } from '../../../
|
|
13
|
+
import { kitIconHtml } from '../../../shared/icons';
|
|
14
|
+
import { KIT_CANVAS_CLASS } from '../../../recipes/chrome-surface';
|
|
11
15
|
|
|
12
16
|
export const SIGN_IN_LAYOUTS = ['center', 'split'] as const;
|
|
13
17
|
export type SignInLayout = (typeof SIGN_IN_LAYOUTS)[number];
|
|
@@ -16,28 +20,30 @@ export type SignInLayout = (typeof SIGN_IN_LAYOUTS)[number];
|
|
|
16
20
|
export const SIGN_IN_EXTRA_AREAS = ['page', 'aside', 'brand', 'column', 'links', 'social'] as const;
|
|
17
21
|
|
|
18
22
|
export const SIGN_IN_CLASS = {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
23
|
+
// 整页底 = 画布:只引层级角色出口 recipes/chrome-surface(§3.9 KT-HB-F)
|
|
24
|
+
// 外层页面框(single-frame / blank-frame)已携带 min-h-screen,内层不再叠第二层 100vh,避免在 single-frame 中恒定拉出多余滚动条
|
|
25
|
+
pageCenter: `flex min-h-full flex-1 w-full items-center justify-center ${KIT_CANVAS_CLASS} p-inset-roomy`,
|
|
26
|
+
pageSplitHost: '@container flex min-h-full flex-1 w-full',
|
|
27
|
+
pageSplit: `grid min-h-full flex-1 w-full grid-cols-1 ${KIT_CANVAS_CLASS} @2xl:grid-cols-2`,
|
|
22
28
|
column: 'flex w-full max-w-md flex-col gap-stack',
|
|
23
29
|
columnSplit: 'flex w-full items-center justify-center p-inset-roomy @2xl:p-12',
|
|
24
30
|
columnInner: 'flex w-full max-w-md flex-col gap-stack',
|
|
25
31
|
brand: 'flex flex-col items-center gap-cluster text-center',
|
|
26
|
-
brandLogo: 'h-10 w-10 rounded-
|
|
32
|
+
brandLogo: 'h-10 w-10 rounded-item object-contain',
|
|
27
33
|
brandName: 'text-display text-fg',
|
|
28
34
|
brandTagline: 'text-sm text-fg-muted',
|
|
29
|
-
aside: 'flex flex-col justify-center gap-stack bg-
|
|
35
|
+
aside: 'flex flex-col justify-center gap-stack bg-state-layer-selected p-8 text-fg @2xl:p-12',
|
|
30
36
|
asideName: 'text-display',
|
|
31
37
|
asideTagline: 'text-base opacity-80',
|
|
32
38
|
asidePoints: 'flex flex-col gap-cluster text-sm',
|
|
33
39
|
asidePoint: 'flex items-start gap-cluster',
|
|
34
|
-
card: 'max-w-md',
|
|
40
|
+
card: 'max-w-md overflow-hidden',
|
|
35
41
|
links: 'flex flex-wrap items-center justify-between gap-cluster text-sm',
|
|
36
42
|
linksEnd: 'flex flex-wrap items-center justify-end gap-cluster text-sm',
|
|
37
43
|
socialWrap: 'flex flex-col gap-region',
|
|
38
44
|
socialLabel: 'flex items-center gap-region text-xs text-fg-subtle',
|
|
39
45
|
socialRule: 'h-px flex-1 bg-border-subtle',
|
|
40
|
-
socialList: 'flex flex-col gap-
|
|
46
|
+
socialList: 'flex flex-col gap-region',
|
|
41
47
|
} as const;
|
|
42
48
|
|
|
43
49
|
export interface SignInBrand {
|
|
@@ -72,13 +78,15 @@ function brandHtml(brand: SignInBrand, areaClass: Record<string, string>): strin
|
|
|
72
78
|
return `<div${cls(mergeClass(SIGN_IN_CLASS.brand, areaClass.brand))}>${logo}${name}${tagline}</div>`;
|
|
73
79
|
}
|
|
74
80
|
|
|
75
|
-
function asideHtml(brand: SignInBrand, areaClass: Record<string, string
|
|
81
|
+
function asideHtml(brand: SignInBrand, areaClass: Record<string, string>, next = false): string {
|
|
76
82
|
const name = brand.name === '' ? '' : `<p${cls(SIGN_IN_CLASS.asideName)}>${esc(brand.name)}</p>`;
|
|
77
83
|
const tagline = brand.tagline === '' ? '' : `<p${cls(SIGN_IN_CLASS.asideTagline)}>${esc(brand.tagline)}</p>`;
|
|
78
84
|
const points = brand.points.length === 0
|
|
79
85
|
? ''
|
|
80
86
|
: `<ul${cls(SIGN_IN_CLASS.asidePoints)}>${brand.points.map((p) => `<li${cls(SIGN_IN_CLASS.asidePoint)}><span aria-hidden="true">${kitIconHtml('check', 'sm')}</span><span>${esc(p)}</span></li>`).join('')}</ul>`;
|
|
81
|
-
|
|
87
|
+
// 品牌栏是通栏分栏装饰(不是卡片容器,显式声明 data-kit-container="none" 守 D-08 且防视口贴边出现圆角缺口;采用暗色自适应主色柔底 + 主文字墨色,亮暗双态均守住高对比且暗色无刺眼强蓝)
|
|
88
|
+
if (next) return `<aside${kitSelfAttrs({ level: 'segment' })}${cls(kitNeutralClass(mergeClass(SIGN_IN_CLASS.aside, areaClass.aside), 'segment'))}>${name}${tagline}${points}</aside>`;
|
|
89
|
+
return `<aside ${KIT_ATTR_CONTAINER}="none"${cls(mergeClass(SIGN_IN_CLASS.aside, areaClass.aside))}>${name}${tagline}${points}</aside>`;
|
|
82
90
|
}
|
|
83
91
|
|
|
84
92
|
function linksHtml(items: readonly SignInLinkItem[], areaClass: Record<string, string>): string {
|
|
@@ -102,15 +110,23 @@ function socialHtml(block: SignInSocialBlock | undefined, areaClass: Record<stri
|
|
|
102
110
|
|
|
103
111
|
export function signInHtml(
|
|
104
112
|
formHtml: string,
|
|
105
|
-
parts: { layout: SignInLayout; brand: SignInBrand; links: readonly SignInLinkItem[]; social: SignInSocialBlock | undefined },
|
|
113
|
+
parts: { layout: SignInLayout; brand: SignInBrand; links: readonly SignInLinkItem[]; social: SignInSocialBlock | undefined; /** 新模式(主题流水线 next);旧版不给 */ next?: boolean },
|
|
106
114
|
areaClass: Record<string, string>,
|
|
107
115
|
): string {
|
|
108
116
|
const links = linksHtml(parts.links, areaClass);
|
|
109
117
|
const social = socialHtml(parts.social, areaClass);
|
|
118
|
+
const next = parts.next === true;
|
|
119
|
+
// 新模式(next):外层页面框(blank-frame)画布由取值表赋予全高画布底色并标 data-kit-bleed;
|
|
120
|
+
// 内层剥除无层 bg-surface-sunken(避免叠出深浅两层框)并以 min-h-screen 铺满整屏居中(消灭底部 250px 空带);旧版保持 min-h-full 逐字节不变
|
|
121
|
+
const fullScreenNext = (c: string): string => kitNeutralClass(c).replace(/\bmin-h-full\b/g, 'min-h-screen');
|
|
110
122
|
if (parts.layout === 'split') {
|
|
111
123
|
const column = `<div${cls(mergeClass(SIGN_IN_CLASS.columnSplit, areaClass.page))}><div${cls(mergeClass(SIGN_IN_CLASS.columnInner, areaClass.column))}>\n${formHtml}\n${links}${social}</div></div>`;
|
|
112
|
-
|
|
124
|
+
const hostCls = next ? fullScreenNext(SIGN_IN_CLASS.pageSplitHost) : SIGN_IN_CLASS.pageSplitHost;
|
|
125
|
+
const splitCls = next ? fullScreenNext(SIGN_IN_CLASS.pageSplit) : SIGN_IN_CLASS.pageSplit;
|
|
126
|
+
return `<div${cls(hostCls)}><div${cls(splitCls)}>\n${next ? asideHtml(parts.brand, areaClass, true) : asideHtml(parts.brand, areaClass)}\n${column}\n</div></div>`;
|
|
113
127
|
}
|
|
114
128
|
const col = `<div${cls(mergeClass(SIGN_IN_CLASS.column, areaClass.column))}>\n${brandHtml(parts.brand, areaClass)}\n${formHtml}\n${links}${social}</div>`;
|
|
115
|
-
|
|
129
|
+
// 保留页边距角色类 p-page(kitNeutralClass 会剥除 p-inset-roomy),避免 390px 移动端登录卡与社交按钮紧贴屏幕左右边缘
|
|
130
|
+
const centerBase = next ? mergeClass(fullScreenNext(SIGN_IN_CLASS.pageCenter), 'p-page') : SIGN_IN_CLASS.pageCenter;
|
|
131
|
+
return `<div${cls(mergeClass(centerBase, areaClass.page))}>\n${col}\n</div>`;
|
|
116
132
|
}
|