@buaa_smat/hometrans 26.0.5 → 26.0.6

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 (472) hide show
  1. package/README.md +249 -279
  2. package/agents/code-reviewer.md +1 -1
  3. package/dist/cli/editors.json +20 -0
  4. package/dist/platform/registry.js +1 -0
  5. package/dist/platform/validate.js +2 -1
  6. package/i18n/agents/code-reviewer.md +1 -1
  7. package/i18n/platforms/atomcode/skills/a2h-app-migrate/SKILL.unique.md +3 -0
  8. package/i18n/platforms/claude-code/skills/a2h-app-migrate/SKILL.unique.md +3 -0
  9. package/i18n/platforms/codebuddy/skills/a2h-app-migrate/SKILL.unique.md +8 -0
  10. package/i18n/platforms/codex/skills/a2h-app-migrate/SKILL.unique.md +3 -0
  11. package/i18n/platforms/cursor/skills/a2h-app-migrate/SKILL.unique.md +3 -0
  12. package/i18n/platforms/deveco/skills/a2h-app-migrate/SKILL.unique.md +3 -0
  13. package/i18n/platforms/opencode/skills/a2h-app-migrate/SKILL.unique.md +10 -0
  14. package/i18n/platforms/qoder/skills/a2h-app-migrate/SKILL.unique.md +3 -0
  15. package/i18n/platforms/qoder-cn/skills/a2h-app-migrate/SKILL.unique.md +8 -0
  16. package/i18n/platforms/trae/skills/a2h-app-migrate/SKILL.unique.md +3 -0
  17. package/i18n/platforms/trae-cn/skills/a2h-app-migrate/SKILL.unique.md +3 -0
  18. package/i18n/skills/a2h-app-migrate/SKILL.md +32 -15
  19. package/i18n/skills/a2h-app-migrate/references/stage-map.md +4 -2
  20. package/i18n/skills/a2h-app-migrate/references/workflow.yaml +148 -89
  21. package/i18n/skills/a2h-app-migrate/scripts/env_preflight.mjs +1 -1
  22. package/i18n/skills/a2h-app-migrate/scripts/validate_workflow.mjs +51 -2
  23. package/i18n/skills/a2h-app-migrate/test/test_build_fixer_contract.mjs +1 -1
  24. package/i18n/skills/a2h-app-migrate/test/test_interaction.mjs +0 -2
  25. package/i18n/skills/a2h-app-migrate/test/test_resume_plan.mjs +1 -1
  26. package/i18n/skills/a2h-app-migrate/test/test_skill_doc.mjs +1 -1
  27. package/i18n/skills/a2h-app-migrate/test/test_specs_json_preflight.mjs +1 -1
  28. package/i18n/skills/a2h-app-migrate/test/test_utg_static_done.mjs +9 -3
  29. package/i18n/skills/a2h-app-migrate/test/test_validate_workflow_bilingual.mjs +4 -2
  30. package/i18n/skills/a2h-arkts-logic-coder/SKILL.md +8 -7
  31. package/i18n/skills/a2h-arkts-logic-coder/references/ISSUES.md +2 -2
  32. package/i18n/skills/a2h-arkts-logic-coder/references/code-generation.md +33 -12
  33. package/i18n/skills/a2h-batch-ui-align/SKILL.md +14 -12
  34. package/i18n/skills/a2h-batch-ui-align/references/cards/alignment.md +1 -0
  35. package/i18n/skills/a2h-batch-ui-align/references/cards/canvas.md +1 -0
  36. package/i18n/skills/a2h-batch-ui-align/references/cards/dynamics.md +32 -1
  37. package/i18n/skills/a2h-batch-ui-align/references/cards/geometry.md +3 -2
  38. package/i18n/skills/a2h-batch-ui-align/references/cards/interaction.md +4 -0
  39. package/i18n/skills/a2h-batch-ui-align/references/cards/resources.md +19 -1
  40. package/i18n/skills/a2h-batch-ui-align/references/cards/widgets.md +13 -1
  41. package/i18n/skills/a2h-batch-ui-align/references/cards/window.md +2 -2
  42. package/i18n/skills/a2h-batch-ui-align/references/checker-rules.md +205 -7
  43. package/i18n/skills/a2h-batch-ui-align/references/conversion-procedure.md +10 -17
  44. package/i18n/skills/a2h-batch-ui-align/references/incremental-scope.md +3 -4
  45. package/i18n/skills/a2h-batch-ui-align/references/lottie-integration.md +47 -2
  46. package/i18n/skills/a2h-batch-ui-align/references/mappings/android-to-harmonyOS-ui-atomic-component-mapping-reference.md +52 -328
  47. package/i18n/skills/a2h-batch-ui-align/references/mappings/android-to-harmonyOS-ui-interaction-mapping-reference.md +1 -138
  48. package/i18n/skills/a2h-batch-ui-align/references/mappings/android-to-harmonyOS-ui-layout-mapping-reference.md +2 -11
  49. package/i18n/skills/a2h-batch-ui-align/references/state-mgmt/_paradigm-selection.md +1 -1
  50. package/i18n/skills/a2h-batch-ui-align/references/step3-capture.md +8 -23
  51. package/i18n/skills/a2h-batch-ui-align/references/step4-prepare.md +2 -1
  52. package/i18n/skills/a2h-batch-ui-align/references/step5-convert.md +17 -9
  53. package/i18n/skills/a2h-batch-ui-align/scripts/build_conversion_set.mjs +239 -16
  54. package/i18n/skills/a2h-batch-ui-align/scripts/group_pack.mjs +6 -0
  55. package/i18n/skills/a2h-batch-ui-align/scripts/icon_coverage.mjs +6 -3
  56. package/i18n/skills/a2h-batch-ui-align/scripts/measure_pack.ts +170 -10
  57. package/i18n/skills/a2h-batch-ui-align/scripts/phase5_check.mjs +42 -1
  58. package/i18n/skills/a2h-batch-ui-align/scripts/static_check/main.ts +20 -1
  59. package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/attr_chain.ts +81 -0
  60. package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/click_handler.ts +140 -0
  61. package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/collapsing_toolbar.ts +124 -0
  62. package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/compose_semantics.ts +287 -0
  63. package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/flowitem_width.ts +78 -0
  64. package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/hit_test.ts +194 -8
  65. package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/inset_stacked.ts +138 -0
  66. package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/int_division.ts +181 -0
  67. package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/layout_placement.ts +62 -2
  68. package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/lottie_path.ts +77 -0
  69. package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/lottie_ready.ts +109 -0
  70. package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/media_tint.ts +88 -18
  71. package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/relative_container_cycle.ts +140 -0
  72. package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/relative_container_height.ts +2 -2
  73. package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/see_through_overlay.ts +149 -0
  74. package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/sheet_builder.ts +139 -0
  75. package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/sheet_show_close.ts +53 -0
  76. package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/space_between_optional.ts +115 -0
  77. package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/theme_color.ts +7 -1
  78. package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/width_fill.ts +160 -0
  79. package/i18n/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_inset_stacked.test.mjs +155 -0
  80. package/i18n/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_layout_placement.test.mjs +60 -0
  81. package/i18n/skills/a2h-batch-ui-align/scripts/tests/build_conversion_set.test.mjs +38 -0
  82. package/i18n/skills/a2h-module-semantic-docs/SKILL.md +3 -2
  83. package/i18n/skills/a2h-page-specgen/SKILL.md +36 -5
  84. package/i18n/skills/a2h-page-specgen/references/behavior-ledger.md +89 -21
  85. package/i18n/skills/a2h-page-specgen/references/gates.md +33 -7
  86. package/i18n/skills/a2h-page-specgen/references/scenario-authoring.md +67 -13
  87. package/i18n/skills/a2h-page-specgen/references/spec-example.md +166 -32
  88. package/i18n/skills/a2h-page-specgen/references/spec-template.md +8 -5
  89. package/i18n/skills/a2h-page-specgen/scripts/behavior-audit.mjs +37 -1
  90. package/i18n/skills/a2h-page-specgen/scripts/behavior-discovery.mjs +241 -22
  91. package/i18n/skills/a2h-page-specgen/scripts/behavior-model.mjs +29 -2
  92. package/i18n/skills/a2h-page-specgen/scripts/behavior-reconcile.mjs +32 -0
  93. package/i18n/skills/a2h-page-specgen/scripts/contract-calls.mjs +715 -0
  94. package/i18n/skills/a2h-page-specgen/scripts/footprint.mjs +129 -2
  95. package/i18n/skills/a2h-page-specgen/scripts/gate.mjs +19 -10
  96. package/i18n/skills/a2h-page-specgen/scripts/lib/contracts.mjs +62 -3
  97. package/i18n/skills/a2h-page-specgen/scripts/lib/graph-evidence.mjs +27 -0
  98. package/i18n/skills/a2h-page-specgen/scripts/lib/hg.mjs +116 -6
  99. package/i18n/skills/a2h-page-specgen/scripts/operation-evidence.mjs +270 -29
  100. package/i18n/skills/a2h-page-specgen/scripts/prepare.mjs +26 -14
  101. package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/PlainDisplayPage.prompt.md +118 -25
  102. package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/PlainDisplayPage.worker.md +104 -19
  103. package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/SilentFailurePage.prompt.md +118 -25
  104. package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/SilentFailurePage.worker.md +104 -19
  105. package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/UniAppSourcePage.discovery.json +216 -216
  106. package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/UniAppSourcePage.json +1 -1
  107. package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/UniAppSourcePage.post-review.json +2 -2
  108. package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/UniAppSourcePage.prompt.md +118 -25
  109. package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/UniAppSourcePage.worker.md +100 -15
  110. package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/ValidatedSearchPage.prompt.md +118 -25
  111. package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/ValidatedSearchPage.worker.md +104 -19
  112. package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/run.mjs +155 -3
  113. package/i18n/skills/a2h-page-specgen/scripts/test/android-operation-evidence.test.mjs +529 -1
  114. package/i18n/skills/a2h-page-specgen/scripts/test/behavior-audit-pre.test.mjs +27 -0
  115. package/i18n/skills/a2h-page-specgen/scripts/test/behavior-discovery.test.mjs +158 -0
  116. package/i18n/skills/a2h-page-specgen/scripts/test/behavior-fixtures.mjs +11 -13
  117. package/i18n/skills/a2h-page-specgen/scripts/test/behavior-reconcile.test.mjs +97 -0
  118. package/i18n/skills/a2h-page-specgen/scripts/test/contract-calls.test.mjs +737 -0
  119. package/i18n/skills/a2h-page-specgen/scripts/test/contracts.test.mjs +75 -3
  120. package/i18n/skills/a2h-page-specgen/scripts/test/finalize.test.mjs +24 -0
  121. package/i18n/skills/a2h-page-specgen/scripts/test/fixtures/hg.mkdb.mjs +124 -0
  122. package/i18n/skills/a2h-page-specgen/scripts/test/footprint-resolve.test.mjs +6 -2
  123. package/i18n/skills/a2h-page-specgen/scripts/test/gate.test.mjs +106 -1
  124. package/i18n/skills/a2h-page-specgen/scripts/test/graph-evidence.test.mjs +32 -0
  125. package/i18n/skills/a2h-page-specgen/scripts/test/hg.test.mjs +12 -0
  126. package/i18n/skills/a2h-page-specgen/scripts/test/operation-reviews.test.mjs +6 -1
  127. package/i18n/skills/a2h-page-specgen/scripts/test/prompt-tpl.test.mjs +11 -3
  128. package/i18n/skills/a2h-page-specgen/scripts/test/protocol-docs.test.mjs +1 -1
  129. package/i18n/skills/a2h-page-specgen/scripts/test/recovery-e2e.test.mjs +1 -0
  130. package/i18n/skills/a2h-page-specgen/scripts/test/submit.test.mjs +159 -27
  131. package/i18n/skills/a2h-resource-convert/SKILL.md +1 -1
  132. package/i18n/skills/a2h-resource-convert/references/lottie-conversion-rules.md +2 -2
  133. package/i18n/skills/a2h-resource-convert/scripts/a2h_resource_convert.ts +124 -8
  134. package/i18n/skills/a2h-resource-convert/scripts/sync-framework-strings.mjs +147 -0
  135. package/i18n/skills/a2h-resource-convert/scripts/tests/framework_strings.test.mjs +131 -0
  136. package/i18n/skills/a2h-spec-design-pipeline/SKILL.md +15 -12
  137. package/i18n/skills/a2h-spec-design-pipeline/references/coding-loop.md +38 -10
  138. package/i18n/skills/a2h-spec-design-pipeline/references/initialization.md +2 -2
  139. package/i18n/skills/a2h-spec-design-pipeline/references/post-loop.md +2 -2
  140. package/i18n/skills/a2h-spec-design-pipeline/references/reply-recovery.md +172 -0
  141. package/i18n/skills/a2h-spec-design-pipeline/references/review-loop.md +2 -2
  142. package/i18n/skills/a2h-spec-design-pipeline/references/scripts.md +5 -3
  143. package/i18n/skills/a2h-spec-design-pipeline/references/state-and-resume.md +7 -1
  144. package/i18n/skills/a2h-spec-design-pipeline/scripts/plan_groups.ts +1 -1
  145. package/i18n/skills/a2h-spec-design-pipeline/scripts/test_plan_groups.ts +2 -0
  146. package/i18n/skills/a2h-spec-generate/references/input-formats.md +1 -1
  147. package/i18n/skills/a2h-utg-explorer/SKILL.md +11 -5
  148. package/i18n/skills/a2h-utg-explorer/references/architecture.md +37 -19
  149. package/i18n/skills/a2h-utg-explorer/scripts/compile_tasks.mjs +48 -3
  150. package/i18n/skills/a2h-utg-explorer/scripts/final_utg.mjs +21 -0
  151. package/i18n/skills/a2h-utg-explorer/scripts/recover_d.mjs +67 -8
  152. package/i18n/skills/a2h-utg-explorer/scripts/tests/diagnostics.test.mjs +32 -0
  153. package/i18n/skills/a2h-utg-explorer/scripts/tests/dialog_own_layout.test.mjs +40 -0
  154. package/i18n/skills/a2h-utg-explorer/scripts/utg_explorer/semantics.mjs +63 -2
  155. package/i18n/skills/a2h-utg-explorer/scripts/utg_explorer/task_runner.mjs +143 -14
  156. package/i18n/skills/a2h-utg-static/SKILL.md +3 -3
  157. package/i18n/skills/a2h-utg-static/references/ui-elements-static-utg-schema.md +4 -3
  158. package/i18n/skills/a2h-utg-static/scripts/click_paths.mjs +1 -1
  159. package/i18n/skills/a2h-utg-static/scripts/tests/test_compose_res_text.mjs +25 -0
  160. package/i18n/skills/a2h-utg-static/tools/convert_static_utg_to_ui_elements.ts +1 -0
  161. package/package.json +2 -1
  162. package/platforms/atomcode/skills/a2h-app-migrate/SKILL.unique.md +3 -0
  163. package/platforms/claude-code/skills/a2h-app-migrate/SKILL.unique.md +3 -0
  164. package/platforms/codebuddy/agents/build-fixer.frontmatter.md +5 -0
  165. package/platforms/codebuddy/agents/code-reviewer.frontmatter.md +5 -0
  166. package/platforms/codebuddy/agents/model-render-worker.frontmatter.md +5 -0
  167. package/platforms/codebuddy/agents/model-worker.frontmatter.md +5 -0
  168. package/platforms/codebuddy/agents/specgen-worker.frontmatter.md +5 -0
  169. package/platforms/codebuddy/skills/a2h-app-migrate/SKILL.unique.md +8 -0
  170. package/platforms/codex/skills/a2h-app-migrate/SKILL.unique.md +3 -0
  171. package/platforms/cursor/skills/a2h-app-migrate/SKILL.unique.md +3 -0
  172. package/platforms/deveco/agents/build-fixer.frontmatter.md +2 -0
  173. package/platforms/deveco/agents/code-reviewer.frontmatter.md +2 -0
  174. package/platforms/deveco/agents/model-render-worker.frontmatter.md +2 -0
  175. package/platforms/deveco/agents/model-worker.frontmatter.md +2 -0
  176. package/platforms/deveco/agents/specgen-worker.frontmatter.md +2 -0
  177. package/platforms/deveco/skills/a2h-app-migrate/SKILL.unique.md +3 -0
  178. package/platforms/opencode/agents/build-fixer.frontmatter.md +2 -0
  179. package/platforms/opencode/agents/code-reviewer.frontmatter.md +2 -0
  180. package/platforms/opencode/agents/model-render-worker.frontmatter.md +2 -0
  181. package/platforms/opencode/agents/model-worker.frontmatter.md +2 -0
  182. package/platforms/opencode/agents/specgen-worker.frontmatter.md +2 -0
  183. package/platforms/opencode/skills/a2h-app-migrate/SKILL.unique.md +10 -0
  184. package/platforms/qoder/skills/a2h-app-migrate/SKILL.unique.md +3 -0
  185. package/platforms/qoder-cn/skills/a2h-app-migrate/SKILL.unique.md +8 -0
  186. package/platforms/trae/skills/a2h-app-migrate/SKILL.unique.md +3 -0
  187. package/platforms/trae-cn/skills/a2h-app-migrate/SKILL.unique.md +3 -0
  188. package/skills/a2h-app-migrate/SKILL.md +31 -14
  189. package/skills/a2h-app-migrate/references/stage-map.md +4 -2
  190. package/skills/a2h-app-migrate/references/workflow.yaml +152 -89
  191. package/skills/a2h-app-migrate/scripts/assert_dag_complete.mjs +1 -1
  192. package/skills/a2h-app-migrate/scripts/check_ui_batch_done.mjs +28 -11
  193. package/skills/a2h-app-migrate/scripts/dag_action_catalog.mjs +76 -0
  194. package/skills/a2h-app-migrate/scripts/dag_production_executor.mjs +60 -5
  195. package/skills/a2h-app-migrate/scripts/dag_runner.mjs +184 -4
  196. package/skills/a2h-app-migrate/scripts/env_preflight.mjs +1 -1
  197. package/skills/a2h-app-migrate/scripts/ledger.mjs +2 -2
  198. package/skills/a2h-app-migrate/scripts/resume_plan.mjs +3 -3
  199. package/skills/a2h-app-migrate/scripts/validate_workflow.mjs +51 -2
  200. package/skills/a2h-app-migrate/test/test_dag_blocked_guard.mjs +291 -0
  201. package/skills/a2h-app-migrate/test/test_dag_production.mjs +40 -0
  202. package/skills/a2h-app-migrate/test/test_dag_runner.mjs +4 -3
  203. package/skills/a2h-app-migrate/test/test_i18n_engine_mirror.mjs +1 -1
  204. package/skills/a2h-app-migrate/test/test_interaction.mjs +0 -2
  205. package/skills/a2h-app-migrate/test/test_resume_plan.mjs +1 -1
  206. package/skills/a2h-app-migrate/test/test_skill_doc.mjs +1 -1
  207. package/skills/a2h-app-migrate/test/test_spec_engine_contract.mjs +1 -1
  208. package/skills/a2h-app-migrate/test/test_specs_json_preflight.mjs +1 -1
  209. package/skills/a2h-app-migrate/test/test_ui_batch_done.mjs +36 -0
  210. package/skills/a2h-app-migrate/test/test_utg_static_done.mjs +19 -6
  211. package/skills/a2h-app-migrate/test/test_validate_workflow_bilingual.mjs +4 -2
  212. package/skills/a2h-arkts-logic-coder/SKILL.md +8 -7
  213. package/skills/a2h-arkts-logic-coder/references/ISSUES.md +2 -2
  214. package/skills/a2h-arkts-logic-coder/references/code-generation.md +33 -12
  215. package/skills/a2h-batch-ui-align/SKILL.md +14 -12
  216. package/skills/a2h-batch-ui-align/references/cards/alignment.md +1 -0
  217. package/skills/a2h-batch-ui-align/references/cards/canvas.md +1 -0
  218. package/skills/a2h-batch-ui-align/references/cards/dynamics.md +32 -1
  219. package/skills/a2h-batch-ui-align/references/cards/geometry.md +3 -2
  220. package/skills/a2h-batch-ui-align/references/cards/interaction.md +4 -0
  221. package/skills/a2h-batch-ui-align/references/cards/resources.md +19 -1
  222. package/skills/a2h-batch-ui-align/references/cards/widgets.md +13 -1
  223. package/skills/a2h-batch-ui-align/references/cards/window.md +2 -2
  224. package/skills/a2h-batch-ui-align/references/checker-rules.md +205 -7
  225. package/skills/a2h-batch-ui-align/references/conversion-procedure.md +10 -17
  226. package/skills/a2h-batch-ui-align/references/incremental-scope.md +3 -4
  227. package/skills/a2h-batch-ui-align/references/lottie-integration.md +47 -2
  228. package/skills/a2h-batch-ui-align/references/mappings/android-to-harmonyOS-ui-atomic-component-mapping-reference.md +52 -328
  229. package/skills/a2h-batch-ui-align/references/mappings/android-to-harmonyOS-ui-interaction-mapping-reference.md +1 -138
  230. package/skills/a2h-batch-ui-align/references/mappings/android-to-harmonyOS-ui-layout-mapping-reference.md +2 -11
  231. package/skills/a2h-batch-ui-align/references/state-mgmt/_/350/214/203/345/274/217/351/200/211/346/213/251/350/257/264/346/230/216.md +1 -1
  232. package/skills/a2h-batch-ui-align/references/step3-capture.md +8 -23
  233. package/skills/a2h-batch-ui-align/references/step4-prepare.md +2 -1
  234. package/skills/a2h-batch-ui-align/references/step5-convert.md +17 -9
  235. package/skills/a2h-batch-ui-align/scripts/build_conversion_set.mjs +239 -16
  236. package/skills/a2h-batch-ui-align/scripts/group_commit.mjs +6 -1
  237. package/skills/a2h-batch-ui-align/scripts/group_pack.mjs +6 -0
  238. package/skills/a2h-batch-ui-align/scripts/group_pass.mjs +270 -0
  239. package/skills/a2h-batch-ui-align/scripts/group_queue.mjs +134 -16
  240. package/skills/a2h-batch-ui-align/scripts/group_watch.mjs +39 -8
  241. package/skills/a2h-batch-ui-align/scripts/icon_coverage.mjs +6 -3
  242. package/skills/a2h-batch-ui-align/scripts/measure_pack.ts +170 -10
  243. package/skills/a2h-batch-ui-align/scripts/module_placement.mjs +189 -0
  244. package/skills/a2h-batch-ui-align/scripts/overlay_effects.mjs +205 -0
  245. package/skills/a2h-batch-ui-align/scripts/phase5_check.mjs +42 -1
  246. package/skills/a2h-batch-ui-align/scripts/static_check/main.ts +20 -1
  247. package/skills/a2h-batch-ui-align/scripts/static_check/registry.ts +28 -0
  248. package/skills/a2h-batch-ui-align/scripts/static_check/rules/attr_chain.ts +81 -0
  249. package/skills/a2h-batch-ui-align/scripts/static_check/rules/click_handler.ts +140 -0
  250. package/skills/a2h-batch-ui-align/scripts/static_check/rules/collapsing_toolbar.ts +124 -0
  251. package/skills/a2h-batch-ui-align/scripts/static_check/rules/compose_semantics.ts +287 -0
  252. package/skills/a2h-batch-ui-align/scripts/static_check/rules/flowitem_width.ts +78 -0
  253. package/skills/a2h-batch-ui-align/scripts/static_check/rules/hit_test.ts +194 -8
  254. package/skills/a2h-batch-ui-align/scripts/static_check/rules/inset_stacked.ts +138 -0
  255. package/skills/a2h-batch-ui-align/scripts/static_check/rules/int_division.ts +181 -0
  256. package/skills/a2h-batch-ui-align/scripts/static_check/rules/layout_placement.ts +62 -2
  257. package/skills/a2h-batch-ui-align/scripts/static_check/rules/lottie_path.ts +77 -0
  258. package/skills/a2h-batch-ui-align/scripts/static_check/rules/lottie_ready.ts +109 -0
  259. package/skills/a2h-batch-ui-align/scripts/static_check/rules/media_tint.ts +88 -18
  260. package/skills/a2h-batch-ui-align/scripts/static_check/rules/relative_container_cycle.ts +140 -0
  261. package/skills/a2h-batch-ui-align/scripts/static_check/rules/relative_container_height.ts +2 -2
  262. package/skills/a2h-batch-ui-align/scripts/static_check/rules/see_through_overlay.ts +149 -0
  263. package/skills/a2h-batch-ui-align/scripts/static_check/rules/sheet_builder.ts +139 -0
  264. package/skills/a2h-batch-ui-align/scripts/static_check/rules/sheet_show_close.ts +53 -0
  265. package/skills/a2h-batch-ui-align/scripts/static_check/rules/space_between_optional.ts +115 -0
  266. package/skills/a2h-batch-ui-align/scripts/static_check/rules/theme_color.ts +7 -1
  267. package/skills/a2h-batch-ui-align/scripts/static_check/rules/width_fill.ts +160 -0
  268. package/skills/a2h-batch-ui-align/scripts/static_check/scan_file.ts +28 -0
  269. package/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_chrome_defaults.test.mjs +328 -0
  270. package/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_click_handler.test.mjs +127 -0
  271. package/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_compose_semantics.test.mjs +150 -0
  272. package/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_hit_test.test.mjs +117 -0
  273. package/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_inset_stacked.test.mjs +155 -0
  274. package/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_layout_placement.test.mjs +60 -0
  275. package/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_rule_smoke.test.mjs +413 -0
  276. package/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_runtime_api.test.mjs +159 -0
  277. package/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_sheet_builder.test.mjs +192 -0
  278. package/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_theme.test.mjs +4 -2
  279. package/skills/a2h-batch-ui-align/scripts/tests/build_conversion_set.test.mjs +38 -0
  280. package/skills/a2h-batch-ui-align/scripts/tests/build_conversion_set_compose.test.mjs +106 -0
  281. package/skills/a2h-batch-ui-align/scripts/tests/group_commit.test.mjs +15 -0
  282. package/skills/a2h-batch-ui-align/scripts/tests/group_pass.test.mjs +150 -0
  283. package/skills/a2h-batch-ui-align/scripts/tests/group_queue.test.mjs +125 -0
  284. package/skills/a2h-batch-ui-align/scripts/tests/group_watch.test.mjs +56 -0
  285. package/skills/a2h-batch-ui-align/scripts/tests/measure_pack_icon_leaf.test.mjs +143 -0
  286. package/skills/a2h-batch-ui-align/scripts/tests/module_placement.test.mjs +248 -0
  287. package/skills/a2h-batch-ui-align/scripts/tests/overlay_effects.test.mjs +214 -0
  288. package/skills/a2h-fix-build-errors/references/known-patterns.md +5 -5
  289. package/skills/a2h-module-semantic-docs/SKILL.md +3 -2
  290. package/skills/a2h-module-semantic-docs/scripts/commit_module_state.mjs +10 -0
  291. package/skills/a2h-module-semantic-docs/scripts/design_baseline.mjs +158 -0
  292. package/skills/a2h-module-semantic-docs/test/test_design_baseline.mjs +128 -0
  293. package/skills/a2h-page-specgen/SKILL.md +36 -5
  294. package/skills/a2h-page-specgen/references/behavior-ledger.md +88 -21
  295. package/skills/a2h-page-specgen/references/evidence.md +2 -1
  296. package/skills/a2h-page-specgen/references/execution-model.md +13 -5
  297. package/skills/a2h-page-specgen/references/gates.md +33 -7
  298. package/skills/a2h-page-specgen/references/scenario-authoring.md +67 -13
  299. package/skills/a2h-page-specgen/references/spec-example.md +166 -32
  300. package/skills/a2h-page-specgen/references/spec-template.md +8 -5
  301. package/skills/a2h-page-specgen/scripts/behavior-audit.mjs +40 -2
  302. package/skills/a2h-page-specgen/scripts/behavior-discovery.mjs +241 -22
  303. package/skills/a2h-page-specgen/scripts/behavior-model.mjs +29 -2
  304. package/skills/a2h-page-specgen/scripts/behavior-reconcile.mjs +35 -2
  305. package/skills/a2h-page-specgen/scripts/contract-calls.mjs +715 -0
  306. package/skills/a2h-page-specgen/scripts/finalize.mjs +55 -2
  307. package/skills/a2h-page-specgen/scripts/footprint.mjs +129 -2
  308. package/skills/a2h-page-specgen/scripts/gate.mjs +20 -11
  309. package/skills/a2h-page-specgen/scripts/lib/contracts.mjs +56 -3
  310. package/skills/a2h-page-specgen/scripts/lib/graph-evidence.mjs +27 -0
  311. package/skills/a2h-page-specgen/scripts/lib/hg.mjs +114 -5
  312. package/skills/a2h-page-specgen/scripts/lib/ledger.mjs +20 -3
  313. package/skills/a2h-page-specgen/scripts/operation-evidence.mjs +270 -29
  314. package/skills/a2h-page-specgen/scripts/prepare.mjs +25 -14
  315. package/skills/a2h-page-specgen/scripts/report.mjs +26 -5
  316. package/skills/a2h-page-specgen/scripts/submission.mjs +69 -2
  317. package/skills/a2h-page-specgen/scripts/submit.mjs +105 -4
  318. package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/PlainDisplayPage.prompt.md +110 -18
  319. package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/PlainDisplayPage.worker.md +97 -12
  320. package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/SilentFailurePage.prompt.md +110 -18
  321. package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/SilentFailurePage.worker.md +97 -12
  322. package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/UniAppSourcePage.discovery.json +224 -224
  323. package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/UniAppSourcePage.json +1 -1
  324. package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/UniAppSourcePage.post-review.json +2 -2
  325. package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/UniAppSourcePage.prompt.md +110 -18
  326. package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/UniAppSourcePage.worker.md +97 -12
  327. package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/ValidatedSearchPage.prompt.md +110 -18
  328. package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/ValidatedSearchPage.worker.md +97 -12
  329. package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/run.mjs +153 -3
  330. package/skills/a2h-page-specgen/scripts/test/android-operation-evidence.test.mjs +529 -1
  331. package/skills/a2h-page-specgen/scripts/test/behavior-audit-pre.test.mjs +27 -0
  332. package/skills/a2h-page-specgen/scripts/test/behavior-discovery.test.mjs +158 -0
  333. package/skills/a2h-page-specgen/scripts/test/behavior-fixtures.mjs +11 -13
  334. package/skills/a2h-page-specgen/scripts/test/behavior-reconcile.test.mjs +97 -0
  335. package/skills/a2h-page-specgen/scripts/test/contract-calls.test.mjs +737 -0
  336. package/skills/a2h-page-specgen/scripts/test/contracts.test.mjs +82 -3
  337. package/skills/a2h-page-specgen/scripts/test/finalize.test.mjs +24 -0
  338. package/skills/a2h-page-specgen/scripts/test/fixtures/hg.mkdb.mjs +11 -0
  339. package/skills/a2h-page-specgen/scripts/test/footprint-resolve.test.mjs +6 -2
  340. package/skills/a2h-page-specgen/scripts/test/gate.test.mjs +94 -1
  341. package/skills/a2h-page-specgen/scripts/test/graph-evidence.test.mjs +32 -0
  342. package/skills/a2h-page-specgen/scripts/test/hg.test.mjs +14 -0
  343. package/skills/a2h-page-specgen/scripts/test/ledger.test.mjs +49 -1
  344. package/skills/a2h-page-specgen/scripts/test/operation-reviews.test.mjs +6 -1
  345. package/skills/a2h-page-specgen/scripts/test/prompt-tpl.test.mjs +12 -4
  346. package/skills/a2h-page-specgen/scripts/test/protocol-docs.test.mjs +1 -1
  347. package/skills/a2h-page-specgen/scripts/test/recovery-e2e.test.mjs +1 -0
  348. package/skills/a2h-page-specgen/scripts/test/report.test.mjs +80 -1
  349. package/skills/a2h-page-specgen/scripts/test/submit.test.mjs +159 -27
  350. package/skills/a2h-page-specgen/scripts/test/waker-process.test.mjs +23 -0
  351. package/skills/a2h-page-specgen/scripts/waker.mjs +8 -1
  352. package/skills/a2h-resource-convert/SKILL.md +1 -1
  353. package/skills/a2h-resource-convert/data/framework-strings/NOTICE +10 -0
  354. package/skills/a2h-resource-convert/data/framework-strings/manifest.json +90 -0
  355. package/skills/a2h-resource-convert/data/framework-strings/strings.json +382 -0
  356. package/skills/a2h-resource-convert/references/conversion-rules.md +7 -1
  357. package/skills/a2h-resource-convert/references/lottie-conversion-rules.md +2 -2
  358. package/skills/a2h-resource-convert/references/step5-reference-resolution.md +16 -0
  359. package/skills/a2h-resource-convert/scripts/a2h_resource_convert.ts +124 -8
  360. package/skills/a2h-resource-convert/scripts/sync-framework-strings.mjs +147 -0
  361. package/skills/a2h-resource-convert/scripts/tests/framework_strings.test.mjs +131 -0
  362. package/skills/a2h-spec-design-pipeline/SKILL.md +14 -11
  363. package/skills/a2h-spec-design-pipeline/references/coding-loop.md +38 -10
  364. package/skills/a2h-spec-design-pipeline/references/execution-model.md +3 -0
  365. package/skills/a2h-spec-design-pipeline/references/final-report-template.md +6 -3
  366. package/skills/a2h-spec-design-pipeline/references/initialization.md +2 -2
  367. package/skills/a2h-spec-design-pipeline/references/post-loop.md +2 -2
  368. package/skills/a2h-spec-design-pipeline/references/reply-recovery.md +172 -0
  369. package/skills/a2h-spec-design-pipeline/references/review-loop.md +2 -2
  370. package/skills/a2h-spec-design-pipeline/references/scripts.md +4 -3
  371. package/skills/a2h-spec-design-pipeline/references/shared-layer.md +24 -19
  372. package/skills/a2h-spec-design-pipeline/references/state-and-resume.md +7 -1
  373. package/skills/a2h-spec-design-pipeline/references/static-defect-gate.md +12 -5
  374. package/skills/a2h-spec-design-pipeline/rules/migration-rules/config/ruleMeta.json +5 -0
  375. package/skills/a2h-spec-design-pipeline/rules/migration-rules/config/ruleSet.json +4 -0
  376. package/skills/a2h-spec-design-pipeline/rules/migration-rules/data/README.md +27 -3
  377. package/skills/a2h-spec-design-pipeline/rules/migration-rules/data/api-param-contract.json +46 -1
  378. package/skills/a2h-spec-design-pipeline/rules/migration-rules/data/api-permission-map.json +2511 -295
  379. package/skills/a2h-spec-design-pipeline/rules/migration-rules/document/checker/hometrans/api-permission-declared-cn.md +27 -72
  380. package/skills/a2h-spec-design-pipeline/rules/migration-rules/document/checker/hometrans/api-permission-declared-en.md +39 -83
  381. package/skills/a2h-spec-design-pipeline/rules/migration-rules/document/checker/hometrans/arkui-runtime-pitfall-cn.md +132 -101
  382. package/skills/a2h-spec-design-pipeline/rules/migration-rules/document/checker/hometrans/arkui-runtime-pitfall-en.md +158 -115
  383. package/skills/a2h-spec-design-pipeline/rules/migration-rules/document/checker/hometrans/platform-api-contract-cn.md +60 -93
  384. package/skills/a2h-spec-design-pipeline/rules/migration-rules/document/checker/hometrans/platform-api-contract-en.md +73 -100
  385. package/skills/a2h-spec-design-pipeline/rules/migration-rules/document/checker/hometrans/route-page-side-effect-import-cn.md +52 -0
  386. package/skills/a2h-spec-design-pipeline/rules/migration-rules/document/checker/hometrans/route-page-side-effect-import-en.md +59 -0
  387. package/skills/a2h-spec-design-pipeline/rules/migration-rules/lib/checker/ApiPermissionDeclaredCheck.js +57 -8
  388. package/skills/a2h-spec-design-pipeline/rules/migration-rules/lib/checker/ArkUIRuntimePitfallCheck.js +475 -18
  389. package/skills/a2h-spec-design-pipeline/rules/migration-rules/lib/checker/PlatformApiContractCheck.js +472 -4
  390. package/skills/a2h-spec-design-pipeline/rules/migration-rules/lib/checker/RoutePageSideEffectImportCheck.js +570 -0
  391. package/skills/a2h-spec-design-pipeline/rules/migration-rules/lib/checker/arkui/RouteParamCarrierSubCheck.js +1053 -0
  392. package/skills/a2h-spec-design-pipeline/rules/migration-rules/lib/checker/sql/SqlIdentifierAnalysis.js +427 -0
  393. package/skills/a2h-spec-design-pipeline/rules/migration-rules/lib/index.js +7 -1
  394. package/skills/a2h-spec-design-pipeline/rules/migration-rules/package.json +1 -1
  395. package/skills/a2h-spec-design-pipeline/scripts/plan_groups.ts +1 -1
  396. package/skills/a2h-spec-design-pipeline/scripts/settle.ts +785 -0
  397. package/skills/a2h-spec-design-pipeline/scripts/test_api_permission_declared.ts +286 -0
  398. package/skills/a2h-spec-design-pipeline/scripts/test_arkui_runtime_pitfall.ts +166 -2
  399. package/skills/a2h-spec-design-pipeline/scripts/test_docs_refresh_contract.ts +40 -0
  400. package/skills/a2h-spec-design-pipeline/scripts/test_plan_groups.ts +2 -0
  401. package/skills/a2h-spec-design-pipeline/scripts/test_platform_api_contract.ts +350 -7
  402. package/skills/a2h-spec-design-pipeline/scripts/test_route_page_side_effect_import.ts +185 -0
  403. package/skills/a2h-spec-design-pipeline/scripts/test_route_param_carrier.ts +341 -0
  404. package/skills/a2h-spec-design-pipeline/scripts/test_settle.ts +593 -0
  405. package/skills/a2h-spec-design-pipeline/scripts/test_shared_layer_docs.ts +92 -1
  406. package/skills/a2h-spec-design-pipeline/scripts/test_sql_identifier_analysis.ts +137 -0
  407. package/skills/a2h-spec-generate/references/input-formats.md +1 -1
  408. package/skills/a2h-utg-explorer/SKILL.md +11 -5
  409. package/skills/a2h-utg-explorer/references/architecture.md +37 -19
  410. package/skills/a2h-utg-explorer/scripts/audit.mjs +6 -2
  411. package/skills/a2h-utg-explorer/scripts/close_phases.mjs +8 -5
  412. package/skills/a2h-utg-explorer/scripts/compile_tasks.mjs +95 -19
  413. package/skills/a2h-utg-explorer/scripts/d_prereqs.mjs +192 -4
  414. package/skills/a2h-utg-explorer/scripts/final_utg.mjs +21 -0
  415. package/skills/a2h-utg-explorer/scripts/panel_routes.mjs +1 -1
  416. package/skills/a2h-utg-explorer/scripts/plan.mjs +16 -1
  417. package/skills/a2h-utg-explorer/scripts/predicates.mjs +270 -0
  418. package/skills/a2h-utg-explorer/scripts/promote_dynamic.mjs +2 -0
  419. package/skills/a2h-utg-explorer/scripts/recover.mjs +4 -3
  420. package/skills/a2h-utg-explorer/scripts/recover_d.mjs +67 -8
  421. package/skills/a2h-utg-explorer/scripts/rejudge.mjs +4 -3
  422. package/skills/a2h-utg-explorer/scripts/report.mjs +32 -2
  423. package/skills/a2h-utg-explorer/scripts/run_cycle.mjs +103 -36
  424. package/skills/a2h-utg-explorer/scripts/run_device.mjs +3 -8
  425. package/skills/a2h-utg-explorer/scripts/schedule_states.mjs +189 -0
  426. package/skills/a2h-utg-explorer/scripts/tests/calendar_round_fixes.test.mjs +9 -0
  427. package/skills/a2h-utg-explorer/scripts/tests/coverage_rules.test.mjs +11 -0
  428. package/skills/a2h-utg-explorer/scripts/tests/d_prereqs.test.mjs +31 -2
  429. package/skills/a2h-utg-explorer/scripts/tests/device_lock_retry.test.mjs +1 -1
  430. package/skills/a2h-utg-explorer/scripts/tests/diagnostics.test.mjs +32 -0
  431. package/skills/a2h-utg-explorer/scripts/tests/dialog_own_layout.test.mjs +40 -0
  432. package/skills/a2h-utg-explorer/scripts/tests/explorer_review_fixes.test.mjs +4 -1
  433. package/skills/a2h-utg-explorer/scripts/tests/hybrid_route.test.mjs +6 -28
  434. package/skills/a2h-utg-explorer/scripts/tests/in_route_surface.test.mjs +125 -0
  435. package/skills/a2h-utg-explorer/scripts/tests/list_probe_target_wait.test.mjs +86 -0
  436. package/skills/a2h-utg-explorer/scripts/tests/multi_host.test.mjs +167 -0
  437. package/skills/a2h-utg-explorer/scripts/tests/nested_list.test.mjs +58 -0
  438. package/skills/a2h-utg-explorer/scripts/tests/overlay_opener.test.mjs +100 -0
  439. package/skills/a2h-utg-explorer/scripts/tests/pipeline.test.mjs +8 -1
  440. package/skills/a2h-utg-explorer/scripts/tests/pr169_review_fixes.test.mjs +1 -0
  441. package/skills/a2h-utg-explorer/scripts/tests/pr191_review_fixes.test.mjs +2 -31
  442. package/skills/a2h-utg-explorer/scripts/tests/review_fixes.test.mjs +1 -1
  443. package/skills/a2h-utg-explorer/scripts/tests/run_cycle.test.mjs +56 -7
  444. package/skills/a2h-utg-explorer/scripts/tests/snapshot_integrity.test.mjs +117 -6
  445. package/skills/a2h-utg-explorer/scripts/tests/state_inventory.test.mjs +414 -0
  446. package/skills/a2h-utg-explorer/scripts/tests/tree_unreliable.test.mjs +197 -0
  447. package/skills/a2h-utg-explorer/scripts/utg_explorer/adapters.mjs +196 -30
  448. package/skills/a2h-utg-explorer/scripts/utg_explorer/hosts.mjs +146 -0
  449. package/skills/a2h-utg-explorer/scripts/utg_explorer/semantics.mjs +63 -2
  450. package/skills/a2h-utg-explorer/scripts/utg_explorer/states.mjs +286 -0
  451. package/skills/a2h-utg-explorer/scripts/utg_explorer/task_runner.mjs +197 -19
  452. package/skills/a2h-utg-static/SKILL.md +3 -3
  453. package/skills/a2h-utg-static/references/extractors.md +7 -0
  454. package/skills/a2h-utg-static/references/ui-elements-static-utg-schema.md +4 -3
  455. package/skills/a2h-utg-static/scripts/click_paths.mjs +1 -1
  456. package/skills/a2h-utg-static/scripts/compose_overlay.mjs +642 -22
  457. package/skills/a2h-utg-static/scripts/tests/test_compose_res_text.mjs +25 -0
  458. package/skills/a2h-utg-static/scripts/tests/test_in_route_surface.mjs +123 -0
  459. package/skills/a2h-utg-static/scripts/tests/test_overlay_host_effects.mjs +239 -0
  460. package/skills/a2h-utg-static/scripts/tests/test_shared_host_depths.mjs +48 -0
  461. package/skills/a2h-utg-static/scripts/utg_html.mjs +2 -0
  462. package/skills/a2h-utg-static/tools/convert_static_utg_to_ui_elements.ts +1 -0
  463. package/i18n/skills/a2h-app-migrate/references/specs.example.json +0 -19
  464. package/i18n/skills/a2h-batch-ui-align/scripts/databinding_analyzer_design.md +0 -79
  465. package/i18n/skills/a2h-utg-explorer/scripts/utg_explorer/state_phase.mjs +0 -47
  466. package/resource/convert_pipeline_process.svg +0 -114
  467. package/resource/project_architecture.svg +0 -120
  468. package/resource/set_environment.png +0 -0
  469. package/resource/set_multimodel.png +0 -0
  470. package/skills/a2h-app-migrate/references/specs.example.json +0 -19
  471. package/skills/a2h-batch-ui-align/scripts/databinding_analyzer_design.md +0 -79
  472. package/skills/a2h-utg-explorer/scripts/utg_explorer/state_phase.mjs +0 -47
