use super::*;
/// HarmonyOS phone device label.
pub(crate) const HARMONY_DEVICE_PHONE: &str = "phone";
/// HarmonyOS tablet device label.
pub(crate) const HARMONY_DEVICE_TABLET: &str = "tablet";
/// HarmonyOS 2-in-1 PC device label.
pub(crate) const HARMONY_DEVICE_2IN1: &str = "2in1";
/// HarmonyOS universal multi-device label.
pub(crate) const HARMONY_DEVICE_UNIVERSAL: &str = "universal";
/// HarmonyOS foldable device label.
pub(crate) const HARMONY_DEVICE_FOLDABLE: &str = "foldable";
/// HarmonyOS smartwatch wearable device label.
pub(crate) const HARMONY_DEVICE_WEARABLE: &str = "wearable";
/// HarmonyOS TV / Vision device label.
pub(crate) const HARMONY_DEVICE_TV: &str = "tv";
/// HarmonyOS automotive / cockpit device label.
pub(crate) const HARMONY_DEVICE_CAR: &str = "car";
/// HarmonyOS ABI directory label for 64-bit ARM.
pub(crate) const HARMONY_ABI_ARM64: &str = "arm64-v8a";
/// HarmonyOS ABI directory label for 64-bit x86.
pub(crate) const HARMONY_ABI_X86_64: &str = "x86_64";
/// Rust target triple for 64-bit ARM OpenHarmony.
pub(crate) const HARMONY_TRIPLE_ARM64: &str = "aarch64-unknown-linux-ohos";
/// Rust target triple for 64-bit x86 OpenHarmony.
pub(crate) const HARMONY_TRIPLE_X86_64: &str = "x86_64-unknown-linux-ohos";
/// OHOS clang `--target` triple for 64-bit ARM.
pub(crate) const HARMONY_CLANG_ARM64: &str = "aarch64-linux-ohos";
/// OHOS clang `--target` triple for 64-bit x86.
pub(crate) const HARMONY_CLANG_X86_64: &str = "x86_64-linux-ohos";
/// Cargo env suffix for 64-bit ARM OpenHarmony.
pub(crate) const HARMONY_ENV_ARM64: &str = "aarch64_unknown_linux_ohos";
/// Cargo env suffix for 64-bit x86 OpenHarmony.
pub(crate) const HARMONY_ENV_X86_64: &str = "x86_64_unknown_linux_ohos";
/// Cargo linker env name for 64-bit ARM OpenHarmony.
pub(crate) const HARMONY_LINKER_ENV_ARM64: &str = "CARGO_TARGET_AARCH64_UNKNOWN_LINUX_OHOS_LINKER";
/// Cargo linker env name for 64-bit x86 OpenHarmony.
pub(crate) const HARMONY_LINKER_ENV_X86_64: &str = "CARGO_TARGET_X86_64_UNKNOWN_LINUX_OHOS_LINKER";
/// HarmonyOS device enum Rust expressions.
pub(crate) const HARMONY_EXPR_PHONE: &str = "HarmonyDeviceType::Phone";
/// HarmonyOS tablet device enum expression.
pub(crate) const HARMONY_EXPR_TABLET: &str = "HarmonyDeviceType::Tablet";
/// HarmonyOS 2-in-1 PC device enum expression.
pub(crate) const HARMONY_EXPR_PC_2IN1: &str = "HarmonyDeviceType::Pc2In1";
/// HarmonyOS foldable device enum expression.
pub(crate) const HARMONY_EXPR_FOLDABLE: &str = "HarmonyDeviceType::Foldable";
/// HarmonyOS smartwatch device enum expression.
pub(crate) const HARMONY_EXPR_WATCH: &str = "HarmonyDeviceType::Watch";
/// HarmonyOS TV device enum expression.
pub(crate) const HARMONY_EXPR_TV: &str = "HarmonyDeviceType::Tv";
/// HarmonyOS automotive device enum expression.
pub(crate) const HARMONY_EXPR_AUTOMOTIVE: &str = "HarmonyDeviceType::Automotive";
/// Default HarmonyOS bundle identifier.
pub(crate) const HARMONY_DEFAULT_BUNDLE_NAME: &str = "vip.ltpp.euv.showcase";
/// HarmonyOS Atomic Service bundle identifier.
pub(crate) const HARMONY_ATOMIC_BUNDLE_NAME: &str = "vip.ltpp.euv.atomic";
/// HarmonyOS Atomic Service bundleType value.
pub(crate) const HARMONY_ATOMIC_BUNDLE_TYPE: &str = "atomicService";
/// HarmonyOS Atomic Service main ability name.
pub(crate) const HARMONY_ATOMIC_ABILITY_NAME: &str = "AtomicAbility";
/// HarmonyOS default entry ability name.
pub(crate) const HARMONY_ENTRY_ABILITY_NAME: &str = "EntryAbility";
/// HarmonyOS compiled Rust staticlib filename.
pub(crate) const HARMONY_STATICLIB_NAME: &str = "libeuv_harmony_core.a";
/// HarmonyOS linked N-API shared library filename.
pub(crate) const HARMONY_HOST_SO_NAME: &str = "libeuv_harmony_host.so";
/// Environment variable specifying OpenHarmony SDK root directory.
pub(crate) const ENV_OHOS_SDK_HOME: &str = "OHOS_SDK_HOME";
/// Environment variable skipping `wasm-opt` pass in shared zero-DOM WASM core builder.
pub(crate) const ECO_ENV_EUV_SKIP_WASM_OPT: &str = "EUV_SKIP_WASM_OPT";
/// Environment variable reusing previously built zero-DOM WASM host artifacts.
pub(crate) const ENV_EUV_REUSE_WASM: &str = "EUV_REUSE_WASM";
/// Environment variable specifying Cargo release panic strategy.
pub(crate) const ECO_ENV_CARGO_PROFILE_RELEASE_PANIC: &str = "CARGO_PROFILE_RELEASE_PANIC";
/// Environment variable overriding Cargo target directory.
pub(crate) const ECO_ENV_CARGO_TARGET_DIR: &str = "CARGO_TARGET_DIR";
/// Value setting `panic = "abort"` for release WASM builds.
pub(crate) const ECO_PANIC_ABORT: &str = "abort";
/// WebAssembly target triple for shared zero-DOM host cores.
pub(crate) const ECO_WASM32_TRIPLE: &str = "wasm32-unknown-unknown";
/// Compiled `euv-example` WASM library filename.
pub(crate) const EXAMPLE_WASM_FILE: &str = "euv_example.wasm";
/// `wasm-bindgen` output WASM binary filename.
pub(crate) const EXAMPLE_BG_WASM_FILE: &str = "euv_example_bg.wasm";
/// `wasm-bindgen` output JS glue filename.
pub(crate) const EXAMPLE_JS_FILE: &str = "euv_example.js";
/// Staged host WASM core binary filename.
pub(crate) const WASM_HOST_BIN_FILE: &str = "euv_app.wasm";
/// Staged CommonJS host WASM glue filename.
pub(crate) const WASM_HOST_GLUE_CJS_FILE: &str = "euv_wasm_glue.cjs.js";
/// Staged ES Module host WASM glue filename.
pub(crate) const WASM_HOST_GLUE_ESM_FILE: &str = "euv_wasm_glue.esm.js";
/// Runtime host WASM glue filename copied into vendor bundles.
pub(crate) const WASM_HOST_GLUE_JS_FILE: &str = "euv_wasm_glue.js";
/// Relative staging directory for shared zero-DOM WASM core artifacts.
pub(crate) const WASM_HOST_STAGE_REL: &str = "target/mobile-hosts/euv-host-wasm";
/// `wasm-bindgen` executable name.
pub(crate) const ECO_CMD_WASM_BINDGEN: &str = "wasm-bindgen";
/// `wasm-opt` executable name.
pub(crate) const ECO_CMD_WASM_OPT: &str = "wasm-opt";
/// `rustup` executable name.
pub(crate) const ECO_CMD_RUSTUP: &str = "rustup";
/// `hvigorw` HarmonyOS build tool name.
pub(crate) const CMD_HVIGORW: &str = "hvigorw";
/// `hdc` OpenHarmony device connector binary name.
pub(crate) const CMD_HDC: &str = "hdc";
/// `hap` QuickApp toolkit CLI binary name.
pub(crate) const CMD_HAP: &str = "hap";
/// Placeholder token replaced with HarmonyOS device type in `EntryAbility.ets`.
pub(crate) const PLACEHOLDER_DEVICE_TYPE: &str = "{{DEVICE_TYPE}}";
/// Placeholder token replaced with MiniApp/QuickApp/Wearable vendor identifier.
pub(crate) const PLACEHOLDER_VENDOR: &str = "{{VENDOR}}";
/// Placeholder token replaced with MiniApp host API namespace (`wx`, `my`, `tt`, etc.).
pub(crate) const PLACEHOLDER_API_NS: &str = "{{API_NS}}";
/// Placeholder token replaced with MiniApp Alipay syntax flag (`0` or `1`).
pub(crate) const PLACEHOLDER_ALIPAY_SYNTAX: &str = "{{ALIPAY_SYNTAX}}";
/// Placeholder token replaced with MiniApp vendor WebAssembly global (`WXWebAssembly`, etc.).
pub(crate) const PLACEHOLDER_WASM_GLOBAL: &str = "{{WASM_GLOBAL}}";
/// Placeholder token replaced with wearable screen shape (`round` or `squircle`).
pub(crate) const PLACEHOLDER_SHAPE: &str = "{{SHAPE}}";
/// Placeholder token replaced with wearable default physical width.
pub(crate) const PLACEHOLDER_WIDTH: &str = "{{WIDTH}}";
/// Placeholder token replaced with wearable default physical height.
pub(crate) const PLACEHOLDER_HEIGHT: &str = "{{HEIGHT}}";
/// Placeholder token replaced with wearable default DPR.
pub(crate) const PLACEHOLDER_DPR: &str = "{{DPR}}";
/// Placeholder token replaced with wearable WASM module path.
pub(crate) const PLACEHOLDER_WASM_PATH: &str = "{{WASM_PATH}}";
/// Embedded HarmonyOS `EntryAbility.ets` template.
pub(crate) const HARMONY_ENTRY_ABILITY_TEMPLATE: &str =
include_str!("harmony_entry_ability.ets.tmpl");
/// Embedded HarmonyOS `Index.ets` template.
pub(crate) const HARMONY_INDEX_ETS_TEMPLATE: &str = include_str!("harmony_index.ets.tmpl");
/// Embedded HarmonyOS N-API TypeScript declaration template.
pub(crate) const HARMONY_INDEX_DTS_TEMPLATE: &str = include_str!("harmony_index.d.ts.tmpl");
/// Embedded HarmonyOS `CMakeLists.txt` template.
pub(crate) const HARMONY_CMAKE_TEMPLATE: &str = include_str!("harmony_cmake.txt.tmpl");
/// Embedded HarmonyOS C++ N-API / XComponent / EGL bridge template.
pub(crate) const HARMONY_NAPI_INIT_TEMPLATE: &str = include_str!("harmony_napi_init.cpp.tmpl");
/// Embedded HarmonyOS Rust staticlib host template.
pub(crate) const HARMONY_HOST_LIB_RS_TEMPLATE: &str = include_str!("harmony_host_lib.rs.tmpl");
/// Embedded shared zero-DOM WASM prelude (`TextDecoder`/`TextEncoder` + vendor WASM resolver).
pub(crate) const WASM_HOST_PRELUDE_JS: &str = include_str!("wasm_host_prelude.js.tmpl");
/// Embedded MiniApp runtime bridge template.
pub(crate) const MINIAPP_BRIDGE_JS_TEMPLATE: &str = include_str!("miniapp_bridge.js.tmpl");
/// Embedded QuickApp runtime bridge template.
pub(crate) const QUICKAPP_BRIDGE_JS_TEMPLATE: &str = include_str!("quickapp_bridge.js.tmpl");
/// Embedded QuickApp `app.ux` template.
pub(crate) const QUICKAPP_APP_UX_TEMPLATE: &str = include_str!("quickapp_app.ux.tmpl");
/// Embedded QuickApp `Index/index.ux` template.
pub(crate) const QUICKAPP_INDEX_UX_TEMPLATE: &str = include_str!("quickapp_index.ux.tmpl");
/// Embedded shared wearable WASM bridge template.
pub(crate) const WEARABLE_WASM_BRIDGE_TEMPLATE: &str = include_str!("wearable_wasm_bridge.js.tmpl");
/// Embedded Xiaomi Vela Watch `index.ux` template.
pub(crate) const VELA_INDEX_UX_TEMPLATE: &str = include_str!("vela_index.ux.tmpl");
/// Embedded vivo BlueOS Watch `app.ux` template.
pub(crate) const VIVO_APP_UX_TEMPLATE: &str = include_str!("vivo_app.ux.tmpl");
/// Embedded vivo BlueOS Watch `index.ux` template.
pub(crate) const VIVO_INDEX_UX_TEMPLATE: &str = include_str!("vivo_index.ux.tmpl");
/// Embedded OPPO Watch Java SurfaceView activity template.
pub(crate) const OPPO_WATCH_ACTIVITY_TEMPLATE: &str = include_str!("oppo_watch_activity.java.tmpl");
/// Embedded Garmin Connect IQ Monkey C watch app template.
pub(crate) const GARMIN_APP_MC_TEMPLATE: &str = include_str!("garmin_app.mc.tmpl");
/// Embedded Amazfit Zepp OS `app.js` template.
pub(crate) const ZEPPOS_APP_JS_TEMPLATE: &str = include_str!("zeppos_app.js.tmpl");
/// Embedded Amazfit Zepp OS `page/index.js` template.
pub(crate) const ZEPPOS_INDEX_JS_TEMPLATE: &str = include_str!("zeppos_index.js.tmpl");
/// Exact `wasm-bindgen --target no-modules` fetch snippet replaced with vendor WASM guard.
pub(crate) const WASM_OLD_INIT_FETCH: &str = "if (typeof module_or_path === 'string' || (typeof Request === 'function' && module_or_path instanceof Request) || (typeof URL === 'function' && module_or_path instanceof URL)) {\n module_or_path = fetch(module_or_path);\n }";
/// Replacement vendor-safe fetch guard for `wasm-bindgen` init.
pub(crate) const WASM_VENDOR_INIT_GUARD: &str = "if (typeof module_or_path === 'string' || (typeof Request === 'function' && module_or_path instanceof Request) || (typeof URL === 'function' && module_or_path instanceof URL)) {\n var __euvVendorWasm = __euvResolveVendorWasm();\n if (!(typeof module_or_path === 'string' && __euvVendorWasm && (typeof WebAssembly === 'undefined' || __euvVendorWasm !== WebAssembly))) {\n if (typeof fetch === 'function') {\n module_or_path = fetch(module_or_path);\n }\n }\n }";
/// Function header inside `wasm-bindgen` glue where string-path vendor instantiation is injected.
pub(crate) const WASM_WBG_LOAD_HEADER: &str = "async function __wbg_load(module, imports) {";
/// Vendor instantiation branch inserted at the top of `__wbg_load`.
pub(crate) const WASM_WBG_LOAD_VENDOR_BRANCH: &str = "\n if (typeof module === 'string') {\n var vendorWasm = __euvResolveVendorWasm();\n if (vendorWasm && (typeof WebAssembly === 'undefined' || vendorWasm !== WebAssembly) && typeof vendorWasm.instantiate === 'function') {\n return await vendorWasm.instantiate(module, imports);\n }\n if (typeof fetch === 'function') {\n module = await fetch(module);\n } else if (vendorWasm && typeof vendorWasm.instantiate === 'function') {\n return await vendorWasm.instantiate(module, imports);\n }\n }";
/// Shared host initialization helper appended to patched `wasm-bindgen` glue.
pub(crate) const WASM_HOST_HELPER_TAIL: &str = "\nwasm_bindgen.__euvInitHost = async function (wasmSource) {\n var g = typeof globalThis !== 'undefined' ? globalThis : (typeof self !== 'undefined' ? self : {});\n if (g && !g.__EUV_HOST_MODE) {\n g.__EUV_HOST_MODE = 'external';\n }\n var exportsObj = await wasm_bindgen({ module_or_path: wasmSource });\n return {\n api: wasm_bindgen,\n exports: exportsObj,\n memory: exportsObj && exportsObj.memory ? exportsObj.memory : null\n };\n};\n";
/// CommonJS footer appended to `euv_wasm_glue.cjs.js`.
pub(crate) const WASM_HOST_CJS_FOOTER: &str = "\nif (typeof module !== 'undefined' && module.exports) {\n module.exports = wasm_bindgen;\n}\n";
/// ES Module footer appended to `euv_wasm_glue.esm.js`.
pub(crate) const WASM_HOST_ESM_FOOTER: &str = "\nexport default wasm_bindgen;\n";
/// ESM export footer appended to wearable JS bridge files.
pub(crate) const WEARABLE_BRIDGE_ESM_FOOTER: &str = "\nexport { WEARABLE_VENDOR, WEARABLE_SHAPE, computeSafeArea, createWearableBridge };\nexport default createWearableBridge;\n";
/// CJS export footer appended to wearable JS bridge files.
pub(crate) const WEARABLE_BRIDGE_CJS_FOOTER: &str = "\nif (typeof module !== 'undefined' && module.exports) {\n module.exports = { WEARABLE_VENDOR, WEARABLE_SHAPE, computeSafeArea, createWearableBridge };\n}\n";
/// Static HarmonyOS root `hvigorfile.ts`.
pub(crate) const HARMONY_ROOT_HVIGORFILE: &str = "import { appTasks } from '@ohos/hvigor-ohos-plugin';\n\nexport default {\n system: appTasks,\n plugins: []\n};\n";
/// Static HarmonyOS `hvigor/hvigor-config.json5`.
pub(crate) const HARMONY_HVIGOR_CONFIG_JSON5: &str =
"{\n \"modelVersion\": \"5.0.0\",\n \"dependencies\": {}\n}\n";
/// Static HarmonyOS root `build-profile.json5`.
pub(crate) const HARMONY_ROOT_BUILD_PROFILE_JSON5: &str = r##"{
"app": {
"signingConfigs": [],
"products": [
{
"name": "default",
"signingConfig": "default",
"compatibleSdkVersion": "5.0.0(12)",
"runtimeOS": "HarmonyOS"
}
],
"buildModeSet": [
{ "name": "debug" },
{ "name": "release" }
]
},
"modules": [
{
"name": "entry",
"srcPath": "./entry",
"targets": [
{
"name": "default",
"applyToProducts": ["default"]
}
]
}
]
}
"##;
/// Static HarmonyOS `entry/hvigorfile.ts`.
pub(crate) const HARMONY_ENTRY_HVIGORFILE: &str = "import { hapTasks } from '@ohos/hvigor-ohos-plugin';\n\nexport default {\n system: hapTasks,\n plugins: []\n};\n";
/// Static HarmonyOS `entry/build-profile.json5`.
pub(crate) const HARMONY_ENTRY_BUILD_PROFILE_JSON5: &str = r##"{
"apiType": "stageMode",
"buildOption": {
"externalNativeOptions": {
"path": "./src/main/cpp/CMakeLists.txt",
"arguments": "",
"cppFlags": "-O3 -std=c++17"
}
},
"targets": [
{
"name": "default"
}
]
}
"##;
/// Static HarmonyOS `AppScope/resources/base/element/string.json`.
pub(crate) const HARMONY_APP_STRING_JSON: &str = r##"{
"string": [
{
"name": "app_name",
"value": "Euv Studio"
}
]
}
"##;
/// Static HarmonyOS `main_pages.json`.
pub(crate) const HARMONY_MAIN_PAGES_JSON: &str = "{\n \"src\": [\n \"pages/Index\"\n ]\n}\n";
/// MiniApp Alipay-style `app.json`.
pub(crate) const MINIAPP_ALIPAY_APP_JSON: &str = r##"{
"pages": [
"pages/index/index"
],
"window": {
"defaultTitle": "Euv Studio",
"transparentTitle": "always",
"titlePenetrate": "YES",
"allowsBounceVertical": "NO",
"backgroundColor": "#09090B"
},
"darkmode": true,
"resizable": true
}
"##;
/// MiniApp WeChat-style `app.json`.
pub(crate) const MINIAPP_STANDARD_APP_JSON: &str = r##"{
"pages": [
"pages/index/index"
],
"window": {
"navigationStyle": "custom",
"backgroundColor": "#09090B",
"backgroundTextStyle": "dark"
},
"darkmode": true,
"resizable": true
}
"##;
/// MiniApp `app.js` lifecycle entrypoint.
pub(crate) const MINIAPP_APP_JS: &str = r##"const euvBridge = require('./runtime/euv-bridge');
App({
onLaunch(options) {
const query = options && options.query ? JSON.stringify(options.query) : '';
euvBridge.dispatchLifecycle('onLaunch', query);
},
onShow(options) {
const query = options && options.query ? JSON.stringify(options.query) : '';
euvBridge.dispatchLifecycle('onShow', query);
},
onHide() {
euvBridge.dispatchLifecycle('onHide', '');
},
onThemeChange(res) {
euvBridge.dispatchTheme((res && res.theme) === 'dark');
},
onMemoryWarning(res) {
euvBridge.dispatchMemoryWarning(res && typeof res.level === 'number' ? res.level : 5);
}
});
"##;
/// MiniApp root stylesheet.
pub(crate) const MINIAPP_APP_STYLE: &str = "page {\n width: 100%;\n height: 100%;\n margin: 0;\n padding: 0;\n overflow: hidden;\n background-color: #09090b;\n}\n";
/// MiniApp Alipay-style page markup.
pub(crate) const MINIAPP_ALIPAY_PAGE_MARKUP: &str = r##"<view class="euv-root">
<canvas
id="euv-canvas"
type="2d"
class="euv-canvas"
onTouchStart="onTouchStart"
onTouchMove="onTouchMove"
onTouchEnd="onTouchEnd"
onTouchCancel="onTouchCancel"
/>
<input
class="euv-ime-proxy"
focus="{{imeFocused}}"
value="{{imeValue}}"
onInput="onImeInput"
onConfirm="onImeConfirm"
onBlur="onImeBlur"
/>
</view>
"##;
/// MiniApp WeChat-style page markup.
pub(crate) const MINIAPP_STANDARD_PAGE_MARKUP: &str = r##"<view class="euv-root">
<canvas
id="euv-canvas"
type="2d"
class="euv-canvas"
disable-scroll="true"
bindtouchstart="onTouchStart"
bindtouchmove="onTouchMove"
bindtouchend="onTouchEnd"
bindtouchcancel="onTouchCancel"
/>
<input
class="euv-ime-proxy"
focus="{{imeFocused}}"
value="{{imeValue}}"
bindinput="onImeInput"
bindconfirm="onImeConfirm"
bindblur="onImeBlur"
/>
</view>
"##;
/// MiniApp page stylesheet.
pub(crate) const MINIAPP_PAGE_STYLE: &str = r##".euv-root {
position: relative;
width: 100vw;
height: 100vh;
overflow: hidden;
background-color: #09090b;
}
.euv-canvas {
width: 100vw;
height: 100vh;
display: block;
}
.euv-ime-proxy {
position: fixed;
left: -9999px;
top: -9999px;
width: 1px;
height: 1px;
opacity: 0;
}
"##;
/// MiniApp Alipay-style page JSON configuration.
pub(crate) const MINIAPP_ALIPAY_PAGE_JSON: &str = "{\n \"transparentTitle\": \"always\",\n \"titlePenetrate\": \"YES\",\n \"allowsBounceVertical\": \"NO\"\n}\n";
/// MiniApp WeChat-style page JSON configuration.
pub(crate) const MINIAPP_STANDARD_PAGE_JSON: &str =
"{\n \"navigationStyle\": \"custom\",\n \"disableScroll\": true\n}\n";
/// MiniApp `pages/index/index.js` page controller.
pub(crate) const MINIAPP_PAGE_JS: &str = r##"const euvBridge = require('../../runtime/euv-bridge');
Page({
data: {
imeFocused: false,
imeValue: ''
},
onReady() {
euvBridge.mountPage(this, '#euv-canvas');
},
onShow() {
euvBridge.dispatchLifecycle('onShow', '');
},
onHide() {
euvBridge.dispatchLifecycle('onHide', '');
},
onUnload() {
euvBridge.dispatchLifecycle('onUnload', '');
euvBridge.unmountPage();
},
onResize(res) {
const size = (res && res.size) || res || {};
if (size.windowWidth && size.windowHeight) {
euvBridge.dispatchResize(Number(size.windowWidth), Number(size.windowHeight), Number(size.pixelRatio || 0));
}
},
onTouchStart(e) {
euvBridge.dispatchTouch('down', e);
},
onTouchMove(e) {
euvBridge.dispatchTouch('move', e);
},
onTouchEnd(e) {
euvBridge.dispatchTouch('up', e);
},
onTouchCancel(e) {
euvBridge.dispatchTouch('cancel', e);
},
onImeInput(e) {
const val = (e && e.detail && e.detail.value) || '';
euvBridge.dispatchIme(val, false);
this.setData({ imeValue: '' });
},
onImeConfirm(e) {
const val = (e && e.detail && e.detail.value) || '';
euvBridge.dispatchIme(val, true);
this.setData({ imeFocused: false, imeValue: '' });
},
onImeBlur() {
this.setData({ imeFocused: false });
}
});
"##;
/// Xiaomi Vela Watch `src/app.ux`.
pub(crate) const VELA_APP_UX: &str =
"<script>\nexport default {\n onCreate() {},\n onDestroy() {}\n};\n</script>\n";
/// Garmin Connect IQ `monkey.jungle`.
pub(crate) const GARMIN_MONKEY_JUNGLE: &str = "project.manifest = manifest.xml\n";
/// Garmin Connect IQ `resources/strings/strings.xml`.
pub(crate) const GARMIN_STRINGS_XML: &str =
"<strings>\n <string id=\"AppName\">Euv Watch</string>\n</strings>\n";
/// Garmin Connect IQ `resources/drawables/drawables.xml`.
pub(crate) const GARMIN_DRAWABLES_XML: &str =
"<drawables>\n <bitmap id=\"LauncherIcon\" filename=\"launcher_icon.png\" />\n</drawables>\n";
/// Wear OS shell-only delegation notice.
pub(crate) const WEAROS_SHELL_README: &str = "Wear OS APK target builds via the native Android builder with WearOs target kind.\nOutput APK: dist/wearos/EuvShowcaseWearOS.apk (AVD: euv_wearos_watch)\n";
/// Default distribution subdirectory for HarmonyOS outputs.
pub(crate) const DIST_HARMONY_SUBDIR: &str = "dist/harmony";
/// Default distribution subdirectory for MiniApp outputs.
pub(crate) const DIST_MINIAPP_SUBDIR: &str = "dist/miniapp";
/// Default distribution subdirectory for QuickApp outputs.
pub(crate) const DIST_QUICKAPP_SUBDIR: &str = "dist/quickapp";
/// Default distribution subdirectory for Wearable outputs.
pub(crate) const DIST_WEARABLE_SUBDIR: &str = "dist/wearable";
/// QuickApp Alliance package identifier.
pub(crate) const QUICKAPP_ALLIANCE_PKG_ID: &str = "vip.ltpp.euv.quickapp";
/// Huawei QuickApp package identifier.
pub(crate) const QUICKAPP_HUAWEI_PKG_ID: &str = "vip.ltpp.euv.huawei.quickapp";
/// QuickApp minimum platform version integer.
pub(crate) const QUICKAPP_MIN_PLATFORM_VERSION: u32 = 1100;
/// Standard 192px icon dimension used across HarmonyOS, MiniApp, QuickApp, and Watch shells.
pub(crate) const ECOSYSTEM_ICON_SIZE_192: u32 = 192;
/// Standard 144px icon dimension used for OPPO Watch xxhdpi mipmap.
pub(crate) const ECOSYSTEM_ICON_SIZE_144: u32 = 144;
/// Standard 100px icon dimension used for Zepp OS Watch app icon.
pub(crate) const ECOSYSTEM_ICON_SIZE_100: u32 = 100;
/// Standard 64px icon dimension used for Garmin Connect IQ launcher icon.
pub(crate) const ECOSYSTEM_ICON_SIZE_64: u32 = 64;
/// `wasm-opt` optimization flags for zero-DOM host cores (intentionally WITHOUT `--enable-simd`).
pub(crate) const WASM_HOST_OPT_FLAGS: &[&str] = &[
"-Oz",
"--enable-bulk-memory",
"--enable-nontrapping-float-to-int",
"--enable-sign-ext",
"--enable-mutable-globals",
"--enable-reference-types",
"--enable-multivalue",
"--strip-debug",
"--strip-producers",
];
/// OHOS `clang++` link flags for `libeuv_harmony_host.so`.
pub(crate) const HARMONY_CLANGXX_SYSTEM_LIBS: &[&str] = &[
"-lace_napi.z",
"-lace_ndk.z",
"-lnative_window",
"-lnative_vsync",
"-lEGL",
"-lGLESv3",
"-lhilog_ndk.z",
];
/// Standard macOS Apple Silicon OpenHarmony SDK relative home path.
pub(crate) const OHOS_MACOS_ARM64_SDK_REL: &str = "Library/OpenHarmony/sdk-arm64";
/// Standard macOS OpenHarmony SDK relative home path.
pub(crate) const OHOS_MACOS_SDK_REL: &str = "Library/OpenHarmony/sdk";
/// Standard Linux OpenHarmony SDK relative home path.
pub(crate) const OHOS_LINUX_SDK_REL: &str = "OpenHarmony/Sdk";
/// DevEco Studio bundled OpenHarmony SDK path on macOS.
pub(crate) const OHOS_DEVECO_SDK_PATH: &str =
"/Applications/DevEco-Studio.app/Contents/sdk/default/openharmony";
/// All 13 supported MiniApp vendors in canonical build order.
pub(crate) const ALL_MINIAPP_VENDORS: &[MiniAppVendor] = &[
MiniAppVendor::Wechat,
MiniAppVendor::Alipay,
MiniAppVendor::Douyin,
MiniAppVendor::Baidu,
MiniAppVendor::Qq,
MiniAppVendor::Kuaishou,
MiniAppVendor::Jd,
MiniAppVendor::Xhs,
MiniAppVendor::Dingtalk,
MiniAppVendor::Feishu,
MiniAppVendor::Taobao,
MiniAppVendor::Meituan,
MiniAppVendor::HarmonyAtomic,
];
/// All 2 supported QuickApp vendors in canonical build order.
pub(crate) const ALL_QUICKAPP_VENDORS: &[QuickAppVendor] =
&[QuickAppVendor::Alliance, QuickAppVendor::Huawei];
/// All 8 supported Wearable vendors in canonical build order.
pub(crate) const ALL_WEARABLE_VENDORS: &[WearableVendor] = &[
WearableVendor::WearOs,
WearableVendor::WatchOs,
WearableVendor::HarmonyWatch,
WearableVendor::Vela,
WearableVendor::VivoWatch,
WearableVendor::OppoWatch,
WearableVendor::Garmin,
WearableVendor::ZeppOs,
];
/// Reusable labels and keys for ecosystem file generation.
pub(crate) const LABEL_ALL: &str = "all";
/// MiniApp vendor label `wechat`.
pub(crate) const VENDOR_WECHAT: &str = "wechat";
/// MiniApp vendor label `alipay`.
pub(crate) const VENDOR_ALIPAY: &str = "alipay";
/// MiniApp vendor label `douyin`.
pub(crate) const VENDOR_DOUYIN: &str = "douyin";
/// MiniApp vendor label `baidu`.
pub(crate) const VENDOR_BAIDU: &str = "baidu";
/// MiniApp vendor label `qq`.
pub(crate) const VENDOR_QQ: &str = "qq";
/// MiniApp vendor label `kuaishou`.
pub(crate) const VENDOR_KUAISHOU: &str = "kuaishou";
/// MiniApp vendor label `jd`.
pub(crate) const VENDOR_JD: &str = "jd";
/// MiniApp vendor label `xhs`.
pub(crate) const VENDOR_XHS: &str = "xhs";
/// MiniApp vendor label `dingtalk`.
pub(crate) const VENDOR_DINGTALK: &str = "dingtalk";
/// MiniApp vendor label `feishu`.
pub(crate) const VENDOR_FEISHU: &str = "feishu";
/// MiniApp vendor label `taobao`.
pub(crate) const VENDOR_TAOBAO: &str = "taobao";
/// MiniApp vendor label `meituan`.
pub(crate) const VENDOR_MEITUAN: &str = "meituan";
/// MiniApp vendor label `harmony-atomic`.
pub(crate) const VENDOR_HARMONY_ATOMIC: &str = "harmony-atomic";
/// QuickApp vendor label `alliance`.
pub(crate) const VENDOR_ALLIANCE: &str = "alliance";
/// QuickApp vendor label `huawei`.
pub(crate) const VENDOR_HUAWEI: &str = "huawei";
/// Wearable vendor label `wearos`.
pub(crate) const VENDOR_WEAROS: &str = "wearos";
/// Wearable vendor label `watchos`.
pub(crate) const VENDOR_WATCHOS: &str = "watchos";
/// Wearable vendor label `harmony-watch`.
pub(crate) const VENDOR_HARMONY_WATCH: &str = "harmony-watch";
/// Wearable vendor label `vela`.
pub(crate) const VENDOR_VELA: &str = "vela";
/// Wearable vendor label `vivo-watch`.
pub(crate) const VENDOR_VIVO_WATCH: &str = "vivo-watch";
/// Wearable vendor label `oppo-watch`.
pub(crate) const VENDOR_OPPO_WATCH: &str = "oppo-watch";
/// Wearable vendor label `garmin`.
pub(crate) const VENDOR_GARMIN: &str = "garmin";
/// Wearable vendor label `zeppos`.
pub(crate) const VENDOR_ZEPPOS: &str = "zeppos";
/// MiniApp vendor project config filename (`project.config.json`).
pub(crate) const MINIAPP_CFG_PROJECT_CONFIG: &str = "project.config.json";
/// MiniApp vendor Alipay-family project config filename (`mini.project.json`).
pub(crate) const MINIAPP_CFG_MINI_PROJECT: &str = "mini.project.json";
/// MiniApp Baidu project config filename (`project.swan.json`).
pub(crate) const MINIAPP_CFG_SWAN: &str = "project.swan.json";
/// Standard WebAssembly global identifier.
pub(crate) const WASM_GLOBAL_STD: &str = "WebAssembly";
/// WeChat MiniApp WebAssembly global identifier.
pub(crate) const WASM_GLOBAL_WX: &str = "WXWebAssembly";
/// Alipay MiniApp WebAssembly global identifier.
pub(crate) const WASM_GLOBAL_MY: &str = "MYWebAssembly";
/// ByteDance/Feishu MiniApp WebAssembly global identifier.
pub(crate) const WASM_GLOBAL_TT: &str = "TTWebAssembly";
/// QQ MiniApp WebAssembly global identifier.
pub(crate) const WASM_GLOBAL_QQ: &str = "QQWebAssembly";
/// MiniApp markup extensions.
pub(crate) const EXT_WXML: &str = "wxml";
/// Alipay markup extension.
pub(crate) const EXT_AXML: &str = "axml";
/// ByteDance/Feishu markup extension.
pub(crate) const EXT_TTML: &str = "ttml";
/// Baidu markup extension.
pub(crate) const EXT_SWAN: &str = "swan";
/// QQ markup extension.
pub(crate) const EXT_QML: &str = "qml";
/// Kuaishou markup extension.
pub(crate) const EXT_KSML: &str = "ksml";
/// JD markup extension.
pub(crate) const EXT_JXML: &str = "jxml";
/// Xiaohongshu markup extension.
pub(crate) const EXT_XHSML: &str = "xhsml";
/// Meituan markup extension.
pub(crate) const EXT_MXML: &str = "mxml";
/// MiniApp style extensions.
pub(crate) const EXT_WXSS: &str = "wxss";
/// Alipay style extension.
pub(crate) const EXT_ACSS: &str = "acss";
/// ByteDance/Feishu style extension.
pub(crate) const EXT_TTSS: &str = "ttss";
/// Standard CSS style extension.
pub(crate) const ECO_EXT_CSS: &str = "css";
/// QQ style extension.
pub(crate) const EXT_QSS: &str = "qss";
/// JD style extension.
pub(crate) const EXT_JXSS: &str = "jxss";
/// Meituan style extension.
pub(crate) const EXT_MXSS: &str = "mxss";
/// MiniApp API namespaces.
pub(crate) const NS_SWAN: &str = "swan";
/// MiniApp Xiaohongshu API namespace.
pub(crate) const NS_XHS: &str = "xhs";
/// Relative directory and file names used across ecosystem project generation.
pub(crate) const REL_HVIGOR: &str = "hvigor";
/// HarmonyOS AppScope string resource relative directory.
pub(crate) const REL_APPSCOPE_ELEMENT: &str = "AppScope/resources/base/element";
/// HarmonyOS AppScope media resource relative directory.
pub(crate) const REL_APPSCOPE_MEDIA: &str = "AppScope/resources/base/media";
/// HarmonyOS entry ability ArkTS relative directory.
pub(crate) const REL_HARMONY_ENTRYABILITY: &str = "entry/src/main/ets/entryability";
/// HarmonyOS entry pages ArkTS relative directory.
pub(crate) const REL_HARMONY_PAGES: &str = "entry/src/main/ets/pages";
/// HarmonyOS entry profile relative directory.
pub(crate) const REL_HARMONY_PROFILE: &str = "entry/src/main/resources/base/profile";
/// HarmonyOS N-API types relative directory.
pub(crate) const REL_HARMONY_CPP_TYPES: &str = "entry/src/main/cpp/types/libeuv_harmony_host";
/// HarmonyOS C++ native source relative directory.
pub(crate) const REL_HARMONY_CPP: &str = "entry/src/main/cpp";
/// HarmonyOS entry shared libs relative directory.
pub(crate) const REL_HARMONY_LIBS: &str = "entry/libs";
/// HarmonyOS `oh-package.json5` filename.
pub(crate) const FILE_OH_PACKAGE_JSON5: &str = "oh-package.json5";
/// HarmonyOS `hvigorfile.ts` filename.
pub(crate) const FILE_HVIGORFILE_TS: &str = "hvigorfile.ts";
/// HarmonyOS `hvigor-config.json5` filename.
pub(crate) const FILE_HVIGOR_CONFIG_JSON5: &str = "hvigor-config.json5";
/// HarmonyOS `build-profile.json5` filename.
pub(crate) const FILE_BUILD_PROFILE_JSON5: &str = "build-profile.json5";
/// HarmonyOS `AppScope/app.json5` relative path.
pub(crate) const REL_APPSCOPE_APP_JSON5: &str = "AppScope/app.json5";
/// HarmonyOS `string.json` filename.
pub(crate) const FILE_STRING_JSON: &str = "string.json";
/// HarmonyOS `app_icon.png` filename.
pub(crate) const FILE_APP_ICON_PNG: &str = "app_icon.png";
/// HarmonyOS `entry/src/main/module.json5` relative path.
pub(crate) const REL_HARMONY_MODULE_JSON5: &str = "entry/src/main/module.json5";
/// HarmonyOS `main_pages.json` filename.
pub(crate) const FILE_MAIN_PAGES_JSON: &str = "main_pages.json";
/// HarmonyOS N-API declaration filename.
pub(crate) const FILE_INDEX_DTS: &str = "index.d.ts";
/// HarmonyOS `EntryAbility.ets` filename.
pub(crate) const FILE_ENTRY_ABILITY_ETS: &str = "EntryAbility.ets";
/// HarmonyOS `AtomicAbility.ets` filename.
pub(crate) const FILE_ATOMIC_ABILITY_ETS: &str = "AtomicAbility.ets";
/// HarmonyOS `Index.ets` filename.
pub(crate) const FILE_INDEX_ETS: &str = "Index.ets";
/// HarmonyOS `CMakeLists.txt` filename.
pub(crate) const FILE_CMAKE_LISTS: &str = "CMakeLists.txt";
/// HarmonyOS `napi_init.cpp` filename.
pub(crate) const FILE_NAPI_INIT_CPP: &str = "napi_init.cpp";
/// HarmonyOS `entry` directory name.
pub(crate) const DIR_ENTRY: &str = "entry";
/// HarmonyOS `entry/build` directory name for locating built `.hap` bundles.
pub(crate) const REL_HARMONY_ENTRY_BUILD: &str = "entry/build";
/// HarmonyOS `.hap` extension.
pub(crate) const EXT_HAP: &str = "hap";
/// MiniApp `pages/index` relative directory.
pub(crate) const REL_MINIAPP_PAGE_INDEX: &str = "pages/index";
/// MiniApp `runtime` directory name.
pub(crate) const DIR_RUNTIME: &str = "runtime";
/// MiniApp `assets` directory name.
pub(crate) const DIR_ASSETS: &str = "assets";
/// MiniApp `app.json` filename.
pub(crate) const FILE_APP_JSON: &str = "app.json";
/// MiniApp `app.js` filename.
pub(crate) const FILE_APP_JS: &str = "app.js";
/// MiniApp `index.json` filename.
pub(crate) const FILE_INDEX_JSON: &str = "index.json";
/// MiniApp `index.js` filename.
pub(crate) const FILE_INDEX_JS: &str = "index.js";
/// Runtime bridge JS filename (`euv-bridge.js`).
pub(crate) const FILE_EUV_BRIDGE_JS: &str = "euv-bridge.js";
/// Logo icon filename (`logo.png`).
pub(crate) const FILE_LOGO_PNG: &str = "logo.png";
/// QuickApp `package.json` filename.
pub(crate) const FILE_PACKAGE_JSON: &str = "package.json";
/// QuickApp `src/manifest.json` relative path.
pub(crate) const REL_SRC_MANIFEST_JSON: &str = "src/manifest.json";
/// QuickApp `src/app.ux` relative path.
pub(crate) const REL_SRC_APP_UX: &str = "src/app.ux";
/// QuickApp `src/Index` relative directory.
pub(crate) const REL_QUICKAPP_INDEX_DIR: &str = "src/Index";
/// QuickApp `src/Common` relative directory.
pub(crate) const REL_QUICKAPP_COMMON_DIR: &str = "src/Common";
/// QuickApp `index.ux` filename.
pub(crate) const FILE_INDEX_UX: &str = "index.ux";
/// Wearable `src/pages/index` relative directory.
pub(crate) const REL_WEARABLE_PAGES_INDEX: &str = "src/pages/index";
/// Wearable `src/common` relative directory.
pub(crate) const REL_WEARABLE_COMMON: &str = "src/common";
/// vivo BlueOS Watch `blueos.config.json` filename.
pub(crate) const FILE_BLUEOS_CONFIG_JSON: &str = "blueos.config.json";
/// OPPO Watch `oppo-watch.config.json` filename.
pub(crate) const FILE_OPPO_CONFIG_JSON: &str = "oppo-watch.config.json";
/// OPPO Watch Java package relative directory.
pub(crate) const REL_OPPO_JAVA_DIR: &str = "src/main/java/vip/ltpp/euv/oppowatch";
/// OPPO Watch activity filename.
pub(crate) const FILE_OPPO_ACTIVITY_JAVA: &str = "EuvOppoWatchActivity.java";
/// OPPO Watch xxhdpi mipmap icon relative path.
pub(crate) const REL_OPPO_ICON_XXHDPI: &str = "src/main/res/mipmap-xxhdpi/ic_launcher.png";
/// OPPO Watch xxxhdpi mipmap icon relative path.
pub(crate) const REL_OPPO_ICON_XXXHDPI: &str = "src/main/res/mipmap-xxxhdpi/ic_launcher.png";
/// Garmin `manifest.xml` filename.
pub(crate) const FILE_GARMIN_MANIFEST_XML: &str = "manifest.xml";
/// Garmin `monkey.jungle` filename.
pub(crate) const FILE_MONKEY_JUNGLE: &str = "monkey.jungle";
/// Garmin `resources/strings/strings.xml` relative path.
pub(crate) const REL_GARMIN_STRINGS: &str = "resources/strings/strings.xml";
/// Garmin `resources/drawables/drawables.xml` relative path.
pub(crate) const REL_GARMIN_DRAWABLES: &str = "resources/drawables/drawables.xml";
/// Garmin `resources/drawables/launcher_icon.png` relative path.
pub(crate) const REL_GARMIN_ICON: &str = "resources/drawables/launcher_icon.png";
/// Garmin `source/EuvWatchApp.mc` relative path.
pub(crate) const REL_GARMIN_SOURCE_MC: &str = "source/EuvWatchApp.mc";
/// Zepp OS `page` directory name.
pub(crate) const DIR_PAGE: &str = "page";
/// Zepp OS `utils` directory name.
pub(crate) const DIR_UTILS: &str = "utils";
/// Zepp OS `icon.png` filename.
pub(crate) const FILE_ICON_PNG: &str = "icon.png";
/// Wear OS shell-only `README.txt` filename.
pub(crate) const FILE_README_TXT: &str = "README.txt";
/// Wearable bridge shape label `round`.
pub(crate) const SHAPE_ROUND: &str = "round";
/// Wearable vendor id string for Xiaomi HyperOS / Vela Watch.
pub(crate) const WEARABLE_ID_HYPEROS_VELA: &str = "hyperos-vela";
/// Wearable WASM path inside Vela / vivo BlueOS hosts.
pub(crate) const WEARABLE_COMMON_WASM_PATH: &str = "/common/euv_app.wasm";
/// Wearable WASM path inside Zepp OS hosts.
pub(crate) const WEARABLE_ZEPPOS_WASM_PATH: &str = "/assets/euv_app.wasm";
/// Wearable default DPR string.
pub(crate) const WEARABLE_DEFAULT_DPR_STR: &str = "2.0";
/// Wearable round-466 width/height string.
pub(crate) const WEARABLE_DIM_466: &str = "466";
/// Wearable round-480 width/height string.
pub(crate) const WEARABLE_DIM_480: &str = "480";
/// `wasm-bindgen` `--no-typescript` flag.
pub(crate) const ECO_ARG_NO_TYPESCRIPT: &str = "--no-typescript";
/// `wasm-bindgen` `--out-dir` flag.
pub(crate) const ECO_ARG_OUT_DIR: &str = "--out-dir";
/// `wasm-bindgen` `--out-name` flag.
pub(crate) const ECO_ARG_OUT_NAME: &str = "--out-name";
/// `wasm-bindgen` `no-modules` target value.
pub(crate) const ARG_NO_MODULES: &str = "no-modules";
/// `wasm-bindgen` output base name `euv_example`.
pub(crate) const ARG_OUT_NAME_EXAMPLE: &str = "euv_example";
/// `rustup target list --installed` arguments.
pub(crate) const ARG_TARGET_SUBCMD: &str = "target";
/// `rustup` `list` subcommand.
pub(crate) const ARG_LIST_SUBCMD: &str = "list";
/// `rustup` `--installed` flag.
pub(crate) const ARG_INSTALLED_FLAG: &str = "--installed";
/// `hvigorw` `assembleHap` task name.
pub(crate) const ARG_ASSEMBLE_HAP: &str = "assembleHap";
/// `hvigorw` `--mode` flag.
pub(crate) const ARG_MODE: &str = "--mode";
/// `hvigorw` `module` mode value.
pub(crate) const ARG_MODULE: &str = "module";
/// `hvigorw` `buildMode=release` parameter.
pub(crate) const ARG_BUILD_MODE_RELEASE: &str = "buildMode=release";
/// `hdc` `install` subcommand.
pub(crate) const ARG_INSTALL_SUBCMD: &str = "install";
/// `hap` `release` subcommand.
pub(crate) const ARG_HAP_RELEASE: &str = "release";
/// HarmonyOS `clang++` C++17 standard flag.
pub(crate) const ARG_STD_CPP17: &str = "-std=c++17";
/// HarmonyOS `clang++` PIC flag.
pub(crate) const ARG_FPIC: &str = "-fPIC";
/// HarmonyOS `clang++` shared library flag.
pub(crate) const ARG_SHARED: &str = "-shared";
/// HarmonyOS linker `--whole-archive` flag.
pub(crate) const ARG_WHOLE_ARCHIVE: &str = "-Wl,--whole-archive";
/// HarmonyOS linker `--no-whole-archive` flag.
pub(crate) const ARG_NO_WHOLE_ARCHIVE: &str = "-Wl,--no-whole-archive";
/// HarmonyOS linker soname flag.
pub(crate) const ARG_HARMONY_SONAME: &str = "-Wl,-soname,libeuv_harmony_host.so";
/// HarmonyOS JSON field names mutated for Atomic Service patching.
pub(crate) const JSON_KEY_MODULE: &str = "module";
/// HarmonyOS `mainElement` key.
pub(crate) const JSON_KEY_MAIN_ELEMENT: &str = "mainElement";
/// HarmonyOS `installationFree` key.
pub(crate) const JSON_KEY_INSTALLATION_FREE: &str = "installationFree";
/// HarmonyOS `deviceTypes` key.
pub(crate) const JSON_KEY_DEVICE_TYPES: &str = "deviceTypes";
/// HarmonyOS `abilities` key.
pub(crate) const JSON_KEY_ABILITIES: &str = "abilities";
/// HarmonyOS ability `name` key.
pub(crate) const JSON_KEY_NAME: &str = "name";
/// HarmonyOS ability `srcEntry` key.
pub(crate) const JSON_KEY_SRC_ENTRY: &str = "srcEntry";
/// HarmonyOS Atomic Service `srcEntry` path.
pub(crate) const HARMONY_ATOMIC_SRC_ENTRY: &str = "./ets/entryability/AtomicAbility.ets";
/// HarmonyOS `EntryAbility` export class declaration replaced for Atomic Service.
pub(crate) const HARMONY_ENTRY_CLASS_DECL: &str = "export default class EntryAbility";
/// HarmonyOS `AtomicAbility` export class declaration.
pub(crate) const HARMONY_ATOMIC_CLASS_DECL: &str = "export default class AtomicAbility";
/// HarmonyOS NDK clang++ binary filename.
pub(crate) const TOOL_CLANGXX: &str = "clang++";
/// HarmonyOS NDK llvm directory name.
pub(crate) const DIR_LLVM: &str = "llvm";
/// HarmonyOS NDK native directory name.
pub(crate) const DIR_NATIVE: &str = "native";
/// HarmonyOS NDK sysroot directory name.
pub(crate) const DIR_SYSROOT: &str = "sysroot";
/// HarmonyOS device alias tokens.
pub(crate) const ALIAS_HARMONY_PC: &str = "harmony-pc";
/// HarmonyOS desktop device alias.
pub(crate) const ALIAS_DESKTOP: &str = "desktop";
/// HarmonyOS watch device alias.
pub(crate) const ALIAS_WATCH: &str = "watch";
/// HarmonyOS vision device alias.
pub(crate) const ALIAS_VISION: &str = "vision";
/// HarmonyOS automotive device alias.
pub(crate) const ALIAS_AUTOMOTIVE: &str = "automotive";
/// MiniApp / Wearable / QuickApp alias constants.
pub(crate) const ALIAS_BYTEDANCE: &str = "bytedance";
/// JD MiniApp long alias.
pub(crate) const ALIAS_JINGDONG: &str = "jingdong";
/// Xiaohongshu MiniApp long alias.
pub(crate) const ALIAS_XIAOHONGSHU: &str = "xiaohongshu";
/// Feishu MiniApp alias.
pub(crate) const ALIAS_LARK: &str = "lark";
/// HarmonyOS Atomic Service short alias.
pub(crate) const ALIAS_ATOMIC: &str = "atomic";
/// QuickApp unified alias.
pub(crate) const ALIAS_QUICKAPP: &str = "quickapp";
/// QuickApp Alliance explicit alias.
pub(crate) const ALIAS_QUICKAPP_ALLIANCE: &str = "quickapp-alliance";
/// QuickApp Huawei explicit alias.
pub(crate) const ALIAS_QUICKAPP_HUAWEI: &str = "quickapp-huawei";
/// QuickApp Xiaomi OEM alias.
pub(crate) const ALIAS_XIAOMI: &str = "xiaomi";
/// QuickApp OPPO OEM alias.
pub(crate) const ALIAS_OPPO: &str = "oppo";
/// QuickApp vivo OEM alias.
pub(crate) const ALIAS_VIVO: &str = "vivo";
/// QuickApp Honor OEM alias.
pub(crate) const ALIAS_HONOR: &str = "honor";
/// Wearable generic alias.
pub(crate) const ALIAS_GENERIC: &str = "generic";
/// Wearable generic-wearable alias.
pub(crate) const ALIAS_GENERIC_WEARABLE: &str = "generic-wearable";
/// Wear OS Samsung Watch alias.
pub(crate) const ALIAS_SAMSUNG_WATCH: &str = "samsung-watch";
/// Wear OS Galaxy Watch alias.
pub(crate) const ALIAS_GALAXY_WATCH: &str = "galaxy-watch";
/// Wear OS Pixel Watch alias.
pub(crate) const ALIAS_PIXEL_WATCH: &str = "pixel-watch";
/// watchOS Apple Watch alias.
pub(crate) const ALIAS_APPLE_WATCH: &str = "apple-watch";
/// vivo BlueOS alias.
pub(crate) const ALIAS_BLUEOS: &str = "blueos";
/// vivo BlueOS watch alias.
pub(crate) const ALIAS_BLUEOS_WATCH: &str = "blueos-watch";
/// vivo BlueOS full alias.
pub(crate) const ALIAS_VIVO_BLUEOS: &str = "vivo-blueos";
/// OPPO ColorOS Watch alias.
pub(crate) const ALIAS_COLOROS_WATCH: &str = "coloros-watch";
/// HarmonyOS wearable alias.
pub(crate) const ALIAS_HARMONY_WEARABLE: &str = "harmony-wearable";
/// Huawei Watch alias.
pub(crate) const ALIAS_HUAWEI_WATCH: &str = "huawei-watch";
/// Xiaomi Mi Watch alias.
pub(crate) const ALIAS_MI_WATCH: &str = "mi-watch";
/// Amazfit alias.
pub(crate) const ALIAS_AMAZFIT: &str = "amazfit";
/// Unix executable file permissions bitmask for generated wrapper scripts (`0o755`).
#[cfg(unix)]
pub(crate) const UNIX_EXECUTABLE_MODE: u32 = 0o755;
/// HarmonyOS `module.json5` deviceTypes snippet for phone.
pub(crate) const HARMONY_MOD_DEV_PHONE: &str = "\"phone\"";
/// HarmonyOS `module.json5` deviceTypes snippet for tablet.
pub(crate) const HARMONY_MOD_DEV_TABLET: &str = "\"tablet\"";
/// HarmonyOS `module.json5` deviceTypes snippet for 2in1 PC.
pub(crate) const HARMONY_MOD_DEV_2IN1: &str = "\"2in1\"";
/// HarmonyOS `module.json5` deviceTypes snippet for universal profile.
pub(crate) const HARMONY_MOD_DEV_UNIVERSAL: &str = "\"phone\", \"tablet\", \"2in1\"";
/// HarmonyOS `module.json5` deviceTypes snippet for foldable profile.
pub(crate) const HARMONY_MOD_DEV_FOLDABLE: &str = "\"phone\", \"tablet\"";
/// HarmonyOS `module.json5` deviceTypes snippet for wearable profile.
pub(crate) const HARMONY_MOD_DEV_WEARABLE: &str = "\"wearable\"";
/// HarmonyOS `module.json5` deviceTypes snippet for TV profile.
pub(crate) const HARMONY_MOD_DEV_TV: &str = "\"tv\"";
/// HarmonyOS `module.json5` deviceTypes snippet for automotive profile.
pub(crate) const HARMONY_MOD_DEV_CAR: &str = "\"car\"";
/// HarmonyOS `module.json5` fullscreen-only window mode array.
pub(crate) const HARMONY_WIN_MODE_FULLSCREEN: &str = "[\"fullscreen\"]";
/// HarmonyOS `module.json5` fullscreen+split window mode array.
pub(crate) const HARMONY_WIN_MODE_SPLIT: &str = "[\"fullscreen\", \"split\"]";
/// HarmonyOS `module.json5` fullscreen+split+floating window mode array.
pub(crate) const HARMONY_WIN_MODE_ALL: &str = "[\"fullscreen\", \"split\", \"floating\"]";
/// HarmonyOS `module.json5` window dimension limits for tablet.
pub(crate) const HARMONY_WIN_LIMIT_TABLET: &str =
"\n \"minWindowWidth\": 520,\n \"minWindowHeight\": 400,";
/// HarmonyOS `module.json5` window dimension limits for 2in1 PC.
pub(crate) const HARMONY_WIN_LIMIT_2IN1: &str = "\n \"minWindowWidth\": 640,\n \"minWindowHeight\": 480,\n \"maxWindowWidth\": 4096,\n \"maxWindowHeight\": 2560,";
/// HarmonyOS `module.json5` window dimension limits for universal profile.
pub(crate) const HARMONY_WIN_LIMIT_UNIVERSAL: &str = "\n \"minWindowWidth\": 360,\n \"minWindowHeight\": 480,\n \"maxWindowWidth\": 4096,\n \"maxWindowHeight\": 2560,";
/// HarmonyOS `ohos` clang wrapper script filename prefix.
pub(crate) const HARMONY_WRAPPER_PREFIX: &str = "ohos-";
/// HarmonyOS `ohos` clang wrapper script filename suffix on Unix hosts.
pub(crate) const HARMONY_WRAPPER_SUFFIX: &str = "-cc.sh";
/// HarmonyOS `ohos` clang wrapper script filename suffix on Windows hosts.
pub(crate) const HARMONY_WRAPPER_WIN_SUFFIX: &str = "-cc.cmd";
/// Error message when `wasm-bindgen` does not emit expected files.
pub(crate) const ERR_WASM_BINDGEN_OUTPUTS_MISSING: &str =
"wasm-bindgen did not emit expected euv_example_bg.wasm / euv_example.js outputs";
/// Error message when `module.json5` lacks a JSON object under `"module"`.
pub(crate) const ERR_HARMONY_MODULE_JSON_INVALID: &str =
"HarmonyOS module.json5 does not contain a valid module object";
/// Common `--version` probe flag used when checking external tool availability.
pub(crate) const ECO_ARG_PROBE_VERSION: &str = "--version";