openyida 2026.9.21 → 2026.9.22-beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (334) hide show
  1. package/README.md +14 -20
  2. package/bin/yida.js +6 -11
  3. package/lib/app/app-list.js +3 -7
  4. package/lib/app/canvas-compile.js +12 -22
  5. package/lib/app/check-prd-completeness.js +0 -7
  6. package/lib/app/create-app.js +1 -4
  7. package/lib/app/create-form/args.js +12 -37
  8. package/lib/app/create-form/batch.js +11 -86
  9. package/lib/app/create-form.js +86 -193
  10. package/lib/app/create-page.js +17 -84
  11. package/lib/app/custom-theme.js +0 -11
  12. package/lib/app/form-field-validator.js +41 -26
  13. package/lib/app/form-open-guard.js +10 -97
  14. package/lib/app/get-form-config.js +0 -1
  15. package/lib/app/inline-css-guard.js +31 -1
  16. package/lib/app/services/form-compiler.js +4 -2
  17. package/lib/app/theme-from-design.js +41 -144
  18. package/lib/app/theme-presets.js +1 -1
  19. package/lib/app/update-app.js +13 -63
  20. package/lib/asset/ai-image.js +9 -59
  21. package/lib/asset/asset-cmd.js +7 -18
  22. package/lib/asset/asset-plan.js +9 -102
  23. package/lib/asset/asset-resolve.js +10 -55
  24. package/lib/asset/asset-status.js +4 -5
  25. package/lib/asset/host-capabilities.js +2 -11
  26. package/lib/asset/url-verify.js +4 -19
  27. package/lib/auth/dws-sync.js +148 -0
  28. package/lib/auth/token-auth.js +73 -9
  29. package/lib/auth/token-store.js +50 -0
  30. package/lib/connector/connector-test.js +5 -19
  31. package/lib/connector/contract.js +1 -3
  32. package/lib/core/agent-capabilities.js +16 -19
  33. package/lib/core/command-manifest.js +40 -329
  34. package/lib/core/locales/en.js +17 -74
  35. package/lib/core/locales/zh.js +16 -73
  36. package/lib/core/redact.js +10 -15
  37. package/lib/core/sample.js +30 -72
  38. package/lib/core/utils.js +4 -0
  39. package/lib/design-plan/design-plan.js +4 -51
  40. package/lib/design-plan/init.js +26 -121
  41. package/lib/design-plan/materialize.js +348 -451
  42. package/lib/design-plan/normalize.js +29 -74
  43. package/lib/design-plan/parallel.js +16 -71
  44. package/lib/design-plan/patch.js +16 -63
  45. package/lib/design-plan/preview.js +8 -6
  46. package/lib/design-plan/validate.js +11 -71
  47. package/lib/process/create-process.js +50 -84
  48. package/lib/samples/openyida-scaffold/canvas-form-drawer.canvas.jsx +90 -20
  49. package/lib/samples/openyida-scaffold/canvas-nav/content.jsx +13 -93
  50. package/lib/samples/openyida-scaffold/canvas-nav/data.jsx +18 -100
  51. package/lib/samples/openyida-scaffold/canvas-nav/mixed.jsx +4 -6
  52. package/lib/samples/openyida-scaffold/canvas-nav/shared.jsx +5 -5
  53. package/lib/samples/openyida-scaffold/canvas-nav/side.jsx +2 -1
  54. package/lib/samples/openyida-scaffold/canvas-nav/sidebar.jsx +1 -1
  55. package/lib/samples/openyida-scaffold/canvas-nav/top.jsx +9 -15
  56. package/lib/samples/yida-canvas-table-form/table-form-batch-submit.canvas.jsx +83 -9
  57. package/lib/samples/yida-rechart/trend-combo.canvas.jsx +87 -14
  58. package/package.json +1 -3
  59. package/scripts/postinstall.js +3 -3
  60. package/yida-skills/SKILL.md +16 -19
  61. package/yida-skills/references/official-example-schema-patterns.md +1 -1
  62. package/yida-skills/references/yida-api.md +0 -4
  63. package/yida-skills/skills/yida-app/SKILL.md +23 -46
  64. package/yida-skills/skills/yida-app/workflow/parallel-work.md +6 -15
  65. package/yida-skills/skills/yida-app/workflow/plan/step-1-understand.md +1 -1
  66. package/yida-skills/skills/yida-app/workflow/plan/step-2-confirm.md +1 -1
  67. package/yida-skills/skills/yida-app/workflow/plan/step-4-deliver.md +15 -29
  68. package/yida-skills/skills/yida-app/workflow/plan/workflow.md +11 -29
  69. package/yida-skills/skills/yida-app/workflow/step-1-resource-context.md +2 -4
  70. package/yida-skills/skills/yida-app/workflow/step-2-design.md +9 -23
  71. package/yida-skills/skills/yida-app/workflow/step-3-create-or-reuse-app.md +4 -6
  72. package/yida-skills/skills/yida-app/workflow/step-4-forms-processes.md +4 -15
  73. package/yida-skills/skills/yida-app/workflow/step-6-main-page.md +4 -6
  74. package/yida-skills/skills/yida-app/workflow/step-7-page-code.md +9 -15
  75. package/yida-skills/skills/yida-app/workflow/step-8-publish-navigation.md +11 -25
  76. package/yida-skills/skills/yida-app/workflow/step-9-output-finish.md +28 -68
  77. package/yida-skills/skills/yida-canvas-custom-page/SKILL.md +43 -42
  78. package/yida-skills/skills/yida-canvas-custom-page/references/canvas-style-implementation-guide.md +44 -60
  79. package/yida-skills/skills/yida-canvas-custom-page/references/canvas-theme-provider.md +50 -72
  80. package/yida-skills/skills/yida-canvas-custom-page/references/component-library-guide.md +1 -13
  81. package/yida-skills/skills/yida-canvas-custom-page/references/data-bridge-guide.md +1 -140
  82. package/yida-skills/skills/yida-canvas-custom-page/references/navigation-and-entry-guide.md +72 -101
  83. package/yida-skills/skills/yida-canvas-custom-page/references/page-generation-guide.md +32 -35
  84. package/yida-skills/skills/yida-canvas-custom-page/scripts/build-canvas-theme.js +3 -29
  85. package/yida-skills/skills/yida-canvas-custom-page/scripts/canvas-theme-provider.template.jsx +6 -69
  86. package/yida-skills/skills/yida-canvas-data-binding/SKILL.md +0 -26
  87. package/yida-skills/skills/yida-create-app/SKILL.md +0 -2
  88. package/yida-skills/skills/yida-create-form-page/SKILL.md +58 -72
  89. package/yida-skills/skills/yida-create-form-page/references/advanced-form-modes.md +5 -5
  90. package/yida-skills/skills/yida-create-form-page/references/association-form-field.md +4 -4
  91. package/yida-skills/skills/yida-create-form-page/references/batch-forms.md +5 -6
  92. package/yida-skills/skills/yida-create-form-page/references/field-definition-guide.md +19 -7
  93. package/yida-skills/skills/yida-create-form-page/references/form-field-properties.md +44 -62
  94. package/yida-skills/skills/yida-create-page/SKILL.md +6 -14
  95. package/yida-skills/skills/yida-create-process/SKILL.md +2 -13
  96. package/yida-skills/skills/yida-custom-page/SKILL.md +0 -2
  97. package/yida-skills/skills/yida-custom-page/references/design-system.md +1 -1
  98. package/yida-skills/skills/yida-dashboard/SKILL.md +4 -5
  99. package/yida-skills/skills/yida-data-management/SKILL.md +2 -4
  100. package/yida-skills/skills/yida-data-management/references/data-format-guide.md +4 -4
  101. package/yida-skills/skills/yida-design/SKILL.md +14 -29
  102. package/yida-skills/skills/yida-design/references/app/blueprint.md +70 -0
  103. package/yida-skills/skills/yida-design/references/app/navigation-patterns.md +43 -0
  104. package/yida-skills/skills/yida-design/references/app/role-journey.md +30 -0
  105. package/yida-skills/skills/yida-design/references/ask-human-interaction-contract.md +42 -67
  106. package/yida-skills/skills/yida-design/references/asset-workflow.md +2 -6
  107. package/yida-skills/skills/yida-design/references/design-mode.md +4 -4
  108. package/yida-skills/skills/yida-design/references/page-quality-gates.md +38 -26
  109. package/yida-skills/skills/yida-design/references/style-design-selection.md +137 -0
  110. package/yida-skills/skills/yida-design/references/style-designs/_design-md-template.md +185 -0
  111. package/yida-skills/skills/yida-design/references/style-designs/aqua-service-progress-dashboard.md +242 -0
  112. package/yida-skills/skills/yida-design/references/style-designs/blue-insight-operations-dashboard.md +243 -0
  113. package/yida-skills/skills/yida-design/references/style-designs/blue-productivity-insight-workbench.md +242 -0
  114. package/yida-skills/skills/yida-design/references/style-designs/command-filter-card-console.md +304 -0
  115. package/yida-skills/skills/yida-design/references/style-designs/contrast-command-analytics-workbench.md +261 -0
  116. package/yida-skills/skills/yida-design/references/style-designs/dark-stage-analytic-dashboard.md +369 -0
  117. package/yida-skills/skills/yida-design/references/style-designs/filterable-card-catalog.md +354 -0
  118. package/yida-skills/skills/yida-design/references/style-designs/green-timeline-progress-workbench.md +250 -0
  119. package/yida-skills/skills/yida-design/references/style-designs/registry.md +117 -0
  120. package/yida-skills/skills/yida-design/references/style-designs/soft-analytic-workbench.md +348 -0
  121. package/yida-skills/skills/yida-design/references/style-designs/soft-blue-grid-analytic-dashboard.md +658 -0
  122. package/yida-skills/skills/yida-design/references/style-designs/soft-bordered-analytic-workbench.md +385 -0
  123. package/yida-skills/skills/yida-design/references/style-designs/soft-curated-filter-gallery.md +300 -0
  124. package/yida-skills/skills/yida-design/references/style-designs/soft-modular-analytic-workbench.md +404 -0
  125. package/yida-skills/skills/yida-design/references/style-designs/soft-progress-analytics-workbench.md +382 -0
  126. package/yida-skills/skills/yida-design/references/style-designs/soft-timeline-analytics-workbench.md +367 -0
  127. package/yida-skills/skills/yida-design/references/style-designs/teal-rail-analytics-workbench.md +341 -0
  128. package/yida-skills/skills/yida-design/references/theme/app-custom-theme-template.css +432 -350
  129. package/yida-skills/skills/yida-design/references/visual-decision-engine.md +143 -19
  130. package/yida-skills/skills/yida-design/references/visual-scaffold-recipes.md +27 -15
  131. package/yida-skills/skills/yida-design/sub_skill/page-design/SKILL.md +0 -4
  132. package/yida-skills/skills/yida-design/sub_skill/yida-design-plan/SKILL.md +8 -22
  133. package/yida-skills/skills/yida-design/sub_skill/yida-design-plan/assets/README.md +10 -14
  134. package/yida-skills/skills/yida-design/sub_skill/yida-design-plan/assets/build-plan-template.html +4 -9
  135. package/yida-skills/skills/yida-design/sub_skill/yida-design-plan/references/build-plan-compact-schema.md +27 -49
  136. package/yida-skills/skills/yida-design/sub_skill/yida-design-plan/references/build-plan-schema.md +154 -33
  137. package/yida-skills/skills/yida-design/sub_skill/yida-design-plan/references/visual-design.md +127 -48
  138. package/yida-skills/skills/yida-design/sub_skill/yida-design-plan/references/visual-theme-selection.md +51 -37
  139. package/yida-skills/skills/yida-design/sub_skill/yida-design-plan/scripts/render_build_plan.py +48 -43
  140. package/yida-skills/skills/yida-design/sub_skill/yida-design-plan/scripts/validate_design_themes.py +190 -0
  141. package/yida-skills/skills/yida-design/sub_skill/yida-design-plan/templates/design-themes/README.md +98 -0
  142. package/yida-skills/skills/yida-design/sub_skill/yida-design-plan/templates/design-themes/airy-media-grid.md +339 -0
  143. package/yida-skills/skills/yida-design/sub_skill/yida-design-plan/templates/design-themes/airy-modular-clarity.md +348 -0
  144. package/yida-skills/skills/yida-design/sub_skill/yida-design-plan/templates/design-themes/airy-structured-clarity.md +344 -0
  145. package/yida-skills/skills/yida-design/sub_skill/yida-design-plan/templates/design-themes/ambient-halo-layered.md +345 -0
  146. package/yida-skills/skills/yida-design/sub_skill/yida-design-plan/templates/design-themes/dark-focus-layered.md +355 -0
  147. package/yida-skills/skills/yida-design/sub_skill/yida-design-plan/templates/design-themes/dark-luminous-modular.md +377 -0
  148. package/yida-skills/skills/yida-design/sub_skill/yida-design-plan/templates/design-themes/deep-stage-duotone.md +352 -0
  149. package/yida-skills/skills/yida-design/sub_skill/yida-design-plan/templates/design-themes/hairline-runway-clarity.md +389 -0
  150. package/yida-skills/skills/yida-design/sub_skill/yida-design-plan/templates/design-themes/high-contrast-modular.md +364 -0
  151. package/yida-skills/skills/yida-design/sub_skill/yida-design-plan/templates/design-themes/index.json +329 -0
  152. package/yida-skills/skills/yida-design/sub_skill/yida-design-plan/templates/design-themes/interlocked-vivid-modules.md +348 -0
  153. package/yida-skills/skills/yida-design/sub_skill/yida-design-plan/templates/design-themes/matrix-grid-focus.md +345 -0
  154. package/yida-skills/skills/yida-design/sub_skill/yida-design-plan/templates/design-themes/media-rail-inspector.md +379 -0
  155. package/yida-skills/skills/yida-design/sub_skill/yida-design-plan/templates/design-themes/mist-layered-signal.md +347 -0
  156. package/yida-skills/skills/yida-design/sub_skill/yida-design-plan/templates/design-themes/modular-rail-signal.md +352 -0
  157. package/yida-skills/skills/yida-design/sub_skill/yida-design-plan/templates/design-themes/mono-grid-signal.md +386 -0
  158. package/yida-skills/skills/yida-design/sub_skill/yida-design-plan/templates/design-themes/ribbon-ledger-lift.md +384 -0
  159. package/yida-skills/skills/yida-design/sub_skill/yida-design-plan/templates/design-themes/segmented-meter-clarity.md +388 -0
  160. package/yida-skills/skills/yida-design/sub_skill/yida-design-plan/templates/design-themes/split-rail-precision.md +341 -0
  161. package/yida-skills/skills/yida-design/sub_skill/yida-design-plan/templates/design-themes/status-framed-media-grid.md +361 -0
  162. package/yida-skills/skills/yida-design/workflow/output-design.md +375 -117
  163. package/yida-skills/skills/yida-design/workflow/output-prd.md +185 -0
  164. package/yida-skills/skills/yida-design/workflow/step-1-read-brief.md +1 -1
  165. package/yida-skills/skills/yida-design/workflow/step-2-theme-system.md +29 -33
  166. package/yida-skills/skills/yida-design/workflow/step-4-wireframe-interaction.md +1 -3
  167. package/yida-skills/skills/yida-design/workflow/step-5-visual-states.md +106 -22
  168. package/yida-skills/skills/yida-design/workflow/step-6-handoff.md +22 -15
  169. package/yida-skills/skills/yida-form-permission/SKILL.md +0 -6
  170. package/yida-skills/skills/yida-image-assets/SKILL.md +50 -73
  171. package/yida-skills/skills/yida-image-assets/references/manifest-contract.md +52 -82
  172. package/yida-skills/skills/yida-image-assets/references/source-policy.md +15 -14
  173. package/yida-skills/skills/yida-integration/SKILL.md +0 -1
  174. package/yida-skills/skills/yida-login/SKILL.md +0 -2
  175. package/yida-skills/skills/yida-nav-group/SKILL.md +2 -4
  176. package/yida-skills/skills/yida-nav-shell/SKILL.md +12 -36
  177. package/yida-skills/skills/yida-nav-shell/references/nav-shell-patterns.md +136 -79
  178. package/yida-skills/skills/yida-page-config/SKILL.md +4 -13
  179. package/yida-skills/skills/yida-prd/SKILL.md +3 -5
  180. package/yida-skills/skills/yida-prd/references/app/blueprint.md +4 -4
  181. package/yida-skills/skills/yida-prd/references/app/navigation-patterns.md +3 -6
  182. package/yida-skills/skills/yida-prd/references/app/role-journey.md +3 -5
  183. package/yida-skills/skills/yida-prd/references/plan-content.md +0 -4
  184. package/yida-skills/skills/yida-prd/workflow/output-prd.md +11 -18
  185. package/yida-skills/skills/yida-prd/workflow/plan-business.md +4 -4
  186. package/yida-skills/skills/yida-prd/workflow/step-2-information-architecture.md +8 -11
  187. package/yida-skills/skills/yida-publish-page/SKILL.md +1 -9
  188. package/yida-skills/skills/yida-requirement-analysis/SKILL.md +39 -10
  189. package/yida-skills/skills/yida-requirement-analysis/workflow/prepare-brief.md +71 -40
  190. package/yida-skills/skills-index.json +16 -36
  191. package/lib/app/application-entry-urls.js +0 -31
  192. package/lib/app/application-style.js +0 -69
  193. package/lib/app/canvas-icon-exports.json +0 -6160
  194. package/lib/app/canvas-icon-guard.js +0 -87
  195. package/lib/app/canvas-navigation-guard.js +0 -84
  196. package/lib/app/canvas-path-guard.js +0 -78
  197. package/lib/app/canvas-theme-guard.js +0 -184
  198. package/lib/app/form-data-response-guard.js +0 -57
  199. package/lib/asset/asset-execution.js +0 -79
  200. package/lib/core/css-structure.js +0 -37
  201. package/lib/design/check-design.js +0 -51
  202. package/lib/design/document.js +0 -458
  203. package/lib/design/icon-contrast.js +0 -85
  204. package/lib/design/page-content.js +0 -11
  205. package/lib/design-plan/artifact-updates.js +0 -117
  206. package/lib/design-plan/confirmation.js +0 -13
  207. package/lib/design-plan/entry-navigation.js +0 -97
  208. package/lib/design-plan/navigation-policy.js +0 -38
  209. package/lib/design-plan/rebase.js +0 -60
  210. package/lib/design-plan/themes.js +0 -101
  211. package/lib/design-plan/visual-policy.js +0 -42
  212. package/lib/samples/openyida-scaffold/canvas-admin-entry.jsx +0 -62
  213. package/lib/samples/openyida-scaffold/canvas-navigation.jsx +0 -56
  214. package/lib/samples/openyida-scaffold/canvas-view-state.jsx +0 -74
  215. package/yida-skills/skills/yida-app/references/entry-navigation.md +0 -193
  216. package/yida-skills/skills/yida-canvas-custom-page/references/view-state-recovery.md +0 -52
  217. package/yida-skills/skills/yida-canvas-data-binding/references/business-action-permissions.md +0 -31
  218. package/yida-skills/skills/yida-design/references/application-style-library.md +0 -93
  219. package/yida-skills/skills/yida-design/references/application-theme-consistency.md +0 -150
  220. package/yida-skills/skills/yida-design/references/native-form-styles.md +0 -208
  221. package/yida-skills/skills/yida-design/references/navigation-decision.md +0 -53
  222. package/yida-skills/skills/yida-design/references/page-continuity.md +0 -42
  223. package/yida-skills/skills/yida-design/references/theme/application-style-recipes.css +0 -58
  224. package/yida-skills/skills/yida-design/references/theme-selection.md +0 -67
  225. package/yida-skills/skills/yida-design/scripts/validate_design_themes.py +0 -302
  226. package/yida-skills/skills/yida-design/templates/application-styles.json +0 -398
  227. package/yida-skills/skills/yida-design/templates/design-themes/README.md +0 -73
  228. package/yida-skills/skills/yida-design/templates/design-themes/app-amber/app_theme.css +0 -748
  229. package/yida-skills/skills/yida-design/templates/design-themes/app-amber/design.md +0 -274
  230. package/yida-skills/skills/yida-design/templates/design-themes/app-amber/form-layout.json +0 -15
  231. package/yida-skills/skills/yida-design/templates/design-themes/app-editorial/app_theme.css +0 -748
  232. package/yida-skills/skills/yida-design/templates/design-themes/app-editorial/design.md +0 -274
  233. package/yida-skills/skills/yida-design/templates/design-themes/app-editorial/form-layout.json +0 -14
  234. package/yida-skills/skills/yida-design/templates/design-themes/app-executive/app_theme.css +0 -748
  235. package/yida-skills/skills/yida-design/templates/design-themes/app-executive/design.md +0 -274
  236. package/yida-skills/skills/yida-design/templates/design-themes/app-executive/form-layout.json +0 -13
  237. package/yida-skills/skills/yida-design/templates/design-themes/app-finance/app_theme.css +0 -748
  238. package/yida-skills/skills/yida-design/templates/design-themes/app-finance/design.md +0 -274
  239. package/yida-skills/skills/yida-design/templates/design-themes/app-finance/form-layout.json +0 -14
  240. package/yida-skills/skills/yida-design/templates/design-themes/app-glass/app_theme.css +0 -748
  241. package/yida-skills/skills/yida-design/templates/design-themes/app-glass/design.md +0 -274
  242. package/yida-skills/skills/yida-design/templates/design-themes/app-glass/form-layout.json +0 -14
  243. package/yida-skills/skills/yida-design/templates/design-themes/app-graphite/app_theme.css +0 -748
  244. package/yida-skills/skills/yida-design/templates/design-themes/app-graphite/design.md +0 -274
  245. package/yida-skills/skills/yida-design/templates/design-themes/app-graphite/form-layout.json +0 -14
  246. package/yida-skills/skills/yida-design/templates/design-themes/app-line/app_theme.css +0 -748
  247. package/yida-skills/skills/yida-design/templates/design-themes/app-line/design.md +0 -274
  248. package/yida-skills/skills/yida-design/templates/design-themes/app-line/form-layout.json +0 -13
  249. package/yida-skills/skills/yida-design/templates/design-themes/app-neon/app_theme.css +0 -748
  250. package/yida-skills/skills/yida-design/templates/design-themes/app-neon/design.md +0 -274
  251. package/yida-skills/skills/yida-design/templates/design-themes/app-neon/form-layout.json +0 -14
  252. package/yida-skills/skills/yida-design/templates/design-themes/app-nordic/app_theme.css +0 -754
  253. package/yida-skills/skills/yida-design/templates/design-themes/app-nordic/design.md +0 -279
  254. package/yida-skills/skills/yida-design/templates/design-themes/app-nordic/form-layout.json +0 -13
  255. package/yida-skills/skills/yida-design/templates/design-themes/app-paper/app_theme.css +0 -748
  256. package/yida-skills/skills/yida-design/templates/design-themes/app-paper/design.md +0 -274
  257. package/yida-skills/skills/yida-design/templates/design-themes/app-paper/form-layout.json +0 -13
  258. package/yida-skills/skills/yida-design/templates/design-themes/app-platinum/app_theme.css +0 -748
  259. package/yida-skills/skills/yida-design/templates/design-themes/app-platinum/design.md +0 -274
  260. package/yida-skills/skills/yida-design/templates/design-themes/app-platinum/form-layout.json +0 -14
  261. package/yida-skills/skills/yida-design/templates/design-themes/app-plum/app_theme.css +0 -748
  262. package/yida-skills/skills/yida-design/templates/design-themes/app-plum/design.md +0 -274
  263. package/yida-skills/skills/yida-design/templates/design-themes/app-plum/form-layout.json +0 -14
  264. package/yida-skills/skills/yida-design/templates/design-themes/app-pop/app_theme.css +0 -758
  265. package/yida-skills/skills/yida-design/templates/design-themes/app-pop/design.md +0 -281
  266. package/yida-skills/skills/yida-design/templates/design-themes/app-pop/form-layout.json +0 -14
  267. package/yida-skills/skills/yida-design/templates/design-themes/app-sage/app_theme.css +0 -748
  268. package/yida-skills/skills/yida-design/templates/design-themes/app-sage/design.md +0 -274
  269. package/yida-skills/skills/yida-design/templates/design-themes/app-sage/form-layout.json +0 -14
  270. package/yida-skills/skills/yida-design/templates/design-themes/app-teal/app_theme.css +0 -748
  271. package/yida-skills/skills/yida-design/templates/design-themes/app-teal/design.md +0 -274
  272. package/yida-skills/skills/yida-design/templates/design-themes/app-teal/form-layout.json +0 -14
  273. package/yida-skills/skills/yida-design/templates/design-themes/app-terminal/app_theme.css +0 -754
  274. package/yida-skills/skills/yida-design/templates/design-themes/app-terminal/design.md +0 -279
  275. package/yida-skills/skills/yida-design/templates/design-themes/app-terminal/form-layout.json +0 -14
  276. package/yida-skills/skills/yida-design/templates/design-themes/app-ticket/app_theme.css +0 -752
  277. package/yida-skills/skills/yida-design/templates/design-themes/app-ticket/design.md +0 -278
  278. package/yida-skills/skills/yida-design/templates/design-themes/app-ticket/form-layout.json +0 -13
  279. package/yida-skills/skills/yida-design/templates/design-themes/app-wire/app_theme.css +0 -748
  280. package/yida-skills/skills/yida-design/templates/design-themes/app-wire/design.md +0 -274
  281. package/yida-skills/skills/yida-design/templates/design-themes/app-wire/form-layout.json +0 -14
  282. package/yida-skills/skills/yida-design/templates/design-themes/basic-tokens.json +0 -118
  283. package/yida-skills/skills/yida-design/templates/design-themes/dark-inset-hairline/app_theme.css +0 -690
  284. package/yida-skills/skills/yida-design/templates/design-themes/dark-inset-hairline/design.md +0 -382
  285. package/yida-skills/skills/yida-design/templates/design-themes/dark-inset-hairline/form-layout.json +0 -13
  286. package/yida-skills/skills/yida-design/templates/design-themes/dark-rail-fine-lines/app_theme.css +0 -691
  287. package/yida-skills/skills/yida-design/templates/design-themes/dark-rail-fine-lines/design.md +0 -380
  288. package/yida-skills/skills/yida-design/templates/design-themes/dark-rail-fine-lines/form-layout.json +0 -13
  289. package/yida-skills/skills/yida-design/templates/design-themes/dark-rail-signal-panels/app_theme.css +0 -696
  290. package/yida-skills/skills/yida-design/templates/design-themes/dark-rail-signal-panels/design.md +0 -378
  291. package/yida-skills/skills/yida-design/templates/design-themes/dark-rail-signal-panels/form-layout.json +0 -13
  292. package/yida-skills/skills/yida-design/templates/design-themes/free-creative/app_theme.css +0 -689
  293. package/yida-skills/skills/yida-design/templates/design-themes/free-creative/design.md +0 -238
  294. package/yida-skills/skills/yida-design/templates/design-themes/free-creative/form-layout.json +0 -13
  295. package/yida-skills/skills/yida-design/templates/design-themes/graphite-bevel-grid/app_theme.css +0 -692
  296. package/yida-skills/skills/yida-design/templates/design-themes/graphite-bevel-grid/design.md +0 -375
  297. package/yida-skills/skills/yida-design/templates/design-themes/graphite-bevel-grid/form-layout.json +0 -13
  298. package/yida-skills/skills/yida-design/templates/design-themes/hairline-shared-bands/app_theme.css +0 -691
  299. package/yida-skills/skills/yida-design/templates/design-themes/hairline-shared-bands/design.md +0 -362
  300. package/yida-skills/skills/yida-design/templates/design-themes/hairline-shared-bands/form-layout.json +0 -13
  301. package/yida-skills/skills/yida-design/templates/design-themes/hairline-soft-blocks/app_theme.css +0 -691
  302. package/yida-skills/skills/yida-design/templates/design-themes/hairline-soft-blocks/design.md +0 -409
  303. package/yida-skills/skills/yida-design/templates/design-themes/hairline-soft-blocks/form-layout.json +0 -13
  304. package/yida-skills/skills/yida-design/templates/design-themes/index.json +0 -464
  305. package/yida-skills/skills/yida-design/templates/design-themes/ink-glow-soft-panels/app_theme.css +0 -701
  306. package/yida-skills/skills/yida-design/templates/design-themes/ink-glow-soft-panels/design.md +0 -379
  307. package/yida-skills/skills/yida-design/templates/design-themes/ink-glow-soft-panels/form-layout.json +0 -13
  308. package/yida-skills/skills/yida-design/templates/design-themes/inset-frame-pixel-rhythm/app_theme.css +0 -691
  309. package/yida-skills/skills/yida-design/templates/design-themes/inset-frame-pixel-rhythm/design.md +0 -404
  310. package/yida-skills/skills/yida-design/templates/design-themes/inset-frame-pixel-rhythm/form-layout.json +0 -13
  311. package/yida-skills/skills/yida-design/templates/design-themes/outlined-texture-duotone/app_theme.css +0 -698
  312. package/yida-skills/skills/yida-design/templates/design-themes/outlined-texture-duotone/design.md +0 -389
  313. package/yida-skills/skills/yida-design/templates/design-themes/outlined-texture-duotone/form-layout.json +0 -13
  314. package/yida-skills/skills/yida-design/templates/design-themes/soft-inset-surfaces/app_theme.css +0 -691
  315. package/yida-skills/skills/yida-design/templates/design-themes/soft-inset-surfaces/design.md +0 -372
  316. package/yida-skills/skills/yida-design/templates/design-themes/soft-inset-surfaces/form-layout.json +0 -13
  317. package/yida-skills/skills/yida-design/templates/design-themes/soft-outline-rhythm/app_theme.css +0 -690
  318. package/yida-skills/skills/yida-design/templates/design-themes/soft-outline-rhythm/design.md +0 -455
  319. package/yida-skills/skills/yida-design/templates/design-themes/soft-outline-rhythm/form-layout.json +0 -13
  320. package/yida-skills/skills/yida-design/templates/design-themes/soft-rail-bold-band/app_theme.css +0 -698
  321. package/yida-skills/skills/yida-design/templates/design-themes/soft-rail-bold-band/design.md +0 -394
  322. package/yida-skills/skills/yida-design/templates/design-themes/soft-rail-bold-band/form-layout.json +0 -13
  323. package/yida-skills/skills/yida-design/templates/design-themes/soft-spectral-panels/app_theme.css +0 -692
  324. package/yida-skills/skills/yida-design/templates/design-themes/soft-spectral-panels/design.md +0 -391
  325. package/yida-skills/skills/yida-design/templates/design-themes/soft-spectral-panels/form-layout.json +0 -13
  326. package/yida-skills/skills/yida-design/templates/design-themes/warm-canvas-contrast-panels/app_theme.css +0 -711
  327. package/yida-skills/skills/yida-design/templates/design-themes/warm-canvas-contrast-panels/design.md +0 -408
  328. package/yida-skills/skills/yida-design/templates/design-themes/warm-canvas-contrast-panels/form-layout.json +0 -13
  329. package/yida-skills/skills/yida-design/templates/design-themes/warm-rail-muted-panels/app_theme.css +0 -692
  330. package/yida-skills/skills/yida-design/templates/design-themes/warm-rail-muted-panels/design.md +0 -383
  331. package/yida-skills/skills/yida-design/templates/design-themes/warm-rail-muted-panels/form-layout.json +0 -13
  332. package/yida-skills/skills/yida-design/templates/navigation-styles.json +0 -769
  333. package/yida-skills/skills/yida-requirement-analysis/references/experience-groups.md +0 -79
  334. package/yida-skills/skills/yida-requirement-analysis/references/handoff.md +0 -68
