@mentra/engine 3.1.0-dev.94 → 3.1.0-dev.95
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/build/facades/ota.d.ts +1 -1
- package/build/facades/ota.js +1 -1
- package/build/facades/ota.js.map +1 -1
- package/build/generated/releaseMetadata.js +5 -5
- package/build/generated/releaseMetadata.js.map +1 -1
- package/build/index.d.ts +1 -1
- package/build/index.d.ts.map +1 -1
- package/build/index.js +1 -1
- package/build/index.js.map +1 -1
- package/build/services/DisplayProcessor.d.ts +3 -3
- package/build/services/DisplayProcessor.js +3 -3
- package/build/services/DisplayProcessor.js.map +1 -1
- package/build/services/LocalDisplayManager.d.ts +2 -3
- package/build/services/LocalDisplayManager.d.ts.map +1 -1
- package/build/services/LocalDisplayManager.js +2 -3
- package/build/services/LocalDisplayManager.js.map +1 -1
- package/build/services/PhonePhotoCoordinator.js +1 -1
- package/build/services/PhonePhotoCoordinator.js.map +1 -1
- package/build/services/StreamLifecycleController.d.ts +3 -3
- package/build/services/StreamLifecycleController.js +3 -3
- package/build/services/StreamLifecycleController.js.map +1 -1
- package/build/types/applet.d.ts +1 -1
- package/build/types/applet.js +1 -1
- package/build/types/applet.js.map +1 -1
- package/build/types/capabilities/even-realities-g1.d.ts.map +1 -1
- package/build/types/capabilities/even-realities-g1.js +2 -0
- package/build/types/capabilities/even-realities-g1.js.map +1 -1
- package/build/types/capabilities/even-realities-g2.d.ts.map +1 -1
- package/build/types/capabilities/even-realities-g2.js +2 -0
- package/build/types/capabilities/even-realities-g2.js.map +1 -1
- package/build/types/capabilities/mentra-display.d.ts.map +1 -1
- package/build/types/capabilities/mentra-display.js +2 -0
- package/build/types/capabilities/mentra-display.js.map +1 -1
- package/build/types/capabilities/mentra-live.d.ts.map +1 -1
- package/build/types/capabilities/mentra-live.js +2 -0
- package/build/types/capabilities/mentra-live.js.map +1 -1
- package/build/types/capabilities/nimo.d.ts +9 -0
- package/build/types/capabilities/nimo.d.ts.map +1 -0
- package/build/types/capabilities/nimo.js +57 -0
- package/build/types/capabilities/nimo.js.map +1 -0
- package/build/types/capabilities/none.d.ts.map +1 -1
- package/build/types/capabilities/none.js +2 -0
- package/build/types/capabilities/none.js.map +1 -1
- package/build/types/capabilities/simulated-glasses.d.ts.map +1 -1
- package/build/types/capabilities/simulated-glasses.js +2 -0
- package/build/types/capabilities/simulated-glasses.js.map +1 -1
- package/build/types/capabilities/vuzix-z100.d.ts.map +1 -1
- package/build/types/capabilities/vuzix-z100.js +2 -0
- package/build/types/capabilities/vuzix-z100.js.map +1 -1
- package/build/types/enums.d.ts +2 -1
- package/build/types/enums.d.ts.map +1 -1
- package/build/types/enums.js +1 -0
- package/build/types/enums.js.map +1 -1
- package/build/types/hardware.d.ts +3 -2
- package/build/types/hardware.d.ts.map +1 -1
- package/build/types/hardware.js +3 -1
- package/build/types/hardware.js.map +1 -1
- package/build/types/index.d.ts +1 -1
- package/build/types/index.d.ts.map +1 -1
- package/build/types/index.js +1 -1
- package/build/types/index.js.map +1 -1
- package/build/utils/display/composer/ColumnComposer.d.ts +1 -1
- package/build/utils/display/composer/ColumnComposer.js +1 -1
- package/build/utils/display/composer/ColumnComposer.js.map +1 -1
- package/package.json +6 -6
- package/src/facades/ota.ts +1 -1
- package/src/generated/releaseMetadata.ts +5 -5
- package/src/index.ts +1 -0
- package/src/services/DisplayProcessor.ts +3 -3
- package/src/services/LocalDisplayManager.ts +2 -3
- package/src/services/PhonePhotoCoordinator.ts +1 -1
- package/src/services/StreamLifecycleController.ts +3 -3
- package/src/types/applet.ts +1 -1
- package/src/types/capabilities/even-realities-g1.ts +3 -0
- package/src/types/capabilities/even-realities-g2.ts +3 -0
- package/src/types/capabilities/mentra-display.ts +3 -0
- package/src/types/capabilities/mentra-live.ts +3 -0
- package/src/types/capabilities/nimo.ts +59 -0
- package/src/types/capabilities/none.ts +3 -0
- package/src/types/capabilities/simulated-glasses.ts +3 -0
- package/src/types/capabilities/vuzix-z100.ts +3 -0
- package/src/types/enums.ts +1 -0
- package/src/types/hardware.ts +4 -2
- package/src/types/index.ts +1 -0
- package/src/utils/display/composer/ColumnComposer.ts +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"even-realities-g2.js","sourceRoot":"","sources":["../../../src/types/capabilities/even-realities-g2.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH;;GAEG;AACH,MAAM,CAAC,MAAM,eAAe,GAAiB;IAC3C,SAAS,EAAE,mBAAmB;IAE9B,kDAAkD;IAClD,SAAS,EAAE,KAAK;IAChB,MAAM,EAAE,IAAI;IAEZ,2EAA2E;IAC3E,UAAU,EAAE,IAAI;IAChB,OAAO,EAAE;QACP,KAAK,EAAE,CAAC;QACR,OAAO,EAAE,KAAK;QACd,KAAK,EAAE,OAAO;QACd,gBAAgB,EAAE,IAAI;QACtB,UAAU,EAAE,EAAE,KAAK,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE;QACvC,WAAW,EAAE,EAAE,UAAU,EAAE,EAAE,EAAE;QAC/B,YAAY,EAAE,CAAC;QACf,gBAAgB,EAAE,IAAI;QAEtB,mDAAmD;QACnD,KAAK,EAAE,GAAG;QACV,MAAM,EAAE,GAAG;QACX,WAAW,EAAE,IAAI;QACjB,eAAe,EAAE,CAAC,EAAE,gDAAgD;QACpE,gBAAgB,EAAE,CAAC,EAAE,gCAAgC;QACrD,sEAAsE;QACtE,2EAA2E;QAC3E,2EAA2E;QAC3E,+BAA+B;QAC/B,MAAM,EAAE,CAAC,MAAM,CAAC,EAAE,kCAAkC;QACpD,eAAe,EAAE,CAAC;QAClB,aAAa,EAAE,IAAI;KACpB;IAED,0EAA0E;IAC1E,aAAa,EAAE,IAAI;IACnB,UAAU,EAAE;QACV,KAAK,EAAE,CAAC;QACR,MAAM,EAAE,KAAK;KACd;IAED,oDAAoD;IACpD,UAAU,EAAE,KAAK;IACjB,OAAO,EAAE,IAAI;IAEb,gCAAgC;IAChC,MAAM,EAAE,IAAI;IACZ,GAAG,EAAE,IAAI;IAET,qDAAqD;IACrD,SAAS,EAAE,IAAI;IACf,MAAM,EAAE;QACN,KAAK,EAAE,CAAC;QACR,OAAO,EAAE,CAAC;gBACR,IAAI,EAAE,SAAS;gBACf,MAAM,EAAE,CAAC,KAAK,EAAE,YAAY,EAAE,YAAY,EAAE,YAAY,EAAE,UAAU,EAAE,YAAY,CAAC;gBACnF,YAAY,EAAE,IAAI;aACnB,CAAC;KACH;IAED,+CAA+C;IAC/C,QAAQ,EAAE,KAAK;IACf,KAAK,EAAE,IAAI;IAEX,qBAAqB;IACrB,KAAK,EAAE;QACL,kBAAkB,EAAE,KAAK;KAC1B;IAED,+CAA+C;IAC/C,OAAO,EAAE,KAAK;IAEd,0EAA0E;IAC1E,6EAA6E;IAC7E,kBAAkB,EAAE,IAAI;CACzB,CAAC","sourcesContent":["/**\n * @fileoverview Even Realities G2 Hardware Capabilities\n *\n * Capability profile for the Even Realities G2 smart glasses model.\n * G2 uses the EvenHub protocol with protobuf-based commands.\n */\n\nimport type { Capabilities } from \"../hardware\";\n\n/**\n * Even Realities G2 capability profile\n */\nexport const evenRealitiesG2: Capabilities = {\n modelName: \"Even Realities G2\",\n\n // Camera capabilities - G2 does not have a camera\n hasCamera: false,\n camera: null,\n\n // Display capabilities - G2 has a green monochrome display (similar to G1)\n hasDisplay: true,\n display: {\n count: 2,\n isColor: false,\n color: \"green\",\n canDisplayBitmap: true,\n resolution: { width: 640, height: 200 },\n fieldOfView: { horizontal: 25 },\n maxTextLines: 8,\n adjustBrightness: true,\n\n // Scene display API — EvenHub retained containers.\n width: 576,\n height: 288,\n canPosition: true,\n maxTextElements: 6, // firmware text-container pool (rects share it)\n maxImageElements: 4, // firmware image-container pool\n // No maxImagePx: the SGC tiles larger images across multiple firmware\n // containers (each ≤200x100 — the hardware-verified per-container transfer\n // envelope). Pathological sizes needing more than the 4-container pool are\n // dropped SGC-side with a log.\n shapes: [\"rect\"], // bordered empty container ≈ rect\n intensityLevels: 2,\n partialUpdate: true,\n },\n\n // Microphone capabilities - G2 has one microphone (right side), LC3 codec\n hasMicrophone: true,\n microphone: {\n count: 1,\n hasVAD: false,\n },\n\n // Speaker capabilities - G2 does not have a speaker\n hasSpeaker: false,\n speaker: null,\n\n // IMU capabilities - G2 has IMU\n hasIMU: true,\n imu: null,\n\n // Button capabilities - G2 has a capacitive touchbar\n hasButton: true,\n button: {\n count: 1,\n buttons: [{\n type: \"swipe1d\",\n events: [\"TAP\", \"DOUBLE_TAP\", \"TRIPLE_TAP\", \"PRESS_HOLD\", \"SWIPE_UP\", \"SWIPE_DOWN\"],\n isCapacitive: true,\n }],\n },\n\n // Light capabilities - G2 does not have lights\n hasLight: false,\n light: null,\n\n // Power capabilities\n power: {\n hasExternalBattery: false,\n },\n\n // WiFi capabilities - G2 does not support WiFi\n hasWifi: false,\n\n // Dashboard - G2 renders Even Realities' native dashboard in firmware, so\n // MentraOS does not manage the dashboard or expose dashboard settings for it\n hasNativeDashboard: true,\n};\n"]}
|
|
1
|
+
{"version":3,"file":"even-realities-g2.js","sourceRoot":"","sources":["../../../src/types/capabilities/even-realities-g2.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH;;GAEG;AACH,MAAM,CAAC,MAAM,eAAe,GAAiB;IAC3C,SAAS,EAAE,mBAAmB;IAE9B,kDAAkD;IAClD,SAAS,EAAE,KAAK;IAChB,MAAM,EAAE,IAAI;IAEZ,2EAA2E;IAC3E,UAAU,EAAE,IAAI;IAChB,OAAO,EAAE;QACP,KAAK,EAAE,CAAC;QACR,OAAO,EAAE,KAAK;QACd,KAAK,EAAE,OAAO;QACd,gBAAgB,EAAE,IAAI;QACtB,UAAU,EAAE,EAAE,KAAK,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE;QACvC,WAAW,EAAE,EAAE,UAAU,EAAE,EAAE,EAAE;QAC/B,YAAY,EAAE,CAAC;QACf,gBAAgB,EAAE,IAAI;QAEtB,mDAAmD;QACnD,KAAK,EAAE,GAAG;QACV,MAAM,EAAE,GAAG;QACX,WAAW,EAAE,IAAI;QACjB,eAAe,EAAE,CAAC,EAAE,gDAAgD;QACpE,gBAAgB,EAAE,CAAC,EAAE,gCAAgC;QACrD,sEAAsE;QACtE,2EAA2E;QAC3E,2EAA2E;QAC3E,+BAA+B;QAC/B,MAAM,EAAE,CAAC,MAAM,CAAC,EAAE,kCAAkC;QACpD,eAAe,EAAE,CAAC;QAClB,aAAa,EAAE,IAAI;KACpB;IAED,0EAA0E;IAC1E,aAAa,EAAE,IAAI;IACnB,UAAU,EAAE;QACV,KAAK,EAAE,CAAC;QACR,MAAM,EAAE,KAAK;KACd;IAED,oDAAoD;IACpD,UAAU,EAAE,KAAK;IACjB,OAAO,EAAE,IAAI;IAEb,gCAAgC;IAChC,MAAM,EAAE,IAAI;IACZ,GAAG,EAAE,IAAI;IAET,qDAAqD;IACrD,SAAS,EAAE,IAAI;IACf,MAAM,EAAE;QACN,KAAK,EAAE,CAAC;QACR,OAAO,EAAE,CAAC;gBACR,IAAI,EAAE,SAAS;gBACf,MAAM,EAAE,CAAC,KAAK,EAAE,YAAY,EAAE,YAAY,EAAE,YAAY,EAAE,UAAU,EAAE,YAAY,CAAC;gBACnF,YAAY,EAAE,IAAI;aACnB,CAAC;KACH;IAED,+CAA+C;IAC/C,QAAQ,EAAE,KAAK;IACf,KAAK,EAAE,IAAI;IAEX,qBAAqB;IACrB,KAAK,EAAE;QACL,kBAAkB,EAAE,KAAK;KAC1B;IAED,+CAA+C;IAC/C,OAAO,EAAE,KAAK;IAEd,4EAA4E;IAC5E,MAAM,EAAE,KAAK;IAEb,0EAA0E;IAC1E,6EAA6E;IAC7E,kBAAkB,EAAE,IAAI;CACzB,CAAC","sourcesContent":["/**\n * @fileoverview Even Realities G2 Hardware Capabilities\n *\n * Capability profile for the Even Realities G2 smart glasses model.\n * G2 uses the EvenHub protocol with protobuf-based commands.\n */\n\nimport type { Capabilities } from \"../hardware\";\n\n/**\n * Even Realities G2 capability profile\n */\nexport const evenRealitiesG2: Capabilities = {\n modelName: \"Even Realities G2\",\n\n // Camera capabilities - G2 does not have a camera\n hasCamera: false,\n camera: null,\n\n // Display capabilities - G2 has a green monochrome display (similar to G1)\n hasDisplay: true,\n display: {\n count: 2,\n isColor: false,\n color: \"green\",\n canDisplayBitmap: true,\n resolution: { width: 640, height: 200 },\n fieldOfView: { horizontal: 25 },\n maxTextLines: 8,\n adjustBrightness: true,\n\n // Scene display API — EvenHub retained containers.\n width: 576,\n height: 288,\n canPosition: true,\n maxTextElements: 6, // firmware text-container pool (rects share it)\n maxImageElements: 4, // firmware image-container pool\n // No maxImagePx: the SGC tiles larger images across multiple firmware\n // containers (each ≤200x100 — the hardware-verified per-container transfer\n // envelope). Pathological sizes needing more than the 4-container pool are\n // dropped SGC-side with a log.\n shapes: [\"rect\"], // bordered empty container ≈ rect\n intensityLevels: 2,\n partialUpdate: true,\n },\n\n // Microphone capabilities - G2 has one microphone (right side), LC3 codec\n hasMicrophone: true,\n microphone: {\n count: 1,\n hasVAD: false,\n },\n\n // Speaker capabilities - G2 does not have a speaker\n hasSpeaker: false,\n speaker: null,\n\n // IMU capabilities - G2 has IMU\n hasIMU: true,\n imu: null,\n\n // Button capabilities - G2 has a capacitive touchbar\n hasButton: true,\n button: {\n count: 1,\n buttons: [{\n type: \"swipe1d\",\n events: [\"TAP\", \"DOUBLE_TAP\", \"TRIPLE_TAP\", \"PRESS_HOLD\", \"SWIPE_UP\", \"SWIPE_DOWN\"],\n isCapacitive: true,\n }],\n },\n\n // Light capabilities - G2 does not have lights\n hasLight: false,\n light: null,\n\n // Power capabilities\n power: {\n hasExternalBattery: false,\n },\n\n // WiFi capabilities - G2 does not support WiFi\n hasWifi: false,\n\n // OTA capabilities - G2 firmware updates are not driven by the ASG OTA flow\n hasOta: false,\n\n // Dashboard - G2 renders Even Realities' native dashboard in firmware, so\n // MentraOS does not manage the dashboard or expose dashboard settings for it\n hasNativeDashboard: true,\n};\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mentra-display.d.ts","sourceRoot":"","sources":["../../../src/types/capabilities/mentra-display.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAEhD;;GAEG;AACH,eAAO,MAAM,aAAa,EAAE,
|
|
1
|
+
{"version":3,"file":"mentra-display.d.ts","sourceRoot":"","sources":["../../../src/types/capabilities/mentra-display.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAEhD;;GAEG;AACH,eAAO,MAAM,aAAa,EAAE,YAiE3B,CAAC"}
|
|
@@ -59,5 +59,7 @@ export const mentraDisplay = {
|
|
|
59
59
|
},
|
|
60
60
|
// WiFi capabilities - Mentra Display does not support WiFi
|
|
61
61
|
hasWifi: false,
|
|
62
|
+
// OTA capabilities - Mentra Display firmware updates are not driven by the ASG OTA flow
|
|
63
|
+
hasOta: false,
|
|
62
64
|
};
|
|
63
65
|
//# sourceMappingURL=mentra-display.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mentra-display.js","sourceRoot":"","sources":["../../../src/types/capabilities/mentra-display.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH;;GAEG;AACH,MAAM,CAAC,MAAM,aAAa,GAAiB;IACzC,SAAS,EAAE,gBAAgB;IAE3B,8DAA8D;IAC9D,SAAS,EAAE,KAAK;IAChB,MAAM,EAAE,IAAI;IAEZ,uEAAuE;IACvE,UAAU,EAAE,IAAI;IAChB,OAAO,EAAE;QACP,KAAK,EAAE,CAAC;QACR,OAAO,EAAE,KAAK;QACd,KAAK,EAAE,OAAO;QACd,gBAAgB,EAAE,IAAI;QACtB,UAAU,EAAE,EAAE,KAAK,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE;QACvC,WAAW,EAAE,EAAE,UAAU,EAAE,EAAE,EAAE;QAC/B,YAAY,EAAE,CAAC;QACf,gBAAgB,EAAE,IAAI;QAEtB,wEAAwE;QACxE,mEAAmE;QACnE,KAAK,EAAE,GAAG;QACV,MAAM,EAAE,GAAG;QACX,WAAW,EAAE,IAAI;QACjB,eAAe,EAAE,CAAC,EAAE,iDAAiD;QACrE,gBAAgB,EAAE,CAAC,EAAE,iCAAiC;QACtD,UAAU,EAAE,EAAE,KAAK,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,EAAE,gDAAgD;QACzF,MAAM,EAAE,CAAC,MAAM,CAAC,EAAE,qDAAqD;QACvE,eAAe,EAAE,CAAC,EAAE,oBAAoB;QACxC,aAAa,EAAE,IAAI;KACpB;IAED,0EAA0E;IAC1E,aAAa,EAAE,IAAI;IACnB,UAAU,EAAE;QACV,KAAK,EAAE,CAAC;QACR,MAAM,EAAE,KAAK;KACd;IAED,gEAAgE;IAChE,UAAU,EAAE,KAAK;IACjB,OAAO,EAAE,IAAI;IAEb,wGAAwG;IACxG,MAAM,EAAE,IAAI;IACZ,GAAG,EAAE,IAAI;IAET,6DAA6D;IAC7D,SAAS,EAAE,KAAK;IAChB,MAAM,EAAE,IAAI;IAEZ,2DAA2D;IAC3D,QAAQ,EAAE,KAAK;IACf,KAAK,EAAE,IAAI;IAEX,qEAAqE;IACrE,KAAK,EAAE;QACL,kBAAkB,EAAE,KAAK;KAC1B;IAED,2DAA2D;IAC3D,OAAO,EAAE,KAAK;
|
|
1
|
+
{"version":3,"file":"mentra-display.js","sourceRoot":"","sources":["../../../src/types/capabilities/mentra-display.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH;;GAEG;AACH,MAAM,CAAC,MAAM,aAAa,GAAiB;IACzC,SAAS,EAAE,gBAAgB;IAE3B,8DAA8D;IAC9D,SAAS,EAAE,KAAK;IAChB,MAAM,EAAE,IAAI;IAEZ,uEAAuE;IACvE,UAAU,EAAE,IAAI;IAChB,OAAO,EAAE;QACP,KAAK,EAAE,CAAC;QACR,OAAO,EAAE,KAAK;QACd,KAAK,EAAE,OAAO;QACd,gBAAgB,EAAE,IAAI;QACtB,UAAU,EAAE,EAAE,KAAK,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE;QACvC,WAAW,EAAE,EAAE,UAAU,EAAE,EAAE,EAAE;QAC/B,YAAY,EAAE,CAAC;QACf,gBAAgB,EAAE,IAAI;QAEtB,wEAAwE;QACxE,mEAAmE;QACnE,KAAK,EAAE,GAAG;QACV,MAAM,EAAE,GAAG;QACX,WAAW,EAAE,IAAI;QACjB,eAAe,EAAE,CAAC,EAAE,iDAAiD;QACrE,gBAAgB,EAAE,CAAC,EAAE,iCAAiC;QACtD,UAAU,EAAE,EAAE,KAAK,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,EAAE,gDAAgD;QACzF,MAAM,EAAE,CAAC,MAAM,CAAC,EAAE,qDAAqD;QACvE,eAAe,EAAE,CAAC,EAAE,oBAAoB;QACxC,aAAa,EAAE,IAAI;KACpB;IAED,0EAA0E;IAC1E,aAAa,EAAE,IAAI;IACnB,UAAU,EAAE;QACV,KAAK,EAAE,CAAC;QACR,MAAM,EAAE,KAAK;KACd;IAED,gEAAgE;IAChE,UAAU,EAAE,KAAK;IACjB,OAAO,EAAE,IAAI;IAEb,wGAAwG;IACxG,MAAM,EAAE,IAAI;IACZ,GAAG,EAAE,IAAI;IAET,6DAA6D;IAC7D,SAAS,EAAE,KAAK;IAChB,MAAM,EAAE,IAAI;IAEZ,2DAA2D;IAC3D,QAAQ,EAAE,KAAK;IACf,KAAK,EAAE,IAAI;IAEX,qEAAqE;IACrE,KAAK,EAAE;QACL,kBAAkB,EAAE,KAAK;KAC1B;IAED,2DAA2D;IAC3D,OAAO,EAAE,KAAK;IAEd,wFAAwF;IACxF,MAAM,EAAE,KAAK;CACd,CAAC","sourcesContent":["/**\n * @fileoverview Mentra Display Hardware Capabilities\n *\n * Capability profile for the Mentra Display smart glasses model.\n * Defines the hardware and software features available on this device.\n */\n\nimport type { Capabilities } from \"../hardware\";\n\n/**\n * Mentra Display capability profile\n */\nexport const mentraDisplay: Capabilities = {\n modelName: \"Mentra Display\",\n\n // Camera capabilities - Mentra Display does not have a camera\n hasCamera: false,\n camera: null,\n\n // Display capabilities - Mentra Display has a green monochrome display\n hasDisplay: true,\n display: {\n count: 2,\n isColor: false,\n color: \"green\",\n canDisplayBitmap: true,\n resolution: { width: 640, height: 480 },\n fieldOfView: { horizontal: 25 },\n maxTextLines: 5,\n adjustBrightness: true,\n\n // Scene display API — firmware canvas components on the 500x220 virtual\n // screen centered in the 640x480 A6N panel (mos_display_config.c).\n width: 500,\n height: 220,\n canPosition: true,\n maxTextElements: 6, // firmware TEXTBOX pool ids 1-6 (rects share it)\n maxImageElements: 4, // firmware BITMAP pool ids 10-13\n maxImagePx: { width: 200, height: 200 }, // CANVAS_IMAGE_MAX_I1_BYTES / NAV_IMAGE_MAX_W/H\n shapes: [\"rect\"], // bordered empty TEXTBOX ≈ rect (no shape primitive)\n intensityLevels: 2, // 1-bpp panel today\n partialUpdate: true,\n },\n\n // Microphone capabilities - Mentra Display has one microphone without VAD\n hasMicrophone: true,\n microphone: {\n count: 1,\n hasVAD: false,\n },\n\n // Speaker capabilities - Mentra Display does not have a speaker\n hasSpeaker: false,\n speaker: null,\n\n // IMU capabilities - Mentra Display has IMU for head-up/down detection but raw data not exposed to apps\n hasIMU: true,\n imu: null,\n\n // Button capabilities - Mentra Display does not have buttons\n hasButton: false,\n button: null,\n\n // Light capabilities - Mentra Display does not have lights\n hasLight: false,\n light: null,\n\n // Power capabilities - Mentra Display does not have external battery\n power: {\n hasExternalBattery: false,\n },\n\n // WiFi capabilities - Mentra Display does not support WiFi\n hasWifi: false,\n\n // OTA capabilities - Mentra Display firmware updates are not driven by the ASG OTA flow\n hasOta: false,\n};\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mentra-live.d.ts","sourceRoot":"","sources":["../../../src/types/capabilities/mentra-live.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAEhD;;GAEG;AACH,eAAO,MAAM,UAAU,EAAE,
|
|
1
|
+
{"version":3,"file":"mentra-live.d.ts","sourceRoot":"","sources":["../../../src/types/capabilities/mentra-live.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAEhD;;GAEG;AACH,eAAO,MAAM,UAAU,EAAE,YA6FxB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mentra-live.js","sourceRoot":"","sources":["../../../src/types/capabilities/mentra-live.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH;;GAEG;AACH,MAAM,CAAC,MAAM,UAAU,GAAiB;IACtC,SAAS,EAAE,aAAa;IAExB,8DAA8D;IAC9D,SAAS,EAAE,IAAI;IACf,MAAM,EAAE;QACN,UAAU,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE;QACzC,MAAM,EAAE,KAAK;QACb,QAAQ,EAAE,IAAI;QACd,KAAK,EAAE;YACL,SAAS,EAAE,IAAI;YACf,SAAS,EAAE,IAAI;YACf,oBAAoB,EAAE,CAAC,MAAM,CAAC;YAC9B,oBAAoB,EAAE;gBACpB,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE;gBAC7B,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE;gBAC5B,EAAE,KAAK,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE;aAC5B;SACF;KACF;IAED,6DAA6D;IAC7D,UAAU,EAAE,KAAK;IACjB,OAAO,EAAE,IAAI;IAEb,oEAAoE;IACpE,aAAa,EAAE,IAAI;IACnB,UAAU,EAAE;QACV,KAAK,EAAE,CAAC;QACR,MAAM,EAAE,IAAI;KACb;IAED,8DAA8D;IAC9D,UAAU,EAAE,IAAI;IAChB,OAAO,EAAE;QACP,KAAK,EAAE,CAAC;QACR,SAAS,EAAE,KAAK;KACjB;IAED,gDAAgD;IAChD,MAAM,EAAE,IAAI;IACZ,GAAG,EAAE;QACH,SAAS,EAAE,CAAC;QACZ,gBAAgB,EAAE,IAAI;QACtB,UAAU,EAAE,KAAK;QACjB,YAAY,EAAE,IAAI;KACnB;IAED,4DAA4D;IAC5D,SAAS,EAAE,IAAI;IACf,MAAM,EAAE;QACN,KAAK,EAAE,CAAC;QACR,OAAO,EAAE;YACP;gBACE,IAAI,EAAE,OAAO;gBACb,MAAM,EAAE,CAAC,OAAO,EAAE,cAAc,EAAE,YAAY,CAAC;gBAC/C,YAAY,EAAE,KAAK;aACpB;SACF;KACF;IAED,2EAA2E;IAC3E,QAAQ,EAAE,IAAI;IACd,KAAK,EAAE;QACL,KAAK,EAAE,CAAC;QACR,MAAM,EAAE;YACN;gBACE,EAAE,EAAE,SAAS;gBACb,OAAO,EAAE,SAAS;gBAClB,WAAW,EAAE,KAAK;gBAClB,KAAK,EAAE,OAAO;gBACd,QAAQ,EAAE,cAAc;aACzB;YACD;gBACE,EAAE,EAAE,eAAe;gBACnB,OAAO,EAAE,eAAe;gBACxB,WAAW,EAAE,IAAI;gBACjB,KAAK,EAAE,KAAK;gBACZ,QAAQ,EAAE,aAAa;aACxB;SACF;KACF;IAED,kEAAkE;IAClE,KAAK,EAAE;QACL,kBAAkB,EAAE,KAAK;KAC1B;IAED,gDAAgD;IAChD,OAAO,EAAE,IAAI;
|
|
1
|
+
{"version":3,"file":"mentra-live.js","sourceRoot":"","sources":["../../../src/types/capabilities/mentra-live.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH;;GAEG;AACH,MAAM,CAAC,MAAM,UAAU,GAAiB;IACtC,SAAS,EAAE,aAAa;IAExB,8DAA8D;IAC9D,SAAS,EAAE,IAAI;IACf,MAAM,EAAE;QACN,UAAU,EAA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AE,SAAS;gBAClB,WAAW,EAAE,KAAK;gBAClB,KAAK,EAAE,OAAO;gBACd,QAAQ,EAAE,cAAc;aACzB;YACD;gBACE,EAAE,EAAE,eAAe;gBACnB,OAAO,EAAE,eAAe;gBACxB,WAAW,EAAE,IAAI;gBACjB,KAAK,EAAE,KAAK;gBACZ,QAAQ,EAAE,aAAa;aACxB;SACF;KACF;IAED,kEAAkE;IAClE,KAAK,EAAE;QACL,kBAAkB,EAAE,KAAK;KAC1B;IAED,gDAAgD;IAChD,OAAO,EAAE,IAAI;IAEb,kEAAkE;IAClE,MAAM,EAAE,IAAI;CACb,CAAC","sourcesContent":["/**\n * @fileoverview Mentra Live Hardware Capabilities\n *\n * Capability profile for the Mentra Live smart glasses model.\n * Defines the hardware and software features available on this device.\n */\n\nimport type { Capabilities } from \"../hardware\";\n\n/**\n * Mentra Live capability profile\n */\nexport const mentraLive: Capabilities = {\n modelName: \"Mentra Live\",\n\n // Camera capabilities - Mentra Live has camera with streaming\n hasCamera: true,\n camera: {\n resolution: { width: 1920, height: 1080 },\n hasHDR: false,\n hasFocus: true,\n video: {\n canRecord: true,\n canStream: true,\n supportedStreamTypes: [\"rtmp\"],\n supportedResolutions: [\n { width: 1920, height: 1080 },\n { width: 1280, height: 720 },\n { width: 640, height: 480 },\n ],\n },\n },\n\n // Display capabilities - Mentra Live does not have a display\n hasDisplay: false,\n display: null,\n\n // Microphone capabilities - Mentra Live has one microphone with VAD\n hasMicrophone: true,\n microphone: {\n count: 1,\n hasVAD: true,\n },\n\n // Speaker capabilities - Mentra Live has one standard speaker\n hasSpeaker: true,\n speaker: {\n count: 1,\n isPrivate: false,\n },\n\n // IMU capabilities - Mentra Live has 6-axis IMU\n hasIMU: true,\n imu: {\n axisCount: 6,\n hasAccelerometer: true,\n hasCompass: false,\n hasGyroscope: true,\n },\n\n // Button capabilities - Mentra Live has one physical button\n hasButton: true,\n button: {\n count: 1,\n buttons: [\n {\n type: \"press\",\n events: [\"press\", \"double_press\", \"long_press\"],\n isCapacitive: false,\n },\n ],\n },\n\n // Light capabilities - Mentra Live has two lights: privacy light + RGB LED\n hasLight: true,\n light: {\n count: 2,\n lights: [\n {\n id: \"privacy\",\n purpose: \"privacy\",\n isFullColor: false,\n color: \"white\",\n position: \"front_facing\",\n },\n {\n id: \"user_feedback\",\n purpose: \"user_feedback\",\n isFullColor: true,\n color: \"rgb\",\n position: \"user_facing\",\n },\n ],\n },\n\n // Power capabilities - Mentra Live does not have external battery\n power: {\n hasExternalBattery: false,\n },\n\n // WiFi capabilities - Mentra Live supports WiFi\n hasWifi: true,\n\n // OTA capabilities - Mentra Live supports ASG/BES/MTK OTA updates\n hasOta: true,\n};\n"]}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview NIMO hardware capabilities.
|
|
3
|
+
*
|
|
4
|
+
* NIMO uses framed UART-over-BLE for widget content and a separate Opus
|
|
5
|
+
* microphone channel.
|
|
6
|
+
*/
|
|
7
|
+
import type { Capabilities } from "../hardware";
|
|
8
|
+
export declare const nimo: Capabilities;
|
|
9
|
+
//# sourceMappingURL=nimo.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"nimo.d.ts","sourceRoot":"","sources":["../../../src/types/capabilities/nimo.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAC,YAAY,EAAC,MAAM,aAAa,CAAA;AAE7C,eAAO,MAAM,IAAI,EAAE,YAiDlB,CAAA"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview NIMO hardware capabilities.
|
|
3
|
+
*
|
|
4
|
+
* NIMO uses framed UART-over-BLE for widget content and a separate Opus
|
|
5
|
+
* microphone channel.
|
|
6
|
+
*/
|
|
7
|
+
export const nimo = {
|
|
8
|
+
modelName: "NIMO",
|
|
9
|
+
hasCamera: false,
|
|
10
|
+
camera: null,
|
|
11
|
+
hasDisplay: true,
|
|
12
|
+
display: {
|
|
13
|
+
count: 2,
|
|
14
|
+
isColor: false,
|
|
15
|
+
color: "green",
|
|
16
|
+
canDisplayBitmap: true,
|
|
17
|
+
// Bitmaps render into the 160x160 2bpp navigation widget. The resolution
|
|
18
|
+
// below remains the existing text-display placeholder until hardware
|
|
19
|
+
// screen information is available.
|
|
20
|
+
resolution: { width: 640, height: 400 },
|
|
21
|
+
maxTextLines: 5,
|
|
22
|
+
adjustBrightness: true,
|
|
23
|
+
},
|
|
24
|
+
hasMicrophone: true,
|
|
25
|
+
microphone: {
|
|
26
|
+
count: 2,
|
|
27
|
+
hasVAD: false,
|
|
28
|
+
},
|
|
29
|
+
hasSpeaker: false,
|
|
30
|
+
speaker: null,
|
|
31
|
+
hasIMU: true,
|
|
32
|
+
imu: null,
|
|
33
|
+
hasButton: true,
|
|
34
|
+
button: {
|
|
35
|
+
count: 2,
|
|
36
|
+
buttons: [
|
|
37
|
+
{
|
|
38
|
+
type: "press",
|
|
39
|
+
events: ["press", "double_press", "long_press"],
|
|
40
|
+
isCapacitive: true,
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
type: "press",
|
|
44
|
+
events: ["press", "double_press", "long_press"],
|
|
45
|
+
isCapacitive: true,
|
|
46
|
+
},
|
|
47
|
+
],
|
|
48
|
+
},
|
|
49
|
+
hasLight: false,
|
|
50
|
+
light: null,
|
|
51
|
+
power: {
|
|
52
|
+
hasExternalBattery: false,
|
|
53
|
+
},
|
|
54
|
+
hasWifi: false,
|
|
55
|
+
hasOta: false,
|
|
56
|
+
};
|
|
57
|
+
//# sourceMappingURL=nimo.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"nimo.js","sourceRoot":"","sources":["../../../src/types/capabilities/nimo.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,MAAM,CAAC,MAAM,IAAI,GAAiB;IAChC,SAAS,EAAE,MAAM;IACjB,SAAS,EAAE,KAAK;IAChB,MAAM,EAAE,IAAI;IACZ,UAAU,EAAE,IAAI;IAChB,OAAO,EAAE;QACP,KAAK,EAAE,CAAC;QACR,OAAO,EAAE,KAAK;QACd,KAAK,EAAE,OAAO;QACd,gBAAgB,EAAE,IAAI;QACtB,yEAAyE;QACzE,qEAAqE;QACrE,mCAAmC;QACnC,UAAU,EAAE,EAAC,KAAK,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAC;QACrC,YAAY,EAAE,CAAC;QACf,gBAAgB,EAAE,IAAI;KACvB;IACD,aAAa,EAAE,IAAI;IACnB,UAAU,EAAE;QACV,KAAK,EAAE,CAAC;QACR,MAAM,EAAE,KAAK;KACd;IACD,UAAU,EAAE,KAAK;IACjB,OAAO,EAAE,IAAI;IACb,MAAM,EAAE,IAAI;IACZ,GAAG,EAAE,IAAI;IACT,SAAS,EAAE,IAAI;IACf,MAAM,EAAE;QACN,KAAK,EAAE,CAAC;QACR,OAAO,EAAE;YACP;gBACE,IAAI,EAAE,OAAO;gBACb,MAAM,EAAE,CAAC,OAAO,EAAE,cAAc,EAAE,YAAY,CAAC;gBAC/C,YAAY,EAAE,IAAI;aACnB;YACD;gBACE,IAAI,EAAE,OAAO;gBACb,MAAM,EAAE,CAAC,OAAO,EAAE,cAAc,EAAE,YAAY,CAAC;gBAC/C,YAAY,EAAE,IAAI;aACnB;SACF;KACF;IACD,QAAQ,EAAE,KAAK;IACf,KAAK,EAAE,IAAI;IACX,KAAK,EAAE;QACL,kBAAkB,EAAE,KAAK;KAC1B;IACD,OAAO,EAAE,KAAK;IACd,MAAM,EAAE,KAAK;CACd,CAAA","sourcesContent":["/**\n * @fileoverview NIMO hardware capabilities.\n *\n * NIMO uses framed UART-over-BLE for widget content and a separate Opus\n * microphone channel.\n */\n\nimport type {Capabilities} from \"../hardware\"\n\nexport const nimo: Capabilities = {\n modelName: \"NIMO\",\n hasCamera: false,\n camera: null,\n hasDisplay: true,\n display: {\n count: 2,\n isColor: false,\n color: \"green\",\n canDisplayBitmap: true,\n // Bitmaps render into the 160x160 2bpp navigation widget. The resolution\n // below remains the existing text-display placeholder until hardware\n // screen information is available.\n resolution: {width: 640, height: 400},\n maxTextLines: 5,\n adjustBrightness: true,\n },\n hasMicrophone: true,\n microphone: {\n count: 2,\n hasVAD: false,\n },\n hasSpeaker: false,\n speaker: null,\n hasIMU: true,\n imu: null,\n hasButton: true,\n button: {\n count: 2,\n buttons: [\n {\n type: \"press\",\n events: [\"press\", \"double_press\", \"long_press\"],\n isCapacitive: true,\n },\n {\n type: \"press\",\n events: [\"press\", \"double_press\", \"long_press\"],\n isCapacitive: true,\n },\n ],\n },\n hasLight: false,\n light: null,\n power: {\n hasExternalBattery: false,\n },\n hasWifi: false,\n hasOta: false,\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"none.d.ts","sourceRoot":"","sources":["../../../src/types/capabilities/none.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAEhD;;GAEG;AACH,eAAO,MAAM,IAAI,EAAE,
|
|
1
|
+
{"version":3,"file":"none.d.ts","sourceRoot":"","sources":["../../../src/types/capabilities/none.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAEhD;;GAEG;AACH,eAAO,MAAM,IAAI,EAAE,YAiElB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"none.js","sourceRoot":"","sources":["../../../src/types/capabilities/none.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH;;GAEG;AACH,MAAM,CAAC,MAAM,IAAI,GAAiB;IAChC,SAAS,EAAE,MAAM;IAEjB,+CAA+C;IAC/C,SAAS,EAAE,KAAK;IAChB,MAAM,EAAE,IAAI;IAEZ,wDAAwD;IACxD,UAAU,EAAE,KAAK;IACjB,OAAO,EAAE;QACP,KAAK,EAAE,CAAC;QACR,OAAO,EAAE,KAAK;QACd,KAAK,EAAE,OAAO;QACd,gBAAgB,EAAE,KAAK;QACvB,UAAU,EAAE,EAAE,KAAK,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE;QACvC,WAAW,EAAE,EAAE,UAAU,EAAE,EAAE,EAAE;QAC/B,YAAY,EAAE,CAAC;QACf,gBAAgB,EAAE,IAAI;KACvB;IAED,yDAAyD;IACzD,aAAa,EAAE,KAAK;IACpB,UAAU,EAAE;QACV,KAAK,EAAE,CAAC;QACR,MAAM,EAAE,KAAK;KACd;IAED,uDAAuD;IACvD,UAAU,EAAE,KAAK;IACjB,OAAO,EAAE;QACP,KAAK,EAAE,CAAC;QACR,SAAS,EAAE,KAAK;KACjB;IAED,0CAA0C;IAC1C,MAAM,EAAE,KAAK;IACb,GAAG,EAAE,IAAI;IAET,iDAAiD;IACjD,SAAS,EAAE,KAAK;IAChB,MAAM,EAAE;QACN,KAAK,EAAE,CAAC;QACR,OAAO,EAAE;YACP;gBACE,IAAI,EAAE,OAAO;gBACb,MAAM,EAAE,CAAC,OAAO,CAAC;gBACjB,YAAY,EAAE,KAAK;aACpB;SACF;KACF;IAED,4CAA4C;IAC5C,QAAQ,EAAE,KAAK;IACf,KAAK,EAAE,IAAI;IAEX,sDAAsD;IACtD,KAAK,EAAE;QACL,kBAAkB,EAAE,KAAK;KAC1B;IAED,4CAA4C;IAC5C,OAAO,EAAE,KAAK;
|
|
1
|
+
{"version":3,"file":"none.js","sourceRoot":"","sources":["../../../src/types/capabilities/none.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH;;GAEG;AACH,MAAM,CAAC,MAAM,IAAI,GAAiB;IAChC,SAAS,EAAE,MAAM;IAEjB,+CAA+C;IAC/C,SAAS,EAAE,KAAK;IAChB,MAAM,EAAE,IAAI;IAEZ,wDAAwD;IACxD,UAAU,EAAE,KAAK;IACjB,OAAO,EAAE;QACP,KAAK,EAAE,CAAC;QACR,OAAO,EAAE,KAAK;QACd,KAAK,EAAE,OAAO;QACd,gBAAgB,EAAE,KAAK;QACvB,UAAU,EAAE,EAAE,KAAK,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE;QACvC,WAAW,EAAE,EAAE,UAAU,EAAE,EAAE,EAAE;QAC/B,YAAY,EAAE,CAAC;QACf,gBAAgB,EAAE,IAAI;KACvB;IAED,yDAAyD;IACzD,aAAa,EAAE,KAAK;IACpB,UAAU,EAAE;QACV,KAAK,EAAE,CAAC;QACR,MAAM,EAAE,KAAK;KACd;IAED,uDAAuD;IACvD,UAAU,EAAE,KAAK;IACjB,OAAO,EAAE;QACP,KAAK,EAAE,CAAC;QACR,SAAS,EAAE,KAAK;KACjB;IAED,0CAA0C;IAC1C,MAAM,EAAE,KAAK;IACb,GAAG,EAAE,IAAI;IAET,iDAAiD;IACjD,SAAS,EAAE,KAAK;IAChB,MAAM,EAAE;QACN,KAAK,EAAE,CAAC;QACR,OAAO,EAAE;YACP;gBACE,IAAI,EAAE,OAAO;gBACb,MAAM,EAAE,CAAC,OAAO,CAAC;gBACjB,YAAY,EAAE,KAAK;aACpB;SACF;KACF;IAED,4CAA4C;IAC5C,QAAQ,EAAE,KAAK;IACf,KAAK,EAAE,IAAI;IAEX,sDAAsD;IACtD,KAAK,EAAE;QACL,kBAAkB,EAAE,KAAK;KAC1B;IAED,4CAA4C;IAC5C,OAAO,EAAE,KAAK;IAEd,uDAAuD;IACvD,MAAM,EAAE,KAAK;CACd,CAAC","sourcesContent":["/**\n * @fileoverview Simulated Glasses Hardware Capabilities\n *\n * Capability profile for the Simulated Glasses model.\n * Defines the hardware and software features available on this device.\n * This profile matches the Vuzix Z100 capabilities for testing purposes.\n */\n\nimport type { Capabilities } from \"../hardware\";\n\n/**\n * Simulated Glasses capability profile\n */\nexport const none: Capabilities = {\n modelName: \"None\",\n\n // Camera capabilities - does not have a camera\n hasCamera: false,\n camera: null,\n\n // Display capabilities - has a green monochrome display\n hasDisplay: false,\n display: {\n count: 1,\n isColor: false,\n color: \"green\",\n canDisplayBitmap: false,\n resolution: { width: 640, height: 480 },\n fieldOfView: { horizontal: 30 },\n maxTextLines: 7,\n adjustBrightness: true,\n },\n\n // Microphone capabilities - has a microphone (phone mic)\n hasMicrophone: false,\n microphone: {\n count: 1,\n hasVAD: false,\n },\n\n // Speaker capabilities - has a speaker (phone speaker)\n hasSpeaker: false,\n speaker: {\n count: 1,\n isPrivate: false,\n },\n\n // IMU capabilities - does not have an IMU\n hasIMU: false,\n imu: null,\n\n // Button capabilities - Has one simulated button\n hasButton: false,\n button: {\n count: 1,\n buttons: [\n {\n type: \"press\",\n events: [\"press\"],\n isCapacitive: false,\n },\n ],\n },\n\n // Light capabilities - does not have lights\n hasLight: false,\n light: null,\n\n // Power capabilities - does not have external battery\n power: {\n hasExternalBattery: false,\n },\n\n // WiFi capabilities - does not support WiFi\n hasWifi: false,\n\n // OTA capabilities - none profile does not support OTA\n hasOta: false,\n};\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"simulated-glasses.d.ts","sourceRoot":"","sources":["../../../src/types/capabilities/simulated-glasses.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAEhD;;GAEG;AACH,eAAO,MAAM,gBAAgB,EAAE,
|
|
1
|
+
{"version":3,"file":"simulated-glasses.d.ts","sourceRoot":"","sources":["../../../src/types/capabilities/simulated-glasses.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAEhD;;GAEG;AACH,eAAO,MAAM,gBAAgB,EAAE,YAiE9B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"simulated-glasses.js","sourceRoot":"","sources":["../../../src/types/capabilities/simulated-glasses.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH;;GAEG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAiB;IAC5C,SAAS,EAAE,mBAAmB;IAE9B,+CAA+C;IAC/C,SAAS,EAAE,KAAK;IAChB,MAAM,EAAE,IAAI;IAEZ,wDAAwD;IACxD,UAAU,EAAE,IAAI;IAChB,OAAO,EAAE;QACP,KAAK,EAAE,CAAC;QACR,OAAO,EAAE,KAAK;QACd,KAAK,EAAE,OAAO;QACd,gBAAgB,EAAE,KAAK;QACvB,UAAU,EAAE,EAAE,KAAK,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE;QACvC,WAAW,EAAE,EAAE,UAAU,EAAE,EAAE,EAAE;QAC/B,YAAY,EAAE,CAAC;QACf,gBAAgB,EAAE,IAAI;KACvB;IAED,yDAAyD;IACzD,aAAa,EAAE,IAAI;IACnB,UAAU,EAAE;QACV,KAAK,EAAE,CAAC;QACR,MAAM,EAAE,KAAK;KACd;IAED,uDAAuD;IACvD,UAAU,EAAE,IAAI;IAChB,OAAO,EAAE;QACP,KAAK,EAAE,CAAC;QACR,SAAS,EAAE,KAAK;KACjB;IAED,0CAA0C;IAC1C,MAAM,EAAE,KAAK;IACb,GAAG,EAAE,IAAI;IAET,iDAAiD;IACjD,SAAS,EAAE,IAAI;IACf,MAAM,EAAE;QACN,KAAK,EAAE,CAAC;QACR,OAAO,EAAE;YACP;gBACE,IAAI,EAAE,OAAO;gBACb,MAAM,EAAE,CAAC,OAAO,CAAC;gBACjB,YAAY,EAAE,KAAK;aACpB;SACF;KACF;IAED,4CAA4C;IAC5C,QAAQ,EAAE,KAAK;IACf,KAAK,EAAE,IAAI;IAEX,sDAAsD;IACtD,KAAK,EAAE;QACL,kBAAkB,EAAE,KAAK;KAC1B;IAED,4CAA4C;IAC5C,OAAO,EAAE,KAAK;
|
|
1
|
+
{"version":3,"file":"simulated-glasses.js","sourceRoot":"","sources":["../../../src/types/capabilities/simulated-glasses.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH;;GAEG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAiB;IAC5C,SAAS,EAAE,mBAAmB;IAE9B,+CAA+C;IAC/C,SAAS,EAAE,KAAK;IAChB,MAAM,EAAE,IAAI;IAEZ,wDAAwD;IACxD,UAAU,EAAE,IAAI;IAChB,OAAO,EAAE;QACP,KAAK,EAAE,CAAC;QACR,OAAO,EAAE,KAAK;QACd,KAAK,EAAE,OAAO;QACd,gBAAgB,EAAE,KAAK;QACvB,UAAU,EAAE,EAAE,KAAK,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE;QACvC,WAAW,EAAE,EAAE,UAAU,EAAE,EAAE,EAAE;QAC/B,YAAY,EAAE,CAAC;QACf,gBAAgB,EAAE,IAAI;KACvB;IAED,yDAAyD;IACzD,aAAa,EAAE,IAAI;IACnB,UAAU,EAAE;QACV,KAAK,EAAE,CAAC;QACR,MAAM,EAAE,KAAK;KACd;IAED,uDAAuD;IACvD,UAAU,EAAE,IAAI;IAChB,OAAO,EAAE;QACP,KAAK,EAAE,CAAC;QACR,SAAS,EAAE,KAAK;KACjB;IAED,0CAA0C;IAC1C,MAAM,EAAE,KAAK;IACb,GAAG,EAAE,IAAI;IAET,iDAAiD;IACjD,SAAS,EAAE,IAAI;IACf,MAAM,EAAE;QACN,KAAK,EAAE,CAAC;QACR,OAAO,EAAE;YACP;gBACE,IAAI,EAAE,OAAO;gBACb,MAAM,EAAE,CAAC,OAAO,CAAC;gBACjB,YAAY,EAAE,KAAK;aACpB;SACF;KACF;IAED,4CAA4C;IAC5C,QAAQ,EAAE,KAAK;IACf,KAAK,EAAE,IAAI;IAEX,sDAAsD;IACtD,KAAK,EAAE;QACL,kBAAkB,EAAE,KAAK;KAC1B;IAED,4CAA4C;IAC5C,OAAO,EAAE,KAAK;IAEd,0DAA0D;IAC1D,MAAM,EAAE,KAAK;CACd,CAAC","sourcesContent":["/**\n * @fileoverview Simulated Glasses Hardware Capabilities\n *\n * Capability profile for the Simulated Glasses model.\n * Defines the hardware and software features available on this device.\n * This profile matches the Vuzix Z100 capabilities for testing purposes.\n */\n\nimport type { Capabilities } from \"../hardware\";\n\n/**\n * Simulated Glasses capability profile\n */\nexport const simulatedGlasses: Capabilities = {\n modelName: \"Simulated Glasses\",\n\n // Camera capabilities - does not have a camera\n hasCamera: false,\n camera: null,\n\n // Display capabilities - has a green monochrome display\n hasDisplay: true,\n display: {\n count: 1,\n isColor: false,\n color: \"green\",\n canDisplayBitmap: false,\n resolution: { width: 640, height: 480 },\n fieldOfView: { horizontal: 30 },\n maxTextLines: 7,\n adjustBrightness: true,\n },\n\n // Microphone capabilities - has a microphone (phone mic)\n hasMicrophone: true,\n microphone: {\n count: 1,\n hasVAD: false,\n },\n\n // Speaker capabilities - has a speaker (phone speaker)\n hasSpeaker: true,\n speaker: {\n count: 1,\n isPrivate: false,\n },\n\n // IMU capabilities - does not have an IMU\n hasIMU: false,\n imu: null,\n\n // Button capabilities - Has one simulated button\n hasButton: true,\n button: {\n count: 1,\n buttons: [\n {\n type: \"press\",\n events: [\"press\"],\n isCapacitive: false,\n },\n ],\n },\n\n // Light capabilities - does not have lights\n hasLight: false,\n light: null,\n\n // Power capabilities - does not have external battery\n power: {\n hasExternalBattery: false,\n },\n\n // WiFi capabilities - does not support WiFi\n hasWifi: false,\n\n // OTA capabilities - simulated glasses do not support OTA\n hasOta: false,\n};\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vuzix-z100.d.ts","sourceRoot":"","sources":["../../../src/types/capabilities/vuzix-z100.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAEhD;;GAEG;AACH,eAAO,MAAM,SAAS,EAAE,
|
|
1
|
+
{"version":3,"file":"vuzix-z100.d.ts","sourceRoot":"","sources":["../../../src/types/capabilities/vuzix-z100.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAEhD;;GAEG;AACH,eAAO,MAAM,SAAS,EAAE,YAsDvB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vuzix-z100.js","sourceRoot":"","sources":["../../../src/types/capabilities/vuzix-z100.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH;;GAEG;AACH,MAAM,CAAC,MAAM,SAAS,GAAiB;IACrC,SAAS,EAAE,YAAY;IAEvB,+CAA+C;IAC/C,SAAS,EAAE,KAAK;IAChB,MAAM,EAAE,IAAI;IAEZ,wDAAwD;IACxD,UAAU,EAAE,IAAI;IAChB,OAAO,EAAE;QACP,KAAK,EAAE,CAAC;QACR,OAAO,EAAE,KAAK;QACd,KAAK,EAAE,OAAO;QACd,gBAAgB,EAAE,KAAK;QACvB,UAAU,EAAE,EAAE,KAAK,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE;QACvC,WAAW,EAAE,EAAE,UAAU,EAAE,EAAE,EAAE;QAC/B,YAAY,EAAE,CAAC;QACf,gBAAgB,EAAE,IAAI;QAEtB,4EAA4E;QAC5E,WAAW,EAAE,KAAK;QAClB,gBAAgB,EAAE,CAAC;KACpB;IAED,uDAAuD;IACvD,aAAa,EAAE,KAAK;IACpB,UAAU,EAAE,IAAI;IAEhB,iDAAiD;IACjD,UAAU,EAAE,KAAK;IACjB,OAAO,EAAE,IAAI;IAEb,0CAA0C;IAC1C,MAAM,EAAE,KAAK;IACb,GAAG,EAAE,IAAI;IAET,8CAA8C;IAC9C,SAAS,EAAE,KAAK;IAChB,MAAM,EAAE,IAAI;IAEZ,4CAA4C;IAC5C,QAAQ,EAAE,KAAK;IACf,KAAK,EAAE,IAAI;IAEX,sDAAsD;IACtD,KAAK,EAAE;QACL,kBAAkB,EAAE,KAAK;KAC1B;IAED,4CAA4C;IAC5C,OAAO,EAAE,KAAK;
|
|
1
|
+
{"version":3,"file":"vuzix-z100.js","sourceRoot":"","sources":["../../../src/types/capabilities/vuzix-z100.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH;;GAEG;AACH,MAAM,CAAC,MAAM,SAAS,GAAiB;IACrC,SAAS,EAAE,YAAY;IAEvB,+CAA+C;IAC/C,SAAS,EAAE,KAAK;IAChB,MAAM,EAAE,IAAI;IAEZ,wDAAwD;IACxD,UAAU,EAAE,IAAI;IAChB,OAAO,EAAE;QACP,KAAK,EAAE,CAAC;QACR,OAAO,EAAE,KAAK;QACd,KAAK,EAAE,OAAO;QACd,gBAAgB,EAAE,KAAK;QACvB,UAAU,EAAE,EAAE,KAAK,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE;QACvC,WAAW,EAAE,EAAE,UAAU,EAAE,EAAE,EAAE;QAC/B,YAAY,EAAE,CAAC;QACf,gBAAgB,EAAE,IAAI;QAEtB,4EAA4E;QAC5E,WAAW,EAAE,KAAK;QAClB,gBAAgB,EAAE,CAAC;KACpB;IAED,uDAAuD;IACvD,aAAa,EAAE,KAAK;IACpB,UAAU,EAAE,IAAI;IAEhB,iDAAiD;IACjD,UAAU,EAAE,KAAK;IACjB,OAAO,EAAE,IAAI;IAEb,0CAA0C;IAC1C,MAAM,EAAE,KAAK;IACb,GAAG,EAAE,IAAI;IAET,8CAA8C;IAC9C,SAAS,EAAE,KAAK;IAChB,MAAM,EAAE,IAAI;IAEZ,4CAA4C;IAC5C,QAAQ,EAAE,KAAK;IACf,KAAK,EAAE,IAAI;IAEX,sDAAsD;IACtD,KAAK,EAAE;QACL,kBAAkB,EAAE,KAAK;KAC1B;IAED,4CAA4C;IAC5C,OAAO,EAAE,KAAK;IAEd,8EAA8E;IAC9E,MAAM,EAAE,KAAK;CACd,CAAC","sourcesContent":["/**\n * @fileoverview Vuzix Z100 Hardware Capabilities\n *\n * Capability profile for the Vuzix Z100 smart glasses model.\n * Defines the hardware and software features available on this device.\n */\n\nimport type { Capabilities } from \"../hardware\";\n\n/**\n * Vuzix Z100 capability profile\n */\nexport const vuzixZ100: Capabilities = {\n modelName: \"Vuzix Z100\",\n\n // Camera capabilities - does not have a camera\n hasCamera: false,\n camera: null,\n\n // Display capabilities - has a green monochrome display\n hasDisplay: true,\n display: {\n count: 1,\n isColor: false,\n color: \"green\",\n canDisplayBitmap: false,\n resolution: { width: 640, height: 480 },\n fieldOfView: { horizontal: 30 },\n maxTextLines: 7,\n adjustBrightness: true,\n\n // Scene display API — no positioned elements; scenes degrade to text walls.\n canPosition: false,\n maxImageElements: 0,\n },\n\n // Microphone capabilities - does not have a microphone\n hasMicrophone: false,\n microphone: null,\n\n // Speaker capabilities - does not have a speaker\n hasSpeaker: false,\n speaker: null,\n\n // IMU capabilities - does not have an IMU\n hasIMU: false,\n imu: null,\n\n // Button capabilities - does not have buttons\n hasButton: false,\n button: null,\n\n // Light capabilities - does not have lights\n hasLight: false,\n light: null,\n\n // Power capabilities - does not have external battery\n power: {\n hasExternalBattery: false,\n },\n\n // WiFi capabilities - does not support WiFi\n hasWifi: false,\n\n // OTA capabilities - Z100 firmware updates are not driven by the ASG OTA flow\n hasOta: false,\n};\n"]}
|
package/build/types/enums.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"enums.d.ts","sourceRoot":"","sources":["../../src/types/enums.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,YAAY,EAAE,wBAAwB,EAAC,MAAM,0BAA0B,CAAA;AAE/E,oBAAY,WAAW;IACrB,IAAI,SAAS;IACb,SAAS,sBAAsB;IAC/B,IAAI,SAAS;IACb,EAAE,sBAAsB;IACxB,EAAE,sBAAsB;IACxB,IAAI,gBAAgB;IACpB,KAAK,iBAAiB;IACtB,IAAI,eAAe;IACnB,GAAG,mBAAmB;IACtB,KAAK,oBAAoB;
|
|
1
|
+
{"version":3,"file":"enums.d.ts","sourceRoot":"","sources":["../../src/types/enums.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,YAAY,EAAE,wBAAwB,EAAC,MAAM,0BAA0B,CAAA;AAE/E,oBAAY,WAAW;IACrB,IAAI,SAAS;IACb,SAAS,sBAAsB;IAC/B,IAAI,SAAS;IACb,EAAE,sBAAsB;IACxB,EAAE,sBAAsB;IACxB,IAAI,gBAAgB;IACpB,KAAK,iBAAiB;IACtB,IAAI,eAAe;IACnB,GAAG,mBAAmB;IACtB,KAAK,oBAAoB;IACzB,IAAI,SAAS;CACd;AAED,oBAAY,eAAe;IACzB,EAAE,sBAAsB;CACzB"}
|
package/build/types/enums.js
CHANGED
|
@@ -11,6 +11,7 @@ export var DeviceTypes;
|
|
|
11
11
|
DeviceTypes["Z100"] = "Vuzix Z100";
|
|
12
12
|
DeviceTypes["NEX"] = "Mentra Display";
|
|
13
13
|
DeviceTypes["FRAME"] = "Brilliant Frame";
|
|
14
|
+
DeviceTypes["NIMO"] = "NIMO";
|
|
14
15
|
})(DeviceTypes || (DeviceTypes = {}));
|
|
15
16
|
export var ControllerTypes;
|
|
16
17
|
(function (ControllerTypes) {
|
package/build/types/enums.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"enums.js","sourceRoot":"","sources":["../../src/types/enums.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,YAAY,EAAE,wBAAwB,EAAC,MAAM,0BAA0B,CAAA;AAE/E,MAAM,CAAN,IAAY,
|
|
1
|
+
{"version":3,"file":"enums.js","sourceRoot":"","sources":["../../src/types/enums.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,YAAY,EAAE,wBAAwB,EAAC,MAAM,0BAA0B,CAAA;AAE/E,MAAM,CAAN,IAAY,WAYX;AAZD,WAAY,WAAW;IACrB,4BAAa,CAAA;IACb,8CAA+B,CAAA;IAC/B,4BAAa,CAAA;IACb,uCAAwB,CAAA;IACxB,uCAAwB,CAAA;IACxB,mCAAoB,CAAA;IACpB,qCAAsB,CAAA;IACtB,kCAAmB,CAAA;IACnB,qCAAsB,CAAA;IACtB,wCAAyB,CAAA;IACzB,4BAAa,CAAA;AACf,CAAC,EAZW,WAAW,KAAX,WAAW,QAYtB;AAED,MAAM,CAAN,IAAY,eAEX;AAFD,WAAY,eAAe;IACzB,2CAAwB,CAAA;AAC1B,CAAC,EAFW,eAAe,KAAf,eAAe,QAE1B","sourcesContent":["export {HardwareType, HardwareRequirementLevel} from \"@mentra/miniapp/hardware\"\n\nexport enum DeviceTypes {\n NONE = \"None\",\n SIMULATED = \"Simulated Glasses\",\n AR99 = \"AR99\",\n G1 = \"Even Realities G1\",\n G2 = \"Even Realities G2\",\n LIVE = \"Mentra Live\",\n MACH1 = \"Mentra Mach1\",\n Z100 = \"Vuzix Z100\",\n NEX = \"Mentra Display\",\n FRAME = \"Brilliant Frame\",\n NIMO = \"NIMO\",\n}\n\nexport enum ControllerTypes {\n R1 = \"Even Realities R1\",\n}\n"]}
|
|
@@ -3,6 +3,7 @@ import { evenRealitiesG1 } from "./capabilities/even-realities-g1";
|
|
|
3
3
|
import { evenRealitiesG2 } from "./capabilities/even-realities-g2";
|
|
4
4
|
import { mentraDisplay } from "./capabilities/mentra-display";
|
|
5
5
|
import { mentraLive } from "./capabilities/mentra-live";
|
|
6
|
+
import { nimo } from "./capabilities/nimo";
|
|
6
7
|
import { simulatedGlasses } from "./capabilities/simulated-glasses";
|
|
7
8
|
import { vuzixZ100 } from "./capabilities/vuzix-z100";
|
|
8
9
|
import { DeviceTypes } from "./enums";
|
|
@@ -137,7 +138,7 @@ export interface Capabilities {
|
|
|
137
138
|
light: LightCapabilities | null;
|
|
138
139
|
power: PowerCapabilities;
|
|
139
140
|
hasWifi: boolean;
|
|
140
|
-
hasOta
|
|
141
|
+
hasOta: boolean;
|
|
141
142
|
hasNativeDashboard?: boolean;
|
|
142
143
|
}
|
|
143
144
|
/**
|
|
@@ -147,5 +148,5 @@ export interface Capabilities {
|
|
|
147
148
|
*/
|
|
148
149
|
export declare const HARDWARE_CAPABILITIES: Record<string, Capabilities>;
|
|
149
150
|
export declare const getModelCapabilities: (deviceType: DeviceTypes) => Capabilities;
|
|
150
|
-
export { simulatedGlasses, evenRealitiesG1, evenRealitiesG2, mentraLive, vuzixZ100, mentraDisplay };
|
|
151
|
+
export { simulatedGlasses, evenRealitiesG1, evenRealitiesG2, mentraLive, nimo, vuzixZ100, mentraDisplay };
|
|
151
152
|
//# sourceMappingURL=hardware.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hardware.d.ts","sourceRoot":"","sources":["../../src/types/hardware.ts"],"names":[],"mappings":"AAAA,oDAAoD;AAEpD,OAAO,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAC;AACnE,OAAO,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAC;AACnE,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAC9D,OAAO,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AACxD,OAAO,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AACpE,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAEtD,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAEtC,YAAY,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAEpE;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC,UAAU,CAAC,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC;IAC/C,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,KAAK,EAAE;QACL,SAAS,EAAE,OAAO,CAAC;QACnB,SAAS,EAAE,OAAO,CAAC;QACnB,oBAAoB,CAAC,EAAE,MAAM,EAAE,CAAC;QAChC,oBAAoB,CAAC,EAAE;YAAE,KAAK,EAAE,MAAM,CAAC;YAAC,MAAM,EAAE,MAAM,CAAA;SAAE,EAAE,CAAC;KAC5D,CAAC;CACH;AAED;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,KAA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AAG,IAAI,CAAC;IAGhC,KAAK,EAAE,iBAAiB,CAAC;IAGzB,OAAO,EAAE,OAAO,CAAC;IAGjB,MAAM,EAAE,OAAO,CAAC;IAOhB,kBAAkB,CAAC,EAAE,OAAO,CAAC;CAC9B;AAED;;;;GAIG;AACH,eAAO,MAAM,qBAAqB,EAAE,MAAM,CAAC,MAAM,EAAE,YAAY,CAwB9D,CAAC;AAEF,eAAO,MAAM,oBAAoB,GAAI,YAAY,WAAW,KAAG,YAM9D,CAAC;AAGF,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAE,eAAe,EAAE,UAAU,EAAE,IAAI,EAAE,SAAS,EAAE,aAAa,EAAE,CAAC"}
|
package/build/types/hardware.js
CHANGED
|
@@ -3,6 +3,7 @@ import { evenRealitiesG1 } from "./capabilities/even-realities-g1";
|
|
|
3
3
|
import { evenRealitiesG2 } from "./capabilities/even-realities-g2";
|
|
4
4
|
import { mentraDisplay } from "./capabilities/mentra-display";
|
|
5
5
|
import { mentraLive } from "./capabilities/mentra-live";
|
|
6
|
+
import { nimo } from "./capabilities/nimo";
|
|
6
7
|
import { simulatedGlasses } from "./capabilities/simulated-glasses";
|
|
7
8
|
import { vuzixZ100 } from "./capabilities/vuzix-z100";
|
|
8
9
|
import { none } from "./capabilities/none";
|
|
@@ -19,6 +20,7 @@ export const HARDWARE_CAPABILITIES = {
|
|
|
19
20
|
[mentraLive.modelName]: mentraLive,
|
|
20
21
|
[simulatedGlasses.modelName]: simulatedGlasses,
|
|
21
22
|
[vuzixZ100.modelName]: vuzixZ100,
|
|
23
|
+
[nimo.modelName]: nimo,
|
|
22
24
|
[DeviceTypes.MACH1]: vuzixZ100, // Mach1 uses same Vuzix Ultralite hardware as Z100
|
|
23
25
|
[DeviceTypes.AR99]: {
|
|
24
26
|
...evenRealitiesG1,
|
|
@@ -44,5 +46,5 @@ export const getModelCapabilities = (deviceType) => {
|
|
|
44
46
|
return HARDWARE_CAPABILITIES[modelName];
|
|
45
47
|
};
|
|
46
48
|
// export * from "./capabilities"
|
|
47
|
-
export { simulatedGlasses, evenRealitiesG1, evenRealitiesG2, mentraLive, vuzixZ100, mentraDisplay };
|
|
49
|
+
export { simulatedGlasses, evenRealitiesG1, evenRealitiesG2, mentraLive, nimo, vuzixZ100, mentraDisplay };
|
|
48
50
|
//# sourceMappingURL=hardware.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hardware.js","sourceRoot":"","sources":["../../src/types/hardware.ts"],"names":[],"mappings":"AAAA,oDAAoD;AAEpD,OAAO,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAC;AACnE,OAAO,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAC;AACnE,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAC9D,OAAO,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AACxD,OAAO,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AACpE,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AACtD,OAAO,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAC;AAC3C,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAiKtC;;;;GAIG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAiC;IACjE,CAAC,eAAe,CAAC,SAAS,CAAC,EAAE,eAAe;IAC5C,CAAC,eAAe,CAAC,SAAS,CAAC,EAAE,eAAe;IAC5C,CAAC,aAAa,CAAC,SAAS,CAAC,EAAE,aAAa;IACxC,CAAC,UAAU,CAAC,SAAS,CAAC,EAAE,UAAU;IAClC,CAAC,gBAAgB,CAAC,SAAS,CAAC,EAAE,gBAAgB;IAC9C,CAAC,SAAS,CAAC,SAAS,CAAC,EAAE,SAAS;IAChC,CAAC,WAAW,CAAC,KAAK,CAAC,EAAE,SAAS,EAAE,mDAAmD;IACnF,CAAC,WAAW,CAAC,IAAI,CAAC,EAAE;QAClB,GAAG,eAAe;QAClB,SAAS,EAAE,WAAW,CAAC,IAAI;QAC3B,OAAO,EAAE;YACP,GAAG,eAAe,CAAC,OAAO;YAC1B,gBAAgB,EAAE,KAAK;SACxB;QACD,aAAa,EAAE,IAAI;QACnB,MAAM,EAAE,IAAI;QACZ,UAAU,EAAE;YACV,KAAK,EAAE,CAAC;YACR,MAAM,EAAE,KAAK;SACd;KACF;IACD,CAAC,IAAI,CAAC,SAAS,CAAC,EAAE,IAAI;CACvB,CAAC;AAEF,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,UAAuB,EAAgB,EAAE;IAC5E,MAAM,SAAS,GAAG,UAAoB,CAAC;IACvC,IAAI,CAAC,qBAAqB,CAAC,SAAS,CAAC,EAAE,CAAC;QACtC,OAAO,qBAAqB,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;IACjD,CAAC;IACD,OAAO,qBAAqB,CAAC,SAAS,CAAC,CAAC;AAC1C,CAAC,CAAC;AAEF,iCAAiC;AACjC,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAE,eAAe,EAAE,UAAU,EAAE,SAAS,EAAE,aAAa,EAAE,CAAC","sourcesContent":["/** Hardware capability types used by the Engine. */\n\nimport { evenRealitiesG1 } from \"./capabilities/even-realities-g1\";\nimport { evenRealitiesG2 } from \"./capabilities/even-realities-g2\";\nimport { mentraDisplay } from \"./capabilities/mentra-display\";\nimport { mentraLive } from \"./capabilities/mentra-live\";\nimport { simulatedGlasses } from \"./capabilities/simulated-glasses\";\nimport { vuzixZ100 } from \"./capabilities/vuzix-z100\";\nimport { none } from \"./capabilities/none\";\nimport { DeviceTypes } from \"./enums\";\n\nexport type { HardwareRequirement } from \"@mentra/miniapp/hardware\";\n\n/**\n * Camera capabilities\n */\nexport interface CameraCapabilities {\n resolution?: { width: number; height: number };\n hasHDR?: boolean;\n hasFocus?: boolean;\n video: {\n canRecord: boolean;\n canStream: boolean;\n supportedStreamTypes?: string[];\n supportedResolutions?: { width: number; height: number }[];\n };\n}\n\n/**\n * Display capabilities\n */\nexport interface DisplayCapabilities {\n count?: number;\n isColor?: boolean;\n color?: string; // e.g., \"green\", \"full_color\", \"pallet\"\n canDisplayBitmap?: boolean;\n resolution?: { width: number; height: number };\n fieldOfView?: { horizontal?: number; vertical?: number };\n maxTextLines?: number;\n adjustBrightness?: boolean;\n\n // --- Scene display API (display.render()) — typed capabilities ---\n // Pure DATA the host scene pipeline acts on generically; a device without\n // canPosition renders scenes via the host degrade path instead.\n /** Public drawable canvas in px — the raw coordinate space for render() boxes. */\n width?: number;\n height?: number;\n /** True ⇒ the device renders positioned elements (containers / canvas components). */\n canPosition?: boolean;\n /** Element budgets. Rects share the text pool on container-based devices. */\n maxTextElements?: number;\n maxImageElements?: number;\n /** Per-image dimension cap (box-level), when the firmware has one. */\n maxImagePx?: { width: number; height: number };\n shapes?: \"rect\"[];\n intensityLevels?: number;\n partialUpdate?: boolean;\n}\n\n/**\n * Microphone capabilities\n */\nexport interface MicrophoneCapabilities {\n count?: number;\n hasVAD?: boolean; // Voice Activity Detection\n}\n\n/**\n * Speaker capabilities\n */\nexport interface SpeakerCapabilities {\n count?: number;\n isPrivate?: boolean; // e.g., bone conduction\n}\n\n/**\n * IMU (Inertial Measurement Unit) capabilities\n */\nexport interface IMUCapabilities {\n axisCount?: number;\n hasAccelerometer?: boolean;\n hasCompass?: boolean;\n hasGyroscope?: boolean;\n}\n\n/**\n * Button capabilities\n */\nexport interface ButtonCapabilities {\n count?: number;\n buttons?: {\n type: \"press\" | \"swipe1d\" | \"swipe2d\";\n events: string[]; // e.g., \"press\", \"double_press\", \"long_press\", \"swipe_up\", \"swipe_down\"\n isCapacitive?: boolean;\n }[];\n}\n\n/**\n * Light capabilities\n */\nexport interface LightCapabilities {\n count?: number;\n lights?: {\n id: string; // Unique identifier for the LED (e.g., \"privacy\", \"user_feedback\")\n purpose: \"privacy\" | \"user_feedback\" | \"general\"; // LED purpose/function\n isFullColor: boolean;\n color?: string; // e.g., \"white\", \"rgb\"\n position?: \"front_facing\" | \"user_facing\" | \"side\" | \"unknown\"; // LED physical position\n }[];\n}\n\n/**\n * Power capabilities\n */\nexport interface PowerCapabilities {\n hasExternalBattery: boolean; // e.g., a case or puck\n}\n\n/**\n * Device hardware capabilities\n * Complete information about what hardware a device has\n */\nexport interface Capabilities {\n modelName: string;\n\n // Camera capabilities\n hasCamera: boolean;\n camera: CameraCapabilities | null;\n\n // Display capabilities\n hasDisplay: boolean;\n display: DisplayCapabilities | null;\n\n // Microphone capabilities\n hasMicrophone: boolean;\n microphone: MicrophoneCapabilities | null;\n\n // Speaker capabilities\n hasSpeaker: boolean;\n speaker: SpeakerCapabilities | null;\n\n // IMU capabilities\n hasIMU: boolean;\n imu: IMUCapabilities | null;\n\n // Button capabilities\n hasButton: boolean;\n button: ButtonCapabilities | null;\n\n // Light capabilities\n hasLight: boolean;\n light: LightCapabilities | null;\n\n // Power capabilities\n power: PowerCapabilities;\n\n // WiFi capability\n hasWifi: boolean;\n\n // OTA capability\n hasOta
|
|
1
|
+
{"version":3,"file":"hardware.js","sourceRoot":"","sources":["../../src/types/hardware.ts"],"names":[],"mappings":"AAAA,oDAAoD;AAEpD,OAAO,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAC;AACnE,OAAO,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAC;AACnE,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAC9D,OAAO,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AACxD,OAAO,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAC;AAC3C,OAAO,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AACpE,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AACtD,OAAO,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAC;AAC3C,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAiKtC;;;;GAIG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAiC;IACjE,CAAC,eAAe,CAAC,SAAS,CAAC,EAAE,eAAe;IAC5C,CAAC,eAAe,CAAC,SAAS,CAAC,EAAE,eAAe;IAC5C,CAAC,aAAa,CAAC,SAAS,CAAC,EAAE,aAAa;IACxC,CAAC,UAAU,CAAC,SAAS,CAAC,EAAE,UAAU;IAClC,CAAC,gBAAgB,CAAC,SAAS,CAAC,EAAE,gBAAgB;IAC9C,CAAC,SAAS,CAAC,SAAS,CAAC,EAAE,SAAS;IAChC,CAAC,IAAI,CAAC,SAAS,CAAC,EAAE,IAAI;IACtB,CAAC,WAAW,CAAC,KAAK,CAAC,EAAE,SAAS,EAAE,mDAAmD;IACnF,CAAC,WAAW,CAAC,IAAI,CAAC,EAAE;QAClB,GAAG,eAAe;QAClB,SAAS,EAAE,WAAW,CAAC,IAAI;QAC3B,OAAO,EAAE;YACP,GAAG,eAAe,CAAC,OAAO;YAC1B,gBAAgB,EAAE,KAAK;SACxB;QACD,aAAa,EAAE,IAAI;QACnB,MAAM,EAAE,IAAI;QACZ,UAAU,EAAE;YACV,KAAK,EAAE,CAAC;YACR,MAAM,EAAE,KAAK;SACd;KACF;IACD,CAAC,IAAI,CAAC,SAAS,CAAC,EAAE,IAAI;CACvB,CAAC;AAEF,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,UAAuB,EAAgB,EAAE;IAC5E,MAAM,SAAS,GAAG,UAAoB,CAAC;IACvC,IAAI,CAAC,qBAAqB,CAAC,SAAS,CAAC,EAAE,CAAC;QACtC,OAAO,qBAAqB,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;IACjD,CAAC;IACD,OAAO,qBAAqB,CAAC,SAAS,CAAC,CAAC;AAC1C,CAAC,CAAC;AAEF,iCAAiC;AACjC,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAE,eAAe,EAAE,UAAU,EAAE,IAAI,EAAE,SAAS,EAAE,aAAa,EAAE,CAAC","sourcesContent":["/** Hardware capability types used by the Engine. */\n\nimport { evenRealitiesG1 } from \"./capabilities/even-realities-g1\";\nimport { evenRealitiesG2 } from \"./capabilities/even-realities-g2\";\nimport { mentraDisplay } from \"./capabilities/mentra-display\";\nimport { mentraLive } from \"./capabilities/mentra-live\";\nimport { nimo } from \"./capabilities/nimo\";\nimport { simulatedGlasses } from \"./capabilities/simulated-glasses\";\nimport { vuzixZ100 } from \"./capabilities/vuzix-z100\";\nimport { none } from \"./capabilities/none\";\nimport { DeviceTypes } from \"./enums\";\n\nexport type { HardwareRequirement } from \"@mentra/miniapp/hardware\";\n\n/**\n * Camera capabilities\n */\nexport interface CameraCapabilities {\n resolution?: { width: number; height: number };\n hasHDR?: boolean;\n hasFocus?: boolean;\n video: {\n canRecord: boolean;\n canStream: boolean;\n supportedStreamTypes?: string[];\n supportedResolutions?: { width: number; height: number }[];\n };\n}\n\n/**\n * Display capabilities\n */\nexport interface DisplayCapabilities {\n count?: number;\n isColor?: boolean;\n color?: string; // e.g., \"green\", \"full_color\", \"pallet\"\n canDisplayBitmap?: boolean;\n resolution?: { width: number; height: number };\n fieldOfView?: { horizontal?: number; vertical?: number };\n maxTextLines?: number;\n adjustBrightness?: boolean;\n\n // --- Scene display API (display.render()) — typed capabilities ---\n // Pure DATA the host scene pipeline acts on generically; a device without\n // canPosition renders scenes via the host degrade path instead.\n /** Public drawable canvas in px — the raw coordinate space for render() boxes. */\n width?: number;\n height?: number;\n /** True ⇒ the device renders positioned elements (containers / canvas components). */\n canPosition?: boolean;\n /** Element budgets. Rects share the text pool on container-based devices. */\n maxTextElements?: number;\n maxImageElements?: number;\n /** Per-image dimension cap (box-level), when the firmware has one. */\n maxImagePx?: { width: number; height: number };\n shapes?: \"rect\"[];\n intensityLevels?: number;\n partialUpdate?: boolean;\n}\n\n/**\n * Microphone capabilities\n */\nexport interface MicrophoneCapabilities {\n count?: number;\n hasVAD?: boolean; // Voice Activity Detection\n}\n\n/**\n * Speaker capabilities\n */\nexport interface SpeakerCapabilities {\n count?: number;\n isPrivate?: boolean; // e.g., bone conduction\n}\n\n/**\n * IMU (Inertial Measurement Unit) capabilities\n */\nexport interface IMUCapabilities {\n axisCount?: number;\n hasAccelerometer?: boolean;\n hasCompass?: boolean;\n hasGyroscope?: boolean;\n}\n\n/**\n * Button capabilities\n */\nexport interface ButtonCapabilities {\n count?: number;\n buttons?: {\n type: \"press\" | \"swipe1d\" | \"swipe2d\";\n events: string[]; // e.g., \"press\", \"double_press\", \"long_press\", \"swipe_up\", \"swipe_down\"\n isCapacitive?: boolean;\n }[];\n}\n\n/**\n * Light capabilities\n */\nexport interface LightCapabilities {\n count?: number;\n lights?: {\n id: string; // Unique identifier for the LED (e.g., \"privacy\", \"user_feedback\")\n purpose: \"privacy\" | \"user_feedback\" | \"general\"; // LED purpose/function\n isFullColor: boolean;\n color?: string; // e.g., \"white\", \"rgb\"\n position?: \"front_facing\" | \"user_facing\" | \"side\" | \"unknown\"; // LED physical position\n }[];\n}\n\n/**\n * Power capabilities\n */\nexport interface PowerCapabilities {\n hasExternalBattery: boolean; // e.g., a case or puck\n}\n\n/**\n * Device hardware capabilities\n * Complete information about what hardware a device has\n */\nexport interface Capabilities {\n modelName: string;\n\n // Camera capabilities\n hasCamera: boolean;\n camera: CameraCapabilities | null;\n\n // Display capabilities\n hasDisplay: boolean;\n display: DisplayCapabilities | null;\n\n // Microphone capabilities\n hasMicrophone: boolean;\n microphone: MicrophoneCapabilities | null;\n\n // Speaker capabilities\n hasSpeaker: boolean;\n speaker: SpeakerCapabilities | null;\n\n // IMU capabilities\n hasIMU: boolean;\n imu: IMUCapabilities | null;\n\n // Button capabilities\n hasButton: boolean;\n button: ButtonCapabilities | null;\n\n // Light capabilities\n hasLight: boolean;\n light: LightCapabilities | null;\n\n // Power capabilities\n power: PowerCapabilities;\n\n // WiFi capability\n hasWifi: boolean;\n\n // OTA capability\n hasOta: boolean;\n\n // Native dashboard capability\n // True when the device renders its own dashboard in firmware (e.g. Even\n // Realities' built-in dashboard on G2). MentraOS does not manage or expose\n // dashboard settings for these devices. Absent/false means MentraOS owns the\n // dashboard.\n hasNativeDashboard?: boolean;\n}\n\n/**\n * Hardware capability profiles for supported glasses models\n * Key: model_name string (e.g., \"Even Realities G1\", \"Mentra Live\")\n * Value: Capabilities object defining device features\n */\nexport const HARDWARE_CAPABILITIES: Record<string, Capabilities> = {\n [evenRealitiesG1.modelName]: evenRealitiesG1,\n [evenRealitiesG2.modelName]: evenRealitiesG2,\n [mentraDisplay.modelName]: mentraDisplay,\n [mentraLive.modelName]: mentraLive,\n [simulatedGlasses.modelName]: simulatedGlasses,\n [vuzixZ100.modelName]: vuzixZ100,\n [nimo.modelName]: nimo,\n [DeviceTypes.MACH1]: vuzixZ100, // Mach1 uses same Vuzix Ultralite hardware as Z100\n [DeviceTypes.AR99]: {\n ...evenRealitiesG1,\n modelName: DeviceTypes.AR99,\n display: {\n ...evenRealitiesG1.display,\n canDisplayBitmap: false,\n },\n hasMicrophone: true,\n hasOta: true,\n microphone: {\n count: 1,\n hasVAD: false,\n },\n },\n [none.modelName]: none,\n};\n\nexport const getModelCapabilities = (deviceType: DeviceTypes): Capabilities => {\n const modelName = deviceType as string;\n if (!HARDWARE_CAPABILITIES[modelName]) {\n return HARDWARE_CAPABILITIES[DeviceTypes.NONE];\n }\n return HARDWARE_CAPABILITIES[modelName];\n};\n\n// export * from \"./capabilities\"\nexport { simulatedGlasses, evenRealitiesG1, evenRealitiesG2, mentraLive, nimo, vuzixZ100, mentraDisplay };\n"]}
|
package/build/types/index.d.ts
CHANGED
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
* are re-exported from @mentra/miniapp, their canonical owner. */
|
|
3
3
|
export { HardwareType, HardwareRequirementLevel, DeviceTypes, ControllerTypes } from "./enums";
|
|
4
4
|
export type { HardwareRequirement, CameraCapabilities, DisplayCapabilities, MicrophoneCapabilities, SpeakerCapabilities, IMUCapabilities, ButtonCapabilities, LightCapabilities, PowerCapabilities, Capabilities, } from "./hardware";
|
|
5
|
-
export { HARDWARE_CAPABILITIES, getModelCapabilities, simulatedGlasses, evenRealitiesG1, evenRealitiesG2, mentraLive, vuzixZ100, mentraDisplay, } from "./hardware";
|
|
5
|
+
export { HARDWARE_CAPABILITIES, getModelCapabilities, simulatedGlasses, evenRealitiesG1, evenRealitiesG2, mentraLive, nimo, vuzixZ100, mentraDisplay, } from "./hardware";
|
|
6
6
|
export type { AppletType, AppPermissionType, AppletPermission, AppletInterface, ClientApp } from "./applet";
|
|
7
7
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA;kEACkE;AAGlE,OAAO,EAAC,YAAY,EAAE,wBAAwB,EAAE,WAAW,EAAE,eAAe,EAAC,MAAM,SAAS,CAAA;AAG5F,YAAY,EACV,mBAAmB,EACnB,kBAAkB,EAClB,mBAAmB,EACnB,sBAAsB,EACtB,mBAAmB,EACnB,eAAe,EACf,kBAAkB,EAClB,iBAAiB,EACjB,iBAAiB,EACjB,YAAY,GACb,MAAM,YAAY,CAAA;AAEnB,OAAO,EACL,qBAAqB,EACrB,oBAAoB,EACpB,gBAAgB,EAChB,eAAe,EACf,eAAe,EACf,UAAU,EACV,SAAS,EACT,aAAa,GACd,MAAM,YAAY,CAAA;AAGnB,YAAY,EAAC,UAAU,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,eAAe,EAAE,SAAS,EAAC,MAAM,UAAU,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA;kEACkE;AAGlE,OAAO,EAAC,YAAY,EAAE,wBAAwB,EAAE,WAAW,EAAE,eAAe,EAAC,MAAM,SAAS,CAAA;AAG5F,YAAY,EACV,mBAAmB,EACnB,kBAAkB,EAClB,mBAAmB,EACnB,sBAAsB,EACtB,mBAAmB,EACnB,eAAe,EACf,kBAAkB,EAClB,iBAAiB,EACjB,iBAAiB,EACjB,YAAY,GACb,MAAM,YAAY,CAAA;AAEnB,OAAO,EACL,qBAAqB,EACrB,oBAAoB,EACpB,gBAAgB,EAChB,eAAe,EACf,eAAe,EACf,UAAU,EACV,IAAI,EACJ,SAAS,EACT,aAAa,GACd,MAAM,YAAY,CAAA;AAGnB,YAAY,EAAC,UAAU,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,eAAe,EAAE,SAAS,EAAC,MAAM,UAAU,CAAA"}
|
package/build/types/index.js
CHANGED
|
@@ -2,5 +2,5 @@
|
|
|
2
2
|
* are re-exported from @mentra/miniapp, their canonical owner. */
|
|
3
3
|
// Enums (runtime values)
|
|
4
4
|
export { HardwareType, HardwareRequirementLevel, DeviceTypes, ControllerTypes } from "./enums";
|
|
5
|
-
export { HARDWARE_CAPABILITIES, getModelCapabilities, simulatedGlasses, evenRealitiesG1, evenRealitiesG2, mentraLive, vuzixZ100, mentraDisplay, } from "./hardware";
|
|
5
|
+
export { HARDWARE_CAPABILITIES, getModelCapabilities, simulatedGlasses, evenRealitiesG1, evenRealitiesG2, mentraLive, nimo, vuzixZ100, mentraDisplay, } from "./hardware";
|
|
6
6
|
//# sourceMappingURL=index.js.map
|
package/build/types/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA;kEACkE;AAElE,yBAAyB;AACzB,OAAO,EAAC,YAAY,EAAE,wBAAwB,EAAE,WAAW,EAAE,eAAe,EAAC,MAAM,SAAS,CAAA;AAgB5F,OAAO,EACL,qBAAqB,EACrB,oBAAoB,EACpB,gBAAgB,EAChB,eAAe,EACf,eAAe,EACf,UAAU,EACV,SAAS,EACT,aAAa,GACd,MAAM,YAAY,CAAA","sourcesContent":["/** Engine capability types and profiles. Miniapp manifest requirement types\n * are re-exported from @mentra/miniapp, their canonical owner. */\n\n// Enums (runtime values)\nexport {HardwareType, HardwareRequirementLevel, DeviceTypes, ControllerTypes} from \"./enums\"\n\n// Hardware types\nexport type {\n HardwareRequirement,\n CameraCapabilities,\n DisplayCapabilities,\n MicrophoneCapabilities,\n SpeakerCapabilities,\n IMUCapabilities,\n ButtonCapabilities,\n LightCapabilities,\n PowerCapabilities,\n Capabilities,\n} from \"./hardware\"\n\nexport {\n HARDWARE_CAPABILITIES,\n getModelCapabilities,\n simulatedGlasses,\n evenRealitiesG1,\n evenRealitiesG2,\n mentraLive,\n vuzixZ100,\n mentraDisplay,\n} from \"./hardware\"\n\n// Applet types\nexport type {AppletType, AppPermissionType, AppletPermission, AppletInterface, ClientApp} from \"./applet\"\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA;kEACkE;AAElE,yBAAyB;AACzB,OAAO,EAAC,YAAY,EAAE,wBAAwB,EAAE,WAAW,EAAE,eAAe,EAAC,MAAM,SAAS,CAAA;AAgB5F,OAAO,EACL,qBAAqB,EACrB,oBAAoB,EACpB,gBAAgB,EAChB,eAAe,EACf,eAAe,EACf,UAAU,EACV,IAAI,EACJ,SAAS,EACT,aAAa,GACd,MAAM,YAAY,CAAA","sourcesContent":["/** Engine capability types and profiles. Miniapp manifest requirement types\n * are re-exported from @mentra/miniapp, their canonical owner. */\n\n// Enums (runtime values)\nexport {HardwareType, HardwareRequirementLevel, DeviceTypes, ControllerTypes} from \"./enums\"\n\n// Hardware types\nexport type {\n HardwareRequirement,\n CameraCapabilities,\n DisplayCapabilities,\n MicrophoneCapabilities,\n SpeakerCapabilities,\n IMUCapabilities,\n ButtonCapabilities,\n LightCapabilities,\n PowerCapabilities,\n Capabilities,\n} from \"./hardware\"\n\nexport {\n HARDWARE_CAPABILITIES,\n getModelCapabilities,\n simulatedGlasses,\n evenRealitiesG1,\n evenRealitiesG2,\n mentraLive,\n nimo,\n vuzixZ100,\n mentraDisplay,\n} from \"./hardware\"\n\n// Applet types\nexport type {AppletType, AppPermissionType, AppletPermission, AppletInterface, ClientApp} from \"./applet\"\n"]}
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
* 2. Merges columns line-by-line with pixel-precise space padding
|
|
12
12
|
* 3. Returns a single pre-composed string ready for native to chunk & send
|
|
13
13
|
*
|
|
14
|
-
* @see
|
|
14
|
+
* @see notes/miniapp-display-api-redesign.md for the current display design
|
|
15
15
|
*/
|
|
16
16
|
import type { DisplayProfile } from "../profiles/types";
|
|
17
17
|
import type { BreakMode } from "../wrapper/types";
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
* 2. Merges columns line-by-line with pixel-precise space padding
|
|
12
12
|
* 3. Returns a single pre-composed string ready for native to chunk & send
|
|
13
13
|
*
|
|
14
|
-
* @see
|
|
14
|
+
* @see notes/miniapp-display-api-redesign.md for the current display design
|
|
15
15
|
*/
|
|
16
16
|
import { TextMeasurer } from "../measurer/TextMeasurer";
|
|
17
17
|
import { TextWrapper } from "../wrapper/TextWrapper";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ColumnComposer.js","sourceRoot":"","sources":["../../../../src/utils/display/composer/ColumnComposer.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AACxD,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AA+CrD,gFAAgF;AAChF,uBAAuB;AACvB,gFAAgF;AAEhF;;;;;;;;;GASG;AACH,MAAM,OAAO,cAAc;IACjB,OAAO,CAAiB;IACxB,QAAQ,CAAe;IACvB,OAAO,CAAc;IACrB,YAAY,CAAS;IAE7B,YAAY,OAAuB,EAAE,YAAuB,qBAAqB;QAC/E,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,QAAQ,GAAG,IAAI,YAAY,CAAC,OAAO,CAAC,CAAC;QAC1C,IAAI,CAAC,OAAO,GAAG,IAAI,WAAW,CAAC,IAAI,CAAC,QAAQ,EAAE;YAC5C,SAAS;SACV,CAAC,CAAC;QAEH,+CAA+C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CAAC,EAAE,IAAI,CAAC,KAAK,CAAC,YAAY,GAAG,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC;QAEzE,yDAAyD;QACzD,OAAO,IAAI,CAAC,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAC/B,CAAC;IAED;;;OAGG;IACK,aAAa,CAAC,IAAY;QAChC,OAAO,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,EAAE,CAAC,CAAC;IACrC,CAAC;CACF;AAED,gFAAgF;AAChF,mBAAmB;AACnB,gFAAgF;AAEhF;;;;;;GAMG;AACH,MAAM,UAAU,oBAAoB,CAAC,OAAuB,EAAE,YAAuB,MAAM;IACzF,OAAO,IAAI,cAAc,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC;AAChD,CAAC","sourcesContent":["/**\n * ColumnComposer\n *\n * Handles composition of multi-column layouts like double_text_wall.\n * This is the single source of truth for column layout logic, replacing\n * the duplicate implementations in native iOS (G1Text.swift) and\n * Android (G1Text.kt, G1.java).\n *\n * The composer:\n * 1. Wraps each column's text to its allocated width\n * 2. Merges columns line-by-line with pixel-precise space padding\n * 3. Returns a single pre-composed string ready for native to chunk & send\n *\n * @see cloud/issues/026-mobile-display-processor for design docs\n */\n\nimport type { DisplayProfile } from \"../profiles/types\";\nimport { TextMeasurer } from \"../measurer/TextMeasurer\";\nimport { TextWrapper } from \"../wrapper/TextWrapper\";\nimport type { WrapOptions, BreakMode } from \"../wrapper/types\";\n\n// =============================================================================\n// Types\n// =============================================================================\n\n/**\n * Configuration for column layout\n */\nexport interface ColumnConfig {\n /** Width of the left column in pixels */\n leftColumnWidthPx: number;\n /** X position where the right column starts in pixels */\n rightColumnStartPx: number;\n /** Width of the right column in pixels (calculated from start position) */\n rightColumnWidthPx: number;\n /** Maximum number of lines to display */\n maxLines: number;\n /** Left margin in spaces (for indentation) */\n leftMarginSpaces?: number;\n}\n\n/**\n * Options for composing double text wall\n */\nexport interface ComposeOptions {\n /** Break mode for text wrapping */\n breakMode?: BreakMode;\n /** Custom column configuration (overrides profile defaults) */\n columnConfig?: Partial<ColumnConfig>;\n}\n\n/**\n * Result of column composition\n */\nexport interface ComposeResult {\n /** The fully composed text with both columns merged */\n composedText: string;\n /** Lines from the left column (for debugging/preview) */\n leftLines: string[];\n /** Lines from the right column (for debugging/preview) */\n rightLines: string[];\n /** The column configuration that was used */\n config: ColumnConfig;\n}\n\n// =============================================================================\n// ColumnComposer Class\n// =============================================================================\n\n/**\n * Composes multi-column layouts for smart glasses displays.\n *\n * Usage:\n * ```typescript\n * const composer = new ColumnComposer(G1_PROFILE)\n * const result = composer.composeDoubleTextWall(\"Left content\", \"Right content\")\n * // result.composedText is ready to send to native SGC\n * ```\n */\nexport class ColumnComposer {\n private profile: DisplayProfile;\n private measurer: TextMeasurer;\n private wrapper: TextWrapper;\n private spaceWidthPx: number;\n\n constructor(profile: DisplayProfile, breakMode: BreakMode = \"character-no-hyphen\") {\n this.profile = profile;\n this.measurer = new TextMeasurer(profile);\n this.wrapper = new TextWrapper(this.measurer, {\n breakMode,\n });\n\n // Cache space width for alignment calculations\n this.spaceWidthPx = this.measurer.measureText(\" \");\n }\n\n // ===========================================================================\n // Public API\n // ===========================================================================\n\n /**\n * Compose a double text wall layout.\n *\n * Takes left and right text, wraps each to their column width,\n * and merges them with pixel-precise space alignment.\n *\n * @param leftText - Text for the left column\n * @param rightText - Text for the right column\n * @param options - Optional composition settings\n * @returns Composed result with merged text and metadata\n */\n public composeDoubleTextWall(leftText: string, rightText: string, options: ComposeOptions = {}): ComposeResult {\n const config = this.getColumnConfig(options.columnConfig);\n\n // Wrap each column independently\n const leftWrapOptions: WrapOptions = {\n maxWidthPx: config.leftColumnWidthPx,\n maxLines: config.maxLines,\n };\n\n const rightWrapOptions: WrapOptions = {\n maxWidthPx: config.rightColumnWidthPx,\n maxLines: config.maxLines,\n };\n\n const leftResult = this.wrapper.wrap(leftText || \"\", leftWrapOptions);\n const rightResult = this.wrapper.wrap(rightText || \"\", rightWrapOptions);\n\n // Pad arrays to have exactly maxLines entries\n const leftLines = this.padLines(leftResult.lines, config.maxLines);\n const rightLines = this.padLines(rightResult.lines, config.maxLines);\n\n // Merge columns with space alignment\n const composedText = this.mergeColumns(leftLines, rightLines, config);\n\n return {\n composedText,\n leftLines,\n rightLines,\n config,\n };\n }\n\n /**\n * Get the default column configuration for the current profile.\n */\n public getDefaultColumnConfig(): ColumnConfig {\n return this.getColumnConfig();\n }\n\n /**\n * Update the break mode for text wrapping.\n */\n public setBreakMode(breakMode: BreakMode): void {\n this.wrapper = new TextWrapper(this.measurer, {\n breakMode,\n });\n }\n\n // ===========================================================================\n // Private Methods\n // ===========================================================================\n\n /**\n * Get column configuration, merging defaults with overrides.\n */\n private getColumnConfig(overrides?: Partial<ColumnConfig>): ColumnConfig {\n const displayWidth = this.profile.displayWidthPx;\n\n // Default layout: 50% for left column, right starts at 55%\n // This matches the native G1Text implementations\n const defaults: ColumnConfig = {\n leftColumnWidthPx: Math.floor(displayWidth * 0.5),\n rightColumnStartPx: Math.floor(displayWidth * 0.55),\n rightColumnWidthPx: displayWidth - Math.floor(displayWidth * 0.55),\n maxLines: this.profile.maxLines,\n leftMarginSpaces: 0,\n };\n\n return {\n ...defaults,\n ...overrides,\n };\n }\n\n /**\n * Pad lines array to exactly `count` entries.\n */\n private padLines(lines: string[], count: number): string[] {\n const result = [...lines];\n while (result.length < count) {\n result.push(\"\");\n }\n return result.slice(0, count);\n }\n\n /**\n * Merge left and right columns with pixel-precise space alignment.\n *\n * For each line:\n * 1. Take the left column text\n * 2. Calculate its pixel width\n * 3. Calculate how many spaces needed to reach rightColumnStartPx\n * 4. Append spaces and right column text\n */\n private mergeColumns(leftLines: string[], rightLines: string[], config: ColumnConfig): string {\n const lines: string[] = [];\n\n for (let i = 0; i < config.maxLines; i++) {\n const leftText = this.cleanEnspaces(leftLines[i] || \"\");\n const rightText = this.cleanEnspaces(rightLines[i] || \"\");\n\n // Calculate pixel width of left text\n const leftWidthPx = this.measurer.measureText(leftText);\n\n // Calculate spaces needed to reach the right column start\n const spacesNeeded = this.calculateSpacesForAlignment(leftWidthPx, config.rightColumnStartPx);\n\n // Build the merged line\n let line = \"\";\n\n // Add left margin if configured\n if (config.leftMarginSpaces && config.leftMarginSpaces > 0) {\n line += \" \".repeat(config.leftMarginSpaces);\n }\n\n line += leftText;\n line += \" \".repeat(spacesNeeded);\n line += rightText;\n\n lines.push(line);\n }\n\n return lines.join(\"\\n\");\n }\n\n /**\n * Calculate the number of spaces needed to align to a target position.\n *\n * @param currentWidthPx - Current position in pixels\n * @param targetPositionPx - Target position in pixels\n * @returns Number of space characters needed\n */\n private calculateSpacesForAlignment(currentWidthPx: number, targetPositionPx: number): number {\n const pixelsNeeded = targetPositionPx - currentWidthPx;\n\n // Ensure at least one space for separation\n if (pixelsNeeded <= 0) {\n return 1;\n }\n\n // Calculate spaces needed. Use Math.floor (not Math.ceil) to ensure the\n // right column never starts past rightColumnStartPx. Rounding up caused\n // the right column to start 1–5px further right than planned, shrinking\n // its usable width and causing the last character to wrap onto the next\n // line's left position.\n const spaces = Math.max(1, Math.floor(pixelsNeeded / this.spaceWidthPx));\n\n // Cap at a reasonable maximum to prevent runaway spacing\n return Math.min(spaces, 100);\n }\n\n /**\n * Remove en-space characters (U+2002) that may have been added during wrapping.\n * Native implementations do this cleanup before merging.\n */\n private cleanEnspaces(text: string): string {\n return text.replace(/\\u2002/g, \"\");\n }\n}\n\n// =============================================================================\n// Factory Function\n// =============================================================================\n\n/**\n * Create a ColumnComposer for a given profile.\n *\n * @param profile - Display profile to use\n * @param breakMode - Break mode for text wrapping (default: \"word\")\n * @returns Configured ColumnComposer instance\n */\nexport function createColumnComposer(profile: DisplayProfile, breakMode: BreakMode = \"word\"): ColumnComposer {\n return new ColumnComposer(profile, breakMode);\n}\n"]}
|
|
1
|
+
{"version":3,"file":"ColumnComposer.js","sourceRoot":"","sources":["../../../../src/utils/display/composer/ColumnComposer.ts"],"names":[],"mappings":"AAAA;;;;;;;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QAAQ,CAAC;YACjB,IAAI,IAAI,GAAG,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC;YACjC,IAAI,IAAI,SAAS,CAAC;YAElB,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACnB,CAAC;QAED,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC1B,CAAC;IAED;;;;;;OAMG;IACK,2BAA2B,CAAC,cAAsB,EAAE,gBAAwB;QAClF,MAAM,YAAY,GAAG,gBAAgB,GAAG,cAAc,CAAC;QAEvD,2CAA2C;QAC3C,IAAI,YAAY,IAAI,CAAC,EAAE,CAAC;YACtB,OAAO,CAAC,CAAC;QACX,CAAC;QAED,wEAAwE;QACxE,wEAAwE;QACxE,wEAAwE;QACxE,wEAAwE;QACxE,wBAAwB;QACxB,MAAM,MAAM,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,KAAK,CAAC,YAAY,GAAG,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC;QAEzE,yDAAyD;QACzD,OAAO,IAAI,CAAC,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAC/B,CAAC;IAED;;;OAGG;IACK,aAAa,CAAC,IAAY;QAChC,OAAO,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,EAAE,CAAC,CAAC;IACrC,CAAC;CACF;AAED,gFAAgF;AAChF,mBAAmB;AACnB,gFAAgF;AAEhF;;;;;;GAMG;AACH,MAAM,UAAU,oBAAoB,CAAC,OAAuB,EAAE,YAAuB,MAAM;IACzF,OAAO,IAAI,cAAc,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC;AAChD,CAAC","sourcesContent":["/**\n * ColumnComposer\n *\n * Handles composition of multi-column layouts like double_text_wall.\n * This is the single source of truth for column layout logic, replacing\n * the duplicate implementations in native iOS (G1Text.swift) and\n * Android (G1Text.kt, G1.java).\n *\n * The composer:\n * 1. Wraps each column's text to its allocated width\n * 2. Merges columns line-by-line with pixel-precise space padding\n * 3. Returns a single pre-composed string ready for native to chunk & send\n *\n * @see notes/miniapp-display-api-redesign.md for the current display design\n */\n\nimport type { DisplayProfile } from \"../profiles/types\";\nimport { TextMeasurer } from \"../measurer/TextMeasurer\";\nimport { TextWrapper } from \"../wrapper/TextWrapper\";\nimport type { WrapOptions, BreakMode } from \"../wrapper/types\";\n\n// =============================================================================\n// Types\n// =============================================================================\n\n/**\n * Configuration for column layout\n */\nexport interface ColumnConfig {\n /** Width of the left column in pixels */\n leftColumnWidthPx: number;\n /** X position where the right column starts in pixels */\n rightColumnStartPx: number;\n /** Width of the right column in pixels (calculated from start position) */\n rightColumnWidthPx: number;\n /** Maximum number of lines to display */\n maxLines: number;\n /** Left margin in spaces (for indentation) */\n leftMarginSpaces?: number;\n}\n\n/**\n * Options for composing double text wall\n */\nexport interface ComposeOptions {\n /** Break mode for text wrapping */\n breakMode?: BreakMode;\n /** Custom column configuration (overrides profile defaults) */\n columnConfig?: Partial<ColumnConfig>;\n}\n\n/**\n * Result of column composition\n */\nexport interface ComposeResult {\n /** The fully composed text with both columns merged */\n composedText: string;\n /** Lines from the left column (for debugging/preview) */\n leftLines: string[];\n /** Lines from the right column (for debugging/preview) */\n rightLines: string[];\n /** The column configuration that was used */\n config: ColumnConfig;\n}\n\n// =============================================================================\n// ColumnComposer Class\n// =============================================================================\n\n/**\n * Composes multi-column layouts for smart glasses displays.\n *\n * Usage:\n * ```typescript\n * const composer = new ColumnComposer(G1_PROFILE)\n * const result = composer.composeDoubleTextWall(\"Left content\", \"Right content\")\n * // result.composedText is ready to send to native SGC\n * ```\n */\nexport class ColumnComposer {\n private profile: DisplayProfile;\n private measurer: TextMeasurer;\n private wrapper: TextWrapper;\n private spaceWidthPx: number;\n\n constructor(profile: DisplayProfile, breakMode: BreakMode = \"character-no-hyphen\") {\n this.profile = profile;\n this.measurer = new TextMeasurer(profile);\n this.wrapper = new TextWrapper(this.measurer, {\n breakMode,\n });\n\n // Cache space width for alignment calculations\n this.spaceWidthPx = this.measurer.measureText(\" \");\n }\n\n // ===========================================================================\n // Public API\n // ===========================================================================\n\n /**\n * Compose a double text wall layout.\n *\n * Takes left and right text, wraps each to their column width,\n * and merges them with pixel-precise space alignment.\n *\n * @param leftText - Text for the left column\n * @param rightText - Text for the right column\n * @param options - Optional composition settings\n * @returns Composed result with merged text and metadata\n */\n public composeDoubleTextWall(leftText: string, rightText: string, options: ComposeOptions = {}): ComposeResult {\n const config = this.getColumnConfig(options.columnConfig);\n\n // Wrap each column independently\n const leftWrapOptions: WrapOptions = {\n maxWidthPx: config.leftColumnWidthPx,\n maxLines: config.maxLines,\n };\n\n const rightWrapOptions: WrapOptions = {\n maxWidthPx: config.rightColumnWidthPx,\n maxLines: config.maxLines,\n };\n\n const leftResult = this.wrapper.wrap(leftText || \"\", leftWrapOptions);\n const rightResult = this.wrapper.wrap(rightText || \"\", rightWrapOptions);\n\n // Pad arrays to have exactly maxLines entries\n const leftLines = this.padLines(leftResult.lines, config.maxLines);\n const rightLines = this.padLines(rightResult.lines, config.maxLines);\n\n // Merge columns with space alignment\n const composedText = this.mergeColumns(leftLines, rightLines, config);\n\n return {\n composedText,\n leftLines,\n rightLines,\n config,\n };\n }\n\n /**\n * Get the default column configuration for the current profile.\n */\n public getDefaultColumnConfig(): ColumnConfig {\n return this.getColumnConfig();\n }\n\n /**\n * Update the break mode for text wrapping.\n */\n public setBreakMode(breakMode: BreakMode): void {\n this.wrapper = new TextWrapper(this.measurer, {\n breakMode,\n });\n }\n\n // ===========================================================================\n // Private Methods\n // ===========================================================================\n\n /**\n * Get column configuration, merging defaults with overrides.\n */\n private getColumnConfig(overrides?: Partial<ColumnConfig>): ColumnConfig {\n const displayWidth = this.profile.displayWidthPx;\n\n // Default layout: 50% for left column, right starts at 55%\n // This matches the native G1Text implementations\n const defaults: ColumnConfig = {\n leftColumnWidthPx: Math.floor(displayWidth * 0.5),\n rightColumnStartPx: Math.floor(displayWidth * 0.55),\n rightColumnWidthPx: displayWidth - Math.floor(displayWidth * 0.55),\n maxLines: this.profile.maxLines,\n leftMarginSpaces: 0,\n };\n\n return {\n ...defaults,\n ...overrides,\n };\n }\n\n /**\n * Pad lines array to exactly `count` entries.\n */\n private padLines(lines: string[], count: number): string[] {\n const result = [...lines];\n while (result.length < count) {\n result.push(\"\");\n }\n return result.slice(0, count);\n }\n\n /**\n * Merge left and right columns with pixel-precise space alignment.\n *\n * For each line:\n * 1. Take the left column text\n * 2. Calculate its pixel width\n * 3. Calculate how many spaces needed to reach rightColumnStartPx\n * 4. Append spaces and right column text\n */\n private mergeColumns(leftLines: string[], rightLines: string[], config: ColumnConfig): string {\n const lines: string[] = [];\n\n for (let i = 0; i < config.maxLines; i++) {\n const leftText = this.cleanEnspaces(leftLines[i] || \"\");\n const rightText = this.cleanEnspaces(rightLines[i] || \"\");\n\n // Calculate pixel width of left text\n const leftWidthPx = this.measurer.measureText(leftText);\n\n // Calculate spaces needed to reach the right column start\n const spacesNeeded = this.calculateSpacesForAlignment(leftWidthPx, config.rightColumnStartPx);\n\n // Build the merged line\n let line = \"\";\n\n // Add left margin if configured\n if (config.leftMarginSpaces && config.leftMarginSpaces > 0) {\n line += \" \".repeat(config.leftMarginSpaces);\n }\n\n line += leftText;\n line += \" \".repeat(spacesNeeded);\n line += rightText;\n\n lines.push(line);\n }\n\n return lines.join(\"\\n\");\n }\n\n /**\n * Calculate the number of spaces needed to align to a target position.\n *\n * @param currentWidthPx - Current position in pixels\n * @param targetPositionPx - Target position in pixels\n * @returns Number of space characters needed\n */\n private calculateSpacesForAlignment(currentWidthPx: number, targetPositionPx: number): number {\n const pixelsNeeded = targetPositionPx - currentWidthPx;\n\n // Ensure at least one space for separation\n if (pixelsNeeded <= 0) {\n return 1;\n }\n\n // Calculate spaces needed. Use Math.floor (not Math.ceil) to ensure the\n // right column never starts past rightColumnStartPx. Rounding up caused\n // the right column to start 1–5px further right than planned, shrinking\n // its usable width and causing the last character to wrap onto the next\n // line's left position.\n const spaces = Math.max(1, Math.floor(pixelsNeeded / this.spaceWidthPx));\n\n // Cap at a reasonable maximum to prevent runaway spacing\n return Math.min(spaces, 100);\n }\n\n /**\n * Remove en-space characters (U+2002) that may have been added during wrapping.\n * Native implementations do this cleanup before merging.\n */\n private cleanEnspaces(text: string): string {\n return text.replace(/\\u2002/g, \"\");\n }\n}\n\n// =============================================================================\n// Factory Function\n// =============================================================================\n\n/**\n * Create a ColumnComposer for a given profile.\n *\n * @param profile - Display profile to use\n * @param breakMode - Break mode for text wrapping (default: \"word\")\n * @returns Configured ColumnComposer instance\n */\nexport function createColumnComposer(profile: DisplayProfile, breakMode: BreakMode = \"word\"): ColumnComposer {\n return new ColumnComposer(profile, breakMode);\n}\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mentra/engine",
|
|
3
|
-
"version": "3.1.0-dev.
|
|
3
|
+
"version": "3.1.0-dev.95",
|
|
4
4
|
"description": "Mentra Engine — miniapp registry, WebView bridge, and miniapp store",
|
|
5
5
|
"main": "build/index.js",
|
|
6
6
|
"react-native": "src/index.ts",
|
|
@@ -97,11 +97,11 @@
|
|
|
97
97
|
"registry": "https://registry.npmjs.org/"
|
|
98
98
|
},
|
|
99
99
|
"dependencies": {
|
|
100
|
-
"@mentra/bluetooth-sdk": "3.1.0-dev.
|
|
101
|
-
"@mentra/cloud-client": "3.1.0-dev.
|
|
102
|
-
"@mentra/cloud-protocol": "3.1.0-dev.
|
|
103
|
-
"@mentra/crust": "3.1.0-dev.
|
|
104
|
-
"@mentra/miniapp": "3.1.0-dev.
|
|
100
|
+
"@mentra/bluetooth-sdk": "3.1.0-dev.95",
|
|
101
|
+
"@mentra/cloud-client": "3.1.0-dev.95",
|
|
102
|
+
"@mentra/cloud-protocol": "3.1.0-dev.95",
|
|
103
|
+
"@mentra/crust": "3.1.0-dev.95",
|
|
104
|
+
"@mentra/miniapp": "3.1.0-dev.95",
|
|
105
105
|
"buffer": "^6.0.3",
|
|
106
106
|
"events": "^3.3.0",
|
|
107
107
|
"react-native-marked": "8.1.1",
|
package/src/facades/ota.ts
CHANGED
|
@@ -66,7 +66,7 @@ export const ota = {
|
|
|
66
66
|
// --- actions ---
|
|
67
67
|
/**
|
|
68
68
|
* Start the device-status and OTA projections without starting the authenticated
|
|
69
|
-
* cloud
|
|
69
|
+
* cloud connection or miniapp runtime. This is the explicit entry point for Bluetooth-only hosts.
|
|
70
70
|
* Idempotent and safe when the full engine runtime is already running.
|
|
71
71
|
*/
|
|
72
72
|
initialize: async () => {
|