openyida 2026.9.18 → 2026.9.20

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 (235) hide show
  1. package/README.md +10 -9
  2. package/bin/yida.js +7 -3
  3. package/lib/app/application-style.js +67 -0
  4. package/lib/app/canvas-compile.js +14 -12
  5. package/lib/app/create-form/args.js +37 -12
  6. package/lib/app/create-form/batch.js +32 -5
  7. package/lib/app/create-form.js +102 -73
  8. package/lib/app/create-page.js +84 -17
  9. package/lib/app/custom-theme.js +11 -0
  10. package/lib/app/form-data-response-guard.js +57 -0
  11. package/lib/app/form-field-validator.js +26 -41
  12. package/lib/app/form-open-guard.js +97 -10
  13. package/lib/app/get-form-config.js +1 -0
  14. package/lib/app/inline-css-guard.js +1 -31
  15. package/lib/app/services/form-compiler.js +0 -2
  16. package/lib/app/theme-from-design.js +112 -40
  17. package/lib/asset/ai-image.js +2 -0
  18. package/lib/asset/asset-cmd.js +4 -1
  19. package/lib/asset/asset-plan.js +36 -5
  20. package/lib/asset/asset-resolve.js +4 -0
  21. package/lib/core/agent-capabilities.js +2 -0
  22. package/lib/core/command-manifest.js +172 -22
  23. package/lib/core/css-structure.js +37 -0
  24. package/lib/core/locales/en.js +34 -13
  25. package/lib/core/locales/zh.js +34 -13
  26. package/lib/core/sample.js +30 -3
  27. package/lib/design/check-design.js +51 -0
  28. package/lib/design/document.js +458 -0
  29. package/lib/design/icon-contrast.js +85 -0
  30. package/lib/design/page-content.js +11 -0
  31. package/lib/design-plan/artifact-updates.js +117 -0
  32. package/lib/design-plan/entry-navigation.js +2 -2
  33. package/lib/design-plan/init.js +41 -20
  34. package/lib/design-plan/materialize.js +312 -274
  35. package/lib/design-plan/normalize.js +22 -22
  36. package/lib/design-plan/patch.js +8 -3
  37. package/lib/design-plan/preview.js +3 -6
  38. package/lib/design-plan/themes.js +86 -0
  39. package/lib/design-plan/validate.js +36 -6
  40. package/lib/design-plan/visual-policy.js +12 -1
  41. package/lib/process/create-process.js +40 -45
  42. package/package.json +2 -1
  43. package/yida-skills/SKILL.md +4 -3
  44. package/yida-skills/references/official-example-schema-patterns.md +1 -1
  45. package/yida-skills/skills/yida-app/SKILL.md +7 -4
  46. package/yida-skills/skills/yida-app/references/entry-navigation.md +25 -5
  47. package/yida-skills/skills/yida-app/workflow/parallel-work.md +4 -4
  48. package/yida-skills/skills/yida-app/workflow/plan/step-4-deliver.md +16 -2
  49. package/yida-skills/skills/yida-app/workflow/plan/workflow.md +13 -3
  50. package/yida-skills/skills/yida-app/workflow/step-2-design.md +6 -4
  51. package/yida-skills/skills/yida-app/workflow/step-4-forms-processes.md +2 -2
  52. package/yida-skills/skills/yida-app/workflow/step-6-main-page.md +1 -1
  53. package/yida-skills/skills/yida-app/workflow/step-7-page-code.md +5 -5
  54. package/yida-skills/skills/yida-app/workflow/step-8-publish-navigation.md +12 -9
  55. package/yida-skills/skills/yida-app/workflow/step-9-output-finish.md +6 -4
  56. package/yida-skills/skills/yida-canvas-custom-page/SKILL.md +5 -5
  57. package/yida-skills/skills/yida-canvas-custom-page/references/canvas-style-implementation-guide.md +43 -35
  58. package/yida-skills/skills/yida-canvas-custom-page/references/canvas-theme-provider.md +1 -0
  59. package/yida-skills/skills/yida-canvas-custom-page/references/component-library-guide.md +2 -0
  60. package/yida-skills/skills/yida-canvas-custom-page/references/navigation-and-entry-guide.md +2 -2
  61. package/yida-skills/skills/yida-canvas-custom-page/references/page-generation-guide.md +21 -21
  62. package/yida-skills/skills/yida-canvas-custom-page/scripts/canvas-theme-provider.template.jsx +7 -0
  63. package/yida-skills/skills/yida-canvas-data-binding/SKILL.md +17 -0
  64. package/yida-skills/skills/yida-create-form-page/SKILL.md +36 -45
  65. package/yida-skills/skills/yida-create-form-page/references/advanced-form-modes.md +5 -5
  66. package/yida-skills/skills/yida-create-form-page/references/association-form-field.md +4 -4
  67. package/yida-skills/skills/yida-create-form-page/references/batch-forms.md +2 -2
  68. package/yida-skills/skills/yida-create-form-page/references/field-definition-guide.md +7 -19
  69. package/yida-skills/skills/yida-create-form-page/references/form-field-properties.md +62 -44
  70. package/yida-skills/skills/yida-create-page/SKILL.md +14 -6
  71. package/yida-skills/skills/yida-create-process/SKILL.md +6 -2
  72. package/yida-skills/skills/yida-dashboard/SKILL.md +5 -4
  73. package/yida-skills/skills/yida-data-management/SKILL.md +4 -2
  74. package/yida-skills/skills/yida-data-management/references/data-format-guide.md +4 -4
  75. package/yida-skills/skills/yida-design/SKILL.md +19 -12
  76. package/yida-skills/skills/yida-design/references/application-style-library.md +78 -0
  77. package/yida-skills/skills/yida-design/references/application-theme-consistency.md +110 -0
  78. package/yida-skills/skills/yida-design/references/design-mode.md +1 -1
  79. package/yida-skills/skills/yida-design/references/native-form-styles.md +208 -0
  80. package/yida-skills/skills/yida-design/references/navigation-decision.md +2 -1
  81. package/yida-skills/skills/yida-design/references/page-continuity.md +1 -3
  82. package/yida-skills/skills/yida-design/references/page-quality-gates.md +26 -38
  83. package/yida-skills/skills/yida-design/references/theme/app-custom-theme-template.css +288 -432
  84. package/yida-skills/skills/yida-design/references/theme/application-style-recipes.css +58 -0
  85. package/yida-skills/skills/yida-design/references/theme-selection.md +66 -0
  86. package/yida-skills/skills/yida-design/references/visual-decision-engine.md +19 -120
  87. package/yida-skills/skills/yida-design/references/visual-scaffold-recipes.md +15 -27
  88. package/yida-skills/skills/yida-design/scripts/validate_design_themes.py +276 -0
  89. package/yida-skills/skills/yida-design/sub_skill/page-design/SKILL.md +4 -0
  90. package/yida-skills/skills/yida-design/sub_skill/yida-design-plan/SKILL.md +11 -7
  91. package/yida-skills/skills/yida-design/sub_skill/yida-design-plan/assets/README.md +14 -10
  92. package/yida-skills/skills/yida-design/sub_skill/yida-design-plan/assets/build-plan-template.html +9 -4
  93. package/yida-skills/skills/yida-design/sub_skill/yida-design-plan/references/build-plan-compact-schema.md +15 -14
  94. package/yida-skills/skills/yida-design/sub_skill/yida-design-plan/references/build-plan-schema.md +7 -6
  95. package/yida-skills/skills/yida-design/sub_skill/yida-design-plan/references/visual-design.md +32 -119
  96. package/yida-skills/skills/yida-design/sub_skill/yida-design-plan/references/visual-theme-selection.md +22 -38
  97. package/yida-skills/skills/yida-design/sub_skill/yida-design-plan/scripts/render_build_plan.py +15 -48
  98. package/yida-skills/skills/yida-design/templates/application-styles.json +398 -0
  99. package/yida-skills/skills/yida-design/templates/design-themes/README.md +68 -0
  100. package/yida-skills/skills/yida-design/templates/design-themes/app-amber/app_theme.css +607 -0
  101. package/yida-skills/skills/yida-design/templates/design-themes/app-amber/design.md +219 -0
  102. package/yida-skills/skills/yida-design/templates/design-themes/app-amber/form-layout.json +15 -0
  103. package/yida-skills/skills/yida-design/templates/design-themes/app-editorial/app_theme.css +607 -0
  104. package/yida-skills/skills/yida-design/templates/design-themes/app-editorial/design.md +219 -0
  105. package/yida-skills/skills/yida-design/templates/design-themes/app-editorial/form-layout.json +14 -0
  106. package/yida-skills/skills/yida-design/templates/design-themes/app-executive/app_theme.css +607 -0
  107. package/yida-skills/skills/yida-design/templates/design-themes/app-executive/design.md +219 -0
  108. package/yida-skills/skills/yida-design/templates/design-themes/app-executive/form-layout.json +13 -0
  109. package/yida-skills/skills/yida-design/templates/design-themes/app-finance/app_theme.css +607 -0
  110. package/yida-skills/skills/yida-design/templates/design-themes/app-finance/design.md +219 -0
  111. package/yida-skills/skills/yida-design/templates/design-themes/app-finance/form-layout.json +14 -0
  112. package/yida-skills/skills/yida-design/templates/design-themes/app-glass/app_theme.css +607 -0
  113. package/yida-skills/skills/yida-design/templates/design-themes/app-glass/design.md +219 -0
  114. package/yida-skills/skills/yida-design/templates/design-themes/app-glass/form-layout.json +14 -0
  115. package/yida-skills/skills/yida-design/templates/design-themes/app-graphite/app_theme.css +607 -0
  116. package/yida-skills/skills/yida-design/templates/design-themes/app-graphite/design.md +219 -0
  117. package/yida-skills/skills/yida-design/templates/design-themes/app-graphite/form-layout.json +14 -0
  118. package/yida-skills/skills/yida-design/templates/design-themes/app-line/app_theme.css +607 -0
  119. package/yida-skills/skills/yida-design/templates/design-themes/app-line/design.md +219 -0
  120. package/yida-skills/skills/yida-design/templates/design-themes/app-line/form-layout.json +13 -0
  121. package/yida-skills/skills/yida-design/templates/design-themes/app-neon/app_theme.css +607 -0
  122. package/yida-skills/skills/yida-design/templates/design-themes/app-neon/design.md +219 -0
  123. package/yida-skills/skills/yida-design/templates/design-themes/app-neon/form-layout.json +14 -0
  124. package/yida-skills/skills/yida-design/templates/design-themes/app-nordic/app_theme.css +607 -0
  125. package/yida-skills/skills/yida-design/templates/design-themes/app-nordic/design.md +219 -0
  126. package/yida-skills/skills/yida-design/templates/design-themes/app-nordic/form-layout.json +13 -0
  127. package/yida-skills/skills/yida-design/templates/design-themes/app-paper/app_theme.css +607 -0
  128. package/yida-skills/skills/yida-design/templates/design-themes/app-paper/design.md +219 -0
  129. package/yida-skills/skills/yida-design/templates/design-themes/app-paper/form-layout.json +13 -0
  130. package/yida-skills/skills/yida-design/templates/design-themes/app-platinum/app_theme.css +607 -0
  131. package/yida-skills/skills/yida-design/templates/design-themes/app-platinum/design.md +219 -0
  132. package/yida-skills/skills/yida-design/templates/design-themes/app-platinum/form-layout.json +14 -0
  133. package/yida-skills/skills/yida-design/templates/design-themes/app-plum/app_theme.css +607 -0
  134. package/yida-skills/skills/yida-design/templates/design-themes/app-plum/design.md +219 -0
  135. package/yida-skills/skills/yida-design/templates/design-themes/app-plum/form-layout.json +14 -0
  136. package/yida-skills/skills/yida-design/templates/design-themes/app-pop/app_theme.css +607 -0
  137. package/yida-skills/skills/yida-design/templates/design-themes/app-pop/design.md +219 -0
  138. package/yida-skills/skills/yida-design/templates/design-themes/app-pop/form-layout.json +14 -0
  139. package/yida-skills/skills/yida-design/templates/design-themes/app-sage/app_theme.css +607 -0
  140. package/yida-skills/skills/yida-design/templates/design-themes/app-sage/design.md +219 -0
  141. package/yida-skills/skills/yida-design/templates/design-themes/app-sage/form-layout.json +14 -0
  142. package/yida-skills/skills/yida-design/templates/design-themes/app-teal/app_theme.css +607 -0
  143. package/yida-skills/skills/yida-design/templates/design-themes/app-teal/design.md +219 -0
  144. package/yida-skills/skills/yida-design/templates/design-themes/app-teal/form-layout.json +14 -0
  145. package/yida-skills/skills/yida-design/templates/design-themes/app-terminal/app_theme.css +607 -0
  146. package/yida-skills/skills/yida-design/templates/design-themes/app-terminal/design.md +219 -0
  147. package/yida-skills/skills/yida-design/templates/design-themes/app-terminal/form-layout.json +14 -0
  148. package/yida-skills/skills/yida-design/templates/design-themes/app-ticket/app_theme.css +607 -0
  149. package/yida-skills/skills/yida-design/templates/design-themes/app-ticket/design.md +219 -0
  150. package/yida-skills/skills/yida-design/templates/design-themes/app-ticket/form-layout.json +13 -0
  151. package/yida-skills/skills/yida-design/templates/design-themes/app-wire/app_theme.css +607 -0
  152. package/yida-skills/skills/yida-design/templates/design-themes/app-wire/design.md +219 -0
  153. package/yida-skills/skills/yida-design/templates/design-themes/app-wire/form-layout.json +14 -0
  154. package/yida-skills/skills/yida-design/{sub_skill/yida-design-plan/templates → templates}/design-themes/basic-tokens.json +21 -5
  155. package/yida-skills/skills/yida-design/templates/design-themes/dark-inset-hairline.md +337 -0
  156. package/yida-skills/skills/yida-design/templates/design-themes/dark-rail-fine-lines.md +328 -0
  157. package/yida-skills/skills/yida-design/templates/design-themes/dark-rail-signal-panels.md +328 -0
  158. package/yida-skills/skills/yida-design/templates/design-themes/free-creative/app_theme.css +526 -0
  159. package/yida-skills/skills/yida-design/templates/design-themes/free-creative/design.md +191 -0
  160. package/yida-skills/skills/yida-design/templates/design-themes/free-creative/form-layout.json +13 -0
  161. package/yida-skills/skills/yida-design/templates/design-themes/graphite-bevel-grid.md +325 -0
  162. package/yida-skills/skills/yida-design/templates/design-themes/hairline-shared-bands.md +312 -0
  163. package/yida-skills/skills/yida-design/templates/design-themes/hairline-soft-blocks.md +361 -0
  164. package/yida-skills/skills/yida-design/templates/design-themes/index.json +371 -0
  165. package/yida-skills/skills/yida-design/templates/design-themes/ink-glow-soft-panels.md +329 -0
  166. package/yida-skills/skills/yida-design/templates/design-themes/inset-frame-pixel-rhythm.md +354 -0
  167. package/yida-skills/skills/yida-design/templates/design-themes/outlined-texture-duotone.md +339 -0
  168. package/yida-skills/skills/yida-design/templates/design-themes/soft-inset-surfaces.md +324 -0
  169. package/yida-skills/skills/yida-design/templates/design-themes/soft-outline-rhythm.md +421 -0
  170. package/yida-skills/skills/yida-design/templates/design-themes/soft-rail-bold-band.md +344 -0
  171. package/yida-skills/skills/yida-design/templates/design-themes/soft-spectral-panels.md +341 -0
  172. package/yida-skills/skills/yida-design/templates/design-themes/warm-canvas-contrast-panels.md +358 -0
  173. package/yida-skills/skills/yida-design/templates/design-themes/warm-rail-muted-panels.md +335 -0
  174. package/yida-skills/skills/yida-design/workflow/output-design.md +117 -377
  175. package/yida-skills/skills/yida-design/workflow/step-2-theme-system.md +29 -28
  176. package/yida-skills/skills/yida-design/workflow/step-4-wireframe-interaction.md +2 -0
  177. package/yida-skills/skills/yida-design/workflow/step-5-visual-states.md +22 -106
  178. package/yida-skills/skills/yida-design/workflow/step-6-handoff.md +15 -22
  179. package/yida-skills/skills/yida-image-assets/SKILL.md +1 -1
  180. package/yida-skills/skills/yida-image-assets/references/manifest-contract.md +31 -0
  181. package/yida-skills/skills/yida-image-assets/references/source-policy.md +1 -1
  182. package/yida-skills/skills/yida-nav-shell/SKILL.md +2 -2
  183. package/yida-skills/skills/yida-page-config/SKILL.md +1 -1
  184. package/yida-skills/skills/yida-prd/SKILL.md +2 -2
  185. package/yida-skills/skills/yida-prd/references/app/blueprint.md +3 -3
  186. package/yida-skills/skills/yida-prd/references/app/role-journey.md +5 -3
  187. package/yida-skills/skills/yida-prd/workflow/output-prd.md +2 -1
  188. package/yida-skills/skills/yida-prd/workflow/plan-business.md +2 -2
  189. package/yida-skills/skills/yida-prd/workflow/step-2-information-architecture.md +3 -2
  190. package/yida-skills/skills/yida-publish-page/SKILL.md +5 -1
  191. package/yida-skills/skills/yida-requirement-analysis/references/experience-groups.md +20 -0
  192. package/yida-skills/skills/yida-requirement-analysis/references/handoff.md +1 -1
  193. package/yida-skills/skills/yida-requirement-analysis/workflow/prepare-brief.md +2 -2
  194. package/yida-skills/skills-index.json +30 -10
  195. package/yida-skills/skills/yida-design/references/style-design-selection.md +0 -149
  196. package/yida-skills/skills/yida-design/references/style-designs/_design-md-template.md +0 -185
  197. package/yida-skills/skills/yida-design/references/style-designs/aqua-service-progress-dashboard.md +0 -242
  198. package/yida-skills/skills/yida-design/references/style-designs/blue-insight-operations-dashboard.md +0 -243
  199. package/yida-skills/skills/yida-design/references/style-designs/blue-productivity-insight-workbench.md +0 -242
  200. package/yida-skills/skills/yida-design/references/style-designs/command-filter-card-console.md +0 -304
  201. package/yida-skills/skills/yida-design/references/style-designs/contrast-command-analytics-workbench.md +0 -261
  202. package/yida-skills/skills/yida-design/references/style-designs/dark-stage-analytic-dashboard.md +0 -369
  203. package/yida-skills/skills/yida-design/references/style-designs/filterable-card-catalog.md +0 -354
  204. package/yida-skills/skills/yida-design/references/style-designs/green-timeline-progress-workbench.md +0 -250
  205. package/yida-skills/skills/yida-design/references/style-designs/registry.md +0 -117
  206. package/yida-skills/skills/yida-design/references/style-designs/soft-analytic-workbench.md +0 -348
  207. package/yida-skills/skills/yida-design/references/style-designs/soft-blue-grid-analytic-dashboard.md +0 -658
  208. package/yida-skills/skills/yida-design/references/style-designs/soft-bordered-analytic-workbench.md +0 -385
  209. package/yida-skills/skills/yida-design/references/style-designs/soft-curated-filter-gallery.md +0 -300
  210. package/yida-skills/skills/yida-design/references/style-designs/soft-modular-analytic-workbench.md +0 -404
  211. package/yida-skills/skills/yida-design/references/style-designs/soft-progress-analytics-workbench.md +0 -382
  212. package/yida-skills/skills/yida-design/references/style-designs/soft-timeline-analytics-workbench.md +0 -367
  213. package/yida-skills/skills/yida-design/references/style-designs/teal-rail-analytics-workbench.md +0 -341
  214. package/yida-skills/skills/yida-design/sub_skill/yida-design-plan/scripts/validate_design_themes.py +0 -219
  215. package/yida-skills/skills/yida-design/sub_skill/yida-design-plan/templates/design-themes/README.md +0 -110
  216. package/yida-skills/skills/yida-design/sub_skill/yida-design-plan/templates/design-themes/airy-media-grid.md +0 -338
  217. package/yida-skills/skills/yida-design/sub_skill/yida-design-plan/templates/design-themes/airy-modular-clarity.md +0 -330
  218. package/yida-skills/skills/yida-design/sub_skill/yida-design-plan/templates/design-themes/airy-structured-clarity.md +0 -320
  219. package/yida-skills/skills/yida-design/sub_skill/yida-design-plan/templates/design-themes/ambient-halo-layered.md +0 -341
  220. package/yida-skills/skills/yida-design/sub_skill/yida-design-plan/templates/design-themes/dark-focus-layered.md +0 -327
  221. package/yida-skills/skills/yida-design/sub_skill/yida-design-plan/templates/design-themes/dark-luminous-modular.md +0 -369
  222. package/yida-skills/skills/yida-design/sub_skill/yida-design-plan/templates/design-themes/deep-stage-duotone.md +0 -345
  223. package/yida-skills/skills/yida-design/sub_skill/yida-design-plan/templates/design-themes/hairline-runway-clarity.md +0 -378
  224. package/yida-skills/skills/yida-design/sub_skill/yida-design-plan/templates/design-themes/high-contrast-modular.md +0 -339
  225. package/yida-skills/skills/yida-design/sub_skill/yida-design-plan/templates/design-themes/index.json +0 -329
  226. package/yida-skills/skills/yida-design/sub_skill/yida-design-plan/templates/design-themes/interlocked-vivid-modules.md +0 -343
  227. package/yida-skills/skills/yida-design/sub_skill/yida-design-plan/templates/design-themes/matrix-grid-focus.md +0 -337
  228. package/yida-skills/skills/yida-design/sub_skill/yida-design-plan/templates/design-themes/media-rail-inspector.md +0 -381
  229. package/yida-skills/skills/yida-design/sub_skill/yida-design-plan/templates/design-themes/mist-layered-signal.md +0 -340
  230. package/yida-skills/skills/yida-design/sub_skill/yida-design-plan/templates/design-themes/modular-rail-signal.md +0 -341
  231. package/yida-skills/skills/yida-design/sub_skill/yida-design-plan/templates/design-themes/mono-grid-signal.md +0 -374
  232. package/yida-skills/skills/yida-design/sub_skill/yida-design-plan/templates/design-themes/ribbon-ledger-lift.md +0 -378
  233. package/yida-skills/skills/yida-design/sub_skill/yida-design-plan/templates/design-themes/segmented-meter-clarity.md +0 -380
  234. package/yida-skills/skills/yida-design/sub_skill/yida-design-plan/templates/design-themes/split-rail-precision.md +0 -339
  235. package/yida-skills/skills/yida-design/sub_skill/yida-design-plan/templates/design-themes/status-framed-media-grid.md +0 -358