@@ -3,12 +3,8 @@
3
3
  const path = require('path');
4
4
  const { readJson } = require('./files');
5
5
  const { CliError } = require('../core/cli-error');
6
- const { derivePageContent } = require('./normalize');
7
- const { PLAN_SKILL_ROOT: ROOT, loadThemeIndex } = require('./themes');
8
- const { concretePageText } = require('../design/page-content');
9
- const { ENTRY_MODES } = require('./entry-navigation');
10
- const { t } = require('../core/i18n');
11
6
 
7
+ const ROOT = path.resolve(__dirname, '../../yida-skills/skills/yida-design/sub_skill/yida-design-plan');
12
8
  const object = value => value !== null && typeof value === 'object' && !Array.isArray(value);
13
9
  const filled = value => typeof value === 'string' && value.trim().length > 0;
14
10
 
@@ -20,7 +16,6 @@ function collectIssues(plan) {
20
16
  const array = (value, path, required = false) => check(Array.isArray(value) && (!required || value.length > 0), path, required ? '填写非空数组' : '填写数组');
21
17
  if (!check(object(plan), '$', '填写计划对象')) {return issues;}
22
18
  strings(plan.meta, 'meta', ['projectName', 'revision']);
23
- if (plan.visualStyle?.forUser?.selectedTheme) {strings(plan.meta, 'meta', ['experienceTopology', 'businessDomain']);}
24
19
  strings(plan.overview, 'overview', ['summary']);
25
20
  array(plan.overview?.rolePermissionSummary, 'overview.rolePermissionSummary', true);
26
21
  const models = Array.isArray(plan.dataModels) ? plan.dataModels : [];
@@ -53,7 +48,7 @@ function collectIssues(plan) {
53
48
  if (!object(model) || String(model.formType).includes('流程')) {return;}
54
49
  const entryIndex = Array.isArray(samples) ? samples.findIndex(entry => entry?.form === model.name) : -1;
55
50
  const entry = samples === undefined ? { records: model.sampleRecords, skipReason: model.skipSampleReason } : samples?.[entryIndex];
56
- const p = samples === undefined ? `dataModels[${index}].sampleRecords` : entryIndex < 0 ? 'execution.sampleDataPlan' : `execution.sampleDataPlan[${entryIndex}]`;
51
+ const p = samples === undefined ? `dataModels[${index}].sampleRecords` : `execution.sampleDataPlan[${entryIndex}]`;
57
52
  if (!check(object(entry), p, `补齐 ${model.name} 的示例记录或 skipReason`)) {return;}
58
53
  if (filled(entry.skipReason)) {return;}
59
54
  if (!check(Array.isArray(entry.records) && entry.records.length > 0 && entry.records.length <= 3, p, '填写 1–3 条业务示例记录,或说明跳过原因')) {return;}
@@ -66,29 +61,7 @@ function collectIssues(plan) {
66
61
  });
67
62
  });
