soma-kit 0.1.15 → 0.1.17
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/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 -340
- package/spec/generated/kit-page.schema.json +1134 -139
- package/spec/kit-grammar.json +935 -93
- package/spec/kit-grammar.schema.json +167 -2
- package/src/app/app-config.ts +219 -186
- package/src/app/define-kit-actions.ts +126 -20
- package/src/app/define-kit-app.ts +49 -4
- package/src/app/index.ts +5 -0
- package/src/app/kit-view-context.ts +39 -1
- 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 +67 -23
- package/src/app/theme-runtime.ts +414 -85
- 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 +104 -59
- package/src/base/anchored-layer.ts +7 -6
- 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 +347 -50
- package/src/base/card.ts +233 -0
- package/src/base/cascader.ts +143 -32
- package/src/base/check-core.ts +193 -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 +399 -27
- package/src/base/combobox.ts +6 -2
- package/src/base/command-palette.ts +148 -36
- package/src/base/context-menu.ts +23 -6
- package/src/base/countdown.ts +37 -15
- package/src/base/date-range.ts +114 -96
- package/src/base/date.ts +481 -74
- package/src/base/delta.ts +16 -9
- package/src/base/divider.ts +51 -33
- package/src/base/end-edge.ts +10 -4
- package/src/base/fab.ts +57 -21
- package/src/base/gap-value.ts +34 -15
- package/src/base/hint-tips.ts +99 -29
- 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 +79 -22
- package/src/base/inline-error.ts +13 -7
- package/src/base/input.ts +135 -35
- package/src/base/kbd.ts +30 -17
- package/src/base/kit-contract.ts +400 -0
- package/src/base/link.ts +41 -20
- package/src/base/listbox-core.ts +282 -101
- package/src/base/loading-gate.ts +3 -0
- package/src/base/look.ts +197 -0
- package/src/base/mentions.ts +55 -22
- package/src/base/menu-button.ts +73 -22
- package/src/base/menu-core.ts +201 -24
- package/src/base/month-grid.ts +60 -3
- package/src/base/motion/aura.ts +52 -10
- package/src/base/motion/hover-3d.ts +7 -5
- package/src/base/motion/hover-gallery.ts +16 -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 +139 -27
- package/src/base/overlay-runtime.ts +30 -23
- package/src/base/overlay-shell.ts +59 -14
- package/src/base/period-picker.ts +868 -0
- package/src/base/popover.ts +624 -73
- package/src/base/popup.ts +187 -52
- 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 +141 -22
- 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 +58 -16
- package/src/base/relation-cells.ts +541 -0
- package/src/base/resize-handle.ts +5 -3
- package/src/base/row-fresh.ts +84 -0
- package/src/base/section-spy.ts +79 -0
- package/src/base/segmented.ts +70 -26
- package/src/base/select.ts +8 -3
- package/src/base/shared.ts +482 -71
- package/src/base/spinner.ts +107 -0
- package/src/base/state-panel.ts +77 -22
- 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 +123 -54
- package/src/base/tag.ts +184 -66
- package/src/base/text.ts +461 -71
- package/src/base/textarea.ts +88 -39
- package/src/base/time-picker.ts +335 -55
- package/src/base/time-range.ts +846 -0
- package/src/base/tree-select.ts +342 -88
- package/src/base/upload.ts +604 -158
- package/src/base/view-transition.ts +7 -3
- package/src/base/virtual-list.ts +49 -14
- package/src/biz/approval-desk/compile.ts +70 -5
- package/src/biz/approval-desk/index.ts +2 -0
- package/src/biz/approval-desk/shell.ts +52 -12
- package/src/biz/auth-panel/compile.ts +13 -3
- package/src/biz/auth-panel/shell.ts +27 -7
- package/src/biz/category-crud/compile.ts +51 -13
- package/src/biz/category-crud/index.ts +2 -0
- package/src/biz/category-crud/shell.ts +29 -9
- package/src/biz/checkout-page/compile.ts +37 -3
- package/src/biz/checkout-page/index.ts +1 -0
- package/src/biz/checkout-page/shell.ts +26 -9
- package/src/biz/compose.ts +6 -1
- package/src/biz/data-components.ts +2 -0
- package/src/biz/import-wizard/compile.ts +4 -1
- package/src/biz/import-wizard/index.ts +1 -0
- package/src/biz/import-wizard/shell.ts +32 -18
- package/src/biz/index.ts +1 -1
- package/src/biz/landing-page/compile.ts +3 -2
- package/src/biz/landing-page/shell.ts +22 -3
- package/src/biz/layout-contracts.ts +918 -0
- package/src/biz/link/hub.ts +199 -8
- package/src/biz/link/shared.ts +54 -15
- package/src/biz/master-sub/compile.ts +194 -57
- package/src/biz/master-sub/detail-head.ts +141 -18
- package/src/biz/master-sub/index.ts +3 -0
- package/src/biz/master-sub/shell.ts +188 -62
- package/src/biz/multi-board/compile.ts +87 -36
- package/src/biz/multi-board/composition.ts +7 -20
- package/src/biz/multi-board/index.ts +3 -2
- package/src/biz/multi-board/prose-fold.ts +15 -11
- package/src/biz/multi-board/shell.ts +148 -37
- package/src/biz/notification-center/compile.ts +20 -6
- package/src/biz/notification-center/index.ts +2 -0
- package/src/biz/notification-center/shell.ts +43 -10
- package/src/biz/page-templates/domain-templates.ts +145 -22
- package/src/biz/page-templates/result-page/compile.ts +4 -1
- package/src/biz/page-templates/result-page/index.ts +1 -0
- package/src/biz/page-templates/result-page/shell.ts +17 -4
- package/src/biz/page-templates/sign-in-page/compile.ts +19 -8
- package/src/biz/page-templates/sign-in-page/index.ts +1 -0
- package/src/biz/page-templates/sign-in-page/shell.ts +28 -12
- package/src/biz/record-detail/compile.ts +39 -11
- package/src/biz/record-detail/index.ts +1 -0
- package/src/biz/record-detail/shell.ts +41 -10
- package/src/biz/settings-center/compile.ts +4 -1
- package/src/biz/settings-center/index.ts +1 -0
- package/src/biz/settings-center/shell.ts +30 -9
- package/src/biz/shared/action-host.ts +137 -46
- package/src/biz/shared/compile-helpers.ts +152 -28
- package/src/biz/shared/coordinator.ts +628 -147
- 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 +58 -10
- package/src/biz/shared/overlay-shell.ts +40 -10
- 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 +4 -2
- package/src/biz/single-form/index.ts +2 -0
- package/src/biz/single-form/shell.ts +21 -11
- package/src/biz/standard-crud/compile.ts +206 -38
- package/src/biz/standard-crud/index.ts +2 -1
- package/src/biz/standard-crud/shell.ts +82 -22
- package/src/biz/standard-crud/summary.ts +2 -37
- package/src/biz/step-form/compile.ts +12 -3
- package/src/biz/step-form/hub.ts +165 -50
- package/src/biz/step-form/index.ts +1 -0
- package/src/biz/step-form/shell.ts +31 -15
- package/src/biz/types.ts +40 -4
- package/src/cli/kit-cli.ts +145 -26
- package/src/cli/kit-init.ts +3 -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/closed-set.ts +102 -6
- package/src/compile/compile-page.ts +446 -53
- package/src/compile/component-candidates.ts +56 -4
- package/src/compile/danger-tier.ts +65 -0
- package/src/compile/hints.ts +1 -1
- package/src/compile/info-structure.ts +155 -0
- package/src/compile/layout-lint/rules-composition.ts +2 -1
- 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 +382 -46
- 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/relation-render.ts +120 -0
- package/src/compile/remove-guard.ts +115 -41
- package/src/compile/stages.ts +645 -28
- package/src/compile/styles.ts +226 -26
- package/src/compile/types.ts +62 -5
- package/src/compile/view-check.ts +190 -1
- package/src/data/access-gate.ts +17 -9
- package/src/data/amount-breakdown.ts +49 -22
- package/src/data/anchor-nav.ts +73 -15
- package/src/data/approval-flow.ts +210 -124
- package/src/data/assignment-picker.ts +163 -85
- package/src/data/async-result-panel.ts +110 -46
- package/src/data/audit-log.ts +461 -0
- package/src/data/breadcrumbs.ts +141 -19
- package/src/data/calendar.ts +434 -96
- package/src/data/card-grid.ts +319 -0
- package/src/data/carousel.ts +72 -38
- package/src/data/cell-value.ts +253 -0
- package/src/data/chart.ts +904 -77
- package/src/data/checklist.ts +78 -35
- package/src/data/code-view.ts +106 -48
- package/src/data/comment-thread.ts +607 -87
- package/src/data/compare-view.ts +227 -0
- package/src/data/confirm-dialog.ts +198 -30
- 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 +107 -50
- package/src/data/display-util.ts +9 -4
- package/src/data/dock.ts +33 -17
- package/src/data/embed.ts +142 -7
- package/src/data/engine-ports.ts +13 -4
- package/src/data/field-mapper.ts +104 -48
- package/src/data/file-list.ts +522 -0
- package/src/data/flow-editor.ts +603 -142
- package/src/data/flow-node-options.ts +24 -5
- package/src/data/flow-remote-options.ts +94 -19
- package/src/data/footer.ts +85 -27
- package/src/data/form-draft-registry.ts +183 -12
- package/src/data/gantt.ts +637 -117
- package/src/data/graph-view.ts +51 -0
- package/src/data/heat-calendar.ts +412 -0
- package/src/data/hero.ts +38 -15
- package/src/data/image-viewer.ts +261 -62
- package/src/data/index.ts +63 -1
- package/src/data/item-list.ts +217 -57
- package/src/data/json-view.ts +165 -100
- package/src/data/kanban.ts +339 -87
- 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 +155 -45
- package/src/data/matrix.ts +217 -112
- package/src/data/media-grid.ts +162 -38
- package/src/data/mega-menu.ts +39 -23
- package/src/data/menu-bar.ts +254 -0
- package/src/data/menu-dom.ts +50 -15
- package/src/data/menu.ts +131 -47
- package/src/data/mockup.ts +30 -22
- package/src/data/modal-dialog.ts +90 -13
- package/src/data/navbar.ts +143 -61
- package/src/data/notice-list.ts +100 -48
- package/src/data/notify-renderer.ts +61 -7
- package/src/data/object-form.ts +1389 -130
- package/src/data/org-chart.ts +544 -0
- package/src/data/outcome-watch.ts +90 -21
- package/src/data/pager.ts +122 -42
- package/src/data/panel-head.ts +237 -75
- package/src/data/permission-matrix.ts +371 -119
- package/src/data/permission-tree.ts +135 -80
- package/src/data/pricing-table.ts +106 -42
- package/src/data/prompt-dialog.ts +49 -21
- package/src/data/reaction-bar.ts +63 -31
- package/src/data/record-card.ts +239 -70
- package/src/data/record-picker.ts +56 -27
- package/src/data/redirect.ts +39 -15
- package/src/data/request-console.ts +131 -41
- package/src/data/resident.ts +11 -1
- package/src/data/result-panel.ts +65 -27
- package/src/data/rich-text.ts +206 -35
- package/src/data/row-confirm.ts +47 -0
- package/src/data/row-editor.ts +376 -102
- package/src/data/rule-builder.ts +129 -80
- package/src/data/schedule-grid.ts +238 -0
- package/src/data/segment-bar.ts +221 -0
- package/src/data/shape-util.ts +86 -43
- package/src/data/stage-flow.ts +244 -0
- package/src/data/staged-rows.ts +207 -24
- package/src/data/stat-group.ts +438 -86
- package/src/data/static-lazy.ts +18 -0
- package/src/data/static-registry.ts +38 -2
- package/src/data/status-strip.ts +171 -0
- package/src/data/steps.ts +63 -34
- package/src/data/summary-strip.ts +136 -0
- package/src/data/summary-util.ts +116 -0
- package/src/data/survey.ts +128 -47
- package/src/data/system-switcher.ts +40 -20
- package/src/data/target-progress.ts +208 -0
- package/src/data/text-action-button.ts +28 -7
- package/src/data/text-diff.ts +99 -31
- package/src/data/tile-grid.ts +343 -0
- package/src/data/timeline.ts +205 -36
- package/src/data/tour-guide.ts +110 -47
- package/src/data/transfer.ts +195 -47
- package/src/data/tree-table.ts +194 -112
- package/src/data/tree.ts +191 -70
- package/src/data/trend-line.ts +68 -12
- package/src/data/virtual-rows.ts +242 -102
- package/src/data/waterfall.ts +171 -0
- package/src/data/watermark.ts +35 -6
- package/src/data/wrap.ts +26 -4
- package/src/frames/blank-frame.ts +6 -4
- package/src/frames/index.ts +1 -2
- package/src/frames/inherited-shell.ts +54 -13
- package/src/frames/page-bar.ts +205 -27
- package/src/frames/page-status.ts +3 -2
- package/src/frames/resident-components.ts +0 -2
- package/src/frames/shared.ts +64 -21
- package/src/frames/single-frame.ts +20 -4
- package/src/frames/split-frame/shell.ts +11 -7
- package/src/frames/split-frame/wiring.ts +14 -10
- package/src/frames/tabs-frame/shell.ts +3 -2
- package/src/frames/tabs-frame/wiring.ts +2 -1
- package/src/frames/top-main-frame.ts +55 -3
- package/src/frames/types.ts +2 -0
- package/src/frames/workspace-frame/extras.ts +5 -3
- 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 +22 -2
- package/src/frames/workspace-frame/state.ts +42 -14
- package/src/frames/workspace-frame/view.ts +697 -167
- package/src/generated/kit-grammar-runtime.ts +1016 -54
- package/src/generated/kit-page.ts +272 -0
- package/src/i18n/index.ts +2 -0
- package/src/i18n/kit-text.ts +96 -3
- package/src/object-renderer/action-group.ts +175 -23
- package/src/object-renderer/action-more.ts +48 -17
- package/src/object-renderer/arrange.ts +241 -29
- 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 +432 -107
- package/src/object-renderer/collection-table.ts +347 -45
- package/src/object-renderer/collection.ts +291 -62
- package/src/object-renderer/compile-data.ts +12 -2
- package/src/object-renderer/defaults.ts +6 -5
- package/src/object-renderer/emit-events.ts +45 -19
- package/src/object-renderer/emit-object.ts +35 -9
- package/src/object-renderer/emit-static.ts +734 -159
- package/src/object-renderer/filter-plan.ts +3 -3
- package/src/object-renderer/filter-toolbar.ts +105 -18
- package/src/object-renderer/form-detail.ts +87 -2
- package/src/object-renderer/key-field.ts +21 -0
- package/src/object-renderer/layout-facts.ts +18 -2
- package/src/object-renderer/layout-plan.ts +6 -3
- package/src/object-renderer/overlay-decide.ts +44 -2
- 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 +71 -26
- package/src/object-renderer/request-actions.ts +119 -21
- package/src/object-renderer/table-actions.ts +423 -104
- 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 +428 -128
- package/src/object-renderer/types.ts +91 -2
- 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/chrome-surface.ts +20 -0
- package/src/recipes/code-view.ts +15 -14
- package/src/recipes/color-role.ts +442 -0
- package/src/recipes/compact-group.ts +3 -2
- package/src/recipes/composition-projector.ts +321 -0
- package/src/recipes/container.ts +76 -19
- package/src/recipes/control.ts +64 -5
- package/src/recipes/desc-list.ts +101 -7
- package/src/recipes/divider.ts +30 -9
- package/src/recipes/emphasis.ts +90 -5
- package/src/recipes/field-text.ts +72 -0
- package/src/recipes/form-section.ts +177 -0
- package/src/recipes/frame-bleed.ts +3 -2
- package/src/recipes/index.ts +28 -4
- package/src/recipes/inherited-shell.ts +21 -15
- package/src/recipes/json-view.ts +6 -5
- package/src/recipes/look.ts +56 -0
- package/src/recipes/mark.ts +138 -0
- package/src/recipes/markdown.ts +16 -6
- package/src/recipes/overlay.ts +47 -19
- package/src/recipes/page-width.ts +31 -0
- package/src/recipes/pipeline-runtime.ts +366 -0
- package/src/recipes/placeholder.ts +37 -19
- 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 +5 -5
- package/src/recipes/state.ts +54 -3
- package/src/recipes/status.ts +14 -14
- package/src/recipes/strip.ts +47 -5
- package/src/recipes/surface-edge.ts +3 -1
- package/src/recipes/surface.ts +33 -4
- package/src/recipes/table-gap.ts +3 -2
- package/src/recipes/table-native-edit.ts +22 -9
- package/src/recipes/table-row.ts +45 -12
- package/src/recipes/tabs.ts +54 -22
- package/src/recipes/text-diff.ts +15 -8
- package/src/recipes/text-fit.ts +132 -0
- package/src/recipes/title-row.ts +68 -3
- 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/dom-attrs-registry.ts +1009 -0
- package/src/shared/dom-attrs.ts +743 -0
- package/src/shared/field-kind.ts +49 -0
- package/src/shared/field-value-format.ts +58 -12
- package/src/shared/glyphs.ts +127 -0
- package/src/shared/icons.ts +28 -1
- package/src/shared/identifier-field.ts +66 -0
- package/src/shared/list-pager.ts +23 -0
- package/src/shared/list-title.ts +29 -0
- 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/pipeline-mode.ts +64 -0
- package/src/shared/row-key.ts +15 -0
- package/src/shared/theme-runtime-shared.ts +165 -24
- 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 +527 -16
- package/src/theme/kit-theme.tpl +491 -16
- package/src/theme/look-carrier.ts +65 -0
- package/src/theme/nine-dim-structure.ts +522 -185
- package/src/theme/private-vars.ts +153 -0
- package/src/theme/surface-layers.ts +3 -2
- package/src/theme/theme-tokens.ts +1601 -93
- package/src/theme/theme-types.ts +38 -59
- package/src/theme/value-table.ts +2379 -0
- package/src/frames/list-summary.ts +0 -123
- package/src/recipes/nowrap.ts +0 -16
- package/src/theme/block-theme.ts +0 -202
|
@@ -0,0 +1,272 @@
|
|
|
1
|
+
// 由 soma-design/src/gen-kit-page.mjs 从 spec/pipeline/kit-page.json 生成,勿手改。
|
|
2
|
+
// 改值请改真源并执行 `npm run generate -w soma-design`(或 `npm run regen -w soma-kit`);
|
|
3
|
+
// 新鲜度由 `npm run verify:fresh -w soma-design` 与 `npm run verify:fresh -w soma-kit` 判定。
|
|
4
|
+
// 只有数据:类型别名与查询函数在 soma-kit/src/shared/page-attrs.ts(它再导出本文件的常量)。
|
|
5
|
+
|
|
6
|
+
/** 递归冻结:生成常量是全进程共享的真源投影,持有引用的代码不能改写它。 */
|
|
7
|
+
function deepFreeze<T>(value: T): T {
|
|
8
|
+
if (value !== null && typeof value === 'object' && !Object.isFrozen(value)) {
|
|
9
|
+
Object.freeze(value);
|
|
10
|
+
for (const k of Object.keys(value)) deepFreeze((value as Record<string, unknown>)[k]);
|
|
11
|
+
}
|
|
12
|
+
return value;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
// ── 闭集(kit-page.json#/closedSets;数组不冻结,与 as const 只读类型配合)──
|
|
16
|
+
|
|
17
|
+
/** 闭集 level(kit-page.json#/closedSets/level) */
|
|
18
|
+
export const KIT_LEVELS = ['shell', 'top', 'shell-panel', 'canvas', 'segment', 'face', 'head', 'tabs', 'pane', 'section', 'sub', 'band', 'item', 'foot', 'control', 'float', 'overlay'] as const;
|
|
19
|
+
/** 闭集 componentPart(kit-page.json#/closedSets/componentPart) */
|
|
20
|
+
export const KIT_COMPONENT_PARTS = ['table', 'item-list', 'tree', 'timeline', 'board', 'calendar', 'schedule-grid', 'gantt', 'chart', 'form', 'filter', 'kv', 'record', 'stats-group', 'stat-delta', 'stepper', 'editor', 'notice', 'text', 'nav', 'segmented', 'pager', 'action', 'value', 'input', 'custom'] as const;
|
|
21
|
+
/** 闭集 elementPart(kit-page.json#/closedSets/elementPart) */
|
|
22
|
+
export const KIT_ELEMENT_PARTS = ['page-title', 'block-title', 'field-name', 'value', 'status', 'mark', 'icon', 'metric', 'line', 'cell', 'control', 'action'] as const;
|
|
23
|
+
/** 闭集 present(kit-page.json#/closedSets/present) */
|
|
24
|
+
export const KIT_PRESENTS = ['face', 'pane', 'section', 'sub', 'tab-face', 'tiles', 'canvas', 'delegated', 'overlay'] as const;
|
|
25
|
+
/** 闭集 arrange(kit-page.json#/closedSets/arrange) */
|
|
26
|
+
export const KIT_ARRANGES = ['stack', 'columns', 'panes', 'rail', 'main-aside', 'grid', 'center', 'split'] as const;
|
|
27
|
+
/** 闭集 exclusive(kit-page.json#/closedSets/exclusive) */
|
|
28
|
+
export const KIT_EXCLUSIVES = ['none', 'tabs', 'steps', 'select', 'swap'] as const;
|
|
29
|
+
/** 闭集 identity(kit-page.json#/closedSets/identity) */
|
|
30
|
+
export const KIT_IDENTITIES = ['primary', 'secondary', 'selector', 'peers'] as const;
|
|
31
|
+
/** 闭集 editContainer(kit-page.json#/closedSets/editContainer) */
|
|
32
|
+
export const KIT_EDIT_CONTAINERS = ['page', 'dialog', 'drawer', 'inline'] as const;
|
|
33
|
+
/** 闭集 role(kit-page.json#/closedSets/role) */
|
|
34
|
+
export const KIT_ROLES = ['subject', 'summary', 'control', 'note'] as const;
|
|
35
|
+
/** 闭集 slot(kit-page.json#/closedSets/slot) */
|
|
36
|
+
export const KIT_SLOTS = ['hero', 'body', 'aside', 'attach'] as const;
|
|
37
|
+
/** 闭集 emphasis(kit-page.json#/closedSets/emphasis) */
|
|
38
|
+
export const KIT_EMPHASES = ['primary', 'secondary', 'tertiary', 'quiet'] as const;
|
|
39
|
+
/** 闭集 envelope(kit-page.json#/closedSets/envelope) */
|
|
40
|
+
export const KIT_ENVELOPES = ['narrow', 'medium', 'wide', 'xwide', 'full'] as const;
|
|
41
|
+
/** 闭集 host(kit-page.json#/closedSets/host) */
|
|
42
|
+
export const KIT_HOSTS = ['inline', 'control', 'block', 'passthrough'] as const;
|
|
43
|
+
/** 闭集 flow(kit-page.json#/closedSets/flow) */
|
|
44
|
+
export const KIT_FLOWS = ['peers', 'main-aside', 'bar', 'filter', 'form', 'kv', 'band'] as const;
|
|
45
|
+
/** 闭集 align(kit-page.json#/closedSets/align) */
|
|
46
|
+
export const KIT_ALIGNS = ['start', 'center', 'end'] as const;
|
|
47
|
+
/** 闭集 overflow(kit-page.json#/closedSets/overflow) */
|
|
48
|
+
export const KIT_OVERFLOWS = ['wrap', 'truncate', 'clamp2', 'middle'] as const;
|
|
49
|
+
/** 闭集 controlSize(kit-page.json#/closedSets/controlSize) */
|
|
50
|
+
export const KIT_CONTROL_SIZES = ['sm', 'md', 'lg'] as const;
|
|
51
|
+
/** 闭集 valueForm(kit-page.json#/closedSets/valueForm) */
|
|
52
|
+
export const KIT_VALUE_FORMS = ['text', 'mono', 'copyable', 'bool', 'prose', 'link', 'thumb', 'dot', 'tag', 'icon'] as const;
|
|
53
|
+
/** 闭集 tone(kit-page.json#/closedSets/tone) */
|
|
54
|
+
export const KIT_TONES = ['none', 'success', 'warning', 'danger', 'info', 'neutral'] as const;
|
|
55
|
+
/** 闭集 danger(kit-page.json#/closedSets/danger) */
|
|
56
|
+
export const KIT_DANGERS = ['normal', 'caution', 'critical'] as const;
|
|
57
|
+
/** 闭集 confirm(kit-page.json#/closedSets/confirm) */
|
|
58
|
+
export const KIT_CONFIRMS = ['none', 'popconfirm', 'dialog'] as const;
|
|
59
|
+
/** 闭集 variant(kit-page.json#/closedSets/variant) */
|
|
60
|
+
export const KIT_VARIANTS = ['solid', 'outline', 'text', 'icon'] as const;
|
|
61
|
+
/** 闭集 place(kit-page.json#/closedSets/place) */
|
|
62
|
+
export const KIT_PLACES = ['page-head', 'toolbar', 'filter', 'inline', 'form-foot', 'dialog-foot', 'empty-guide'] as const;
|
|
63
|
+
/** 闭集 scope(kit-page.json#/closedSets/scope) */
|
|
64
|
+
export const KIT_SCOPES = ['none', 'shell', 'invert', 'brand'] as const;
|
|
65
|
+
/** 闭集 dataState(kit-page.json#/closedSets/dataState) */
|
|
66
|
+
export const KIT_DATA_STATES = ['normal', 'loading', 'empty', 'error', 'readonly'] as const;
|
|
67
|
+
/** 闭集 interactState(kit-page.json#/closedSets/interactState) */
|
|
68
|
+
export const KIT_INTERACT_STATES = ['hover', 'active', 'focus', 'selected', 'current', 'disabled', 'dragging', 'invalid'] as const;
|
|
69
|
+
/** 闭集 fieldType(kit-page.json#/closedSets/fieldType) */
|
|
70
|
+
export const KIT_FIELD_TYPES = ['text', 'longtext', 'number', 'money', 'percent', 'date', 'time', 'bool', 'enum', 'ref', 'id', 'link', 'image'] as const;
|
|
71
|
+
/** 闭集 fieldRole(kit-page.json#/closedSets/fieldRole) */
|
|
72
|
+
export const KIT_FIELD_ROLES = ['none', 'key', 'title', 'status', 'category', 'direction'] as const;
|
|
73
|
+
/** 闭集 func(kit-page.json#/closedSets/func) */
|
|
74
|
+
export const KIT_FUNCS = ['create', 'save', 'submit', 'query', 'edit', 'remove', 'clear', 'disable', 'export', 'other'] as const;
|
|
75
|
+
/** 闭集 keep(kit-page.json#/closedSets/keep) */
|
|
76
|
+
export const KIT_KEEPS = ['must', 'optional'] as const;
|
|
77
|
+
/** 闭集 collapse(kit-page.json#/closedSets/collapse) */
|
|
78
|
+
export const KIT_COLLAPSES = ['none', 'to-single'] as const;
|
|
79
|
+
/** 闭集 stripKind(kit-page.json#/closedSets/stripKind) */
|
|
80
|
+
export const KIT_STRIP_KINDS = ['section', 'page-head', 'filter-toolbar', 'summary-head', 'foot'] as const;
|
|
81
|
+
/** 闭集 treeShape(kit-page.json#/closedSets/treeShape) */
|
|
82
|
+
export const KIT_TREE_SHAPES = ['single', 'multi', 'free'] as const;
|
|
83
|
+
/** 闭集 owner(kit-page.json#/closedSets/owner) */
|
|
84
|
+
export const KIT_OWNERS = ['frame', 'biz', 'object'] as const;
|
|
85
|
+
/** 闭集 regionKind(kit-page.json#/closedSets/regionKind) */
|
|
86
|
+
export const KIT_REGION_KINDS = ['shell', 'top', 'shell-panel', 'canvas'] as const;
|
|
87
|
+
|
|
88
|
+
/** 闭集名 → 成员(键与真源 closedSets 一一对应) */
|
|
89
|
+
export const KIT_CLOSED_SETS = {
|
|
90
|
+
level: KIT_LEVELS,
|
|
91
|
+
componentPart: KIT_COMPONENT_PARTS,
|
|
92
|
+
elementPart: KIT_ELEMENT_PARTS,
|
|
93
|
+
present: KIT_PRESENTS,
|
|
94
|
+
arrange: KIT_ARRANGES,
|
|
95
|
+
exclusive: KIT_EXCLUSIVES,
|
|
96
|
+
identity: KIT_IDENTITIES,
|
|
97
|
+
editContainer: KIT_EDIT_CONTAINERS,
|
|
98
|
+
role: KIT_ROLES,
|
|
99
|
+
slot: KIT_SLOTS,
|
|
100
|
+
emphasis: KIT_EMPHASES,
|
|
101
|
+
envelope: KIT_ENVELOPES,
|
|
102
|
+
host: KIT_HOSTS,
|
|
103
|
+
flow: KIT_FLOWS,
|
|
104
|
+
align: KIT_ALIGNS,
|
|
105
|
+
overflow: KIT_OVERFLOWS,
|
|
106
|
+
controlSize: KIT_CONTROL_SIZES,
|
|
107
|
+
valueForm: KIT_VALUE_FORMS,
|
|
108
|
+
tone: KIT_TONES,
|
|
109
|
+
danger: KIT_DANGERS,
|
|
110
|
+
confirm: KIT_CONFIRMS,
|
|
111
|
+
variant: KIT_VARIANTS,
|
|
112
|
+
place: KIT_PLACES,
|
|
113
|
+
scope: KIT_SCOPES,
|
|
114
|
+
dataState: KIT_DATA_STATES,
|
|
115
|
+
interactState: KIT_INTERACT_STATES,
|
|
116
|
+
fieldType: KIT_FIELD_TYPES,
|
|
117
|
+
fieldRole: KIT_FIELD_ROLES,
|
|
118
|
+
func: KIT_FUNCS,
|
|
119
|
+
keep: KIT_KEEPS,
|
|
120
|
+
collapse: KIT_COLLAPSES,
|
|
121
|
+
stripKind: KIT_STRIP_KINDS,
|
|
122
|
+
treeShape: KIT_TREE_SHAPES,
|
|
123
|
+
owner: KIT_OWNERS,
|
|
124
|
+
regionKind: KIT_REGION_KINDS,
|
|
125
|
+
} as const;
|
|
126
|
+
|
|
127
|
+
/** 呈现的「未指定」过渡值(kit-page.json#/presentUnset):不是闭集成员 */
|
|
128
|
+
export const KIT_PRESENT_UNSET = 'unset';
|
|
129
|
+
|
|
130
|
+
// ── 合法父子层级角色对(kit-page.json#/legalPairs;表外一律非法)──
|
|
131
|
+
|
|
132
|
+
/** 合法父子对的裁定(kit-page.schema.json#/$defs/pairVerdict) */
|
|
133
|
+
export const KIT_PAIR_VERDICTS = ['pass', 'except', 'origin'] as const;
|
|
134
|
+
|
|
135
|
+
/** 父(层级角色,或 root = 页面框最外层)→ { 子: 裁定 } */
|
|
136
|
+
export const KIT_PAGE_LEGAL_PAIRS = /* @__PURE__ */ deepFreeze({
|
|
137
|
+
root: { shell: 'pass', top: 'pass', 'shell-panel': 'pass', canvas: 'pass', float: 'origin', overlay: 'origin' },
|
|
138
|
+
shell: { control: 'pass', head: 'except', item: 'except', foot: 'except' },
|
|
139
|
+
top: { control: 'pass', tabs: 'except' },
|
|
140
|
+
'shell-panel': { canvas: 'pass', tabs: 'pass', control: 'pass', face: 'pass' },
|
|
141
|
+
canvas: { face: 'pass', segment: 'pass', tabs: 'pass', head: 'except', canvas: 'origin', float: 'origin', overlay: 'origin' },
|
|
142
|
+
segment: { face: 'pass', control: 'pass' },
|
|
143
|
+
face: { head: 'pass', tabs: 'pass', pane: 'pass', section: 'pass', sub: 'pass', band: 'pass', item: 'pass', foot: 'pass', control: 'pass', face: 'except' },
|
|
144
|
+
head: { control: 'pass' },
|
|
145
|
+
tabs: { control: 'pass' },
|
|
146
|
+
pane: { head: 'pass', section: 'pass', sub: 'pass', band: 'pass', item: 'pass', foot: 'pass', control: 'pass', face: 'except' },
|
|
147
|
+
section: { head: 'pass', sub: 'pass', band: 'pass', item: 'pass', foot: 'pass', control: 'pass' },
|
|
148
|
+
sub: { head: 'pass', band: 'pass', foot: 'pass', control: 'pass', item: 'except' },
|
|
149
|
+
band: { control: 'pass' },
|
|
150
|
+
item: { control: 'pass' },
|
|
151
|
+
foot: { control: 'pass' },
|
|
152
|
+
control: {},
|
|
153
|
+
float: { head: 'pass', section: 'pass', item: 'pass', control: 'pass', sub: 'except' },
|
|
154
|
+
overlay: { head: 'pass', section: 'pass', sub: 'pass', band: 'pass', item: 'pass', foot: 'pass', control: 'pass', face: 'except' },
|
|
155
|
+
} as const);
|
|
156
|
+
|
|
157
|
+
// ── 属性总账(kit-page.json#/attrLedger)──
|
|
158
|
+
|
|
159
|
+
/** 页面线组件树上的节点种类(ledgerKinds 里 line = page 的) */
|
|
160
|
+
export const KIT_LEDGER_NODE_KINDS = ['page', 'biz', 'region', 'object', 'strip', 'instance', 'field', 'action'] as const;
|
|
161
|
+
/** 页面线之外的种类(取值表、运行期自报) */
|
|
162
|
+
export const KIT_LEDGER_OFF_PAGE_KINDS = ['valueTable', 'runtime'] as const;
|
|
163
|
+
/** 页面线的六个事件(ledgerActors 里 group = page-event 的) */
|
|
164
|
+
export const KIT_LEDGER_EVENTS = ['expand', 'recognize', 'layout', 'shape', 'tone', 'emit'] as const;
|
|
165
|
+
/** 总账读写栏能出现的全部角色 */
|
|
166
|
+
export const KIT_LEDGER_ACTORS = ['expand', 'recognize', 'layout', 'shape', 'tone', 'emit', 'theme-solve', 'tier-compat', 'reskin', 'page-submit', 'component-runtime', 'template', 'orchestrator', 'browser', 'browser-cache', 'core-runtime', 'developer'] as const;
|
|
167
|
+
/** 页面线属性到达浏览器的途径(kit-page.schema.json#/$defs/carrier 去掉 head) */
|
|
168
|
+
export const KIT_LEDGER_CARRIERS = ['structure', 'prop', 'structure-prop', 'none'] as const;
|
|
169
|
+
/** 页面线之外的属性的途径(含 head = 应用文档头) */
|
|
170
|
+
export const KIT_LEDGER_OFF_PAGE_CARRIERS = ['structure', 'prop', 'structure-prop', 'head', 'none'] as const;
|
|
171
|
+
|
|
172
|
+
/** 页面线落在节点上的属性(写入入口只认这张表):67 条 */
|
|
173
|
+
export const KIT_PAGE_ON_NODE_ATTRS = /* @__PURE__ */ deepFreeze([
|
|
174
|
+
{ kind: 'page', key: 'treeShape', label: '树形态', writers: ['expand'], readers: ['developer'], carrier: 'none' },
|
|
175
|
+
{ kind: 'page', key: 'rootArrange', label: '根排法(取值 columns 预留:分栏页面框写它,尚无读者)', writers: ['expand'], readers: ['recognize'], carrier: 'none' },
|
|
176
|
+
{ kind: 'page', key: 'frameFacts', label: '版面事实(运行期提交页里组合核对用到的部分:页面模式、导航轨、步骤 / 阅读 / 展示 / 详情四个开关与窗格数,随绑定版本号的事实戳落盘,重启或重装配后装配读回:app/server-pages.ts#kitRuntimePageFactsStamp、app/server.ts)', writers: ['expand'], readers: ['recognize', 'layout', 'emit', 'tier-compat', 'page-submit'], carrier: 'none' },
|
|
177
|
+
{ kind: 'page', key: 'screens', label: '屏', writers: ['recognize'], readers: ['recognize', 'layout', 'tone', 'emit'], carrier: 'none' },
|
|
178
|
+
{ kind: 'page', key: 'envelope', label: '版心', writers: ['layout'], readers: ['emit', 'browser'], carrier: 'structure' },
|
|
179
|
+
{ kind: 'page', key: 'gateReport', label: '门禁结论', writers: ['emit'], readers: ['developer'], carrier: 'none' },
|
|
180
|
+
{ kind: 'biz', key: 'kind', label: '种类', writers: ['expand'], readers: ['developer'], carrier: 'none' },
|
|
181
|
+
{ kind: 'biz', key: 'arrange', label: '排法', writers: ['expand'], readers: ['recognize', 'layout'], carrier: 'none' },
|
|
182
|
+
{ kind: 'biz', key: 'exclusive', label: '互斥方式', writers: ['expand'], readers: ['recognize'], carrier: 'none' },
|
|
183
|
+
{ kind: 'biz', key: 'defaultSelected', label: '默认选中', writers: ['expand'], readers: ['recognize'], carrier: 'none' },
|
|
184
|
+
{ kind: 'biz', key: 'level', label: '层级角色', writers: ['layout'], readers: ['emit', 'browser'], carrier: 'structure' },
|
|
185
|
+
{ kind: 'region', key: 'regionKind', label: '区域种类', writers: ['expand'], readers: ['layout'], carrier: 'none' },
|
|
186
|
+
{ kind: 'region', key: 'level', label: '层级角色', writers: ['layout'], readers: ['emit', 'browser'], carrier: 'structure' },
|
|
187
|
+
{ kind: 'region', key: 'scope', label: '区域作用域', writers: ['layout'], readers: ['browser'], carrier: 'structure' },
|
|
188
|
+
{ kind: 'region', key: 'bleed', label: '通栏', writers: ['layout'], readers: ['browser'], carrier: 'structure' },
|
|
189
|
+
{ kind: 'object', key: 'identity', label: '对象身份', writers: ['expand'], readers: ['recognize'], carrier: 'none' },
|
|
190
|
+
{ kind: 'object', key: 'attachTo', label: '依附', writers: ['expand'], readers: ['recognize', 'layout'], carrier: 'none' },
|
|
191
|
+
{ kind: 'object', key: 'present', label: '呈现', writers: ['expand', 'recognize'], readers: ['recognize', 'layout'], carrier: 'none' },
|
|
192
|
+
{ kind: 'object', key: 'inset', label: '留边', writers: ['expand'], readers: ['layout', 'browser'], carrier: 'structure', structureFalse: 'none' },
|
|
193
|
+
{ kind: 'object', key: 'exclusiveKey', label: '互斥成员键', writers: ['expand'], readers: ['recognize'], carrier: 'none' },
|
|
194
|
+
{ kind: 'object', key: 'capacity', label: '容量', writers: ['expand'], readers: ['developer'], carrier: 'none' },
|
|
195
|
+
{ kind: 'object', key: 'editContainer', label: '编辑容器', writers: ['expand'], readers: ['recognize'], carrier: 'none' },
|
|
196
|
+
{ kind: 'object', key: 'screen', label: '所在屏', writers: ['recognize'], readers: ['recognize', 'layout', 'emit'], carrier: 'none' },
|
|
197
|
+
{ kind: 'object', key: 'role', label: '构成角色', writers: ['recognize'], readers: ['recognize', 'layout', 'tone', 'emit', 'browser'], carrier: 'structure' },
|
|
198
|
+
{ kind: 'object', key: 'slot', label: '槽位', writers: ['recognize'], readers: ['developer'], carrier: 'none' },
|
|
199
|
+
{ kind: 'object', key: 'emphasis', label: '强调级', writers: ['recognize'], readers: ['shape', 'tone', 'emit', 'browser'], carrier: 'structure' },
|
|
200
|
+
{ kind: 'object', key: 'titleSameAsPage', label: '标题与页标题同义', writers: ['expand'], readers: ['recognize'], carrier: 'none' },
|
|
201
|
+
{ kind: 'object', key: 'titleHidden', label: '标题显隐(只写结构属性:对象锚点是容器标签、不是组件条目,入参途径无处可落;页面编排层据报告决定去不去重复的列表标题)', writers: ['recognize'], readers: ['emit', 'browser', 'orchestrator'], carrier: 'structure' },
|
|
202
|
+
{ kind: 'object', key: 'level', label: '层级角色', writers: ['layout'], readers: ['layout', 'emit', 'browser'], carrier: 'structure' },
|
|
203
|
+
{ kind: 'object', key: 'span', label: '宽度档', writers: ['layout'], readers: ['browser'], carrier: 'structure' },
|
|
204
|
+
{ kind: 'object', key: 'flow', label: '流向', writers: ['layout'], readers: ['browser'], carrier: 'structure' },
|
|
205
|
+
{ kind: 'object', key: 'flush', label: '贴边', writers: ['layout'], readers: ['browser'], carrier: 'structure' },
|
|
206
|
+
{ kind: 'strip', key: 'owner', label: '归属(取值 biz 预留:展开尚无归业务组件的条带)', writers: ['expand'], readers: ['developer'], carrier: 'none' },
|
|
207
|
+
{ kind: 'strip', key: 'stripKind', label: '种类', writers: ['expand'], readers: ['recognize', 'layout'], carrier: 'none' },
|
|
208
|
+
{ kind: 'strip', key: 'stripHidden', label: '条带显隐', writers: ['recognize'], readers: ['emit', 'browser'], carrier: 'structure' },
|
|
209
|
+
{ kind: 'strip', key: 'level', label: '层级角色', writers: ['layout'], readers: ['emit', 'browser'], carrier: 'structure' },
|
|
210
|
+
{ kind: 'strip', key: 'flow', label: '流向', writers: ['layout'], readers: ['browser'], carrier: 'structure' },
|
|
211
|
+
{ kind: 'strip', key: 'collapse', label: '窄容器退让', writers: ['layout'], readers: ['browser'], carrier: 'structure' },
|
|
212
|
+
{ kind: 'instance', key: 'componentPart', label: '组件部件', writers: ['expand'], readers: ['recognize', 'layout', 'shape', 'orchestrator'], carrier: 'none' },
|
|
213
|
+
{ kind: 'instance', key: 'host', label: '宿主', writers: ['expand'], readers: ['browser'], carrier: 'structure' },
|
|
214
|
+
{ kind: 'instance', key: 'selfLayout', label: '自管布局', writers: ['expand'], readers: ['recognize'], carrier: 'none' },
|
|
215
|
+
{ kind: 'instance', key: 'capacity', label: '容量', writers: ['expand'], readers: ['layout'], carrier: 'none' },
|
|
216
|
+
{ kind: 'instance', key: 'emphasis', label: '强调级', writers: ['recognize'], readers: ['browser'], carrier: 'structure' },
|
|
217
|
+
{ kind: 'instance', key: 'controlSize', label: '控件高度档(入参只有表单、筛选与带写死形状组件的条目读;列表实例锚点是普通容器,落不上)', writers: ['layout'], readers: ['browser'], carrier: 'prop' },
|
|
218
|
+
{ kind: 'instance', key: 'columns', label: '列数(入参只有表单、筛选与带写死形状组件的条目读;列表实例锚点是普通容器,落不上)', writers: ['layout'], readers: ['browser'], carrier: 'prop' },
|
|
219
|
+
{ kind: 'instance', key: 'overflow', label: '溢出策略(入参只有带写死形状组件的条目读,表单读了不用;列表实例锚点是普通容器,落不上)', writers: ['layout'], readers: ['browser'], carrier: 'prop' },
|
|
220
|
+
{ kind: 'instance', key: 'collapse', label: '窄容器退让', writers: ['layout'], readers: ['browser'], carrier: 'structure' },
|
|
221
|
+
{ kind: 'field', key: 'fieldType', label: '字段类型', writers: ['expand'], readers: ['layout', 'shape'], carrier: 'none' },
|
|
222
|
+
{ kind: 'field', key: 'fieldRole', label: '字段角色', writers: ['expand'], readers: ['layout', 'shape', 'tone', 'orchestrator'], carrier: 'none' },
|
|
223
|
+
{ kind: 'field', key: 'align', label: '逻辑对齐', writers: ['layout'], readers: ['browser'], carrier: 'prop' },
|
|
224
|
+
{ kind: 'field', key: 'width', label: '宽度档(预留:随入参到组件,尚无组件读取)', writers: ['layout'], readers: ['developer'], carrier: 'prop' },
|
|
225
|
+
{ kind: 'field', key: 'overflow', label: '溢出策略', writers: ['layout'], readers: ['browser'], carrier: 'prop' },
|
|
226
|
+
{ kind: 'field', key: 'keep', label: '保留优先级(布局写:字段角色为主键 / 标题 / 状态、列数不超过受界表格阈值的少列表、列声明 keep: must 的列为必留,其余可收。读者只有开发者(属性报告):窄容器收列是编译期列规划(soma-kit object-renderer/collection-table.ts#columnTrackPlan)出的 @max 收列类,列规划在页面线之前、直接读同一个列声明 keep(must 不让位、optional 先于没写的列让位,SCON-174),两种模式收列结果相同;本属性随入参汇总到表格宿主,没有组件读它)', writers: ['layout'], readers: ['developer'], carrier: 'prop' },
|
|
227
|
+
{ kind: 'field', key: 'valueForm', label: '值呈现形态', writers: ['shape'], readers: ['browser'], carrier: 'prop' },
|
|
228
|
+
{ kind: 'field', key: 'tone', label: '语义色调', writers: ['tone'], readers: ['browser', 'orchestrator'], carrier: 'prop' },
|
|
229
|
+
{ kind: 'field', key: 'categoryIndex', label: '分类色序号', writers: ['tone'], readers: ['browser', 'orchestrator'], carrier: 'prop' },
|
|
230
|
+
{ kind: 'action', key: 'target', label: '作用对象', writers: ['expand'], readers: ['recognize', 'shape', 'tone'], carrier: 'none' },
|
|
231
|
+
{ kind: 'action', key: 'place', label: '位置', writers: ['expand'], readers: ['recognize', 'orchestrator'], carrier: 'none' },
|
|
232
|
+
{ kind: 'action', key: 'func', label: '功能', writers: ['expand'], readers: ['recognize', 'layout', 'shape', 'tone'], carrier: 'none' },
|
|
233
|
+
{ kind: 'action', key: 'danger', label: '危险级', writers: ['expand'], readers: ['layout', 'shape', 'tone'], carrier: 'none' },
|
|
234
|
+
{ kind: 'action', key: 'screen', label: '所在屏', writers: ['recognize'], readers: ['tone', 'emit'], carrier: 'none' },
|
|
235
|
+
{ kind: 'action', key: 'effectivePlace', label: '有效位置', writers: ['recognize'], readers: ['layout', 'shape', 'tone', 'orchestrator'], carrier: 'none' },
|
|
236
|
+
{ kind: 'action', key: 'stowable', label: '可收纳(只有页头条带与表格批量条读;工具条上的收纳由编译期按形态重要度切分,不读它)', writers: ['layout'], readers: ['emit', 'browser'], carrier: 'prop' },
|
|
237
|
+
{ kind: 'action', key: 'variant', label: '按钮形态', writers: ['shape'], readers: ['tone', 'emit', 'browser'], carrier: 'prop' },
|
|
238
|
+
{ kind: 'action', key: 'confirm', label: '确认方式', writers: ['shape'], readers: ['browser'], carrier: 'prop' },
|
|
239
|
+
{ kind: 'action', key: 'solid', label: '实心主色名额', writers: ['tone'], readers: ['emit', 'browser'], carrier: 'prop' },
|
|
240
|
+
{ kind: 'action', key: 'tone', label: '语义色调', writers: ['tone'], readers: ['browser', 'orchestrator'], carrier: 'prop' },
|
|
241
|
+
] as const);
|
|
242
|
+
|
|
243
|
+
/** 页面线登记在总账里、但不落在节点上的属性(onNode = false):4 条 */
|
|
244
|
+
export const KIT_PAGE_OFF_NODE_ATTRS = /* @__PURE__ */ deepFreeze([
|
|
245
|
+
{ kind: 'page', key: 'spatialMap', label: '空间地图', writers: ['recognize'], readers: ['layout', 'shape', 'tone', 'emit'], carrier: 'none' },
|
|
246
|
+
{ kind: 'page', key: 'artifact', label: '页面产物(页面编译写完产物后算出:compile/compile-page.ts)', writers: ['orchestrator'], readers: ['core-runtime'], carrier: 'none' },
|
|
247
|
+
{ kind: 'page', key: 'version', label: '版本号(页面编译按产物四件套与样式摘要算出:compile/compile-page.ts;表内页注册与浏览器缓存读它。运行期提交页注册时不用这一值:运行期提交按载荷另算绑定版本号并接上主题用到情况与版面事实的戳(app/server-pages.ts),装配从绑定版本号读回的是那两行,不是本行)', writers: ['orchestrator'], readers: ['browser-cache', 'core-runtime'], carrier: 'none' },
|
|
248
|
+
{ kind: 'page', key: 'themeUsage', label: '主题用到情况(页面流水线编排入口按报告汇总:分类色、色调名、图表色阶、代码高亮;应用装配的整站样式拼装、换肤与运行期提交据它只发用到的令牌与载体规则;运行期提交页的这一项随绑定版本号的事实戳落盘(闭集外的色名不进戳),重启或重装配后装配读回:app/server-pages.ts#kitRuntimePageFactsStamp、app/server.ts)', writers: ['orchestrator'], readers: ['theme-solve', 'reskin', 'page-submit'], carrier: 'none' },
|
|
249
|
+
] as const);
|
|
250
|
+
|
|
251
|
+
/** 取值表的属性(kind = valueTable):10 条 */
|
|
252
|
+
export const KIT_PAGE_VALUE_TABLE_ATTRS = /* @__PURE__ */ deepFreeze([
|
|
253
|
+
{ kind: 'valueTable', key: 'tiers', label: '主题档位', writers: ['theme-solve'], readers: ['tier-compat', 'reskin'], carrier: 'head' },
|
|
254
|
+
{ kind: 'valueTable', key: 'base', label: '基础数值', writers: ['theme-solve'], readers: ['browser'], carrier: 'head' },
|
|
255
|
+
{ kind: 'valueTable', key: 'reset', label: '归零规则', writers: ['theme-solve'], readers: ['browser'], carrier: 'head' },
|
|
256
|
+
{ kind: 'valueTable', key: 'byLevel', label: '按层级角色的取值', writers: ['theme-solve'], readers: ['browser'], carrier: 'head' },
|
|
257
|
+
{ kind: 'valueTable', key: 'byAdjacency', label: '按邻接关系的取值', writers: ['theme-solve'], readers: ['browser'], carrier: 'head' },
|
|
258
|
+
{ kind: 'valueTable', key: 'byValue', label: '按属性值的取值', writers: ['theme-solve'], readers: ['browser'], carrier: 'head' },
|
|
259
|
+
{ kind: 'valueTable', key: 'byScope', label: '区域改写', writers: ['theme-solve'], readers: ['browser'], carrier: 'head' },
|
|
260
|
+
{ kind: 'valueTable', key: 'tones', label: '语义色与分类色序列', writers: ['theme-solve'], readers: ['browser'], carrier: 'head' },
|
|
261
|
+
{ kind: 'valueTable', key: 'themeGate', label: '主题侧门禁结论(应用装配报给开发者、挡装配;换肤端点据它拒绝换档;运行期提交据它拒收)', writers: ['theme-solve'], readers: ['developer', 'reskin', 'page-submit'], carrier: 'none' },
|
|
262
|
+
{ kind: 'valueTable', key: 'allowedTiers', label: '允许的档位(换肤端点档位守卫拒收时随 400 回复带回当前值,浏览器按文档记为最新已知值:app/theme-endpoint.ts、app/theme-runtime.ts#readKitAllowedLayering)', writers: ['tier-compat'], readers: ['reskin', 'browser'], carrier: 'head' },
|
|
263
|
+
] as const);
|
|
264
|
+
|
|
265
|
+
/** 运行期由组件代码自报的属性(kind = runtime):5 条 */
|
|
266
|
+
export const KIT_PAGE_RUNTIME_ATTRS = /* @__PURE__ */ deepFreeze([
|
|
267
|
+
{ kind: 'runtime', key: 'level', label: '层级角色(组件运行期自报,也由编译期模板、配方与对象渲染器的静态模板写同一组属性)', writers: ['component-runtime', 'template'], readers: ['browser'], carrier: 'structure' },
|
|
268
|
+
{ kind: 'runtime', key: 'part', label: '元素部件(组件运行期按闭集 elementPart 自报,也由编译期模板、配方与对象渲染器的静态模板写同一组属性;同一属性上另有闭集外的配方部位标记,如字阶配方的 title-page、title-section、title-dialog、stat-value 与表头带 table-head、按钮 button,取值表读 title-section,结构层读 table-head、button;自报不改写闭集外的值)', writers: ['component-runtime', 'template'], readers: ['browser'], carrier: 'structure' },
|
|
269
|
+
{ kind: 'runtime', key: 'scope', label: '区域作用域(组件运行期自报,也由编译期模板、配方与对象渲染器的静态模板写同一组属性)', writers: ['component-runtime', 'template'], readers: ['browser'], carrier: 'structure' },
|
|
270
|
+
{ kind: 'runtime', key: 'dataState', label: '数据状态', writers: ['component-runtime'], readers: ['browser'], carrier: 'structure' },
|
|
271
|
+
{ kind: 'runtime', key: 'interact', label: '交互状态', writers: ['component-runtime'], readers: ['browser'], carrier: 'structure' },
|
|
272
|
+
] as const);
|
package/src/i18n/index.ts
CHANGED
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
// kit 国际化:内置文案表、运行期取词(元素读页面语言)、RTL 换向键、`$t:` 编译期解析。
|
|
2
2
|
export {
|
|
3
3
|
KIT_TEXT_LOCALES,
|
|
4
|
+
defineKitPackTexts,
|
|
4
5
|
isKitTextKey,
|
|
5
6
|
kitBuiltinText,
|
|
6
7
|
kitDirAt,
|
|
7
8
|
kitDirOfLocale,
|
|
8
9
|
kitKey,
|
|
9
10
|
kitLocaleAt,
|
|
11
|
+
kitPackText,
|
|
10
12
|
kitText,
|
|
11
13
|
kitTextCoverage,
|
|
12
14
|
kitTextLocaleOf,
|
package/src/i18n/kit-text.ts
CHANGED
|
@@ -18,6 +18,7 @@ import { interpolate } from 'soma-core/i18n';
|
|
|
18
18
|
import { KIT_GRAMMAR_RUNTIME as grammarJson } from '../generated/kit-grammar-runtime';
|
|
19
19
|
import { swapKeyForDir } from 'soma-core/keyboard';
|
|
20
20
|
import { kitFail } from '../shared/kit-error';
|
|
21
|
+
import { KIT_ATTR_LANG_DEFAULT } from '../shared/dom-attrs';
|
|
21
22
|
|
|
22
23
|
/** 键 → { zh-CN, en };新增词条只改这一张表 */
|
|
23
24
|
const TEXTS = {
|
|
@@ -26,10 +27,16 @@ const TEXTS = {
|
|
|
26
27
|
'soma.kit.confirm': { 'zh-CN': '确认', en: 'Confirm' },
|
|
27
28
|
'soma.kit.confirm_remove_named': { 'zh-CN': '确定删除「{name}」?', en: 'Delete "{name}"?' },
|
|
28
29
|
'soma.kit.confirm_remove':{ 'zh-CN': '确认删除该记录?删除后不可恢复。', en: 'Delete this record? This cannot be undone.' },
|
|
30
|
+
// 非删除类危险动作(停用 / 归档 / 级联一类)的缺省确认:模板输入处补确认(object-renderer/collection-table.ts#kitDangerConfirmText)与
|
|
31
|
+
// 危险三档档 2 的缺省文案(compile/danger-tier.ts#applyDangerTiers)共用。{action} 是动作名;带名字的一条只给有行可代入且对象有标题字段的动作,
|
|
32
|
+
// {name} 由调用方给成行占位 `{标题字段}`(core 按被操作行代入),与 confirm_remove_named 同一个写法
|
|
33
|
+
'soma.kit.confirm_action_named': { 'zh-CN': '{action}「{name}」?', en: '{action} "{name}"?' },
|
|
34
|
+
'soma.kit.confirm_action': { 'zh-CN': '{action}?', en: '{action}?' },
|
|
29
35
|
// 确认窗口文案派生(askKitConfirm 唯一出口):确认文本的第一句问句是标题(去掉这些空泛前缀),其余是后果说明;
|
|
30
36
|
// 主钮取标题开头命中的具体动词(下表,长的先配),都不命中才用「确认」
|
|
31
37
|
'soma.kit.confirm_prefixes': { 'zh-CN': '请确认|确认要|确定要|确认|确定|是否', en: 'Are you sure you want to |Do you want to |Confirm ' },
|
|
32
38
|
'soma.kit.confirm_verbs': { 'zh-CN': '取消授权|删除|移除|停用|启用|放弃|撤销|撤回|关闭|发布|提交|重置|清空|退出|覆盖|恢复|归档|下线|上线|签发|吊销|解绑|绑定|应用|导出|导入|同步|保存|离开', en: 'Delete|Remove|Disable|Enable|Discard|Revoke|Withdraw|Close|Publish|Submit|Reset|Clear|Leave|Overwrite|Restore|Archive|Unbind|Bind|Apply|Export|Import|Sync|Save' },
|
|
39
|
+
'soma.kit.confirm_switch_dirty': { 'zh-CN': '当前有未保存的修改,切换后修改将丢失。确定切换?', en: 'You have unsaved changes that will be lost if you switch. Switch anyway?' },
|
|
33
40
|
'soma.kit.cancel': { 'zh-CN': '取消', en: 'Cancel' },
|
|
34
41
|
'soma.kit.close': { 'zh-CN': '关闭', en: 'Close' },
|
|
35
42
|
'soma.kit.save': { 'zh-CN': '保存', en: 'Save' },
|
|
@@ -38,12 +45,14 @@ const TEXTS = {
|
|
|
38
45
|
'soma.kit.edit': { 'zh-CN': '编辑', en: 'Edit' },
|
|
39
46
|
'soma.kit.delete': { 'zh-CN': '删除', en: 'Delete' },
|
|
40
47
|
'soma.kit.remove': { 'zh-CN': '移除', en: 'Remove' },
|
|
48
|
+
'soma.kit.download': { 'zh-CN': '下载', en: 'Download' },
|
|
41
49
|
'soma.kit.add': { 'zh-CN': '添加', en: 'Add' },
|
|
42
50
|
'soma.kit.clear': { 'zh-CN': '清除', en: 'Clear' },
|
|
43
51
|
'soma.kit.search': { 'zh-CN': '搜索', en: 'Search' },
|
|
44
52
|
'soma.kit.more': { 'zh-CN': '更多', en: 'More' },
|
|
45
53
|
'soma.kit.more_actions': { 'zh-CN': '更多操作', en: 'More actions' },
|
|
46
54
|
'soma.kit.back': { 'zh-CN': '返回', en: 'Back' },
|
|
55
|
+
'soma.kit.form_steps': { 'zh-CN': '填写步骤', en: 'Sections' },
|
|
47
56
|
'soma.kit.submit': { 'zh-CN': '提交', en: 'Submit' },
|
|
48
57
|
'soma.kit.copy': { 'zh-CN': '复制', en: 'Copy' },
|
|
49
58
|
'soma.kit.copied': { 'zh-CN': '已复制', en: 'Copied' },
|
|
@@ -103,6 +112,9 @@ const TEXTS = {
|
|
|
103
112
|
'soma.kit.select_record': { 'zh-CN': '选择记录', en: 'Select records' },
|
|
104
113
|
'soma.kit.pick_color': { 'zh-CN': '选择颜色', en: 'Pick a color' },
|
|
105
114
|
'soma.kit.color_presets': { 'zh-CN': '预设颜色', en: 'Preset colors' },
|
|
115
|
+
'soma.kit.color_plane': { 'zh-CN': '饱和度与明度', en: 'Saturation and brightness' },
|
|
116
|
+
'soma.kit.color_hue': { 'zh-CN': '色相', en: 'Hue' },
|
|
117
|
+
'soma.kit.file_list': { 'zh-CN': '文件', en: 'Files' },
|
|
106
118
|
'soma.kit.color_invalid': { 'zh-CN': '请输入 #rrggbb 或 #rgb', en: 'Enter #rrggbb or #rgb' },
|
|
107
119
|
'soma.kit.progress': { 'zh-CN': '进度', en: 'Progress' },
|
|
108
120
|
'soma.kit.delta_up': { 'zh-CN': '上升', en: 'Up' },
|
|
@@ -181,6 +193,10 @@ const TEXTS = {
|
|
|
181
193
|
'soma.kit.more_menu': { 'zh-CN': '更多', en: 'More' },
|
|
182
194
|
'soma.kit.head_ops': { 'zh-CN': '操作', en: 'Actions' },
|
|
183
195
|
'soma.kit.head_select': { 'zh-CN': '选择', en: 'Select' },
|
|
196
|
+
'soma.kit.head_serial': { 'zh-CN': '序号', en: 'No.' },
|
|
197
|
+
'soma.kit.head_reorder': { 'zh-CN': '排序', en: 'Reorder' },
|
|
198
|
+
'soma.kit.reorder_handle_of': { 'zh-CN': '拖动排序:{name}', en: 'Drag to reorder: {name}' },
|
|
199
|
+
'soma.kit.reorder_moved': { 'zh-CN': '已移到第 {n} 位', en: 'Moved to position {n}' },
|
|
184
200
|
// ── 树表 / 列表 / 看板 / 树 / 富文本 ──
|
|
185
201
|
'soma.kit.expand_all': { 'zh-CN': '全部展开', en: 'Expand all' },
|
|
186
202
|
'soma.kit.collapse_all': { 'zh-CN': '全部收起', en: 'Collapse all' },
|
|
@@ -298,6 +314,9 @@ const TEXTS = {
|
|
|
298
314
|
'soma.kit.chart_type_treemap': { 'zh-CN': '矩形树图', en: 'Treemap' },
|
|
299
315
|
'soma.kit.chart_type_sunburst': { 'zh-CN': '旭日图', en: 'Sunburst chart' },
|
|
300
316
|
'soma.kit.chart_type_chord': { 'zh-CN': '弦图', en: 'Chord diagram' },
|
|
317
|
+
'soma.kit.chart_type_rose': { 'zh-CN': '玫瑰图', en: 'Rose chart' },
|
|
318
|
+
'soma.kit.chart_type_network': { 'zh-CN': '关系网络图', en: 'Network graph' },
|
|
319
|
+
'soma.kit.chart_type_bullet': { 'zh-CN': '子弹图', en: 'Bullet chart' },
|
|
301
320
|
// ── 工作台外壳(workspace-frame)──
|
|
302
321
|
'soma.kit.ws_menu': { 'zh-CN': '菜单', en: 'Menu' },
|
|
303
322
|
'soma.kit.ws_breadcrumbs': { 'zh-CN': '当前位置', en: 'Breadcrumb' },
|
|
@@ -306,6 +325,13 @@ const TEXTS = {
|
|
|
306
325
|
'soma.kit.ws_close_tab_named': { 'zh-CN': '关闭标签页「{title}」', en: 'Close tab "{title}"' },
|
|
307
326
|
'soma.kit.ws_confirm_close_other': { 'zh-CN': '关闭除当前页外的其他标签?', en: 'Close all tabs except the current one?' },
|
|
308
327
|
'soma.kit.ws_confirm_close_all': { 'zh-CN': '关闭全部标签?', en: 'Close all tabs?' },
|
|
328
|
+
// 页签里的页面有未保存的表单修改:关闭、刷新、被顶替、关闭其他 / 全部前先问(页面经同源消息向外壳报告脏状态)
|
|
329
|
+
'soma.kit.ws_confirm_close_dirty': { 'zh-CN': '「{title}」有未保存的修改,关闭后修改将丢失。确定关闭?', en: '"{title}" has unsaved changes that will be lost. Close it anyway?' },
|
|
330
|
+
'soma.kit.ws_confirm_close_dirty_with_others': { 'zh-CN': '即将关闭 {n} 个标签页,其中「{title}」有未保存的修改,关闭后修改将丢失。确定关闭?', en: '{n} tabs will be closed, including "{title}" which has unsaved changes that will be lost. Close them anyway?' },
|
|
331
|
+
'soma.kit.ws_confirm_close_dirty_many': { 'zh-CN': '有 {n} 个标签页含未保存的修改,关闭后修改将丢失。确定关闭?', en: '{n} tabs have unsaved changes that will be lost. Close them anyway?' },
|
|
332
|
+
'soma.kit.ws_confirm_refresh_dirty': { 'zh-CN': '「{title}」有未保存的修改,刷新后修改将丢失。确定刷新?', en: '"{title}" has unsaved changes that will be lost. Refresh anyway?' },
|
|
333
|
+
'soma.kit.ws_confirm_replace_dirty': { 'zh-CN': '「{title}」有未保存的修改,替换后修改将丢失。确定替换?', en: '"{title}" has unsaved changes that will be lost. Replace it anyway?' },
|
|
334
|
+
'soma.kit.ws_confirm_evict_dirty': { 'zh-CN': '标签页已达上限,打开新页面会关闭最久未用的「{title}」,其中有未保存的修改将丢失。确定继续?', en: 'The tab limit was reached. Opening a new page closes the least recently used tab "{title}", and its unsaved changes will be lost. Continue?' },
|
|
309
335
|
'soma.kit.ws_tab_ops': { 'zh-CN': '标签操作', en: 'Tab actions' },
|
|
310
336
|
'soma.kit.ws_refresh': { 'zh-CN': '刷新当前页', en: 'Refresh this page' },
|
|
311
337
|
'soma.kit.ws_close_other': { 'zh-CN': '关闭其他标签', en: 'Close other tabs' },
|
|
@@ -346,6 +372,14 @@ const TEXTS = {
|
|
|
346
372
|
// ── 反应条 / 业务组件 ──
|
|
347
373
|
'soma.kit.add_reaction': { 'zh-CN': '添加回应', en: 'Add reaction' },
|
|
348
374
|
'soma.kit.saved': { 'zh-CN': '保存成功', en: 'Saved' },
|
|
375
|
+
// 泳道 B / D(结构第一批 B1-3、B1-6):保存回声的带名轻提示、主从单窗格的「返回」
|
|
376
|
+
'soma.kit.created_named': { 'zh-CN': '已创建「{name}」', en: 'Created "{name}"' },
|
|
377
|
+
'soma.kit.saved_named': { 'zh-CN': '已保存「{name}」', en: 'Saved "{name}"' },
|
|
378
|
+
// 危险三档档 0(KT-P-danger):可撤回动作执行后的轻提示与「撤销」按钮
|
|
379
|
+
'soma.kit.undo_done': { 'zh-CN': '已{verb}「{name}」', en: '{verb}: "{name}"' },
|
|
380
|
+
'soma.kit.undo_done_bare': { 'zh-CN': '已{verb}', en: '{verb}: done' },
|
|
381
|
+
'soma.kit.undo': { 'zh-CN': '撤销', en: 'Undo' },
|
|
382
|
+
'soma.kit.ms_back': { 'zh-CN': '返回列表', en: 'Back to list' },
|
|
349
383
|
'soma.kit.ms_unselected': { 'zh-CN': '请选择左侧记录', en: 'Select a record on the left' },
|
|
350
384
|
'soma.kit.step_failed': { 'zh-CN': '提交失败', en: 'Submit failed' },
|
|
351
385
|
// ── 展示与状态(GC:本地草稿 / 版本锁 / 画布建议) ──
|
|
@@ -388,6 +422,15 @@ const TEXTS = {
|
|
|
388
422
|
'soma.kit.dp_dialog': { 'zh-CN': '选择日期', en: 'Choose date' },
|
|
389
423
|
'soma.kit.dp_prev_month': { 'zh-CN': '上个月', en: 'Previous month' },
|
|
390
424
|
'soma.kit.dp_next_month': { 'zh-CN': '下个月', en: 'Next month' },
|
|
425
|
+
'soma.kit.tr_dialog': { 'zh-CN': '选择时间范围', en: 'Choose time range' },
|
|
426
|
+
'soma.kit.tr_start': { 'zh-CN': '开始时间', en: 'Start time' },
|
|
427
|
+
'soma.kit.tr_end': { 'zh-CN': '结束时间', en: 'End time' },
|
|
428
|
+
'soma.kit.pp_prev': { 'zh-CN': '上一页', en: 'Previous' },
|
|
429
|
+
'soma.kit.pp_next': { 'zh-CN': '下一页', en: 'Next' },
|
|
430
|
+
'soma.kit.pp_week': { 'zh-CN': '选择周', en: 'Choose week' },
|
|
431
|
+
'soma.kit.pp_month': { 'zh-CN': '选择月份', en: 'Choose month' },
|
|
432
|
+
'soma.kit.pp_quarter': { 'zh-CN': '选择季度', en: 'Choose quarter' },
|
|
433
|
+
'soma.kit.pp_year': { 'zh-CN': '选择年份', en: 'Choose year' },
|
|
391
434
|
'soma.kit.dp_pick_start': { 'zh-CN': '请选择开始日期', en: 'Select a start date' },
|
|
392
435
|
'soma.kit.dp_pick_end': { 'zh-CN': '请选择结束日期', en: 'Select an end date' },
|
|
393
436
|
'soma.kit.dp_placeholder': { 'zh-CN': 'YYYY-MM-DD', en: 'YYYY-MM-DD' },
|
|
@@ -485,6 +528,31 @@ const TEXTS = {
|
|
|
485
528
|
'soma.kit.tl_empty': { 'zh-CN': '暂无记录', en: 'No records' },
|
|
486
529
|
'soma.kit.tl_other': { 'zh-CN': '其他', en: 'Other' },
|
|
487
530
|
'soma.kit.tl_yesterday': { 'zh-CN': '昨天', en: 'Yesterday' },
|
|
531
|
+
// 审计日志 / 日志流 / 状态流转条 / 热力日历 / 组织架构图(timeline 线)
|
|
532
|
+
'soma.kit.al_changed': { 'zh-CN': '修改了', en: 'changed' },
|
|
533
|
+
'soma.kit.al_empty_value': { 'zh-CN': '(空)', en: '(empty)' },
|
|
534
|
+
'soma.kit.al_failure': { 'zh-CN': '失败', en: 'Failed' },
|
|
535
|
+
'soma.kit.al_denied': { 'zh-CN': '已拒绝', en: 'Denied' },
|
|
536
|
+
'soma.kit.al_expand_n': { 'zh-CN': '展开 {n} 处变更', en: 'Show {n} changes' },
|
|
537
|
+
'soma.kit.al_no_match': { 'zh-CN': '没有符合条件的记录', en: 'No matching records' },
|
|
538
|
+
'soma.kit.al_immutable': { 'zh-CN': '记录不可修改', en: 'Records cannot be modified' },
|
|
539
|
+
'soma.kit.al_export': { 'zh-CN': '导出', en: 'Export' },
|
|
540
|
+
'soma.kit.al_col_time': { 'zh-CN': '时间', en: 'Time' },
|
|
541
|
+
'soma.kit.al_col_actor': { 'zh-CN': '操作人', en: 'Actor' },
|
|
542
|
+
'soma.kit.al_col_action': { 'zh-CN': '动作', en: 'Action' },
|
|
543
|
+
'soma.kit.al_col_target': { 'zh-CN': '对象', en: 'Object' },
|
|
544
|
+
'soma.kit.al_col_result': { 'zh-CN': '结果', en: 'Result' },
|
|
545
|
+
'soma.kit.al_col_source': { 'zh-CN': '来源', en: 'Source' },
|
|
546
|
+
'soma.kit.lg_empty': { 'zh-CN': '暂无日志', en: 'No log lines' },
|
|
547
|
+
'soma.kit.lg_latest': { 'zh-CN': '回到最新', en: 'Jump to latest' },
|
|
548
|
+
'soma.kit.lg_new_n': { 'zh-CN': '{n} 条新日志', en: '{n} new' },
|
|
549
|
+
'soma.kit.lg_repeat_n': { 'zh-CN': '重复 {n} 次', en: 'Repeated {n} times' },
|
|
550
|
+
'soma.kit.sf_empty': { 'zh-CN': '暂无阶段', en: 'No stages' },
|
|
551
|
+
'soma.kit.sf_current': { 'zh-CN': '当前', en: 'Current' },
|
|
552
|
+
'soma.kit.hm_less': { 'zh-CN': '少', en: 'Less' },
|
|
553
|
+
'soma.kit.hm_more': { 'zh-CN': '多', en: 'More' },
|
|
554
|
+
'soma.kit.hm_cell': { 'zh-CN': '{date}:{count}', en: '{date}: {count}' },
|
|
555
|
+
'soma.kit.oc_empty': { 'zh-CN': '暂无组织数据', en: 'No organization data' },
|
|
488
556
|
'soma.kit.cl_empty': { 'zh-CN': '暂无检查项', en: 'No checklist items' },
|
|
489
557
|
'soma.kit.checklist_done': { 'zh-CN': '已完成', en: 'Done' },
|
|
490
558
|
'soma.kit.checklist_todo': { 'zh-CN': '未完成', en: 'Not done' },
|
|
@@ -513,6 +581,7 @@ const TEXTS = {
|
|
|
513
581
|
'soma.kit.cal_today': { 'zh-CN': '今天', en: 'Today' },
|
|
514
582
|
'soma.kit.cal_month': { 'zh-CN': '月', en: 'Month' },
|
|
515
583
|
'soma.kit.cal_week': { 'zh-CN': '周', en: 'Week' },
|
|
584
|
+
'soma.kit.cal_day': { 'zh-CN': '日', en: 'Day' },
|
|
516
585
|
'soma.kit.cal_more': { 'zh-CN': '另有 {n} 项', en: '{n} more' },
|
|
517
586
|
// ── 评论 / 聊天(comment-thread)──
|
|
518
587
|
'soma.kit.ct_empty_chat': { 'zh-CN': '暂无消息', en: 'No messages' },
|
|
@@ -521,6 +590,17 @@ const TEXTS = {
|
|
|
521
590
|
'soma.kit.ct_sent': { 'zh-CN': '已发送', en: 'Sent' },
|
|
522
591
|
'soma.kit.ct_failed': { 'zh-CN': '发送失败', en: 'Failed to send' },
|
|
523
592
|
'soma.kit.ct_retry': { 'zh-CN': '重试', en: 'Retry' },
|
|
593
|
+
'soma.kit.ct_new': { 'zh-CN': '{n} 条新消息', en: '{n} new messages' },
|
|
594
|
+
'soma.kit.ct_thread': { 'zh-CN': '评论', en: 'Comments' },
|
|
595
|
+
'soma.kit.ct_title': { 'zh-CN': '评论', en: 'Comments' },
|
|
596
|
+
'soma.kit.ct_oldest': { 'zh-CN': '最早', en: 'Oldest' },
|
|
597
|
+
'soma.kit.ct_newest': { 'zh-CN': '最新', en: 'Newest' },
|
|
598
|
+
'soma.kit.ct_earlier': { 'zh-CN': '加载更早', en: 'Load earlier' },
|
|
599
|
+
'soma.kit.ct_deleted': { 'zh-CN': '该评论已删除', en: 'This comment was deleted' },
|
|
600
|
+
'soma.kit.ct_edited': { 'zh-CN': '已编辑', en: 'Edited' },
|
|
601
|
+
'soma.kit.ct_edit': { 'zh-CN': '编辑', en: 'Edit' },
|
|
602
|
+
'soma.kit.ct_delete': { 'zh-CN': '删除', en: 'Delete' },
|
|
603
|
+
'soma.kit.ct_replies_n': { 'zh-CN': '展开 {n} 条回复', en: 'Show {n} replies' },
|
|
524
604
|
'soma.kit.ct_reply': { 'zh-CN': '回复', en: 'Reply' },
|
|
525
605
|
'soma.kit.ct_like': { 'zh-CN': '赞', en: 'Like' },
|
|
526
606
|
'soma.kit.ct_placeholder': { 'zh-CN': '写一条评论…', en: 'Write a comment…' },
|
|
@@ -573,6 +653,8 @@ const TEXTS = {
|
|
|
573
653
|
'soma.kit.form_conflict': { 'zh-CN': '数据已被他人修改,请刷新后重试', en: 'The data was changed by someone else. Refresh and try again' },
|
|
574
654
|
'soma.kit.filter_set_n': { 'zh-CN': '已设 {n} 项', en: '{n} set' },
|
|
575
655
|
'soma.kit.filter_more': { 'zh-CN': '更多筛选', en: 'More filters' },
|
|
656
|
+
// 窄容器筛选入口(窗格头:关键词框 + 这个图标钮,其余条件在它的浮层里)
|
|
657
|
+
'soma.kit.filter_entry': { 'zh-CN': '筛选', en: 'Filter' },
|
|
576
658
|
// ── 流程编排画布(flow-editor)──
|
|
577
659
|
'soma.kit.flow_canvas': { 'zh-CN': '流程画布', en: 'Flow canvas' },
|
|
578
660
|
'soma.kit.flow_help': { 'zh-CN': 'Tab 在节点间切换,方向键移动节点,Enter 打开配置,Delete 删除,C 从当前节点连线,I 在当前节点上方插入同类节点,Alt+上 / 下方向键调整先后,Ctrl+Z 撤销,Ctrl+Shift+Z 重做', en: 'Tab moves between nodes, arrow keys move a node, Enter opens its settings, Delete removes it, C connects from the current node, I inserts a node of the same type above it, Alt+Up / Alt+Down changes its order, Ctrl+Z undoes, Ctrl+Shift+Z redoes' },
|
|
@@ -583,7 +665,7 @@ const TEXTS = {
|
|
|
583
665
|
'soma.kit.flow_moved_up': { 'zh-CN': '已把「{label}」上移', en: 'Moved "{label}" up' },
|
|
584
666
|
'soma.kit.flow_moved_down': { 'zh-CN': '已把「{label}」下移', en: 'Moved "{label}" down' },
|
|
585
667
|
'soma.kit.flow_move_none': { 'zh-CN': '只有前后各只连一个节点的节点才能上下移', en: 'Only a node with a single neighbour on that side can be moved' },
|
|
586
|
-
'soma.kit.flow_empty': { 'zh-CN': '
|
|
668
|
+
'soma.kit.flow_empty': { 'zh-CN': '还没有节点', en: 'No nodes yet' },
|
|
587
669
|
'soma.kit.flow_emptyReadonly': { 'zh-CN': '暂无流程内容', en: 'No flow content' },
|
|
588
670
|
'soma.kit.flow_undo': { 'zh-CN': '撤销', en: 'Undo' },
|
|
589
671
|
'soma.kit.flow_redo': { 'zh-CN': '重做', en: 'Redo' },
|
|
@@ -594,7 +676,7 @@ const TEXTS = {
|
|
|
594
676
|
'soma.kit.flow_panel_title': { 'zh-CN': '节点配置:{label}', en: 'Node settings: {label}' },
|
|
595
677
|
'soma.kit.flow_panel_aria': { 'zh-CN': '节点配置面板', en: 'Node settings panel' },
|
|
596
678
|
'soma.kit.flow_dropped': { 'zh-CN': '映射目标须以 {prefix} 开头,已忽略:{names}', en: 'Mapping targets must start with {prefix}; ignored: {names}' },
|
|
597
|
-
'soma.kit.flow_map_empty': { 'zh-CN': '
|
|
679
|
+
'soma.kit.flow_map_empty': { 'zh-CN': '尚无映射', en: 'No mappings yet' },
|
|
598
680
|
'soma.kit.flow_pick_first': { 'zh-CN': '先选择「{field}」,再配置映射', en: 'Pick "{field}" first, then configure the mapping' },
|
|
599
681
|
'soma.kit.flow_select_ph': { 'zh-CN': '请选择', en: 'Select…' },
|
|
600
682
|
'soma.kit.flow_accept': { 'zh-CN': '采纳', en: 'Accept' },
|
|
@@ -628,8 +710,12 @@ const TEXTS = {
|
|
|
628
710
|
'soma.kit.flow_i_max_out': { 'zh-CN': '出边超过上限', en: 'Too many outgoing connections' },
|
|
629
711
|
'soma.kit.flow_i_cycle': { 'zh-CN': '流程中存在环', en: 'The flow contains a cycle' },
|
|
630
712
|
'soma.kit.badge_dot_label': { 'zh-CN': '有更新', en: 'Updated' },
|
|
713
|
+
'soma.kit.badge_unread_n': { 'zh-CN': '{n} 条未读', en: '{n} unread' },
|
|
714
|
+
'soma.kit.copy_failed': { 'zh-CN': '复制失败,请手动复制', en: 'Copy failed, please copy manually' },
|
|
631
715
|
'soma.kit.link_external': { 'zh-CN': '(在新窗口打开)', en: '(opens in a new window)' },
|
|
632
716
|
'soma.kit.avatar_more': { 'zh-CN': '另有 {n} 位', en: '{n} more' },
|
|
717
|
+
'soma.kit.records_count': { 'zh-CN': '{n} 条关联记录,点开查看', en: '{n} related records, open to view' },
|
|
718
|
+
'soma.kit.files_more': { 'zh-CN': '另有 {n} 个文件', en: '{n} more files' },
|
|
633
719
|
'soma.kit.qr_label': { 'zh-CN': '二维码', en: 'QR code' },
|
|
634
720
|
'soma.kit.otp_label': { 'zh-CN': '验证码', en: 'Verification code' },
|
|
635
721
|
'soma.kit.gallery_label': { 'zh-CN': '图片库', en: 'Image gallery' },
|
|
@@ -663,6 +749,9 @@ const TEXTS = {
|
|
|
663
749
|
'soma.kit.gantt_done': { 'zh-CN': ',已完成 {n}%', en: ', {n}% complete' },
|
|
664
750
|
'soma.kit.gantt_milestone': { 'zh-CN': '{title}:里程碑 {date}', en: '{title}: milestone {date}' },
|
|
665
751
|
'soma.kit.gantt_baseline': { 'zh-CN': ',基线 {start} 至 {end}', en: ', baseline {start} to {end}' },
|
|
752
|
+
'soma.kit.gantt_delayed': { 'zh-CN': '已逾期', en: 'Overdue' },
|
|
753
|
+
'soma.kit.gantt_invalid_date': { 'zh-CN': '日期无效', en: 'Invalid dates' },
|
|
754
|
+
'soma.kit.transfer_select_all': { 'zh-CN': '全选', en: 'Select all' },
|
|
666
755
|
'soma.kit.gantt_rest_day': { 'zh-CN': '休息日', en: 'Rest day' },
|
|
667
756
|
'soma.kit.matrix_empty': { 'zh-CN': '暂无数据', en: 'No data' },
|
|
668
757
|
'soma.kit.matrix_cell': { 'zh-CN': '{row} {col}:{text}', en: '{row} {col}: {text}' },
|
|
@@ -776,6 +865,10 @@ const TEXTS = {
|
|
|
776
865
|
'soma.kit.diff_engine_failed': { 'zh-CN': '差异计算不可用,分别显示两个版本', en: 'Diff is unavailable; showing both versions' },
|
|
777
866
|
'soma.kit.diff_value_changed': { 'zh-CN': '值已改变', en: 'Value changed' },
|
|
778
867
|
'soma.kit.diff_fragments_invalid': { 'zh-CN': '差异数据不完整,按新版本显示', en: 'Diff data is incomplete; showing the new version' },
|
|
868
|
+
// 泳道 A / C(结构第一批 B1-7、B1-9):动词闭集与关键词框占位
|
|
869
|
+
'soma.kit.flow_create': { 'zh-CN': '创建', en: 'Create' },
|
|
870
|
+
'soma.kit.flow_named': { 'zh-CN': '{verb}{noun}', en: '{verb} {noun}' },
|
|
871
|
+
'soma.kit.filter_search_named': { 'zh-CN': '搜索{name}', en: 'Search {name}' },
|
|
779
872
|
} as const;
|
|
780
873
|
|
|
781
874
|
export type KitTextKey = keyof typeof TEXTS;
|
|
@@ -799,7 +892,7 @@ export function kitTextLocaleOf(locale: string | undefined): KitTextLocale | nul
|
|
|
799
892
|
const RTL_LANGS: ReadonlySet<string> = new Set((grammarJson as unknown as { i18n: { rtlLangs: string[] } }).i18n.rtlLangs);
|
|
800
893
|
|
|
801
894
|
/** 页面根上标记 lang 是默认补的(非声明)的属性名 */
|
|
802
|
-
export const KIT_LANG_DEFAULT_MARK =
|
|
895
|
+
export const KIT_LANG_DEFAULT_MARK = KIT_ATTR_LANG_DEFAULT;
|
|
803
896
|
|
|
804
897
|
/** 页面没声明语言时页面根写的 `lang`(读语法真源 i18n.fallbackLocale.undeclared;与词条取值、格式化缺省同一语言) */
|
|
805
898
|
export const KIT_UNDECLARED_PAGE_LANG: string = (grammarJson as unknown as { i18n: { fallbackLocale: { undeclared: string } } }).i18n.fallbackLocale.undeclared;
|