@mentra/bluetooth-sdk 3.3.0-dev.651 → 3.3.0-dev.658

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.
@@ -186,6 +186,21 @@ apply from: expoModulesCorePlugin
186
186
  applyKotlinExpoModulesCorePlugin()
187
187
  useExpoPublishing()
188
188
 
189
+ // Hosts that embed @mentra/crust compile with Kotlin 2.3 (its QuickJS library
190
+ // requires it). Keep the public Maven artifact usable from Kotlin 2.1 builds:
191
+ // 2.2 metadata (a 2.1 compiler reads one version ahead; 2.2 is also the lowest
192
+ // language version that reads the 2.3 expo-modules-core classes compiled here),
193
+ // 2.1 stdlib APIs, and a kotlin-stdlib 2.1.20 dependency in the POM.
194
+ if (publicMavenSdk) {
195
+ kotlin {
196
+ coreLibrariesVersion = "2.1.20"
197
+ compilerOptions {
198
+ languageVersion = org.jetbrains.kotlin.gradle.dsl.KotlinVersion.KOTLIN_2_2
199
+ apiVersion = org.jetbrains.kotlin.gradle.dsl.KotlinVersion.KOTLIN_2_1
200
+ }
201
+ }
202
+ }
203
+
189
204
  // If you want to use the managed Android SDK versions from expo-modules-core, set this to true.
190
205
  // The Android SDK versions will be bumped from time to time in SDK releases and may introduce breaking changes in your module code.
191
206
  // Most of the time, you may like to manage the Android SDK versions yourself.
@@ -3,9 +3,9 @@ package com.mentra.bluetoothsdk
3
3
  /** Generated by release CI. Do not edit in a release checkout. */
4
4
  internal object GeneratedReleaseMetadata {
5
5
  const val FAMILY_BASE_VERSION: String = "3.3.0"
6
- const val RELEASE_IDENTITY: String = "3.3.0-dev.651"
7
- const val RELEASE_SET_ID: String = "mentra-3.3.0-dev.651"
8
- const val SOURCE_COMMIT: String = "3b9284d1dc69eae7f0b761d6ec863efac5da7d99"
9
- const val OTA_MANIFEST_URL: String = "https://artifactscdn.mentraglass.com/Mentra-Community/MentraOS/releases/mentra-builds-v3.3.0/mentra-live-ota-3.3.0-dev.651.json"
10
- const val OTA_MANIFEST_SHA256: String = "6cea891cea0782f50fe9f1950be05f062b6ae28621c15770c126b3e79dffb3e4"
6
+ const val RELEASE_IDENTITY: String = "3.3.0-dev.658"
7
+ const val RELEASE_SET_ID: String = "mentra-3.3.0-dev.658"
8
+ const val SOURCE_COMMIT: String = "394db8afffdabe2bb782e3630be906a677466eb2"
9
+ const val OTA_MANIFEST_URL: String = "https://artifactscdn.mentraglass.com/Mentra-Community/MentraOS/releases/mentra-builds-v3.3.0/mentra-live-ota-3.3.0-dev.658.json"
10
+ const val OTA_MANIFEST_SHA256: String = "264e3cbd01f47ac9494168a80a11028e9ba6e4fd9a9233167c1f69163179c23e"
11
11
  }
@@ -2,15 +2,14 @@ package com.mentra.bluetoothsdk.sgcs
2
2
 
3
3
  import java.text.Normalizer
4
4
 
5
- private val G1_COMBINING_MARKS = Regex("\\p{M}+")
5
+ private val LATIN_COMBINING_MARKS = Regex("\\p{M}+")
6
+ private val LATIN_LETTERS_WITH_MARKS = Regex("\\p{IsLatin}\\p{M}*")
6
7
 