package/README.md CHANGED
@@ -183,7 +183,7 @@ openyida get-schema APP_XXX FORM_XXX --compact --resolve-fields "Customer Name,S
183
183
  openyida get-schema APP_XXX --all --output-dir .cache/schemas
184
184
  ```
185
185
 
186
- Form definitions support 19 business field types plus verified presentation/layout components. Prefer `Divider` for section titles and `ColumnContainer` (mapped to `ColumnsLayout` + `Column`) for multi-column layout; use `GroupContainer` / `PageSection` only when an actual grouping container is needed.
186
+ Native forms use a component tree: business fields capture data, tabs switch content, action groups trigger business actions, images establish visual focus, status areas provide feedback, and `Divider` plus `ColumnContainer` organize hierarchy and columns. `create-form` field definitions create 19 business field types plus `Divider` and `ColumnContainer` (mapped to `ColumnsLayout` + `Column`), while updates retain other existing components.
187
187
 
188
188
  ### Custom Page Development
189
189
 
@@ -399,8 +399,8 @@ Run `openyida --help` or `openyida <command> --help` for detailed usage.
399
399
  | `openyida design-plan catalog [--json]` | List available planning themes and page patterns |
400
400
  | `openyida design-plan init <requirement-brief.json> [--theme-id <id>] [--output-dir <dir>] [--json]` | Initialize a plan draft from confirmed requirements |
401
401
  | `openyida design-plan preview <build-plan.json> --part-file <module.json> [--json]` | Update plan drafts by module |
402
- | `openyida design-plan materialize <build-plan.json> [--from-preview \| --business-file <json> --visual-file <json>] [--output-dir <dir>] [--check] [--json]` | Generate and validate design-plan artifacts from build-plan.json |
403
- | `openyida design-plan patch <build-plan.json> --set <path=value> [--set <path=value> ...] [--materialize] [--output-dir <dir>] [--json]` | Patch a design plan; asset progress preserves existing approval |
402
+ | `openyida design-plan materialize <build-plan.json> [--from-preview \| --business-file <json> --visual-file <json>] [--output-dir <dir>] [--check] [--json]` | Generate or update plan documents and theme with consistency checks |
403
+ | `openyida design-plan patch <build-plan.json> --set <path=value> [--set <path=value> ...] [--materialize] [--output-dir <dir>] [--json]` | Patch plan fields and optionally sync documents and theme |
404
404
  | `openyida update-app <appType> [--name "..."] [--desc "..."] [--icon <name>] [--icon-color <color>] [--colour <key>] [--theme-color <color>] [--theme-file <css>] [--nav-theme light\|dark\|white\|gray] [--logo-source appIcon\|customImage] [--layout side\|top\|l_shape] [--hide-app-nav\|--show-app-nav]` | Update app info |
405
405
  | `openyida app-online <appType> [--to-ding-app-center] [--show-app-center]` | Enable a Yida app |
406
406
  | `openyida app-offline <appType> [--to-ding-app-center] [--show-app-center]` | Disable a Yida app |
@@ -415,7 +415,7 @@ Run `openyida --help` or `openyida <command> --help` for detailed usage.
415
415
  | Command | Description |
416
416
  |---------|-------------|
417
417
  | `openyida create-form batch <appType> <plan.json> [--concurrency 1..4] [--check] [--json]` | Create forms concurrently by dependency |
418
- | `openyida create-form create <appType> "<formTitle>" <fieldsJsonFile> [--icon auto\|<iconName>] [--locale zh_CN\|en_US\|ja_JP] [--open\|--no-open]` | Create a form page |
418
+ | `openyida create-form create <appType> "<formTitle>" <fieldsJsonFile> [--layout single\|double\|card\|section] [--theme default\|compact\|comfortable] [--label-align top\|left\|right] [--icon auto\|<iconName>] [--locale zh_CN\|en_US\|ja_JP] [--open\|--no-open]` | Create a form page |
419
419
  | `openyida create-form icons [--json]` | List available form navigation icons |
420
420
  | `openyida create-form validate-fields <fieldsJsonOrFile> [--json]` | Validate form field JSON locally |
421
421
  | `openyida create-form update <appType> <formUuid> (<changesJsonOrFile> \| --data-file <changesJsonOrFile>) [--locale zh_CN\|en_US\|ja_JP] [--open\|--no-open]` | Update a form page |
@@ -430,12 +430,13 @@ Run `openyida --help` or `openyida <command> --help` for detailed usage.
430
430
  | `openyida aggregate-table <list\|create-empty\|inspect\|preview\|save\|publish\|status> <appType> ...` | Manage aggregate tables (virtualView) |
431
431
  | `openyida get-schema <appType> <formUuid\|--all> [--summary-json\|--field-map-json\|--analysis-json]` | Get one form Schema or all form Schemas |
432
432
  | `openyida check-prd-completeness <prd.md> --app-type <appType> [--build-manifest <file>] [--json]` | Check PRD page/resource count risk |
433
+ | `openyida check-design <design.md> [--prd <prd.md>] [--base-dir <dir>] [--json]` | Validate design documents, theme tokens and PRD handoff |
433
434
  | `openyida er <appType> [--format mermaid\|json] [--output file] [--include-system] [--include-pages]` | Export app entity relationship diagram |
434
435
  | `openyida create-page <appType> "<name>" [--mode dashboard] [--hide-nav] [--locale zh_CN\|en_US\|ja_JP] [--open\|--no-open]` | Create a custom display page |
435
436
  | `openyida build-page <sourceFile> [--output file\|--write]` | Build Yida-compatible page source |
436
- | `openyida check-page <src> [--compat]` | Check custom page standards |
437
- | `openyida compile <src> [--canvas] [--json]` | Compile custom page locally |
438
- | `openyida publish <src> <appType> <formUuid> [--health-check] [--force] [--canvas] [--auto-nav-order] [--open\|--no-open]` | Compile and publish custom page |
437
+ | `openyida check-page <src> [--compat] [--json]` | Check custom page standards |
438
+ | `openyida compile <src> [--canvas] [--compat] [--skip-lint] [--json]` | Compile custom page locally |
439
+ | `openyida publish <src> <appType> <formUuid> [--health-check] [--force] [--canvas] [--compat] [--skip-lint] [--auto-nav-order] [--open\|--no-open] [--json]` | Compile and publish custom page |
439
440
  | `openyida update-form-config <appType> <formUuid> <true\|false\|keep> "<title>" [--locale zh_CN\|en_US\|ja_JP]` | Update form configuration |
440
441
  | `openyida get-form-config <appType> <formUuid> [--json]` | Query form configuration |
441
442
 
@@ -458,7 +459,7 @@ Run `openyida --help` or `openyida <command> --help` for detailed usage.
458
459
  | Command | Description |
459
460
  |---------|-------------|
460
461
  | `openyida configure-process <appType> <formUuid> <definition> [processCode] [--replace]` | Configure and publish process rules; Supports append/forward via JSON nodes[].actions.normalActions/appendActions |
461
- | `openyida create-process <appType> ... [--replace]` | Create process form (all-in-one); Supports append/forward via JSON nodes[].actions.normalActions/appendActions |
462
+ | `openyida create-process <appType> <formTitle> <fieldsJsonFile> <processDefinitionFile> [--replace] \| create-process <appType> --formUuid <formUuid> <processDefinitionFile> [--replace]` | Create process form (all-in-one); Supports append/forward via JSON nodes[].actions.normalActions/appendActions |
462
463
  | `openyida ai-form-setting <get\|fields\|models\|enable\|disable\|save> <appType> ...` | Manage process form AI approval prompts |
463
464
  | `openyida process preview <appType> ...` | Preview process instance (visual flowchart) |
464
465
 
@@ -522,7 +523,7 @@ Run `openyida --help` or `openyida <command> --help` for detailed usage.
522
523
  | `openyida a2a <serve\|agent-card> [options]` | Start local read-only A2A adapter or print Agent Card |
523
524
  | `openyida bridge start [--token <pair-token>] [--port 6736] [--origin https://demo.aliwork.com] [--open\|--no-open]` | Start OpenYida local web bridge service |
524
525
  | `openyida copy [--force]` | Copy project working directory |
525
- | `openyida sample [--list] [<skill> <name>] [--output <file>] [--var KEY=VALUE ...] [--design-file <design.md>]` | Output code samples/templates |
526
+ | `openyida sample [--list] [<skill> <name>] [--output <file-or-directory>] [--var KEY=VALUE ...] [--design-file <design.md>] [--style-id <themeId\|free-creative>]` | Output code samples/templates |
526
527
  | `openyida doctor [--fix]` | Environment diagnostics & auto-fix |
527
528
  | `openyida db-seq-fix [--fix]` | Detect and repair PostgreSQL sequence drift |
528
529
  | `openyida formula evaluate <formula\|file> [--schema file]` | Static-check Yida formula syntax and field refs |
package/bin/yida.js CHANGED
@@ -526,6 +526,7 @@ function printManifestCommandHelp(commandName) {
526
526
  printCommandUsage(...entries.flatMap((entry) => [
527
527
  entry.usage,
528
528
  entry.description,
529
+ ...(entry.notes || []),
529
530
  ...(entry.examples || []),
530
531
  ]));
531
532
  return true;
@@ -798,6 +799,12 @@ async function main() {
798
799
  break;
799
800
  }
800
801
 
802
+ case 'check-design': {
803
+ const { run } = require('../lib/design/check-design');
804
+ await run(args);
805
+ break;
806
+ }
807
+
801
808
  case 'er': {
802
809
  const { run } = require('../lib/app/er');
803
810
  await run(args);
@@ -1009,9 +1016,6 @@ async function main() {
1009
1016
  }
1010
1017
 
1011
1018
  case 'create-process': {
1012
- if (args.length < 2) {
1013
- throwCliUsage(t('cli.create_process_usage'), t('cli.create_process_example'));
1014
- }
1015
1019
  const { run: runCreateProcess } = require('../lib/process/create-process');
1016
1020
  await runCreateProcess(args);
1017
1021
  break;
@@ -0,0 +1,67 @@
1
+ 'use strict';
2
+
3
+ const fs = require('fs');
4
+ const path = require('path');
5
+ const { CliError } = require('../core/cli-error');
6
+ const { t } = require('../core/i18n');
7
+ const { DESIGN_SKILL_ROOT, loadThemeIndex } = require('../design-plan/themes');
8
+ const START = '/* OPENYIDA APPLICATION STYLE RECIPES START';
9
+ const END = '/* OPENYIDA APPLICATION STYLE RECIPES END */';
10
+ const CREATIVE_TOKENS = [
11
+ '--pod-page-bg-color', '--pod-card-bg-color', '--color-text1-4',
12
+ '--form-element-medium-corner', '--form-element-medium-height',
13
+ '--pod-page-footer-bg-color', '--pod-sticky-footer-box-shadow',
14
+ '--oyd-content-width', '--oyd-content-padding', '--oyd-field-gap',
15
+ '--oyd-heading-font', '--oyd-heading-size', '--oyd-rule-style',
16
+ ];
17
+
18
+ function validateCreativeDirection(direction, tokens) {
19
+ const missing = ['businessRationale', 'composition', 'typography', 'material', 'formLayout']
20
+ .filter(key => typeof direction?.[key] !== 'string' || !direction[key].trim());
21
+ missing.push(...CREATIVE_TOKENS.filter(key => typeof tokens?.[key] !== 'string' || !tokens[key].trim()));
22
+ if (missing.length) {
23
+ throw new CliError(t('design_document.invalid', 'creativeDirection', missing.join(', ')), {
24
+ code: 'APPLICATION_STYLE_CREATIVE_INCOMPLETE', details: { missing },
25
+ });
26
+ }
27
+ }
28
+
29
+ function applyApplicationStyle(css, metadata, tokens) {
30
+ const style = metadata.applicationStyle;
31
+ if (style && (style.recipe !== 'application-style-v1' || !['template', 'creative'].includes(style.mode))) {
32
+ throw new CliError(t('design_document.invalid', 'applicationStyle', 'APPLICATION_STYLE_INVALID'), { code: 'APPLICATION_STYLE_INVALID' });
33
+ }
34
+ if (style?.mode === 'creative') {validateCreativeDirection(metadata.creativeDirection, tokens);}
35
+ const first = css.indexOf(START);
36
+ const last = css.indexOf(END);
37
+ if (first >= 0 && last < first) {
38
+ throw new CliError(t('design_document.invalid', 'app_theme.css', 'APPLICATION_STYLE_CSS_INVALID'), { code: 'APPLICATION_STYLE_CSS_INVALID' });
39
+ }
40
+ const recipe = style
41
+ ? fs.readFileSync(path.join(DESIGN_SKILL_ROOT, 'references/theme/application-style-recipes.css'), 'utf8').trim()
42
+ : '';
43
+ // Only the managed recipe block is replaced. User-authored rules stay intact.
44
+ if (first >= 0) {return css.slice(0, first) + recipe + css.slice(last + END.length);}
45
+ return recipe ? `${css.trimEnd()}\n\n${recipe}\n` : css;
46
+ }
47
+
48
+ function exportApplicationStyle(id, outputDirectory) {
49
+ const theme = loadThemeIndex().themes.find(item => item.themeId === id && item.collection === 'application-styles');
50
+ if (!theme) {throw new CliError(t('design_document.invalid', id || '--style-id', 'APPLICATION_STYLE_UNKNOWN'), { code: 'APPLICATION_STYLE_UNKNOWN' });}
51
+ const directory = path.resolve(outputDirectory);
52
+ const assets = [['design.md', theme.templatePath], ['app_theme.css', theme.cssTemplatePath], ['form-layout.json', theme.formLayoutPath]];
53
+ const outputs = assets.map(([name, relative]) => {
54
+ const source = path.resolve(DESIGN_SKILL_ROOT, relative);
55
+ const target = path.join(directory, name);
56
+ const root = path.resolve(DESIGN_SKILL_ROOT, 'templates/design-themes') + path.sep;
57
+ if (!source.startsWith(root) || fs.existsSync(target)) {
58
+ throw new CliError(t('design_document.invalid', target, 'APPLICATION_STYLE_OUTPUT_CONFLICT'), { code: 'APPLICATION_STYLE_OUTPUT_CONFLICT' });
59
+ }
60
+ return { source, target, content: fs.readFileSync(source, 'utf8') };
61
+ });
62
+ fs.mkdirSync(directory, { recursive: true });
63
+ for (const item of outputs) {fs.writeFileSync(item.target, item.content, { flag: 'wx' });}
64
+ return { success: true, mode: theme.mode, themeId: id, authoringRequired: true, outputs: outputs.map(item => item.target) };
65
+ }
66
+
67
+ module.exports = { applyApplicationStyle, validateCreativeDirection, CREATIVE_TOKENS, exportApplicationStyle };
@@ -49,6 +49,7 @@ const {
49
49
  formatFormDetailLinkMessage,
50
50
  } = require('./form-detail-link-guard');
51
51
  const { t } = require('../core/i18n');
52
+ const { assertFormDataResponse } = require('./form-data-response-guard');
52
53
  const { assertInlineCssStructure } = require('./inline-css-guard');
53
54
  const { assertCanvasThemeStructure } = require('./canvas-theme-guard');
54
55
  const { assertCanvasIconExports } = require('./canvas-icon-guard');
@@ -940,32 +941,33 @@ function compileCanvasLocal(source, options = {}) {
940
941
  },
941
942
  });
942
943
  }
943
- const directFormOpenIssues = findDirectFormOpenIssues(source);
944
- if (directFormOpenIssues.length > 0) {
945
- const firstIssue = directFormOpenIssues[0];
946
- throw new CliError(formatDirectFormOpenMessage(), {
947
- code: 'OPENYIDA_CANVAS_FORM_OPEN_CONTAINER_REQUIRED',
944
+ const formDetailLinkIssues = findFormDetailLinkIssues(source);
945
+ if (formDetailLinkIssues.length > 0) {
946
+ const firstIssue = formDetailLinkIssues[0];
947
+ throw new CliError(formatFormDetailLinkMessage(firstIssue), {
948
+ code: 'OPENYIDA_CANVAS_FORM_DETAIL_LINK_INVALID',
948
949
  details: {
949
950
  stage: 'canvas_compile',
950
951
  sourcePath: options.sourcePath || '',
951
952
  line: firstIssue.line,
952
- callee: firstIssue.callee,
953
+ issueType: firstIssue.type,
953
954
  },
954
955
  });
955
956
  }
956
- const formDetailLinkIssues = findFormDetailLinkIssues(source);
957
- if (formDetailLinkIssues.length > 0) {
958
- const firstIssue = formDetailLinkIssues[0];
959
- throw new CliError(formatFormDetailLinkMessage(firstIssue), {
960
- code: 'OPENYIDA_CANVAS_FORM_DETAIL_LINK_INVALID',
957
+ const directFormOpenIssues = findDirectFormOpenIssues(source);
958
+ if (directFormOpenIssues.length > 0) {
959
+ const firstIssue = directFormOpenIssues[0];
960
+ throw new CliError(formatDirectFormOpenMessage(), {
961
+ code: 'OPENYIDA_CANVAS_FORM_OPEN_CONTAINER_REQUIRED',
961
962
  details: {
962
963
  stage: 'canvas_compile',
963
964
  sourcePath: options.sourcePath || '',
964
965
  line: firstIssue.line,
965
- issueType: firstIssue.type,
966
+ callee: firstIssue.callee,
966
967
  },
967
968
  });
968
969
  }
970
+ assertFormDataResponse(source, options);
969
971
  assertNoUnavailableCanvasInstanceApis(source, options);
970
972
  assertNoSelfReferentialDependencyBindings(source, options);
971
973
  assertNoBareDependencyGlobals(source, options);
@@ -2,6 +2,10 @@
2
2
 
3
3
  const { detectDeprecatedCreateFormInvocation } = require('../../core/command-contract');
4
4
 
5
+ const CREATE_FORM_LAYOUTS = new Set(['single', '1', 'double', '2', 'card', 'section']);
6
+ const CREATE_FORM_THEMES = new Set(['default', 'compact', 'comfortable']);
7
+ const CREATE_FORM_LABEL_ALIGNS = new Set(['top', 'left', 'right']);
8
+
5
9
  function parseMaybeJsonValue(value) {
6
10
  if (typeof value !== 'string') {
7
11
  return value;
@@ -94,24 +98,38 @@ function createParseArgs(dependencies) {
94
98
  const args = [...rawArgs];
95
99
 
96
100
  for (let i = 0; i < args.length; i++) {
97
- if (args[i] === '--layout' && i + 1 < args.length) {
98
- options.layout = args[i + 1];
101
+ if (args[i] === '--layout') {
102
+ const value = args[i + 1];
103
+ if (!value || value.startsWith('--') || !CREATE_FORM_LAYOUTS.has(value)) {
104
+ throwCreateFormError('--layout must be one of: single, double, card, section', 'CREATE_FORM_INVALID_ARGUMENTS');
105
+ }
106
+ options.layout = value;
99
107
  args.splice(i, 2);
100
108
  i--;
101
- } else if (args[i] === '--theme' && i + 1 < args.length) {
102
- options.theme = args[i + 1];
109
+ } else if (args[i] === '--theme') {
110
+ const value = args[i + 1];
111
+ if (!value || value.startsWith('--') || !CREATE_FORM_THEMES.has(value)) {
112
+ throwCreateFormError('--theme must be one of: default, compact, comfortable', 'CREATE_FORM_INVALID_ARGUMENTS');
113
+ }
114
+ options.theme = value;
103
115
  args.splice(i, 2);
104
116
  i--;
105
- } else if (args[i] === '--label-align' && i + 1 < args.length) {
106
- options.labelAlign = args[i + 1];
117
+ } else if (args[i] === '--label-align') {
118
+ const value = args[i + 1];
119
+ if (!value || value.startsWith('--') || !CREATE_FORM_LABEL_ALIGNS.has(value)) {
120
+ throwCreateFormError('--label-align must be one of: top, left, right', 'CREATE_FORM_INVALID_ARGUMENTS');
121
+ }
122
+ options.labelAlign = value;
107
123
  args.splice(i, 2);
108
124
  i--;
109
- } else if (args[i] === '--icon' && i + 1 < args.length) {
110
- options.icon = args[i + 1];
125
+ } else if (args[i] === '--icon') {
126
+ const value = args[i + 1];
127
+ if (!value || value.startsWith('--')) {
128
+ throwCreateFormError('--icon requires a value', 'CREATE_FORM_INVALID_ARGUMENTS');
129
+ }
130
+ options.icon = value;
111
131
  args.splice(i, 2);
112
132
  i--;
113
- } else if (args[i] === '--icon') {
114
- throwCreateFormError('--icon requires a value', 'CREATE_FORM_INVALID_ARGUMENTS');
115
133
  } else if (args[i] === '--data-file') {
116
134
  const next = args[i + 1];
117
135
  if (dataFileInput !== undefined || !next || next.startsWith('--')) {
@@ -120,8 +138,12 @@ function createParseArgs(dependencies) {
120
138
  dataFileInput = next;
121
139
  args.splice(i, 2);
122
140
  i--;
123
- } else if ((args[i] === '--locale' || args[i] === '--content-locale' || args[i] === '--lang') && i + 1 < args.length) {
124
- options.contentLocale = args[i + 1];
141
+ } else if (args[i] === '--locale' || args[i] === '--content-locale' || args[i] === '--lang') {
142
+ const value = args[i + 1];
143
+ if (!value || value.startsWith('--')) {
144
+ throwCreateFormError(`${args[i]} requires a value`, 'CREATE_FORM_INVALID_ARGUMENTS');
145
+ }
146
+ options.contentLocale = value;
125
147
  if (!normalizeYidaLocale(options.contentLocale)) {
126
148
  error(`Unsupported locale: ${options.contentLocale}`);
127
149
  throwCreateFormError(`Unsupported locale: ${options.contentLocale}`, 'CREATE_FORM_INVALID_ARGUMENTS');
@@ -361,4 +383,7 @@ module.exports = {
361
383
  createParseArgs,
362
384
  parseInlineValidationOptions,
363
385
  parseMaybeJsonValue,
386
+ CREATE_FORM_LAYOUTS,
387
+ CREATE_FORM_THEMES,
388
+ CREATE_FORM_LABEL_ALIGNS,
364
389
  };
@@ -9,10 +9,15 @@ const { t } = require('../../core/i18n');
9
9
  const { usage, hint } = require('../../core/chalk');
10
10
  const { assertNoEmojiInText, assertNoEmojiInValue } = require('../../core/no-emoji-guard');
11
11
  const { normalizeYidaLocale } = require('../../core/yida-i18n');
12
+ const {
13
+ CREATE_FORM_LAYOUTS,
14
+ CREATE_FORM_THEMES,
15
+ CREATE_FORM_LABEL_ALIGNS,
16
+ } = require('./args');
12
17
  const { FORM_NAV_ICONS, resolveFormNavIcon } = require('./nav-icon');
13
18
 
14
19
  const BATCH_USAGE = 'openyida create-form batch <appType> <plan.json> [--concurrency 1..4] [--check] [--json]';
15
- const BATCH_PLAN_EXAMPLE = '{"forms":[{"key":"customer","title":"客户","fieldsFile":"customer-fields.json"},{"key":"order","title":"订单","fieldsFile":"order-fields.json","dependsOn":["customer"]}]}';
20
+ const BATCH_PLAN_EXAMPLE = '{"forms":[{"key":"customer","title":"客户","fieldsFile":"customer-fields.json","layout":"section","theme":"comfortable","labelAlign":"left"},{"key":"order","title":"订单","fieldsFile":"order-fields.json","dependsOn":["customer"]}]}';
16
21
 
17
22
  function invalid(reason) {
18
23
  throw new CliError(t('create_form.batch_invalid'), { code: 'FORM_BATCH_INVALID', details: { reason } });
@@ -46,6 +51,20 @@ function validateStaticDefinition(form, fields) {
46
51
  locale: form.locale,
47
52
  });
48
53
  }
54
+ for (const [key, values] of [
55
+ ['layout', CREATE_FORM_LAYOUTS],
56
+ ['theme', CREATE_FORM_THEMES],
57
+ ['labelAlign', CREATE_FORM_LABEL_ALIGNS],
58
+ ]) {
59
+ if (form[key] !== undefined && !values.has(form[key])) {
60
+ invalid({
61
+ formKey: form.key,
62
+ errorCode: 'CREATE_FORM_INVALID_ARGUMENTS',
63
+ errorMsg: `Unsupported ${key}: ${form[key]}`,
64
+ [key]: form[key],
65
+ });
66
+ }
67
+ }
49
68
  }
50
69
 
51
70
  function parseArgs(args) {
@@ -126,9 +145,9 @@ function loadPlan(file, options = {}) {
126
145
  if (!form || !/^[a-zA-Z][\w-]*$/.test(form.key || '') || typeof form.title !== 'string' || !form.title.trim() ||
127
146
  (form.fields === undefined) === (form.fieldsFile === undefined) ||
128
147
  (form.dependsOn !== undefined && (!Array.isArray(form.dependsOn) || form.dependsOn.some(key => typeof key !== 'string')))) { invalid('form'); }
129
- if (Object.keys(form).some(key => !['key', 'title', 'fields', 'fieldsFile', 'dependsOn', 'formUuid', 'icon', 'locale'].includes(key))) { invalid(form.key); }
148
+ if (Object.keys(form).some(key => !['key', 'title', 'fields', 'fieldsFile', 'dependsOn', 'formUuid', 'layout', 'theme', 'labelAlign', 'icon', 'locale'].includes(key))) { invalid(form.key); }
130
149
  if (form.formUuid !== undefined && (typeof form.formUuid !== 'string' || !form.formUuid.startsWith('FORM'))) { invalid(form.key); }
131
- for (const key of ['icon', 'locale']) { if (form[key] !== undefined && typeof form[key] !== 'string') { invalid(key); } }
150
+ for (const key of ['layout', 'theme', 'labelAlign', 'icon', 'locale']) { if (form[key] !== undefined && typeof form[key] !== 'string') { invalid(key); } }
132
151
  const rawFields = form.fieldsFile === undefined ? form.fields : JSON.parse(fs.readFileSync(path.resolve(path.dirname(file), form.fieldsFile), 'utf8'));
133
152
  const fields = normalizeAssociationReferences(rawFields, options.appType);
134
153
  validateStaticDefinition(form, fields);
@@ -192,7 +211,7 @@ function expectedReadbackFields(fields) {
192
211
  expected.push(...expectedReadbackFields(field.children));
193
212
  continue;
194
213
  }
195
- if (['Divider', 'RichText', 'PageSection', 'GroupContainer'].includes(field.type)) { continue; }
214
+ if (['Divider', 'RichText'].includes(field.type)) { continue; }
196
215
  if (typeof field.label === 'string' && field.label.trim()) {
197
216
  expected.push({ label: field.label.trim(), componentName: field.type });
198
217
  }
@@ -361,7 +380,15 @@ async function run(args, dependencies = {}) {
361
380
  const resolvedFields = mapReferences(form.fields, resolve);
362
381
  if (!formUuid) {
363
382
  const argv = ['create-form', 'create', options.appType, form.title, JSON.stringify(resolvedFields), '--no-open'];
364
- for (const key of ['icon', 'locale']) { if (form[key]) { argv.push(`--${key}`, form[key]); } }
383
+ for (const [key, option] of Object.entries({
384
+ layout: '--layout',
385
+ theme: '--theme',
386
+ labelAlign: '--label-align',
387
+ icon: '--icon',
388
+ locale: '--locale',
389
+ })) {
390
+ if (form[key]) { argv.push(option, form[key]); }
391
+ }
365
392
  try {
366
393
  const created = await call(argv);
367
394
  if (typeof created.formUuid !== 'string' || !created.formUuid.startsWith('FORM')) { invalid(`create result: ${form.key}`); }