openyida 2026.9.21 → 2026.9.22-beta.1
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 +14 -20
- package/bin/yida.js +6 -11
- package/lib/app/app-list.js +3 -7
- package/lib/app/canvas-compile.js +12 -22
- package/lib/app/check-prd-completeness.js +0 -7
- package/lib/app/create-app.js +1 -4
- package/lib/app/create-form/args.js +12 -37
- package/lib/app/create-form/batch.js +11 -86
- package/lib/app/create-form.js +86 -193
- package/lib/app/create-page.js +17 -84
- package/lib/app/custom-theme.js +0 -11
- package/lib/app/form-field-validator.js +41 -26
- package/lib/app/form-open-guard.js +10 -97
- package/lib/app/get-form-config.js +0 -1
- package/lib/app/inline-css-guard.js +31 -1
- package/lib/app/services/form-compiler.js +4 -2
- package/lib/app/theme-from-design.js +41 -144
- package/lib/app/theme-presets.js +1 -1
- package/lib/app/update-app.js +13 -63
- package/lib/asset/ai-image.js +9 -59
- package/lib/asset/asset-cmd.js +7 -18
- package/lib/asset/asset-plan.js +9 -102
- package/lib/asset/asset-resolve.js +10 -55
- package/lib/asset/asset-status.js +4 -5
- package/lib/asset/host-capabilities.js +2 -11
- package/lib/asset/url-verify.js +4 -19
- package/lib/auth/dws-sync.js +145 -0
- package/lib/auth/token-auth.js +73 -9
- package/lib/auth/token-store.js +50 -0
- package/lib/connector/connector-test.js +5 -19
- package/lib/connector/contract.js +1 -3
- package/lib/core/agent-capabilities.js +16 -19
- package/lib/core/command-manifest.js +40 -329
- package/lib/core/locales/en.js +17 -74
- package/lib/core/locales/zh.js +16 -73
- package/lib/core/redact.js +10 -15
- package/lib/core/sample.js +30 -72
- package/lib/core/utils.js +4 -0
- package/lib/design-plan/design-plan.js +4 -51
- package/lib/design-plan/init.js +26 -121
- package/lib/design-plan/materialize.js +348 -451
- package/lib/design-plan/normalize.js +29 -74
- package/lib/design-plan/parallel.js +16 -71
- package/lib/design-plan/patch.js +16 -63
- package/lib/design-plan/preview.js +8 -6
- package/lib/design-plan/validate.js +11 -71
- package/lib/process/create-process.js +50 -84
- package/lib/samples/openyida-scaffold/canvas-form-drawer.canvas.jsx +90 -20
- package/lib/samples/openyida-scaffold/canvas-nav/content.jsx +13 -93
- package/lib/samples/openyida-scaffold/canvas-nav/data.jsx +18 -100
- package/lib/samples/openyida-scaffold/canvas-nav/mixed.jsx +4 -6
- package/lib/samples/openyida-scaffold/canvas-nav/shared.jsx +5 -5
- package/lib/samples/openyida-scaffold/canvas-nav/side.jsx +2 -1
- package/lib/samples/openyida-scaffold/canvas-nav/sidebar.jsx +1 -1
- package/lib/samples/openyida-scaffold/canvas-nav/top.jsx +9 -15
- package/lib/samples/yida-canvas-table-form/table-form-batch-submit.canvas.jsx +83 -9
- package/lib/samples/yida-rechart/trend-combo.canvas.jsx +87 -14
- package/package.json +1 -3
- package/scripts/postinstall.js +3 -3
- package/yida-skills/SKILL.md +16 -19
- package/yida-skills/references/official-example-schema-patterns.md +1 -1
- package/yida-skills/references/yida-api.md +0 -4
- package/yida-skills/skills/yida-app/SKILL.md +23 -46
- package/yida-skills/skills/yida-app/workflow/parallel-work.md +6 -15
- package/yida-skills/skills/yida-app/workflow/plan/step-1-understand.md +1 -1
- package/yida-skills/skills/yida-app/workflow/plan/step-2-confirm.md +1 -1
- package/yida-skills/skills/yida-app/workflow/plan/step-4-deliver.md +15 -29
- package/yida-skills/skills/yida-app/workflow/plan/workflow.md +11 -29
- package/yida-skills/skills/yida-app/workflow/step-1-resource-context.md +2 -4
- package/yida-skills/skills/yida-app/workflow/step-2-design.md +9 -23
- package/yida-skills/skills/yida-app/workflow/step-3-create-or-reuse-app.md +4 -6
- package/yida-skills/skills/yida-app/workflow/step-4-forms-processes.md +4 -15
- package/yida-skills/skills/yida-app/workflow/step-6-main-page.md +4 -6
- package/yida-skills/skills/yida-app/workflow/step-7-page-code.md +9 -15
- package/yida-skills/skills/yida-app/workflow/step-8-publish-navigation.md +11 -25
- package/yida-skills/skills/yida-app/workflow/step-9-output-finish.md +28 -68
- package/yida-skills/skills/yida-canvas-custom-page/SKILL.md +43 -42
- package/yida-skills/skills/yida-canvas-custom-page/references/canvas-style-implementation-guide.md +44 -60
- package/yida-skills/skills/yida-canvas-custom-page/references/canvas-theme-provider.md +50 -72
- package/yida-skills/skills/yida-canvas-custom-page/references/component-library-guide.md +1 -13
- package/yida-skills/skills/yida-canvas-custom-page/references/data-bridge-guide.md +1 -140
- package/yida-skills/skills/yida-canvas-custom-page/references/navigation-and-entry-guide.md +72 -101
- package/yida-skills/skills/yida-canvas-custom-page/references/page-generation-guide.md +32 -35
- package/yida-skills/skills/yida-canvas-custom-page/scripts/build-canvas-theme.js +3 -29
- package/yida-skills/skills/yida-canvas-custom-page/scripts/canvas-theme-provider.template.jsx +6 -69
- package/yida-skills/skills/yida-canvas-data-binding/SKILL.md +0 -26
- package/yida-skills/skills/yida-create-app/SKILL.md +0 -2
- package/yida-skills/skills/yida-create-form-page/SKILL.md +58 -72
- package/yida-skills/skills/yida-create-form-page/references/advanced-form-modes.md +5 -5
- package/yida-skills/skills/yida-create-form-page/references/association-form-field.md +4 -4
- package/yida-skills/skills/yida-create-form-page/references/batch-forms.md +5 -6
- package/yida-skills/skills/yida-create-form-page/references/field-definition-guide.md +19 -7
- package/yida-skills/skills/yida-create-form-page/references/form-field-properties.md +44 -62
- package/yida-skills/skills/yida-create-page/SKILL.md +6 -14
- package/yida-skills/skills/yida-create-process/SKILL.md +2 -13
- package/yida-skills/skills/yida-custom-page/SKILL.md +0 -2
- package/yida-skills/skills/yida-custom-page/references/design-system.md +1 -1
- package/yida-skills/skills/yida-dashboard/SKILL.md +4 -5
- package/yida-skills/skills/yida-data-management/SKILL.md +2 -4
- package/yida-skills/skills/yida-data-management/references/data-format-guide.md +4 -4
- package/yida-skills/skills/yida-design/SKILL.md +14 -29
- package/yida-skills/skills/yida-design/references/app/blueprint.md +70 -0
- package/yida-skills/skills/yida-design/references/app/navigation-patterns.md +43 -0
- package/yida-skills/skills/yida-design/references/app/role-journey.md +30 -0
- package/yida-skills/skills/yida-design/references/ask-human-interaction-contract.md +42 -67
- package/yida-skills/skills/yida-design/references/asset-workflow.md +2 -6
- package/yida-skills/skills/yida-design/references/design-mode.md +4 -4
- package/yida-skills/skills/yida-design/references/page-quality-gates.md +38 -26
- package/yida-skills/skills/yida-design/references/style-design-selection.md +137 -0
- package/yida-skills/skills/yida-design/references/style-designs/_design-md-template.md +185 -0
- package/yida-skills/skills/yida-design/references/style-designs/aqua-service-progress-dashboard.md +242 -0
- package/yida-skills/skills/yida-design/references/style-designs/blue-insight-operations-dashboard.md +243 -0
- package/yida-skills/skills/yida-design/references/style-designs/blue-productivity-insight-workbench.md +242 -0
- package/yida-skills/skills/yida-design/references/style-designs/command-filter-card-console.md +304 -0
- package/yida-skills/skills/yida-design/references/style-designs/contrast-command-analytics-workbench.md +261 -0
- package/yida-skills/skills/yida-design/references/style-designs/dark-stage-analytic-dashboard.md +369 -0
- package/yida-skills/skills/yida-design/references/style-designs/filterable-card-catalog.md +354 -0
- package/yida-skills/skills/yida-design/references/style-designs/green-timeline-progress-workbench.md +250 -0
- package/yida-skills/skills/yida-design/references/style-designs/registry.md +117 -0
- package/yida-skills/skills/yida-design/references/style-designs/soft-analytic-workbench.md +348 -0
- package/yida-skills/skills/yida-design/references/style-designs/soft-blue-grid-analytic-dashboard.md +658 -0
- package/yida-skills/skills/yida-design/references/style-designs/soft-bordered-analytic-workbench.md +385 -0
- package/yida-skills/skills/yida-design/references/style-designs/soft-curated-filter-gallery.md +300 -0
- package/yida-skills/skills/yida-design/references/style-designs/soft-modular-analytic-workbench.md +404 -0
- package/yida-skills/skills/yida-design/references/style-designs/soft-progress-analytics-workbench.md +382 -0
- package/yida-skills/skills/yida-design/references/style-designs/soft-timeline-analytics-workbench.md +367 -0
- package/yida-skills/skills/yida-design/references/style-designs/teal-rail-analytics-workbench.md +341 -0
- package/yida-skills/skills/yida-design/references/theme/app-custom-theme-template.css +432 -350
- package/yida-skills/skills/yida-design/references/visual-decision-engine.md +143 -19
- package/yida-skills/skills/yida-design/references/visual-scaffold-recipes.md +27 -15
- package/yida-skills/skills/yida-design/sub_skill/page-design/SKILL.md +0 -4
- package/yida-skills/skills/yida-design/sub_skill/yida-design-plan/SKILL.md +8 -22
- package/yida-skills/skills/yida-design/sub_skill/yida-design-plan/assets/README.md +10 -14
- package/yida-skills/skills/yida-design/sub_skill/yida-design-plan/assets/build-plan-template.html +4 -9
- package/yida-skills/skills/yida-design/sub_skill/yida-design-plan/references/build-plan-compact-schema.md +27 -49
- package/yida-skills/skills/yida-design/sub_skill/yida-design-plan/references/build-plan-schema.md +154 -33
- package/yida-skills/skills/yida-design/sub_skill/yida-design-plan/references/visual-design.md +127 -48
- package/yida-skills/skills/yida-design/sub_skill/yida-design-plan/references/visual-theme-selection.md +51 -37
- package/yida-skills/skills/yida-design/sub_skill/yida-design-plan/scripts/render_build_plan.py +48 -43
- package/yida-skills/skills/yida-design/sub_skill/yida-design-plan/scripts/validate_design_themes.py +190 -0
- package/yida-skills/skills/yida-design/sub_skill/yida-design-plan/templates/design-themes/README.md +98 -0
- package/yida-skills/skills/yida-design/sub_skill/yida-design-plan/templates/design-themes/airy-media-grid.md +339 -0
- package/yida-skills/skills/yida-design/sub_skill/yida-design-plan/templates/design-themes/airy-modular-clarity.md +348 -0
- package/yida-skills/skills/yida-design/sub_skill/yida-design-plan/templates/design-themes/airy-structured-clarity.md +344 -0
- package/yida-skills/skills/yida-design/sub_skill/yida-design-plan/templates/design-themes/ambient-halo-layered.md +345 -0
- package/yida-skills/skills/yida-design/sub_skill/yida-design-plan/templates/design-themes/dark-focus-layered.md +355 -0
- package/yida-skills/skills/yida-design/sub_skill/yida-design-plan/templates/design-themes/dark-luminous-modular.md +377 -0
- package/yida-skills/skills/yida-design/sub_skill/yida-design-plan/templates/design-themes/deep-stage-duotone.md +352 -0
- package/yida-skills/skills/yida-design/sub_skill/yida-design-plan/templates/design-themes/hairline-runway-clarity.md +389 -0
- package/yida-skills/skills/yida-design/sub_skill/yida-design-plan/templates/design-themes/high-contrast-modular.md +364 -0
- package/yida-skills/skills/yida-design/sub_skill/yida-design-plan/templates/design-themes/index.json +329 -0
- package/yida-skills/skills/yida-design/sub_skill/yida-design-plan/templates/design-themes/interlocked-vivid-modules.md +348 -0
- package/yida-skills/skills/yida-design/sub_skill/yida-design-plan/templates/design-themes/matrix-grid-focus.md +345 -0
- package/yida-skills/skills/yida-design/sub_skill/yida-design-plan/templates/design-themes/media-rail-inspector.md +379 -0
- package/yida-skills/skills/yida-design/sub_skill/yida-design-plan/templates/design-themes/mist-layered-signal.md +347 -0
- package/yida-skills/skills/yida-design/sub_skill/yida-design-plan/templates/design-themes/modular-rail-signal.md +352 -0
- package/yida-skills/skills/yida-design/sub_skill/yida-design-plan/templates/design-themes/mono-grid-signal.md +386 -0
- package/yida-skills/skills/yida-design/sub_skill/yida-design-plan/templates/design-themes/ribbon-ledger-lift.md +384 -0
- package/yida-skills/skills/yida-design/sub_skill/yida-design-plan/templates/design-themes/segmented-meter-clarity.md +388 -0
- package/yida-skills/skills/yida-design/sub_skill/yida-design-plan/templates/design-themes/split-rail-precision.md +341 -0
- package/yida-skills/skills/yida-design/sub_skill/yida-design-plan/templates/design-themes/status-framed-media-grid.md +361 -0
- package/yida-skills/skills/yida-design/workflow/output-design.md +375 -117
- package/yida-skills/skills/yida-design/workflow/output-prd.md +185 -0
- package/yida-skills/skills/yida-design/workflow/step-1-read-brief.md +1 -1
- package/yida-skills/skills/yida-design/workflow/step-2-theme-system.md +29 -33
- package/yida-skills/skills/yida-design/workflow/step-4-wireframe-interaction.md +1 -3
- package/yida-skills/skills/yida-design/workflow/step-5-visual-states.md +106 -22
- package/yida-skills/skills/yida-design/workflow/step-6-handoff.md +22 -15
- package/yida-skills/skills/yida-form-permission/SKILL.md +0 -6
- package/yida-skills/skills/yida-image-assets/SKILL.md +50 -73
- package/yida-skills/skills/yida-image-assets/references/manifest-contract.md +52 -82
- package/yida-skills/skills/yida-image-assets/references/source-policy.md +15 -14
- package/yida-skills/skills/yida-integration/SKILL.md +0 -1
- package/yida-skills/skills/yida-login/SKILL.md +0 -2
- package/yida-skills/skills/yida-nav-group/SKILL.md +2 -4
- package/yida-skills/skills/yida-nav-shell/SKILL.md +12 -36
- package/yida-skills/skills/yida-nav-shell/references/nav-shell-patterns.md +136 -79
- package/yida-skills/skills/yida-page-config/SKILL.md +4 -13
- package/yida-skills/skills/yida-prd/SKILL.md +3 -5
- package/yida-skills/skills/yida-prd/references/app/blueprint.md +4 -4
- package/yida-skills/skills/yida-prd/references/app/navigation-patterns.md +3 -6
- package/yida-skills/skills/yida-prd/references/app/role-journey.md +3 -5
- package/yida-skills/skills/yida-prd/references/plan-content.md +0 -4
- package/yida-skills/skills/yida-prd/workflow/output-prd.md +11 -18
- package/yida-skills/skills/yida-prd/workflow/plan-business.md +4 -4
- package/yida-skills/skills/yida-prd/workflow/step-2-information-architecture.md +8 -11
- package/yida-skills/skills/yida-publish-page/SKILL.md +1 -9
- package/yida-skills/skills/yida-requirement-analysis/SKILL.md +39 -10
- package/yida-skills/skills/yida-requirement-analysis/workflow/prepare-brief.md +71 -40
- package/yida-skills/skills-index.json +16 -36
- package/lib/app/application-entry-urls.js +0 -31
- package/lib/app/application-style.js +0 -69
- package/lib/app/canvas-icon-exports.json +0 -6160
- package/lib/app/canvas-icon-guard.js +0 -87
- package/lib/app/canvas-navigation-guard.js +0 -84
- package/lib/app/canvas-path-guard.js +0 -78
- package/lib/app/canvas-theme-guard.js +0 -184
- package/lib/app/form-data-response-guard.js +0 -57
- package/lib/asset/asset-execution.js +0 -79
- package/lib/core/css-structure.js +0 -37
- package/lib/design/check-design.js +0 -51
- package/lib/design/document.js +0 -458
- package/lib/design/icon-contrast.js +0 -85
- package/lib/design/page-content.js +0 -11
- package/lib/design-plan/artifact-updates.js +0 -117
- package/lib/design-plan/confirmation.js +0 -13
- package/lib/design-plan/entry-navigation.js +0 -97
- package/lib/design-plan/navigation-policy.js +0 -38
- package/lib/design-plan/rebase.js +0 -60
- package/lib/design-plan/themes.js +0 -101
- package/lib/design-plan/visual-policy.js +0 -42
- package/lib/samples/openyida-scaffold/canvas-admin-entry.jsx +0 -62
- package/lib/samples/openyida-scaffold/canvas-navigation.jsx +0 -56
- package/lib/samples/openyida-scaffold/canvas-view-state.jsx +0 -74
- package/yida-skills/skills/yida-app/references/entry-navigation.md +0 -193
- package/yida-skills/skills/yida-canvas-custom-page/references/view-state-recovery.md +0 -52
- package/yida-skills/skills/yida-canvas-data-binding/references/business-action-permissions.md +0 -31
- package/yida-skills/skills/yida-design/references/application-style-library.md +0 -93
- package/yida-skills/skills/yida-design/references/application-theme-consistency.md +0 -150
- package/yida-skills/skills/yida-design/references/native-form-styles.md +0 -208
- package/yida-skills/skills/yida-design/references/navigation-decision.md +0 -53
- package/yida-skills/skills/yida-design/references/page-continuity.md +0 -42
- package/yida-skills/skills/yida-design/references/theme/application-style-recipes.css +0 -58
- package/yida-skills/skills/yida-design/references/theme-selection.md +0 -67
- package/yida-skills/skills/yida-design/scripts/validate_design_themes.py +0 -302
- package/yida-skills/skills/yida-design/templates/application-styles.json +0 -398
- package/yida-skills/skills/yida-design/templates/design-themes/README.md +0 -73
- package/yida-skills/skills/yida-design/templates/design-themes/app-amber/app_theme.css +0 -748
- package/yida-skills/skills/yida-design/templates/design-themes/app-amber/design.md +0 -274
- package/yida-skills/skills/yida-design/templates/design-themes/app-amber/form-layout.json +0 -15
- package/yida-skills/skills/yida-design/templates/design-themes/app-editorial/app_theme.css +0 -748
- package/yida-skills/skills/yida-design/templates/design-themes/app-editorial/design.md +0 -274
- package/yida-skills/skills/yida-design/templates/design-themes/app-editorial/form-layout.json +0 -14
- package/yida-skills/skills/yida-design/templates/design-themes/app-executive/app_theme.css +0 -748
- package/yida-skills/skills/yida-design/templates/design-themes/app-executive/design.md +0 -274
- package/yida-skills/skills/yida-design/templates/design-themes/app-executive/form-layout.json +0 -13
- package/yida-skills/skills/yida-design/templates/design-themes/app-finance/app_theme.css +0 -748
- package/yida-skills/skills/yida-design/templates/design-themes/app-finance/design.md +0 -274
- package/yida-skills/skills/yida-design/templates/design-themes/app-finance/form-layout.json +0 -14
- package/yida-skills/skills/yida-design/templates/design-themes/app-glass/app_theme.css +0 -748
- package/yida-skills/skills/yida-design/templates/design-themes/app-glass/design.md +0 -274
- package/yida-skills/skills/yida-design/templates/design-themes/app-glass/form-layout.json +0 -14
- package/yida-skills/skills/yida-design/templates/design-themes/app-graphite/app_theme.css +0 -748
- package/yida-skills/skills/yida-design/templates/design-themes/app-graphite/design.md +0 -274
- package/yida-skills/skills/yida-design/templates/design-themes/app-graphite/form-layout.json +0 -14
- package/yida-skills/skills/yida-design/templates/design-themes/app-line/app_theme.css +0 -748
- package/yida-skills/skills/yida-design/templates/design-themes/app-line/design.md +0 -274
- package/yida-skills/skills/yida-design/templates/design-themes/app-line/form-layout.json +0 -13
- package/yida-skills/skills/yida-design/templates/design-themes/app-neon/app_theme.css +0 -748
- package/yida-skills/skills/yida-design/templates/design-themes/app-neon/design.md +0 -274
- package/yida-skills/skills/yida-design/templates/design-themes/app-neon/form-layout.json +0 -14
- package/yida-skills/skills/yida-design/templates/design-themes/app-nordic/app_theme.css +0 -754
- package/yida-skills/skills/yida-design/templates/design-themes/app-nordic/design.md +0 -279
- package/yida-skills/skills/yida-design/templates/design-themes/app-nordic/form-layout.json +0 -13
- package/yida-skills/skills/yida-design/templates/design-themes/app-paper/app_theme.css +0 -748
- package/yida-skills/skills/yida-design/templates/design-themes/app-paper/design.md +0 -274
- package/yida-skills/skills/yida-design/templates/design-themes/app-paper/form-layout.json +0 -13
- package/yida-skills/skills/yida-design/templates/design-themes/app-platinum/app_theme.css +0 -748
- package/yida-skills/skills/yida-design/templates/design-themes/app-platinum/design.md +0 -274
- package/yida-skills/skills/yida-design/templates/design-themes/app-platinum/form-layout.json +0 -14
- package/yida-skills/skills/yida-design/templates/design-themes/app-plum/app_theme.css +0 -748
- package/yida-skills/skills/yida-design/templates/design-themes/app-plum/design.md +0 -274
- package/yida-skills/skills/yida-design/templates/design-themes/app-plum/form-layout.json +0 -14
- package/yida-skills/skills/yida-design/templates/design-themes/app-pop/app_theme.css +0 -758
- package/yida-skills/skills/yida-design/templates/design-themes/app-pop/design.md +0 -281
- package/yida-skills/skills/yida-design/templates/design-themes/app-pop/form-layout.json +0 -14
- package/yida-skills/skills/yida-design/templates/design-themes/app-sage/app_theme.css +0 -748
- package/yida-skills/skills/yida-design/templates/design-themes/app-sage/design.md +0 -274
- package/yida-skills/skills/yida-design/templates/design-themes/app-sage/form-layout.json +0 -14
- package/yida-skills/skills/yida-design/templates/design-themes/app-teal/app_theme.css +0 -748
- package/yida-skills/skills/yida-design/templates/design-themes/app-teal/design.md +0 -274
- package/yida-skills/skills/yida-design/templates/design-themes/app-teal/form-layout.json +0 -14
- package/yida-skills/skills/yida-design/templates/design-themes/app-terminal/app_theme.css +0 -754
- package/yida-skills/skills/yida-design/templates/design-themes/app-terminal/design.md +0 -279
- package/yida-skills/skills/yida-design/templates/design-themes/app-terminal/form-layout.json +0 -14
- package/yida-skills/skills/yida-design/templates/design-themes/app-ticket/app_theme.css +0 -752
- package/yida-skills/skills/yida-design/templates/design-themes/app-ticket/design.md +0 -278
- package/yida-skills/skills/yida-design/templates/design-themes/app-ticket/form-layout.json +0 -13
- package/yida-skills/skills/yida-design/templates/design-themes/app-wire/app_theme.css +0 -748
- package/yida-skills/skills/yida-design/templates/design-themes/app-wire/design.md +0 -274
- package/yida-skills/skills/yida-design/templates/design-themes/app-wire/form-layout.json +0 -14
- package/yida-skills/skills/yida-design/templates/design-themes/basic-tokens.json +0 -118
- package/yida-skills/skills/yida-design/templates/design-themes/dark-inset-hairline/app_theme.css +0 -690
- package/yida-skills/skills/yida-design/templates/design-themes/dark-inset-hairline/design.md +0 -382
- package/yida-skills/skills/yida-design/templates/design-themes/dark-inset-hairline/form-layout.json +0 -13
- package/yida-skills/skills/yida-design/templates/design-themes/dark-rail-fine-lines/app_theme.css +0 -691
- package/yida-skills/skills/yida-design/templates/design-themes/dark-rail-fine-lines/design.md +0 -380
- package/yida-skills/skills/yida-design/templates/design-themes/dark-rail-fine-lines/form-layout.json +0 -13
- package/yida-skills/skills/yida-design/templates/design-themes/dark-rail-signal-panels/app_theme.css +0 -696
- package/yida-skills/skills/yida-design/templates/design-themes/dark-rail-signal-panels/design.md +0 -378
- package/yida-skills/skills/yida-design/templates/design-themes/dark-rail-signal-panels/form-layout.json +0 -13
- package/yida-skills/skills/yida-design/templates/design-themes/free-creative/app_theme.css +0 -689
- package/yida-skills/skills/yida-design/templates/design-themes/free-creative/design.md +0 -238
- package/yida-skills/skills/yida-design/templates/design-themes/free-creative/form-layout.json +0 -13
- package/yida-skills/skills/yida-design/templates/design-themes/graphite-bevel-grid/app_theme.css +0 -692
- package/yida-skills/skills/yida-design/templates/design-themes/graphite-bevel-grid/design.md +0 -375
- package/yida-skills/skills/yida-design/templates/design-themes/graphite-bevel-grid/form-layout.json +0 -13
- package/yida-skills/skills/yida-design/templates/design-themes/hairline-shared-bands/app_theme.css +0 -691
- package/yida-skills/skills/yida-design/templates/design-themes/hairline-shared-bands/design.md +0 -362
- package/yida-skills/skills/yida-design/templates/design-themes/hairline-shared-bands/form-layout.json +0 -13
- package/yida-skills/skills/yida-design/templates/design-themes/hairline-soft-blocks/app_theme.css +0 -691
- package/yida-skills/skills/yida-design/templates/design-themes/hairline-soft-blocks/design.md +0 -409
- package/yida-skills/skills/yida-design/templates/design-themes/hairline-soft-blocks/form-layout.json +0 -13
- package/yida-skills/skills/yida-design/templates/design-themes/index.json +0 -464
- package/yida-skills/skills/yida-design/templates/design-themes/ink-glow-soft-panels/app_theme.css +0 -701
- package/yida-skills/skills/yida-design/templates/design-themes/ink-glow-soft-panels/design.md +0 -379
- package/yida-skills/skills/yida-design/templates/design-themes/ink-glow-soft-panels/form-layout.json +0 -13
- package/yida-skills/skills/yida-design/templates/design-themes/inset-frame-pixel-rhythm/app_theme.css +0 -691
- package/yida-skills/skills/yida-design/templates/design-themes/inset-frame-pixel-rhythm/design.md +0 -404
- package/yida-skills/skills/yida-design/templates/design-themes/inset-frame-pixel-rhythm/form-layout.json +0 -13
- package/yida-skills/skills/yida-design/templates/design-themes/outlined-texture-duotone/app_theme.css +0 -698
- package/yida-skills/skills/yida-design/templates/design-themes/outlined-texture-duotone/design.md +0 -389
- package/yida-skills/skills/yida-design/templates/design-themes/outlined-texture-duotone/form-layout.json +0 -13
- package/yida-skills/skills/yida-design/templates/design-themes/soft-inset-surfaces/app_theme.css +0 -691
- package/yida-skills/skills/yida-design/templates/design-themes/soft-inset-surfaces/design.md +0 -372
- package/yida-skills/skills/yida-design/templates/design-themes/soft-inset-surfaces/form-layout.json +0 -13
- package/yida-skills/skills/yida-design/templates/design-themes/soft-outline-rhythm/app_theme.css +0 -690
- package/yida-skills/skills/yida-design/templates/design-themes/soft-outline-rhythm/design.md +0 -455
- package/yida-skills/skills/yida-design/templates/design-themes/soft-outline-rhythm/form-layout.json +0 -13
- package/yida-skills/skills/yida-design/templates/design-themes/soft-rail-bold-band/app_theme.css +0 -698
- package/yida-skills/skills/yida-design/templates/design-themes/soft-rail-bold-band/design.md +0 -394
- package/yida-skills/skills/yida-design/templates/design-themes/soft-rail-bold-band/form-layout.json +0 -13
- package/yida-skills/skills/yida-design/templates/design-themes/soft-spectral-panels/app_theme.css +0 -692
- package/yida-skills/skills/yida-design/templates/design-themes/soft-spectral-panels/design.md +0 -391
- package/yida-skills/skills/yida-design/templates/design-themes/soft-spectral-panels/form-layout.json +0 -13
- package/yida-skills/skills/yida-design/templates/design-themes/warm-canvas-contrast-panels/app_theme.css +0 -711
- package/yida-skills/skills/yida-design/templates/design-themes/warm-canvas-contrast-panels/design.md +0 -408
- package/yida-skills/skills/yida-design/templates/design-themes/warm-canvas-contrast-panels/form-layout.json +0 -13
- package/yida-skills/skills/yida-design/templates/design-themes/warm-rail-muted-panels/app_theme.css +0 -692
- package/yida-skills/skills/yida-design/templates/design-themes/warm-rail-muted-panels/design.md +0 -383
- package/yida-skills/skills/yida-design/templates/design-themes/warm-rail-muted-panels/form-layout.json +0 -13
- package/yida-skills/skills/yida-design/templates/navigation-styles.json +0 -769
- package/yida-skills/skills/yida-requirement-analysis/references/experience-groups.md +0 -79
- package/yida-skills/skills/yida-requirement-analysis/references/handoff.md +0 -68
|
@@ -1,181 +1,439 @@
|
|
|
1
1
|
# 输出:design.md
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
> 本文件定义完整应用的 `prd/<项目名>/design.md` 输出格式。`design.md` 是应用级 UI 视觉设计系统,结构以本文件为准,并参考 `references/style-designs/_design-md-template.md` 的字段完整度:先记录设计风格选择依据和主题换肤结果,再写可复用视觉 DNA、token、布局、组件、状态和自检,最后在“实现适配”里写清宜搭运行时主题契约。PRD 只写主题色和风格摘要,完整 UI 设计以本文件为准。
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
最终 `design.md` 的依据分四层:结构依据本文件和 `_design-md-template.md`;视觉 DNA、布局机制、组件机制和换肤规则依据选中的设计风格文件;业务内容、页面场景和显式范围依据共享需求文件;Plan 还读取 `yida-prd` 写入的页面业务事实,单页改造可读取已有 PRD;主题 token 依据主题系统中的主题色来源和所选风格的 `theme_adaptation`。
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
应用导航类型与 PRD 保持一致,使用 [四类导航契约](../../yida-prd/workflow/output-prd.md#导航类型与执行配置)。`layoutDirection` 按平台布局记录,`navTheme` 仅表示导航明暗;自定义导航同时交接应用隐藏与逐页隐藏要求。
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
| --- | --- | --- |
|
|
11
|
-
| 项目身份、主题交付、最终 token、素材与图标映射 | frontmatter | 供 CLI 确定性读取;正文解释用途,不重复维护取值 |
|
|
12
|
-
| 页面、组件、状态的定位索引 | frontmatter | 只保存稳定 ID 与正文 anchor,不复制规则全文 |
|
|
13
|
-
| 视觉系统、组件机制、特色配方、具体页面设计与验收 | 正文 | 供实现者阅读;每条完整规则只写一次 |
|
|
14
|
-
| 候选、主题模板身份、生成过程、编写说明 | 内部选择记录或技能文档 | 不进入最终项目设计 |
|
|
9
|
+
## 稳定引用规则
|
|
15
10
|
|
|
16
|
-
`
|
|
11
|
+
`yida-prd` 与 `yida-design` 必须使用同一组可定位锚点,`designRefs` 只允许以下形式:
|
|
17
12
|
|
|
18
|
-
|
|
13
|
+
- `themeProfile`
|
|
14
|
+
- `sceneRecipes.<sceneKey>`
|
|
15
|
+
- `components.<componentName>`
|
|
16
|
+
- `states.<stateName>`
|
|
19
17
|
|
|
20
|
-
|
|
18
|
+
`sceneKey` 必须直接取自 `requirement-brief.json` 的对应 `pageScenes`:对象项使用其 `key`,字符串项原样使用;`yida-prd` 和 `yida-design` 不得各自改写、翻译或重新生成。`componentName` 和 `stateName` 必须与本文件 frontmatter 中的实际 key 完全一致。一致性校验只检查这些稳定标识,不使用标题文本或自然语言近似匹配。
|
|
21
19
|
|
|
22
|
-
|
|
23
|
-
| --- | --- |
|
|
24
|
-
| `schemaVersion` | 必填字符串 `"1.0"` |
|
|
25
|
-
| `name` | 必填,当前项目名 |
|
|
26
|
-
| `description` | 必填,当前项目视觉用途说明 |
|
|
27
|
-
| `tokens.application-global` | 必填,保留 appearance、colors、typography、spacing、rounded、shadow 六组基础变量,具体变量名与默认值以 [基础变量契约](../templates/design-themes/basic-tokens.json) 为准 |
|
|
28
|
-
| `tokens.custom-page` | 必填对象,保存项目扩展变量,可跨页面和组件共用;没有额外变量时允许空对象 |
|
|
29
|
-
| `themeProfile` | 必填,字段见下一节 |
|
|
30
|
-
| `sceneRecipes` | 必填对象,按场景记录真实页面的 `pageId` 与 `anchor`;没有自定义页时为 `{}` |
|
|
31
|
-
| `components` | 必填对象,每项仅为 `{anchor: "#component-…"}`;只登记有具体正文规则的组件 |
|
|
32
|
-
| `states` | 必填对象,每项仅为 `{anchor: "#state-…"}`;只登记有具体正文规则的状态 |
|
|
33
|
-
| `assetStrategy` | 必填,保持单行 JSON;至少 `{ "pages": [] }`,实际页面按素材契约填写 |
|
|
34
|
-
| `iconSystem` | 必填,`{library: "lucide-react", mappings: {}}`;library 仅为 `lucide-react` 或 `@ant-design/icons`,mappings 将实际业务语义映射到具体图标组件,无图标时为空对象 |
|
|
35
|
-
| `buildPlanRevision` | 仅 Plan 可选,用于与当前计划版本对应;Fast 不补造计划版本 |
|
|
20
|
+
## 图片素材交接
|
|
36
21
|
|
|
37
|
-
`
|
|
22
|
+
`assetStrategy.pages[]` 记录页面等级和图片槽位。槽位包含用途、数量、比例、尺寸、焦点、填充方式和生成许可。需要图片时交给 `yida-image-assets`;无图片需求时写 `imageNeed: none`。在 frontmatter 中用单行 JSON 写出完整 `assetStrategy`,不能只保留槽位数量。`--design design.md` 会读取该字段核对素材。格式见 [素材清单契约](../../yida-image-assets/references/manifest-contract.md)。
|
|
38
23
|
|
|
39
|
-
|
|
24
|
+
## 应用主题 CSS 的职责
|
|
40
25
|
|
|
41
|
-
`
|
|
26
|
+
`app-theme.css` 是当前应用的主题资源产物,承载品牌色阶、语义色、字体、间距、圆角、阴影,以及 Shell、导航、页面、表单、表格和浮层的主题 token 与必要样式覆盖。`app_theme.css` 等其他 `.css` 文件名同样可用;CLI 根据 `--theme-file` 路径读取内容,不靠固定文件名识别用途。Plan 使用 `outputs.theme`,其他流程使用已记录的产物路径,避免生成多份后上传错文件。
|
|
42
27
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
| `contentTone` | `light` 或 `dark` |
|
|
49
|
-
| `navTheme` | 从所选主题模板派生的导航明暗 `light` 或 `dark`;与页面画布明暗分开,不由 AI 默认填写;自由创意使用项目明确设计的导航明暗 |
|
|
50
|
-
| `themeDelivery` | `app-custom-theme-file` 或 `current-app-theme` |
|
|
51
|
-
| `themeFile` | 当前主题 CSS 的实际交付路径;继承当前应用且没有本地主题文件时为空字符串 |
|
|
52
|
-
| 既有导航配置 | 保留 navigationType、layoutDirection、hideAppNav、logoSource 等已确认配置,不重新推断入口范围 |
|
|
28
|
+
- `design.md` 定义视觉意图、布局和交互;主题 CSS 把对应的平台样式契约落成可加载的资源。导航是否悬浮、侧栏如何折叠和拖拽、业务内容如何排布,仍由页面代码实现。
|
|
29
|
+
- 平台组件与自定义页面通过对应 token 消费主题。保留原有变量名和明暗导航作用域;页面组件用 `var(--token, fallback)`,不在每页重新注入全局主题。只有实际引用该 token 或命中 CSS 选择器的内容才会改变外观。
|
|
30
|
+
- 文件生成后,通过 `update-app --theme-file <实际路径>` 上传,再更新应用基础设置中的 `colour=custom`、`themeColor` 和 `customThemeStyle`;导航、Logo 来源与布局在同一次更新中同步。创建应用或仅修改本地 CSS 均不等于绑定了主题。
|
|
31
|
+
- iframe 是独立文档,不能假定它继承父页面的 CSS 变量。原生表单页依靠该应用的平台主题加载链路;自绘抽屉外壳由所在页面消费 token,高度兜底由容器代码保证。
|
|
32
|
+
- `themeVerification.verified=true` 证明应用设置已绑定资源,不证明所有页面视觉正确。发布后仍需检查实际页面及表单 iframe 的资源加载、计算样式与布局;CLI 无法仅凭 CSS 文件判断最终视觉效果。
|
|
53
33
|
|
|
54
|
-
|
|
34
|
+
主题准备与表单、页面开发按 [并行依赖](../../yida-app/workflow/parallel-work.md#主题与业务资源的依赖) 调度:计划或主题确认后即生成 CSS,不依赖表单或页面实现;appType 与 CSS 就绪便立即同步应用基础设置。页面先按已确认 token 开发,视觉验收再核对主题加载结果。
|
|
55
35
|
|
|
56
|
-
|
|
36
|
+
页面背景统一使用 `--pod-page-bg-color`,卡片和面板使用 `--pod-card-bg-color`,默认回退 `--color-white`。导航归属不改变页面底色,隐藏导航不自动透明;深色或明确的应用背景通过同一平台 token 配置。Plan 和 Fast 将设计值写入 design.md 并生成 app-theme.css,Canvas 宿主、页面根和 antd 统一消费;渐变、纹理和素材作为页面局部装饰层。
|
|
57
37
|
|
|
58
|
-
|
|
38
|
+
## CLI token 契约(Fast / Plan 共用)
|
|
59
39
|
|
|
60
|
-
|
|
61
|
-
2. **页面视觉系统**:导航、应用框架、画布、表面、边界、排版、间距、形状和色彩角色,覆盖表单提交、编辑、记录详情与自定义页面。项目配色与导航的覆盖合并到对应规则中,不另起一组相互冲突的“默认”和“适配”说明。
|
|
62
|
-
3. **基础组件表达**:当前项目组件的结构、变量消费与状态。每套规则正文只写一次,索引定位到该段。
|
|
63
|
-
4. **特色表达配方**:保留真实内容可用的配方、启用条件和不适用时处理;不为套用配方新增业务模块。未启用配方可省略细节,不影响基础视觉语言。
|
|
64
|
-
5. **项目应用与调整规则**:每个实际自定义页的具体设计与验收、必要项目差异和素材缺口;不保留“请填入下方”“生成时替换”等编写任务。
|
|
40
|
+
`design.md` 必须以 YAML frontmatter 开头,`tokens` 内每个 `--token` 使用一行具体 CSS 值;可平铺或分组,允许引号和行尾注释。不得保留占位符、推导指令、多行值或同名冲突值。必须包含品牌色阶 1/2/3/5/6/9/10;圆角、字体、间距等需要改变平台表现时写入对应 CSS token,不能只写正文描述。
|
|
65
41
|
|
|
66
|
-
|
|
42
|
+
Fast 或单独更新主题时,执行 `openyida sample yida-design app-theme --output .cache/openyida/<项目名>/app-theme.css --design-file prd/<项目名>/design.md`。首次从公共模板生成;已有 CSS 只更新设计中变化的 token,保留其他 token 和自定义样式。CLI 自动保存更新记录,内容相同时跳过写入,写入失败回滚。省略 `--design-file` 会用公共模板重置目标 CSS。
|
|
67
43
|
|
|
68
|
-
|
|
44
|
+
主题文件只能由上述 OpenYida CLI 契约生成或更新。不得另写 Python、Node、Shell 或 `run_workspace_script` 临时脚本来生成、复制、整文件重写、正则替换或 retheme 主题 CSS;校验脚本只能读取并报告问题,不能改写主题文件。需要调整 CLI 未覆盖的精确 classname 覆盖时,只允许在现有文件末尾做小范围编辑,并重新通过 `update-app --theme-file` 上传完整文件。
|
|
69
45
|
|
|
70
|
-
|
|
46
|
+
Plan 修改 `visualStyle.tokens` 并按模块更新草稿,最终由 `materialize` 同时生成设计文档和主题 CSS,使用返回的 `outputs.theme`。Fast 由 `yida-design` 直接维护 `design.md`。应用阶段由 `yida-app` 使用 `--theme-file` 应用同一份产物。
|
|
71
47
|
|
|
72
|
-
|
|
48
|
+
整体暗色方案按 [浮层适配](../references/theme/theme-token-presets.md#暗色主题浮层适配) 补齐组件 token。实现阶段可在生成的应用主题 CSS 末尾追加精确 classname 覆盖,再上传完整主题文件。
|
|
73
49
|
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
50
|
+
## design.md 输出格式
|
|
51
|
+
|
|
52
|
+
### 用户配色与模板的优先级
|
|
53
|
+
|
|
54
|
+
用户确认的整体色彩氛围高于模板默认灰阶。绿色清新风格应是同色相的低饱和背景、白色或近白卡片、协调填充与边框、绿色焦点;正文仍保持深浅中性色。不得用“雾白 DNA 不可修改”为由把用户选定的浅绿导航改白或把所有品牌氛围收缩到按钮。模板负责结构、圆角、材质与节奏,项目配色负责各表面的协调。
|
|
55
|
+
|
|
56
|
+
Plan 新建草稿的 `colorStrategy.surfaceTone` 默认 `brand-tinted`,CLI 在浅色主题中同步派生 Shell 浅色背景(`--pod-shell-bg-color-light`)、填充与边界,保留文字、语义色和深色表面的明度层级。品牌氛围不得覆盖导航对应的 Canvas 背景默认值,也不得自动把原生页面底色染色;`--pod-page-bg-color` 保留原生表单/数据管理的独立底色(浅色主题通常为白色)。其他 Shell 明暗模式保留对应主题设定,不强制把深色或白色导航改成浅彩。用户明确仅改强调色、保留中性灰或忠实参考配色时设为 `theme`;旧计划未填写时保持兼容,不自动改色。`visualStyle.tokens` 显式值始终优先。Fast 按同一规则直接写入 tokens 与配色说明,不额外询问实现字段。
|
|
57
|
+
|
|
58
|
+
配色变化同时更新 `surfaceContrast`、`colorRoles`、组件规则和逐页验收,不只改 YAML 中的一个背景值。近白底配白卡时使用可见细边框;浅彩不等于高饱和大色块。用户指定自定义卡片色时改 `--pod-card-bg-color`,不要为卡片换色全局改写 `--color-white`。
|
|
59
|
+
|
|
60
|
+
```markdown
|
|
61
|
+
---
|
|
62
|
+
version: 1.0
|
|
63
|
+
name: <应用或风格系统英文 slug>
|
|
64
|
+
description: <内容中立的中文用途说明>
|
|
65
|
+
design_id: <design-id>
|
|
66
|
+
design_status: ready
|
|
67
|
+
baseDesignSource: references/style-designs/<selected-style>.md
|
|
68
|
+
styleDesignSelection:
|
|
69
|
+
inferredUserTask: <判断 / 处理 / 追踪 / 分析 / 展示 / 汇报>
|
|
70
|
+
inferredInformationTopology: <摘要优先 + 趋势承接 + 明细落地>
|
|
71
|
+
interactionFocus: <搜索筛选 / 待办处理 / 下钻详情 / 多入口跳转 / 趋势比较>
|
|
72
|
+
requiredVisualDNA:
|
|
73
|
+
- <dna-id>
|
|
74
|
+
selectedStyleDesign:
|
|
75
|
+
name: <style-name>
|
|
76
|
+
source: references/style-designs/<selected-style>.md
|
|
77
|
+
reason: <为什么该风格最适合当前业务>
|
|
78
|
+
rejectedStyleDesigns:
|
|
79
|
+
- <style-name>: <为什么不选>
|
|
80
|
+
selectionConfidence: <high / medium / low>
|
|
81
|
+
scenes: [工作台, 列表, 详情, 看板]
|
|
82
|
+
density: <high / medium / comfortable;业务工具页默认 high>
|
|
83
|
+
layout: <preferred archetype or custom layout;工作台默认紧凑双栏/三栏,不用低密大卡墙>
|
|
84
|
+
tone: <视觉气质关键词>
|
|
85
|
+
tags: [<业务领域>, <角色>, <数据形态>]
|
|
86
|
+
avoid: [<不适合场景>]
|
|
87
|
+
themeProfile:
|
|
88
|
+
name: <主题名称>
|
|
89
|
+
themeColorSource: <user-specified / application-theme / business-inferred / template-default>
|
|
90
|
+
themeColorToken: <--color-brand1-6 的字面量值>
|
|
91
|
+
themeDelivery: <app-custom-theme-file / current-app-theme>
|
|
92
|
+
customThemeTemplate: yida-design/references/theme/app-custom-theme-template.css
|
|
93
|
+
customThemeFile: <生成的 .css 路径;沿用当前应用主题时留空>
|
|
94
|
+
themeColor: <#RRGGBB>
|
|
95
|
+
navTheme: <light / dark / white / gray>
|
|
96
|
+
colorMode: <宜搭配色模式,如 gradient;不表示暗黑>
|
|
97
|
+
themeAdaptationResult:
|
|
98
|
+
inputThemeColor: <主题色 key 或色值>
|
|
99
|
+
strategy: replace_hue_preserve_visual_mechanism
|
|
100
|
+
replaced:
|
|
101
|
+
brand: <主色>
|
|
102
|
+
brand-strong: <深主色>
|
|
103
|
+
brand-soft: <浅主色>
|
|
104
|
+
focus-ring: <焦点色>
|
|
105
|
+
preservedVisualDNA:
|
|
106
|
+
- <dna-id>
|
|
107
|
+
preservedMechanisms:
|
|
108
|
+
- <画布 / 面板 / 布局 / 深色舞台 / 右侧栏等>
|
|
109
|
+
yidaThemeDelivery:
|
|
110
|
+
generatedFile: <.cache/openyida/<项目名>/app-theme.css / inherit-current-app-theme>
|
|
111
|
+
customThemeTemplate: yida-design/references/theme/app-custom-theme-template.css
|
|
112
|
+
tokens:
|
|
113
|
+
--color-brand1-1: <明亮品牌浅色或浅 hover 色>
|
|
114
|
+
--color-brand1-2: <浅背景>
|
|
115
|
+
--color-brand1-3: <透明/浅边界>
|
|
116
|
+
--color-brand1-5: <主色 hover 档>
|
|
117
|
+
--color-brand1-6: <主色>
|
|
118
|
+
--color-brand1-9: <深主色>
|
|
119
|
+
--color-brand1-10: <深色或透明强调档>
|
|
120
|
+
--color-brand-1: <移动端品牌色 1>
|
|
121
|
+
--color-brand-2: <移动端品牌色 2>
|
|
122
|
+
--color-brand-3: <移动端品牌色 3>
|
|
123
|
+
--color-brand-4: <移动端品牌色 4>
|
|
124
|
+
--color-group: <图表和分组色板,逗号分隔>
|
|
125
|
+
visual_dna:
|
|
126
|
+
- name: <可识别的设计记忆点名称>
|
|
127
|
+
confidence: observed
|
|
128
|
+
evidence: <参考或需求中可见的证据>
|
|
129
|
+
rule: <生成新 UI 时必须如何保留它>
|
|
130
|
+
implementation_hooks: [<布局/组件/token/CSS/图表钩子>]
|
|
131
|
+
failure_mode: <缺失该 DNA 时会出现的风格漂移>
|
|
132
|
+
colors:
|
|
133
|
+
bg-outer: "#..."
|
|
134
|
+
surface: "#..."
|
|
135
|
+
surface-muted: "#..."
|
|
136
|
+
text-primary: "#..."
|
|
137
|
+
text-secondary: "#..."
|
|
138
|
+
border-subtle: "#..."
|
|
139
|
+
brand: "#..."
|
|
140
|
+
backgroundLayer:
|
|
141
|
+
baseCanvas: <默认低饱和浅底或带装饰的近白画布;深色舞台仅用户明确要求暗色/大屏时使用;推荐避免无层次的纯空白画布>
|
|
142
|
+
primitives:
|
|
143
|
+
[softTintCanvas, topIrregularWash, radialGlowWash, flowLight, organicNoise]
|
|
144
|
+
topIrregularWash: <可选;不规则顶部色块、波浪或斜切背景,内容仍按规则栅格排布>
|
|
145
|
+
motionLayer: <none / subtle-flow-light;必须有 prefers-reduced-motion 静态降级>
|
|
146
|
+
contrastGuard: <前景文字和控件对比度要求>
|
|
147
|
+
surfaceContrast:
|
|
148
|
+
rule: <页面背景与卡片背景必须有明显层次,不可相近或相同>
|
|
149
|
+
pairing: <white-bg-bordered-card / gray-bg-white-card / tinted-bg-white-card / gradient-bg-glass-card>
|
|
150
|
+
pageBackground: <浅色背景色或渐变>
|
|
151
|
+
cardBackground: <白色、浅色或玻璃 rgba>
|
|
152
|
+
cardBorder: <白色/浅色背景时必须写边框;浅灰/浅彩背景时可 none;玻璃卡片写半透明边框>
|
|
153
|
+
forbidden: <浅底白卡无边框、同色背景同色卡片、只靠弱阴影区分层级>
|
|
154
|
+
iconSystem:
|
|
155
|
+
defaultLibrary: lucide-react
|
|
156
|
+
allowedLibraries: [lucide-react, "@ant-design/icons"]
|
|
157
|
+
style: <线性描边 / Outlined;同一页面保持一致>
|
|
158
|
+
strokeWidth: <默认 1.75 或 2>
|
|
159
|
+
sizes:
|
|
160
|
+
toolbar: 16
|
|
161
|
+
quickAction: 18
|
|
162
|
+
status: 16
|
|
163
|
+
actionIconMap:
|
|
164
|
+
<业务动作名>: <lucide-react 或 @ant-design/icons 的具体组件名>
|
|
165
|
+
statusIconMap:
|
|
166
|
+
<业务状态名>: <lucide-react 或 @ant-design/icons 的具体组件名>
|
|
167
|
+
navigationIconMap:
|
|
168
|
+
<导航项名>: <lucide-react 或 @ant-design/icons 的具体组件名>
|
|
169
|
+
emptyStateIconMap:
|
|
170
|
+
<空态类型>: <lucide-react 或 @ant-design/icons 的具体组件名>
|
|
171
|
+
typography:
|
|
172
|
+
page-title:
|
|
173
|
+
fontFamily: "<字体栈>"
|
|
174
|
+
fontSize: <数字>
|
|
175
|
+
fontWeight: <数字>
|
|
176
|
+
lineHeight: <数字>
|
|
177
|
+
letterSpacing: 0
|
|
178
|
+
spacing:
|
|
179
|
+
page-x: <默认 20-28>
|
|
180
|
+
page-y: <默认 20-28>
|
|
181
|
+
grid-gap: <默认 12-18;卡片和卡片的 gap 必须小于 20>
|
|
182
|
+
section-gap: <默认 14-18;用于跨区块呼吸和分组,不用于撑空白>
|
|
183
|
+
card-x: <默认 22-28;卡片 padding 必须大于 20>
|
|
184
|
+
card-y: <默认 22-28;卡片 padding 必须大于 20;列表/摘要类不是卡片时可更紧>
|
|
185
|
+
row-y: <默认 10-12>
|
|
186
|
+
breathingRule:
|
|
187
|
+
rhythm: <首屏主区、列表区、右侧上下文和操作条之间的分组节奏>
|
|
188
|
+
sectionGap: <默认 14-18;卡片之间的 gap 必须小于 20>
|
|
189
|
+
innerPadding: <默认 22-28;卡片 padding 必须大于 20>
|
|
190
|
+
compression: <内容不足时压缩高度、转薄行或补业务上下文/下一步动作>
|
|
191
|
+
rounded:
|
|
192
|
+
sm: <默认 10-12>
|
|
193
|
+
md: <默认 14-16>
|
|
194
|
+
card: <范围 0-32;业务卡片默认 20-24>
|
|
195
|
+
panel: <范围 0-32;主容器/抽屉/重点面板默认 22-32>
|
|
196
|
+
pill: 999
|
|
197
|
+
components:
|
|
198
|
+
card:
|
|
199
|
+
backgroundColor: "{colors.surface}"
|
|
200
|
+
rounded: "{rounded.card}"
|
|
201
|
+
padding: "{spacing.card-y} {spacing.card-x}"
|
|
202
|
+
empty-state:
|
|
203
|
+
density: compact
|
|
204
|
+
maxHeight: <默认 88-120>
|
|
205
|
+
metric-strip:
|
|
206
|
+
height: <默认 64-88>
|
|
207
|
+
sceneRecipes:
|
|
208
|
+
<sceneKey>:
|
|
209
|
+
layoutRecipe: <该页面场景的布局配方>
|
|
210
|
+
componentRefs: [components.<componentName>]
|
|
211
|
+
stateRefs: [states.loading, states.empty, states.error]
|
|
212
|
+
states:
|
|
213
|
+
loading: <加载反馈和骨架规则>
|
|
214
|
+
empty: <空态说明、主操作和高度规则>
|
|
215
|
+
error: <错误反馈、恢复动作和信息边界>
|
|
216
|
+
inferred_modules:
|
|
217
|
+
quick_actions:
|
|
218
|
+
required_for: [工作台, 仪表盘, 管理后台, 运营首页]
|
|
219
|
+
confidence: inferred
|
|
220
|
+
rule: <基于整体视觉风格推断的快捷入口区域规则>
|
|
221
|
+
---
|
|
222
|
+
|
|
223
|
+
# <应用名> design.md
|
|
224
|
+
|
|
225
|
+
## 1. 总览
|
|
226
|
+
|
|
227
|
+
用 2-4 个短段落说明可复用设计意图。保持内容中立,只说明气质、信息密度、主要用途和页面组织方式。
|
|
228
|
+
|
|
229
|
+
## 2. 设计风格选择依据
|
|
230
|
+
|
|
231
|
+
说明 `styleDesignSelection` 的推演过程:当前业务的用户任务、信息拓扑、交互重心、必需视觉 DNA、选中风格和排除风格。选择理由必须来自业务结构和视觉 DNA 命中,不得按行业、颜色或主观偏好直接套风格。
|
|
232
|
+
|
|
233
|
+
## 3. 主题色与换肤结果
|
|
234
|
+
|
|
235
|
+
说明 `themeProfile` 和 `themeAdaptationResult`:主题色来源、如何替换所选风格的 `replace_tokens`、派生 `derive_tokens`、保留 `preserve_tokens` 和 `visual_dna.invariant`。必须明确“换 hue,不换 DNA;换 token,不换结构”。
|
|
236
|
+
|
|
237
|
+
## 4. 适用场景
|
|
238
|
+
|
|
239
|
+
列出适合和不适合使用该风格的场景。
|
|
240
|
+
|
|
241
|
+
## 5. 视觉氛围
|
|
242
|
+
|
|
243
|
+
说明运营工具感/表达型、克制/戏剧化、密度、留白、专业度等取向。
|
|
244
|
+
|
|
245
|
+
默认业务工具页采用“圆润但高密”的现代 B 端气质:业务面板和重点容器默认 20px 以上大圆角,页面信息密度默认 high,留白用于分组和阅读,不用于撑页面面积。只有官网、品牌页、展示页或用户明确要求舒展时,才把 density 调到 medium / comfortable。
|
|
246
|
+
|
|
247
|
+
## 6. 视觉 DNA / 设计母体
|
|
248
|
+
|
|
249
|
+
从所选设计风格和当前业务结构中提取 2-5 个内容替换后仍必须保留的设计记忆点。每个 DNA 必须包含名称、证据、规则、实现钩子、失败表现和置信度;证据必须同时说明业务触发条件和风格来源。
|
|
84
250
|
|
|
85
|
-
|
|
251
|
+
## 7. 色彩角色
|
|
86
252
|
|
|
87
|
-
|
|
253
|
+
用表格列出 token、取值和用途,覆盖背景、表面、文字、边框、品牌色、状态色和图表序列。必须包含 `themeProfile` 和 `yidaThemeDelivery` 中声明的应用主题 token。
|
|
88
254
|
|
|
89
|
-
|
|
255
|
+
| token | 取值 | 用途 |
|
|
256
|
+
| ------------------- | --------------------------- | -------------------------------------------------- |
|
|
257
|
+
| `--color-brand1-1` | <明亮品牌浅色或浅 hover 色> | 列表 hover、菜单 hover、轻量背景,不直接当深色文字 |
|
|
258
|
+
| `--color-brand1-2` | <品牌浅底> | 弱强调背景、浅底提示、选中底色、标签浅底 |
|
|
259
|
+
| `--color-brand1-3` | <透明/浅边界> | 选中边框、禁用/弱化品牌态、浅描边 |
|
|
260
|
+
| `--color-brand1-5` | <主色 hover 档> | 主按钮 hover、链接 hover、可点击强调 hover |
|
|
261
|
+
| `--color-brand1-6` | <主色> | 主按钮、链接、选中态、重点标签、图表主序列 |
|
|
262
|
+
| `--color-brand1-9` | <深主色> | 强调文字、深底按钮、深色强调块 |
|
|
263
|
+
| `--color-brand1-10` | <深色或透明强调档> | 深色 hover、强强调背景、深色主题补充 |
|
|
264
|
+
| `--color-brand-1` | <移动端品牌浅/透明档 1> | 移动端壳层、移动端表单、移动组件浅品牌态 |
|
|
265
|
+
| `--color-brand-2` | <移动端品牌浅/中档 2> | 移动端 hover、轻量强调、移动端组件浅色面 |
|
|
266
|
+
| `--color-brand-3` | <移动端主品牌档 3> | 移动端主操作、选中态、原生表单移动主色 |
|
|
267
|
+
| `--color-brand-4` | <移动端深品牌档 4> | 移动端 active、深色强调、移动壳层深色态 |
|
|
268
|
+
| `--color-group` | <色组> | 图表、分类、状态序列 |
|
|
90
269
|
|
|
91
|
-
|
|
270
|
+
平台实际生成的 `--color-brand1-1/2/3/5/6/9/10` 必须完整输出,是页面和 PC 端主要消费的品牌色阶;不要补造 `--color-brand1-4/7/8`。`--color-brand-*` 是移动端和部分原生表单/壳层消费的品牌色阶,必须保留,不能删掉、改名或替换成其他 token。
|
|
92
271
|
|
|
93
|
-
|
|
272
|
+
## 8. 字体规则
|
|
94
273
|
|
|
95
|
-
|
|
96
|
-
- 页面使用 `#page-…`,组件使用 `#component-…`,状态使用 `#state-…`。正文相应位置显式写 `<a id="page-…"></a>` 等 HTML anchor;同一 anchor 唯一,索引值必须能够精确找到。
|
|
97
|
-
- `components`、`states` 的 key 与 PRD 引用一致,目标 anchor 位于第 3 章基础组件表达内。只登记实际存在的规则;一个复合组件段落确实覆盖多类组件时可共享 anchor,不能因缺少规则就登记虚假引用。
|
|
98
|
-
- 索引只保存定位信息,不保存 `rules`、页面布局或组件正文副本。一个共享段落可以服务多个页面,但每个页面仍有自己的具体应用段。
|
|
274
|
+
定义字体栈、字号体系、行高、字重和数字排版。不要使用 viewport width 缩放字体,默认 `letter-spacing: 0`。
|
|
99
275
|
|
|
100
|
-
##
|
|
276
|
+
## 9. 布局原则
|
|
101
277
|
|
|
102
|
-
`
|
|
278
|
+
说明页面壳、最大宽度、网格比例、间距、内容顺序和中性槽位关系。布局机制应来自所选风格的 `layout_stability`、`modules` 和当前 PRD 页面结构,不得凭空增加 PRD 未要求的图表、右侧栏、时间轴或深色舞台。
|
|
103
279
|
|
|
104
|
-
|
|
280
|
+
工作台、门户首页、管理后台和运营首页必须写清紧凑状态摘要、任务/记录列表、右侧上下文、高频动作条和薄空态行动。首屏不能出现超宽但内容稀疏的 KPI 横框、孤立大空态卡或右侧大面积留白;空白区域必须用最近记录、动态、风险、负责人、下一步动作、配置提示或薄空态行动承接。
|
|
105
281
|
|
|
106
|
-
|
|
282
|
+
## 10. 层级与深度
|
|
107
283
|
|
|
108
|
-
|
|
284
|
+
说明深度来自平面表面、边框、阴影、色调层、毛玻璃、覆盖层或空间效果,并说明哪些地方不该使用阴影。
|
|
109
285
|
|
|
110
|
-
|
|
286
|
+
### Background Layer Contract
|
|
111
287
|
|
|
112
|
-
|
|
288
|
+
展示型页面、工作台、看板、门户、官网、登录页和空状态页推荐使用有层次的页面画布,而不是无氛围的纯空白背景。画布可以接近白色,但应通过淡渐变、细线装饰、星芒、高光、插图、顶部不规则色块或内容密度形成背景感。背景层写成可实现字段 `backgroundLayer`,优先选择 1-2 个背景 primitive:
|
|
113
289
|
|
|
114
|
-
|
|
290
|
+
| primitive | 适用场景 | 实现要求 |
|
|
291
|
+
| ------------------ | ------------------------------------------ | ---------------------------------------------------------------------------------------------------- |
|
|
292
|
+
| `softTintCanvas` | 工作台、列表、管理后台 | 使用低饱和高明度底色,例如暖灰、浅青、浅粉、浅蓝紫,也可以是带弱渐变的近白画布;前景内容保持规则栅格 |
|
|
293
|
+
| `topIrregularWash` | 官网、品牌页、主页面首屏、登录页、空状态页 | 顶部或首屏使用不规则色块、波浪、斜切、有机边界或轻装饰曲线;内容不跟随背景扭曲 |
|
|
294
|
+
| `radialGlowWash` | AI 产品、SaaS、驾驶舱、视觉化工作台 | 使用大面积柔和径向光或光洗,不使用离散装饰圆球、bokeh 或随机漂浮点 |
|
|
295
|
+
| `flowLight` | 科技感主视觉、数据看板、引导卡片 | 使用极慢速流光或光影位移动效;必须提供 `prefers-reduced-motion` 静态降级 |
|
|
296
|
+
| `organicNoise` | 温暖亲和、生活方式、轻品牌页 | 叠加 0.02-0.06 透明度微噪点或细纹理,减少机械感,不影响阅读 |
|
|
115
297
|
|
|
116
|
-
|
|
298
|
+
背景可以不规则,内容必须规则。所有主要内容仍使用明确网格、分栏、对齐和稳定间距,不能因为背景形状导致文字、按钮、图表或表格漂移。B 端页面的背景色保持低饱和、高明度;深色大屏可使用低亮度流动线条或光效纹理衬托数据,但正文对比度必须达标。若选择极简近白画布,必须用清晰内容结构、细线装饰、局部渐变或素材焦点证明页面不是未设计的空白底。
|
|
117
299
|
|
|
118
|
-
|
|
300
|
+
### Surface Contrast Contract
|
|
119
301
|
|
|
120
|
-
|
|
302
|
+
页面背景与卡片背景必须形成明显层次对比,不可相近或相同。默认背景色保持浅色调,确保整体视觉清爽,同时与卡片之间有清晰层次;必须在 `surfaceContrast` 中选择以下搭配之一:
|
|
121
303
|
|
|
122
|
-
|
|
304
|
+
| pairing | 背景 | 卡片 |
|
|
305
|
+
| ------------------------ | ---------------------------- | -------------------------------------------------------------------- |
|
|
306
|
+
| `white-bg-bordered-card` | 白色/浅色背景 | 卡片添加 `1px` 边框,边框色与背景形成可见分隔 |
|
|
307
|
+
| `gray-bg-white-card` | 浅灰色背景,例如 `#F3F4F6` | 白色无边框卡片,用背景色差形成层次 |
|
|
308
|
+
| `tinted-bg-white-card` | 浅彩色背景,例如浅蓝、浅暖灰 | 白色无边框卡片,必要时补极弱阴影 |
|
|
309
|
+
| `gradient-bg-glass-card` | 渐变色背景 | 玻璃感卡片,使用半透明表面、半透明边框、`backdrop-filter` 和柔和阴影 |
|
|
123
310
|
|
|
124
|
-
|
|
311
|
+
禁止输出浅底白卡无边框、同色背景同色卡片、卡片和页面背景只差 1-2 个灰阶,或只靠弱阴影承担层次。若背景和卡片都接近白色,卡片必须有可见边框;若背景为浅灰或浅彩,卡片优先白色无边框;若背景为渐变,卡片必须按玻璃材质处理。
|
|
125
312
|
|
|
126
|
-
|
|
127
|
-
- 平台组件与自定义页面通过对应 token 消费主题。保留原有变量名和明暗导航作用域;页面组件用 `var(--token, fallback)`,不在每页重新注入全局主题。只有实际引用该 token 或命中 CSS 选择器的内容才会改变外观。
|
|
128
|
-
- 文件生成后,通过 `update-app --theme-file <实际路径>` 上传,再更新应用基础设置中的 `colour=custom`、`themeColor` 和 `customThemeStyle`;导航、Logo 来源与布局在同一次更新中同步。创建应用或仅修改本地 CSS 均不等于绑定了主题。
|
|
129
|
-
- iframe 是独立文档,不能假定它继承父页面的 CSS 变量。原生表单页依靠该应用的平台主题加载链路;自绘抽屉外壳由所在页面消费 token,高度兜底由容器代码保证。
|
|
130
|
-
- `themeVerification.verified=true` 证明应用设置已绑定资源,不证明所有页面视觉正确。发布后仍需检查实际页面及表单 iframe 的资源加载、计算样式与布局;CLI 无法仅凭 CSS 文件判断最终视觉效果。
|
|
313
|
+
## 11. 形状
|
|
131
314
|
|
|
132
|
-
|
|
315
|
+
定义圆角尺度,以及每个尺度分别用于哪里。
|
|
133
316
|
|
|
134
|
-
|
|
317
|
+
默认形状语言是圆润但不低密,并且布局要有呼吸感:卡片圆角范围 0-32px,业务卡片/面板默认 20-24px,主面板/抽屉/重点区域默认 22-32px,按钮和输入框 10-14px,标签/状态胶囊 999px。卡片 padding 必须大于 20px,卡片和卡片的 gap 必须小于 20px;圆角服务形状性格,不用空白卡撑版面。
|
|
135
318
|
|
|
136
|
-
|
|
319
|
+
## 12. 组件样式
|
|
137
320
|
|
|
138
|
-
|
|
321
|
+
覆盖顶部栏、按钮、图标按钮、卡片/面板、输入框/选择器、表格/列表、图表、标签/徽标、快捷入口、空状态、弹窗/浮层。相关组件要包含 default、hover、active、focus、disabled、loading、selected、error 等状态。图标规则写入 `iconSystem`:页面图标只使用 `lucide-react` 或 `@ant-design/icons`,默认使用 `lucide-react` named import;快捷入口、按钮、状态、导航和空态必须给出可实现的 `actionIconMap` / `statusIconMap` / `navigationIconMap` / `emptyStateIconMap`。emoji 不能改成 CSS 形状、字母占位、Unicode 符号或临时 SVG。
|
|
139
322
|
|
|
140
|
-
-
|
|
141
|
-
- 页面与卡片:`--pod-page-bg-color`、`--pod-card-bg-color` 保持颜色值。它们还会被 `background-color` 和组件颜色配置使用,不能填入渐变或图片。实心页面、卡片会遮住后面的根背景,不能认为根背景一改,所有内容面就会一起改变。
|
|
142
|
-
- 单页或首屏装饰:在当前页面根容器或区块上使用 `background-image` 或装饰层,保留基础底色。自绘导航需要与首屏连贯时,让两者共用该页面的背景层。
|
|
143
|
-
- 应用级样式覆盖写在 `app-theme.css`;先核实目标环境实际承载背景的容器和样式,再做小范围覆盖。不要猜测 `app body` 选择器,也不要从 Canvas 页面修改父页面的 body 或全局主题。iframe 内的页面需要各自加载主题。
|
|
323
|
+
组件默认密度和呼吸规则必须写到可实现数值:状态摘要 64-88px 高,动作条 40-56px 高,列表行 44-56px,高频按钮 36-40px,卡片 padding 默认 22-28px 且必须大于 20px,卡片和卡片的 gap 默认 12-18px 且必须小于 20px。空状态默认嵌在列表/面板内部,使用薄提示行、补录/刷新/新建动作和简短说明;不得用 160px 以上大白卡只显示“暂无数据”。
|
|
144
324
|
|
|
145
|
-
##
|
|
325
|
+
## 13. 快捷入口区域
|
|
146
326
|
|
|
147
|
-
|
|
327
|
+
工作台、仪表盘、管理后台或运营首页必须输出快捷入口区域规则。说明位置、容器、条目、数量、图标、文字、状态、响应式、与 DNA 的关系和禁止漂移。
|
|
148
328
|
|
|
149
|
-
|
|
329
|
+
快捷入口的图标使用 `iconSystem` 中的具体组件名。常用映射示例:新增/创建用 `Plus`,搜索/查询用 `Search`,刷新用 `RefreshCw`,查看用 `Eye`,入库/上传用 `Upload`,出库/下载用 `Download`,供应商/组织用 `Building2`,告警用 `AlertCircle`,完成用 `Check`。
|
|
150
330
|
|
|
151
|
-
|
|
331
|
+
## 14. 页面结构配方
|
|
152
332
|
|
|
153
|
-
|
|
333
|
+
提供 2-4 个使用中性槽位的布局配方,例如 `primary_metrics`、`quick_actions`、`trend_panel`、`detail_table`、`status_note`。每个使用到自定义页面的场景都必须写 `visualScaffold`:
|
|
154
334
|
|
|
155
|
-
|
|
335
|
+
- visualScaffold:<rootShell / prioritySurface / statusPrimitive / actionPrimitive / contentPrimitive / contextPrimitive / statePrimitive / responsiveRule / breathingRule>
|
|
336
|
+
- surfaceMap:<每个区块的容器形态、背景、边框、阴影、毛玻璃或平面规则>
|
|
337
|
+
- surfaceContrast:<页面背景与卡片背景的层次搭配;从 white-bg-bordered-card / gray-bg-white-card / tinted-bg-white-card / gradient-bg-glass-card 中选择>
|
|
338
|
+
- densityRule:<页面边距、卡片 gap、状态摘要高度、列表行高、卡片 padding、空态高度和压缩空白规则>
|
|
339
|
+
- breathingRule:<首屏分组节奏、跨区块间距、组内内距、贴边修正、内容不足时的压缩/补充策略>
|
|
340
|
+
- roundedRule:<业务面板、主面板、控件、标签、抽屉和弹层的圆角数值>
|
|
341
|
+
- componentRecipe:<每个关键组件的结构、密度、状态和 token 使用>
|
|
156
342
|
|
|
157
|
-
|
|
343
|
+
## 15. 状态与交互
|
|
158
344
|
|
|
159
|
-
|
|
345
|
+
列出 hover、active、focus、loading、empty、error、disabled、selected、mobile 和 reduced motion 规则。
|
|
160
346
|
|
|
161
|
-
|
|
347
|
+
## 16. 响应式
|
|
162
348
|
|
|
163
|
-
|
|
164
|
-
openyida check-design prd/<项目名>/design.md --json
|
|
165
|
-
```
|
|
349
|
+
定义断点和布局折叠方式。说明文字适配、工具栏换行、表格横向滚动和触控目标尺寸。
|
|
166
350
|
|
|
167
|
-
|
|
351
|
+
## 17. 可访问性
|
|
168
352
|
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
353
|
+
要求对比度、focus 状态、纯图标控件标签、非纯颜色状态表达、键盘可访问和 reduced motion。
|
|
354
|
+
|
|
355
|
+
## 18. 实现适配
|
|
356
|
+
|
|
357
|
+
只包含相关适配,例如 CSS 变量、Ant Design ConfigProvider、Tailwind class 映射、Yida / YidaCodeCanvas 容器重置或 React 组件建议。宜搭主题必须写成可执行契约:
|
|
358
|
+
|
|
359
|
+
### Yida Application Theme Delivery Contract
|
|
360
|
+
|
|
361
|
+
| 项目 | 规则 |
|
|
362
|
+
| ------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
363
|
+
| 自定义色盘 | 颜色可任意设计,必须完整输出平台实际生成的 `--color-brand1-1/2/3/5/6/9/10`,不得补造 `4/7/8`;其中 `--color-brand1-6` 写字面量颜色 |
|
|
364
|
+
| 应用级换肤 | 使用 CLI token 契约生成或更新的主题文件,在应用级统一配置 |
|
|
365
|
+
| 自定义页面 | 当前页面在自身运行上下文消费应用主题变量 |
|
|
366
|
+
| 页面局部样式 | 自定义页面使用自身运行上下文中的应用主题变量,页面局部样式直接引用语义 token |
|
|
367
|
+
|
|
368
|
+
### 自定义页面实现要求
|
|
369
|
+
|
|
370
|
+
- 页面直接使用当前运行上下文中的 CSS 变量。
|
|
371
|
+
- `backgroundLayer` 必须落到根节点背景、`::before` 顶部不规则色块或大面积光洗、`::after` 流光/纹理层;内容层使用相对定位和更高 `z-index`,保证背景不盖住操作区。
|
|
372
|
+
- `surfaceContrast` 必须落到页面根背景和卡片/面板样式:白色/浅色背景配有边框卡片,浅灰或浅彩背景配白色无边框卡片,渐变背景配玻璃感卡片。
|
|
373
|
+
- `flowLight` 动效必须写 `@media (prefers-reduced-motion: reduce)` 停止动画。
|
|
374
|
+
- 页面图标使用 `lucide-react` 或 `@ant-design/icons` 的标准 import,默认从 `lucide-react` named import 具体组件;源码按 `iconSystem.actionIconMap` / `statusIconMap` / `navigationIconMap` / `emptyStateIconMap` 渲染图标。CSS 只能控制图标容器样式,不能绘制或替代图标本体。
|
|
172
375
|
|
|
173
|
-
|
|
376
|
+
### 平台 JSX 组件实现要求
|
|
174
377
|
|
|
175
|
-
|
|
378
|
+
- 平台 JSX 组件页直接使用当前运行上下文中的应用主题 CSS 变量。
|
|
379
|
+
- 平台 JSX 组件页面发布后落到平台 `Jsx` 组件,不支持 `import/require`。
|
|
380
|
+
- 平台 JSX 组件页面的图标来源仍只允许 `lucide-react` 或 `@ant-design/icons`,默认 `lucide-react`;但加载方式不是 import,而是已验证运行时脚本/global。emoji 报错时按 `iconSystem` 映射到这两类图标来源,不退成 CSS 图形、字母占位、Unicode 符号、iconfont 或临时 SVG。
|
|
381
|
+
- 使用 ES5 写法,避免平台 JSX 组件编译链不支持的语法;若当前平台 JSX 组件运行环境无法稳定加载图标库,必须去掉非必要图标或改用已验证资源,不能绕过图标规范。
|
|
176
382
|
|
|
177
|
-
|
|
383
|
+
## 19. 必须包含
|
|
384
|
+
|
|
385
|
+
列出硬性正向要求。每个视觉 DNA 都必须作为明确必选规则出现。必须包含 `styleDesignSelection`、`themeAdaptationResult` 和 `baseDesignSource`。若 `themeDelivery=app-custom-theme-file`,必须包含模板路径和 CSS 产物路径。
|
|
386
|
+
|
|
387
|
+
## 20. 禁止项
|
|
388
|
+
|
|
389
|
+
列出硬性负向约束,覆盖会抹掉每个 DNA 的错误做法。必须包含:不得按行业或颜色直接套风格;不得为了还原风格凭空创造 PRD 未要求的模块。
|
|
390
|
+
|
|
391
|
+
## 21. 错误 vs 正确
|
|
392
|
+
|
|
393
|
+
用短对照保护视觉 DNA、快捷入口风格继承和主题运行时契约。
|
|
394
|
+
|
|
395
|
+
| 错误 | 正确 |
|
|
396
|
+
| ------------------------------------ | ---------------------------------------------------------------------- |
|
|
397
|
+
| 看到绿色业务就选 `teal-rail` | 先推演用户任务、信息拓扑和 requiredVisualDNA,再选风格;绿色只用于换肤 |
|
|
398
|
+
| 为了套时间轴风格新增不存在的阶段模块 | PRD 没有阶段/里程碑时排除时间轴风格 |
|
|
399
|
+
| 重新生成或覆盖整份主题 CSS | 先复制模板,再修改对应 token |
|
|
400
|
+
| 自定义页面颜色与设计结果不一致 | 对照 `design.md` 和当前应用主题变量修正页面用色 |
|
|
401
|
+
| PRD 里复制完整视觉规则 | PRD 只写摘要,完整 UI 规则写 design.md |
|
|
402
|
+
|
|
403
|
+
## 22. Agent 使用提示
|
|
404
|
+
|
|
405
|
+
简要说明如何按本文档实现页面,并给出当前应用主题文件的位置。主题更新统一遵守本文件的 CLI token 契约。
|
|
406
|
+
|
|
407
|
+
## 23. 交付自检清单
|
|
408
|
+
|
|
409
|
+
- [ ] `baseDesignSource` 已写选中的 `references/style-designs/<style>.md`,或在所有内置风格不适用时说明 `generated-from-business-context` 原因。
|
|
410
|
+
- [ ] `styleDesignSelection` 已说明用户任务、信息拓扑、requiredVisualDNA、选中风格、排除风格和置信度。
|
|
411
|
+
- [ ] 设计风格选择依据来自业务结构和视觉 DNA 命中,不是行业、颜色或主观偏好。
|
|
412
|
+
- [ ] `themeAdaptationResult` 已说明输入主题色、换肤策略、replaced token、preservedVisualDNA 和 preservedMechanisms。
|
|
413
|
+
- [ ] 主题色遵守“换 hue,不换 DNA;换 token,不换结构”。
|
|
414
|
+
- [ ] 源图或参考业务内容已抽象为中性槽位。
|
|
415
|
+
- [ ] 文档识别了 2-5 个视觉 DNA / 设计母体。
|
|
416
|
+
- [ ] 每个 DNA 都包含证据、规则、实现钩子、失败表现和置信度。
|
|
417
|
+
- [ ] DNA 已同步进入必须包含、禁止项、错误 vs 正确、Agent 使用提示和最终自检。
|
|
418
|
+
- [ ] 若页面类型是工作台、仪表盘、管理后台或运营首页,文档已包含快捷入口区域。
|
|
419
|
+
- [ ] 可推断的 token 已给出具体值。
|
|
420
|
+
- [ ] 组件包含状态规则,而不只是静态外观。
|
|
421
|
+
- [ ] `iconSystem` 已声明默认图标库、可用图标库、尺寸、描边风格,并为快捷入口、按钮、状态、导航和空态提供具体 `actionIconMap` / `statusIconMap` / `navigationIconMap` / `emptyStateIconMap`。
|
|
422
|
+
- [ ] 已明确卡片圆角范围:0-32px,并说明业务卡片、主面板、控件和状态胶囊各自取值。
|
|
423
|
+
- [ ] 已明确紧凑密度默认值:状态摘要、动作条、列表行、空态高度、卡片 padding >20px、卡片 gap <20px 都有数值范围。
|
|
424
|
+
- [ ] 工作台/首页首屏没有超宽空 KPI 框、大空态白卡、无内容右栏或靠 margin/padding 撑出的空白。
|
|
425
|
+
- [ ] 响应式和可访问性规则完整。
|
|
426
|
+
- [ ] `themeProfile`、`yidaThemeDelivery` 和 `tokens` 一致。
|
|
427
|
+
- [ ] `backgroundLayer` 已说明基础画布、装饰方式和是否使用背景 primitive;若选择近白画布,已说明如何通过渐变、细线、素材或内容密度形成背景感。
|
|
428
|
+
- [ ] `surfaceContrast` 已说明页面背景与卡片背景的明确层次搭配,不存在相近或相同背景。
|
|
429
|
+
- [ ] 若使用 `topIrregularWash`、`flowLight` 或 `organicNoise`,已写清对比度、内容栅格和 reduced motion 静态降级。
|
|
430
|
+
- [ ] 自定义页面消费应用主题变量。
|
|
431
|
+
- [ ] 不依赖原截图,也能指导生成一个新页面。
|
|
432
|
+
```
|
|
178
433
|
|
|
179
|
-
|
|
434
|
+
## 交给实现阶段
|
|
180
435
|
|
|
181
|
-
|
|
436
|
+
- `yida-app` 读取 `prd/<项目名>/prd.md` 和 `prd/<项目名>/design.md` 后创建或复用资源。
|
|
437
|
+
- 页面实现阶段读取 `prd.md` 的业务内容,并直接读取 `design.md` 的视觉 DNA、token、布局、组件、状态和 `Yida Application Theme Delivery Contract`。
|
|
438
|
+
- 页面实现交给 `yida-canvas-custom-page`。
|
|
439
|
+
- 只有走页面生成器或需要稳定交接时才派生 `page-spec.json`,并标记 `sourceOfTruth.prdFile/designFile`。`page-spec.json` 不复制完整 design.md,只保存与 design.md 一致的主题摘要和引用。
|