68
63
  });
69
- if (plan.execution?.interactionStates !== undefined
70
- && check(object(plan.execution.interactionStates), 'execution.interactionStates', '填写对象,例如 {"empty":"展示空态","error":"提示失败原因"}')) {
71
- Object.entries(plan.execution.interactionStates).forEach(([key, value]) => {
72
- check(['empty', 'loading', 'error', 'formEntry', 'detail'].includes(key), `execution.interactionStates.${key}`, '选择 empty/loading/error/formEntry/detail');
73
- check(filled(value), `execution.interactionStates.${key}`, '填写该状态的业务行为说明');
74
- });
75
- }
76
64
  const pages = plan.pages?.customPageDetails;
77
- const recommendation = plan.execution?.entryRecommendation;
78
- if (recommendation !== undefined && check(object(recommendation), 'execution.entryRecommendation', '填写访问态入口方案')) {
79
- check(ENTRY_MODES.includes(recommendation.mode), 'execution.entryRecommendation.mode', t('cli.design_plan_entry_mode_required'));
80
- if (array(recommendation.entries, 'execution.entryRecommendation.entries', true)) {
81
- if (recommendation.mode === 'backend-only') {
82
- check(recommendation.entries.every(entry => entry?.role === 'management'), 'execution.entryRecommendation.entries', t('cli.design_plan_backend_only_roles'));
83
- }
84
- recommendation.entries.forEach((entry, index) => {
85
- const p = `execution.entryRecommendation.entries[${index}]`;
86
- strings(entry, p, ['key', 'name', 'defaultMenuKey']);
87
- check(['service', 'management', 'workspace'].includes(entry?.role), `${p}.role`, '选择 service/management/workspace');
88
- array(entry?.menu, `${p}.menu`, true);
89
- });
90
- }
91
- }
92
65
  const ids = new Set();