7
- /**
8
- * Converts text to the base Latin glyphs available in the Even Realities G1 firmware.
9
- *
10
- * G1 does not ship glyphs for combining diacritics. Normalize at the device boundary so
11
- * miniapps can retain the real text everywhere else and newer glasses receive it unchanged.
12
- */
13
- internal fun sanitizeG1DisplayText(text: String): String {
8
+ /** G1 uses the shared Latin fallback without applying other devices' punctuation fixes. */
9
+ internal fun sanitizeG1DisplayText(text: String): String = sanitizeLatinDisplayText(text)
10
+
11
+ /** Converts accented and extended Latin letters to base glyphs at the device boundary. */
12
+ internal fun sanitizeLatinDisplayText(text: String, preserveOtherScripts: Boolean = false): String {
14
13
  val expanded = buildString(text.length) {
15
14
  text.forEach { character ->
16
15
  when (character) {
@@ -33,6 +32,11 @@ internal fun sanitizeG1DisplayText(text: String): String {
33
32
  }
34
33
  }
35
34
 
35
+ if (preserveOtherScripts) {
36
+ return LATIN_LETTERS_WITH_MARKS.replace(expanded) { match ->
37
+ Normalizer.normalize(match.value, Normalizer.Form.NFD).replace(LATIN_COMBINING_MARKS, "")
38
+ }
39
+ }
36
40
  return Normalizer.normalize(expanded, Normalizer.Form.NFD)
37
- .replace(G1_COMBINING_MARKS, "")
41
+ .replace(LATIN_COMBINING_MARKS, "")
38
42
  }
@@ -103,7 +103,9 @@ internal object NimoCanvasCodec {
103
103
  require(text.length <= 2048 && '\u0000' !in text)
104
104
  val encoder = Charsets.UTF_8.newEncoder().onMalformedInput(CodingErrorAction.REPORT)
105
105
  .onUnmappableCharacter(CodingErrorAction.REPORT)
106
- val encoded = encoder.encode(CharBuffer.wrap(text))
106
+ // Apply the shared Latin fallback and NIMO's dash fix before counting wire bytes.
107
+ val displayText = sanitizeLatinDisplayText(text, preserveOtherScripts = true).replace('\u2014', '-')
108
+ val encoded = encoder.encode(CharBuffer.wrap(displayText))
107
109
  val utf8 = ByteArray(encoded.remaining()).also { encoded.get(it) }
108
110
  require(utf8.size in 1..2048) { "Label exceeds 2048 UTF-8 bytes" }
109
111
  return Object(3, words(x, y, width, height, language) + bytes(font, intensity) + words(utf8.size) + utf8,
@@ -37,7 +37,11 @@ class ScanCompletionTest {
37
37
  error("Legacy callbacks must not query diagnostics")
38
38
  }
39
39
  assertThat(completed).isTrue()
40
- assertThat(ScanCallback::class.java.declaredMethods.map { it.name })
40
+ // Instance methods only: Kotlin 2.2+ compiles bodies to Java default
41
+ // methods plus static `access$...$jd` bridges, which nothing implements.
42
+ assertThat(ScanCallback::class.java.declaredMethods
43
+ .filterNot { java.lang.reflect.Modifier.isStatic(it.modifiers) }
44
+ .map { it.name })
41
45
  .containsExactlyInAnyOrder("onResults", "onComplete", "onError")
42
46
  }
43
47
 
@@ -4,6 +4,14 @@ import org.junit.Assert.*
4
4
  import org.junit.Test
5
5
 
6
6
  class NimoCanvasCodecTest {
7
+ @Test fun LatinFallbackPreservesOtherScriptsAndTheirMarks() {
8
+ val otherScripts = "ありがとう が パ カ\u3099 한국어 한\u302E Α\u0301 مُرَحَّبًا शि ❤️"
9
+ val label = NimoCanvasCodec.label("$otherScripts café—Æ\u0301", 0, 0, 500, 220)
10
+ val expected = "$otherScripts cafe-AE".toByteArray(Charsets.UTF_8)
11
+ assertArrayEquals(expected, label.payload.copyOfRange(14, label.payload.size))
12
+ assertEquals(expected.size, label.textBytes)
13
+ }
14
+
7
15
  @Test fun imageSourcesAcceptRawAndMatchingDataUris() {
8
16
  // ImageIO/BitmapFactory validate the complete raster; this boundary validates file kind and size.
9
17
  val png = byteArrayOf(0x89.toByte(), 0x50, 0x4E, 0x47, 13, 10, 26, 10) + ByteArray(24)
@@ -62,13 +70,18 @@ class NimoCanvasCodecTest {
62
70
  }
63
71
 
64
72
  @Test fun labelUtf8LengthAndErrors() {
65
- val label = NimoCanvasCodec.label("😀é", 0, 0, 100, 20)
66
- assertEquals(6, label.textBytes)
67
- assertEquals(6, label.payload[12].toInt())
73
+ val dashes = NimoCanvasCodec.label("—éÆß— - –", 0, 0, 100, 20)
74
+ val expectedText = "-eAEss- - –".toByteArray(Charsets.UTF_8)
75
+ assertArrayEquals(expectedText, dashes.payload.copyOfRange(14, dashes.payload.size))
76
+ assertEquals(expectedText.size, dashes.textBytes)
77
+ assertEquals(expectedText.size, dashes.payload[12].toInt())
78
+ val label = NimoCanvasCodec.label("😀界", 0, 0, 100, 20)
79
+ assertEquals(7, label.textBytes)
80
+ assertEquals(7, label.payload[12].toInt())
68
81
  assertThrows(IllegalArgumentException::class.java) { NimoCanvasCodec.label("a\u0000b", 0, 0, 100, 20) }
69
82
  assertThrows(java.nio.charset.CharacterCodingException::class.java) { NimoCanvasCodec.label("\uD800", 0, 0, 100, 20) }
70
- assertThrows(IllegalArgumentException::class.java) { NimoCanvasCodec.label("é".repeat(1025), 0, 0, 100, 20) }
71
- assertEquals(2048, NimoCanvasCodec.label("é".repeat(1024), 0, 0, 100, 20).textBytes)
83
+ assertThrows(IllegalArgumentException::class.java) { NimoCanvasCodec.label("界".repeat(683), 0, 0, 100, 20) }
84
+ assertEquals(2046, NimoCanvasCodec.label("界".repeat(682), 0, 0, 100, 20).textBytes)
72
85
  }
73
86
 
74
87
  @Test fun totalBudgetsAndClear() {
@@ -177,12 +190,12 @@ class NimoCanvasCodecTest {
177
190
  }
178
191
 
179
192
  @Test fun sceneCompilerKeepsGeometryOrderAndBorderBeforeText() {
180
- val text = NimoCanvasCodec.Element("text", 10, 20, 100, 40, "hello", border = 2, radius = 3)
193
+ val text = NimoCanvasCodec.Element("text", 10, 20, 100, 40, "héllo—Æsir", border = 2, radius = 3)
181
194
  val rectangle = NimoCanvasCodec.Element("rect", 100, 100, 50, 20)
182
195
  val actual = NimoCanvasCodec.scene(listOf(text, rectangle)) { _, _, _ -> error("Not an image") }
183
196
  val expected = NimoCanvasCodec.replace(listOf(
184
197
  NimoCanvasCodec.rectangle(10, 20, 100, 40, 2, 3),
185
- NimoCanvasCodec.label("hello", 10, 20, 100, 20),
198
+ NimoCanvasCodec.label("hello-AEsir", 10, 20, 100, 20),
186
199
  NimoCanvasCodec.rectangle(100, 100, 50, 20, 1, 0)
187
200
  ))
188
201
  assertArrayEquals(expected, actual)
@@ -1,10 +1,10 @@
1
1
  export const BLUETOOTH_SDK_RELEASE_METADATA = Object.freeze({
2
2
  "schemaVersion": 1,
3
3
  "familyBaseVersion": "3.3.0",
4
- "releaseIdentity": "3.3.0-dev.651",
5
- "releaseSetId": "mentra-3.3.0-dev.651",
6
- "sourceCommit": "3b9284d1dc69eae7f0b761d6ec863efac5da7d99",
7
- "otaManifestUrl": "https://artifactscdn.mentraglass.com/Mentra-Community/MentraOS/releases/mentra-builds-v3.3.0/mentra-live-ota-3.3.0-dev.651.json",
8
- "otaManifestSha256": "6cea891cea0782f50fe9f1950be05f062b6ae28621c15770c126b3e79dffb3e4"
4
+ "releaseIdentity": "3.3.0-dev.658",
5
+ "releaseSetId": "mentra-3.3.0-dev.658",
6
+ "sourceCommit": "394db8afffdabe2bb782e3630be906a677466eb2",
7
+ "otaManifestUrl": "https://artifactscdn.mentraglass.com/Mentra-Community/MentraOS/releases/mentra-builds-v3.3.0/mentra-live-ota-3.3.0-dev.658.json",
8
+ "otaManifestSha256": "264e3cbd01f47ac9494168a80a11028e9ba6e4fd9a9233167c1f69163179c23e"
9
9
  });
10
10
  //# sourceMappingURL=releaseMetadata.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"releaseMetadata.js","sourceRoot":"","sources":["../../src/generated/releaseMetadata.ts"],"names":[],"mappings":"AAWA,MAAM,CAAC,MAAM,8BAA8B,GAA0C,MAAM,CAAC,MAAM,CAAC;IACjG,eAAe,EAAE,CAAC;IAClB,mBAAmB,EAAE,OAAO;IAC5B,iBAAiB,EAAE,eAAe;IAClC,cAAc,EAAE,sBAAsB;IACtC,cAAc,EAAE,0CAA0C;IAC1D,gBAAgB,EAAE,iIAAiI;IACnJ,mBAAmB,EAAE,kEAAkE;CACxF,CAAC,CAAA","sourcesContent":["/** Generated by release CI. Do not edit in a release checkout. */\nexport interface BluetoothSdkReleaseMetadata {\n schemaVersion: 1\n familyBaseVersion: string | null\n releaseIdentity: string | null\n releaseSetId: string | null\n sourceCommit: string | null\n otaManifestUrl: string | null\n otaManifestSha256: string | null\n}\n\nexport const BLUETOOTH_SDK_RELEASE_METADATA: Readonly<BluetoothSdkReleaseMetadata> = Object.freeze({\n \"schemaVersion\": 1,\n \"familyBaseVersion\": \"3.3.0\",\n \"releaseIdentity\": \"3.3.0-dev.651\",\n \"releaseSetId\": \"mentra-3.3.0-dev.651\",\n \"sourceCommit\": \"3b9284d1dc69eae7f0b761d6ec863efac5da7d99\",\n \"otaManifestUrl\": \"https://artifactscdn.mentraglass.com/Mentra-Community/MentraOS/releases/mentra-builds-v3.3.0/mentra-live-ota-3.3.0-dev.651.json\",\n \"otaManifestSha256\": \"6cea891cea0782f50fe9f1950be05f062b6ae28621c15770c126b3e79dffb3e4\"\n})\n"]}
1
+ {"version":3,"file":"releaseMetadata.js","sourceRoot":"","sources":["../../src/generated/releaseMetadata.ts"],"names":[],"mappings":"AAWA,MAAM,CAAC,MAAM,8BAA8B,GAA0C,MAAM,CAAC,MAAM,CAAC;IACjG,eAAe,EAAE,CAAC;IAClB,mBAAmB,EAAE,OAAO;IAC5B,iBAAiB,EAAE,eAAe;IAClC,cAAc,EAAE,sBAAsB;IACtC,cAAc,EAAE,0CAA0C;IAC1D,gBAAgB,EAAE,iIAAiI;IACnJ,mBAAmB,EAAE,kEAAkE;CACxF,CAAC,CAAA","sourcesContent":["/** Generated by release CI. Do not edit in a release checkout. */\nexport interface BluetoothSdkReleaseMetadata {\n schemaVersion: 1\n familyBaseVersion: string | null\n releaseIdentity: string | null\n releaseSetId: string | null\n sourceCommit: string | null\n otaManifestUrl: string | null\n otaManifestSha256: string | null\n}\n\nexport const BLUETOOTH_SDK_RELEASE_METADATA: Readonly<BluetoothSdkReleaseMetadata> = Object.freeze({\n \"schemaVersion\": 1,\n \"familyBaseVersion\": \"3.3.0\",\n \"releaseIdentity\": \"3.3.0-dev.658\",\n \"releaseSetId\": \"mentra-3.3.0-dev.658\",\n \"sourceCommit\": \"394db8afffdabe2bb782e3630be906a677466eb2\",\n \"otaManifestUrl\": \"https://artifactscdn.mentraglass.com/Mentra-Community/MentraOS/releases/mentra-builds-v3.3.0/mentra-live-ota-3.3.0-dev.658.json\",\n \"otaManifestSha256\": \"264e3cbd01f47ac9494168a80a11028e9ba6e4fd9a9233167c1f69163179c23e\"\n})\n"]}
@@ -16,7 +16,7 @@ enum BluetoothSdkDefaults {
16
16
  /// silently disable it on every pair the app touches.
17
17
  static let autoPowerOffEnabled = false
18
18
  private static let infoSdkVersionKey = "MentraBluetoothSdkVersion"
19
- private static let swiftPackageSdkVersion = "3.3.0-dev.651"
19
+ private static let swiftPackageSdkVersion = "3.3.0-dev.658"
20
20
  private static let swiftPackageSdkVersionPlaceholder = "__MENTRA" + "_BLUETOOTH_SDK_VERSION__"
21
21
 
22
22
  private static func normalizedSdkVersion(_ value: String?) -> String? {
@@ -3,9 +3,9 @@ import Foundation
3
3
  /// Generated by release CI. Do not edit in a release checkout.
4
4
  enum GeneratedReleaseMetadata {
5
5
  static let familyBaseVersion = "3.3.0"
6
- static let releaseIdentity = "3.3.0-dev.651"
7
- static let releaseSetId = "mentra-3.3.0-dev.651"
8
- static let sourceCommit = "3b9284d1dc69eae7f0b761d6ec863efac5da7d99"
9
- static let otaManifestUrl = "https://artifactscdn.mentraglass.com/Mentra-Community/MentraOS/releases/mentra-builds-v3.3.0/mentra-live-ota-3.3.0-dev.651.json"
10
- static let otaManifestSha256 = "6cea891cea0782f50fe9f1950be05f062b6ae28621c15770c126b3e79dffb3e4"
6
+ static let releaseIdentity = "3.3.0-dev.658"
7
+ static let releaseSetId = "mentra-3.3.0-dev.658"
8
+ static let sourceCommit = "394db8afffdabe2bb782e3630be906a677466eb2"
9
+ static let otaManifestUrl = "https://artifactscdn.mentraglass.com/Mentra-Community/MentraOS/releases/mentra-builds-v3.3.0/mentra-live-ota-3.3.0-dev.658.json"
10
+ static let otaManifestSha256 = "264e3cbd01f47ac9494168a80a11028e9ba6e4fd9a9233167c1f69163179c23e"
11
11
  }
@@ -77,7 +77,10 @@ enum NimoCanvasCodec {
77
77
  {
78
78
  try region(x, y, w, h)
79
79
  try require((0 ... 3).contains(font) && (0 ... 20).contains(language) && (0 ... 255).contains(intensity))
80
- let utf8 = Data(text.utf8)
80
+ // Apply the shared Latin fallback and NIMO's dash fix before counting wire bytes.
81
+ let displayText = LatinTextSanitizer.sanitizeForDisplay(text, preserveOtherScripts: true)
82
+ .replacingOccurrences(of: "\u{2014}", with: "-")
83
+ let utf8 = Data(displayText.utf8)
81
84
  try require((1 ... 2048).contains(utf8.count) && !utf8.contains(0), "Label exceeds 2048 UTF-8 bytes or contains NUL")
82
85
  return Object(type: 3, payload: words(x, y, w, h, language) + bytes(font, intensity) + words(utf8.count) + utf8,
83
86
  textBytes: utf8.count)
@@ -24,31 +24,9 @@ class G1Text {
24
24
 
25
25
  init() {}
26
26
 
27
- /// Converts text to the base Latin glyphs available in G1 firmware.
28
- /// Newer glasses bypass this G1-only transport and keep the original text.
27
+ /// G1 uses the shared Latin fallback without applying other devices' punctuation fixes.
29
28
  static func sanitizeForDisplay(_ text: String) -> String {
30
- let expanded = text.reduce(into: "") { result, character in
31
- switch character {
32
- case "Đ", "Ð": result.append("D")
33
- case "đ", "ð": result.append("d")
34
- case "Ł": result.append("L")
35
- case "ł": result.append("l")
36
- case "Ø": result.append("O")
37
- case "ø": result.append("o")
38
- case "Æ": result.append("AE")
39
- case "æ": result.append("ae")
40
- case "Œ": result.append("OE")
41
- case "œ": result.append("oe")
42
- case "ẞ": result.append("SS")
43
- case "ß": result.append("ss")
44
- case "Þ": result.append("TH")
45
- case "þ": result.append("th")
46
- default: result.append(character)
47
- }
48
- }
49
-
50
- return expanded
51
- .folding(options: .diacriticInsensitive, locale: Locale(identifier: "en_US_POSIX"))
29
+ LatinTextSanitizer.sanitizeForDisplay(text)
52
30
  }
53
31
 
54
32
  // MARK: - Text Wall Methods
@@ -0,0 +1,48 @@
1
+ import Foundation
2
+
3
+ /// Converts accented and extended Latin letters to base glyphs at the device boundary.
4
+ enum LatinTextSanitizer {
5
+ private static let latinLettersWithMarks = try! NSRegularExpression(pattern: #"\p{Latin}\p{M}*"#)
6
+
7
+ static func sanitizeForDisplay(_ text: String, preserveOtherScripts: Bool = false) -> String {
8
+ if preserveOtherScripts {
9
+ let output = NSMutableString(string: text)
10
+ let range = NSRange(text.startIndex ..< text.endIndex, in: text)
11
+ for match in latinLettersWithMarks.matches(in: text, range: range).reversed() {
12
+ let cluster = output.substring(with: match.range)
13
+ let expanded = cluster.unicodeScalars.map { expandLatinLetter(Character($0)) }.joined()
14
+ output.replaceCharacters(in: match.range, with: stripDiacritics(expanded))
15
+ }
16
+ return output as String
17
+ }
18
+ // Preserve the established G1 folding behavior.
19
+ let expanded = text.reduce(into: "") { result, character in
20
+ result.append(expandLatinLetter(character))
21
+ }
22
+ return stripDiacritics(expanded)
23
+ }
24
+
25
+ private static func stripDiacritics(_ text: String) -> String {
26
+ text.folding(options: .diacriticInsensitive, locale: Locale(identifier: "en_US_POSIX"))
27
+ }
28
+
29
+ private static func expandLatinLetter(_ character: Character) -> String {
30
+ switch character {
31
+ case "Đ", "Ð": return "D"
32
+ case "đ", "ð": return "d"
33
+ case "Ł": return "L"
34
+ case "ł": return "l"
35
+ case "Ø": return "O"
36
+ case "ø": return "o"
37
+ case "Æ": return "AE"
38
+ case "æ": return "ae"
39
+ case "Œ": return "OE"
40
+ case "œ": return "oe"
41
+ case "ẞ": return "SS"
42
+ case "ß": return "ss"
43
+ case "Þ": return "TH"
44
+ case "þ": return "th"
45
+ default: return String(character)
46
+ }
47
+ }
48
+ }
@@ -5,6 +5,14 @@ import XCTest
5
5
  import zlib
6
6
 
7
7
  final class NimoCanvasCodecTests: XCTestCase {
8
+ func testLatinFallbackPreservesOtherScriptsAndTheirMarks() throws {
9
+ let otherScripts = "ありがとう が パ カ\u{3099} 한국어 한\u{302E} Α\u{0301} مُرَحَّبًا शि ❤️"
10
+ let label = try NimoCanvasCodec.label("\(otherScripts) café—Æ\u{0301}", 0, 0, 500, 220)
11
+ let expected = Data("\(otherScripts) cafe-AE".utf8)
12
+ XCTAssertEqual(Data(label.payload.dropFirst(14)), expected)
13
+ XCTAssertEqual(label.textBytes, expected.count)
14
+ }
15
+
8
16
  private func hex(_ data: Data) -> String {
9
17
  data.map { String(format: "%02X", $0) }.joined()
10
18
  }
@@ -107,9 +115,14 @@ final class NimoCanvasCodecTests: XCTestCase {
107
115
  }
108
116
 
109
117
  func testUtf8RowsAndGeometryValidation() throws {
110
- XCTAssertEqual(try NimoCanvasCodec.label("😀é", 0, 0, 100, 20).textBytes, 6)
118
+ let dashes = try NimoCanvasCodec.label("—éÆß— - –", 0, 0, 100, 20)
119
+ let expectedText = Data("-eAEss- - –".utf8)
120
+ XCTAssertEqual(Data(dashes.payload.dropFirst(14)), expectedText)
121
+ XCTAssertEqual(dashes.textBytes, expectedText.count)
122
+ XCTAssertEqual(Int(dashes.payload[12]), expectedText.count)
123
+ XCTAssertEqual(try NimoCanvasCodec.label("😀界", 0, 0, 100, 20).textBytes, 7)
111
124
  XCTAssertThrowsError(try NimoCanvasCodec.label("a\0b", 0, 0, 100, 20))
112
- XCTAssertThrowsError(try NimoCanvasCodec.label(String(repeating: "é", count: 1025), 0, 0, 100, 20))
125
+ XCTAssertThrowsError(try NimoCanvasCodec.label(String(repeating: "界", count: 683), 0, 0, 100, 20))
113
126
  let rows = try NimoCanvasCodec.textRows("first\n\nthird", 12, 15, 400, 100)
114
127
  XCTAssertEqual(rows.count, 2)
115
128
  XCTAssertEqual(rows.map { $0.payload[2] }, [15, 55])
@@ -156,11 +169,11 @@ final class NimoCanvasCodecTests: XCTestCase {
156
169
  }
157
170
 
158
171
  func testWholeScenePreservesOrderAndIgnoresDiffAnnotations() throws {
159
- let text = SceneElement(id: "caption", type: "text", x: 10, y: 20, w: 100, h: 40, text: "hello",
172
+ let text = SceneElement(id: "caption", type: "text", x: 10, y: 20, w: 100, h: 40, text: "héllo—Æsir",
160
173
  data: nil, border: 2, radius: 3, change: "unchanged", contentHash: "")
161
174
  let expected = try NimoCanvasCodec.replace([
162
175
  NimoCanvasCodec.rectangle(10, 20, 100, 40, stroke: 2, radius: 3),
163
- NimoCanvasCodec.label("hello", 10, 20, 100, 20),
176
+ NimoCanvasCodec.label("hello-AEsir", 10, 20, 100, 20),
164
177
  ])
165
178
  XCTAssertEqual(try NimoCanvasCodec.scene([text]) { _, _, _ in XCTFail("Not an image"); return Data() }, expected)
166
179
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mentra/bluetooth-sdk",
3
- "version": "3.3.0-dev.651",
3
+ "version": "3.3.0-dev.658",
4
4
  "description": "SDK for communicating with smart glasses",
5
5
  "main": "build/index.js",
6
6
  "react-native": "src/index.ts",
@@ -114,7 +114,7 @@
114
114
  "registry": "https://registry.npmjs.org/"
115
115
  },
116
116
  "dependencies": {
117
- "@mentra/cloud-protocol": "3.3.0-dev.651"
117
+ "@mentra/cloud-protocol": "3.3.0-dev.658"
118
118
  },
119
119
  "devDependencies": {
120
120
  "@types/node": "^25.9.3",
@@ -12,9 +12,9 @@ export interface BluetoothSdkReleaseMetadata {
12
12
  export const BLUETOOTH_SDK_RELEASE_METADATA: Readonly<BluetoothSdkReleaseMetadata> = Object.freeze({
13
13
  "schemaVersion": 1,
14
14
  "familyBaseVersion": "3.3.0",
15
- "releaseIdentity": "3.3.0-dev.651",
16
- "releaseSetId": "mentra-3.3.0-dev.651",
17
- "sourceCommit": "3b9284d1dc69eae7f0b761d6ec863efac5da7d99",
18
- "otaManifestUrl": "https://artifactscdn.mentraglass.com/Mentra-Community/MentraOS/releases/mentra-builds-v3.3.0/mentra-live-ota-3.3.0-dev.651.json",
19
- "otaManifestSha256": "6cea891cea0782f50fe9f1950be05f062b6ae28621c15770c126b3e79dffb3e4"
15
+ "releaseIdentity": "3.3.0-dev.658",
16
+ "releaseSetId": "mentra-3.3.0-dev.658",
17
+ "sourceCommit": "394db8afffdabe2bb782e3630be906a677466eb2",
18
+ "otaManifestUrl": "https://artifactscdn.mentraglass.com/Mentra-Community/MentraOS/releases/mentra-builds-v3.3.0/mentra-live-ota-3.3.0-dev.658.json",
19
+ "otaManifestSha256": "264e3cbd01f47ac9494168a80a11028e9ba6e4fd9a9233167c1f69163179c23e"
20
20
  })