@buaa_smat/hometrans 0.1.16 → 0.1.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +162 -54
- package/agents/code-reviewer.md +321 -65
- package/agents/logic-coder.md +113 -88
- package/agents/logic-context-builder.md +47 -29
- package/agents/scripts/hmos-precheck/backends/arkts.mjs +567 -0
- package/agents/scripts/hmos-precheck/backends/arkts_diff.mjs +159 -0
- package/agents/scripts/hmos-precheck/backends/arkts_project_rules.mjs +398 -0
- package/agents/scripts/hmos-precheck/backends/codelinter.mjs +250 -0
- package/agents/scripts/hmos-precheck/backends/project_integrity.mjs +321 -0
- package/agents/scripts/hmos-precheck/backends/static_precheck.mjs +247 -0
- package/agents/scripts/hmos-precheck/core/config.mjs +184 -0
- package/agents/scripts/hmos-precheck/core/diagnostic_scope.mjs +20 -0
- package/agents/scripts/hmos-precheck/core/process_adapter.mjs +47 -0
- package/agents/scripts/hmos-precheck/core/project_catalog.mjs +50 -0
- package/agents/scripts/hmos-precheck/core/result_projection.mjs +147 -0
- package/agents/scripts/hmos-precheck/core/scope_plan.mjs +131 -0
- package/agents/scripts/hmos-precheck/core/sdk_context.mjs +67 -0
- package/agents/scripts/hmos-precheck/docs/architecture.md +37 -0
- package/agents/scripts/hmos-precheck/docs/performance-optimization.md +28 -0
- package/agents/scripts/hmos-precheck/docs/upstream-reference.json +19 -0
- package/agents/scripts/hmos-precheck/docs/validation.md +50 -0
- package/agents/scripts/hmos-precheck/index.mjs +17 -0
- package/agents/scripts/hmos-precheck/invocation.mjs +231 -0
- package/agents/scripts/hmos-precheck/rules/rule_case_matrix.csv +32 -0
- package/agents/scripts/hmos-precheck/rules/rule_inventory.csv +64 -0
- package/agents/scripts/hmos-precheck/rules/rule_inventory.mjs +59 -0
- package/agents/scripts/hmos-precheck/rules/rule_policy.mjs +54 -0
- package/agents/scripts/platform_query.mjs +626 -0
- package/agents/scripts/platform_query.test.mjs +422 -0
- package/agents/self-test-fixer.md +36 -34
- package/agents/self-tester.md +123 -143
- package/agents/test-case-generation-generator.md +317 -0
- package/agents/test-case-generation-validator.md +231 -0
- package/dist/cli/config-store.js +16 -63
- package/dist/cli/env-vars.js +1 -3
- package/dist/cli/index.js +0 -11
- package/dist/cli/init.js +127 -144
- package/dist/cli/uninstall.js +76 -110
- package/dist/utils/regex.js +8 -0
- package/env-requirements.json +55 -54
- package/package.json +6 -6
- package/resource/convert_pipeline_process.svg +103 -0
- package/resource/project_architecture.svg +122 -0
- package/resource/title_dark.png +0 -0
- package/skills/hmos-batch-ui-align/SKILL.md +345 -41
- package/skills/hmos-batch-ui-align/references/conversion-procedure.md +661 -180
- package/skills/hmos-batch-ui-align/references/mappings/android-to-harmonyOS-ui-atomic-component-mapping-reference.md +2533 -2533
- package/skills/hmos-batch-ui-align/references/mappings/android-to-harmonyOS-ui-interaction-mapping-reference.md +555 -555
- package/skills/hmos-batch-ui-align/references/mappings/android-to-harmonyOS-ui-layout-mapping-reference.md +117 -117
- package/skills/hmos-batch-ui-align/references/mvvm/@Link/350/243/205/351/245/260/345/231/250/357/274/232/347/210/266/345/255/220/345/217/214/345/220/221/345/220/214/346/255/245.md +648 -648
- package/skills/hmos-batch-ui-align/references/mvvm/@Observed/350/243/205/351/245/260/345/231/250/345/222/214@ObjectLink/350/243/205/351/245/260/345/231/250/357/274/232/345/265/214/345/245/227/347/261/273/345/257/271/350/261/241/345/261/236/346/200/247/345/217/230/345/214/226.md +2088 -2088
- package/skills/hmos-batch-ui-align/references/mvvm/@Prop/350/243/205/351/245/260/345/231/250/357/274/232/347/210/266/345/255/220/345/215/225/345/220/221/345/220/214/346/255/245.md +1033 -1033
- package/skills/hmos-batch-ui-align/references/mvvm/@Provide/350/243/205/351/245/260/345/231/250/345/222/214@Consume/350/243/205/351/245/260/345/231/250/357/274/232/344/270/216/345/220/216/344/273/243/347/273/204/344/273/266/345/217/214/345/220/221/345/220/214/346/255/245.md +1183 -1183
- package/skills/hmos-batch-ui-align/references/mvvm/@State/350/243/205/351/245/260/345/231/250/357/274/232/347/273/204/344/273/266/345/206/205/347/212/266/346/200/201.md +576 -576
- package/skills/hmos-batch-ui-align/references/mvvm/@Track/350/243/205/351/245/260/345/231/250/357/274/232class/345/257/271/350/261/241/345/261/236/346/200/247/347/272/247/346/233/264/346/226/260.md +297 -297
- package/skills/hmos-batch-ui-align/references/mvvm/@Watch/350/243/205/351/245/260/345/231/250/357/274/232/347/212/266/346/200/201/345/217/230/351/207/217/346/233/264/346/224/271/351/200/232/347/237/245.md +395 -395
- package/skills/hmos-batch-ui-align/references/mvvm/AppStorage/357/274/232/345/272/224/347/224/250/345/205/250/345/261/200/347/232/204UI/347/212/266/346/200/201/345/255/230/345/202/250.md +902 -902
- package/skills/hmos-batch-ui-align/references/mvvm/Environment/357/274/232/350/256/276/345/244/207/347/216/257/345/242/203/346/237/245/350/257/242.md +106 -106
- package/skills/hmos-batch-ui-align/references/mvvm/LocalStorage/357/274/232/351/241/265/351/235/242/347/272/247UI/347/212/266/346/200/201/345/255/230/345/202/250.md +1178 -1178
- package/skills/hmos-batch-ui-align/references/mvvm/MVVM/346/250/241/345/274/217/357/274/210V1/357/274/211.md +911 -911
- package/skills/hmos-batch-ui-align/references/mvvm/PersistentStorage/357/274/232/346/214/201/344/271/205/345/214/226/345/255/230/345/202/250UI/347/212/266/346/200/201.md +354 -354
- package/skills/hmos-batch-ui-align/references/mvvm//347/256/241/347/220/206/345/272/224/347/224/250/346/213/245/346/234/211/347/232/204/347/212/266/346/200/201/346/246/202/350/277/260.md +11 -11
- package/skills/hmos-batch-ui-align/references/mvvm-v2/!!/350/257/255/346/263/225/357/274/232/345/217/214/345/220/221/347/273/221/345/256/232.md +206 -0
- package/skills/hmos-batch-ui-align/references/mvvm-v2/@Computed/350/243/205/351/245/260/345/231/250/357/274/232/350/256/241/347/256/227/345/261/236/346/200/247.md +373 -0
- package/skills/hmos-batch-ui-align/references/mvvm-v2/@Event/350/243/205/351/245/260/345/231/250/357/274/232/350/247/204/350/214/203/347/273/204/344/273/266/350/276/223/345/207/272.md +158 -0
- package/skills/hmos-batch-ui-align/references/mvvm-v2/@Local/350/243/205/351/245/260/345/231/250/357/274/232/347/273/204/344/273/266/345/206/205/351/203/250/347/212/266/346/200/201.md +750 -0
- package/skills/hmos-batch-ui-align/references/mvvm-v2/@Monitor/350/243/205/351/245/260/345/231/250/357/274/232/347/212/266/346/200/201/345/217/230/351/207/217/344/277/256/346/224/271/345/274/202/346/255/245/347/233/221/345/220/254.md +1704 -0
- package/skills/hmos-batch-ui-align/references/mvvm-v2/@ObservedV2/350/243/205/351/245/260/345/231/250/345/222/214@Trace/350/243/205/351/245/260/345/231/250/357/274/232/347/261/273/345/261/236/346/200/247/345/217/230/345/214/226/350/247/202/346/265/213.md +1012 -0
- package/skills/hmos-batch-ui-align/references/mvvm-v2/@Once/350/243/205/351/245/260/345/231/250/357/274/232/345/210/235/345/247/213/345/214/226/345/220/214/346/255/245/344/270/200/346/254/241.md +164 -0
- package/skills/hmos-batch-ui-align/references/mvvm-v2/@Param/350/243/205/351/245/260/345/231/250/357/274/232/347/273/204/344/273/266/345/244/226/351/203/250/350/276/223/345/205/245.md +840 -0
- package/skills/hmos-batch-ui-align/references/mvvm-v2/@Provider/350/243/205/351/245/260/345/231/250/345/222/214@Consumer/350/243/205/351/245/260/345/231/250/357/274/232/350/267/250/347/273/204/344/273/266/345/261/202/347/272/247/345/217/214/345/220/221/345/220/214/346/255/245.md +856 -0
- package/skills/hmos-batch-ui-align/references/mvvm-v2/@Type/350/243/205/351/245/260/345/231/250/357/274/232/346/240/207/350/256/260/347/261/273/345/261/236/346/200/247/347/232/204/347/261/273/345/236/213.md +83 -0
- package/skills/hmos-batch-ui-align/references/mvvm-v2/AppStorageV2/357/274/232/345/272/224/347/224/250/345/205/250/345/261/200UI/347/212/266/346/200/201/345/255/230/345/202/250.md +294 -0
- package/skills/hmos-batch-ui-align/references/mvvm-v2/MVVM/346/250/241/345/274/217/357/274/210V2/357/274/211.md +1407 -0
- package/skills/hmos-batch-ui-align/references/mvvm-v2/PersistenceV2/357/274/232/346/214/201/344/271/205/345/214/226/345/255/230/345/202/250UI/347/212/266/346/200/201.md +1220 -0
- package/skills/hmos-batch-ui-align/references/mvvm-v2/_/350/214/203/345/274/217/351/200/211/346/213/251/350/257/264/346/230/216.md +47 -0
- package/skills/hmos-batch-ui-align/references/mvvm-v2/_/350/243/205/351/245/260/345/231/250/351/200/237/346/237/245.md +133 -0
- package/skills/hmos-batch-ui-align/references/mvvm-v2//347/212/266/346/200/201/347/256/241/347/220/206V1/345/220/221V2/350/277/201/347/247/273/344/270/216/346/267/267/347/224/250/346/214/207/345/257/274.md +840 -0
- package/skills/hmos-batch-ui-align/scripts/android_parse_fast.ts +1798 -0
- package/skills/hmos-batch-ui-align/scripts/arkts_static_check.ts +1592 -0
- package/skills/hmos-batch-ui-align/scripts/measure_pack.ts +752 -0
- package/skills/hmos-convert-pipeline/SKILL.md +168 -121
- package/skills/hmos-fix-build-errors/SKILL.md +87 -67
- package/skills/hmos-fix-build-errors/references/arkts-strict-patterns.md +219 -219
- package/skills/hmos-fix-build-errors/references/known-patterns.md +157 -157
- package/skills/hmos-fix-build-errors/references/rdb-entity-pattern.md +131 -131
- package/skills/hmos-incremental-ui-align/README.md +53 -36
- package/skills/hmos-incremental-ui-align/SKILL.md +179 -23
- package/skills/hmos-incremental-ui-align/diff_analysis.md +52 -52
- package/skills/hmos-incremental-ui-align/page_align.md +62 -62
- package/skills/hmos-incremental-ui-align/references/Comparison_Template.md +38 -2
- package/skills/hmos-incremental-ui-align/references/MVVM/345/274/200/345/217/221/346/226/207/346/241/243/@Link/350/243/205/351/245/260/345/231/250/357/274/232/347/210/266/345/255/220/345/217/214/345/220/221/345/220/214/346/255/245.md +648 -648
- package/skills/hmos-incremental-ui-align/references/MVVM/345/274/200/345/217/221/346/226/207/346/241/243/@Observed/350/243/205/351/245/260/345/231/250/345/222/214@ObjectLink/350/243/205/351/245/260/345/231/250/357/274/232/345/265/214/345/245/227/347/261/273/345/257/271/350/261/241/345/261/236/346/200/247/345/217/230/345/214/226.md +2088 -2088
- package/skills/hmos-incremental-ui-align/references/MVVM/345/274/200/345/217/221/346/226/207/346/241/243/@Prop/350/243/205/351/245/260/345/231/250/357/274/232/347/210/266/345/255/220/345/215/225/345/220/221/345/220/214/346/255/245.md +1033 -1033
- package/skills/hmos-incremental-ui-align/references/MVVM/345/274/200/345/217/221/346/226/207/346/241/243/@Provide/350/243/205/351/245/260/345/231/250/345/222/214@Consume/350/243/205/351/245/260/345/231/250/357/274/232/344/270/216/345/220/216/344/273/243/347/273/204/344/273/266/345/217/214/345/220/221/345/220/214/346/255/245.md +1183 -1183
- package/skills/hmos-incremental-ui-align/references/MVVM/345/274/200/345/217/221/346/226/207/346/241/243/@State/350/243/205/351/245/260/345/231/250/357/274/232/347/273/204/344/273/266/345/206/205/347/212/266/346/200/201.md +576 -576
- package/skills/hmos-incremental-ui-align/references/MVVM/345/274/200/345/217/221/346/226/207/346/241/243/@Track/350/243/205/351/245/260/345/231/250/357/274/232class/345/257/271/350/261/241/345/261/236/346/200/247/347/272/247/346/233/264/346/226/260.md +297 -297
- package/skills/hmos-incremental-ui-align/references/MVVM/345/274/200/345/217/221/346/226/207/346/241/243/@Watch/350/243/205/351/245/260/345/231/250/357/274/232/347/212/266/346/200/201/345/217/230/351/207/217/346/233/264/346/224/271/351/200/232/347/237/245.md +395 -395
- package/skills/hmos-incremental-ui-align/references/MVVM/345/274/200/345/217/221/346/226/207/346/241/243/AppStorage/357/274/232/345/272/224/347/224/250/345/205/250/345/261/200/347/232/204UI/347/212/266/346/200/201/345/255/230/345/202/250.md +902 -902
- package/skills/hmos-incremental-ui-align/references/MVVM/345/274/200/345/217/221/346/226/207/346/241/243/Environment/357/274/232/350/256/276/345/244/207/347/216/257/345/242/203/346/237/245/350/257/242.md +106 -106
- package/skills/hmos-incremental-ui-align/references/MVVM/345/274/200/345/217/221/346/226/207/346/241/243/LocalStorage/357/274/232/351/241/265/351/235/242/347/272/247UI/347/212/266/346/200/201/345/255/230/345/202/250.md +1178 -1178
- package/skills/hmos-incremental-ui-align/references/MVVM/345/274/200/345/217/221/346/226/207/346/241/243/MVVM/346/250/241/345/274/217V1.md +911 -911
- package/skills/hmos-incremental-ui-align/references/MVVM/345/274/200/345/217/221/346/226/207/346/241/243/PersistentStorage/357/274/232/346/214/201/344/271/205/345/214/226/345/255/230/345/202/250UI/347/212/266/346/200/201.md +354 -354
- package/skills/hmos-incremental-ui-align/references/MVVM/345/274/200/345/217/221/346/226/207/346/241/243//347/256/241/347/220/206/345/272/224/347/224/250/346/213/245/346/234/211/347/232/204/347/212/266/346/200/201/346/246/202/350/277/260.md +11 -11
- package/skills/hmos-incremental-ui-align/references/MVVM/345/274/200/345/217/221/346/226/207/346/241/243V2/!!/350/257/255/346/263/225/357/274/232/345/217/214/345/220/221/347/273/221/345/256/232.md +206 -0
- package/skills/hmos-incremental-ui-align/references/MVVM/345/274/200/345/217/221/346/226/207/346/241/243V2/@Computed/350/243/205/351/245/260/345/231/250/357/274/232/350/256/241/347/256/227/345/261/236/346/200/247.md +373 -0
- package/skills/hmos-incremental-ui-align/references/MVVM/345/274/200/345/217/221/346/226/207/346/241/243V2/@Event/350/243/205/351/245/260/345/231/250/357/274/232/350/247/204/350/214/203/347/273/204/344/273/266/350/276/223/345/207/272.md +158 -0
- package/skills/hmos-incremental-ui-align/references/MVVM/345/274/200/345/217/221/346/226/207/346/241/243V2/@Local/350/243/205/351/245/260/345/231/250/357/274/232/347/273/204/344/273/266/345/206/205/351/203/250/347/212/266/346/200/201.md +750 -0
- package/skills/hmos-incremental-ui-align/references/MVVM/345/274/200/345/217/221/346/226/207/346/241/243V2/@Monitor/350/243/205/351/245/260/345/231/250/357/274/232/347/212/266/346/200/201/345/217/230/351/207/217/344/277/256/346/224/271/345/274/202/346/255/245/347/233/221/345/220/254.md +1704 -0
- package/skills/hmos-incremental-ui-align/references/MVVM/345/274/200/345/217/221/346/226/207/346/241/243V2/@ObservedV2/350/243/205/351/245/260/345/231/250/345/222/214@Trace/350/243/205/351/245/260/345/231/250/357/274/232/347/261/273/345/261/236/346/200/247/345/217/230/345/214/226/350/247/202/346/265/213.md +1012 -0
- package/skills/hmos-incremental-ui-align/references/MVVM/345/274/200/345/217/221/346/226/207/346/241/243V2/@Once/350/243/205/351/245/260/345/231/250/357/274/232/345/210/235/345/247/213/345/214/226/345/220/214/346/255/245/344/270/200/346/254/241.md +164 -0
- package/skills/hmos-incremental-ui-align/references/MVVM/345/274/200/345/217/221/346/226/207/346/241/243V2/@Param/350/243/205/351/245/260/345/231/250/357/274/232/347/273/204/344/273/266/345/244/226/351/203/250/350/276/223/345/205/245.md +840 -0
- package/skills/hmos-incremental-ui-align/references/MVVM/345/274/200/345/217/221/346/226/207/346/241/243V2/@Provider/350/243/205/351/245/260/345/231/250/345/222/214@Consumer/350/243/205/351/245/260/345/231/250/357/274/232/350/267/250/347/273/204/344/273/266/345/261/202/347/272/247/345/217/214/345/220/221/345/220/214/346/255/245.md +856 -0
- package/skills/hmos-incremental-ui-align/references/MVVM/345/274/200/345/217/221/346/226/207/346/241/243V2/@Type/350/243/205/351/245/260/345/231/250/357/274/232/346/240/207/350/256/260/347/261/273/345/261/236/346/200/247/347/232/204/347/261/273/345/236/213.md +83 -0
- package/skills/hmos-incremental-ui-align/references/MVVM/345/274/200/345/217/221/346/226/207/346/241/243V2/AppStorageV2/357/274/232/345/272/224/347/224/250/345/205/250/345/261/200UI/347/212/266/346/200/201/345/255/230/345/202/250.md +294 -0
- package/skills/hmos-incremental-ui-align/references/MVVM/345/274/200/345/217/221/346/226/207/346/241/243V2/MVVM/346/250/241/345/274/217/357/274/210V2/357/274/211.md +1407 -0
- package/skills/hmos-incremental-ui-align/references/MVVM/345/274/200/345/217/221/346/226/207/346/241/243V2/PersistenceV2/357/274/232/346/214/201/344/271/205/345/214/226/345/255/230/345/202/250UI/347/212/266/346/200/201.md +1220 -0
- package/skills/hmos-incremental-ui-align/references/MVVM/345/274/200/345/217/221/346/226/207/346/241/243V2/_/350/214/203/345/274/217/351/200/211/346/213/251/350/257/264/346/230/216.md +47 -0
- package/skills/hmos-incremental-ui-align/references/MVVM/345/274/200/345/217/221/346/226/207/346/241/243V2//347/212/266/346/200/201/347/256/241/347/220/206V1/345/220/221V2/350/277/201/347/247/273/344/270/216/346/267/267/347/224/250/346/214/207/345/257/274.md +840 -0
- package/skills/hmos-incremental-ui-align/references/State_Model_Template.md +74 -0
- package/skills/hmos-incremental-ui-align/references/UI_Analysis_Template.md +34 -4
- package/skills/hmos-incremental-ui-align/references/android-to-harmonyOS-ui-atomic-component-mapping-reference.md +2533 -2533
- package/skills/hmos-incremental-ui-align/references/android-to-harmonyOS-ui-interaction-mapping-reference.md +555 -555
- package/skills/hmos-incremental-ui-align/references/android-to-harmonyOS-ui-layout-mapping-reference.md +117 -117
- package/skills/hmos-incremental-ui-align/scripts/app_feature_verify.ts +937 -0
- package/skills/hmos-incremental-ui-align/scripts/extract_checklist.ts +343 -0
- package/skills/hmos-incremental-ui-align/scripts/navigation-capure.md +44 -5
- package/skills/hmos-incremental-ui-align/scripts/page_capture.ts +977 -0
- package/skills/hmos-incremental-ui-align/scripts/page_capture_burst.ts +188 -0
- package/skills/hmos-integration-test/README.md +61 -70
- package/skills/hmos-integration-test/SKILL.md +128 -111
- package/skills/hmos-resources-convert/SKILL.md +334 -66
- package/skills/hmos-resources-convert/references/code-vector-icon-rules.md +335 -0
- package/skills/hmos-resources-convert/references/conversion-rules.md +676 -663
- package/skills/hmos-resources-convert/references/dependency-analysis-rules.md +410 -388
- package/skills/hmos-resources-convert/references/lottie-conversion-rules.md +219 -0
- package/skills/hmos-resources-convert/references/resource-mapping-rules.md +482 -457
- package/skills/hmos-resources-convert/references/xml-drawable-to-svg-rules.md +592 -513
- package/skills/hmos-resources-convert/scripts/a2h_resource_convert.ts +2163 -0
- package/skills/hmos-resources-convert/scripts/code_vector_icons.ts +591 -0
- package/skills/hmos-resources-convert/scripts/svg_fidelity_check.ts +632 -0
- package/skills/hmos-spec-generate/SKILL.md +293 -214
- package/skills/hmos-spec-generate/scripts/parse_requirements.ts +515 -0
- package/skills/hmos-spec-generate/template/REQ.txt +22 -0
- package/skills/hmos-spec-generate/template/REQ.xlsx +0 -0
- package/skills/hmos-test-case-generation/README.md +241 -0
- package/skills/hmos-test-case-generation/SKILL.md +324 -0
- package/skills/hmos-test-case-generation/references/contract.md +315 -0
- package/skills/hmos-test-case-generation/references/review-notes-template.md +84 -0
- package/skills/hmos-test-case-generation/references/ui-elements-schema.md +142 -0
- package/skills/hmos-test-case-generation/tools/convert_to_ui_elements.ts +550 -0
- package/skills/hmos-test-case-generation/tools/validate.ts +1312 -0
- package/tools/bfs-crawl/README.md +73 -0
- package/tools/bfs-crawl/android_viewtree_bfs_crawler.ts +1662 -0
- package/tools/test-tools/autotest/config.ts +175 -0
- package/tools/test-tools/autotest/deps/autotest-agent-0.1.1.tgz +0 -0
- package/tools/test-tools/autotest/docs/README.md +266 -0
- package/tools/test-tools/autotest/{testcases_schema.md → docs/testcases_schema.md} +1 -1
- package/tools/test-tools/autotest/engine/batch-launcher.ts +327 -0
- package/tools/test-tools/autotest/engine/report-tool.ts +773 -0
- package/tools/test-tools/autotest/engine/self-test-runner.ts +961 -0
- package/tools/test-tools/autotest/engine/testcases-tool.ts +246 -0
- package/tools/test-tools/autotest/paths.ts +41 -0
- package/tools/test-tools/autotest/resolve-metadata-tool.ts +143 -0
- package/tools/test-tools/autotest/runner/logger.ts +45 -0
- package/tools/test-tools/autotest/runner/process-utils.ts +41 -0
- package/tools/test-tools/autotest/validate.ts +167 -0
- package/agents/build-fixer.md +0 -385
- package/agents/logic-coder/scripts/platform_context_query.py +0 -568
- package/agents/review-fixer.md +0 -405
- package/agents/spec-generator.md +0 -541
- package/dist/cli/mcp-setup.js +0 -258
- package/dist/cli/mcp.js +0 -94
- package/dist/context/index.js +0 -694
- package/resource/migration_process.svg +0 -94
- package/resource/migration_process_transparent.svg +0 -93
- package/skills/hmos-batch-ui-align/scripts/android_parse_fast.py +0 -1606
- package/skills/hmos-incremental-ui-align/scripts/__pycache__/app_feature_verify.cpython-314.pyc +0 -0
- package/skills/hmos-incremental-ui-align/scripts/app_feature_verify.py +0 -542
- package/skills/hmos-incremental-ui-align/scripts/page_capture.py +0 -597
- package/skills/hmos-resources-convert/evals/evals.json +0 -171
- package/skills/hmos-resources-convert/template/AppScope/app.json5 +0 -10
- package/skills/hmos-resources-convert/template/AppScope/resources/base/element/string.json +0 -8
- package/skills/hmos-resources-convert/template/AppScope/resources/base/media/background.png +0 -0
- package/skills/hmos-resources-convert/template/AppScope/resources/base/media/foreground.png +0 -0
- package/skills/hmos-resources-convert/template/AppScope/resources/base/media/layered_image.json +0 -7
- package/skills/hmos-resources-convert/template/build-profile.json5 +0 -42
- package/skills/hmos-resources-convert/template/code-linter.json5 +0 -32
- package/skills/hmos-resources-convert/template/entry/build-profile.json5 +0 -33
- package/skills/hmos-resources-convert/template/entry/hvigorfile.ts +0 -6
- package/skills/hmos-resources-convert/template/entry/obfuscation-rules.txt +0 -23
- package/skills/hmos-resources-convert/template/entry/oh-package.json5 +0 -10
- package/skills/hmos-resources-convert/template/entry/src/main/ets/entryability/EntryAbility.ets +0 -48
- package/skills/hmos-resources-convert/template/entry/src/main/ets/entrybackupability/EntryBackupAbility.ets +0 -16
- package/skills/hmos-resources-convert/template/entry/src/main/ets/pages/Index.ets +0 -23
- package/skills/hmos-resources-convert/template/entry/src/main/module.json5 +0 -55
- package/skills/hmos-resources-convert/template/entry/src/main/resources/base/element/color.json +0 -8
- package/skills/hmos-resources-convert/template/entry/src/main/resources/base/element/float.json +0 -8
- package/skills/hmos-resources-convert/template/entry/src/main/resources/base/element/string.json +0 -16
- package/skills/hmos-resources-convert/template/entry/src/main/resources/base/media/background.png +0 -0
- package/skills/hmos-resources-convert/template/entry/src/main/resources/base/media/foreground.png +0 -0
- package/skills/hmos-resources-convert/template/entry/src/main/resources/base/media/layered_image.json +0 -7
- package/skills/hmos-resources-convert/template/entry/src/main/resources/base/media/startIcon.png +0 -0
- package/skills/hmos-resources-convert/template/entry/src/main/resources/base/profile/backup_config.json +0 -3
- package/skills/hmos-resources-convert/template/entry/src/main/resources/base/profile/main_pages.json +0 -5
- package/skills/hmos-resources-convert/template/entry/src/main/resources/dark/element/color.json +0 -8
- package/skills/hmos-resources-convert/template/entry/src/mock/mock-config.json5 +0 -2
- package/skills/hmos-resources-convert/template/entry/src/ohosTest/ets/test/Ability.test.ets +0 -35
- package/skills/hmos-resources-convert/template/entry/src/ohosTest/ets/test/List.test.ets +0 -5
- package/skills/hmos-resources-convert/template/entry/src/ohosTest/module.json5 +0 -16
- package/skills/hmos-resources-convert/template/entry/src/test/List.test.ets +0 -5
- package/skills/hmos-resources-convert/template/entry/src/test/LocalUnit.test.ets +0 -33
- package/skills/hmos-resources-convert/template/hvigor/hvigor-config.json5 +0 -23
- package/skills/hmos-resources-convert/template/hvigorfile.ts +0 -6
- package/skills/hmos-resources-convert/template/oh-package-lock.json5 +0 -28
- package/skills/hmos-resources-convert/template/oh-package.json5 +0 -10
- package/skills/hmos-resources-convert/tools/apktool.bat +0 -85
- package/skills/hmos-resources-convert/tools/apktool_3.0.1.jar +0 -0
- package/skills/hmos-spec-generate/references/android-platform-tokens.md +0 -105
- package/skills/hmos-spec-generate/references/spec-sample-1.md +0 -78
- package/skills/hmos-spec-generate/references/spec-sample-2.md +0 -58
- package/skills/hmos-spec-generate/references/spec-sample-3.md +0 -116
- package/skills/hmos-spec-generate/references/step4-report-template.md +0 -33
- package/tools/test-tools/autotest/README.md +0 -238
- package/tools/test-tools/autotest/pyproject.toml +0 -26
- package/tools/test-tools/autotest/report_tool.py +0 -759
- package/tools/test-tools/autotest/self_test_runner.py +0 -895
- package/tools/test-tools/autotest/testcases_tool.py +0 -215
- package/tools/test-tools/autotest/uv.lock +0 -3156
- package/tools/test-tools/harmony_autotest-0.1.0-py3-none-any.whl +0 -0
- package/tools/test-tools/hypium-6.1.0.210-py3-none-any.whl +0 -0
- package/tools/test-tools/hypium_mcp-0.6.5-py3-none-any.whl +0 -0
- package/tools/test-tools/xdevice-6.1.0.210-py3-none-any.whl +0 -0
- package/tools/test-tools/xdevice_devicetest-6.1.0.210-py3-none-any.whl +0 -0
- package/tools/test-tools/xdevice_ohos-6.1.0.210-py3-none-any.whl +0 -0
|
@@ -0,0 +1,219 @@
|
|
|
1
|
+
# Android to HarmonyOS Lottie Animation Conversion Rules
|
|
2
|
+
|
|
3
|
+
This document defines how to migrate Lottie animation resources from an Android project to a HarmonyOS project that uses `@ohos/lottie`. Read this before converting any Lottie animation. Every Lottie resource observed during conversion must produce an inventory row and a mapping row per the rules in `references/resource-mapping-rules.md`.
|
|
4
|
+
|
|
5
|
+
## Table of Contents
|
|
6
|
+
1. [Scope and Runtime Context](#scope-and-runtime-context)
|
|
7
|
+
2. [How to Identify a Lottie JSON File](#how-to-identify-a-lottie-json-file)
|
|
8
|
+
3. [Source Locations in an Android Project](#source-locations-in-an-android-project)
|
|
9
|
+
4. [Target Path in the HarmonyOS Project](#target-path-in-the-harmonyos-project)
|
|
10
|
+
5. [Filename Normalization](#filename-normalization)
|
|
11
|
+
6. [Extracting Lottie References from Android Code](#extracting-lottie-references-from-android-code)
|
|
12
|
+
7. [Binding Each Lottie JSON to a HarmonyOS Page](#binding-each-lottie-json-to-a-harmonyos-page)
|
|
13
|
+
8. [Unmappable / Deferred Cases](#unmappable--deferred-cases)
|
|
14
|
+
9. [Report and Mapping Requirements](#report-and-mapping-requirements)
|
|
15
|
+
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
## Scope and Runtime Context
|
|
19
|
+
|
|
20
|
+
On HarmonyOS the animation library is `@ohos/lottie` (installed via `ohpm install @ohos/lottie`). The JSON files are consumed at runtime via `lottie.loadAnimation({ path: 'lottie/animation.json', ... })`, where `path` is resolved under `entry/src/main/resources/rawfile/`. This skill handles **only** the JSON asset migration and its reference bookkeeping — it does NOT generate ArkTS UI code. The developer rewrites the hosting screen(s) in ArkUI and calls `@ohos/lottie` from that screen using the paths this skill produced.
|
|
21
|
+
|
|
22
|
+
## How to Identify a Lottie JSON File
|
|
23
|
+
|
|
24
|
+
The `.json` extension is not enough on its own — HarmonyOS projects can contain unrelated JSON. A file is a Lottie animation JSON if and only if its parsed root object contains **all** of the following top-level fields:
|
|
25
|
+
|
|
26
|
+
| Field | Meaning |
|
|
27
|
+
|---|---|
|
|
28
|
+
| `v` | Bodymovin exporter version, e.g. `"5.7.4"` |
|
|
29
|
+
| `fr` | Frame rate, number |
|
|
30
|
+
| `ip` | In-point (start frame), number |
|
|
31
|
+
| `op` | Out-point (end frame), number |
|
|
32
|
+
| `w` | Composition width, number |
|
|
33
|
+
| `h` | Composition height, number |
|
|
34
|
+
| `layers` | Array of layer objects |
|
|
35
|
+
|
|
36
|
+
If a JSON file has this signature, treat it as a Lottie animation regardless of the directory it lives in. If a JSON file is missing any of these fields, do not classify it as a Lottie asset; process it under the ordinary rules for its host directory (e.g., a raw JSON config in `res/raw/` follows the raw-file rules).
|
|
37
|
+
|
|
38
|
+
If a file cannot be parsed as JSON (broken, binary), record it as an inventory row with `Status = failed to parse` and `mapping_kind = failed conversion`.
|
|
39
|
+
|
|
40
|
+
## Source Locations in an Android Project
|
|
41
|
+
|
|
42
|
+
Android projects place Lottie JSON in one of two directories. This skill scans both:
|
|
43
|
+
|
|
44
|
+
| Android Location | Access Pattern in Android | Example |
|
|
45
|
+
|---|---|---|
|
|
46
|
+
| `app/src/main/assets/` (recursive) | `AssetManager.open(...)`, `LottieCompositionFactory.fromAsset(context, "AndroidWave.json")` | `assets/AndroidWave.json`, `assets/lottie/checkmark.json` |
|
|
47
|
+
| `app/src/main/res/raw/` | `R.raw.name`, `LottieCompositionFactory.fromRawRes(context, R.raw.lottielogo)` | `res/raw/lottielogo.json` |
|
|
48
|
+
|
|
49
|
+
`assets/` is a passthrough directory in APK decoding (unlike `res/`), so its files stay under `<decoded_output_path>/assets/` after decoding. Scan both `<decoded_output_path>/assets/` and `<decoded_output_path>/res/raw/` (or the source-fallback equivalents `app/src/main/assets/` and `app/src/main/res/raw/`).
|
|
50
|
+
|
|
51
|
+
When multi-module: scan every module's `src/*/assets/` and `src/*/res/raw/`, including flavor source sets (`src/debug/`, `src/<flavor>/`).
|
|
52
|
+
|
|
53
|
+
## Target Path in the HarmonyOS Project
|
|
54
|
+
|
|
55
|
+
All migrated Lottie animations land under a dedicated subdirectory of `rawfile/`:
|
|
56
|
+
|
|
57
|
+
```
|
|
58
|
+
entry/src/main/resources/rawfile/lottie/<name>.json
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
- The `lottie/` subdirectory keeps them separate from unrelated raw assets and matches the load-path convention used by `@ohos/lottie` examples (`path: 'common/lottie/animation.json'` style paths).
|
|
62
|
+
- Preserve the base filename (after normalization — see below). Discard any Android source subdirectory. If a project has `assets/animations/wave.json`, the target is still `rawfile/lottie/wave.json`.
|
|
63
|
+
- The load path recorded in the mapping document (for the developer to feed into `lottie.loadAnimation({ path: ... })`) is `lottie/<name>.json` — relative to `rawfile/`, no leading slash.
|
|
64
|
+
|
|
65
|
+
**Filename collision handling.** If two source files would normalize to the same target filename (e.g., `assets/logo.json` and `res/raw/logo.json` both target `lottie/logo.json`), disambiguate by prefixing the source category: `lottie/assets_logo.json` and `lottie/raw_logo.json`. Record both original paths in the mapping row's `notes`.
|
|
66
|
+
|
|
67
|
+
## Filename Normalization
|
|
68
|
+
|
|
69
|
+
HarmonyOS resource filenames must be all-lowercase, use only `[a-z0-9_]` in the base name, and only one `.` before the extension. Apply the following transforms to every Lottie source filename:
|
|
70
|
+
|
|
71
|
+
1. Strip the `.json` extension, transform the base name, then reattach `.json`.
|
|
72
|
+
2. Replace whitespace and any character in `[^a-zA-Z0-9_]` with `_`.
|
|
73
|
+
3. Collapse consecutive `_` into a single `_`.
|
|
74
|
+
4. Trim leading/trailing `_`.
|
|
75
|
+
5. Lowercase the entire base name.
|
|
76
|
+
6. If the base name starts with a digit after normalization, prefix with `lottie_`.
|
|
77
|
+
|
|
78
|
+
Examples:
|
|
79
|
+
|
|
80
|
+
| Android source filename | Normalized target under `rawfile/lottie/` |
|
|
81
|
+
|---|---|
|
|
82
|
+
| `AndroidWave.json` | `androidwave.json` |
|
|
83
|
+
| `HamburgerArrow.json` | `hamburgerarrow.json` |
|
|
84
|
+
| `Lottie Logo 1.json` | `lottie_logo_1.json` |
|
|
85
|
+
| `Lottie Logo 2.json` | `lottie_logo_2.json` |
|
|
86
|
+
| `lottielogo.json` (from `res/raw/`) | `lottielogo.json` |
|
|
87
|
+
| `01-intro.json` | `lottie_01_intro.json` |
|
|
88
|
+
|
|
89
|
+
When a filename is renamed, record the rename in the mapping row's `notes` (`renamed from "Lottie Logo 1.json"`) and — if the reference is code-loaded via a literal string in Kotlin/Java — flag it in the report so the developer updates the code.
|
|
90
|
+
|
|
91
|
+
## Extracting Lottie References from Android Code
|
|
92
|
+
|
|
93
|
+
Lottie assets are wired to Android screens through three attribute-based reference patterns (in XML) plus a code-loaded pattern (in Kotlin/Java). Extend the reference-scanning defined in `references/dependency-analysis-rules.md` with the patterns below.
|
|
94
|
+
|
|
95
|
+
### XML attribute references
|
|
96
|
+
|
|
97
|
+
Namespace prefix varies (`app:`, `airbnb:`, custom bindings) — match by local name.
|
|
98
|
+
|
|
99
|
+
| Attribute | Reference target | Notes |
|
|
100
|
+
|---|---|---|
|
|
101
|
+
| `lottie_fileName` | Filename under `assets/` (e.g., `"AndroidWave.json"`) | Treat the string value as an assets-relative path. Match to the migrated `rawfile/lottie/<normalized>.json`. |
|
|
102
|
+
| `lottie_rawRes` | `@raw/<name>` | Match `<name>.json` inside `res/raw/`. The migrated target is `rawfile/lottie/<normalized>.json`. |
|
|
103
|
+
| `lottie_url` | Runtime URL string | No local file to migrate. Mark the reference as **remote** — `mapping_kind = remote resource (no local target)` and `source_category = 运行时远程资源`. Record the URL in `notes`. |
|
|
104
|
+
| `lottie_fallbackRes` | `@drawable/<name>` | Not a Lottie asset — falls under the normal drawable rules. Note the association in the Lottie row's `notes` because it is the fallback shown when the animation fails. |
|
|
105
|
+
|
|
106
|
+
For each XML reference, record the host layout file. That is the input to page binding (next section).
|
|
107
|
+
|
|
108
|
+
### Code-loaded Lottie
|
|
109
|
+
|
|
110
|
+
Some apps load Lottie JSON purely from code, including scanning `assets/` at runtime with `AssetManager.list("")`. Detection heuristics:
|
|
111
|
+
|
|
112
|
+
1. String literal ending in `.json` passed to `LottieCompositionFactory.fromAsset(...)`, `.fromRawRes(...)`, `.fromJsonInputStream(...)`, `.fromUrl(...)`, or to `LottieAnimationView.setAnimation(...)`.
|
|
113
|
+
2. `AssetManager.list(...)` results filtered by `.json` and passed into any of the factory methods above — this is the "dynamic dialog listing all assets" pattern (see `PreviewFragment` in the airbnb `lottie-android` sample).
|
|
114
|
+
3. Any `CompositionArgs`-like data class carrying an `assetName` / `fileUri` / `url` field consumed by a factory method.
|
|
115
|
+
|
|
116
|
+
For every code-loaded reference:
|
|
117
|
+
- If the source file is `assets/*.json` or `res/raw/*.json` → treat exactly like an XML reference in terms of migration (copy to `rawfile/lottie/<normalized>.json`).
|
|
118
|
+
- If the source is a URL or a user-picked file URI → mark as runtime remote resource, no local target.
|
|
119
|
+
- Record the Kotlin/Java source file and, if identifiable, the containing Activity/Fragment for page binding.
|
|
120
|
+
|
|
121
|
+
### Extending the reference table
|
|
122
|
+
|
|
123
|
+
Add the Lottie patterns above to whatever reference-extraction pipeline the skill runs. They are not covered by the generic `@type/name` regex in `references/dependency-analysis-rules.md`, so they need their own passes:
|
|
124
|
+
|
|
125
|
+
1. XML pass: for every layout / view XML file, extract every attribute whose local name matches `^lottie_(fileName|rawRes|url|fallbackRes)$`. Value handling is as described above.
|
|
126
|
+
2. Code pass: grep the project's Kotlin/Java sources for the factory method names listed above and, for each hit, capture the argument (literal filename, resource id, or URL) plus the enclosing class name.
|
|
127
|
+
|
|
128
|
+
## Binding Each Lottie JSON to a HarmonyOS Page
|
|
129
|
+
|
|
130
|
+
The whole point of the mapping report is telling the HarmonyOS developer **which screen in the new project plays which animation**. For every Lottie JSON, produce a *host* attribution using the same evidence sources as the standard screen-attribution rules (`references/resource-mapping-rules.md` §6, `references/dependency-analysis-rules.md` "Screen Attribution"), plus these Lottie-specific rules:
|
|
131
|
+
|
|
132
|
+
### Attribution priority
|
|
133
|
+
|
|
134
|
+
1. **XML host layout → hosting Activity/Fragment.**
|
|
135
|
+
- Find the layout XML(s) that reference the JSON via `lottie_fileName` / `lottie_rawRes`.
|
|
136
|
+
- Walk backward: which Activity/Fragment inflates that layout? Evidence includes `setContentView(R.layout.<name>)`, `AppCompatActivity(R.layout.<name>)` constructor form, `BaseFragment(R.layout.<name>)` / `Fragment.onCreateView` returning `R.layout.<name>`, and DataBinding/ViewBinding class names derived from the layout.
|
|
137
|
+
- Record `<Activity/Fragment class name>` in the `Host Activity/Fragment` column and `<layout file>` in `notes`.
|
|
138
|
+
|
|
139
|
+
2. **Code-loaded (literal filename in factory call).**
|
|
140
|
+
- Take the enclosing class as the host. If the class is a ViewModel or repository (not a screen), walk one hop up to the Fragment/Activity that observes it.
|
|
141
|
+
|
|
142
|
+
3. **Code-loaded (dynamic list from `AssetManager`).**
|
|
143
|
+
- This is the "preview / picker" pattern where the animation is rendered on whatever detail screen the user navigates to. Attribute every listed JSON to that **detail screen** (the target of the `startActivity` call from the picker), not the picker itself. The picker is the browser; the detail screen is the actual host.
|
|
144
|
+
- Example (from the airbnb `lottie-android` sample): `PreviewFragment` lists `assets/*.json` in an `AlertDialog` and calls `PlayerActivity.Companion.intent(context, CompositionArgs(asset = <name>))`. Attribute all listed JSONs to `PlayerActivity` (which in turn hosts `PlayerFragment` with the `LottieAnimationView`).
|
|
145
|
+
|
|
146
|
+
4. **Manifest / global.**
|
|
147
|
+
- If the JSON is loaded from `Application.onCreate`, a splash screen, or shared UI (nav header, tab bar), attribute to `Global` or `Launcher` per the shared-component / global rules in `resource-mapping-rules.md`.
|
|
148
|
+
|
|
149
|
+
5. **Fallback.**
|
|
150
|
+
- If no evidence exists, use `Unknown` and mention the reason in `notes` (e.g., "loaded via runtime string from unrecognized code path").
|
|
151
|
+
|
|
152
|
+
### Suggested HarmonyOS Page
|
|
153
|
+
|
|
154
|
+
Alongside the Android host, propose a HarmonyOS page name so the developer knows where to place the `@ohos/lottie` call. Use these rules:
|
|
155
|
+
|
|
156
|
+
- Strip the `Activity` / `Fragment` suffix and append `Page`. Examples: `PlayerActivity` → `PlayerPage`, `PlayerFragment` → `PlayerPage`, `LoginActivity` → `LoginPage`.
|
|
157
|
+
- Multiple hosts collapse to one page if they share the same base name (Activity + Fragment pair for the same screen).
|
|
158
|
+
- `Launcher` → `EntryAbility` (or the equivalent entry ability of the HarmonyOS project).
|
|
159
|
+
- `Global` → `App` / global scope.
|
|
160
|
+
- `Unknown` → `Unknown`.
|
|
161
|
+
|
|
162
|
+
This is a **suggestion column** — the mapping row's `notes` should say `HarmonyOS page name inferred from Android host; verify against actual ArkUI pages`.
|
|
163
|
+
|
|
164
|
+
## Unmappable / Deferred Cases
|
|
165
|
+
|
|
166
|
+
Record each of these with an explicit `mapping_kind` and keep the inventory row, never silently drop:
|
|
167
|
+
|
|
168
|
+
| Case | `mapping_kind` | Notes |
|
|
169
|
+
|---|---|---|
|
|
170
|
+
| `lottie_url="https://..."` | `remote resource (no local target)` | HarmonyOS Target = `N/A`. Developer must fetch and re-render at runtime. |
|
|
171
|
+
| JSON referenced only by a runtime `Uri` from a file picker (`Intent.ACTION_GET_CONTENT`) | `remote resource (no local target)` | HarmonyOS Target = `N/A`. Developer handles user-provided files with the equivalent Picker API. |
|
|
172
|
+
| JSON present in `assets/` but not referenced anywhere in XML or code (dead asset) | `direct copy` still applies | Migrate anyway, mark screens = `Unknown`, note "no static references found — possibly loaded via string concatenation or dead asset". |
|
|
173
|
+
| JSON exists but fails Lottie signature check (missing `v`/`fr`/`layers` etc.) | `unmappable` | HarmonyOS Target = `N/A`. Notes: "JSON in assets/raw is not a valid Lottie composition; falls back to raw-file rules". |
|
|
174
|
+
| Lottie with embedded image assets (`images` field pointing to external files) | `direct copy` for the JSON + `direct copy` for each referenced image | Copy images alongside the JSON under `rawfile/lottie/images/<name>` (preserve relative structure declared by the Lottie `imagePath`). Record each image as its own inventory + mapping row. |
|
|
175
|
+
| Lottie referenced by `lottie_fallbackRes` only (used as fallback for another animation) | `direct copy` | Attribute to same host as the primary animation. Mention "fallback for @drawable/xxx or another JSON" in notes. |
|
|
176
|
+
|
|
177
|
+
## Report and Mapping Requirements
|
|
178
|
+
|
|
179
|
+
### Standard conversion report (Step 7)
|
|
180
|
+
|
|
181
|
+
Add a dedicated section:
|
|
182
|
+
|
|
183
|
+
```
|
|
184
|
+
### Lottie Animation Resources
|
|
185
|
+
Every Lottie JSON detected in the project (via structure signature) and where it maps in HarmonyOS.
|
|
186
|
+
|
|
187
|
+
| Android Source | Target Rawfile Path | Host Activity/Fragment | Host Layout | HarmonyOS Page (suggested) | Notes |
|
|
188
|
+
|---|---|---|---|---|---|
|
|
189
|
+
| assets/AndroidWave.json | rawfile/lottie/androidwave.json | (none — XML host only) | res/layout/dynamic_activity.xml | DynamicPage | XML host inflated by DynamicActivity (inferred) |
|
|
190
|
+
| assets/Lottie Logo 1.json | rawfile/lottie/lottie_logo_1.json | PlayerActivity (via PreviewFragment picker) | N/A | PlayerPage | Renamed from "Lottie Logo 1.json" (spaces stripped). Loaded via AssetManager.list() in PreviewFragment; picker dispatches to PlayerActivity. |
|
|
191
|
+
| ... | ... | ... | ... | ... | ... |
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
Also add these summary counters to the "Summary" section:
|
|
195
|
+
- `Total Lottie animations found: <count>`
|
|
196
|
+
- `Migrated to rawfile/lottie/: <count>`
|
|
197
|
+
- `Remote / URL Lottie (no local target): <count>`
|
|
198
|
+
- `Filename collisions disambiguated: <count>`
|
|
199
|
+
|
|
200
|
+
### Mapping markdown (Step 8)
|
|
201
|
+
|
|
202
|
+
- Every Lottie JSON is one inventory row and at least one mapping row.
|
|
203
|
+
- Inventory row: `type_category = raw` (Lottie JSON lives under Android `assets/` or `res/raw/`, both of which normalize to Harmony's `rawfile/`). Explain the Lottie subtype in `notes` (`Lottie animation JSON`).
|
|
204
|
+
- Mapping row `harmony_target` values:
|
|
205
|
+
- Local migration → `entry/src/main/resources/rawfile/lottie/<normalized>.json`
|
|
206
|
+
- Remote / URL / user-picked → `N/A` with `mapping_kind = remote resource (no local target)`
|
|
207
|
+
- Mapping row `mapping_kind`:
|
|
208
|
+
- `direct copy` — for a straight assets/raw → rawfile move
|
|
209
|
+
- `rename` — used **in addition to** `direct copy` when the filename was normalized (emit as a second mapping row or record both in `notes`; the simpler option is one row with `mapping_kind = direct copy` and a `notes` entry `renamed from "<original>"`)
|
|
210
|
+
- `remote resource (no local target)` — URL / picker cases
|
|
211
|
+
- `unmappable` — JSON that fails the Lottie signature check
|
|
212
|
+
- Every Lottie mapping row MUST populate the Host Activity/Fragment (via `notes` if the mapping template does not have a dedicated column) and the suggested HarmonyOS page so the developer can wire the `@ohos/lottie` call to the correct ArkUI page.
|
|
213
|
+
- If the mapping markdown template supports extra columns, add `Host Activity/Fragment` and `Suggested HarmonyOS Page` columns to the Lottie section. Otherwise, put both facts in `notes` in the format `host=<class>; page=<PageName>`.
|
|
214
|
+
|
|
215
|
+
### Cross-check during Step 6 verification
|
|
216
|
+
|
|
217
|
+
- Verify every migrated Lottie file is present under `rawfile/lottie/` in the HarmonyOS output.
|
|
218
|
+
- Verify every `lottie_fileName` / `lottie_rawRes` reference discovered in XML has a corresponding entry in the report's Lottie table.
|
|
219
|
+
- If `harmony_project_dir` already contains ArkTS code and any `.ets` file already calls `lottie.loadAnimation({ path: 'lottie/xxx.json' })`, verify the file exists at `rawfile/lottie/xxx.json`. If missing, do **not** create a placeholder SVG (that's the drawable rule) — instead log it prominently as an unresolved Lottie reference so the developer can either drop in the JSON manually or fix the path.
|