93
66
  const patternScenes = { 'data-insight': 'dashboard', 'catalog-browse': 'list', 'brand-landing': 'landing', 'progress-narrative': 'detail', 'split-pane-ops': 'detail' };
94
67
  const scenes = new Set((Array.isArray(pages) ? pages : []).map(page => page?.sceneKey || page?.pageSpecHandoff?.scene || page?.scene || patternScenes[page?.layoutPattern?.id] || 'workbench'));
@@ -97,25 +70,15 @@ function collectIssues(plan) {
97
70
  pages.forEach((page, index) => {
98
71
  const p = `pages.customPageDetails[${index}]`;
99
72
  if (!check(object(page), p, '填写页面对象')) {return;}
100
- if (/^2(?:\.|$)/.test(String(plan.schemaVersion))) {page = derivePageContent(page);}
101
73
  strings(page, p, ['pageId', 'name', 'primaryTask', 'permissionSummary', 'firstScreenStructure', 'density']);
102
74
  check(!ids.has(page.pageId), `${p}.pageId`, '页面 ID 保持唯一');
103
75
  ids.add(page.pageId);
104
- const legacyBlocks = !/^2(?:\.|$)/.test(String(plan.schemaVersion)) || (Array.isArray(page.blocks) && page.blocks.some(block => typeof block === 'string'));
105
- if (page.contentPriority !== undefined || legacyBlocks) {array(page.contentPriority, `${p}.contentPriority`, true);}
106
- if (page.contentRichness?.contentLayers !== undefined || legacyBlocks) {array(page.contentRichness?.contentLayers, `${p}.contentRichness.contentLayers`, true);}
76
+ array(page.contentPriority, `${p}.contentPriority`, true);
77
+ array(page.contentRichness?.contentLayers, `${p}.contentRichness.contentLayers`, true);
107
78
  check(patterns.some(item => item.id === page.layoutPattern?.id), `${p}.layoutPattern.id`, '使用 authoring-context 中的页面模式 ID');
108
- const mode = page.layoutPattern?.mode;
109
- if (mode) {
110
- check(['preset', 'adapted', 'custom'].includes(mode), `${p}.layoutPattern.mode`, '使用 preset、adapted 或 custom');
111
- if (mode === 'adapted') {array(page.layoutPattern.adaptations, `${p}.layoutPattern.adaptations`, true);}
112
- if (mode === 'custom') {check(page.layoutPattern.id === 'custom-page-pattern', `${p}.layoutPattern.id`, 'custom 模式使用 custom-page-pattern');}
113
- check(page.contentRichness?.requirement === 'rich-but-relevant', `${p}.contentRichness.requirement`, '使用 rich-but-relevant');
114
- array(page.contentRichness?.antiFiller, `${p}.contentRichness.antiFiller`, true);
115
- }
116
79
  const handoff = page.pageSpecHandoff || {};
117
80
  if (check(object(handoff), `${p}.pageSpecHandoff`, '填写交接对象')) {
118
- const keys = ['scene', 'pageStructure', 'entryMode', 'navigation', 'contentBlocks', 'dataSources', 'dataBinding', 'emptyReason', 'primaryAction', 'themeSummary', 'designFile', 'designRefs'];
81
+ const keys = ['scene', 'pageStructure', 'entryMode', 'contentBlocks', 'dataSources', 'dataBinding', 'emptyReason', 'primaryAction', 'themeSummary', 'designFile', 'designRefs'];
119
82
  for (const key of Object.keys(handoff)) {
120
83
  check(keys.includes(key), `${p}.pageSpecHandoff.${key}`, key === 'sceneKey' ? `移到 ${p}.sceneKey` : '使用编写契约中的交接字段');
121
84
  }
@@ -127,10 +90,7 @@ function collectIssues(plan) {
127
90
  }
128
91
  });
129
92
  }
130
- const blocks = handoff.contentBlocks || page.blocks;
131
- if (array(blocks, `${p}.blocks`, true)) {
132
- check(blocks.every(filled), `${p}.blocks`, '按优先顺序填写 {name,purpose} 区块,名称和业务用途均为非空文本;旧版使用非空文本数组');
133
- }
93
+ array(handoff.contentBlocks || page.blocks, `${p}.blocks`, true);
134
94
  const binding = handoff.dataBinding || page.dataBinding;
135
95
  check(['form', 'report', 'connector', 'static-empty'].includes(binding), `${p}.dataBinding`, '选择 form/report/connector/static-empty');
136
96
  const sources = handoff.dataSources || page.dataSources;
@@ -143,38 +103,18 @@ function collectIssues(plan) {
143
103
  }
144
104
  });