@@ -184,9 +184,9 @@
184
184
  | Android XML | HarmonyOS attribute | Type conversion | Code example |
185
185
  |-------------|---------------|---------|---------|
186
186
  | `android:layout_width` | `.width()` | dp → vp / match_parent → '100%' | Android: `android:layout_width="100dp"`<br/>HarmonyOS: `Text('Hello').width(100)` |
187
- | `android:layout_width="match_parent"` | `.width()` | match_parent → '100%' | Android: `android:layout_width="match_parent"`<br/>HarmonyOS: `Text('Hello').width('100%')` |
187
+ | `android:layout_width="match_parent"` | `.width()` | match_parent → '100%' (**only** for XML `match_parent` / Compose `fillMaxWidth()`, whose meaning is "**drive** to the parent's measured width"); when the source construct is Compose `Modifier.matchParentSize()` (follows the parent size, does **not** drive it) do **not** translate it to `.width('100%')` → see the `matchParentSize()` row in §6.2, otherwise it breaks the layout inside a shrink-wrapping `Stack` / `FlexWrap` / horizontal `Scroll`. GATE/CAND `pct-size-in-hugging-or-scroll-parent` | Android: `android:layout_width="match_parent"`<br/>HarmonyOS: `Text('Hello').width('100%')` |
188
188
  | `android:layout_width="wrap_content"` | Not needed | wrap_content → adaptive | Android: `android:layout_width="wrap_content"`<br/>HarmonyOS: not needed; sizes itself automatically |
