{"_id":"@evenrealities/even_hub_sdk","_rev":"19-c3f275cc7bf8d71d0facf7a2ccc8e24c","name":"@evenrealities/even_hub_sdk","dist-tags":{"latest":"0.0.16"},"versions":{"0.0.3":{"name":"@evenrealities/even_hub_sdk","version":"0.0.3","author":{"name":"Whiskee","email":"whiskee.chen@evenrealities.com"},"license":"MIT","_id":"@evenrealities/even_hub_sdk@0.0.3","maintainers":[{"name":"whiskee.chen","email":"whiskee.chen@evenrealities.com"},{"name":"carson.zhu","email":"carson.zhu@evenrealities.com"}],"dist":{"shasum":"bdc40c004453b3dae52c0d0a2960c0d40bcf2293","tarball":"https://registry.npmjs.org/@evenrealities/even_hub_sdk/-/even_hub_sdk-0.0.3.tgz","fileCount":6,"integrity":"sha512-NOO0O4ssO7mi/XtD77df2WbLf0szLI4RfUJ5Ix/sNCY0l7q5UUM9FUCOptnPjT2XAfNPy2DEQa88Hgy2RK9sEg==","signatures":[{"sig":"MEYCIQCmkFKNY634Wt9CgOuo2Jc4WUWc7KLhIjtvGGltfWuwswIhAL66Dy7zEyneUQMdyfVYN3lC5qNP6OSDS8J2S7UbFzqI","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":231735},"main":"dist/index.js","type":"module","module":"dist/index.mjs","engines":{"node":"^20.0.0 || >=22.0.0"},"exports":{".":{"import":{"default":"./dist/index.mjs"},"require":{"default":"./dist/index.js"}}},"gitHead":"4ce9bacbe3b45921bdea17e7be819d9cf1af63c6","scripts":{"dev":"tsup --watch","test":"vitest run --passWithNoTests","build":"tsup && npm run obfuscate","clean":"rimraf dist","verify":"npm run typecheck && npm run test && npm run build","build:raw":"tsup","obfuscate":"javascript-obfuscator \"dist\" --output \"dist\" --exclude \"dist/**/*.d.ts\" --exclude \"dist/**/*.map\" --compact true --control-flow-flattening true --control-flow-flattening-threshold 0.75 --dead-code-injection true --dead-code-injection-threshold 0.4 --string-array true --string-array-encoding base64 --string-array-threshold 0.75","typecheck":"tsc","test:watch":"vitest","prepublishOnly":"npm run verify"},"_npmUser":{"name":"whiskee.chen","email":"whiskee.chen@evenrealities.com"},"_npmVersion":"11.6.0","description":"TypeScript SDK for Even Hub developers to communicate with Even App","directories":{},"sideEffects":false,"_nodeVersion":"24.10.0","_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.3.6","rimraf":"^6.0.1","vitest":"^3.0.2","typescript":"^5.7.3","javascript-obfuscator":"^4.1.0"},"_npmOperationalInternal":{"tmp":"tmp/even_hub_sdk_0.0.3_1769482044646_0.4754297408642434","host":"s3://npm-registry-packages-npm-production"}},"0.0.4":{"name":"@evenrealities/even_hub_sdk","version":"0.0.4","author":{"name":"Whiskee","email":"whiskee.chen@evenrealities.com"},"license":"MIT","_id":"@evenrealities/even_hub_sdk@0.0.4","maintainers":[{"name":"whiskee.chen","email":"whiskee.chen@evenrealities.com"},{"name":"carson.zhu","email":"carson.zhu@evenrealities.com"}],"dist":{"shasum":"ee8263c4316a15e6954d1232ae7cf651de9a4011","tarball":"https://registry.npmjs.org/@evenrealities/even_hub_sdk/-/even_hub_sdk-0.0.4.tgz","fileCount":6,"integrity":"sha512-KQzk1Sx8qAog0OFR1wvVVyTG+1BPBDsI1aOQqA2WSRAffGQmcIOl5FiJ41ictlVBQ0gVkukolykS6GVknssYHw==","signatures":[{"sig":"MEUCIQDJRBxv8kAGiZo00aS/Q6ou+fu+ZLOBonr3+3e5iUjeyAIgYQgiuNaV4WHN/WPgPI6ahXIYE3V7CB3KWKLwEmxzDGs=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":248205},"main":"dist/index.js","type":"module","module":"dist/index.mjs","engines":{"node":"^20.0.0 || >=22.0.0"},"exports":{".":{"import":{"default":"./dist/index.mjs"},"require":{"default":"./dist/index.js"}}},"gitHead":"4ce9bacbe3b45921bdea17e7be819d9cf1af63c6","scripts":{"dev":"tsup --watch","test":"vitest run --passWithNoTests","build":"tsup && npm run obfuscate","clean":"rimraf dist","verify":"npm run typecheck && npm run test && npm run build","build:raw":"tsup","obfuscate":"javascript-obfuscator \"dist\" --output \"dist\" --exclude \"dist/**/*.d.ts\" --exclude \"dist/**/*.map\" --compact true --control-flow-flattening true --control-flow-flattening-threshold 0.75 --dead-code-injection true --dead-code-injection-threshold 0.4 --string-array true --string-array-encoding base64 --string-array-threshold 0.75","typecheck":"tsc","test:watch":"vitest","prepublishOnly":"npm run verify"},"_npmUser":{"name":"whiskee.chen","email":"whiskee.chen@evenrealities.com"},"_npmVersion":"11.6.0","description":"TypeScript SDK for Even Hub developers to communicate with Even App","directories":{},"sideEffects":false,"_nodeVersion":"24.10.0","_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.3.6","rimraf":"^6.0.1","vitest":"^3.0.2","typescript":"^5.7.3","javascript-obfuscator":"^4.1.0"},"_npmOperationalInternal":{"tmp":"tmp/even_hub_sdk_0.0.4_1769482331917_0.0036185321008679328","host":"s3://npm-registry-packages-npm-production"}},"0.0.5":{"name":"@evenrealities/even_hub_sdk","version":"0.0.5","author":{"name":"Whiskee","email":"whiskee.chen@evenrealities.com"},"license":"MIT","_id":"@evenrealities/even_hub_sdk@0.0.5","maintainers":[{"name":"whiskee.chen","email":"whiskee.chen@evenrealities.com"},{"name":"carson.zhu","email":"carson.zhu@evenrealities.com"}],"dist":{"shasum":"67c0352eb550975cc78615dc4243fcb17648f646","tarball":"https://registry.npmjs.org/@evenrealities/even_hub_sdk/-/even_hub_sdk-0.0.5.tgz","fileCount":6,"integrity":"sha512-P4weV3QQTu1XsbO3Fi2fjrcdcBxfRBXr8Vhmxx0QkJ20prBfTIMH4zNuFClBgNbGU9Q6UUwkU2l13EnmZJeCCw==","signatures":[{"sig":"MEYCIQDJbw1mQej2SOB9XAflVvNKnQQsvcTK/74sYwPeRMqh6AIhAL6LTuYWX8/U5XI7XAdQJ9F/1JrWzRZLLWokTguH8CtM","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":260537},"main":"dist/index.cjs","type":"module","module":"dist/index.js","engines":{"node":"^20.0.0 || >=22.0.0"},"exports":{".":{"import":{"default":"./dist/index.js"},"require":{"default":"./dist/index.cjs"}}},"gitHead":"4ce9bacbe3b45921bdea17e7be819d9cf1af63c6","scripts":{"dev":"tsup --watch","test":"vitest run --passWithNoTests","build":"tsup && npm run obfuscate","clean":"rimraf dist","verify":"npm run typecheck && npm run test && npm run build","build:raw":"tsup","obfuscate":"javascript-obfuscator \"dist\" --output \"dist\" --exclude \"dist/**/*.d.ts\" --exclude \"dist/**/*.map\" --compact true --control-flow-flattening true --control-flow-flattening-threshold 0.75 --dead-code-injection true --dead-code-injection-threshold 0.4 --string-array true --string-array-encoding base64 --string-array-threshold 0.75","typecheck":"tsc","test:watch":"vitest","prepublishOnly":"npm run verify"},"_npmUser":{"name":"whiskee.chen","email":"whiskee.chen@evenrealities.com"},"_npmVersion":"11.6.0","description":"TypeScript SDK for Even Hub developers to communicate with Even App","directories":{},"sideEffects":false,"_nodeVersion":"24.10.0","_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.3.6","rimraf":"^6.0.1","vitest":"^3.0.2","typescript":"^5.7.3","javascript-obfuscator":"^4.1.0"},"_npmOperationalInternal":{"tmp":"tmp/even_hub_sdk_0.0.5_1769521217445_0.17902441562860516","host":"s3://npm-registry-packages-npm-production"}},"0.0.6":{"name":"@evenrealities/even_hub_sdk","version":"0.0.6","author":{"name":"Whiskee","email":"whiskee.chen@evenrealities.com"},"license":"MIT","_id":"@evenrealities/even_hub_sdk@0.0.6","maintainers":[{"name":"whiskee.chen","email":"whiskee.chen@evenrealities.com"},{"name":"carson.zhu","email":"carson.zhu@evenrealities.com"}],"dist":{"shasum":"7fbd71864a1c714af019d8e2f0d7266b990000b2","tarball":"https://registry.npmjs.org/@evenrealities/even_hub_sdk/-/even_hub_sdk-0.0.6.tgz","fileCount":8,"integrity":"sha512-rPwoSef8d3Eld3OyEyzXd536ol42DOjrYkxJUWc0C0htJ3GD1GEhqdSVQtPg46tzU4My3F7zwSzUcvsD/5r0Cw==","signatures":[{"sig":"MEYCIQDARv/WC0txLigzyb+ead0AVIB9ifGKt2bcveX23kh8wwIhAJTKzdk+9/L/iDIjoXgIZQi0vD2gJh4Eqga/FdpaoiAm","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":340890},"main":"dist/index.cjs","type":"module","types":"./dist/index.d.ts","module":"dist/index.js","engines":{"node":"^20.0.0 || >=22.0.0"},"exports":{".":{"import":{"default":"./dist/index.js"},"require":{"default":"./dist/index.cjs"}}},"gitHead":"93dd7409f4060ecd6e1d69a1e22d628afffe98f3","scripts":{"dev":"tsup --watch","test":"vitest run --passWithNoTests","build":"tsup && npm run obfuscate","clean":"rimraf dist","verify":"npm run typecheck && npm run test && npm run build","build:raw":"tsup","obfuscate":"javascript-obfuscator \"dist\" --output \"dist\" --exclude \"dist/**/*.d.ts\" --exclude \"dist/**/*.map\" --compact true --control-flow-flattening true --control-flow-flattening-threshold 0.75 --dead-code-injection true --dead-code-injection-threshold 0.4 --string-array true --string-array-encoding base64 --string-array-threshold 0.75","typecheck":"tsc","test:watch":"vitest","prepublishOnly":"npm run verify"},"_npmUser":{"name":"whiskee.chen","email":"whiskee.chen@evenrealities.com"},"_npmVersion":"11.6.0","description":"TypeScript SDK for Even Hub developers to communicate with Even App","directories":{},"sideEffects":false,"_nodeVersion":"24.10.0","_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.3.6","rimraf":"^6.0.1","vitest":"^3.0.2","typescript":"^5.7.3","javascript-obfuscator":"^4.1.0"},"_npmOperationalInternal":{"tmp":"tmp/even_hub_sdk_0.0.6_1769581151659_0.2792997757088054","host":"s3://npm-registry-packages-npm-production"}},"0.0.7":{"name":"@evenrealities/even_hub_sdk","version":"0.0.7","author":{"name":"Whiskee","email":"whiskee.chen@evenrealities.com"},"license":"MIT","_id":"@evenrealities/even_hub_sdk@0.0.7","maintainers":[{"name":"whiskee.chen","email":"whiskee.chen@evenrealities.com"},{"name":"carson.zhu","email":"carson.zhu@evenrealities.com"}],"dist":{"shasum":"0baf41a4161d289f1a322a2f433612ed1892b139","tarball":"https://registry.npmjs.org/@evenrealities/even_hub_sdk/-/even_hub_sdk-0.0.7.tgz","fileCount":8,"integrity":"sha512-AInCBaNl+RsjnjsxkrPds2XkMyi8w35nF7daHjz7YrgMm8bkJrDDrr4eBatTj/PwjzuEy4C6XY2e+s6Fut0Wlg==","signatures":[{"sig":"MEUCIEBtzSHXPhoKzk6Ic6oBTXF3kj4YL/IRYyCbjvsceR+WAiEAjM6q2irgvTIy5DK51YCR0OrAlMIkuh1K8YlNjFh1FM0=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":346973},"main":"dist/index.cjs","type":"module","types":"./dist/index.d.ts","module":"dist/index.js","engines":{"node":"^20.0.0 || >=22.0.0"},"exports":{".":{"import":{"default":"./dist/index.js"},"require":{"default":"./dist/index.cjs"}}},"gitHead":"6b3904b18419318377da01858e274f8cc987aa97","scripts":{"dev":"tsup --watch","test":"vitest run --passWithNoTests","build":"tsup && npm run obfuscate","clean":"rimraf dist","verify":"npm run typecheck && npm run test && npm run build","build:raw":"tsup","obfuscate":"javascript-obfuscator \"dist\" --output \"dist\" --exclude \"dist/**/*.d.ts\" --exclude \"dist/**/*.map\" --compact true --control-flow-flattening true --control-flow-flattening-threshold 0.75 --dead-code-injection true --dead-code-injection-threshold 0.4 --string-array true --string-array-encoding base64 --string-array-threshold 0.75","typecheck":"tsc","test:watch":"vitest","prepublishOnly":"npm run verify"},"_npmUser":{"name":"whiskee.chen","email":"whiskee.chen@evenrealities.com"},"_npmVersion":"11.6.0","description":"TypeScript SDK for Even Hub developers to communicate with Even App","directories":{},"sideEffects":false,"_nodeVersion":"24.10.0","_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.3.6","rimraf":"^6.0.1","vitest":"^3.0.2","typescript":"^5.7.3","javascript-obfuscator":"^4.1.0"},"_npmOperationalInternal":{"tmp":"tmp/even_hub_sdk_0.0.7_1770793367841_0.571135285947346","host":"s3://npm-registry-packages-npm-production"}},"0.0.8":{"name":"@evenrealities/even_hub_sdk","version":"0.0.8","author":{"name":"Whiskee","email":"whiskee.chen@evenrealities.com"},"license":"MIT","_id":"@evenrealities/even_hub_sdk@0.0.8","maintainers":[{"name":"whiskee.chen","email":"whiskee.chen@evenrealities.com"},{"name":"carson.zhu","email":"carson.zhu@evenrealities.com"}],"dist":{"shasum":"59bef63832fa157bacc8138d61f6b756d50e38cc","tarball":"https://registry.npmjs.org/@evenrealities/even_hub_sdk/-/even_hub_sdk-0.0.8.tgz","fileCount":8,"integrity":"sha512-C4uDH4YRYw18fHBiCP1w8UejEeMlJwxmvpJ/WEhZ7rvshDZadHUeRVHqN2MM+sHpL9/MTWX0ZHpnF+92pCWiWg==","signatures":[{"sig":"MEYCIQDxK15ElAJgNPtiHcluwU+OmGOg8EDjx/ZPLmlKAqu5KwIhAOmWaYD3p//yjsTVfGjIPW4TJcIULfa7tprRQxk8KWYD","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":396044},"main":"dist/index.cjs","type":"module","types":"./dist/index.d.ts","module":"dist/index.js","engines":{"node":"^20.0.0 || >=22.0.0"},"exports":{".":{"import":{"default":"./dist/index.js"},"require":{"default":"./dist/index.cjs"}}},"gitHead":"04ad87bbfab2d02ca4b567de2437abb8929f9356","scripts":{"dev":"tsup --watch","test":"vitest run --passWithNoTests","build":"tsup && npm run obfuscate","clean":"rimraf dist","verify":"npm run typecheck && npm run test && npm run build","build:raw":"tsup","obfuscate":"javascript-obfuscator \"dist\" --output \"dist\" --exclude \"dist/**/*.d.ts\" --exclude \"dist/**/*.map\" --compact true --control-flow-flattening true --control-flow-flattening-threshold 0.75 --dead-code-injection true --dead-code-injection-threshold 0.4 --string-array true --string-array-encoding base64 --string-array-threshold 0.75","typecheck":"tsc","test:watch":"vitest","prepublishOnly":"npm run verify"},"_npmUser":{"name":"whiskee.chen","email":"whiskee.chen@evenrealities.com"},"_npmVersion":"11.11.0","description":"TypeScript SDK for Even Hub developers to communicate with Even App","directories":{},"sideEffects":false,"_nodeVersion":"25.6.0","_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.3.6","rimraf":"^6.0.1","vitest":"^3.0.2","typescript":"^5.7.3","javascript-obfuscator":"^4.1.0"},"_npmOperationalInternal":{"tmp":"tmp/even_hub_sdk_0.0.8_1774420302129_0.9199253841277275","host":"s3://npm-registry-packages-npm-production"}},"0.0.9":{"name":"@evenrealities/even_hub_sdk","version":"0.0.9","author":{"name":"Whiskee","email":"whiskee.chen@evenrealities.com"},"license":"MIT","_id":"@evenrealities/even_hub_sdk@0.0.9","maintainers":[{"name":"whiskee.chen","email":"whiskee.chen@evenrealities.com"},{"name":"carson.zhu","email":"carson.zhu@evenrealities.com"}],"dist":{"shasum":"afdb0e57750e37724ac18cd8365927b8d96fba28","tarball":"https://registry.npmjs.org/@evenrealities/even_hub_sdk/-/even_hub_sdk-0.0.9.tgz","fileCount":8,"integrity":"sha512-LlqqX1sp3sgBs86DSZs5J4nzTnoAV0ZHwcEo1xtOB9cGSrrgNv+6wMiVmR4CfynVeT5NJs/xE3hwO0Hvep17mg==","signatures":[{"sig":"MEUCIQCTo0dc5UVXlc1ckNIt9ksLTr0DpHy2xpo2d0Ar4vDJBwIgDggM5RJgCCbfsYkCf80J+5gtrYTRMBaKfXCP+7eU2JA=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":396583},"main":"dist/index.cjs","type":"module","types":"./dist/index.d.ts","module":"dist/index.js","engines":{"node":"^20.0.0 || >=22.0.0"},"exports":{".":{"import":{"default":"./dist/index.js"},"require":{"default":"./dist/index.cjs"}}},"gitHead":"50870c999a5c1ff7644c07a9e2105dfc6874bb6f","scripts":{"dev":"tsup --watch","test":"vitest run --passWithNoTests","build":"tsup && npm run obfuscate","clean":"rimraf dist","verify":"npm run typecheck && npm run test && npm run build","build:raw":"tsup","obfuscate":"javascript-obfuscator \"dist\" --output \"dist\" --exclude \"dist/**/*.d.ts\" --exclude \"dist/**/*.map\" --compact true --control-flow-flattening true --control-flow-flattening-threshold 0.75 --dead-code-injection true --dead-code-injection-threshold 0.4 --string-array true --string-array-encoding base64 --string-array-threshold 0.75","typecheck":"tsc","test:watch":"vitest","prepublishOnly":"npm run verify"},"_npmUser":{"name":"whiskee.chen","email":"whiskee.chen@evenrealities.com"},"_npmVersion":"11.11.0","description":"TypeScript SDK for Even Hub developers to communicate with Even App","directories":{},"sideEffects":false,"_nodeVersion":"25.6.0","_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.3.6","rimraf":"^6.0.1","vitest":"^3.0.2","typescript":"^5.7.3","javascript-obfuscator":"^4.1.0"},"_npmOperationalInternal":{"tmp":"tmp/even_hub_sdk_0.0.9_1774428884253_0.5690409840339339","host":"s3://npm-registry-packages-npm-production"}},"0.0.10":{"name":"@evenrealities/even_hub_sdk","version":"0.0.10","author":{"name":"Whiskee","email":"whiskee.chen@evenrealities.com"},"license":"MIT","_id":"@evenrealities/even_hub_sdk@0.0.10","maintainers":[{"name":"whiskee.chen","email":"whiskee.chen@evenrealities.com"},{"name":"carson.zhu","email":"carson.zhu@evenrealities.com"}],"dist":{"shasum":"77a8eba82e83ec6781b529496e675c5cc21f40f2","tarball":"https://registry.npmjs.org/@evenrealities/even_hub_sdk/-/even_hub_sdk-0.0.10.tgz","fileCount":8,"integrity":"sha512-95zmlbFzyyh+TxPz5Wq8Ix4IxUDZzo/WJWAUXPQ/83kaU8R78MOYYBgKDM47Yw61LoEn+Ob5GNLDu/T9bj85xA==","signatures":[{"sig":"MEYCIQD1Y2pc/v9bpKIYoQkGVGc0lqw0oxCnNSifu2l8Z9npDwIhAPJGNbFLsLB79kv5YsMvdE6JlS4dxFRiZUCJlCqr5z73","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":412659},"main":"dist/index.cjs","type":"module","types":"./dist/index.d.ts","module":"dist/index.js","engines":{"node":"^20.0.0 || >=22.0.0"},"exports":{".":{"import":{"default":"./dist/index.js"},"require":{"default":"./dist/index.cjs"}}},"gitHead":"c413cf28da6924aaa274c4d76fc8c70bedbf492b","scripts":{"dev":"tsup --watch","test":"vitest run --passWithNoTests","build":"tsup && npm run obfuscate","clean":"rimraf dist","verify":"npm run typecheck && npm run test && npm run build","build:raw":"tsup","obfuscate":"javascript-obfuscator \"dist\" --output \"dist\" --exclude \"dist/**/*.d.ts\" --exclude \"dist/**/*.map\" --compact true --control-flow-flattening true --control-flow-flattening-threshold 0.75 --dead-code-injection true --dead-code-injection-threshold 0.4 --string-array true --string-array-encoding base64 --string-array-threshold 0.75","typecheck":"tsc","test:watch":"vitest","prepublishOnly":"npm run verify"},"_npmUser":{"name":"whiskee.chen","email":"whiskee.chen@evenrealities.com"},"_npmVersion":"11.11.0","description":"TypeScript SDK for Even Hub developers to communicate with Even App","directories":{},"sideEffects":["./src/shadow-timers.ts","./dist/index.js","./dist/index.cjs"],"_nodeVersion":"25.6.0","publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.3.6","rimraf":"^6.0.1","vitest":"^3.0.2","typescript":"^5.7.3","javascript-obfuscator":"^4.1.0"},"_npmOperationalInternal":{"tmp":"tmp/even_hub_sdk_0.0.10_1775812661195_0.030554625995433016","host":"s3://npm-registry-packages-npm-production"}},"0.0.11":{"name":"@evenrealities/even_hub_sdk","version":"0.0.11","author":{"name":"Whiskee","email":"whiskee.chen@evenrealities.com"},"license":"MIT","_id":"@evenrealities/even_hub_sdk@0.0.11","maintainers":[{"name":"whiskee.chen","email":"whiskee.chen@evenrealities.com"},{"name":"carson.zhu","email":"carson.zhu@evenrealities.com"}],"dist":{"shasum":"8d43d79987b0c539607aec966d8ec17311114eb8","tarball":"https://registry.npmjs.org/@evenrealities/even_hub_sdk/-/even_hub_sdk-0.0.11.tgz","fileCount":8,"integrity":"sha512-QLj15JmMbfPncl5hodTZEgQ42Dky85kvtlnqjEIsYZtvR4a5zWtdmUma0NDCNxhE+hxCjUpSGsu1uyDh1iUMdw==","signatures":[{"sig":"MEUCIQDh+LlbsoC8zm5nP38OjKBWOPT7b52BGUqgzpM+IRlO3AIgXSmvyZX51vXEYbPMXPbsTbVdADhwLRUEsTICglyx9QE=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":393183},"main":"dist/index.cjs","type":"module","types":"./dist/index.d.ts","module":"dist/index.js","engines":{"node":"^20.0.0 || >=22.0.0"},"exports":{".":{"import":{"default":"./dist/index.js"},"require":{"default":"./dist/index.cjs"}}},"gitHead":"24187c99eaaae2723dd9b046c5e76d7ef3cb0a26","scripts":{"dev":"tsup --watch","test":"vitest run --passWithNoTests","build":"tsup && npm run obfuscate","clean":"rimraf dist","verify":"npm run typecheck && npm run test && npm run build","build:raw":"tsup","obfuscate":"javascript-obfuscator \"dist\" --output \"dist\" --exclude \"dist/**/*.d.ts\" --exclude \"dist/**/*.map\" --compact true --control-flow-flattening true --control-flow-flattening-threshold 0.75 --dead-code-injection true --dead-code-injection-threshold 0.4 --string-array true --string-array-encoding base64 --string-array-threshold 0.75","typecheck":"tsc","test:watch":"vitest","prepublishOnly":"npm run verify"},"_npmUser":{"name":"whiskee.chen","email":"whiskee.chen@evenrealities.com"},"_npmVersion":"10.9.8","description":"TypeScript SDK for Even Hub developers to communicate with Even App","directories":{},"sideEffects":["./src/shadow-timers.ts","./dist/index.js","./dist/index.cjs"],"_nodeVersion":"22.22.3","publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.3.6","rimraf":"^6.0.1","vitest":"^3.0.2","typescript":"^5.7.3","javascript-obfuscator":"^4.1.0"},"_npmOperationalInternal":{"tmp":"tmp/even_hub_sdk_0.0.11_1782109254082_0.3640095915654047","host":"s3://npm-registry-packages-npm-production"}},"0.0.12":{"name":"@evenrealities/even_hub_sdk","version":"0.0.12","author":{"name":"Whiskee","email":"whiskee.chen@evenrealities.com"},"license":"MIT","_id":"@evenrealities/even_hub_sdk@0.0.12","maintainers":[{"name":"whiskee.chen","email":"whiskee.chen@evenrealities.com"},{"name":"carson.zhu","email":"carson.zhu@evenrealities.com"}],"dist":{"shasum":"d890110526b6328b6f866422c2f5b3d76495958f","tarball":"https://registry.npmjs.org/@evenrealities/even_hub_sdk/-/even_hub_sdk-0.0.12.tgz","fileCount":8,"integrity":"sha512-PXAeuPl7dMIlSWlctDeQAodIr7iuNROaH9GvRrZ86xzRh33DkMJYY1hSxy6BTk+TLkDA0tYlVi4bOsSIJngINA==","signatures":[{"sig":"MEYCIQDu2h36VZRSnB8BxV316MQCfG4zg4puPAw8B2XsMKPeVQIhAMu9m34vVEp04UCbGRr2HCyu2mAGmM7XMF2ntDW31G4p","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":396381},"main":"dist/index.cjs","type":"module","types":"./dist/index.d.ts","module":"dist/index.js","engines":{"node":"^20.0.0 || >=22.0.0"},"exports":{".":{"import":{"default":"./dist/index.js"},"require":{"default":"./dist/index.cjs"}}},"gitHead":"03bc87f5d05ba91760fcf7b22c900d769da5fdeb","scripts":{"dev":"tsup --watch","test":"vitest run --passWithNoTests","build":"tsup && npm run obfuscate","clean":"rimraf dist","verify":"npm run typecheck && npm run test && npm run build","build:raw":"tsup","obfuscate":"javascript-obfuscator \"dist\" --output \"dist\" --exclude \"dist/**/*.d.ts\" --exclude \"dist/**/*.map\" --compact true --control-flow-flattening true --control-flow-flattening-threshold 0.75 --dead-code-injection true --dead-code-injection-threshold 0.4 --string-array true --string-array-encoding base64 --string-array-threshold 0.75","typecheck":"tsc","test:watch":"vitest","prepublishOnly":"npm run verify"},"_npmUser":{"name":"whiskee.chen","email":"whiskee.chen@evenrealities.com"},"_npmVersion":"10.9.8","description":"TypeScript SDK for Even Hub developers to communicate with Even App","directories":{},"sideEffects":["./src/shadow-timers.ts","./dist/index.js","./dist/index.cjs"],"_nodeVersion":"22.22.3","publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.3.6","rimraf":"^6.0.1","vitest":"^3.0.2","typescript":"^5.7.3","javascript-obfuscator":"^4.1.0"},"_npmOperationalInternal":{"tmp":"tmp/even_hub_sdk_0.0.12_1783677378867_0.7667369340632115","host":"s3://npm-registry-packages-npm-production"}},"0.0.13":{"name":"@evenrealities/even_hub_sdk","version":"0.0.13","author":{"name":"Whiskee","email":"whiskee.chen@evenrealities.com"},"license":"MIT","_id":"@evenrealities/even_hub_sdk@0.0.13","maintainers":[{"name":"whiskee.chen","email":"whiskee.chen@evenrealities.com"},{"name":"carson.zhu","email":"carson.zhu@evenrealities.com"}],"dist":{"shasum":"5cb80c8ceaa450d87290fc3d3f87d7fcb3867374","tarball":"https://registry.npmjs.org/@evenrealities/even_hub_sdk/-/even_hub_sdk-0.0.13.tgz","fileCount":8,"integrity":"sha512-UTEvhrvuuoCeHMQFlImGNeYP8R1SvEWLDtHj+VfMw0IA4MZl5OSonVhNKjJz+cCY27hBkSnIVeKXd99F3ttNDw==","signatures":[{"sig":"MEUCIQCO2MxLyOHCyMR0xBJ5iyoZvmrKYe6/28LJ72VLUMYsyAIgeZDZcZqlKSV3zXl1yEtX/k3vzZvaIXgoskyyGM0P4qw=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":408991},"main":"dist/index.cjs","type":"module","types":"./dist/index.d.ts","module":"dist/index.js","engines":{"node":"^20.0.0 || >=22.0.0"},"exports":{".":{"import":{"default":"./dist/index.js"},"require":{"default":"./dist/index.cjs"}}},"scripts":{"dev":"tsup --watch","test":"vitest run --passWithNoTests","build":"tsup && npm run obfuscate","clean":"rimraf dist","verify":"npm run typecheck && npm run test && npm run build","build:raw":"tsup","obfuscate":"javascript-obfuscator \"dist\" --output \"dist\" --exclude \"dist/**/*.d.ts\" --exclude \"dist/**/*.map\" --compact true --control-flow-flattening true --control-flow-flattening-threshold 0.75 --dead-code-injection true --dead-code-injection-threshold 0.4 --string-array true --string-array-encoding base64 --string-array-threshold 0.75","typecheck":"tsc","test:watch":"vitest","prepublishOnly":"npm run verify"},"_npmUser":{"name":"whiskee.chen","email":"whiskee.chen@evenrealities.com"},"_npmVersion":"10.9.8","description":"TypeScript SDK for Even Hub developers to communicate with Even App","directories":{},"sideEffects":["./src/shadow-timers.ts","./dist/index.js","./dist/index.cjs"],"_nodeVersion":"22.22.3","minAppVersion":"2.2.6","publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.3.6","rimraf":"^6.0.1","vitest":"^3.0.2","typescript":"^5.7.3","javascript-obfuscator":"^4.1.0"},"_npmOperationalInternal":{"tmp":"tmp/even_hub_sdk_0.0.13_1785472094613_0.5013756961760045","host":"s3://npm-registry-packages-npm-production"}},"0.0.14":{"name":"@evenrealities/even_hub_sdk","version":"0.0.14","author":{"name":"Whiskee","email":"whiskee.chen@evenrealities.com"},"license":"MIT","_id":"@evenrealities/even_hub_sdk@0.0.14","maintainers":[{"name":"whiskee.chen","email":"whiskee.chen@evenrealities.com"},{"name":"carson.zhu","email":"carson.zhu@evenrealities.com"}],"dist":{"shasum":"d48fda77bed36203746518b4faeedc36e0ad710b","tarball":"https://registry.npmjs.org/@evenrealities/even_hub_sdk/-/even_hub_sdk-0.0.14.tgz","fileCount":8,"integrity":"sha512-lNtyIldZfe0dhAVxCfNuJ7waH2lMPli8DyklA8jF4DlvByQtbK1janodPNo7M8+7Plp30mlQT8d+vYU3gO8vKQ==","signatures":[{"sig":"MEUCIA/ltkxzcww9f5SB9YbrzOcK1Xw3dNlo/XLy8vIu4TgRAiEAhbHhY0lHPv5ou2x4+k2KawDDLZW7eGcDUqXtKJ8p5vc=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":475797},"main":"dist/index.cjs","type":"module","types":"./dist/index.d.ts","module":"dist/index.js","engines":{"node":"^20.0.0 || >=22.0.0"},"exports":{".":{"import":{"default":"./dist/index.js"},"require":{"default":"./dist/index.cjs"}}},"gitHead":"e3779805cff8f9aa195b4979fe14cf455de8548a","scripts":{"dev":"tsup --watch","test":"vitest run --passWithNoTests","build":"tsup && npm run obfuscate","clean":"rimraf dist","verify":"npm run typecheck && npm run test && npm run build","build:raw":"tsup","obfuscate":"javascript-obfuscator \"dist\" --output \"dist\" --exclude \"dist/**/*.d.ts\" --exclude \"dist/**/*.map\" --compact true --control-flow-flattening true --control-flow-flattening-threshold 0.75 --dead-code-injection true --dead-code-injection-threshold 0.4 --string-array true --string-array-encoding base64 --string-array-threshold 0.75","typecheck":"tsc","test:watch":"vitest","prepublishOnly":"npm run verify"},"_npmUser":{"name":"whiskee.chen","email":"whiskee.chen@evenrealities.com"},"_npmVersion":"10.9.8","description":"TypeScript SDK for Even Hub developers to communicate with Even App","directories":{},"sideEffects":["./src/shadow-timers.ts","./dist/index.js","./dist/index.cjs"],"_nodeVersion":"22.22.3","minAppVersion":"2.2.9","publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.3.6","rimraf":"^6.0.1","vitest":"^3.0.2","typescript":"^5.7.3","javascript-obfuscator":"^4.1.0"},"_npmOperationalInternal":{"tmp":"tmp/even_hub_sdk_0.0.14_1787199981021_0.5741997153177327","host":"s3://npm-registry-packages-npm-production"}},"0.0.15":{"name":"@evenrealities/even_hub_sdk","version":"0.0.15","author":{"name":"Whiskee","email":"whiskee.chen@evenrealities.com"},"license":"MIT","_id":"@evenrealities/even_hub_sdk@0.0.15","maintainers":[{"name":"whiskee.chen","email":"whiskee.chen@evenrealities.com"},{"name":"carson.zhu","email":"carson.zhu@evenrealities.com"}],"dist":{"shasum":"0ef7974754b1cb4b44c4cde5a4b8b829e21f721a","tarball":"https://registry.npmjs.org/@evenrealities/even_hub_sdk/-/even_hub_sdk-0.0.15.tgz","fileCount":8,"integrity":"sha512-N4SuDg/4MIgpah61IJAdtzOMcUg05/x0jz/+FkEdPnd9Dq7pCgOq5AtOSoU2i00hoYCOCdRSlBjWyq8LQCsfDQ==","signatures":[{"sig":"MEUCIHlR4NTWpBpGXTKACiCpJLowSb9DHjFqYmCLn2+KT+hKAiEAoIPA2XhI4YVXMrGtFAR9N8HsFqZVLB1fH/axhCx8xsE=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":468976},"main":"dist/index.cjs","type":"module","types":"./dist/index.d.ts","module":"dist/index.js","engines":{"node":"^20.0.0 || >=22.0.0"},"exports":{".":{"import":{"default":"./dist/index.js"},"require":{"default":"./dist/index.cjs"}}},"gitHead":"275e5fb3120c9ce614301d7754e37fadfbcc1af4","scripts":{"dev":"tsup --watch","test":"vitest run --passWithNoTests","build":"tsup && npm run obfuscate","clean":"rimraf dist","verify":"npm run typecheck && npm run test && npm run build","build:raw":"tsup","obfuscate":"javascript-obfuscator \"dist\" --output \"dist\" --exclude \"dist/**/*.d.ts\" --exclude \"dist/**/*.map\" --compact true --control-flow-flattening true --control-flow-flattening-threshold 0.75 --dead-code-injection true --dead-code-injection-threshold 0.4 --string-array true --string-array-encoding base64 --string-array-threshold 0.75","typecheck":"tsc","test:watch":"vitest","prepublishOnly":"npm run verify"},"_npmUser":{"name":"whiskee.chen","email":"whiskee.chen@evenrealities.com"},"_npmVersion":"10.9.8","description":"TypeScript SDK for Even Hub developers to communicate with Even App","directories":{},"sideEffects":["./src/shadow-timers.ts","./dist/index.js","./dist/index.cjs"],"_nodeVersion":"22.22.3","minAppVersion":"2.2.10","publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.3.6","rimraf":"^6.0.1","vitest":"^3.0.2","typescript":"^5.7.3","javascript-obfuscator":"^4.1.0"},"_npmOperationalInternal":{"tmp":"tmp/even_hub_sdk_0.0.15_1788770992553_0.051906335356139977","host":"s3://npm-registry-packages-npm-production"}},"0.0.16":{"_id":"@evenrealities/even_hub_sdk@0.0.16","dist":{"shasum":"69991d85afcb3b007fbe249d5164c7b960430e28","tarball":"https://registry.npmjs.org/@evenrealities/even_hub_sdk/-/even_hub_sdk-0.0.16.tgz","fileCount":8,"integrity":"sha512-8/qMR4W3vna6xAM5/dFDmKoTR98D7Vo3TDBrtS0JgdUSvBVyAnUXuhODI3H587fI2TfLbp4T+FNT3EdkB3+Big==","signatures":[{"sig":"MEUCIHqkLllN/q5fXNZ3x3g9dZVbFztFyzP91DwlZtwoxE3AAiEAxryjqclEbc0KoDCjalzDzCA3yQyOpKiuzoZe5ae32HY=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIBvDrLvAFxhlkAzK5CU+ZheYRLunvrvPg8371jIDj+43AiEA5OmmTOvBS5AOvP3RV0SjWjkMWOqCjRJHs+t7EnRVyms="}],"unpackedSize":455048},"main":"dist/index.cjs","name":"@evenrealities/even_hub_sdk","type":"module","types":"./dist/index.d.ts","author":{"name":"Whiskee","email":"whiskee.chen@evenrealities.com"},"module":"dist/index.js","engines":{"node":"^20.0.0 || >=22.0.0"},"exports":{".":{"import":{"default":"./dist/index.js"},"require":{"default":"./dist/index.cjs"}}},"gitHead":"b6d164ceb71e32bab312865cd3bd5cae51f5d5ac","license":"MIT","scripts":{"dev":"tsup --watch","test":"vitest run --passWithNoTests","build":"tsup && npm run obfuscate","clean":"rimraf dist","verify":"npm run typecheck && npm run test && npm run build","build:raw":"tsup","obfuscate":"javascript-obfuscator \"dist\" --output \"dist\" --exclude \"dist/**/*.d.ts\" --exclude \"dist/**/*.map\" --compact true --control-flow-flattening true --control-flow-flattening-threshold 0.75 --dead-code-injection true --dead-code-injection-threshold 0.4 --string-array true --string-array-encoding base64 --string-array-threshold 0.75","typecheck":"tsc","test:watch":"vitest","prepublishOnly":"npm run verify"},"version":"0.0.16","_npmUser":{"name":"whiskee.chen","email":"whiskee.chen@evenrealities.com"},"_npmVersion":"10.9.8","description":"TypeScript SDK for Even Hub developers to communicate with Even App","directories":{},"maintainers":[{"name":"whiskee.chen","email":"whiskee.chen@evenrealities.com"},{"name":"carson.zhu","email":"carson.zhu@evenrealities.com"}],"sideEffects":["./src/shadow-timers.ts","./dist/index.js","./dist/index.cjs"],"_nodeVersion":"22.22.3","minAppVersion":"2.2.10","publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.3.6","rimraf":"^6.0.1","vitest":"^3.0.2","typescript":"^5.7.3","javascript-obfuscator":"^4.1.0"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/even_hub_sdk_0.0.16_1790241157419_0.4523942701023671"}}},"time":{"created":"2026-01-27T02:47:24.582Z","modified":"2026-09-24T09:12:37.766Z","0.0.1":"2026-01-22T08:32:22.152Z","0.0.2":"2026-01-22T08:38:24.665Z","0.0.3":"2026-01-27T02:47:24.789Z","0.0.4":"2026-01-27T02:52:12.079Z","0.0.5":"2026-01-27T13:40:17.583Z","0.0.6":"2026-01-28T06:19:11.797Z","0.0.7":"2026-02-11T07:02:48.009Z","0.0.8":"2026-03-25T06:31:42.292Z","0.0.9":"2026-03-25T08:54:44.397Z","0.0.10":"2026-04-10T09:17:41.337Z","0.0.11":"2026-06-22T06:20:54.208Z","0.0.12":"2026-07-10T09:56:19.022Z","0.0.13":"2026-07-31T04:28:14.759Z","0.0.14":"2026-08-20T04:26:21.173Z","0.0.15":"2026-09-07T08:49:52.730Z","0.0.16":"2026-09-24T09:12:37.576Z"},"author":{"name":"Whiskee","email":"whiskee.chen@evenrealities.com"},"license":"MIT","description":"TypeScript SDK for Even Hub developers to communicate with Even App","maintainers":[{"name":"whiskee.chen","email":"whiskee.chen@evenrealities.com"},{"name":"carson.zhu","email":"carson.zhu@evenrealities.com"}],"readme":"# @evenrealities/even_hub_sdk\n\nEven App WebView 页面使用的 TypeScript SDK。\n\n[![npm version](https://img.shields.io/npm/v/@evenrealities/even_hub_sdk.svg)](https://www.npmjs.com/package/@evenrealities/even_hub_sdk)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n[![Node.js Version](https://img.shields.io/badge/node-%3E%3D20.0.0-brightgreen.svg)](https://nodejs.org/)\n\n[English](README.md) | **中文**\n\n## ⚡️ 快速开始\n\n```bash\nnpm install @evenrealities/even_hub_sdk\n```\n\n```ts\nimport { waitForEvenAppBridge } from '@evenrealities/even_hub_sdk';\n\nconst bridge = await waitForEvenAppBridge();\n\nconst user = await bridge.getUserInfo();\nconst device = await bridge.getDeviceInfo();\n\nawait bridge.setLocalStorage('theme', 'dark');\nconst theme = await bridge.getLocalStorage('theme');\n\nconsole.log(user.name, device?.model, theme);\n```\n\n当 Web 页面运行在 Even App WebView 内，并需要这些能力时使用：\n\n- App 桥接：用户、设备、本地存储。\n- App 能力：定位、相册、相机。\n- 眼镜 UI：启动页容器、重建、上下文菜单、文本/图片更新。\n- 传感器与事件：MIC、IMU、启动来源、设备状态。\n\n## 📦 安装\n\n```bash\nnpm install @evenrealities/even_hub_sdk\n# 或\npnpm add @evenrealities/even_hub_sdk\n# 或\nyarn add @evenrealities/even_hub_sdk\n```\n\n要求：\n\n- SDK 版本：`0.0.16`\n- Even App：`2.2.10` 或更高版本\n- Node.js：`^20.0.0 || >=22.0.0`\n- 运行环境：提供 `window.flutter_inappwebview.callHandler` 的 Even App WebView\n\n## 🔧 常用能力\n\n### 启动来源\n\n宿主在 WebView loading 完成后推送一次启动来源。\n\n```ts\nconst bridge = await waitForEvenAppBridge();\n\nconst unsubscribe = bridge.onLaunchSource((source) => {\n  if (source === 'glassesMenu') {\n    console.log('从眼镜菜单打开');\n  }\n});\n\n// unsubscribe();\n```\n\n取值：\n\n- `appMenu`\n- `glassesMenu`\n\n### 设备状态\n\n```ts\nimport {\n  DeviceConnectType,\n  waitForEvenAppBridge,\n} from '@evenrealities/even_hub_sdk';\n\nconst bridge = await waitForEvenAppBridge();\n\nconst unsubscribe = bridge.onDeviceStatusChanged((status) => {\n  if (status.connectType === DeviceConnectType.Connected) {\n    console.log('电量:', status.batteryLevel);\n  }\n});\n\n// unsubscribe();\n```\n\n### App 定位\n\n```ts\nimport {\n  AppLocationAccuracy,\n  waitForEvenAppBridge,\n} from '@evenrealities/even_hub_sdk';\n\nconst bridge = await waitForEvenAppBridge();\n\nconst location = await bridge.getAppLocation({\n  accuracy: AppLocationAccuracy.High,\n  timeoutMs: 5000,\n});\n\nif (location) {\n  console.log(location.latitude, location.longitude);\n}\n```\n\n连续定位：\n\n```ts\nawait bridge.startAppLocationUpdates({\n  accuracy: AppLocationAccuracy.Medium,\n  intervalMs: 1000,\n  distanceFilter: 5,\n});\n\nconst unsubscribeLocation = bridge.onAppLocationChanged((location) => {\n  console.log('位置:', location.latitude, location.longitude);\n});\n\n// await bridge.stopAppLocationUpdates();\n// unsubscribeLocation();\n```\n\n### 相册与相机\n\n相册只支持单选。\n\n```ts\nconst albumImage = await bridge.pickImageFromAlbum();\nif (albumImage) {\n  console.log(albumImage.name, albumImage.mimeType, albumImage.size);\n  // Web 侧使用 albumImage.base64\n}\n\nconst cameraImage = await bridge.captureImageFromCamera();\nif (cameraImage) {\n  console.log('拍摄成功:', cameraImage.name);\n}\n```\n\n`AppImageAsset`：\n\n```ts\ntype AppImageAsset = {\n  path: string;\n  name: string;\n  mimeType: string;\n  size: number;\n  base64: string;\n};\n```\n\n### MIC 来源\n\n可选择眼镜 MIC 或手机 MIC。\n\n```ts\nimport {\n  AudioInputSource,\n  AudioSpeakerRole,\n  waitForEvenAppBridge,\n} from '@evenrealities/even_hub_sdk';\n\nconst bridge = await waitForEvenAppBridge();\n\nawait bridge.audioControl(true, AudioInputSource.Glasses);\n// await bridge.audioControl(true, AudioInputSource.Phone);\n\nconst unsubscribeAudio = bridge.onEvenHubEvent((event) => {\n  const audio = event.audioEvent;\n  if (!audio) return;\n\n  console.log(audio.source); // AudioInputSource.Glasses | AudioInputSource.Phone\n  console.log(audio.audioPcm.length); // Uint8Array\n  console.log(audio.direction); // int16 有符号整数或 null\n  console.log(audio.speakerRole); // AudioSpeakerRole.Self | Other | Unknown\n\n  if (audio.speakerRole === AudioSpeakerRole.Self) {\n    console.log('App 算法将这一帧判定为本人说话');\n  }\n});\n\n// await bridge.audioControl(false);\n// unsubscribeAudio();\n```\n\n说明：\n\n- 默认来源：`AudioInputSource.Glasses`。\n- 音频数据通过 `onEvenHubEvent` 下发。\n- 使用眼镜 MIC 前，先创建启动页。\n- 眼镜 `direction` 是与处理后 PCM 同帧的原始 int16 有符号方向标签；SDK 不转换单位或区间。\n- `speakerRole` 是 App 音频算法结果，不是固件直接给出的身份结论。\n- 手机 MIC 和旧 Host 数据使用 `direction: null` 与 `AudioSpeakerRole.Unknown`。\n\n### IMU\n\n```ts\nimport {\n  ImuReportPace,\n  OsEventTypeList,\n  waitForEvenAppBridge,\n} from '@evenrealities/even_hub_sdk';\n\nconst bridge = await waitForEvenAppBridge();\n\nawait bridge.imuControl(true, ImuReportPace.P500);\n\nconst unsubscribeImu = bridge.onEvenHubEvent((event) => {\n  const sys = event.sysEvent;\n  if (sys?.eventType !== OsEventTypeList.IMU_DATA_REPORT) return;\n  if (!sys.imuData) return;\n\n  console.log(sys.imuData.x, sys.imuData.y, sys.imuData.z);\n});\n\n// await bridge.imuControl(false);\n// unsubscribeImu();\n```\n\n`ImuReportPace` 是协议档位：`P100` 到 `P1000`。\n\n## 🕶️ 眼镜 UI\n\n先调用 `createStartUpPageContainer`，再做其他眼镜 UI 操作。\n\n```ts\nimport {\n  ImageContainerProperty,\n  ImageRawDataUpdateResult,\n  ListContainerProperty,\n  MenuContainerProperty,\n  StartUpPageCreateResult,\n  TextContainerProperty,\n  waitForEvenAppBridge,\n} from '@evenrealities/even_hub_sdk';\n\nconst bridge = await waitForEvenAppBridge();\n\nconst listObject: ListContainerProperty[] = [{\n  xPosition: 100,\n  yPosition: 50,\n  width: 200,\n  height: 150,\n  containerID: 1,\n  containerName: 'list-1',\n  zOrderIndex: 1,\n  itemContainer: {\n    itemCount: 3,\n    itemName: ['Item 1', 'Item 2', 'Item 3'],\n  },\n  isEventCapture: 1,\n}];\n\nconst textObject: TextContainerProperty[] = [{\n  xPosition: 100,\n  yPosition: 220,\n  width: 200,\n  height: 50,\n  containerID: 2,\n  containerName: 'text-1',\n  zOrderIndex: 2,\n  content: 'Hello',\n  textColor: 4,\n  isEventCapture: 0,\n}];\n\nconst imageObject: ImageContainerProperty[] = [{\n  xPosition: 320,\n  yPosition: 50,\n  width: 100,\n  height: 80,\n  containerID: 3,\n  containerName: 'image-1',\n  zOrderIndex: 3,\n}];\n\nconst menuObject: MenuContainerProperty = {\n  menuItems: [{\n    itemName: 'Pause',\n    itemID: 1,\n  }, {\n    itemName: 'Resume',\n    itemID: 2,\n  }],\n};\n\nconst result = await bridge.createStartUpPageContainer({\n  containerTotalNum: 3,\n  listObject,\n  textObject,\n  imageObject,\n  menuObject,\n});\n\nif (result === StartUpPageCreateResult.success) {\n  await bridge.textContainerUpgrade({\n    containerID: 2,\n    containerName: 'text-1',\n    content: 'Updated',\n    textColor: 2,\n  });\n}\n```\n\n`textColor` 可选，接受 `0` 到 `4` 的整数亮度值。创建/重建时省略则使用设备默认亮度 `4`；在 `textContainerUpgrade` 中省略则保持当前亮度。SDK 会在调用宿主前拒绝超出 `0..4` 的值。\n\n更新图片内容：\n\n图片原始数据由 SDK 内部使用 LZ4 压缩，以减少传输体积，同时保持设备端快速解码。\n\n```ts\nconst imageResult = await bridge.updateImageRawData({\n  containerID: 3,\n  containerName: 'image-1',\n  imageData: [/* 灰度图片字节 */],\n});\n\nif (imageResult !== ImageRawDataUpdateResult.success) {\n  console.warn('图片更新失败:', imageResult);\n}\n```\n\n重建页面：\n\n```ts\nawait bridge.rebuildPageContainer({\n  containerTotalNum: 1,\n  textObject: [{\n    xPosition: 100,\n    yPosition: 80,\n    width: 240,\n    height: 60,\n    containerID: 4,\n    containerName: 'status-text',\n    content: 'Ready',\n    isEventCapture: 1,\n  }],\n});\n```\n\n重建时不传 `menuObject` 表示清除自定义菜单：\n\n```ts\nawait bridge.rebuildPageContainer({\n  containerTotalNum: 1,\n  textObject: [/* ... */],\n});\n```\n\n处理上下文菜单事件：\n\n```ts\nconst unsubscribeMenu = bridge.onEvenHubEvent((event) => {\n  if (event.menuItemClickEvent) {\n    console.log('动作项:', event.menuItemClickEvent.itemID);\n  }\n});\n\n// unsubscribeMenu();\n```\n\n处理长按和长按释放：\n\n```ts\nconst unsubscribePress = bridge.onEvenHubEvent((event) => {\n  const pressEvent = event.sysEvent;\n  if (!pressEvent) return;\n\n  if (pressEvent.eventType === OsEventTypeList.LONG_PRESS_EVENT) {\n    console.log('开始长按，来源:', pressEvent.eventSource);\n  } else if (pressEvent.eventType === OsEventTypeList.LONG_PRESS_RELEASE_EVENT) {\n    console.log('长按已释放，来源:', pressEvent.eventSource);\n  }\n});\n\n// unsubscribePress();\n```\n\n`LONG_PRESS_EVENT` 的 PB 值为 `9`，`LONG_PRESS_RELEASE_EVENT` 的 PB 值为 `10`。当前带来源的推送通过 `sysEvent` 上报，其中 `eventSource` 保留 PB `EventSourceType`（右镜腿、戒指或左镜腿），不会再丢失输入来源。\n\n监听列表、文本和系统事件：\n\n```ts\nconst unsubscribeHub = bridge.onEvenHubEvent((event) => {\n  if (event.listEvent) {\n    console.log('选中:', event.listEvent.currentSelectItemName);\n  }\n  if (event.textEvent) {\n    console.log('文本事件:', event.textEvent.containerName);\n  }\n  if (event.sysEvent) {\n    console.log('系统事件:', event.sysEvent.eventType);\n  }\n});\n\n// unsubscribeHub();\n```\n\n关闭眼镜页面：\n\n```ts\nawait bridge.shutDownPageContainer(0);\n// await bridge.shutDownPageContainer(1); // 交给前台交互层决定是否退出\n```\n\n规则：\n\n- 坐标原点：左上角。\n- `containerTotalNum`：`1` 到 `12`。\n- `textObject`：最多 `8` 个。\n- 只能有一个容器使用 `isEventCapture: 1`。\n- 图片容器创建后，需要再调用 `updateImageRawData`。\n- `zOrderIndex` 只有在同一个画面的所有容器都不填写时才可以省略，用于兼容旧版本 SDK 页面。\n- 同一个画面里，只要任意容器填写了 `zOrderIndex`，所有 list/text/image 容器都必须填写。\n- 同一个画面内 `zOrderIndex` 数值必须唯一；数值越大，画面层级越靠前。\n- 违反上述 `zOrderIndex` 规则时，SDK 会在调用原生前输出 `EvenHubPageContainerValidationErrorCode` 错误日志。`createStartUpPageContainer` 返回 `StartUpPageCreateResult.invalid`，`rebuildPageContainer` 返回 `false`。\n- `menuObject.menuItems`：最多 `10` 个；每个顶层 `itemID` 必须非 0 且唯一。\n- 菜单 `itemName`：最多 `32` 个 UTF-8 字节。\n- 菜单数量、ID 或名称非法时，SDK 会在调用原生前拒绝。rebuild 不传 `menuObject` 会清除自定义菜单并恢复默认注册。\n- 长按和长按释放仍通过普通 list/text/sys 事件上报，分别对应 `OsEventTypeList.LONG_PRESS_EVENT` 与 `OsEventTypeList.LONG_PRESS_RELEASE_EVENT`。\n\n## 📚 API 速查\n\n### Bridge\n\n| API | 返回 |\n| --- | --- |\n| `waitForEvenAppBridge()` | `Promise<EvenAppBridge>` |\n| `EvenAppBridge.getInstance()` | `EvenAppBridge` |\n| `callEvenApp(method, params?)` | `Promise<any>` |\n\n### App\n\n| API | 返回 |\n| --- | --- |\n| `getUserInfo()` | `Promise<UserInfo>` |\n| `getDeviceInfo()` | `Promise<DeviceInfo \\| null>` |\n| `setLocalStorage(key, value)` | `Promise<boolean>` |\n| `getLocalStorage(key)` | `Promise<string>` |\n| `getAppLocation(options?)` | `Promise<AppLocation \\| null>` |\n| `startAppLocationUpdates(options?)` | `Promise<boolean>` |\n| `stopAppLocationUpdates()` | `Promise<boolean>` |\n| `pickImageFromAlbum()` | `Promise<AppImageAsset \\| null>` |\n| `captureImageFromCamera()` | `Promise<AppImageAsset \\| null>` |\n\n### 事件\n\n| API | 事件 |\n| --- | --- |\n| `onLaunchSource(callback)` | `appMenu` / `glassesMenu` |\n| `onDeviceStatusChanged(callback)` | 设备状态 |\n| `onAppLocationChanged(callback)` | App 位置 |\n| `onEvenHubEvent(callback)` | list / text / sys / audio / 上下文菜单 |\n\n`AudioEvent` 提供 `audioPcm`、`source`、`direction` 和 `speakerRole`。\n\n### EvenHub\n\n| API | 返回 |\n| --- | --- |\n| `createStartUpPageContainer(container)` | `Promise<StartUpPageCreateResult>` |\n| `rebuildPageContainer(container)` | `Promise<boolean>` |\n| `updateImageRawData(data)` | `Promise<ImageRawDataUpdateResult>` |\n| `textContainerUpgrade(container)` | `Promise<boolean>` |\n| `audioControl(isOpen, source?: AudioInputSource)` | `Promise<boolean>` |\n| `imuControl(isOpen, reportFrq?)` | `Promise<boolean>` |\n| `shutDownPageContainer(exitMode?)` | `Promise<boolean>` |\n\n## 🧯 排障\n\n| 现象 | 处理 |\n| --- | --- |\n| `Flutter handler not available` | 需要运行在 Even App WebView 内，普通浏览器不能调用原生能力。 |\n| 收不到启动来源 | 尽早注册 `onLaunchSource`，宿主只在加载完成后推送一次。 |\n| 眼镜 MIC 返回 `false` | 先创建启动页，再调用 `audioControl(true, AudioInputSource.Glasses)`。 |\n| 连续定位没有回调 | 先调用 `startAppLocationUpdates`，并保持 `onAppLocationChanged` 订阅。 |\n| 眼镜图片不显示 | 先创建/重建图片容器，再调用 `updateImageRawData`。 |\n\n## 📜 更新日志\n\n### 0.0.16\n\n- 修复 `setTimeout` / `setInterval` 回调重复执行的问题。\n\n### 0.0.15\n\n- 最低支持的 Even App 版本提升至 `2.2.10`。\n- 长按及释放的 `sysEvent` 保留 `eventSource`，调用方可区分右镜腿、戒指和左镜腿来源。\n\n### 0.0.14\n\n- 最低支持的 Even App 版本提升至 `2.2.9`。\n- 新增启动页/重建页容器上的一级上下文菜单模型。\n- 新增 `onEvenHubEvent` 中的一级菜单 `menuItemClickEvent` 解析。\n- 新增 SDK 侧一级菜单校验：数量、ID 唯一性和 UTF-8 名称长度。\n- 新增列表、文本和系统事件中的 `LONG_PRESS_EVENT(9)` 与 `LONG_PRESS_RELEASE_EVENT(10)` 解析。\n- 新增文本容器及增量文本更新的可选 `textColor` 字段，支持 `0` 到 `4` 档亮度。\n- 新增处理后音频的 `direction` 与 `AudioSpeakerRole`；手机 MIC 和旧 Host 数据安全降级为 `null` 与 `Unknown`。\n\n### 0.0.13\n\n- 补充最低支持的 Even App 版本元数据，最低支持版本为 `2.2.6`。\n\n### 0.0.12\n\n- 新增列表、文本、图片容器的 `zOrderIndex` 支持，用于控制页面中多个容器的前后叠放顺序。\n- 图片原始数据更新由 SDK 内部使用 LZ4 压缩，减少传输体积，同时保持快速编解码，降低图片更新延迟。\n\n### 0.0.11\n\n- 新增 App 定位 API：单次定位和连续定位。\n- 新增 App 相册图片选择，只支持单选。\n- 新增 App 相机拍摄 API。\n- 新增 MIC 来源选择：`glasses` 或 `phone`。\n\n### 0.0.10\n\n- 增强 WebView 后台保活能力。\n\n### 0.0.9\n\n- 优化 `EventSourceType` 兼容性。\n- 增加默认来源枚举兜底。\n- 提升事件来源解析一致性。\n\n### 0.0.8\n\n- 新增启动来源事件：`appMenu` / `glassesMenu`。\n- 启动页容器数量从 `4` 扩展到 `12`。\n- 新增 IMU 控制和 IMU 数据事件。\n\n### 0.0.1\n\n- 初始桥接、本地存储、设备信息、EvenHub 协议和事件 API。\n\n## 📄 许可证\n\n[MIT](LICENSE)\n","readmeFilename":"README.zh-CN.md"}