145
105
  }
146
- const applications = plan.visualStyle?.forUser?.pageApplications;
147
- for (const [index, page] of (Array.isArray(pages) ? pages : []).entries()) {
148
- const applicationIndex = Array.isArray(applications) ? applications.findIndex(item => item?.pageId === page?.pageId) : -1;
149
- const application = applications?.[applicationIndex];
150
- const p = `visualStyle.forUser.pageApplications[${applicationIndex < 0 ? index : applicationIndex}]`;
151
- for (const key of ['firstScreenFocus', 'layout', 'responsive', 'primaryAction']) {
152
- const value = application?.[key];
153
- check(concretePageText(value),
154
- `${p}.${key}`, `补齐 ${page?.name || page?.pageId} 的具体视觉决定,不能只写继承主题`);
155
- }
156
- check(Array.isArray(application?.acceptanceChecks) && application.acceptanceChecks.length > 0
157
- && application.acceptanceChecks.every(concretePageText), `${p}.acceptanceChecks`, `为 ${page?.name || page?.pageId} 填写具体的验收检查数组`);
158
- }
159
106
  if (/^2(?:\.|$)/.test(String(plan.schemaVersion))) {
160
107
  const user = plan.visualStyle?.forUser;
161
108
  strings(user?.visualDirection, 'visualStyle.forUser.visualDirection', ['label', 'description']);
162
109
  check(['top', 'side'].includes(user?.navigationStyle?.structure), 'visualStyle.forUser.navigationStyle.structure', '选择 top 或 side');
163
110
  check(['light', 'dark'].includes(user?.navigationStyle?.tone), 'visualStyle.forUser.navigationStyle.tone', '选择 light 或 dark');
164
111
  check(/^#[0-9a-f]{6}$/i.test(user?.colorStrategy?.primaryColor || ''), 'visualStyle.forUser.colorStrategy.primaryColor', '填写 6 位 HEX 色值');
112
+ if (user?.colorStrategy?.surfaceTone !== undefined) {
113
+ check(['theme', 'brand-tinted'].includes(user.colorStrategy.surfaceTone), 'visualStyle.forUser.colorStrategy.surfaceTone', '选择 theme 或 brand-tinted');
114
+ }
165
115
  const selected = plan.visualStyle?.internal?.selectedTheme || user?.selectedTheme;
166
- const themes = loadThemeIndex().themes;
116
+ const themes = readJson(path.join(ROOT, 'templates/design-themes/index.json')).themes;
167
117
  check(themes.some(theme => theme.themeId === selected?.themeId), 'visualStyle.internal.selectedTheme.themeId', '使用主题索引中的 themeId');
168
- if (themes.find(theme => theme.themeId === selected?.themeId)?.mode === 'creative') {
169
- try {
170
- require('../app/application-style').validateCreativeDirection(plan.visualStyle.creativeDirection, plan.visualStyle.tokens);
171
- } catch (error) {
172
- if (error.code !== 'APPLICATION_STYLE_CREATIVE_INCOMPLETE') {throw error;}
173
- for (const field of error.details.missing) {
174
- check(false, `visualStyle.${field.startsWith('--') ? 'tokens' : 'creativeDirection'}.${field}`, '填写独立设计决策');
175
- }
176
- }
177
- }
178
118
  }
179
119
  return issues;
180
120
  }