189
- | `android:layout_height` | `.height()` | dp → vp / match_parent → '100%' | Android: `android:layout_height="50dp"`<br/>HarmonyOS: `Text('Hello').height(50)` |
189
+ | `android:layout_height` | `.height()` | dp → vp / match_parent → '100%' (as above: only `match_parent` / `fillMaxHeight()`; `matchParentSize()` is not translated to `.height('100%')`; inside a vertical Scroll see GATE `percent-height-in-scroll`) | Android: `android:layout_height="50dp"`<br/>HarmonyOS: `Text('Hello').height(50)` |
190
190
  | `android:minWidth` | `.constraintSize()` | dp → vp | Android: `android:minWidth="100dp"`<br/>HarmonyOS: `Text('Hello').constraintSize({ minWidth: 100 })` |
191
191
  | `android:maxWidth` | `.constraintSize()` | dp → vp | Android: `android:maxWidth="200dp"`<br/>HarmonyOS: `Text('Hello').constraintSize({ maxWidth: 200 })` |
192
192
  | `android:minHeight` | `.constraintSize()` | dp → vp | Android: `android:minHeight="30dp"`<br/>HarmonyOS: `Text('Hello').constraintSize({ minHeight: 30 })` |
@@ -292,22 +292,6 @@
292
292
 
