@buaa_smat/hometrans 26.0.3 → 26.0.4-devecocli.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/agents/code-reviewer.md +91 -21
- package/devecocli-plugin/common.ts +2271 -0
- package/devecocli-plugin/content-resolver.ts +363 -0
- package/devecocli-plugin/install.ts +72 -0
- package/devecocli-plugin/uninstall.ts +26 -0
- package/devecocli-plugin/update.ts +77 -0
- package/i18n/agents/code-reviewer.md +93 -21
- package/i18n/skills/a2h-app-migrate/SKILL.md +19 -11
- package/i18n/skills/a2h-app-migrate/references/feature-scope.md +121 -0
- package/i18n/skills/a2h-app-migrate/references/stage-map.md +2 -2
- package/i18n/skills/a2h-app-migrate/references/workflow.yaml +320 -73
- package/i18n/skills/a2h-app-migrate/scripts/check_spec_gen_done.mjs +78 -5
- package/i18n/skills/a2h-app-migrate/scripts/env_preflight.mjs +79 -11
- package/i18n/skills/a2h-app-migrate/scripts/human_review_gate.mjs +75 -4
- package/i18n/skills/a2h-app-migrate/test/test_android_index.mjs +12 -0
- package/i18n/skills/a2h-app-migrate/test/test_env_requirements.mjs +25 -10
- package/i18n/skills/a2h-app-migrate/test/test_finalize.mjs +35 -7
- package/i18n/skills/a2h-app-migrate/test/test_resume_plan.mjs +52 -0
- package/i18n/skills/a2h-app-migrate/test/test_resume_summary.mjs +26 -0
- package/i18n/skills/a2h-app-migrate/test/test_reuse_static_utg.mjs +36 -0
- package/i18n/skills/a2h-app-migrate/test/test_run_dir.mjs +71 -7
- package/i18n/skills/a2h-app-migrate/test/test_spec_gen_done.mjs +117 -0
- package/i18n/skills/a2h-app-migrate/test/test_spec_gen_gate.mjs +7 -3
- package/i18n/skills/a2h-app-migrate/test/test_utg_static_done.mjs +38 -2
- package/i18n/skills/a2h-arch-generate/SKILL.md +20 -17
- package/i18n/skills/a2h-arch-generate/references/database-schema-recovery.md +2 -2
- package/i18n/skills/a2h-arch-generate/references/harmony-project-inspection.md +8 -8
- package/i18n/skills/a2h-arch-generate/references/homegraph-workflow.md +25 -14
- package/i18n/skills/a2h-arch-generate/references/source-baseline.md +4 -4
- package/i18n/skills/a2h-arch-generate/scripts/tests/run_tests.mjs +3 -3
- package/i18n/skills/a2h-arkts-logic-coder/SKILL.md +304 -0
- package/i18n/skills/a2h-arkts-logic-coder/references/ISSUES.md +2 -1
- package/i18n/skills/a2h-arkts-logic-coder/references/code-generation.md +59 -2
- package/i18n/skills/a2h-arkts-logic-coder/references/spec-design.md +52 -11
- package/i18n/skills/a2h-arkts-logic-coder/scripts/state_doc.mjs +328 -38
- package/i18n/skills/a2h-arkts-logic-coder/test/test_state_doc.mjs +245 -0
- package/i18n/skills/a2h-batch-ui-align/SKILL.md +70 -21
- package/i18n/skills/a2h-batch-ui-align/references/cards/alignment.md +5 -1
- package/i18n/skills/a2h-batch-ui-align/references/cards/geometry.md +5 -0
- package/i18n/skills/a2h-batch-ui-align/references/cards/interaction.md +2 -1
- package/i18n/skills/a2h-batch-ui-align/references/cards/resources.md +6 -4
- package/i18n/skills/a2h-batch-ui-align/references/cards/widgets.md +5 -0
- package/i18n/skills/a2h-batch-ui-align/references/cards/window.md +2 -1
- package/i18n/skills/a2h-batch-ui-align/references/checker-rules.md +236 -11
- package/i18n/skills/a2h-batch-ui-align/references/conversion-procedure.md +8 -5
- package/i18n/skills/a2h-batch-ui-align/references/incremental-scope.md +28 -9
- package/i18n/skills/a2h-batch-ui-align/references/mappings/android-to-harmonyOS-ui-atomic-component-mapping-reference.md +7 -4
- package/i18n/skills/a2h-batch-ui-align/references/mappings/android-to-harmonyOS-ui-layout-mapping-reference.md +28 -1
- package/i18n/skills/a2h-batch-ui-align/references/state-mgmt/_decorator-quickref.md +31 -0
- package/i18n/skills/a2h-batch-ui-align/references/step3-capture.md +22 -6
- package/i18n/skills/a2h-batch-ui-align/references/step4-prepare.md +3 -0
- package/i18n/skills/a2h-batch-ui-align/references/step5-convert.md +26 -4
- package/i18n/skills/a2h-batch-ui-align/scripts/branch_coverage.mjs +155 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/build_conversion_set.mjs +386 -16
- package/i18n/skills/a2h-batch-ui-align/scripts/export_ui_info.mjs +19 -1
- package/i18n/skills/a2h-batch-ui-align/scripts/group_pack.mjs +134 -11
- package/i18n/skills/a2h-batch-ui-align/scripts/icon_coverage.mjs +147 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/measure_pack.ts +231 -5
- package/i18n/skills/a2h-batch-ui-align/scripts/phase5_check.mjs +82 -8
- package/i18n/skills/a2h-batch-ui-align/scripts/shell_contract.mjs +21 -7
- package/i18n/skills/a2h-batch-ui-align/scripts/state_doc.mjs +9 -4
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/main.ts +48 -5
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/a11y.ts +3 -17
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/attr_chain.ts +1 -19
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/dialog_backboard.ts +91 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/event_default_click.ts +179 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/hit_test.ts +339 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/image_source.ts +84 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/input_traps.ts +249 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/layout_placement.ts +234 -5
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/lottie_host.ts +145 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/media_tint.ts +45 -11
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/overlay_binds.ts +56 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/overlay_string.ts +96 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/padding_in_size.ts +60 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/percent_height_in_scroll.ts +3 -2
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/relative_container_height.ts +102 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/root_weight.ts +54 -4
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/runtime_traps.ts +440 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/scroll_align.ts +75 -23
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/swiper_index.ts +65 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/theme_color.ts +63 -2
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/waterflow_sections.ts +231 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/wide_constant_width.ts +4 -4
- package/i18n/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_input_runtime.test.mjs +514 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_layout_placement.test.mjs +224 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_overlay_lottie.test.mjs +199 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/tests/branch_coverage.test.mjs +116 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/tests/build_conversion_set.test.mjs +133 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/tests/measure_pack.test.mjs +5 -3
- package/i18n/skills/a2h-batch-ui-align/scripts/tests/phase5_check.test.mjs +33 -2
- package/i18n/skills/a2h-batch-ui-align/scripts/tests/skill_doc_contract.test.mjs +12 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/tests/state_doc.test.mjs +8 -0
- package/i18n/skills/a2h-coldstart-smoke-gate/SKILL.md +7 -4
- package/i18n/skills/a2h-dashboard-render/scripts/device_capture.mjs +11 -9
- package/i18n/skills/a2h-module-semantic-docs/SKILL.md +51 -13
- package/i18n/skills/a2h-page-specgen/SKILL.md +123 -20
- package/i18n/skills/a2h-page-specgen/references/behavior-ledger.md +1174 -0
- package/i18n/skills/a2h-page-specgen/references/body-language.md +11 -9
- package/i18n/skills/a2h-page-specgen/references/gates.md +119 -52
- package/i18n/skills/a2h-page-specgen/references/page-inventory.md +69 -22
- package/i18n/skills/a2h-page-specgen/references/scenario-authoring.md +274 -0
- package/i18n/skills/a2h-page-specgen/references/spec-example.md +312 -0
- package/i18n/skills/a2h-page-specgen/references/spec-template.md +113 -110
- package/i18n/skills/a2h-page-specgen/scripts/behavior-audit.mjs +2436 -0
- package/i18n/skills/a2h-page-specgen/scripts/behavior-discovery.mjs +1833 -0
- package/i18n/skills/a2h-page-specgen/scripts/behavior-model.mjs +181 -0
- package/i18n/skills/a2h-page-specgen/scripts/behavior-reconcile.mjs +1205 -0
- package/i18n/skills/a2h-page-specgen/scripts/entry-evidence.mjs +1123 -0
- package/i18n/skills/a2h-page-specgen/scripts/facts-build.mjs +171 -62
- package/i18n/skills/a2h-page-specgen/scripts/footprint.mjs +314 -192
- package/i18n/skills/a2h-page-specgen/scripts/gate.mjs +364 -76
- package/i18n/skills/a2h-page-specgen/scripts/interactions.mjs +216 -8
- package/i18n/skills/a2h-page-specgen/scripts/inventory.mjs +371 -0
- package/i18n/skills/a2h-page-specgen/scripts/lib/contracts.mjs +116 -223
- package/i18n/skills/a2h-page-specgen/scripts/lib/graph-evidence.mjs +235 -0
- package/i18n/skills/a2h-page-specgen/scripts/lib/hg.mjs +521 -13
- package/i18n/skills/a2h-page-specgen/scripts/lib/homegraph-process.mjs +102 -0
- package/i18n/skills/a2h-page-specgen/scripts/lib/homegraph-query.mjs +161 -0
- package/i18n/skills/a2h-page-specgen/scripts/lib/operation-reviews.mjs +913 -0
- package/i18n/skills/a2h-page-specgen/scripts/lib/prose.mjs +12 -8
- package/i18n/skills/a2h-page-specgen/scripts/lib/semantic-detail.mjs +353 -0
- package/i18n/skills/a2h-page-specgen/scripts/lib/source-text.mjs +497 -0
- package/i18n/skills/a2h-page-specgen/scripts/operation-evidence.mjs +1542 -0
- package/i18n/skills/a2h-page-specgen/scripts/prepare.mjs +483 -125
- package/i18n/skills/a2h-page-specgen/scripts/render.mjs +10 -33
- package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/acceptance.mjs +288 -7
- package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/PlainDisplayPage.json +25 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/PlainDisplayPage.prompt.md +373 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/PlainDisplayPage.worker.md +300 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/SilentFailurePage.json +47 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/SilentFailurePage.prompt.md +373 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/SilentFailurePage.worker.md +300 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/UniAppSourcePage.discovery.json +2694 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/UniAppSourcePage.json +726 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/UniAppSourcePage.post-review.json +108 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/UniAppSourcePage.prompt.md +373 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/UniAppSourcePage.review.md +65 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/UniAppSourcePage.worker.md +267 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/ValidatedSearchPage.json +57 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/ValidatedSearchPage.prompt.md +373 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/ValidatedSearchPage.worker.md +300 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/branch-checklist.md +32 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/gate-results.json +22 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/manifest.json +111 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/portability.test.mjs +141 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/review.md +22 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/run.mjs +553 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/android-entry-evidence.test.mjs +585 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/android-operation-evidence.test.mjs +755 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/behavior-audit-group.test.mjs +546 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/behavior-audit-post.test.mjs +655 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/behavior-audit-pre.test.mjs +1234 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/behavior-component-gate.test.mjs +520 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/behavior-discovery.test.mjs +1516 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/behavior-finalize.test.mjs +759 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/behavior-fixtures.mjs +630 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/behavior-model.test.mjs +118 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/behavior-reconcile.test.mjs +798 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/behavior-regression.test.mjs +886 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/contracts.test.mjs +134 -163
- package/i18n/skills/a2h-page-specgen/scripts/test/entry-evidence.test.mjs +475 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/facts.test.mjs +40 -1
- package/i18n/skills/a2h-page-specgen/scripts/test/finalize.test.mjs +206 -9
- package/i18n/skills/a2h-page-specgen/scripts/test/fixtures/uniapp-source/App.vue +1 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/fixtures/uniapp-source/bundle-conflict-record.json +17 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/fixtures/uniapp-source/bundle-record.json +17 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/fixtures/uniapp-source/manifest.json +3 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/fixtures/uniapp-source/pages/list/index.vue +80 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/fixtures/uniapp-source/pages.json +14 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/fixtures/uniapp-source/source-record.json +15 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/fixtures/uniapp-source/src/components/RefreshPanel.vue +15 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/fixtures/uniapp-source/src/composables/useRefresh.ts +50 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/fixtures/uniapp-source/src/pages/help/index.vue +9 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/fixtures/uniapp-source/src/state/store.ts +4 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/footprint-resolve.test.mjs +459 -188
- package/i18n/skills/a2h-page-specgen/scripts/test/gate-partial.test.mjs +89 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/gate.test.mjs +862 -12
- package/i18n/skills/a2h-page-specgen/scripts/test/graph-evidence.test.mjs +332 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/helpers.mjs +139 -5
- package/i18n/skills/a2h-page-specgen/scripts/test/hg.test.mjs +378 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/homegraph-process-fixture.mjs +130 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/homegraph-query.test.mjs +288 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/integration.test.mjs +69 -2
- package/i18n/skills/a2h-page-specgen/scripts/test/interactions.test.mjs +267 -2
- package/i18n/skills/a2h-page-specgen/scripts/test/inventory.test.mjs +111 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/keys.test.mjs +10 -8
- package/i18n/skills/a2h-page-specgen/scripts/test/operation-reviews.test.mjs +1002 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/plan-build.test.mjs +143 -51
- package/i18n/skills/a2h-page-specgen/scripts/test/prepare-homegraph-reproduction.mjs +365 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/prepare-homegraph.test.mjs +569 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/prepare-pipeline.test.mjs +326 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/prompt-tpl.test.mjs +166 -3
- package/i18n/skills/a2h-page-specgen/scripts/test/prose.test.mjs +13 -5
- package/i18n/skills/a2h-page-specgen/scripts/test/protocol-docs.test.mjs +531 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/recovery-e2e.test.mjs +102 -7
- package/i18n/skills/a2h-page-specgen/scripts/test/recovery.test.mjs +1308 -72
- package/i18n/skills/a2h-page-specgen/scripts/test/render.test.mjs +69 -44
- package/i18n/skills/a2h-page-specgen/scripts/test/review-followup.test.mjs +467 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/semantic-detail.test.mjs +949 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/submit.test.mjs +658 -120
- package/i18n/skills/a2h-page-specgen/scripts/test/uniapp-operation-evidence.test.mjs +639 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/utg-footprint-contract.test.mjs +274 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/waker-process.test.mjs +101 -65
- package/i18n/skills/a2h-resource-convert/SKILL.md +9 -1
- package/i18n/skills/a2h-resource-convert/references/code-vector-icon-rules.md +2 -1
- package/i18n/skills/a2h-resource-convert/references/incremental-page-migration.md +23 -2
- package/i18n/skills/a2h-resource-convert/references/lottie-conversion-rules.md +7 -0
- package/i18n/skills/a2h-resource-convert/references/step4-resource-types.md +2 -0
- package/i18n/skills/a2h-resource-convert/scripts/a2h_resource_convert.ts +67 -3
- package/i18n/skills/a2h-resource-convert/scripts/lottie_hosts.ts +415 -0
- package/i18n/skills/a2h-resource-convert/scripts/tests/lottie_hosts.test.mjs +222 -0
- package/i18n/skills/a2h-spec-design-pipeline/SKILL.md +69 -109
- package/i18n/skills/a2h-spec-design-pipeline/references/coding-loop.md +135 -37
- package/i18n/skills/a2h-spec-design-pipeline/references/homegraph-cli.md +307 -0
- package/i18n/skills/a2h-spec-design-pipeline/references/initialization.md +103 -0
- package/i18n/skills/a2h-spec-design-pipeline/references/merge-queue.md +126 -23
- package/i18n/skills/a2h-spec-design-pipeline/references/post-loop.md +23 -0
- package/i18n/skills/a2h-spec-design-pipeline/references/review-loop.md +71 -0
- package/i18n/skills/a2h-spec-design-pipeline/references/scripts.md +24 -13
- package/i18n/skills/a2h-spec-design-pipeline/references/state-and-resume.md +246 -0
- package/i18n/skills/a2h-spec-design-pipeline/scripts/plan_groups.ts +170 -7
- package/i18n/skills/a2h-spec-design-pipeline/scripts/test_plan_groups.ts +155 -0
- package/i18n/skills/a2h-spec-generate/SKILL.md +2 -2
- package/i18n/skills/a2h-utg-explorer/SKILL.md +9 -3
- package/i18n/skills/a2h-utg-explorer/references/architecture.md +3 -0
- package/i18n/skills/a2h-utg-explorer/scripts/compile_tasks.mjs +74 -84
- package/i18n/skills/a2h-utg-explorer/scripts/hybrid_route_cdp.mjs +376 -0
- package/i18n/skills/a2h-utg-explorer/scripts/recover_d.mjs +288 -21
- package/i18n/skills/a2h-utg-explorer/scripts/seed_recipes.mjs +426 -0
- package/i18n/skills/a2h-utg-explorer/scripts/tests/diagnostics.test.mjs +252 -0
- package/i18n/skills/a2h-utg-explorer/scripts/tests/hybrid_route_identity.test.mjs +146 -0
- package/i18n/skills/a2h-utg-explorer/scripts/tests/interruptions.test.mjs +122 -0
- package/i18n/skills/a2h-utg-explorer/scripts/tests/launch_bridge.test.mjs +15 -0
- package/i18n/skills/a2h-utg-explorer/scripts/tests/seed_recipes.test.mjs +261 -0
- package/i18n/skills/a2h-utg-explorer/scripts/utg_explorer/diagnostics.mjs +196 -0
- package/i18n/skills/a2h-utg-explorer/scripts/utg_explorer/hybrid_route.mjs +140 -0
- package/i18n/skills/a2h-utg-explorer/scripts/utg_explorer/semantics.mjs +211 -61
- package/i18n/skills/a2h-utg-explorer/scripts/utg_explorer/state_phase.mjs +47 -0
- package/i18n/skills/a2h-utg-explorer/scripts/utg_explorer/task_runner.mjs +724 -47
- package/i18n/skills/a2h-utg-static/SKILL.md +6 -2
- package/i18n/skills/a2h-utg-static/scripts/assemble.mjs +82 -12
- package/i18n/skills/a2h-utg-static/scripts/click_paths.mjs +116 -5
- package/i18n/skills/a2h-utg-static/scripts/compose_body_text.mjs +3 -3
- package/i18n/skills/a2h-utg-static/scripts/compose_titles.mjs +5 -5
- package/i18n/skills/a2h-utg-static/scripts/compose_widgets.mjs +4 -4
- package/i18n/skills/a2h-utg-static/scripts/data_model.mjs +590 -0
- package/i18n/skills/a2h-utg-static/scripts/data_producers.mjs +431 -0
- package/i18n/skills/a2h-utg-static/scripts/hybrid_scope.mjs +50 -5
- package/i18n/skills/a2h-utg-static/scripts/label_resolve.mjs +49 -4
- package/i18n/skills/a2h-utg-static/scripts/lib/hybrid-provenance.mjs +201 -0
- package/i18n/skills/a2h-utg-static/scripts/lib/uniapp-routes.mjs +195 -0
- package/i18n/skills/a2h-utg-static/scripts/nl_hints.mjs +32 -4
- package/i18n/skills/a2h-utg-static/scripts/tests/test_compose_res_text.mjs +17 -0
- package/i18n/skills/a2h-utg-static/scripts/tests/test_data_model.mjs +120 -0
- package/i18n/skills/a2h-utg-static/scripts/tests/test_data_producers.mjs +113 -0
- package/i18n/skills/a2h-utg-static/scripts/tests/test_hybrid_provenance.mjs +150 -0
- package/i18n/skills/a2h-utg-static/scripts/tests/test_hybrid_scope.mjs +181 -17
- package/i18n/skills/a2h-utg-static/scripts/tests/test_module_strings.mjs +35 -1
- package/i18n/skills/a2h-utg-static/scripts/tests/test_uniapp_routes.mjs +161 -0
- package/i18n/skills/a2h-utg-static/scripts/tests/test_uniapp_source.mjs +118 -19
- package/i18n/skills/a2h-utg-static/scripts/tests/test_utg_specgen_boundary.mjs +45 -0
- package/i18n/skills/a2h-utg-static/scripts/uniapp_nav.mjs +113 -70
- package/index.js +1643 -0
- package/package.json +10 -13
- package/plugin.jsonc +12 -0
- package/skills/a2h-app-migrate/SKILL.md +19 -11
- package/skills/a2h-app-migrate/references/feature-scope.md +121 -0
- package/skills/a2h-app-migrate/references/stage-map.md +2 -2
- package/skills/a2h-app-migrate/references/workflow.yaml +307 -74
- package/skills/a2h-app-migrate/scripts/android_index.mjs +35 -8
- package/skills/a2h-app-migrate/scripts/check_module_docs_done.mjs +39 -1
- package/skills/a2h-app-migrate/scripts/check_spec_gen_done.mjs +78 -5
- package/skills/a2h-app-migrate/scripts/check_spec_pipeline_done.mjs +144 -9
- package/skills/a2h-app-migrate/scripts/check_ui_batch_done.mjs +14 -1
- package/skills/a2h-app-migrate/scripts/check_utg_static_done.mjs +46 -5
- package/skills/a2h-app-migrate/scripts/diagnose.mjs +162 -0
- package/skills/a2h-app-migrate/scripts/env_preflight.mjs +79 -11
- package/skills/a2h-app-migrate/scripts/feature_scope.mjs +347 -0
- package/skills/a2h-app-migrate/scripts/human_review_gate.mjs +75 -4
- package/skills/a2h-app-migrate/scripts/infer_android_root.mjs +17 -1
- package/skills/a2h-app-migrate/scripts/ledger.mjs +64 -6
- package/skills/a2h-app-migrate/scripts/migration_manifest.mjs +351 -0
- package/skills/a2h-app-migrate/scripts/paths_preflight.mjs +9 -23
- package/skills/a2h-app-migrate/scripts/resume_plan.mjs +33 -9
- package/skills/a2h-app-migrate/scripts/reuse_static_utg.mjs +33 -1
- package/skills/a2h-app-migrate/scripts/run_dir.mjs +27 -17
- package/skills/a2h-app-migrate/scripts/scope_model.mjs +255 -0
- package/skills/a2h-app-migrate/scripts/scope_report.mjs +128 -0
- package/skills/a2h-app-migrate/scripts/source_fp.mjs +120 -0
- package/skills/a2h-app-migrate/test/test_android_index.mjs +12 -0
- package/skills/a2h-app-migrate/test/test_env_requirements.mjs +25 -10
- package/skills/a2h-app-migrate/test/test_feature_scope.mjs +217 -0
- package/skills/a2h-app-migrate/test/test_finalize.mjs +35 -7
- package/skills/a2h-app-migrate/test/test_hmos_fingerprint.mjs +7 -7
- package/skills/a2h-app-migrate/test/test_incremental_acceptance.mjs +145 -0
- package/skills/a2h-app-migrate/test/test_incremental_phase2.mjs +223 -0
- package/skills/a2h-app-migrate/test/test_incremental_phase2_acceptance.mjs +157 -0
- package/skills/a2h-app-migrate/test/test_incremental_profile.mjs +84 -0
- package/skills/a2h-app-migrate/test/test_infer_android_root.mjs +10 -0
- package/skills/a2h-app-migrate/test/test_json_io.mjs +1 -1
- package/skills/a2h-app-migrate/test/test_leaf_questions.mjs +39 -0
- package/skills/a2h-app-migrate/test/test_migration_manifest.mjs +225 -0
- package/skills/a2h-app-migrate/test/test_module_docs_done.mjs +33 -0
- package/skills/a2h-app-migrate/test/test_resume_plan.mjs +52 -0
- package/skills/a2h-app-migrate/test/test_resume_summary.mjs +26 -0
- package/skills/a2h-app-migrate/test/test_reuse_static_utg.mjs +36 -0
- package/skills/a2h-app-migrate/test/test_run_dir.mjs +71 -7
- package/skills/a2h-app-migrate/test/test_scope_model.mjs +172 -0
- package/skills/a2h-app-migrate/test/test_spec_engine_contract.mjs +13 -5
- package/skills/a2h-app-migrate/test/test_spec_gen_done.mjs +117 -0
- package/skills/a2h-app-migrate/test/test_spec_gen_gate.mjs +7 -3
- package/skills/a2h-app-migrate/test/test_spec_pipeline_done.mjs +170 -3
- package/skills/a2h-app-migrate/test/test_specs_json_preflight.mjs +1 -1
- package/skills/a2h-app-migrate/test/test_ui_batch_capture_audit.mjs +106 -0
- package/skills/a2h-app-migrate/test/test_ui_batch_done.mjs +12 -0
- package/skills/a2h-app-migrate/test/test_utg_static_done.mjs +38 -2
- package/skills/a2h-arch-generate/SKILL.md +20 -17
- package/skills/a2h-arch-generate/references/homegraph-workflow.md +10 -8
- package/skills/a2h-arch-generate/references/source-baseline.md +2 -2
- package/skills/a2h-arch-generate/scripts/cleanup_intermediates.mjs +34 -3
- package/skills/a2h-arch-generate/scripts/create_project.mjs +24 -1
- package/skills/a2h-arch-generate/scripts/inspect_and_route.mjs +29 -5
- package/skills/a2h-arch-generate/scripts/tests/run_tests.mjs +3 -3
- package/skills/a2h-arch-generate/scripts/tests/test_cleanup.mjs +17 -0
- package/skills/a2h-arch-generate/scripts/tests/test_router.mjs +26 -0
- package/skills/a2h-arch-generate/scripts/validate_incremental_docs.mjs +4 -2
- package/skills/a2h-arkts-logic-coder/SKILL.md +146 -17
- package/skills/a2h-arkts-logic-coder/references/ISSUES.md +2 -1
- package/skills/a2h-arkts-logic-coder/references/code-generation.md +59 -2
- package/skills/a2h-arkts-logic-coder/references/spec-design.md +42 -11
- package/skills/a2h-arkts-logic-coder/scripts/state_doc.mjs +328 -38
- package/skills/a2h-arkts-logic-coder/test/test_state_doc.mjs +244 -0
- package/skills/a2h-batch-ui-align/SKILL.md +72 -22
- package/skills/a2h-batch-ui-align/assets/ColorUtils.ets +16 -2
- package/skills/a2h-batch-ui-align/references/cards/alignment.md +5 -1
- package/skills/a2h-batch-ui-align/references/cards/geometry.md +5 -0
- package/skills/a2h-batch-ui-align/references/cards/interaction.md +2 -1
- package/skills/a2h-batch-ui-align/references/cards/resources.md +6 -4
- package/skills/a2h-batch-ui-align/references/cards/widgets.md +5 -0
- package/skills/a2h-batch-ui-align/references/cards/window.md +2 -1
- package/skills/a2h-batch-ui-align/references/checker-rules.md +236 -11
- package/skills/a2h-batch-ui-align/references/conversion-procedure.md +8 -5
- package/skills/a2h-batch-ui-align/references/host-dispatch.md +2 -0
- package/skills/a2h-batch-ui-align/references/incremental-scope.md +28 -9
- package/skills/a2h-batch-ui-align/references/mappings/android-to-harmonyOS-ui-atomic-component-mapping-reference.md +7 -4
- package/skills/a2h-batch-ui-align/references/mappings/android-to-harmonyOS-ui-layout-mapping-reference.md +28 -1
- package/skills/a2h-batch-ui-align/references/state-mgmt/_/350/243/205/351/245/260/345/231/250/351/200/237/346/237/245.md +30 -0
- package/skills/a2h-batch-ui-align/references/step3-capture.md +25 -6
- package/skills/a2h-batch-ui-align/references/step4-prepare.md +3 -0
- package/skills/a2h-batch-ui-align/references/step5-convert.md +26 -4
- package/skills/a2h-batch-ui-align/scripts/branch_coverage.mjs +155 -0
- package/skills/a2h-batch-ui-align/scripts/build_conversion_set.mjs +380 -16
- package/skills/a2h-batch-ui-align/scripts/capture_audit.mjs +474 -0
- package/skills/a2h-batch-ui-align/scripts/capture_fast.mjs +665 -0
- package/skills/a2h-batch-ui-align/scripts/capture_verify.mjs +552 -0
- package/skills/a2h-batch-ui-align/scripts/detach.mjs +5 -2
- package/skills/a2h-batch-ui-align/scripts/evidence_gate.mjs +39 -5
- package/skills/a2h-batch-ui-align/scripts/export_ui_info.mjs +19 -1
- package/skills/a2h-batch-ui-align/scripts/group_pack.mjs +134 -11
- package/skills/a2h-batch-ui-align/scripts/group_queue.mjs +213 -30
- package/skills/a2h-batch-ui-align/scripts/icon_coverage.mjs +147 -0
- package/skills/a2h-batch-ui-align/scripts/list_existing.mjs +141 -0
- package/skills/a2h-batch-ui-align/scripts/measure_pack.ts +231 -5
- package/skills/a2h-batch-ui-align/scripts/page_gap.mjs +210 -0
- package/skills/a2h-batch-ui-align/scripts/phase5_check.mjs +82 -8
- package/skills/a2h-batch-ui-align/scripts/progress_identity.mjs +208 -0
- package/skills/a2h-batch-ui-align/scripts/scroll_verdict.mjs +62 -0
- package/skills/a2h-batch-ui-align/scripts/shell_contract.mjs +21 -7
- package/skills/a2h-batch-ui-align/scripts/shell_requests.mjs +273 -0
- package/skills/a2h-batch-ui-align/scripts/state_doc.mjs +9 -4
- package/skills/a2h-batch-ui-align/scripts/static_check/core/baseline.ts +79 -0
- package/skills/a2h-batch-ui-align/scripts/static_check/core/parse.ts +90 -2
- package/skills/a2h-batch-ui-align/scripts/static_check/core/scan.ts +44 -0
- package/skills/a2h-batch-ui-align/scripts/static_check/main.ts +48 -5
- package/skills/a2h-batch-ui-align/scripts/static_check/registry.ts +24 -0
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/a11y.ts +3 -17
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/attr_chain.ts +1 -19
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/dialog_backboard.ts +91 -0
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/event_default_click.ts +179 -0
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/hit_test.ts +339 -0
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/image_source.ts +84 -0
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/input_traps.ts +249 -0
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/layout_placement.ts +234 -5
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/lottie_host.ts +145 -0
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/media_tint.ts +45 -11
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/overlay_binds.ts +56 -0
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/overlay_string.ts +96 -0
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/padding_in_size.ts +60 -0
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/percent_height_in_scroll.ts +3 -2
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/relative_container_height.ts +102 -0
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/root_weight.ts +54 -4
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/runtime_traps.ts +440 -0
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/scroll_align.ts +75 -23
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/swiper_index.ts +65 -0
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/theme_color.ts +63 -2
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/waterflow_sections.ts +231 -0
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/wide_constant_width.ts +4 -4
- package/skills/a2h-batch-ui-align/scripts/static_check/scan_file.ts +24 -2
- package/skills/a2h-batch-ui-align/scripts/tests/agent_cli.test.mjs +14 -0
- package/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_baseline.test.mjs +129 -0
- package/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_coolmall_runtime2.test.mjs +697 -0
- package/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_hit_test.test.mjs +298 -0
- package/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_input_runtime.test.mjs +514 -0
- package/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_layout_placement.test.mjs +224 -0
- package/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_overlay_lottie.test.mjs +199 -0
- package/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_rule_smoke.test.mjs +41 -7
- package/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_runtime_api.test.mjs +346 -0
- package/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_theme_runtime.test.mjs +95 -0
- package/skills/a2h-batch-ui-align/scripts/tests/branch_coverage.test.mjs +116 -0
- package/skills/a2h-batch-ui-align/scripts/tests/build_conversion_set.test.mjs +126 -0
- package/skills/a2h-batch-ui-align/scripts/tests/build_conversion_set_scope.test.mjs +1 -0
- package/skills/a2h-batch-ui-align/scripts/tests/capture_audit.test.mjs +179 -0
- package/skills/a2h-batch-ui-align/scripts/tests/capture_fast.test.mjs +56 -0
- package/skills/a2h-batch-ui-align/scripts/tests/capture_gate.test.mjs +197 -0
- package/skills/a2h-batch-ui-align/scripts/tests/capture_review_fixes.test.mjs +322 -0
- package/skills/a2h-batch-ui-align/scripts/tests/color_utils_asset.test.mjs +19 -0
- package/skills/a2h-batch-ui-align/scripts/tests/evidence_gate.test.mjs +15 -0
- package/skills/a2h-batch-ui-align/scripts/tests/fixtures/icon_drift_search_sheet/SearchMenuDialog.buggy.ets +95 -0
- package/skills/a2h-batch-ui-align/scripts/tests/fixtures/icon_drift_search_sheet/page_0002_SearchMenuFragment/meta.json +21 -0
- package/skills/a2h-batch-ui-align/scripts/tests/fixtures/icon_drift_search_sheet/page_0002_SearchMenuFragment/screenshot.png +0 -0
- package/skills/a2h-batch-ui-align/scripts/tests/fixtures/icon_drift_search_sheet/page_0002_SearchMenuFragment/view.xml +35 -0
- package/skills/a2h-batch-ui-align/scripts/tests/group_pack_evidence.test.mjs +95 -0
- package/skills/a2h-batch-ui-align/scripts/tests/group_queue.test.mjs +155 -1
- package/skills/a2h-batch-ui-align/scripts/tests/icon_coverage.test.mjs +314 -0
- package/skills/a2h-batch-ui-align/scripts/tests/list_existing.test.mjs +157 -0
- package/skills/a2h-batch-ui-align/scripts/tests/measure_pack.test.mjs +5 -3
- package/skills/a2h-batch-ui-align/scripts/tests/page_gap.test.mjs +115 -0
- package/skills/a2h-batch-ui-align/scripts/tests/phase5_check.test.mjs +33 -2
- package/skills/a2h-batch-ui-align/scripts/tests/progress_identity.test.mjs +174 -0
- package/skills/a2h-batch-ui-align/scripts/tests/shell_contract.test.mjs +5 -0
- package/skills/a2h-batch-ui-align/scripts/tests/shell_requests.test.mjs +158 -0
- package/skills/a2h-batch-ui-align/scripts/tests/skill_doc_contract.test.mjs +12 -0
- package/skills/a2h-batch-ui-align/scripts/tests/state_doc.test.mjs +8 -0
- package/skills/a2h-coldstart-smoke-gate/SKILL.md +7 -4
- package/skills/a2h-dashboard-render/test/test_device_locale_dialogs.mjs +17 -0
- package/skills/a2h-module-semantic-docs/SKILL.md +51 -13
- package/skills/a2h-module-semantic-docs/scripts/scan_modules.mjs +66 -11
- package/skills/a2h-module-semantic-docs/test/test_incremental_fingerprint.mjs +94 -0
- package/skills/a2h-page-specgen/SKILL.md +124 -20
- package/skills/a2h-page-specgen/references/behavior-ledger.md +1170 -0
- package/skills/a2h-page-specgen/references/body-language.md +11 -9
- package/skills/a2h-page-specgen/references/evidence.md +35 -0
- package/skills/a2h-page-specgen/references/execution-model.md +135 -26
- package/skills/a2h-page-specgen/references/footprint-and-grouping.md +20 -15
- package/skills/a2h-page-specgen/references/gates.md +120 -52
- package/skills/a2h-page-specgen/references/page-inventory.md +69 -22
- package/skills/a2h-page-specgen/references/scenario-authoring.md +272 -0
- package/skills/a2h-page-specgen/references/spec-example.md +312 -0
- package/skills/a2h-page-specgen/references/spec-template.md +112 -109
- package/skills/a2h-page-specgen/scripts/behavior-audit.mjs +2436 -0
- package/skills/a2h-page-specgen/scripts/behavior-discovery.mjs +1833 -0
- package/skills/a2h-page-specgen/scripts/behavior-model.mjs +181 -0
- package/skills/a2h-page-specgen/scripts/behavior-reconcile.mjs +1205 -0
- package/skills/a2h-page-specgen/scripts/dispatch.mjs +8 -5
- package/skills/a2h-page-specgen/scripts/entry-evidence.mjs +1123 -0
- package/skills/a2h-page-specgen/scripts/facts-build.mjs +170 -61
- package/skills/a2h-page-specgen/scripts/finalize.mjs +466 -63
- package/skills/a2h-page-specgen/scripts/footprint.mjs +302 -180
- package/skills/a2h-page-specgen/scripts/gate.mjs +372 -82
- package/skills/a2h-page-specgen/scripts/interactions.mjs +215 -8
- package/skills/a2h-page-specgen/scripts/inventory.mjs +102 -0
- package/skills/a2h-page-specgen/scripts/lib/contracts.mjs +116 -216
- package/skills/a2h-page-specgen/scripts/lib/draft-store.mjs +105 -13
- package/skills/a2h-page-specgen/scripts/lib/graph-evidence.mjs +235 -0
- package/skills/a2h-page-specgen/scripts/lib/hg.mjs +520 -12
- package/skills/a2h-page-specgen/scripts/lib/homegraph-process.mjs +102 -0
- package/skills/a2h-page-specgen/scripts/lib/homegraph-query.mjs +161 -0
- package/skills/a2h-page-specgen/scripts/lib/ledger.mjs +129 -6
- package/skills/a2h-page-specgen/scripts/lib/main-module.mjs +24 -0
- package/skills/a2h-page-specgen/scripts/lib/operation-reviews.mjs +913 -0
- package/skills/a2h-page-specgen/scripts/lib/prose.mjs +12 -8
- package/skills/a2h-page-specgen/scripts/lib/recovery-policy.mjs +28 -0
- package/skills/a2h-page-specgen/scripts/lib/scope.mjs +355 -0
- package/skills/a2h-page-specgen/scripts/lib/semantic-detail.mjs +353 -0
- package/skills/a2h-page-specgen/scripts/lib/source-text.mjs +106 -0
- package/skills/a2h-page-specgen/scripts/operation-evidence.mjs +1542 -0
- package/skills/a2h-page-specgen/scripts/prepare.mjs +470 -122
- package/skills/a2h-page-specgen/scripts/render.mjs +11 -34
- package/skills/a2h-page-specgen/scripts/report.mjs +339 -6
- package/skills/a2h-page-specgen/scripts/submission.mjs +253 -88
- package/skills/a2h-page-specgen/scripts/submit.mjs +12 -6
- package/skills/a2h-page-specgen/scripts/test/acceptance/acceptance.mjs +288 -7
- package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/PlainDisplayPage.java +15 -0
- package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/PlainDisplayPage.json +26 -0
- package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/PlainDisplayPage.prompt.md +347 -0
- package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/PlainDisplayPage.worker.md +298 -0
- package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/SilentFailurePage.java +36 -0
- package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/SilentFailurePage.json +43 -0
- package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/SilentFailurePage.prompt.md +347 -0
- package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/SilentFailurePage.worker.md +298 -0
- package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/UniAppSourcePage.discovery.json +2694 -0
- package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/UniAppSourcePage.json +726 -0
- package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/UniAppSourcePage.post-review.json +108 -0
- package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/UniAppSourcePage.prompt.md +347 -0
- package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/UniAppSourcePage.review.md +65 -0
- package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/UniAppSourcePage.worker.md +265 -0
- package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/ValidatedSearchPage.java +47 -0
- package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/ValidatedSearchPage.json +54 -0
- package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/ValidatedSearchPage.prompt.md +347 -0
- package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/ValidatedSearchPage.worker.md +298 -0
- package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/branch-checklist.md +32 -0
- package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/gate-results.json +22 -0
- package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/manifest.json +111 -0
- package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/portability.test.mjs +141 -0
- package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/review.md +22 -0
- package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/run.mjs +515 -0
- package/skills/a2h-page-specgen/scripts/test/android-entry-evidence.test.mjs +585 -0
- package/skills/a2h-page-specgen/scripts/test/android-operation-evidence.test.mjs +755 -0
- package/skills/a2h-page-specgen/scripts/test/behavior-audit-group.test.mjs +543 -0
- package/skills/a2h-page-specgen/scripts/test/behavior-audit-post.test.mjs +652 -0
- package/skills/a2h-page-specgen/scripts/test/behavior-audit-pre.test.mjs +1231 -0
- package/skills/a2h-page-specgen/scripts/test/behavior-component-gate.test.mjs +494 -0
- package/skills/a2h-page-specgen/scripts/test/behavior-discovery.test.mjs +1513 -0
- package/skills/a2h-page-specgen/scripts/test/behavior-finalize.test.mjs +758 -0
- package/skills/a2h-page-specgen/scripts/test/behavior-fixtures.mjs +623 -0
- package/skills/a2h-page-specgen/scripts/test/behavior-model.test.mjs +116 -0
- package/skills/a2h-page-specgen/scripts/test/behavior-reconcile.test.mjs +795 -0
- package/skills/a2h-page-specgen/scripts/test/behavior-regression.test.mjs +883 -0
- package/skills/a2h-page-specgen/scripts/test/contracts.test.mjs +135 -137
- package/skills/a2h-page-specgen/scripts/test/entry-evidence.test.mjs +475 -0
- package/skills/a2h-page-specgen/scripts/test/facts.test.mjs +40 -1
- package/skills/a2h-page-specgen/scripts/test/finalize.test.mjs +178 -9
- package/skills/a2h-page-specgen/scripts/test/fixtures/hg.mkdb.mjs +19 -1
- package/skills/a2h-page-specgen/scripts/test/fixtures/src/BottomPanels.java +14 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/src/BottomPanels.kt +14 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/src/BottomPanelsKotlinForms.kt +12 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/src/ChildContent.java +6 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/src/ComposeLifecycle.kt +26 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/src/LifecycleCallAndOverride.java +10 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/src/LifecycleHooks.kt +31 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/src/ManyLifecycleHooks.kt +12 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/src/RefreshOnResume.java +7 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/src/RefreshResultNoise.kt +36 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/src/SelectionView.java +5 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/src/ShowPage.vue +12 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/src/ThirdPartyLifecycle.kt +25 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/src/fragment_detail.xml +1 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/uniapp-source/App.vue +1 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/uniapp-source/bundle-conflict-record.json +17 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/uniapp-source/bundle-record.json +17 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/uniapp-source/manifest.json +3 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/uniapp-source/pages/list/index.vue +80 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/uniapp-source/pages.json +14 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/uniapp-source/source-record.json +15 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/uniapp-source/src/components/RefreshPanel.vue +15 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/uniapp-source/src/composables/useRefresh.ts +50 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/uniapp-source/src/pages/help/index.vue +9 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/uniapp-source/src/state/store.ts +4 -0
- package/skills/a2h-page-specgen/scripts/test/footprint-resolve.test.mjs +459 -188
- package/skills/a2h-page-specgen/scripts/test/gate-partial.test.mjs +89 -0
- package/skills/a2h-page-specgen/scripts/test/gate.test.mjs +869 -13
- package/skills/a2h-page-specgen/scripts/test/graph-evidence.test.mjs +332 -0
- package/skills/a2h-page-specgen/scripts/test/helpers.mjs +139 -5
- package/skills/a2h-page-specgen/scripts/test/hg.test.mjs +378 -0
- package/skills/a2h-page-specgen/scripts/test/homegraph-process-fixture.mjs +130 -0
- package/skills/a2h-page-specgen/scripts/test/homegraph-query.test.mjs +288 -0
- package/skills/a2h-page-specgen/scripts/test/integration.test.mjs +69 -2
- package/skills/a2h-page-specgen/scripts/test/interactions.test.mjs +267 -2
- package/skills/a2h-page-specgen/scripts/test/inventory.test.mjs +111 -0
- package/skills/a2h-page-specgen/scripts/test/keys.test.mjs +10 -8
- package/skills/a2h-page-specgen/scripts/test/ledger-lock.test.mjs +77 -0
- package/skills/a2h-page-specgen/scripts/test/ledger.test.mjs +1 -1
- package/skills/a2h-page-specgen/scripts/test/main-module.test.mjs +43 -0
- package/skills/a2h-page-specgen/scripts/test/operation-reviews.test.mjs +1002 -0
- package/skills/a2h-page-specgen/scripts/test/plan-build.test.mjs +143 -51
- package/skills/a2h-page-specgen/scripts/test/prepare-homegraph-reproduction.mjs +365 -0
- package/skills/a2h-page-specgen/scripts/test/prepare-homegraph.test.mjs +569 -0
- package/skills/a2h-page-specgen/scripts/test/prepare-index.test.mjs +42 -2
- package/skills/a2h-page-specgen/scripts/test/prepare-pipeline.test.mjs +326 -0
- package/skills/a2h-page-specgen/scripts/test/prompt-tpl.test.mjs +171 -3
- package/skills/a2h-page-specgen/scripts/test/prose.test.mjs +13 -5
- package/skills/a2h-page-specgen/scripts/test/protocol-docs.test.mjs +365 -1
- package/skills/a2h-page-specgen/scripts/test/recovery-e2e.test.mjs +102 -7
- package/skills/a2h-page-specgen/scripts/test/recovery-policy.test.mjs +14 -0
- package/skills/a2h-page-specgen/scripts/test/recovery.test.mjs +1308 -72
- package/skills/a2h-page-specgen/scripts/test/render.test.mjs +85 -42
- package/skills/a2h-page-specgen/scripts/test/report.test.mjs +296 -0
- package/skills/a2h-page-specgen/scripts/test/review-followup.test.mjs +467 -0
- package/skills/a2h-page-specgen/scripts/test/scope.test.mjs +292 -0
- package/skills/a2h-page-specgen/scripts/test/semantic-detail.test.mjs +949 -0
- package/skills/a2h-page-specgen/scripts/test/submit.test.mjs +645 -115
- package/skills/a2h-page-specgen/scripts/test/uniapp-operation-evidence.test.mjs +639 -0
- package/skills/a2h-page-specgen/scripts/test/utg-footprint-contract.test.mjs +274 -0
- package/skills/a2h-page-specgen/scripts/test/waker-process.test.mjs +101 -65
- package/skills/a2h-page-specgen/scripts/test/waker.test.mjs +88 -74
- package/skills/a2h-page-specgen/scripts/test/watchdog.test.mjs +30 -1
- package/skills/a2h-page-specgen/scripts/waker.mjs +79 -12
- package/skills/a2h-page-specgen/scripts/watchdog.mjs +18 -17
- package/skills/a2h-resource-convert/SKILL.md +9 -1
- package/skills/a2h-resource-convert/references/code-vector-icon-rules.md +2 -1
- package/skills/a2h-resource-convert/references/incremental-page-migration.md +23 -2
- package/skills/a2h-resource-convert/references/lottie-conversion-rules.md +7 -0
- package/skills/a2h-resource-convert/references/step4-resource-types.md +2 -0
- package/skills/a2h-resource-convert/scripts/a2h_resource_convert.ts +67 -3
- package/skills/a2h-resource-convert/scripts/a2h_resource_incremental.ts +68 -0
- package/skills/a2h-resource-convert/scripts/code_vector_icons.ts +45 -3
- package/skills/a2h-resource-convert/scripts/extract_page_resources.ts +42 -5
- package/skills/a2h-resource-convert/scripts/lottie_hosts.ts +415 -0
- package/skills/a2h-resource-convert/scripts/lottie_refs.ts +398 -0
- package/skills/a2h-resource-convert/scripts/merge_mapping.ts +316 -0
- package/skills/a2h-resource-convert/scripts/svg_fidelity_check.ts +2 -1
- package/skills/a2h-resource-convert/scripts/tests/code_vector_guard.test.mjs +75 -0
- package/skills/a2h-resource-convert/scripts/tests/lottie_hosts.test.mjs +222 -0
- package/skills/a2h-resource-convert/scripts/tests/lottie_incremental.test.mjs +178 -0
- package/skills/a2h-resource-convert/scripts/tests/merge_mapping.test.mjs +201 -0
- package/skills/a2h-spec-design-pipeline/SKILL.md +48 -72
- package/skills/a2h-spec-design-pipeline/references/coding-loop.md +123 -37
- package/skills/a2h-spec-design-pipeline/references/execution-model.md +40 -8
- package/skills/a2h-spec-design-pipeline/references/final-report-template.md +5 -4
- package/skills/a2h-spec-design-pipeline/references/homegraph-cli.md +229 -0
- package/skills/a2h-spec-design-pipeline/references/initialization.md +37 -5
- package/skills/a2h-spec-design-pipeline/references/merge-queue.md +126 -23
- package/skills/a2h-spec-design-pipeline/references/permission-index.json +206 -0
- package/skills/a2h-spec-design-pipeline/references/post-loop.md +23 -0
- package/skills/a2h-spec-design-pipeline/references/resolver-prompt.md +7 -1
- package/skills/a2h-spec-design-pipeline/references/review-loop.md +46 -0
- package/skills/a2h-spec-design-pipeline/references/scripts.md +38 -14
- package/skills/a2h-spec-design-pipeline/references/shared-layer.md +127 -4
- package/skills/a2h-spec-design-pipeline/references/state-and-resume.md +90 -24
- package/skills/a2h-spec-design-pipeline/references/static-defect-gate.md +65 -34
- package/skills/a2h-spec-design-pipeline/rules/migration-rules/config/ruleMeta.json +11 -1
- package/skills/a2h-spec-design-pipeline/rules/migration-rules/config/ruleSet.json +10 -2
- package/skills/a2h-spec-design-pipeline/rules/migration-rules/data/README.md +47 -0
- package/skills/a2h-spec-design-pipeline/rules/migration-rules/data/api-param-contract.json +31 -0
- package/skills/a2h-spec-design-pipeline/rules/migration-rules/data/api-permission-map.json +698 -0
- package/skills/a2h-spec-design-pipeline/rules/migration-rules/document/checker/hometrans/api-permission-declared-cn.md +96 -0
- package/skills/a2h-spec-design-pipeline/rules/migration-rules/document/checker/hometrans/api-permission-declared-en.md +103 -0
- package/skills/a2h-spec-design-pipeline/rules/migration-rules/document/checker/hometrans/arkui-runtime-pitfall-cn.md +124 -0
- package/skills/a2h-spec-design-pipeline/rules/migration-rules/document/checker/hometrans/arkui-runtime-pitfall-en.md +138 -0
- package/skills/a2h-spec-design-pipeline/rules/migration-rules/document/checker/hometrans/platform-api-contract-cn.md +106 -0
- package/skills/a2h-spec-design-pipeline/rules/migration-rules/document/checker/hometrans/platform-api-contract-en.md +113 -0
- package/skills/a2h-spec-design-pipeline/rules/migration-rules/lib/checker/ApiPermissionDeclaredCheck.js +705 -0
- package/skills/a2h-spec-design-pipeline/rules/migration-rules/lib/checker/ArkUIRuntimePitfallCheck.js +1063 -0
- package/skills/a2h-spec-design-pipeline/rules/migration-rules/lib/checker/PlatformApiContractCheck.js +473 -0
- package/skills/a2h-spec-design-pipeline/rules/migration-rules/lib/checker/{HttpExtraDataEmptyStringCheck.js → platform/ExtraDataSubCheck.js} +27 -30
- package/skills/a2h-spec-design-pipeline/rules/migration-rules/lib/index.js +4 -2
- package/skills/a2h-spec-design-pipeline/rules/migration-rules/package.json +3 -2
- package/skills/a2h-spec-design-pipeline/scripts/check_design_map.ts +108 -0
- package/skills/a2h-spec-design-pipeline/scripts/check_permissions.ts +420 -0
- package/skills/a2h-spec-design-pipeline/scripts/check_review_evidence.ts +45 -0
- package/skills/a2h-spec-design-pipeline/scripts/dispatch/evidence.mjs +55 -2
- package/skills/a2h-spec-design-pipeline/scripts/dispatch/fold.mjs +138 -7
- package/skills/a2h-spec-design-pipeline/scripts/dispatch/landing.mjs +10 -13
- package/skills/a2h-spec-design-pipeline/scripts/dispatch/progress.mjs +21 -2
- package/skills/a2h-spec-design-pipeline/scripts/dispatch/reconcile.mjs +63 -4
- package/skills/a2h-spec-design-pipeline/scripts/dispatch/wait.mjs +32 -2
- package/skills/a2h-spec-design-pipeline/scripts/dispatch.mjs +109 -13
- package/skills/a2h-spec-design-pipeline/scripts/ensure_index.ts +866 -0
- package/skills/a2h-spec-design-pipeline/scripts/fixtures/homecheck-stub.cjs +47 -0
- package/skills/a2h-spec-design-pipeline/scripts/homecheck_scan.ts +12 -17
- package/skills/a2h-spec-design-pipeline/scripts/plan_groups.ts +172 -7
- package/skills/a2h-spec-design-pipeline/scripts/resolver_prompt.ts +36 -16
- package/skills/a2h-spec-design-pipeline/scripts/sync_permission_index.ts +340 -0
- package/skills/a2h-spec-design-pipeline/scripts/test_api_permission_declared.ts +281 -0
- package/skills/a2h-spec-design-pipeline/scripts/test_arkui_runtime_pitfall.ts +690 -0
- package/skills/a2h-spec-design-pipeline/scripts/test_check_design_map.ts +46 -0
- package/skills/a2h-spec-design-pipeline/scripts/test_check_permissions.ts +201 -0
- package/skills/a2h-spec-design-pipeline/scripts/test_dispatch_commands.mjs +27 -3
- package/skills/a2h-spec-design-pipeline/scripts/test_dispatch_e2e.mjs +20 -7
- package/skills/a2h-spec-design-pipeline/scripts/test_dispatch_evidence.mjs +143 -13
- package/skills/a2h-spec-design-pipeline/scripts/test_dispatch_fold.mjs +168 -7
- package/skills/a2h-spec-design-pipeline/scripts/test_dispatch_landing.mjs +139 -2
- package/skills/a2h-spec-design-pipeline/scripts/test_dispatch_progress.mjs +25 -0
- package/skills/a2h-spec-design-pipeline/scripts/test_dispatch_reconcile.mjs +92 -4
- package/skills/a2h-spec-design-pipeline/scripts/test_dispatch_wait.mjs +37 -0
- package/skills/a2h-spec-design-pipeline/scripts/test_ensure_index.ts +572 -0
- package/skills/a2h-spec-design-pipeline/scripts/test_ensure_index_real.ts +56 -0
- package/skills/a2h-spec-design-pipeline/scripts/test_homecheck_scan.ts +4 -5
- package/skills/a2h-spec-design-pipeline/scripts/test_homegraph_docs.ts +217 -0
- package/skills/a2h-spec-design-pipeline/scripts/test_permission_index.ts +214 -0
- package/skills/a2h-spec-design-pipeline/scripts/test_plan_groups.ts +155 -0
- package/skills/a2h-spec-design-pipeline/scripts/test_platform_api_contract.ts +308 -0
- package/skills/a2h-spec-design-pipeline/scripts/test_resolver_prompt.ts +59 -8
- package/skills/a2h-spec-design-pipeline/scripts/test_shared_layer_docs.ts +44 -0
- package/skills/a2h-spec-generate/SKILL.md +2 -2
- package/skills/a2h-spec-generate/references/specs.schema.json +24 -11
- package/skills/a2h-spec-generate/scripts/ensure-index.mjs +1 -2
- package/skills/a2h-spec-generate/test/ensure-index.test.mjs +1 -2
- package/skills/a2h-utg-explorer/SKILL.md +9 -3
- package/skills/a2h-utg-explorer/references/architecture.md +3 -0
- package/skills/a2h-utg-explorer/scripts/audit.mjs +8 -2
- package/skills/a2h-utg-explorer/scripts/compile_tasks.mjs +56 -5
- package/skills/a2h-utg-explorer/scripts/direct_launch.mjs +47 -2
- package/skills/a2h-utg-explorer/scripts/hybrid_route_cdp.mjs +376 -0
- package/skills/a2h-utg-explorer/scripts/plan.mjs +8 -0
- package/skills/a2h-utg-explorer/scripts/recover_d.mjs +288 -21
- package/skills/a2h-utg-explorer/scripts/report.mjs +89 -0
- package/skills/a2h-utg-explorer/scripts/run_cycle.mjs +67 -10
- package/skills/a2h-utg-explorer/scripts/run_device.mjs +10 -2
- package/skills/a2h-utg-explorer/scripts/seed_recipes.mjs +426 -0
- package/skills/a2h-utg-explorer/scripts/tests/blank_wait.test.mjs +126 -0
- package/skills/a2h-utg-explorer/scripts/tests/default_override.test.mjs +109 -0
- package/skills/a2h-utg-explorer/scripts/tests/device_locale_dialogs.test.mjs +29 -0
- package/skills/a2h-utg-explorer/scripts/tests/diagnostics.test.mjs +254 -0
- package/skills/a2h-utg-explorer/scripts/tests/foreground_spelling.test.mjs +155 -0
- package/skills/a2h-utg-explorer/scripts/tests/hybrid_route.test.mjs +120 -0
- package/skills/a2h-utg-explorer/scripts/tests/hybrid_route_identity.test.mjs +146 -0
- package/skills/a2h-utg-explorer/scripts/tests/interruptions.test.mjs +122 -0
- package/skills/a2h-utg-explorer/scripts/tests/launch_bridge.test.mjs +15 -0
- package/skills/a2h-utg-explorer/scripts/tests/pr169_review_fixes.test.mjs +218 -0
- package/skills/a2h-utg-explorer/scripts/tests/pr191_review_fixes.test.mjs +292 -0
- package/skills/a2h-utg-explorer/scripts/tests/recover_d_grounding.test.mjs +164 -0
- package/skills/a2h-utg-explorer/scripts/tests/replay_reroute.test.mjs +143 -0
- package/skills/a2h-utg-explorer/scripts/tests/run_cycle.test.mjs +6 -2
- package/skills/a2h-utg-explorer/scripts/tests/run_cycle_follow.test.mjs +35 -0
- package/skills/a2h-utg-explorer/scripts/tests/seed_recipes.test.mjs +261 -0
- package/skills/a2h-utg-explorer/scripts/utg_explorer/adapters.mjs +122 -4
- package/skills/a2h-utg-explorer/scripts/utg_explorer/diagnostics.mjs +196 -0
- package/skills/a2h-utg-explorer/scripts/utg_explorer/hybrid_route.mjs +140 -0
- package/skills/a2h-utg-explorer/scripts/utg_explorer/semantics.mjs +138 -4
- package/skills/a2h-utg-explorer/scripts/utg_explorer/state_phase.mjs +47 -0
- package/skills/a2h-utg-explorer/scripts/utg_explorer/strings.mjs +22 -13
- package/skills/a2h-utg-explorer/scripts/utg_explorer/task_runner.mjs +718 -42
- package/skills/a2h-utg-explorer/scripts/variant.mjs +57 -11
- package/skills/a2h-utg-static/SKILL.md +6 -2
- package/skills/a2h-utg-static/scripts/assemble.mjs +65 -0
- package/skills/a2h-utg-static/scripts/click_paths.mjs +116 -5
- package/skills/a2h-utg-static/scripts/compose_body_text.mjs +3 -3
- package/skills/a2h-utg-static/scripts/compose_overlay.mjs +8 -1
- package/skills/a2h-utg-static/scripts/compose_titles.mjs +5 -5
- package/skills/a2h-utg-static/scripts/compose_widgets.mjs +4 -4
- package/skills/a2h-utg-static/scripts/data_model.mjs +590 -0
- package/skills/a2h-utg-static/scripts/data_producers.mjs +431 -0
- package/skills/a2h-utg-static/scripts/hybrid_scope.mjs +46 -1
- package/skills/a2h-utg-static/scripts/label_resolve.mjs +49 -4
- package/skills/a2h-utg-static/scripts/lib/hybrid-provenance.mjs +201 -0
- package/skills/a2h-utg-static/scripts/lib/uniapp-routes.mjs +195 -0
- package/skills/a2h-utg-static/scripts/menu_nav.mjs +1 -1
- package/skills/a2h-utg-static/scripts/nl_hints.mjs +32 -4
- package/skills/a2h-utg-static/scripts/run_pipeline.mjs +86 -4
- package/skills/a2h-utg-static/scripts/tests/test_carry_answers.mjs +30 -0
- package/skills/a2h-utg-static/scripts/tests/test_compose_res_text.mjs +18 -0
- package/skills/a2h-utg-static/scripts/tests/test_data_model.mjs +120 -0
- package/skills/a2h-utg-static/scripts/tests/test_data_producers.mjs +114 -0
- package/skills/a2h-utg-static/scripts/tests/test_guard_kinds_locale.mjs +12 -0
- package/skills/a2h-utg-static/scripts/tests/test_hybrid_provenance.mjs +150 -0
- package/skills/a2h-utg-static/scripts/tests/test_hybrid_scope.mjs +165 -1
- package/skills/a2h-utg-static/scripts/tests/test_library_activity.mjs +45 -0
- package/skills/a2h-utg-static/scripts/tests/test_module_strings.mjs +35 -1
- package/skills/a2h-utg-static/scripts/tests/test_nl_hints_default_override.mjs +50 -0
- package/skills/a2h-utg-static/scripts/tests/test_pipeline_llm_phases.mjs +21 -0
- package/skills/a2h-utg-static/scripts/tests/test_pr169_review_fixes.mjs +172 -0
- package/skills/a2h-utg-static/scripts/tests/test_redirect_path_cost.mjs +136 -0
- package/skills/a2h-utg-static/scripts/tests/test_uniapp_route_jump.mjs +175 -0
- package/skills/a2h-utg-static/scripts/tests/test_uniapp_routes.mjs +161 -0
- package/skills/a2h-utg-static/scripts/tests/test_uniapp_source.mjs +99 -0
- package/skills/a2h-utg-static/scripts/tests/test_utg_specgen_boundary.mjs +45 -0
- package/skills/a2h-utg-static/scripts/tests/test_vm_nav_helper_navigate.mjs +21 -0
- package/skills/a2h-utg-static/scripts/uniapp_nav.mjs +112 -69
- package/skills/a2h-utg-static/scripts/vm_nav.mjs +9 -1
- package/README.md +0 -440
- package/dist/cli/config-store.js +0 -128
- package/dist/cli/config.js +0 -48
- package/dist/cli/editors.json +0 -114
- package/dist/cli/env-vars.js +0 -127
- package/dist/cli/index.js +0 -76
- package/dist/cli/init.js +0 -2618
- package/dist/cli/uninstall.js +0 -406
- package/dist/platform/compose.js +0 -228
- package/dist/platform/frontmatter.js +0 -151
- package/dist/platform/installer.js +0 -417
- package/dist/platform/language.js +0 -77
- package/dist/platform/registry.js +0 -337
- package/dist/platform/transform.js +0 -363
- package/dist/platform/types.js +0 -9
- package/dist/platform/validate.js +0 -152
- package/dist/utils/regex.js +0 -7
- package/env-requirements.json +0 -536
- package/resource/choose_editor.png +0 -0
- package/resource/convert_pipeline_process.svg +0 -114
- package/resource/project_architecture.svg +0 -120
- package/resource/set_environment.png +0 -0
- package/resource/set_multimodel.png +0 -0
- package/resource/set_sdk.png +0 -0
- package/resource/title_dark.png +0 -0
- package/skills/a2h-spec-design-pipeline/rules/migration-rules/document/checker/hometrans/http-extra-data-empty-string-cn.md +0 -55
- package/skills/a2h-spec-design-pipeline/rules/migration-rules/document/checker/hometrans/http-extra-data-empty-string-en.md +0 -60
- package/skills/a2h-spec-design-pipeline/scripts/ensure_wt_index.ts +0 -948
- package/skills/a2h-spec-design-pipeline/scripts/test_ensure_wt_index.ts +0 -1014
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
// static_check/rules/scroll_align.ts — split out of arkts_static_check.ts
|
|
1
|
+
// static_check/rules/scroll_align.ts — split out of arkts_static_check.ts.
|
|
2
2
|
|
|
3
3
|
import { report } from '../core/findings.ts';
|
|
4
|
-
import { containerBlocks } from '../core/parse.ts';
|
|
4
|
+
import { containerBlocks, markedAbove } from '../core/parse.ts';
|
|
5
|
+
import type { ContainerBlock } from '../core/parse.ts';
|
|
5
6
|
import type { FileCtx } from '../core/scan.ts';
|
|
6
7
|
import type { RuleMeta } from '../core/meta.ts';
|
|
7
8
|
|
|
@@ -9,14 +10,16 @@ import type { RuleMeta } from '../core/meta.ts';
|
|
|
9
10
|
export const meta: RuleMeta[] = [
|
|
10
11
|
{
|
|
11
12
|
id: "scroll-align-default-center",
|
|
12
|
-
levels: ["CAND"],
|
|
13
|
+
levels: ["GATE", "CAND"],
|
|
13
14
|
invariant: "geometry",
|
|
14
15
|
card: "alignment",
|
|
15
16
|
needs: [],
|
|
16
|
-
summary: "a vertical `Scroll` writes no `.align()` (defaults to Alignment.Center).",
|
|
17
|
-
fix: "
|
|
18
|
-
escape:
|
|
19
|
-
cases: [
|
|
17
|
+
summary: "a vertical `Scroll` writes no `.align()` (defaults to Alignment.Center); GATE when the content contains ForEach / LazyForEach / Repeat (data-driven, item count unknown), CAND otherwise.",
|
|
18
|
+
fix: "write .align(Alignment.TopStart) (`align` is a universal attribute; the API reference \"Location\" lists it as effective on Scroll, default Alignment.Center). When it really is centered (Android fillViewport + gravity=center), write `// SCROLL-CENTER: <basis>` above the Scroll to downgrade to CAND; EVIDENCE text does not close this rule",
|
|
19
|
+
escape: "// SCROLL-CENTER:",
|
|
20
|
+
cases: [
|
|
21
|
+
"Measured (CoolMall category goods page): a Scroll wrapping two goods columns left the whole column floating mid-viewport with few items; G008 waved the CAND through with one EVIDENCE comment, and G006/G016/G038 even believed Scroll has no .align attribute.",
|
|
22
|
+
],
|
|
20
23
|
},
|
|
21
24
|
{
|
|
22
25
|
id: "scroll-align-not-top",
|
|
@@ -31,36 +34,72 @@ export const meta: RuleMeta[] = [
|
|
|
31
34
|
"Measured: the preferences list on the WeatherApp settings page was vertically centered on a black background, while Android anchors it to the top.",
|
|
32
35
|
],
|
|
33
36
|
},
|
|
37
|
+
{
|
|
38
|
+
id: "hscroll-centered-in-column",
|
|
39
|
+
levels: ["GATE", "CAND"],
|
|
40
|
+
invariant: "geometry",
|
|
41
|
+
card: "alignment",
|
|
42
|
+
needs: [],
|
|
43
|
+
summary: "a horizontal `Scroll` has no width (it shrinks to its content) and the `Column` directly around it writes no `alignItems` (default HorizontalAlign.Center); GATE when the content is ForEach / LazyForEach / Repeat, CAND otherwise.",
|
|
44
|
+
fix: "Compose LazyRow / HorizontalScrollView fill the width and start at the leading edge. Give the horizontal Scroll `.width('100%')` + `.align(Alignment.Start)` (horizontally Start = left + vertically centered, which is what is wanted), or write `.alignItems(HorizontalAlign.Start)` on the parent Column. When centered on purpose, write `// SCROLL-CENTER: <basis>` above the Scroll to downgrade to CAND",
|
|
45
|
+
escape: "// SCROLL-CENTER:",
|
|
46
|
+
cases: [
|
|
47
|
+
"Measured (CoolMall \"Me\" page, \"My footprints\"): a LazyRow became an unsized horizontal Scroll and the parent card Column wrote no alignItems, so with one or two footprints the row was centered while Android lays it out from the left. The old rule skipped horizontal Scrolls entirely.",
|
|
48
|
+
],
|
|
49
|
+
},
|
|
34
50
|
];
|
|
35
51
|
|
|
52
|
+
/** The Scroll content repeats items: their count is data, so "it always fills the viewport" cannot be assumed. */
|
|
53
|
+
const DATA_DRIVEN: RegExp = /\b(?:ForEach|LazyForEach|Repeat)\s*\(/;
|
|
36
54
|
|
|
55
|
+
/** Component kinds whose `{ … }` block can directly hold a Scroll. */
|
|
56
|
+
const HOSTS: string[] = ['Column', 'Row', 'Stack', 'Flex', 'RelativeContainer', 'ListItem', 'GridItem', 'FlowItem',
|
|
57
|
+
'Scroll', 'Refresh', 'NavDestination', 'Navigation', 'TabContent'];
|
|
37
58
|
|
|
38
|
-
|
|
39
|
-
|
|
59
|
+
/** The innermost component block enclosing line `at` (0-based), or null when none is found in this file. */
|
|
60
|
+
function enclosingBlock(codeLines: string[], at: number): { kind: string; blk: ContainerBlock } | null {
|
|
61
|
+
let best: { kind: string; blk: ContainerBlock } | null = null;
|
|
62
|
+
for (const kind of HOSTS) {
|
|
63
|
+
for (const b of containerBlocks(codeLines, kind)) {
|
|
64
|
+
if (b.open < at && b.close >= at && (best === null || b.open > best.blk.open)) { best = { kind, blk: b }; }
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
return best;
|
|
68
|
+
}
|
|
40
69
|
|
|
41
70
|
export function checkScrollAlign(fctx: FileCtx): void {
|
|
42
|
-
const {
|
|
71
|
+
const { rel, rawLines, codeLines } = fctx;
|
|
43
72
|
// ---- R8c: Scroll's .align() takes a vertically centered/bottom value
|
|
44
73
|
//
|
|
45
|
-
// Scroll's align
|
|
46
|
-
//
|
|
47
|
-
//
|
|
48
|
-
// -
|
|
49
|
-
// -
|
|
50
|
-
//
|
|
51
|
-
//
|
|
52
|
-
//
|
|
53
|
-
//
|
|
74
|
+
// Scroll's align (a universal attribute; the API reference "Location" lists Scroll among the components it takes effect
|
|
75
|
+
// on, default Alignment.Center) decides where content shorter than the viewport sits. The trap is
|
|
76
|
+
// **Alignment.Start = left + vertically centered** (not top-left).
|
|
77
|
+
// - Start is GATE: "left + vertically centered" has almost no Android counterpart.
|
|
78
|
+
// - No .align() over data-driven content (ForEach / LazyForEach / Repeat) is GATE: the item count decides whether the
|
|
79
|
+
// content is shorter than the viewport, so "it always fills the screen" is no reason (CoolMall category list floated
|
|
80
|
+
// mid-screen with few items after the CAND had been waved through by an EVIDENCE note).
|
|
81
|
+
// - Other non-Top values (Center/Bottom*/End) and static content without .align() stay CAND: Android has legitimate
|
|
82
|
+
// ways not to top-align (fillViewport + gravity=center, stackFromEnd / reverseLayout).
|
|
83
|
+
// Horizontal Scroll: what goes wrong is the horizontal position — an unsized horizontal Scroll shrinks to its content
|
|
84
|
+
// and a parent Column (default HorizontalAlign.Center) centers it (CoolMall "My footprints").
|
|
54
85
|
for (const blk of containerBlocks(codeLines, 'Scroll')) {
|
|
55
86
|
const attrs: string = blk.attrs;
|
|
56
|
-
|
|
87
|
+
const marked: boolean = markedAbove(rawLines, blk.open + 1, 'SCROLL-CENTER');
|
|
88
|
+
const dataDriven: boolean = DATA_DRIVEN.test(blk.bodyLines.join('\n'));
|
|
89
|
+
if (/\.scrollable\(\s*ScrollDirection\.Horizontal\s*\)/.test(attrs)) {
|
|
90
|
+
checkHorizontal(rel, codeLines, blk, attrs, marked, dataDriven);
|
|
91
|
+
continue;
|
|
92
|
+
}
|
|
93
|
+
if (/\.scrollable\(\s*ScrollDirection\.Free\s*\)/.test(attrs)) { continue; }
|
|
57
94
|
const am: RegExpMatchArray | null = attrs.match(/\.align\(\s*Alignment\.(\w+)\s*\)/);
|
|
58
95
|
if (am !== null && /^Top/.test(am[1])) { continue; }
|
|
59
96
|
if (am === null) {
|
|
60
|
-
report('CAND', 'scroll-align-default-center', rel, blk.open + 1,
|
|
97
|
+
report(dataDriven && !marked ? 'GATE' : 'CAND', 'scroll-align-default-center', rel, blk.open + 1,
|
|
61
98
|
'Scroll has no .align(), default Alignment.Center: content shorter than the viewport is **centered vertically**. ' +
|
|
62
|
-
'Android ScrollView/RecyclerView start at the top
|
|
63
|
-
'
|
|
99
|
+
'Android ScrollView/RecyclerView/LazyColumn start at the top — write .align(Alignment.TopStart) ' +
|
|
100
|
+
'(align is a universal attribute that takes effect on Scroll). ' +
|
|
101
|
+
(dataDriven ? 'The content repeats items (ForEach/LazyForEach/Repeat): a short list is a normal state, not an edge case. ' : '') +
|
|
102
|
+
'When it really is centered (fillViewport + gravity=center), write // SCROLL-CENTER: <basis> above the Scroll');
|
|
64
103
|
} else if (am[1] === 'Start') {
|
|
65
104
|
report('GATE', 'scroll-align-not-top', rel, blk.open + 1,
|
|
66
105
|
'Scroll .align(Alignment.Start) — Alignment.Start = left + **vertically centered**, not top-left; ' +
|
|
@@ -73,3 +112,16 @@ export function checkScrollAlign(fctx: FileCtx): void {
|
|
|
73
112
|
}
|
|
74
113
|
}
|
|
75
114
|
}
|
|
115
|
+
|
|
116
|
+
/** Horizontal Scroll without a width of its own, directly inside a Column that does not set alignItems → centered row. */
|
|
117
|
+
function checkHorizontal(rel: string, codeLines: string[], blk: ContainerBlock, attrs: string, marked: boolean,
|
|
118
|
+
dataDriven: boolean): void {
|
|
119
|
+
if (/\.(?:width|layoutWeight|size|constraintSize)\s*\(/.test(attrs)) { return; }
|
|
120
|
+
const host = enclosingBlock(codeLines, blk.open);
|
|
121
|
+
if (host === null || host.kind !== 'Column' || /\.alignItems\s*\(/.test(host.blk.attrs)) { return; }
|
|
122
|
+
report(dataDriven && !marked ? 'GATE' : 'CAND', 'hscroll-centered-in-column', rel, blk.open + 1,
|
|
123
|
+
'Horizontal Scroll has no width, so it shrinks to its content, and its parent Column (line ' + (host.blk.open + 1) +
|
|
124
|
+
') has no alignItems (default HorizontalAlign.Center): a short row sits in the **middle**. ' +
|
|
125
|
+
"Compose LazyRow / HorizontalScrollView fill the width and start at the leading edge — write .width('100%').align(Alignment.Start) " +
|
|
126
|
+
'on the Scroll, or .alignItems(HorizontalAlign.Start) on the Column. When centered on purpose, write // SCROLL-CENTER: <basis> above the Scroll');
|
|
127
|
+
}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
// static_check/rules/swiper_index.ts — GATE swiper-index-unbound.
|
|
2
|
+
|
|
3
|
+
import { report } from '../core/findings.ts';
|
|
4
|
+
import { attrsWithArgs, lineOfIndex, matchBracket, maskStrings, structBodyAt } from '../core/parse.ts';
|
|
5
|
+
import type { FileCtx } from '../core/scan.ts';
|
|
6
|
+
import type { RuleMeta } from '../core/meta.ts';
|
|
7
|
+
|
|
8
|
+
/** Rule metadata (rendered by scripts/gen_rule_docs.mjs). */
|
|
9
|
+
export const meta: RuleMeta[] = [
|
|
10
|
+
{
|
|
11
|
+
id: "swiper-index-unbound",
|
|
12
|
+
levels: ["GATE"],
|
|
13
|
+
invariant: "interaction",
|
|
14
|
+
card: "dynamics",
|
|
15
|
+
needs: [],
|
|
16
|
+
summary: "`aboutToAppear()` calls `this.<ctrl>.changeIndex(…)`, while the attribute chain of `Swiper(this.<ctrl>)` in the same file has no `.index(…)`.",
|
|
17
|
+
fix: "`aboutToAppear` runs before `build()` (custom component lifecycle doc), when the Swiper does not exist yet and the controller has nothing to page; the initial page is decided by `.index()` and is page 0 when it is unset (FAQ \"How does Swiper show the page at a given index\"). Give the Swiper `.index(this.vm.selectedTabIndex)` (V1 can bind it two-way with `$$`) so state drives both the initial page and later page changes; keep `changeIndex` for user actions after build.",
|
|
18
|
+
escape: null,
|
|
19
|
+
cases: [
|
|
20
|
+
"Measured (CoolMall My Orders, glm53 11-19): entering from \"Me\" via \"To ship\" with a tab parameter, `aboutToAppear` ran `updateTabByPage(tab)` to load the target page and called `swiperController.changeIndex(tab, false)`; the Swiper had no `.index()`, so the screen stayed on page 0, which was never loaded, and kept showing the skeleton. The sub-agent writing the wiring had written \"may throw or no-op. Wrapped in try/catch — good enough\" in its trace.",
|
|
21
|
+
],
|
|
22
|
+
},
|
|
23
|
+
];
|
|
24
|
+
|
|
25
|
+
/** Body [open, close] of every `aboutToAppear()` method in the file (one per struct). */
|
|
26
|
+
function aboutToAppearBodies(code: string, masked: string): [number, number][] {
|
|
27
|
+
const out: [number, number][] = [];
|
|
28
|
+
for (const m of masked.matchAll(/\baboutToAppear\s*\([^)]*\)\s*(?::\s*[\w<>\s|]+)?\{/g)) {
|
|
29
|
+
const open: number = (m.index ?? 0) + m[0].length - 1;
|
|
30
|
+
const close: number = matchBracket(code, open);
|
|
31
|
+
if (close > 0) { out.push([open, close]); }
|
|
32
|
+
}
|
|
33
|
+
return out;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* GATE swiper-index-unbound: changeIndex() on a Swiper controller inside aboutToAppear, while that Swiper has no
|
|
38
|
+
* .index(). aboutToAppear runs before build(), so the Swiper does not exist yet; without .index() the Swiper
|
|
39
|
+
* first shows page 0 whatever the controller was asked. Lexical: controller names `this.<name>`; the Swiper
|
|
40
|
+
* is the `Swiper(this.<name>)` call in the same file.
|
|
41
|
+
*/
|
|
42
|
+
export function checkSwiperIndexUnbound(fctx: FileCtx): void {
|
|
43
|
+
const masked: string = maskStrings(fctx.code);
|
|
44
|
+
for (const body of aboutToAppearBodies(fctx.code, masked)) {
|
|
45
|
+
// `this.<ctrl>` names the struct's own member, so its Swiper is looked up in the same struct
|
|
46
|
+
const [sOpen, sClose] = structBodyAt(fctx.code, masked, body[0]);
|
|
47
|
+
const inStruct: string = masked.slice(sOpen, sClose);
|
|
48
|
+
const inBody: string = masked.slice(body[0], body[1]);
|
|
49
|
+
const seen: Set<string> = new Set();
|
|
50
|
+
for (const c of inBody.matchAll(/\bthis\.([A-Za-z_$][\w$]*)\s*\.\s*changeIndex\s*\(/g)) {
|
|
51
|
+
const ctrl: string = c[1];
|
|
52
|
+
if (seen.has(ctrl)) { continue; }
|
|
53
|
+
seen.add(ctrl);
|
|
54
|
+
const sw: RegExpExecArray | null = new RegExp(`\\bSwiper\\s*\\(\\s*this\\.${ctrl}\\s*\\)`).exec(inStruct);
|
|
55
|
+
if (sw === null) { continue; }
|
|
56
|
+
const at: number = sOpen + sw.index;
|
|
57
|
+
const paren: number = at + sw[0].indexOf('(');
|
|
58
|
+
if (attrsWithArgs(fctx.code, paren).some((a) => a.name === 'index')) { continue; }
|
|
59
|
+
report('GATE', 'swiper-index-unbound', fctx.rel, lineOfIndex(fctx.code, body[0] + (c.index ?? 0)),
|
|
60
|
+
`this.${ctrl}.changeIndex() in aboutToAppear, but Swiper(this.${ctrl}) (line ${lineOfIndex(fctx.code, at)}) has no .index(): ` +
|
|
61
|
+
'aboutToAppear runs before build(), so there is no Swiper to turn yet, and without .index() it opens on page 0. ' +
|
|
62
|
+
'Bind .index(<state holding the selected page>) on the Swiper and set that state instead');
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import * as fs from 'fs';
|
|
4
4
|
import * as path from 'path';
|
|
5
5
|
import { report } from '../core/findings.ts';
|
|
6
|
-
import { markedAbove } from '../core/parse.ts';
|
|
6
|
+
import { lineOfIndex, markedAbove } from '../core/parse.ts';
|
|
7
7
|
import type { FileScan } from '../core/scan.ts';
|
|
8
8
|
import type { RuleMeta } from '../core/meta.ts';
|
|
9
9
|
import { COLOR_ARG, isVettedColorUtils } from './color_string.ts';
|
|
@@ -17,7 +17,7 @@ export const meta: RuleMeta[] = [
|
|
|
17
17
|
card: "resources",
|
|
18
18
|
needs: ["shell-plan"],
|
|
19
19
|
summary: "the shell contract's theme.mode is not static (Android has a dark scheme or a runtime theme colour), and an .ets file contains a `'#…'` colour literal, or a colour-attribute argument is a fixed enum such as `Color.White` / `Color.Black`.",
|
|
20
|
-
fix: "change it to `$r('app.color.<name>')`, defined under the same name in both the base and dark color.json (the dark value cites the line of the Android dark scheme / values-night), submitted through registry_requests `color` / `dark_color`; a runtime theme colour is read through a getter of the observable theme state. A colour whose value is the same in both Android schemes gets `// THEME-FIXED: <both scheme lines>` above it (downgraded to CAND).",
|
|
20
|
+
fix: "change it to `$r('app.color.<name>')`, defined under the same name in both the base and dark color.json (the dark value cites the line of the Android dark scheme / values-night), submitted through registry_requests `color` / `dark_color`; a runtime theme colour listed in the contract's `theme.runtime_slots` does not use `$r`: it is read through a getter of the observable theme state in `theme.state_module` (GATE `theme-runtime-color-static`). A colour whose value is the same in both Android schemes gets `// THEME-FIXED: <both scheme lines>` above it (downgraded to CAND).",
|
|
21
21
|
escape: "// THEME-FIXED:",
|
|
22
22
|
cases: [
|
|
23
23
|
"Measured CoolMall 11-07: AppTheme picks Dark/LightColorScheme by isSystemInDarkTheme and takes primary from a preference flow; the batch UI migration copied the light values into `static readonly BG_WHITE = '#FFFFFF'`. setColorMode(DARK) only switches resource qualifiers, so 30+ pages did not change; review judged it PARTIAL and it was then shelved as UI_OUT_OF_SCOPE.",
|
|
@@ -34,6 +34,19 @@ export const meta: RuleMeta[] = [
|
|
|
34
34
|
escape: null,
|
|
35
35
|
cases: [],
|
|
36
36
|
},
|
|
37
|
+
{
|
|
38
|
+
id: "theme-runtime-color-static",
|
|
39
|
+
levels: ["GATE", "CAND"],
|
|
40
|
+
invariant: "appearance",
|
|
41
|
+
card: "resources",
|
|
42
|
+
needs: ["shell-plan"],
|
|
43
|
+
summary: "the shell contract's `theme.runtime_slots` is non-empty (the Android colour scheme's `primary` comes from a user setting), and `$r('app.color.<slot>')` appears in a colour attribute or colour field; or the project has a second theme-state implementation (a file other than `theme.state_module` declares a `*Theme*Store` / `*ThemeState` class).",
|
|
44
|
+
fix: "read the runtime theme colour through a getter of the observable theme state in `theme.state_module` (V2: `@ObservedV2` + `@Trace`; the component holds the instance and writes `.backgroundColor(this.theme.primary)`); `$r('app.color.<slot>')` is a compile-time resource and does not follow the colour the user picks. Where the colour really stays the brand colour and does not follow the skin (e.g. the splash logo), write `// THEME-STATIC: <Android basis file:line>` above it (downgraded to CAND). Delete a second theme-state implementation and import `state_module` instead.",
|
|
45
|
+
escape: "// THEME-STATIC:",
|
|
46
|
+
cases: [
|
|
47
|
+
"Measured (CoolMall skin switching, glm53 11-19): after picking purple/green/orange/red on the settings page, only the login and settings pages changed colour; the 4 tab pages home, category, cart and me had 12 `$r('app.color.primary')` in total. G003 had written in its trace \"static resource won't reflect runtime changes … GATE theme-color-literal only forbids literals … the logic stage's job\"; the project grew 3 ThemeStores one after another, merged only in Step 5.5.",
|
|
48
|
+
],
|
|
49
|
+
},
|
|
37
50
|
];
|
|
38
51
|
|
|
39
52
|
const HEX: RegExp = /(['"])#([0-9A-Fa-f]{3}|[0-9A-Fa-f]{4}|[0-9A-Fa-f]{6}|[0-9A-Fa-f]{8})\1/g;
|
|
@@ -44,6 +57,54 @@ function transparent(hex: string): boolean {
|
|
|
44
57
|
return (hex.length === 4 && hex[0] === '0') || (hex.length === 8 && hex.startsWith('00'));
|
|
45
58
|
}
|
|
46
59
|
|
|
60
|
+
/** The contract's runtime theme facts: the user-driven scheme slots and the one module allowed to hold them. */
|
|
61
|
+
export function runtimeTheme(hometransDir: string): { slots: string[]; stateModule: string | null } {
|
|
62
|
+
try {
|
|
63
|
+
const c: any = JSON.parse(fs.readFileSync(path.join(hometransDir, 'shell_contract.json'), 'utf8'));
|
|
64
|
+
const slots: string[] = Array.isArray(c?.theme?.runtime_slots) ? c.theme.runtime_slots.filter((x: unknown) => typeof x === 'string') : [];
|
|
65
|
+
return { slots, stateModule: typeof c?.theme?.state_module === 'string' ? c.theme.state_module : null };
|
|
66
|
+
} catch { return { slots: [], stateModule: null }; }
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* GATE theme-runtime-color-static: with a user-picked scheme colour (contract theme.runtime_slots), a
|
|
71
|
+
* `$r('app.color.<slot>')` in a colour slot is a compile-time resource and never follows the user's choice. A
|
|
72
|
+
* second theme-state class outside theme.state_module splits the source of truth (CoolMall grew three).
|
|
73
|
+
*/
|
|
74
|
+
export function checkRuntimeThemeColors(scans: FileScan[], hometransDir: string): void {
|
|
75
|
+
const { slots, stateModule } = runtimeTheme(hometransDir);
|
|
76
|
+
if (slots.length === 0) { return; }
|
|
77
|
+
const slotRe: RegExp = new RegExp(`\\$r\\(\\s*(['"])app\\.color\\.(${slots.join('|')})\\1\\s*\\)`, 'g');
|
|
78
|
+
// state_module is project-relative (`entry/src/main/ets/common/ThemeState.ets`); the module may sit under
|
|
79
|
+
// products/entry, so files are matched on the part after src/main/ets/.
|
|
80
|
+
const tail: string | null = stateModule === null ? null : stateModule.replace(/^.*?src\/main\/ets\//, '');
|
|
81
|
+
const stem: string | null = tail === null ? null : (tail.split('/').pop() ?? '').replace(/\.ets$/, '');
|
|
82
|
+
for (const s of scans) {
|
|
83
|
+
const rawLines: string[] = s.src.split('\n');
|
|
84
|
+
const codeLines: string[] = s.code.split('\n');
|
|
85
|
+
for (let i = 0; i < codeLines.length; i++) {
|
|
86
|
+
for (const m of codeLines[i].matchAll(slotRe)) {
|
|
87
|
+
const head: string = codeLines[i].slice(0, m.index ?? 0);
|
|
88
|
+
const prev: string = head.trim() === '' && i > 0 ? codeLines[i - 1].trimEnd() : head;
|
|
89
|
+
if (!COLOR_ARG.test(prev)) { continue; }
|
|
90
|
+
const fixed: boolean = markedAbove(rawLines, i + 1, 'THEME-STATIC');
|
|
91
|
+
report(fixed ? 'CAND' : 'GATE', 'theme-runtime-color-static', s.rel, i + 1,
|
|
92
|
+
`${m[0]} is a compile-time resource, but the Android scheme's ${m[2]} comes from a user setting (Project Fact (Shell Contract) theme.runtime_slots): ` +
|
|
93
|
+
`it never follows the chosen colour. Read it from the theme state in ${stateModule ?? 'theme.state_module'} through a getter; ` +
|
|
94
|
+
'a colour that really stays the brand colour: // THEME-STATIC: <Android file:line>');
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
if (tail !== null && s.abs.replace(/\\/g, '/').endsWith('/src/main/ets/' + tail)) { continue; }
|
|
98
|
+
// An adapter that imports the state module re-exposes the one source; it is not a second one.
|
|
99
|
+
if (stem !== null && new RegExp(`\\bfrom\\s+(['"])[^'"]*\\b${stem}\\1`).test(s.code)) { continue; }
|
|
100
|
+
for (const m of s.code.matchAll(/^\s*(?:export\s+)?class\s+([A-Za-z_$]*Theme[A-Za-z_$]*(?:Store|State))\b/gm)) {
|
|
101
|
+
report('GATE', 'theme-runtime-color-static', s.rel, lineOfIndex(s.code, m.index ?? 0),
|
|
102
|
+
`class ${m[1]} is a second theme state: the runtime theme colour lives only in ${stateModule ?? 'theme.state_module'} ` +
|
|
103
|
+
'(entry group). Delete this class and import that module, or the pages split between two sources');
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
|
|
47
108
|
export function themeMode(hometransDir: string): string | null {
|
|
48
109
|
try {
|
|
49
110
|
const c: any = JSON.parse(fs.readFileSync(path.join(hometransDir, 'shell_contract.json'), 'utf8'));
|
|
@@ -0,0 +1,231 @@
|
|
|
1
|
+
// static_check/rules/waterflow_sections.ts — WaterFlow driven by `sections` with no gap anywhere, and section item
|
|
2
|
+
// counts written as number literals.
|
|
3
|
+
//
|
|
4
|
+
// SDK water_flow.d.ts SectionOptions: columnsGap / rowsGap fall back to the WaterFlow attribute of the same name,
|
|
5
|
+
// margin defaults to 0. With neither set, every FlowItem touches the next one (0 vp), while the Compose source
|
|
6
|
+
// (LazyVerticalStaggeredGrid / LazyVerticalGrid) almost always spaces items with verticalItemSpacing / spacedBy /
|
|
7
|
+
// contentPadding. SectionOptions docs also require the section counts to match the real child count after every change.
|
|
8
|
+
|
|
9
|
+
import * as fs from 'fs';
|
|
10
|
+
import * as path from 'path';
|
|
11
|
+
import { report } from '../core/findings.ts';
|
|
12
|
+
import { attrsWithArgs, lineOfIndex, markedAbove, matchBracket, splitTopLevel, structBodyAt } from '../core/parse.ts';
|
|
13
|
+
import { grepAndroidSource } from '../core/android.ts';
|
|
14
|
+
import { maskedOf } from '../core/scan.ts';
|
|
15
|
+
import type { FileScan } from '../core/scan.ts';
|
|
16
|
+
import type { RuleMeta } from '../core/meta.ts';
|
|
17
|
+
|
|
18
|
+
/** Rule metadata (rendered by scripts/gen_rule_docs.mjs). */
|
|
19
|
+
export const meta: RuleMeta[] = [
|
|
20
|
+
{
|
|
21
|
+
id: "waterflow-sections-no-gap",
|
|
22
|
+
levels: ["GATE", "CAND"],
|
|
23
|
+
invariant: "geometry",
|
|
24
|
+
card: "geometry",
|
|
25
|
+
needs: [],
|
|
26
|
+
summary: "`WaterFlow({ sections: … })` has no `columnsGap` / `rowsGap` in its attribute chain, no `SectionOptions` added to that sections object writes `rowsGap` / `columnsGap` / `margin`, and no FlowItem writes `margin` / `padding`: every FlowItem touches the next one. Each WaterFlow is judged by its own sections (nested objects, callbacks and building the object before assigning the gap all count). GATE needs both: the sections and FlowItems are visible in this file, and with `--android` the Android source this file ports (same file name, or this file cites `X.kt`) has a Lazy*Grid writing `verticalItemSpacing` / `spacedBy`. Sections built in a ViewModel or another file, or FlowItems supplied by a @Builder / component, are CAND only.",
|
|
27
|
+
fix: "SDK SectionOptions: columnsGap / rowsGap fall back to the WaterFlow attribute of the same name, margin defaults to 0. Map the Compose source item by item: `contentPadding` → each section `margin` (or WaterFlow `.padding`), `horizontalArrangement = spacedBy(x)` → `columnsGap`, `verticalItemSpacing = y` → `rowsGap`; full-line items (`span = FullLine`) go into a `crossCount: 1` section that also writes `rowsGap`. When the source really has no spacing, write `// WATERFLOW-GAP: <source evidence>` above the WaterFlow to close this rule.",
|
|
28
|
+
escape: "// WATERFLOW-GAP:",
|
|
29
|
+
cases: [
|
|
30
|
+
"Measured (CoolMall home): Android LazyVerticalStaggeredGrid(contentPadding 12, spacedBy 12, verticalItemSpacing 12); the HarmonyOS home WaterFlow's two SectionOptions only write itemsCount / crossCount, so banner, coupon, category, flash sale and recommended goods touch each other (dump: FlowItem [402,988] → [988,1163] → [1163,1775]).",
|
|
31
|
+
],
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
id: "waterflow-section-count-literal",
|
|
35
|
+
levels: ["CAND"],
|
|
36
|
+
invariant: "geometry",
|
|
37
|
+
card: "geometry",
|
|
38
|
+
needs: [],
|
|
39
|
+
summary: "`SectionOptions` `itemsCount` is written as a number literal.",
|
|
40
|
+
fix: "SDK WaterFlowSections: after changing sections, the child counts of all sections must add up to the real number of WaterFlow children, or the layout breaks and stops scrolling. Compute itemsCount from the data source (e.g. `this.vm.listData.length`) and sync with `sections.update` / `splice` when the data changes (refresh, load more, mock replaced by real data); do not switch between full-line and grid content with if/else inside one FlowItem template, split them into sections.",
|
|
41
|
+
escape: null,
|
|
42
|
+
cases: [
|
|
43
|
+
"Measured (CoolMall home): sections hard-coded to 12 / 51 over a data source built from mock arrays; grid items in the All Goods area were measured at full-line width (aspectRatio(1) images about 1116px tall, the sold count on the right clipped), mixed with single-column items.",
|
|
44
|
+
],
|
|
45
|
+
},
|
|
46
|
+
];
|
|
47
|
+
|
|
48
|
+
/** Stems (file names without extension) of the Android kt/java files that space a lazy grid (cached per dir). */
|
|
49
|
+
const androidSpacing: Map<string, Set<string>> = new Map();
|
|
50
|
+
function androidSpacedStems(dir: string): Set<string> {
|
|
51
|
+
let v: Set<string> | undefined = androidSpacing.get(dir);
|
|
52
|
+
if (v === undefined) {
|
|
53
|
+
// grepAndroidSource matches line by line; `verticalItemSpacing` exists only on lazy staggered grids, and files that
|
|
54
|
+
// build a LazyVertical*Grid are pre-filtered by the quick substring.
|
|
55
|
+
const hits: Map<string, string[]> = grepAndroidSource(dir, 'LazyVertical',
|
|
56
|
+
/\bverticalItemSpacing\s*=|\b(?:horizontal|vertical)Arrangement\s*=\s*Arrangement\.spacedBy\b/);
|
|
57
|
+
v = new Set(hits.keys());
|
|
58
|
+
androidSpacing.set(dir, v);
|
|
59
|
+
}
|
|
60
|
+
return v;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* Whether this .ets file ports a spaced Android grid: it has the Android file's stem as its name, or cites the file
|
|
65
|
+
* (`HomeScreen.kt`). A spaced grid somewhere else in the project says nothing about this WaterFlow.
|
|
66
|
+
*/
|
|
67
|
+
function portsSpacedGrid(s: FileScan, stems: Set<string>): boolean {
|
|
68
|
+
const base: string = path.basename(s.abs).replace(/\.ets$/, '');
|
|
69
|
+
for (const stem of stems) {
|
|
70
|
+
if (stem === base) { return true; }
|
|
71
|
+
if (new RegExp('(?<![\\w$])' + stem.replace(/\$/g, '\\$') + '\\.(?:kt|java)\\b').test(s.src)) { return true; }
|
|
72
|
+
}
|
|
73
|
+
return false;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
const GAP_KEYS: RegExp = /^\s*(?:rowsGap|columnsGap|margin)\s*\??\s*:/;
|
|
77
|
+
|
|
78
|
+
/** One piece of gap evidence: a gap is written / no gap / this file cannot tell. */
|
|
79
|
+
type Gap = 'gap' | 'none' | 'unknown';
|
|
80
|
+
const join = (a: Gap, b: Gap): Gap => (a === 'gap' || b === 'gap' ? 'gap' : a === 'unknown' || b === 'unknown' ? 'unknown' : 'none');
|
|
81
|
+
|
|
82
|
+
/** Top-level keys of the object literal at code[open] === '{' (nested `margin: { top: 10 }` and callbacks included). */
|
|
83
|
+
function literalGap(code: string, open: number): Gap {
|
|
84
|
+
const close: number = matchBracket(code, open);
|
|
85
|
+
if (close < 0) { return 'unknown'; }
|
|
86
|
+
const props: string[] = splitTopLevel(code.slice(open + 1, close));
|
|
87
|
+
if (props.some((p) => GAP_KEYS.test(p))) { return 'gap'; }
|
|
88
|
+
// a spread copies keys this file cannot see
|
|
89
|
+
return props.some((p) => /^\s*\.\.\./.test(p)) ? 'unknown' : 'none';
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* Gap evidence of one argument of `sections.push / splice / update`: an object literal, an array of them, or a local
|
|
94
|
+
* built earlier in the same struct (`const a: SectionOptions = {…}` then `a.rowsGap = 12`). Anything else (a call, a
|
|
95
|
+
* member of another object) is built outside what this file shows.
|
|
96
|
+
*/
|
|
97
|
+
function argGap(code: string, masked: string, scope: [number, number], arg: string, argAt: number): Gap {
|
|
98
|
+
const t: string = arg.trim();
|
|
99
|
+
if (t === '') { return 'none'; }
|
|
100
|
+
const lead: number = argAt + arg.indexOf(t);
|
|
101
|
+
if (t.startsWith('{')) { return literalGap(code, lead); }
|
|
102
|
+
if (t.startsWith('[')) {
|
|
103
|
+
const close: number = matchBracket(code, lead);
|
|
104
|
+
if (close < 0) { return 'unknown'; }
|
|
105
|
+
let g: Gap = 'none';
|
|
106
|
+
let off: number = lead + 1;
|
|
107
|
+
for (const el of splitTopLevel(code.slice(lead + 1, close))) {
|
|
108
|
+
g = join(g, argGap(code, masked, scope, el, off));
|
|
109
|
+
off += el.length + 1;
|
|
110
|
+
}
|
|
111
|
+
return g;
|
|
112
|
+
}
|
|
113
|
+
if (/^\d+$/.test(t)) { return 'none'; } // splice(start, deleteCount, …) / update(index, …)
|
|
114
|
+
const id: RegExpMatchArray | null = t.match(/^[A-Za-z_$][\w$]*$/);
|
|
115
|
+
if (id === null) { return 'unknown'; }
|
|
116
|
+
const esc: string = id[0].replace(/\$/g, '\\$');
|
|
117
|
+
const body: string = masked.slice(scope[0], scope[1]);
|
|
118
|
+
if (new RegExp('(?<![\\w$.])' + esc + '\\s*\\.\\s*(?:rowsGap|columnsGap|margin)\\s*=(?!=)').test(body)) { return 'gap'; }
|
|
119
|
+
const decl: RegExpExecArray | null =
|
|
120
|
+
new RegExp('(?<![\\w$.])' + esc + '\\s*(?::\\s*SectionOptions\\s*)?=(?!=)\\s*').exec(body);
|
|
121
|
+
if (decl === null) { return 'unknown'; }
|
|
122
|
+
const k: number = scope[0] + decl.index + decl[0].length;
|
|
123
|
+
return masked[k] === '{' ? literalGap(code, k) : 'unknown';
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
/**
|
|
127
|
+
* Gap evidence of the sections object passed as `WaterFlow({ sections: <expr> })`. Only `this.X` / a local `X` that
|
|
128
|
+
* this struct creates with `new WaterFlowSections()` and fills itself can be judged; a sections object built in a
|
|
129
|
+
* ViewModel, passed in as a parameter or returned by a helper is 'unknown'.
|
|
130
|
+
*/
|
|
131
|
+
function sectionsGap(s: FileScan, masked: string, flowAt: number, expr: string): Gap {
|
|
132
|
+
const m: RegExpMatchArray | null = expr.trim().match(/^(this\.)?([A-Za-z_$][\w$]*)$/);
|
|
133
|
+
if (m === null) { return 'unknown'; }
|
|
134
|
+
const scope: [number, number] = structBodyAt(s.code, masked, flowAt);
|
|
135
|
+
const body: string = masked.slice(scope[0], scope[1]);
|
|
136
|
+
const esc: string = m[2].replace(/\$/g, '\\$');
|
|
137
|
+
const ref: string = (m[1] !== undefined ? 'this\\.' : '(?<![\\w$.])') + esc;
|
|
138
|
+
// a decorated member comes from the caller (@Param / @Prop / @Link / @Consume …)
|
|
139
|
+
const FROM_CALLER: string = '(?:Param|Prop|Link|ObjectLink|Consume|Consumer|Require|Once|StorageLink|StorageProp|LocalStorageLink|LocalStorageProp)';
|
|
140
|
+
if (new RegExp('@' + FROM_CALLER + '(?:\\([^)]*\\))?\\s+(?:@\\w+(?:\\([^)]*\\))?\\s+)*(?:(?:private|public|protected|readonly)\\s+)*' +
|
|
141
|
+
esc + '\\s*[:!?=]').test(body)) {
|
|
142
|
+
return 'unknown';
|
|
143
|
+
}
|
|
144
|
+
// every initializer / assignment must create the object here
|
|
145
|
+
let created: boolean = false;
|
|
146
|
+
const decl: RegExp = new RegExp('(?:^|[\\s;{(])(?:(?:private|public|protected|readonly|const|let|var)\\s+)*' +
|
|
147
|
+
'(?:this\\.)?' + esc + '\\s*(?::\\s*[\\w$.<>|\\s]+?)?\\s*=(?!=)([^;\\n]*)', 'g');
|
|
148
|
+
for (const d of body.matchAll(decl)) {
|
|
149
|
+
if (!/^\s*new\s+WaterFlowSections\s*\(/.test(d[1])) { return 'unknown'; }
|
|
150
|
+
created = true;
|
|
151
|
+
}
|
|
152
|
+
if (!created) { return 'unknown'; }
|
|
153
|
+
let g: Gap = 'none';
|
|
154
|
+
let adds: number = 0;
|
|
155
|
+
for (const c of body.matchAll(new RegExp(ref + '\\s*\\.\\s*(?:push|splice|update)\\s*\\(', 'g'))) {
|
|
156
|
+
const paren: number = scope[0] + (c.index ?? 0) + c[0].length - 1;
|
|
157
|
+
const close: number = matchBracket(s.code, paren);
|
|
158
|
+
if (close < 0) { return 'unknown'; }
|
|
159
|
+
adds++;
|
|
160
|
+
let off: number = paren + 1;
|
|
161
|
+
for (const a of splitTopLevel(s.code.slice(paren + 1, close))) {
|
|
162
|
+
g = join(g, argGap(s.code, masked, scope, a, off));
|
|
163
|
+
off += a.length + 1;
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
return adds === 0 ? 'unknown' : g;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
/**
|
|
170
|
+
* Gap evidence of the WaterFlow's items: a FlowItem chaining `.margin` / `.padding` spaces itself. When the block has
|
|
171
|
+
* no FlowItem statement of its own (items come from a @Builder or a component), the items cannot be judged here.
|
|
172
|
+
*/
|
|
173
|
+
function itemsGap(code: string, masked: string, paren: number): Gap {
|
|
174
|
+
const close: number = matchBracket(masked, paren);
|
|
175
|
+
let k: number = close + 1;
|
|
176
|
+
while (k < masked.length && /\s/.test(masked[k])) { k++; }
|
|
177
|
+
if (masked[k] !== '{') { return 'unknown'; }
|
|
178
|
+
const end: number = matchBracket(masked, k);
|
|
179
|
+
if (end < 0) { return 'unknown'; }
|
|
180
|
+
let seen: boolean = false;
|
|
181
|
+
for (const f of masked.slice(k, end).matchAll(/(?<![\w$.])FlowItem\s*\(/g)) {
|
|
182
|
+
seen = true;
|
|
183
|
+
const fp: number = k + (f.index ?? 0) + f[0].length - 1;
|
|
184
|
+
if (attrsWithArgs(code, fp).some((a) => a.name === 'margin' || a.name === 'padding')) { return 'gap'; }
|
|
185
|
+
}
|
|
186
|
+
return seen ? 'none' : 'unknown';
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
export function checkWaterFlowSectionGaps(scans: FileScan[], androidDir: string): void {
|
|
190
|
+
const stems: Set<string> = androidDir !== '' && fs.existsSync(androidDir) ? androidSpacedStems(androidDir) : new Set();
|
|
191
|
+
for (const s of scans) {
|
|
192
|
+
const masked: string = maskedOf(s);
|
|
193
|
+
if (!/\bWaterFlow\s*\(|\bitemsCount\s*:/.test(masked)) { continue; }
|
|
194
|
+
const rawLines: string[] = s.src.split(/\r?\n/);
|
|
195
|
+
for (const m of masked.matchAll(/\bitemsCount\s*:\s*(\d+)\b/g)) {
|
|
196
|
+
if (Number(m[1]) <= 1) { continue; }
|
|
197
|
+
report('CAND', 'waterflow-section-count-literal', s.rel, lineOfIndex(s.code, m.index ?? 0),
|
|
198
|
+
`SectionOptions itemsCount: ${m[1]} is a number literal — the section counts must add up to the real FlowItem count ` +
|
|
199
|
+
'after every data change, or the WaterFlow lays out wrongly and stops scrolling. Compute it from the data source ' +
|
|
200
|
+
'and update the sections when the data changes');
|
|
201
|
+
}
|
|
202
|
+
for (const m of masked.matchAll(/(?<![\w$.])WaterFlow\s*\(/g)) {
|
|
203
|
+
const paren: number = (m.index ?? 0) + m[0].length - 1;
|
|
204
|
+
const close: number = matchBracket(masked, paren);
|
|
205
|
+
if (close < 0) { continue; }
|
|
206
|
+
const opts: string = s.code.slice(paren + 1, close).trim();
|
|
207
|
+
if (!opts.startsWith('{') || !opts.endsWith('}')) { continue; }
|
|
208
|
+
let sec: string | undefined;
|
|
209
|
+
for (const p of splitTopLevel(opts.slice(1, -1))) {
|
|
210
|
+
const pm: RegExpMatchArray | null = p.match(/^\s*sections\s*:\s*([^]*)$/);
|
|
211
|
+
if (pm !== null) { sec = pm[1]; }
|
|
212
|
+
}
|
|
213
|
+
if (sec === undefined) { continue; }
|
|
214
|
+
if (attrsWithArgs(s.code, paren).some((a) => a.name === 'rowsGap' || a.name === 'columnsGap')) { continue; }
|
|
215
|
+
const line: number = lineOfIndex(s.code, m.index ?? 0);
|
|
216
|
+
if (markedAbove(rawLines, line, 'WATERFLOW-GAP')) { continue; }
|
|
217
|
+
const g: Gap = join(sectionsGap(s, masked, m.index ?? 0, sec), itemsGap(s.code, masked, paren));
|
|
218
|
+
if (g === 'gap') { continue; }
|
|
219
|
+
// GATE only when everything is visible here and this very file ports a spaced Android grid
|
|
220
|
+
const gate: boolean = g === 'none' && portsSpacedGrid(s, stems);
|
|
221
|
+
report(gate ? 'GATE' : 'CAND', 'waterflow-sections-no-gap', s.rel, line,
|
|
222
|
+
(g === 'none'
|
|
223
|
+
? 'WaterFlow({ sections }) has no columnsGap / rowsGap, no section added to its sections object sets ' +
|
|
224
|
+
'rowsGap / columnsGap / margin, and no FlowItem sets margin / padding: every FlowItem touches the next one (0 vp). '
|
|
225
|
+
: 'WaterFlow({ sections }) has no columnsGap / rowsGap, and its sections or items are built outside this file ' +
|
|
226
|
+
'(ViewModel, parameter, helper or @Builder), so whether they space the items cannot be read here: check them. ') +
|
|
227
|
+
(gate ? 'The Android lazy grid this file ports spaces its items (verticalItemSpacing / spacedBy). ' : '') +
|
|
228
|
+
'Map contentPadding → section margin, spacedBy → columnsGap, verticalItemSpacing → rowsGap');
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
}
|
|
@@ -14,7 +14,7 @@ export const meta: RuleMeta[] = [
|
|
|
14
14
|
card: "geometry",
|
|
15
15
|
needs: [],
|
|
16
16
|
summary: "a constant width ≥ 300vp (or a constraintSize minWidth ≥ 300).",
|
|
17
|
-
fix: "write it as a relative width following Android's ratios (dialog:
|
|
17
|
+
fix: "write it as a relative width following Android's ratios (dialog: the backboard option `width` takes the screen-width share from the `dialog panel` line of measure_summary; the backboard is the panel, see the \"Dialogs\" item of the widgets card); when it really is a fixed width, note the basis",
|
|
18
18
|
escape: null,
|
|
19
19
|
cases: [
|
|
20
20
|
"Measured: the settings dialog width(358.1) = reference device 940px/2.625 (screen width 411vp); on a 365.7vp-wide nova 16 only 3.8vp remains on each side.",
|
|
@@ -31,8 +31,8 @@ export const meta: RuleMeta[] = [
|
|
|
31
31
|
* CAND wide-constant-width: a constant width ≥ 300vp (or constraintSize minWidth ≥ 300).
|
|
32
32
|
*
|
|
33
33
|
* Constants this wide are almost always converted from the reference device's screen width (px / density) and hit the edges on narrow screens.
|
|
34
|
-
* Android AlertDialog's rule is window width = windowMinWidthMinor (95% in portrait), with the panel further inset by a
|
|
35
|
-
* inset of 16dp
|
|
34
|
+
* Android AlertDialog's rule is window width = windowMinWidthMinor (95% in portrait), with the panel further inset by a transparent
|
|
35
|
+
* background inset of 16dp; the visible panel is what the HarmonyOS dialog backboard reproduces, as a percentage of the screen width.
|
|
36
36
|
* CAND rather than GATE: fixed-width cards in horizontal scrolling and tablet-only layouts may legitimately be constants.
|
|
37
37
|
*/
|
|
38
38
|
export function checkWideConstantWidth(scans: FileScan[]): void {
|
|
@@ -45,7 +45,7 @@ export function checkWideConstantWidth(scans: FileScan[]): void {
|
|
|
45
45
|
if (v < 300) { continue; }
|
|
46
46
|
report('CAND', 'wide-constant-width', s.rel, lineOfIndex(s.code, m.index),
|
|
47
47
|
`constant width ${v}vp — close to the reference device screen width, so it touches the edges on narrow screens. Write it as a relative width using the Android proportions` +
|
|
48
|
-
" (dialog:
|
|
48
|
+
" (dialog: backboard width = the 'dialog panel' share of the screen width from measure_summary); when it really is a fixed width, state the basis");
|
|
49
49
|
}
|
|
50
50
|
}
|
|
51
51
|
}
|