@@ -182,7 +122,7 @@ function collectIssues(plan) {
182
122
  function validateAuthoring(plan) {
183
123
  const issues = collectIssues(plan);
184
124
  // A single issue keeps the existing precise error code from the full validator.
185
- if (issues.length > 1 || issues.some(issue => issue.path.startsWith('visualStyle.forUser.pageApplications['))) {
125
+ if (issues.length > 1) {
186
126
  throw new CliError(`计划有 ${issues.length} 项待补充:\n${issues.map(issue => `${issue.path}: ${issue.message}`).join('\n')}`, {
187
127
  code: 'DESIGN_PLAN_VALIDATION_FAILED', details: { issues },
188
128
  });
@@ -26,70 +26,56 @@ const { buildProcessAndViewJson } = require('./services/process-compiler');
26
26
  // ── 参数解析 ─────────────────────────────────────────
27
27
 
28
28
  function parseArgs(args) {
29
- const positional = [];
30
- let existingFormUuid = null;
31
- let replace = false;
32
- const invalid = (argument, reason, extra = {}) => {
33
- throw new CliError([t('create_process.invalid_argument', argument), t('create_process.usage'), t('create_process.usage2')].join('\n'), {
34
- code: 'CREATE_PROCESS_INVALID_ARGUMENTS', details: { argument, reason, ...extra },
35
- });
36
- };
37
29
  const directArgs = args || [];
38
- for (let index = 0; index < directArgs.length; index++) {
39
- const value = directArgs[index];
40
- if (value === '--replace') {
41
- if (replace) {invalid(value, 'duplicate_option');}
42
- replace = true;
43
- } else if (value === '--formUuid') {
44
- if (existingFormUuid !== null) {invalid(value, 'duplicate_option');}
45
- const next = directArgs[++index];
46
- if (!next?.trim() || next.startsWith('-')) {invalid(value, 'missing_value');}
47
- existingFormUuid = next;
48
- } else if (value.startsWith('-')) {
49
- invalid(value, 'unknown_option', value === '--form-uuid' ? { suggestion: '--formUuid' } : {});
50
- } else {
51
- positional.push(value);
30
+ const formUuidIndex = directArgs.indexOf('--formUuid');
31
+ const replace = directArgs.includes('--replace');
32
+
33
+ // 用法 2: <appType> --formUuid <formUuid> <processDefinitionFile>
34
+ if (formUuidIndex !== -1) {
35
+ if (formUuidIndex + 2 >= directArgs.length) {
36
+ warn(t('create_process.usage2'));
37
+ throw new CliError(t('create_process.usage2'), {
38
+ code: 'CREATE_PROCESS_INVALID_ARGUMENTS',
39
+ });
40
+ }
41
+ let appType = null;
42
+ const existingFormUuid = directArgs[formUuidIndex + 1];
43
+ const processDefFile = directArgs[formUuidIndex + 2];
44
+
45
+ for (let i = 0; i < directArgs.length; i++) {
46
+ if (directArgs[i] !== '--formUuid' && directArgs[i] !== existingFormUuid && directArgs[i] !== processDefFile) {
47
+ appType = directArgs[i];
48
+ break;
49
+ }
52
50
  }
51
+
52
+ return {
53
+ appType,
54
+ formTitle: null,
55
+ fieldsJsonFile: null,
56
+ processDefinitionFile: processDefFile,
57
+ existingFormUuid,
58
+ replace,
59
+ };
53
60
  }
54
- const fields = existingFormUuid === null
55
- ? ['appType', 'formTitle', 'fieldsJsonFile', 'processDefinitionFile']
56
- : ['appType', 'processDefinitionFile'];
57
- if (positional.length > fields.length) {invalid(positional[fields.length], 'unexpected_argument');}
58
- for (let index = 0; index < fields.length; index++) {
59
- if (!positional[index]?.trim()) {invalid(fields[index], 'missing_value');}
61
+
62
+ // 用法 1: <appType> <formTitle> <fieldsJsonFile> <processDefinitionFile>
63
+ if (directArgs.length < 4) {
64
+ warn(t('create_process.usage'));
65
+ throw new CliError(t('create_process.usage'), {
66
+ code: 'CREATE_PROCESS_INVALID_ARGUMENTS',
67
+ });
60
68
  }
61
69
  return {
62
- appType: positional[0],
63
- formTitle: existingFormUuid === null ? positional[1] : null,
64
- fieldsJsonFile: existingFormUuid === null ? positional[2] : null,
65
- processDefinitionFile: positional[fields.length - 1],
66
- existingFormUuid,
70
+ appType: directArgs[0],
71
+ formTitle: directArgs[1],
72
+ fieldsJsonFile: directArgs[2],
73
+ processDefinitionFile: directArgs[3],
74
+ existingFormUuid: null,
67
75
  replace,
68
76
  };
69
77
  }
70
78
 
71
- function quoteCommandArgument(value, shell) {
72
- const text = String(value);
73
- const safePattern = shell === 'powershell'
74
- ? /^[a-zA-Z0-9_./:\\-]+$/
75
- : /^[a-zA-Z0-9_./:-]+$/;
76
- if (safePattern.test(text)) {
77
- return text;
78
- }
79
- if (shell === 'powershell') {
80
- return "'" + text.replace(/'/g, "''") + "'";
81
- }
82
- return "'" + text.replace(/'/g, "'\"'\"'") + "'";
83
- }
84
-
85
- function buildRetryCommand({ appType, formUuid, processDefinitionFile, replace, platform = process.platform }) {
86
- const shell = platform === 'win32' ? 'powershell' : 'posix';
87
- return ['openyida', 'create-process', appType, '--formUuid', formUuid,
88
- processDefinitionFile, ...(replace ? ['--replace'] : [])]
89
- .map(value => quoteCommandArgument(value, shell))
90
- .join(' ');
91
- }
92
-
93
79
  // ── 主流程 ───────────────────────────────────────────
94
80
 
95
81
  async function run(args) {
@@ -103,8 +89,7 @@ async function run(args) {
103
89
  const replace = parsed.replace;
104
90
  const stageTracker = createStageTracker();
105
91
  let formUuid;
106
- // Reuse does not read form metadata; unknown is not an empty form.
107
- let fieldCount = null;
92
+ let fieldCount = 0;
108
93
  let processCode = null;
109
94
 
110
95
  function context(extra) {
@@ -115,13 +100,9 @@ async function run(args) {
115
100
  }, extra || {});
116
101
  }
117
102
 
118
- function recoveryRetryCommand() {
119
- return buildRetryCommand({
120
- appType,
121
- formUuid,
122
- processDefinitionFile,
123
- replace,
124
- });
103
+ function buildRetryCommand() {
104
+ return 'openyida create-process ' + appType + ' --formUuid ' + formUuid + ' '
105
+ + path.basename(processDefinitionFile) + (replace ? ' --replace' : '');
125
106
  }
126
107
 
127
108
  function isTerminalSafetyError(error) {
@@ -137,16 +118,7 @@ async function run(args) {
137
118
 
138
119
  function buildConfigureFailureDetails(configError) {
139
120
  const terminalSafetyError = isTerminalSafetyError(configError);
140
- const retryCommand = terminalSafetyError ? null : recoveryRetryCommand();
141
- const recovery = {
142
- action: 'inspect_existing_form',
143
- appType,
144
- formUuid,
145
- processDefinitionFile,
146
- doNotCreateNewForm: true,
147
- noWriteRetry: terminalSafetyError,
148
- instruction: t('create_process.preserve_existing_form'),
149
- };
121
+ const retryCommand = terminalSafetyError ? null : buildRetryCommand();
150
122
  const failureContext = { processCode };
151
123
  if (retryCommand) {
152
124
  failureContext.retryCommand = retryCommand;
@@ -156,7 +128,6 @@ async function run(args) {
156
128
  cause: configError,
157
129
  nextStep: terminalSafetyError ? terminalSafetyNextStep() : undefined,
158
130
  });
159
- outerDetails.recovery = recovery;
160
131
  const innerDetails = configError && configError.isCliError && configError.details && configError.details.stage
161
132
  ? configError.details
162
133
  : null;
@@ -289,7 +260,7 @@ async function run(args) {
289
260
  }
290
261
 
291
262
  formUuid = createFormResult.formUuid;
292
- fieldCount = createFormResult.fieldCount ?? null;
263
+ fieldCount = createFormResult.fieldCount || 0;
293
264
  warn(' ✅ ' + t('create_process.form_created') + ': ' + formUuid);
294
265
  stageTracker.complete('create_form');
295
266
  } catch (createError) {
@@ -332,15 +303,14 @@ async function run(args) {
332
303
  // 仅对已知、可安全重试的配置失败提供复用表单命令。
333
304
  warn('');
334
305
  warn(' 💡 ' + t('create_process.retry_hint'));
335
- warn(' ' + recoveryRetryCommand());
306
+ warn(' ' + buildRetryCommand());
336
307
  warn('');
337
308
  }
338
309
  const failureOutput = {
339
310
  success: false,
340
311
  errorCode: configError.code || 'CREATE_PROCESS_CONFIGURE_FAILED',
341
312
  formUuid: formUuid,
342
- formMode: useExistingForm ? 'reuse' : 'create',
343
- formTitle: formTitle,
313
+ formTitle: formTitle || '(existing form)',
344
314
  appType: appType,
345
315
  fieldCount: fieldCount,
346
316
  error: t('create_process.configure_failed') + ': ' + configError.message,
@@ -348,8 +318,6 @@ async function run(args) {
348
318
  completedStages: failureDetails.completedStages,
349
319
  nextStep: failureDetails.nextStep,
350
320
  configureProcess: failureDetails.configureProcess,
351
- recovery: failureDetails.recovery,
352
- noWriteRetry: terminalSafetyError,
353
321
  };
354
322
  if (!terminalSafetyError && failureDetails.context && failureDetails.context.retryCommand) {
355
323
  failureOutput.retryCommand = failureDetails.context.retryCommand;
@@ -368,8 +336,7 @@ async function run(args) {
368
336
  const finalResult = {
369
337
  success: true,
370
338
  formUuid: formUuid,
371
- formMode: useExistingForm ? 'reuse' : 'create',
372
- formTitle: formTitle,
339
+ formTitle: formTitle || '(existing form)',
373
340
  appType: appType,
374
341
  fieldCount: fieldCount,
375
342
  processCode: processCode,
@@ -394,5 +361,4 @@ async function run(args) {
394
361
  module.exports = {
395
362
  run,
396
363
  parseArgs,
397
- buildRetryCommand,
398
364
  };
@@ -61,11 +61,11 @@ function buildYidaFormUrl(request, currentAppType) {
61
61
  return '';
62
62
  }
63
63
 
64
- /** 抽屉默认使用内容画布与正文文字,background 可为当前抽屉指定颜色、渐变或 CSS token。 */
64
+ /** 抽屉外壳默认跟随应用主题,background 可为当前抽屉指定颜色、渐变或 CSS token。 */
65
65
  function CanvasDrawer({
66
66
  open, title, onClose, onOpenInNewWindow, extra, children,
67
67
  contentMode = 'content',
68
- background = 'var(--pod-shell-theme-bg-color, var(--color-white, #fff))',
68
+ background = 'var(--pod-shell-theme-bg-color, var(--drawer-bg, var(--color-brand1-1, #f4f6ff)))',
69
69
  }) {
70
70
  const [fullScreen, setFullScreen] = useState(false);
71
71
  const [drawerWidth, setDrawerWidth] = useState(null);
@@ -138,7 +138,7 @@ function CanvasDrawer({
138
138
  border: 0;
139
139
  border-radius: 8px;
140
140
  background: transparent;
141
- color: var(--drawer-close-color, var(--pod-page-header-text-color, var(--color-text1-4, #1f2329)));
141
+ color: var(--drawer-close-color, var(--pod-page-header-text-color, var(--color-text1-3, #666)));
142
142
  cursor: pointer;
143
143
  }
144
144
  .openyida-form-drawer .oy-drawer-action:hover {
@@ -146,7 +146,7 @@ function CanvasDrawer({
146
146
  background: var(--drawer-close-bg-hovered, var(--pod-overlay-color-hover, rgba(83, 88, 97, 0.16)));
147
147
  }
148
148
  .openyida-form-drawer .oy-drawer-action:focus-visible {
149
- outline: 2px solid var(--color-brand1-6);
149
+ outline: 2px solid var(--color-brand1-6, #1677ff);
150
150
  outline-offset: 2px;
151
151
  }
152
152
  .openyida-form-drawer .oy-drawer-frame {
@@ -159,7 +159,7 @@ function CanvasDrawer({
159
159
  height: 100%;
160
160
  min-height: 0;
161
161
  overflow: auto;
162
- background: transparent;
162
+ background: var(--pod-card-bg-color, var(--drawer-bg, var(--color-white, #fff)));
163
163
  border-radius: var(--pod-card-border-radius, 20px);
164
164
  }
165
165
  .openyida-form-drawer .oy-drawer-resize {
@@ -215,7 +215,7 @@ function CanvasDrawer({
215
215
  },
216
216
  content: {
217
217
  background,
218
- color: 'var(--drawer-content-color, var(--pod-page-header-text-color, var(--color-text1-4, #1f2329)))',
218
+ color: 'var(--drawer-content-color, var(--color-text1-4, #1f2329))',
219
219
  borderLeft: 'var(--drawer-border-width, 0px) var(--drawer-border-style, solid) var(--drawer-border-color, transparent)',
220
220
  borderRadius: fullScreen ? 0 : 'var(--pod-drawer-border-radius, var(--pod-drawer-radius, var(--drawer-corner, 20px))) 0 0 var(--pod-drawer-border-radius, var(--pod-drawer-radius, var(--drawer-corner, 20px)))',
221
221
  overflow: 'hidden',
@@ -233,7 +233,6 @@ function CanvasDrawer({
233
233
  borderBottom: 'var(--drawer-title-border-width, 0px) solid var(--drawer-title-border-color, var(--drawer-border-color, transparent))',
234
234
  },
235
235
  body: {
236
- background: 'transparent',
237
236
  display: 'flex', flexDirection: 'column', flex: '1 1 0',
238
237
  padding: contentMode === 'iframe' ? 0 : '0 8px 8px',
239
238
  minHeight: 0, overflow: 'hidden',
@@ -382,9 +381,85 @@ function normalizeRows(rows) {
382
381
  }));
383
382
  }
384
383
 
385
- /* @canvas-application-theme */
384
+ // @openyida-canvas-theme:start
385
+ // Standalone samples keep this fragment identical; see canvas-theme.test.js.
386
+ function readCanvasTheme(root, fallback) {
387
+ const roles = {
388
+ colorPrimary: '--color-brand1-6', colorLink: '--color-brand1-6',
389
+ colorPrimaryHover: '--color-brand1-5', colorPrimaryActive: '--color-brand1-9',
390
+ colorBgLayout: ['--pod-page-bg-color', '--color-white'],
391
+ colorBgContainer: ['--pod-card-bg-color', '--color-white'],
392
+ colorBgElevated: ['--pod-card-bg-color', '--color-white'], colorText: '--color-text1-4',
393
+ colorTextHeading: '--color-text1-4', colorTextSecondary: '--color-text1-3',
394
+ colorTextDescription: '--color-text1-3', colorTextPlaceholder: '--color-text1-10',
395
+ colorBorder: '--color-line1-2', colorBorderSecondary: '--color-line1-1',
396
+ colorFillAlter: '--color-fill1-1', colorFillSecondary: '--color-fill1-2',
397
+ };
398
+ const token = { ...fallback };
399
+ if (!root) return token;
400
+ const doc = root.ownerDocument;
401
+ const view = doc.defaultView;
402
+ const scope = view.getComputedStyle(root);
403
+ const probe = doc.createElement('span');
404
+ probe.style.cssText = 'position:absolute;visibility:hidden;pointer-events:none;';
405
+ root.appendChild(probe);
406
+ try {
407
+ Object.keys(roles).forEach((role) => {
408
+ const names = Array.isArray(roles[role]) ? roles[role] : [roles[role]];
409
+ const value = names.map((name) => scope.getPropertyValue(name).trim()).find(Boolean) || '';
410
+ if (!value || !view.CSS.supports('color', value)) return;
411
+ probe.style.color = value;
412
+ const color = view.getComputedStyle(probe).color;
413
+ if (color) token[role] = color;
414
+ });
415
+ } finally {
416
+ probe.remove();
417
+ }
418
+ return token;
419
+ }
386
420
 
387
- function PageContent(props) {
421
+ function useCanvasTheme(fallback) {
422
+ const rootRef = React.useRef(null);
423
+ const fallbackRef = React.useRef(fallback);
424
+ const [token, setToken] = React.useState(fallback);
425
+ React.useLayoutEffect(() => {
426
+ const root = rootRef.current;
427
+ if (!root) return undefined;
428
+ const doc = root.ownerDocument;
429
+ const view = doc.defaultView;
430
+ let frame;
431
+ const refresh = () => {
432
+ const next = readCanvasTheme(root, fallbackRef.current);
433
+ setToken((previous) => JSON.stringify(previous) === JSON.stringify(next) ? previous : next);
434
+ };
435
+ const schedule = () => {
436
+ view.cancelAnimationFrame(frame);
437
+ frame = view.requestAnimationFrame(refresh);
438
+ };
439
+ refresh();
440
+ // Observe only theme-bearing ancestors and stylesheet changes, not business DOM.
441
+ const observer = new view.MutationObserver(schedule);
442
+ for (let node = root; node; node = node.parentElement) {
443
+ observer.observe(node, { attributes: true });
444
+ }
445
+ if (doc.head) observer.observe(doc.head, { subtree: true, childList: true, characterData: true, attributes: true });
446
+ doc.addEventListener('load', schedule, true);
447
+ view.addEventListener('resize', schedule);
448
+ view.addEventListener('openyida:theme-change', schedule);
449
+ return () => {
450
+ observer.disconnect();
451
+ view.cancelAnimationFrame(frame);
452
+ doc.removeEventListener('load', schedule, true);
453
+ view.removeEventListener('resize', schedule);
454
+ view.removeEventListener('openyida:theme-change', schedule);
455
+ };
456
+ }, []);
457
+ return { rootRef, token };
458
+ }
459
+ // @openyida-canvas-theme:end
460
+
461
+ function YidaComp(props) {
462
+ const { rootRef, token } = useCanvasTheme({ colorPrimary: "#1677ff", borderRadius: 9 });
388
463
  const rawAppType = props && props.appType ? props.appType : RAW_APP_TYPE;
389
464
  const rawFormUuid = props && props.formUuid ? props.formUuid : RAW_FORM_UUID;
390
465
  const appType = resolveConfigValue(rawAppType, 'APP_XXX');
@@ -477,7 +552,10 @@ function PageContent(props) {
477
552
  ];
478
553
 
479
554
  return (
480
- <>
555
+ <ConfigProvider
556
+ theme={{ token }}
557
+ getPopupContainer={(triggerNode) => (triggerNode && triggerNode.parentElement) || document.body}
558
+ >
481
559
  <style>{`
482
560
  .oys-page {
483
561
  display: flow-root;
@@ -542,7 +620,7 @@ function PageContent(props) {
542
620
  }
543
621
  `}</style>
544
622
 
545
- <div className="oys-page">
623
+ <div ref={rootRef} className="oys-page">
546
624
  <div className="oys-shell">
547
625
  <div className="oys-header">
548
626
  <div>
@@ -607,15 +685,7 @@ function PageContent(props) {
607
685
  {formOpenContainer}
608
686
  </div>
609
687
  </div>
610
- </>
611
- );
612
- }
613
-
614
- function YidaComp(props) {
615
- return (
616
- <CanvasThemeProvider getPopupContainer={(triggerNode) => (triggerNode && triggerNode.parentElement) || document.body}>
617
- <PageContent {...props} />
618
- </CanvasThemeProvider>
688
+ </ConfigProvider>
619
689
  );
620
690
  }
621
691