293
293
  ---
294
294
 
295
- #### 1.1.6 Text Component Attribute Mapping Statistics
296
-
297
- | Mapping type | Count | Share |
298
- |---------|------|------|
299
- | Direct mapping | 45 | ~50% |
300
- | Needs type conversion | 30 | ~33% |
301
- | Needs composite implementation | 10 | ~11% |
302
- | No direct equivalent | 5 | ~6% |
303
- | **Total** | **90** | **100%** |
304
-
305
- **Mapping complexity:**
306
- - **Direct mapping**: the attribute name and behavior are essentially the same; only minor syntax changes are needed
307
- - **Needs type conversion**: the Android data type must be converted to the corresponding HarmonyOS type (e.g. sp→fp, dp→vp)
308
- - **Needs composite implementation**: several HarmonyOS attributes or components must be combined to reproduce a single Android attribute
309
- - **No direct equivalent**: HarmonyOS has no matching feature yet; implement it yourself or use an alternative
310
-
311
295
  ### 1.2 Button Components
312
296
 
313
297
  | Android component | Class name | HarmonyOS component | Alternative | Notes |
@@ -537,18 +521,6 @@ Button components inherit all common layout attributes; see 1.1.4 (common layout
537
521
 
538
522
  ---
539
523
 
540
- #### 1.2.7 Button Component Attribute Mapping Statistics
541
-
542
- | Mapping type | Count | Share |
543
- |---------|------|------|
544
- | Direct mapping | 20 | ~45% |
545
- | Needs type conversion | 10 | ~23% |
546
- | Needs composite implementation | 10 | ~23% |
547
- | No direct equivalent | 4 | ~9% |
548
- | **Total** | **44** | **100%** |
549
-
550
- ---
551
-
552
524
  ### 1.3 Image Components
553
525
 
554
526
  | Android component | Class name | HarmonyOS component | Alternative | Notes |
@@ -639,6 +611,22 @@ Button components inherit all common layout attributes; see 1.1.4 (common layout
639
611
  | `OnLoadFailedListener` | `.onError()` | listener → callback | Android: `setOnLoadFailedListener(...)`<br/>HarmonyOS: `Image($r('app.media.image')).onError(() => { ... })` |
640
612
  | `OnProgressListener` | No direct equivalent | Needs custom implementation | Use the load progress API |
641
613
 
614
+ **Data-bound images (image loading libraries)**
615
+
616
+ An image whose source is runtime data (a URL / model field) is not an icon: it does not go through the L1–L3 tiers of `cards/resources.md` and maps to `Image(<URL field>)`. Full rules (permission, mock URL, failure cases): `cards/resources.md` "Classify the image source first".
617
+
618
+ | Android | HarmonyOS | Notes |
619
+ |---|---|---|
620
+ | Compose `AsyncImage(model = item.icon)` / `SubcomposeAsyncImage(model = …)` | `Image(this.item.icon)` | `model` being an expression means data-bound; only `R.drawable.x` / `painterResource` / `Icons.*` are assets |
621
+ | Coil `Image(painter = rememberAsyncImagePainter(url))` / `imageView.load(url)` | `Image(url)` | Same |
622
+ | Glide `Glide.with(ctx).load(url).into(iv)` / `GlideImage(model = url)` | `Image(url)` | |
623
+ | Picasso `Picasso.get().load(url).into(iv)` | `Image(url)` | |
624
+ | `contentScale = ContentScale.Crop / Fit / FillBounds / Inside / None` | `.objectFit(ImageFit.Cover / Contain / Fill / ScaleDown / None)` | `AsyncImage` defaults to `Fit`, ArkUI `Image` to `Cover`: write `.objectFit(ImageFit.Contain)` explicitly |
625
+ | `placeholder = painterResource(R.drawable.p)` / Glide `.placeholder(R.drawable.p)` | `.alt($r('app.media.p'))` | No placeholder on Android means none here |
626
+ | `error = …` / Glide `.error(R.drawable.e)` (differs from the placeholder) | `.onError(() => { this.failed = true })` + switch the source to `$r('app.media.e')` | |
627
+ | Network URL | `module.json5` `requestPermissions` holds `ohos.permission.INTERNET` | A concurrent group does not edit `module.json5`; it adds a `shell requests` row to its report |
628
+ | URL field in the mock data | A representative URL with `// TODO(data-layer): mock URL …` above it | **Never an empty string**; an empty placeholder / no `Image` is a failure |
629
+
642
630
  ---
643
631
 
644
632
  **ImageFit enum value mapping**
@@ -688,16 +676,6 @@ Image components inherit all common layout attributes; see 1.1.4 (common layout
688
676
 
689
677
  ---
690
678
 
691
- #### 1.3.5 Image Component Attribute Mapping Statistics
692
-
693
- | Mapping type | Count | Share |
694
- |---------|------|------|
695
- | Direct mapping | 15 | ~40% |
696
- | Needs type conversion | 10 | ~27% |
697
- | Needs composite implementation | 8 | ~22% |
698
- | No direct equivalent | 5 | ~13% |
699
- | **Total** | **38** | **100%** |
700
-
701
679
  ### 1.4 Picker Components
702
680
 
703
681
  | Android component | Class name | HarmonyOS component | Alternative | Notes |
@@ -878,18 +856,6 @@ Image components inherit all common layout attributes; see 1.1.4 (common layout
878
856
 
879
857
  ---
880
858
 
881
- #### 1.4.6 Picker Component Attribute Mapping Statistics
882
-
883
- | Mapping type | Count | Share |
884
- |---------|------|------|
885
- | Direct mapping | 25 | ~45% |
886
- | Needs type conversion | 15 | ~27% |
887
- | Needs composite implementation | 10 | ~18% |
888
- | No direct equivalent | 5 | ~10% |
889
- | **Total** | **55** | **100%** |
890
-
891
- ---
892
-
893
859
  ### 1.5 Progress and Rating Components
894
860
 
895
861
  | Android component | Class name | HarmonyOS component | Alternative | Notes |
@@ -915,7 +881,7 @@ Image components inherit all common layout attributes; see 1.1.4 (common layout
915
881
 
916
882
  | Android XML | HarmonyOS attribute | Type conversion | Code example |
917
883
  |-------------|---------------|---------|---------|
918
- | `android:indeterminate` | Constructor argument | boolean → boolean | Android: `android:indeterminate="true"`<br/>HarmonyOS: `Progress({ value: 0, total: 100, type: ProgressType.Ring })` |
884
+ | `android:indeterminate` | Circular: a fixed Ring arc + endless rotation; linear: see §5.10 | boolean → composed | Android: `android:indeterminate="true"`<br/>HarmonyOS: for a circular indicator use §5.10 "Indeterminate circular progress": `Progress({ value: 25, total: 100, type: ProgressType.Ring })` + an endless `rotate` animation. **Do not** write a Ring with `value: 0`: it draws nothing |
919
885
  | `android:indeterminateOnly` | No direct equivalent | boolean → none | Android: `android:indeterminateOnly="true"`<br/>HarmonyOS: needs custom implementation |
920
886
  | `android:indeterminateDuration` | No direct equivalent | int → none | Android: `android:indeterminateDuration="2000"`<br/>HarmonyOS: needs custom implementation |
921
887
  | `android:indeterminateBehavior` | No direct equivalent | enum → none | Android: `android:indeterminateBehavior="repeat"`<br/>HarmonyOS: needs custom implementation |
@@ -1050,16 +1016,6 @@ Image components inherit all common layout attributes; see 1.1.4 (common layout
1050
1016
 
1051
1017
  ---
1052
1018
 
1053
- #### 1.5.5 Progress and Rating Component Attribute Mapping Statistics
1054
-
1055
- | Mapping type | Count | Share |
1056
- |---------|------|------|
1057
- | Direct mapping | 30 | ~40% |
1058
- | Needs type conversion | 20 | ~27% |
1059
- | Needs composite implementation | 15 | ~20% |
1060
- | No direct equivalent | 10 | ~13% |
1061
- | **Total** | **75** | **100%** |
1062
-
1063
1019
  ### 1.6 Search Components
1064
1020
 
1065
1021
  | Android component | Class name | HarmonyOS component | Alternative | Notes |
@@ -1124,16 +1080,6 @@ Image components inherit all common layout attributes; see 1.1.4 (common layout
1124
1080
 
1125
1081
  ---
1126
1082
 
1127
- #### 1.6.2 Search Component Attribute Mapping Statistics
1128
-
1129
- | Mapping type | Count | Share |
1130
- |---------|------|------|
1131
- | Direct mapping | 10 | ~35% |
1132
- | Needs type conversion | 5 | ~17% |
1133
- | Needs composite implementation | 8 | ~28% |
1134
- | No direct equivalent | 6 | ~20% |
1135
- | **Total** | **29** | **100%** |
1136
-
1137
1083
  ### 1.7 Video and Media Components
1138
1084
 
1139
1085
  | Android component | Class name | HarmonyOS component | Alternative | Notes |
@@ -1277,18 +1223,6 @@ Column() {
1277
1223
 
1278
1224
  ---
1279
1225
 
1280
- #### 1.7.3 Video Component Attribute Mapping Statistics
1281
-
1282
- | Mapping type | Count | Share |
1283
- |---------|------|------|
1284
- | Direct mapping | 10 | ~40% |
1285
- | Needs type conversion | 8 | ~32% |
1286
- | Needs composite implementation | 5 | ~20% |
1287
- | No direct equivalent | 2 | ~8% |
1288
- | **Total** | **25** | **100%** |
1289
-
1290
- ---
1291
-
1292
1226
  ### 1.8 Scrolling Components
1293
1227
 
1294
1228
  | Android component | Class name | HarmonyOS component | Alternative | Notes |
@@ -1360,6 +1294,17 @@ Column() {
1360
1294
  | Parallel | `NestedScrollMode.PARALLEL` | Self and parent scroll together |
1361
1295
  | Automatic | `NestedScrollMode.AUTO` | The system picks the scroll mode |
1362
1296
 
1297
+ **Collapsing toolbar (Collapsing / Large / Medium TopAppBar + scroll behaviour)**
1298
+
1299
+ Material3 `LargeTopAppBar` / `MediumTopAppBar` + `TopAppBarScrollBehavior` (and `CollapsingToolbarLayout`) is **one nested-scroll container**: the title **translates / collapses** with the scroll offset, and the large title gradually moves to the fixed small-title position in the top bar.
1300
+
1301
+ | Compose / Android | HarmonyOS approach | Notes |
1302
+ |---|---|---|
1303
+ | `LargeTopAppBar` / `MediumTopAppBar` + `nestedScrollConnection(scrollBehavior)` | Put the title inside the **same** scrollable region (the head of the `Scroll`/`List`) and drive its Y offset from the scroll offset (`.translate({ y })` / `.offset({ y })` bound to the `onDidScroll` offset), or use `BindSheet` / a head item that scrolls with the list | The title is **part of the scroll content** and translates to its fixed position with the scroll; it is not drawn as a separate layer |
1304
+ | `CollapsingToolbarLayout` `scrimVisibleHeightTrigger` / collapse threshold | Derive the threshold from the difference between content height and viewport, or interpolate continuously with the scroll offset | — |
1305
+
1306
+ **Anti-pattern (caught by GATE/CAND)**: splitting the collapsing toolbar into a "**fixed / sibling header layer + separate Scroll**" and then using the `onDidScroll` scroll fraction to change the large title's `.fontSize()` / `.scale()` / layer height **in place** while fading in another small title. Result: the large title **does not translate with the scroll** (it only scales / fades in place) and is misplaced when scrolling up; and if the collapse amount is **tied to the inner Scroll overflowing**, the collapse **never fires** when the content is shorter than the viewport and the title stays expanded. CAND `collapsing-toolbar-not-nested-scroll`.
1307
+
1363
1308
  **Scroll padding attributes**
1364
1309
 
1365
1310
  | Android XML | HarmonyOS attribute | Type conversion | Code example |
@@ -1448,18 +1393,6 @@ Column() {
1448
1393
 
1449
1394
  ---
1450
1395
 
1451
- #### 1.8.5 Scrolling Component Attribute Mapping Statistics
1452
-
1453
- | Mapping type | Count | Share |
1454
- |---------|------|------|
1455
- | Direct mapping | 15 | ~45% |
1456
- | Needs type conversion | 10 | ~30% |
1457
- | Needs composite implementation | 5 | ~15% |
1458
- | No direct equivalent | 3 | ~10% |
1459
- | **Total** | **33** | **100%** |
1460
-
1461
- ---
1462
-
1463
1396
  ## 2. Layout Container Component Mapping
1464
1397
 
1465
1398
  ### 2.1 Linear Layout
@@ -1545,18 +1478,6 @@ Column() {
1545
1478
 
1546
1479
  ---
1547
1480
 
1548
- #### 2.1.4 LinearLayout Attribute Mapping Statistics
1549
-
1550
- | Mapping type | Count | Share |
1551
- |---------|------|------|
1552
- | Direct mapping | 6 | ~26% |
1553
- | Needs type conversion | 4 | ~17% |
1554
- | Needs composite implementation | 8 | ~35% |
1555
- | No direct equivalent | 5 | ~22% |
1556
- | **Total** | **23** | **100%** |
1557
-
1558
- ---
1559
-
1560
1481
  ### 2.2 Relative Layout
1561
1482
 
1562
1483
  | Android component | Class name | HarmonyOS component | Alternative | Notes |
@@ -1613,18 +1534,6 @@ Column() {
1613
1534
 
1614
1535
  ---
1615
1536
 
1616
- #### 2.2.2 RelativeLayout Attribute Mapping Statistics
1617
-
1618
- | Mapping type | Count | Share |
1619
- |---------|------|------|
1620
- | Direct mapping | 0 | ~0% |
1621
- | Needs type conversion | 0 | ~0% |
1622
- | Needs composite implementation | 17 | ~100% |
1623
- | No direct equivalent | 0 | ~0% |
1624
- | **Total** | **17** | **100%** |
1625
-
1626
- ---
1627
-
1628
1537
  ### 2.3 Frame Layout
1629
1538
 
1630
1539
  | Android component | Class name | HarmonyOS component | Alternative | Notes |
@@ -1653,18 +1562,6 @@ Column() {
1653
1562
 
1654
1563
  ---
1655
1564
 
1656
- #### 2.3.2 FrameLayout Attribute Mapping Statistics
1657
-
1658
- | Mapping type | Count | Share |
1659
- |---------|------|------|
1660
- | Direct mapping | 0 | ~0% |
1661
- | Needs type conversion | 1 | ~6% |
1662
- | Needs composite implementation | 14 | ~88% |
1663
- | No direct equivalent | 1 | ~6% |
1664
- | **Total** | **16** | **100%** |
1665
-
1666
- ---
1667
-
1668
1565
  ### 2.4 Grid and Table Layouts
1669
1566
 
1670
1567
  | Android component | Class name | HarmonyOS component | Alternative | Notes |
@@ -1718,18 +1615,6 @@ Column() {
1718
1615
 
1719
1616
  ---
1720
1617
 
1721
- #### 2.4.2 GridLayout Attribute Mapping Statistics
1722
-
1723
- | Mapping type | Count | Share |
1724
- |---------|------|------|
1725
- | Direct mapping | 2 | ~10% |
1726
- | Needs type conversion | 4 | ~20% |
1727
- | Needs composite implementation | 10 | ~50% |
1728
- | No direct equivalent | 4 | ~20% |
1729
- | **Total** | **20** | **100%** |
1730
-
1731
- ---
1732
-
1733
1618
  ### 2.5 Constraint Layout (ConstraintLayout)
1734
1619
 
1735
1620
  | Android component | Class name | HarmonyOS component | Alternative | Notes |
@@ -1927,18 +1812,6 @@ Column() {
1927
1812
 
1928
1813
  ---
1929
1814
 
1930
- #### 2.5.3 ConstraintLayout Attribute Mapping Statistics
1931
-
1932
- | Mapping type | Count | Share |
1933
- |---------|------|------|
1934
- | Direct mapping | 5 | ~5% |
1935
- | Needs type conversion | 15 | ~15% |
1936
- | Needs composite implementation | 80 | ~80% |
1937
- | No direct equivalent | 0 | ~0% |
1938
- | **Total** | **100** | **100%** |
1939
-
1940
- ---
1941
-
1942
1815
  ### 2.6 Flex Layout
1943
1816
 
1944
1817
  | Android component | Class name | HarmonyOS component | Alternative | Notes |
@@ -2040,18 +1913,6 @@ Column() {
2040
1913
 
2041
1914
  ---
2042
1915
 
2043
- #### 2.6.4 FlexboxLayout Attribute Mapping Statistics
2044
-
2045
- | Mapping type | Count | Share |
2046
- |---------|------|------|------|
2047
- | Direct mapping | 6 | ~15% |
2048
- | Needs type conversion | 4 | ~25% |
2049
- | Needs composite implementation | 8 | ~50% |
2050
- | No direct equivalent | 5 | ~14% |
2051
- | **Total** | **23** | **100%** |
2052
-
2053
- ---
2054
-
2055
1916
  ### 2.7 Coordinator Layout
2056
1917
 
2057
1918
  | Android component | Class name | HarmonyOS component | Alternative | Notes |
@@ -2208,9 +2069,23 @@ Column() {
2208
2069
 
2209
2070
  | Android component | Class name | HarmonyOS component | Alternative | Notes |
2210
2071
  |-------------|------|---------------|---------|------|
2211
- | CircularProgressIndicator | `com.google.android.material.progressindicator.CircularProgressIndicator` | `Progress` (type: CircularProgressType) | Configure the type | Circular progress indicator |
2072
+ | CircularProgressIndicator | `com.google.android.material.progressindicator.CircularProgressIndicator` | determinate: `Progress({ type: ProgressType.Ring })`; indeterminate (`indeterminate="true"`): a fixed Ring arc + endless rotation | Configure the type / composed | Circular progress indicator; indeterminate: see "Indeterminate circular progress" below |
2212
2073
  | LinearProgressIndicator | `com.google.android.material.progressindicator.LinearProgressIndicator` | `Progress` | Configure the type | Linear progress indicator |
2213
2074
 
2075
+ #### Indeterminate circular progress (M3 `CircularProgressIndicator()` without progress / MDC `indeterminate="true"`)
2076
+
2077
+ The M3 indeterminate indicator is **an arc rotating around the ring while its length grows and shrinks**, with no track: 40dp diameter, 4dp stroke, `primary` color, transparent track. ArkUI has no atomic component that matches it exactly, and the two options that look close are both wrong:
2078
+
2079
+ | Candidate | What it actually draws | Usable as the mapping? |
2080
+ |---|---|---|
2081
+ | `LoadingProgress()` | a comet-like dot with a tail running around a ring (default color `#ff666666`) | **No**: a different look; changing color or size does not turn it into a rotating arc |
2082
+ | `Progress({ type: ProgressType.Ring }).style({ status: ProgressStatus.LOADING })` | the system "check for updates" effect (Progress doc, RingStyleOptions.status); the progress value is ignored | **No**: the effect is not a rotating arc |
2083
+ | `Progress({ value: 0, type: ProgressType.Ring })` | an empty ring, nothing drawn | **No** |
2084
+
2085
+ Mapping: a fixed-length arc (Ring, `value` about a quarter of the total) with an endless constant-speed rotation. `rotate` is a universal attribute, and `animateTo` with `iterations: -1` loops forever (FAQ "3D rotating loading effect"). Looping Progress's `value` with `animateTo` **does not work** (FAQ "Progress with animateTo loop animation has no effect"), so it has to be `rotate`, not `value`. M3's growing and shrinking arc length has no atomic equivalent; record it as `degraded` in the report.
2086
+
2087
+ Over an icon (Compose `IconButton { if (loading) CircularProgressIndicator(); Icon(...) }`, e.g. a download button in a list row): use a 48vp `Stack` and put the 40vp arc spinner built with the mapping above and the 24vp icon in it in that order, keeping the Compose stacking order. Make the spinner a component of its own: if its rotation angle lived on the page, it would already be 360 the second time and the animation would not start again.
2088
+
2214
2089
  ### 5.11 Material Sliders and Ranges
2215
2090
 
2216
2091
  | Android component | Class name | HarmonyOS component | Alternative | Notes |
@@ -2269,8 +2144,9 @@ Column() {
2269
2144
  |----------------|--------|---------------|---------|------|
2270
2145
  | Column | `Column()` | `Column` | Direct mapping | Vertical linear layout |
2271
2146
  | Row | `Row()` | `Row` | Direct mapping | Horizontal linear layout |
2272
- | Box | `Box()` | `Stack({ alignContent: Alignment.TopStart })` | Opposite alignment default | Stack layout. Compose `Box` defaults to `contentAlignment = TopStart`, ArkUI `Stack` defaults to `Center`: `Box()` must be written with `alignContent: Alignment.TopStart`, and `Box(contentAlignment = X)` with X. A child's `Modifier.align(X)` must not be translated to the child's `.align(X)` (it has no effect inside a Stack), nor dropped leaving only padding/margin; when X equals the other children's alignment, change the Stack's `alignContent`; otherwise wrap that child in a `Column`/`Row` the same size as the Stack and arranged by X (bottom-pinned: `justifyContent(FlexAlign.End)`), or use `.position`/`.markAnchor`. GATE `stack-bar-default-center` / `stack-overlay-default-center` |
2147
+ | Box | `Box()` | `Stack({ alignContent: Alignment.TopStart })` | Opposite alignment default | Stack layout. Compose `Box` defaults to `contentAlignment = TopStart`, ArkUI `Stack` defaults to `Center`: `Box()` must be written with `alignContent: Alignment.TopStart`, and `Box(contentAlignment = X)` with X. A child's `Modifier.align(X)` must not be translated to the child's `.align(X)` (it has no effect inside a Stack), nor dropped leaving only padding/margin; when X equals the other children's alignment, change the Stack's `alignContent`; otherwise wrap that child in a `Column`/`Row` the same size as the Stack and arranged by X (bottom-pinned: `justifyContent(FlexAlign.End)`), or use `.position`/`.markAnchor`. **Child order is layer order**: in a `Box` a later child draws on top, and `Stack` behaves the same, so the port must keep the source's child order; moving a layer later (for example putting a sticky title row after the content) makes it cover and swallow taps meant for what was on top, even at opacity 0. GATE `stack-bar-default-center` / `stack-overlay-default-center` / `stack-swallows-taps` |
2273
2148
  | Box layering (`Box(Modifier.matchParentSize().background(c))` mask) | `Modifier.matchParentSize()` | `.overlay(@Builder)`, builder root `Column().width('100%').height('100%').backgroundColor(c).hitTestBehavior(HitTestMode.Transparent)` | No colour string | Whole-card mask / greyed-out layer. `overlay(value: string)` is the **mask text** overload (overlay doc): `.overlay('#66FFFFFF')` / `.overlay('transparent')` draws the colour value as text at the top-left corner and paints no mask; `'100%'` inside the overlay builder is relative to the host component (overlay doc example 3). For a conditional mask write `if` inside the builder. GATE `overlay-string-color` |
2149
+ | `Modifier.matchParentSize()` (**any** case: mask, selected-state / alpha background layer, segmented-tab base, chip base) | `Modifier.matchParentSize()` | **Never** translate it to a `.width('100%')` / `.height('100%')` background child | Opposite meaning to `fillMaxWidth()` / `match_parent` | `matchParentSize()` **follows** the parent's measured size and does **not** drive the parent size, whereas ArkUI `.width('100%')` **stretches** an unsized parent (a shrink-wrapping `Stack`, `FlexWrap`, horizontal `Scroll`): a full selected-state / alpha background layer → the chip / segmented tab is stretched to the whole row (one per row); a full-width item in a horizontal scroll → the first item takes the row and the rest are pushed off-screen. Correct approach: bake the fill / selected colour **into the colour** of the container sized by its content (no background child), or for a whole-card mask use the `.overlay(@Builder)` of the previous row. Contrast `fillMaxWidth()` / XML `match_parent` (**drive** to full width) → only then use `.width('100%')`. GATE/CAND `pct-size-in-hugging-or-scroll-parent` |
2274
2150
  | ConstraintLayout | `ConstraintLayout()` | `RelativeContainer` | Partial equivalent | Constraint layout. **The `wrap_content` direction cannot rely on RelativeContainer self-sizing**: when height/width is `"auto"` (API 11+) or `LayoutPolicy.wrapContent` (API 20+) and any child is anchored on `'__container__'` in that direction, the self-sizing does not take effect and the size counts as unset, so the container is stretched inside a Scroll/List (RelativeContainer doc; FAQ faqs-arkui-318). Prefer translating a `wrap_content` card into `Column`/`Row`/`Stack`; when keeping the RelativeContainer, anchor only on siblings in that direction and write `'auto'`, or write the measured size. GATE `relative-container-unsized-in-scroll` |
2275
2151
  | FlowRow | `FlowRow()` | `Flex` (direction: Row) | Flow row layout | Flow row layout |
2276
2152
  | FlowColumn | `FlowColumn()` | `Flex` (direction: Column) | Flow column layout | Flow column layout |
@@ -2296,7 +2172,8 @@ Column() {
2296
2172
  | TopAppBar | `TopAppBar()` / `CenterAlignedTopAppBar()` / `MediumTopAppBar()` / `LargeTopAppBar()` | Custom composite | Row + styling | Top app bar |
2297
2173
  | AlertDialog | `AlertDialog()` | `AlertDialog` | Direct mapping | Alert dialog |
2298
2174
  | DatePicker | `DatePicker()` | `DatePicker` | Direct mapping | Date picker |
2299
- | ProgressIndicator | `CircularProgressIndicator()` / `LinearProgressIndicator()` | `Progress` | Configure the type | Progress indicator |
2175
+ | ProgressIndicator | `CircularProgressIndicator(progress = { p })` / `LinearProgressIndicator(progress = { p })` | `Progress({ value: p * 100, total: 100, type: Ring / Linear })` | Configure the type | Determinate progress indicator |
2176
+ | ProgressIndicator (indeterminate) | `CircularProgressIndicator()` without `progress` | a fixed Ring arc + an endless `rotate` animation (§5.10 "Indeterminate circular progress") | Composed | **Do not** map it to `LoadingProgress`: it looks different |
2300
2177
  | PullRefresh | `PullRefreshIndicator()` | `Refresh` | Direct mapping | Pull to refresh |
2301
2178
  | SwipeToDismiss | `SwipeToDismiss()` | No direct equivalent yet | Drag API + state | Swipe to dismiss |
2302
2179
 
@@ -2304,7 +2181,8 @@ Column() {
2304
2181
 
2305
2182
  | Android Compose | Function name | HarmonyOS component | Alternative | Notes |
2306
2183
  |----------------|--------|---------------|---------|------|
2307
- | AnimatedVisibility | `AnimatedVisibility()` | `transition` + `animateTo` | Animated visibility |
2184
+ | AnimatedVisibility | `AnimatedVisibility()` | `if` + `.transition(TransitionEffect…)`, with the state change inside `animateTo` | Animated visibility. While invisible Compose does not compose the content, so ArkUI must unmount it with `if`; changing only `opacity` leaves the node in the tree and its subtree still takes taps. Conditional composition `if (animValue < 1) { Page() }` is the same: unmount it when the transition ends instead of only taking opacity to 0 (GATE `hidden-layer-children-hit`) |
2185
+ | Whole-page thumbnail (`Box(Modifier.graphicsLayer { scaleX = s; scaleY = s })` around a whole page Composable) | `graphicsLayer` scale | Reuse the converted page component (or its content `@Builder`), lay it out at the source's full size and apply `.scale({ x: s, y: s, centerX: 0, centerY: 0 })` | Do not write a simplified version | City cards, background-edit previews and other "scaled-down full page" views. The source measures at full screen size and then scales, so the thumbnail matches the real page pixel for pixel; a separate look-alike with a title and a few lines of text gets the background, panels and animation wrong. When the reused page is not converted yet, list it under "Uncalibrated items" in the report instead of finishing with a placeholder |
2308
2186
  | AnimatedContent | `AnimatedContent()` | `transition` + `animateTo` | Animated content switching |
2309
2187
  | Crossfade | `Crossfade()` | `animateTo` (opacity) | Crossfade |
2310
2188
  | animateAsState | `animate*AsState()` | `animateTo` | State animation |
@@ -2363,88 +2241,7 @@ Column() {
2363
2241
 
2364
2242
  ---
2365
2243
 
2366
- ## 9. Layout Attribute Mapping (API 20/21)
2367
-
2368
- ### 9.1 Size Attributes
2369
-
2370
- | Android XML | HarmonyOS | Notes | Code example comparison |
2371
- |-------------|-----------|------|-------------|
2372
- | layout_width | width | Width | Android: `android:layout_width="100dp"`<br/>HarmonyOS: `Component().width(100)` |
2373
- | layout_height | height | Height | Android: `android:layout_height="match_parent"`<br/>HarmonyOS: `Component().height('100%')` |
2374
- | minWidth | constraintSize({ minWidth: value }) | Minimum width | Android: `android:minWidth="100dp"`<br/>HarmonyOS: `Component().constraintSize({ minWidth: 100 })` |
2375
- | maxWidth | constraintSize({ maxWidth: value }) | Maximum width | Android: `android:maxWidth="200dp"`<br/>HarmonyOS: `Component().constraintSize({ maxWidth: 200 })` |
2376
- | minHeight | constraintSize({ minHeight: value }) | Minimum height | Android: `android:minHeight="50dp"`<br/>HarmonyOS: `Component().constraintSize({ minHeight: 50 })` |
2377
- | maxHeight | constraintSize({ maxHeight: value }) | Maximum height | Android: `android:maxHeight="300dp"`<br/>HarmonyOS: `Component().constraintSize({ maxHeight: 300 })` |
2378
- | layout_weight | layoutWeight | Layout weight | Android: `android:layout_weight="1"`<br/>HarmonyOS: `Component().layoutWeight(1)` |
2379
-
2380
- ### 9.2 Margin and Padding
2381
-
2382
- | Android XML | HarmonyOS | Notes | Code example comparison |
2383
- |-------------|-----------|------|-------------|
2384
- | layout_margin | margin | Margin | Android: `android:layout_margin="10dp"`<br/>HarmonyOS: `Component().margin(10)` |
2385
- | layout_marginTop | margin({ top: value }) | Top margin | Android: `android:layout_marginTop="10dp"`<br/>HarmonyOS: `Component().margin({ top: 10 })` |
2386
- | layout_marginBottom | margin({ bottom: value }) | Bottom margin | Android: `android:layout_marginBottom="10dp"`<br/>HarmonyOS: `Component().margin({ bottom: 10 })` |
2387
- | layout_marginLeft | margin({ left: value }) | Left margin | Android: `android:layout_marginLeft="10dp"`<br/>HarmonyOS: `Component().margin({ left: 10 })` |
2388
- | layout_marginRight | margin({ right: value }) | Right margin | Android: `android:layout_marginRight="10dp"`<br/>HarmonyOS: `Component().margin({ right: 10 })` |
2389
- | layout_marginStart | margin({ start: value }) | Start margin | Android: `android:layout_marginStart="10dp"`<br/>HarmonyOS: `Component().margin({ start: 10 })` |
2390
- | layout_marginEnd | margin({ end: value }) | End margin | Android: `android:layout_marginEnd="10dp"`<br/>HarmonyOS: `Component().margin({ end: 10 })` |
2391
- | padding | padding | Padding | Android: `android:padding="10dp"`<br/>HarmonyOS: `Component().padding(10)` |
2392
- | paddingTop | padding({ top: value }) | Top padding | Android: `android:paddingTop="10dp"`<br/>HarmonyOS: `Component().padding({ top: 10 })` |
2393
- | paddingBottom | padding({ bottom: value }) | Bottom padding | Android: `android:paddingBottom="10dp"`<br/>HarmonyOS: `Component().padding({ bottom: 10 })` |
2394
-
2395
- ### 9.3 Alignment and Weight
2396
-
2397
- | Android XML | HarmonyOS | Notes | Code example comparison |
2398
- |-------------|-----------|------|-------------|
2399
- | layout_gravity | align / alignSelf | Alignment | Android: `android:layout_gravity="center"`<br/>HarmonyOS: `Component().align(Alignment.Center)` |
2400
- | gravity | textAlign | Text alignment | Android: `android:gravity="center"`<br/>HarmonyOS: `Text().textAlign(TextAlign.Center)` |
2401
- | layout_weight | layoutWeight | Weight | Android: `android:layout_weight="1"`<br/>HarmonyOS: `Component().layoutWeight(1)` |
2402
-
2403
- ### 9.4 Display Attributes
2404
-
2405
- | Android XML | HarmonyOS | Notes | Code example comparison |
2406
- |-------------|-----------|------|-------------|
2407
- | visibility | visibility | Visibility | Android: `android:visibility="gone"`<br/>HarmonyOS: `Component().visibility(Visibility.None)` |
2408
- | alpha | opacity | Opacity | Android: `android:alpha="0.5"`<br/>HarmonyOS: `Component().opacity(0.5)` |
2409
- | background | backgroundColor | Background color | Android: `android:background="#FF0000FF"`<br/>HarmonyOS: `Component().backgroundColor('#FF0000FF')` |
2410
- | background | backgroundImage | Background image | Android: `android:background="@drawable/bg"`<br/>HarmonyOS: `Component().backgroundImage($r('app.media.bg'))` |
2411
- | foreground | No direct equivalent | Foreground image | Android: `android:foreground`<br/>HarmonyOS: no direct equivalent; needs composite implementation |
2412
-
2413
- ### 9.5 Borders and Corner Radius
2414
-
2415
- | Android XML | HarmonyOS | Notes | Code example comparison |
2416
- |-------------|-----------|------|-------------|
2417
- | elevation | shadow | Shadow effect | Android: `android:elevation="10dp"`<br/>HarmonyOS: `Component().shadow({ radius: 10, color: '#80000000', offsetX: 0, offsetY: 5 })` |
2418
- | cardElevation | shadow | Card shadow | Android: Material card attribute<br/>HarmonyOS: `Column().shadow({ radius: 8, color: '#30000000' })` |
2419
-
2420
- ### 9.6 Transform Attributes
2421
-
2422
- | Android XML | HarmonyOS | Notes | Code example comparison |
2423
- |-------------|-----------|------|-------------|
2424
- | rotation | rotate | Rotation angle | Android: `android:rotation="90"`<br/>HarmonyOS: `Component().rotate({ angle: 90 })` |
2425
- | scaleX / scaleY | scale({ x, y }) | Scale | Android: `android:scaleX="1.5"`<br/>HarmonyOS: `Component().scale({ x: 1.5, y: 1 })` |
2426
- | translationX / translationY | translate({ x, y }) | Translation | Android: `android:translationX="100"`<br/>HarmonyOS: `Component().translate({ x: 100 })` |
2427
- | pivotX / pivotY | No direct equivalent | Pivot point | Android: `android:pivotX="0.5"`<br/>HarmonyOS: no direct equivalent |
2428
-
2429
- ### 9.7 Interaction Attributes
2430
-
2431
- | Android XML | HarmonyOS | Notes | Code example comparison |
2432
- |-------------|-----------|------|-------------|
2433
- | clickable | enabled / enabled | Clickable | Android: `android:clickable="true"`<br/>HarmonyOS: `Component().enabled(true)` |
2434
- | focusable | focusable | Focusable | Android: `android:focusable="true"`<br/>HarmonyOS: `Component().focusable(true)` |
2435
- | clickable | enabled / enabled | Enabled | Android: `android:clickable="true"`<br/>HarmonyOS: `Component().enabled(true)` |
2436
-
2437
- ### 9.8 Unit Conversion (API 20/21)
2438
-
2439
- | Android | HarmonyOS | Conversion | Notes |
2440
- |---------|-----------|---------|------|
2441
- | dp | vp | Density-independent pixels | Android: `16dp` ≈ HarmonyOS: `16vp` |
2442
- | sp | fp | Font pixels | Android: `16sp` ≈ HarmonyOS: `16fp` |
2443
- | px | px | Pixels | Android: `16px` = HarmonyOS: `16px` |
2444
-
2445
- ---
2446
-
2447
- ## 10. Android Components with No Direct Equivalent
2244
+ ## 9. Android Components with No Direct Equivalent
2448
2245
 
2449
2246
  The following Android components have no direct equivalent in HarmonyOS ArkUI yet; they need a composite implementation, custom development, or a specific Kit as a substitute:
2450
2247
 
@@ -2477,76 +2274,3 @@ The following Android components have no direct equivalent in HarmonyOS ArkUI ye
2477
2274
  | ViewStub | `android.view.ViewStub` | Conditional rendering + Lazy | Easy | Use if/else + LazyForEach |
2478
2275
  | ViewOutlineProvider | `android.view.ViewOutlineProvider` | clipShape API | Medium | Use the clip common attribute |
2479
2276
  | MotionLayout | `androidx.constraintlayout.motion.widget.MotionLayout` | Combination of animation APIs | Hard | animateTo + transition + state management |
2480
-
2481
- ---
2482
-
2483
- ## 10. Mapping Summary
2484
-
2485
- ### 10.1 Components with Direct Mapping (70+)
2486
-
2487
- Components that can be replaced one-to-one:
2488
- - Basic components: Text, Button, Image, Checkbox, Radio, Slider, Rating, etc.
2489
- - Layout components: Row, Column, Flex, Stack, Grid, List, etc.
2490
- - Pickers: DatePicker, TimePicker, CalendarPicker, Select, etc.
2491
- - Dialogs: AlertDialog, ActionSheet, LoadingDialog, etc.
2492
- - Functional components: Web, Video, Search, Divider, etc.
2493
-
2494
- ### 10.2 Components Needing Composite Implementation (50+)
2495
-
2496
- Android components that need a combination of several HarmonyOS components:
2497
- - ImageButton → Button + Image
2498
- - ImageView with text → Row + Image + Text
2499
- - Material components → container component + style configuration
2500
- - Complex lists → List + ListItemGroup + LazyForEach
2501
-
2502
- ### 10.3 Components Needing Custom Implementation (20+)
2503
-
2504
- Android components that need custom logic or components:
2505
- - CoordinatorLayout and related → complex scroll-coordination logic
2506
- - Material effect components → animation API + state management
2507
- - Notifications/widgets → not supported yet; need an alternative
2508
- - Advanced ConstraintLayout helpers → manual calculation and constraints
2509
-
2510
- ### 10.4 Fully Unsupported Components (5+)
2511
-
2512
- Android components that cannot be implemented on HarmonyOS:
2513
- - Home-screen widget system → HarmonyOS architecture differs
2514
- - Some notification interactions → Notification Kit capabilities are limited
2515
- - Parts of Material MotionLayout → must be implemented manually
2516
-
2517
- ---
2518
-
2519
- ## 11. Migration Advice
2520
-
2521
- ### 11.1 Priority Order
2522
-
2523
- 1. **High priority** (fully supported): basic UI components, layout containers, list components
2524
- 2. **Medium priority** (partially supported): Material components, complex animations, custom layouts
2525
- 3. **Low priority** (not supported yet): widgets, advanced animations, special interactions
2526
-
2527
- ### 11.2 Migration Strategy
2528
-
2529
- 1. **Incremental migration**: migrate basic features first, then handle complex interactions
2530
- 2. **Component downgrade**: Material components can be downgraded to basic components + styling
2531
- 3. **Functional substitution**: replace components with no direct equivalent by a functionally similar combination
2532
- 4. **Custom development**: critical but missing components need a custom implementation
2533
-
2534
- ### 11.3 Notes
2535
-
2536
- 1. HarmonyOS declarative UI is fundamentally different from Android imperative UI
2537
- 2. State management is at the core of HarmonyOS; master decorators such as @State/@Link
2538
- 3. Layout parameters move from XML attributes to chained calls; the syntax differs significantly
2539
- 4. Event handling moves from listeners to callbacks; the programming paradigm differs
2540
- 5. Some advanced features (e.g. MotionLayout, widgets) need an architectural redesign
2541
-
2542
- ---
2543
-
2544
- ## References
2545
-
2546
- 1. **HarmonyOS developer documentation**: https://developer.huawei.com/consumer/cn/doc/harmonyos-guides/
2547
- 2. **Android UI components overview**: https://developer.android.com/develop/ui
2548
- 3. **Material Design 3 specification**: https://m3.material.io/components
2549
-
2550
- ---
2551
-
2552
- *This document is based on Android 14 / Material Design 3 and HarmonyOS NEXT API 20/21 (6.0.0/6.0.1); the latest official documentation is authoritative for specific APIs.*