@glassly/bluetooth-sdk 0.1.0-dev.26
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 +563 -0
- package/android/build.gradle +450 -0
- package/android/gradle.properties.example +9 -0
- package/android/lc3Lib/CMakeLists.txt +6 -0
- package/android/lc3Lib/build.gradle +212 -0
- package/android/lc3Lib/proguard-rules.pro +33 -0
- package/android/lc3Lib/src/main/AndroidManifest.xml +2 -0
- package/android/lc3Lib/src/main/cpp/CMakeLists.txt +8 -0
- package/android/lc3Lib/src/main/cpp/google_opus_stuff/CMakeLists.txt +30 -0
- package/android/lc3Lib/src/main/cpp/google_opus_stuff/jni/CMakeLists.txt +7 -0
- package/android/lc3Lib/src/main/cpp/google_opus_stuff/jni/ogg_opus_encoder.cc +96 -0
- package/android/lc3Lib/src/main/cpp/google_opus_stuff/jni/ogg_opus_encoder.h +53 -0
- package/android/lc3Lib/src/main/cpp/google_opus_stuff/libogg/Makefile.am +6 -0
- package/android/lc3Lib/src/main/cpp/google_opus_stuff/libogg/config_types.h +26 -0
- package/android/lc3Lib/src/main/cpp/google_opus_stuff/libogg/config_types.h.in +26 -0
- package/android/lc3Lib/src/main/cpp/google_opus_stuff/libogg/ogg.h +209 -0
- package/android/lc3Lib/src/main/cpp/google_opus_stuff/libogg/os_types.h +158 -0
- package/android/lc3Lib/src/main/cpp/google_opus_stuff/libopus/opus.h +981 -0
- package/android/lc3Lib/src/main/cpp/google_opus_stuff/libopus/opus_custom.h +342 -0
- package/android/lc3Lib/src/main/cpp/google_opus_stuff/libopus/opus_defines.h +799 -0
- package/android/lc3Lib/src/main/cpp/google_opus_stuff/libopus/opus_multistream.h +660 -0
- package/android/lc3Lib/src/main/cpp/google_opus_stuff/libopus/opus_projection.h +568 -0
- package/android/lc3Lib/src/main/cpp/google_opus_stuff/libopus/opus_types.h +166 -0
- package/android/lc3Lib/src/main/cpp/google_opus_stuff/ogg_opus_encoder.cc +268 -0
- package/android/lc3Lib/src/main/cpp/google_opus_stuff/ogg_opus_encoder.h +115 -0
- package/android/lc3Lib/src/main/cpp/google_opus_stuff/opus_tools/opus_header.h +59 -0
- package/android/lc3Lib/src/main/cpp/liblc3/CMakeLists.txt +38 -0
- package/android/lc3Lib/src/main/cpp/liblc3/include/lc3.h +309 -0
- package/android/lc3Lib/src/main/cpp/liblc3/include/lc3_private.h +162 -0
- package/android/lc3Lib/src/main/cpp/liblc3/include/rnnoise.h +114 -0
- package/android/lc3Lib/src/main/cpp/liblc3/liblc3/CMakeLists.txt +19 -0
- package/android/lc3Lib/src/main/cpp/liblc3/liblc3/attdet.c +92 -0
- package/android/lc3Lib/src/main/cpp/liblc3/liblc3/attdet.h +44 -0
- package/android/lc3Lib/src/main/cpp/liblc3/liblc3/bits.c +375 -0
- package/android/lc3Lib/src/main/cpp/liblc3/liblc3/bits.h +315 -0
- package/android/lc3Lib/src/main/cpp/liblc3/liblc3/bwdet.c +129 -0
- package/android/lc3Lib/src/main/cpp/liblc3/liblc3/bwdet.h +69 -0
- package/android/lc3Lib/src/main/cpp/liblc3/liblc3/common.h +148 -0
- package/android/lc3Lib/src/main/cpp/liblc3/liblc3/energy.c +70 -0
- package/android/lc3Lib/src/main/cpp/liblc3/liblc3/energy.h +43 -0
- package/android/lc3Lib/src/main/cpp/liblc3/liblc3/fastmath.h +158 -0
- package/android/lc3Lib/src/main/cpp/liblc3/liblc3/lc3.c +702 -0
- package/android/lc3Lib/src/main/cpp/liblc3/liblc3/ltpf.c +893 -0
- package/android/lc3Lib/src/main/cpp/liblc3/liblc3/ltpf.h +111 -0
- package/android/lc3Lib/src/main/cpp/liblc3/liblc3/ltpf_arm.h +506 -0
- package/android/lc3Lib/src/main/cpp/liblc3/liblc3/ltpf_neon.h +281 -0
- package/android/lc3Lib/src/main/cpp/liblc3/liblc3/makefile.mk +35 -0
- package/android/lc3Lib/src/main/cpp/liblc3/liblc3/mdct.c +452 -0
- package/android/lc3Lib/src/main/cpp/liblc3/liblc3/mdct.h +57 -0
- package/android/lc3Lib/src/main/cpp/liblc3/liblc3/mdct_neon.h +296 -0
- package/android/lc3Lib/src/main/cpp/liblc3/liblc3/meson.build +46 -0
- package/android/lc3Lib/src/main/cpp/liblc3/liblc3/plc.c +61 -0
- package/android/lc3Lib/src/main/cpp/liblc3/liblc3/plc.h +57 -0
- package/android/lc3Lib/src/main/cpp/liblc3/liblc3/sns.c +880 -0
- package/android/lc3Lib/src/main/cpp/liblc3/liblc3/sns.h +103 -0
- package/android/lc3Lib/src/main/cpp/liblc3/liblc3/spec.c +904 -0
- package/android/lc3Lib/src/main/cpp/liblc3/liblc3/spec.h +119 -0
- package/android/lc3Lib/src/main/cpp/liblc3/liblc3/tables.c +3457 -0
- package/android/lc3Lib/src/main/cpp/liblc3/liblc3/tables.h +94 -0
- package/android/lc3Lib/src/main/cpp/liblc3/liblc3/tns.c +457 -0
- package/android/lc3Lib/src/main/cpp/liblc3/liblc3/tns.h +99 -0
- package/android/lc3Lib/src/main/cpp/liblc3/liblc3.cpp +159 -0
- package/android/lc3Lib/src/main/cpp/liblc3/rnnoise/_kiss_fft_guts.h +182 -0
- package/android/lc3Lib/src/main/cpp/liblc3/rnnoise/arch.h +261 -0
- package/android/lc3Lib/src/main/cpp/liblc3/rnnoise/celt_lpc.c +279 -0
- package/android/lc3Lib/src/main/cpp/liblc3/rnnoise/celt_lpc.h +59 -0
- package/android/lc3Lib/src/main/cpp/liblc3/rnnoise/common.h +48 -0
- package/android/lc3Lib/src/main/cpp/liblc3/rnnoise/compile.sh +3 -0
- package/android/lc3Lib/src/main/cpp/liblc3/rnnoise/denoise.c +646 -0
- package/android/lc3Lib/src/main/cpp/liblc3/rnnoise/kiss_fft.c +601 -0
- package/android/lc3Lib/src/main/cpp/liblc3/rnnoise/kiss_fft.h +203 -0
- package/android/lc3Lib/src/main/cpp/liblc3/rnnoise/opus_types.h +159 -0
- package/android/lc3Lib/src/main/cpp/liblc3/rnnoise/pitch.c +526 -0
- package/android/lc3Lib/src/main/cpp/liblc3/rnnoise/pitch.h +149 -0
- package/android/lc3Lib/src/main/cpp/liblc3/rnnoise/rnn.c +178 -0
- package/android/lc3Lib/src/main/cpp/liblc3/rnnoise/rnn.h +69 -0
- package/android/lc3Lib/src/main/cpp/liblc3/rnnoise/rnn_data.c +11051 -0
- package/android/lc3Lib/src/main/cpp/liblc3/rnnoise/rnn_data.h +34 -0
- package/android/lc3Lib/src/main/cpp/liblc3/rnnoise/rnn_reader.c +168 -0
- package/android/lc3Lib/src/main/cpp/liblc3/rnnoise/rnn_train.py +66 -0
- package/android/lc3Lib/src/main/cpp/liblc3/rnnoise/tansig_table.h +45 -0
- package/android/lc3Lib/src/main/java/com/glassly/lc3Lib/Lc3Cpp.java +38 -0
- package/android/lc3Lib/third_party/CMakeLists.txt +23 -0
- package/android/lc3Lib/third_party/CMakeLists_libogg.txt +18 -0
- package/android/lc3Lib/third_party/CMakeLists_libopus.txt +18 -0
- package/android/lc3Lib/third_party/CMakeLists_opus-tools.txt +23 -0
- package/android/lc3Lib/third_party/opus_tools/src/AUTHORS +5 -0
- package/android/lc3Lib/third_party/opus_tools/src/CMakeLists.txt +4 -0
- package/android/lc3Lib/third_party/opus_tools/src/COPYING +371 -0
- package/android/lc3Lib/third_party/opus_tools/src/ChangeLog +3 -0
- package/android/lc3Lib/third_party/opus_tools/src/Makefile.am +42 -0
- package/android/lc3Lib/third_party/opus_tools/src/Makefile.unix +23 -0
- package/android/lc3Lib/third_party/opus_tools/src/NEWS +0 -0
- package/android/lc3Lib/third_party/opus_tools/src/README +0 -0
- package/android/lc3Lib/third_party/opus_tools/src/autogen.sh +115 -0
- package/android/lc3Lib/third_party/opus_tools/src/configure.ac +293 -0
- package/android/lc3Lib/third_party/opus_tools/src/src/arch.h +239 -0
- package/android/lc3Lib/third_party/opus_tools/src/src/audio-in.c +1046 -0
- package/android/lc3Lib/third_party/opus_tools/src/src/diag_range.c +245 -0
- package/android/lc3Lib/third_party/opus_tools/src/src/diag_range.h +28 -0
- package/android/lc3Lib/third_party/opus_tools/src/src/info_opus.c +320 -0
- package/android/lc3Lib/third_party/opus_tools/src/src/info_opus.h +51 -0
- package/android/lc3Lib/third_party/opus_tools/src/src/lpc.c +157 -0
- package/android/lc3Lib/third_party/opus_tools/src/src/lpc.h +27 -0
- package/android/lc3Lib/third_party/opus_tools/src/src/opus_header.c +286 -0
- package/android/lc3Lib/third_party/opus_tools/src/src/opus_header.h +59 -0
- package/android/lc3Lib/third_party/opus_tools/src/src/opusdec.c +884 -0
- package/android/lc3Lib/third_party/opus_tools/src/src/opusenc.c +1021 -0
- package/android/lc3Lib/third_party/opus_tools/src/src/opusenc.h +101 -0
- package/android/lc3Lib/third_party/opus_tools/src/src/opusinfo.c +639 -0
- package/android/lc3Lib/third_party/opus_tools/src/src/opusinfo.h +51 -0
- package/android/lc3Lib/third_party/opus_tools/src/src/os_support.h +167 -0
- package/android/lc3Lib/third_party/opus_tools/src/src/resample.c +1137 -0
- package/android/lc3Lib/third_party/opus_tools/src/src/speex_resampler.h +344 -0
- package/android/lc3Lib/third_party/opus_tools/src/src/stack_alloc.h +115 -0
- package/android/lc3Lib/third_party/opus_tools/src/src/wav_io.c +125 -0
- package/android/lc3Lib/third_party/opus_tools/src/src/wav_io.h +62 -0
- package/android/lc3Lib/third_party/opus_tools/src/src/wave_out.c +223 -0
- package/android/lc3Lib/third_party/opus_tools/src/src/wave_out.h +60 -0
- package/android/settings.gradle +4 -0
- package/android/silero/LICENSE.md +17 -0
- package/android/silero/build.gradle +50 -0
- package/android/silero/proguard-rules.pro +24 -0
- package/android/silero/src/androidTest/assets/hello.wav +0 -0
- package/android/silero/src/androidTest/java/com/konovalov/vad/silero/VadSileroTest.kt +79 -0
- package/android/silero/src/main/assets/LICENSE +21 -0
- package/android/silero/src/main/assets/silero_vad.onnx +0 -0
- package/android/silero/src/main/java/com/konovalov/vad/silero/Vad.kt +160 -0
- package/android/silero/src/main/java/com/konovalov/vad/silero/VadSilero.kt +449 -0
- package/android/silero/src/main/java/com/konovalov/vad/silero/config/FrameSize.kt +15 -0
- package/android/silero/src/main/java/com/konovalov/vad/silero/config/Mode.kt +14 -0
- package/android/silero/src/main/java/com/konovalov/vad/silero/config/SampleRate.kt +12 -0
- package/android/silero/src/main/java/com/konovalov/vad/silero/utils/AudioUtils.kt +47 -0
- package/android/silero/src/main/java/com/konovalov/vad/silero/utils/TensorMap.kt +41 -0
- package/android/silero/src/test/java/com/konovalov/vad/silero/utils/AudioUtilsTest.kt +44 -0
- package/android/src/main/AndroidManifest.xml +42 -0
- package/android/src/main/assets/G2Firmware/README.md +11 -0
- package/android/src/main/java/com/glassly/bluetoothsdk/BluetoothSdk.kt +2325 -0
- package/android/src/main/java/com/glassly/bluetoothsdk/BluetoothSdkAnalytics.kt +216 -0
- package/android/src/main/java/com/glassly/bluetoothsdk/BluetoothSdkDebug.kt +14 -0
- package/android/src/main/java/com/glassly/bluetoothsdk/BluetoothSdkDefaults.kt +7 -0
- package/android/src/main/java/com/glassly/bluetoothsdk/BluetoothSdkModule.kt +1088 -0
- package/android/src/main/java/com/glassly/bluetoothsdk/Bridge.kt +953 -0
- package/android/src/main/java/com/glassly/bluetoothsdk/DeviceManager.kt +2528 -0
- package/android/src/main/java/com/glassly/bluetoothsdk/DeviceStore.kt +360 -0
- package/android/src/main/java/com/glassly/bluetoothsdk/GeneratedChangelogCatalog.kt +8 -0
- package/android/src/main/java/com/glassly/bluetoothsdk/GeneratedReleaseMetadata.kt +11 -0
- package/android/src/main/java/com/glassly/bluetoothsdk/LocalNetworkModule.kt +414 -0
- package/android/src/main/java/com/glassly/bluetoothsdk/ObservableStore.kt +88 -0
- package/android/src/main/java/com/glassly/bluetoothsdk/OtaManifest.kt +191 -0
- package/android/src/main/java/com/glassly/bluetoothsdk/ReleaseChangelog.kt +61 -0
- package/android/src/main/java/com/glassly/bluetoothsdk/ScopedNetworkReadiness.kt +17 -0
- package/android/src/main/java/com/glassly/bluetoothsdk/audio/AudioModels.kt +144 -0
- package/android/src/main/java/com/glassly/bluetoothsdk/camera/CameraModels.kt +486 -0
- package/android/src/main/java/com/glassly/bluetoothsdk/connection/ConnectionModels.kt +78 -0
- package/android/src/main/java/com/glassly/bluetoothsdk/controllers/ControllerManager.kt +158 -0
- package/android/src/main/java/com/glassly/bluetoothsdk/controllers/R1.kt +937 -0
- package/android/src/main/java/com/glassly/bluetoothsdk/debug/BleTraceLogger.kt +165 -0
- package/android/src/main/java/com/glassly/bluetoothsdk/events/BluetoothEvents.kt +178 -0
- package/android/src/main/java/com/glassly/bluetoothsdk/internal/MapParsing.kt +140 -0
- package/android/src/main/java/com/glassly/bluetoothsdk/net/LocalIpv4.kt +57 -0
- package/android/src/main/java/com/glassly/bluetoothsdk/otaserver/LocalOtaServer.kt +304 -0
- package/android/src/main/java/com/glassly/bluetoothsdk/otaserver/OtaServerModule.kt +120 -0
- package/android/src/main/java/com/glassly/bluetoothsdk/photoreceiver/LocalPhotoReceiverRegistry.java +108 -0
- package/android/src/main/java/com/glassly/bluetoothsdk/photoreceiver/LocalPhotoUploadServer.kt +622 -0
- package/android/src/main/java/com/glassly/bluetoothsdk/photoreceiver/PhotoReceiverModule.kt +156 -0
- package/android/src/main/java/com/glassly/bluetoothsdk/requests/DisplayRequests.kt +56 -0
- package/android/src/main/java/com/glassly/bluetoothsdk/services/Foreground.kt +272 -0
- package/android/src/main/java/com/glassly/bluetoothsdk/services/PhoneMic.kt +1195 -0
- package/android/src/main/java/com/glassly/bluetoothsdk/sgcs/Ar99.java +2653 -0
- package/android/src/main/java/com/glassly/bluetoothsdk/sgcs/BesOtaHeartbeatGuard.kt +49 -0
- package/android/src/main/java/com/glassly/bluetoothsdk/sgcs/BesOtaProgressMapper.kt +27 -0
- package/android/src/main/java/com/glassly/bluetoothsdk/sgcs/G1.kt +3878 -0
- package/android/src/main/java/com/glassly/bluetoothsdk/sgcs/G1TextSanitizer.kt +38 -0
- package/android/src/main/java/com/glassly/bluetoothsdk/sgcs/G2.kt +6428 -0
- package/android/src/main/java/com/glassly/bluetoothsdk/sgcs/G2CfwClassification.kt +49 -0
- package/android/src/main/java/com/glassly/bluetoothsdk/sgcs/G2CfwRenderer.kt +1241 -0
- package/android/src/main/java/com/glassly/bluetoothsdk/sgcs/G2CfwTextureCache.kt +270 -0
- package/android/src/main/java/com/glassly/bluetoothsdk/sgcs/G2FlashProtocol.kt +291 -0
- package/android/src/main/java/com/glassly/bluetoothsdk/sgcs/G2Flasher.kt +411 -0
- package/android/src/main/java/com/glassly/bluetoothsdk/sgcs/GlasslyBle.java +43189 -0
- package/android/src/main/java/com/glassly/bluetoothsdk/sgcs/Mach1.kt +1280 -0
- package/android/src/main/java/com/glassly/bluetoothsdk/sgcs/MentraLive.kt +10817 -0
- package/android/src/main/java/com/glassly/bluetoothsdk/sgcs/MentraLiveL2capChannel.kt +274 -0
- package/android/src/main/java/com/glassly/bluetoothsdk/sgcs/MentraLivePairingAdvertisement.kt +54 -0
- package/android/src/main/java/com/glassly/bluetoothsdk/sgcs/MentraNex.kt +2011 -0
- package/android/src/main/java/com/glassly/bluetoothsdk/sgcs/Nimo.kt +2532 -0
- package/android/src/main/java/com/glassly/bluetoothsdk/sgcs/SGCManager.kt +470 -0
- package/android/src/main/java/com/glassly/bluetoothsdk/sgcs/Simulated.kt +228 -0
- package/android/src/main/java/com/glassly/bluetoothsdk/sgcs/ar99/ota/Ar99OtaManager.java +566 -0
- package/android/src/main/java/com/glassly/bluetoothsdk/sgcs/ar99/ota/OtaByteUtils.java +18 -0
- package/android/src/main/java/com/glassly/bluetoothsdk/sgcs/ar99/ota/OtaCommandConstants.java +35 -0
- package/android/src/main/java/com/glassly/bluetoothsdk/sgcs/ar99/ota/OtaCrc32Util.java +13 -0
- package/android/src/main/java/com/glassly/bluetoothsdk/sgcs/ar99/ota/OtaGattTransport.java +11 -0
- package/android/src/main/java/com/glassly/bluetoothsdk/sgcs/ar99/ota/OtaProtocol.java +92 -0
- package/android/src/main/java/com/glassly/bluetoothsdk/speakerid/SpeakerIdEngine.kt +525 -0
- package/android/src/main/java/com/glassly/bluetoothsdk/status/DeviceStatus.kt +669 -0
- package/android/src/main/java/com/glassly/bluetoothsdk/status/RuntimeState.kt +201 -0
- package/android/src/main/java/com/glassly/bluetoothsdk/status/WifiHotspotStatus.kt +189 -0
- package/android/src/main/java/com/glassly/bluetoothsdk/streaming/StreamModels.kt +518 -0
- package/android/src/main/java/com/glassly/bluetoothsdk/stt/STTTools.kt +391 -0
- package/android/src/main/java/com/glassly/bluetoothsdk/stt/SherpaOnnxTranscriber.kt +518 -0
- package/android/src/main/java/com/glassly/bluetoothsdk/stt/VadGateSpeechPolicy.kt +229 -0
- package/android/src/main/java/com/glassly/bluetoothsdk/tts/TTSTools.kt +248 -0
- package/android/src/main/java/com/glassly/bluetoothsdk/types/DeviceModels.kt +96 -0
- package/android/src/main/java/com/glassly/bluetoothsdk/utils/AES.java +106 -0
- package/android/src/main/java/com/glassly/bluetoothsdk/utils/AudioSessionMonitor.kt +189 -0
- package/android/src/main/java/com/glassly/bluetoothsdk/utils/AvifExifStripper.java +573 -0
- package/android/src/main/java/com/glassly/bluetoothsdk/utils/BitmapJavaUtils.java +169 -0
- package/android/src/main/java/com/glassly/bluetoothsdk/utils/BleJsonCompact.java +496 -0
- package/android/src/main/java/com/glassly/bluetoothsdk/utils/BlePhotoUploadService.java +677 -0
- package/android/src/main/java/com/glassly/bluetoothsdk/utils/BleWireProtocol.java +108 -0
- package/android/src/main/java/com/glassly/bluetoothsdk/utils/Constants.kt +46 -0
- package/android/src/main/java/com/glassly/bluetoothsdk/utils/G1Text.kt +436 -0
- package/android/src/main/java/com/glassly/bluetoothsdk/utils/HeifExifTagReader.java +199 -0
- package/android/src/main/java/com/glassly/bluetoothsdk/utils/IncidentLogBleRelayNaming.java +29 -0
- package/android/src/main/java/com/glassly/bluetoothsdk/utils/IncidentLogBleUploadService.java +77 -0
- package/android/src/main/java/com/glassly/bluetoothsdk/utils/K900LengthCodec.java +115 -0
- package/android/src/main/java/com/glassly/bluetoothsdk/utils/K900ProtocolUtils.java +827 -0
- package/android/src/main/java/com/glassly/bluetoothsdk/utils/MessageChunkReassembler.java +228 -0
- package/android/src/main/java/com/glassly/bluetoothsdk/utils/MessageChunker.java +325 -0
- package/android/src/main/java/com/glassly/bluetoothsdk/utils/NexSGCUtils.kt +698 -0
- package/android/src/main/java/com/glassly/bluetoothsdk/utils/PhoneAudioMonitor.kt +348 -0
- package/android/src/main/java/com/glassly/bluetoothsdk/utils/SmartGlassesConnectionState.java +9 -0
- package/android/src/main/java/com/glassly/bluetoothsdk/utils/audio/Ar99OpusPcmDecoder.java +398 -0
- package/android/src/main/java/com/glassly/bluetoothsdk/utils/audio/ByteUtilAudioPlayer.java +655 -0
- package/android/src/main/java/com/glassly/bluetoothsdk/utils/audio/Lc3Player.java +441 -0
- package/android/src/main/java/com/glassly/bluetoothsdk/utils/audio/PCMAudioPlayer.java +431 -0
- package/android/src/main/java/com/glassly/bluetoothsdk/utils/audio/PcmStreamPlayer.kt +328 -0
- package/android/src/main/res/values/strings.xml +4 -0
- package/android/src/test/java/com/glassly/bluetoothsdk/BluetoothSdkExceptionTest.kt +18 -0
- package/android/src/test/java/com/glassly/bluetoothsdk/OtaManifestDowngradeTest.kt +86 -0
- package/android/src/test/java/com/glassly/bluetoothsdk/OtaStartResponsePolicyTest.kt +30 -0
- package/android/src/test/java/com/glassly/bluetoothsdk/ReleaseChangelogTest.kt +13 -0
- package/android/src/test/java/com/glassly/bluetoothsdk/ScopedNetworkReadinessTest.kt +39 -0
- package/android/src/test/java/com/glassly/bluetoothsdk/StreamStatusEventTest.kt +29 -0
- package/android/src/test/java/com/glassly/bluetoothsdk/camera/PhotoRequestTest.kt +141 -0
- package/android/src/test/java/com/glassly/bluetoothsdk/otaserver/LocalOtaServerTest.kt +82 -0
- package/android/src/test/java/com/glassly/bluetoothsdk/photoreceiver/LocalPhotoReceiverRegistryTest.java +75 -0
- package/android/src/test/java/com/glassly/bluetoothsdk/services/ForegroundServiceTypeTest.kt +69 -0
- package/android/src/test/java/com/glassly/bluetoothsdk/sgcs/Ar99AdvertisementMatcherTest.java +22 -0
- package/android/src/test/java/com/glassly/bluetoothsdk/sgcs/BesOtaHeartbeatGuardTest.kt +73 -0
- package/android/src/test/java/com/glassly/bluetoothsdk/sgcs/BesOtaProgressMapperTest.kt +67 -0
- package/android/src/test/java/com/glassly/bluetoothsdk/sgcs/EvenRleTest.kt +63 -0
- package/android/src/test/java/com/glassly/bluetoothsdk/sgcs/G1TextSanitizerTest.kt +31 -0
- package/android/src/test/java/com/glassly/bluetoothsdk/sgcs/G2CfwClassificationTest.kt +89 -0
- package/android/src/test/java/com/glassly/bluetoothsdk/sgcs/G2CfwRendererTest.kt +344 -0
- package/android/src/test/java/com/glassly/bluetoothsdk/sgcs/G2CfwTextureCacheTest.kt +200 -0
- package/android/src/test/java/com/glassly/bluetoothsdk/sgcs/G2FlashProtocolTest.kt +131 -0
- package/android/src/test/java/com/glassly/bluetoothsdk/sgcs/MentraLiveGattCharacteristicsTest.kt +39 -0
- package/android/src/test/java/com/glassly/bluetoothsdk/sgcs/MentraLivePairingAdvertisementParserTest.kt +133 -0
- package/android/src/test/java/com/glassly/bluetoothsdk/sgcs/NimoProtocolTest.kt +333 -0
- package/android/src/test/java/com/glassly/bluetoothsdk/utils/AvifExifStripperTest.java +46 -0
- package/android/src/test/java/com/glassly/bluetoothsdk/utils/BinaryMessageChunkerTest.java +84 -0
- package/android/src/test/java/com/glassly/bluetoothsdk/utils/BleJsonCompactTest.java +319 -0
- package/android/src/test/java/com/glassly/bluetoothsdk/utils/BlePhotoUploadServiceTest.java +107 -0
- package/android/src/test/java/com/glassly/bluetoothsdk/utils/K900ProtocolUtilsEndiannessTest.java +172 -0
- package/android/src/test/java/com/glassly/bluetoothsdk/utils/K900ProtocolUtilsTest.java +24 -0
- package/android/src/test/java/com/glassly/bluetoothsdk/utils/PhoneAudioMonitorTest.kt +45 -0
- package/android/src/test/resources/avif_with_exif.avif +0 -0
- package/app.plugin.js +3 -0
- package/build/BluetoothSdk.types.d.ts +1354 -0
- package/build/BluetoothSdk.types.d.ts.map +1 -0
- package/build/BluetoothSdk.types.js +41 -0
- package/build/BluetoothSdk.types.js.map +1 -0
- package/build/_internal.d.ts +17 -0
- package/build/_internal.d.ts.map +1 -0
- package/build/_internal.js +16 -0
- package/build/_internal.js.map +1 -0
- package/build/_private/BluetoothSdkModule.d.ts +172 -0
- package/build/_private/BluetoothSdkModule.d.ts.map +1 -0
- package/build/_private/BluetoothSdkModule.js +300 -0
- package/build/_private/BluetoothSdkModule.js.map +1 -0
- package/build/_private/LocalNetworkModule.d.ts +38 -0
- package/build/_private/LocalNetworkModule.d.ts.map +1 -0
- package/build/_private/LocalNetworkModule.js +3 -0
- package/build/_private/LocalNetworkModule.js.map +1 -0
- package/build/_private/cameraRequestPayload.d.ts +4 -0
- package/build/_private/cameraRequestPayload.d.ts.map +1 -0
- package/build/_private/cameraRequestPayload.js +32 -0
- package/build/_private/cameraRequestPayload.js.map +1 -0
- package/build/_private/photoRequestPayload.d.ts +6 -0
- package/build/_private/photoRequestPayload.d.ts.map +1 -0
- package/build/_private/photoRequestPayload.js +86 -0
- package/build/_private/photoRequestPayload.js.map +1 -0
- package/build/_private/sdkOtaManifest.d.ts +11 -0
- package/build/_private/sdkOtaManifest.d.ts.map +1 -0
- package/build/_private/sdkOtaManifest.js +15 -0
- package/build/_private/sdkOtaManifest.js.map +1 -0
- package/build/changelogs.d.ts +7 -0
- package/build/changelogs.d.ts.map +1 -0
- package/build/changelogs.js +46 -0
- package/build/changelogs.js.map +1 -0
- package/build/debug.d.ts +3 -0
- package/build/debug.d.ts.map +1 -0
- package/build/debug.js +8 -0
- package/build/debug.js.map +1 -0
- package/build/generated/changelogCatalog.d.ts +9 -0
- package/build/generated/changelogCatalog.d.ts.map +1 -0
- package/build/generated/changelogCatalog.js +12 -0
- package/build/generated/changelogCatalog.js.map +1 -0
- package/build/generated/releaseMetadata.d.ts +12 -0
- package/build/generated/releaseMetadata.d.ts.map +1 -0
- package/build/generated/releaseMetadata.js +10 -0
- package/build/generated/releaseMetadata.js.map +1 -0
- package/build/index.d.ts +6 -0
- package/build/index.d.ts.map +1 -0
- package/build/index.js +171 -0
- package/build/index.js.map +1 -0
- package/build/ota-server/OtaServer.types.d.ts +14 -0
- package/build/ota-server/OtaServer.types.d.ts.map +1 -0
- package/build/ota-server/OtaServer.types.js +2 -0
- package/build/ota-server/OtaServer.types.js.map +1 -0
- package/build/ota-server/OtaServerModule.d.ts +21 -0
- package/build/ota-server/OtaServerModule.d.ts.map +1 -0
- package/build/ota-server/OtaServerModule.js +3 -0
- package/build/ota-server/OtaServerModule.js.map +1 -0
- package/build/ota-server/OtaServerModule.web.d.ts +10 -0
- package/build/ota-server/OtaServerModule.web.d.ts.map +1 -0
- package/build/ota-server/OtaServerModule.web.js +12 -0
- package/build/ota-server/OtaServerModule.web.js.map +1 -0
- package/build/ota-server/index.d.ts +3 -0
- package/build/ota-server/index.d.ts.map +1 -0
- package/build/ota-server/index.js +3 -0
- package/build/ota-server/index.js.map +1 -0
- package/build/ota-transport/index.d.ts +67 -0
- package/build/ota-transport/index.d.ts.map +1 -0
- package/build/ota-transport/index.js +58 -0
- package/build/ota-transport/index.js.map +1 -0
- package/build/photo-receiver/PhotoReceiver.types.d.ts +18 -0
- package/build/photo-receiver/PhotoReceiver.types.d.ts.map +1 -0
- package/build/photo-receiver/PhotoReceiver.types.js +2 -0
- package/build/photo-receiver/PhotoReceiver.types.js.map +1 -0
- package/build/photo-receiver/PhotoReceiverModule.d.ts +10 -0
- package/build/photo-receiver/PhotoReceiverModule.d.ts.map +1 -0
- package/build/photo-receiver/PhotoReceiverModule.js +3 -0
- package/build/photo-receiver/PhotoReceiverModule.js.map +1 -0
- package/build/photo-receiver/PhotoReceiverModule.web.d.ts +10 -0
- package/build/photo-receiver/PhotoReceiverModule.web.d.ts.map +1 -0
- package/build/photo-receiver/PhotoReceiverModule.web.js +12 -0
- package/build/photo-receiver/PhotoReceiverModule.web.js.map +1 -0
- package/build/photo-receiver/index.d.ts +3 -0
- package/build/photo-receiver/index.d.ts.map +1 -0
- package/build/photo-receiver/index.js +3 -0
- package/build/photo-receiver/index.js.map +1 -0
- package/build/react/index.d.ts +5 -0
- package/build/react/index.d.ts.map +1 -0
- package/build/react/index.js +4 -0
- package/build/react/index.js.map +1 -0
- package/build/react/useBluetooth.d.ts +100 -0
- package/build/react/useBluetooth.d.ts.map +1 -0
- package/build/react/useBluetooth.js +167 -0
- package/build/react/useBluetooth.js.map +1 -0
- package/build/react/useBluetoothEvent.d.ts +6 -0
- package/build/react/useBluetoothEvent.d.ts.map +1 -0
- package/build/react/useBluetoothEvent.js +21 -0
- package/build/react/useBluetoothEvent.js.map +1 -0
- package/build/react/useBluetoothScan.d.ts +22 -0
- package/build/react/useBluetoothScan.d.ts.map +1 -0
- package/build/react/useBluetoothScan.js +135 -0
- package/build/react/useBluetoothScan.js.map +1 -0
- package/build/react/useBluetoothStatus.d.ts +16 -0
- package/build/react/useBluetoothStatus.d.ts.map +1 -0
- package/build/react/useBluetoothStatus.js +137 -0
- package/build/react/useBluetoothStatus.js.map +1 -0
- package/build/react/useGlassesConnection.d.ts +29 -0
- package/build/react/useGlassesConnection.d.ts.map +1 -0
- package/build/react/useGlassesConnection.js +153 -0
- package/build/react/useGlassesConnection.js.map +1 -0
- package/build/types/index.d.ts +3 -0
- package/build/types/index.d.ts.map +1 -0
- package/build/types/index.js +2 -0
- package/build/types/index.js.map +1 -0
- package/expo-module.config.json +14 -0
- package/ios/BackgroundOtaArtifactDownloader.swift +125 -0
- package/ios/BluetoothSdkModule.swift +1034 -0
- package/ios/GlasslyBluetoothSDK.podspec +106 -0
- package/ios/LocalIPv4.swift +150 -0
- package/ios/LocalOtaServer.swift +309 -0
- package/ios/LocalPhotoUploadServer.swift +754 -0
- package/ios/OtaServerModule.swift +147 -0
- package/ios/Packages/CoreObjC/CoreObjC.xcodeproj/project.pbxproj +213 -0
- package/ios/Packages/CoreObjC/PcmConverter.h +22 -0
- package/ios/Packages/CoreObjC/PcmConverter.m +266 -0
- package/ios/Packages/CoreObjC/attdet.c +92 -0
- package/ios/Packages/CoreObjC/attdet.h +44 -0
- package/ios/Packages/CoreObjC/bits.c +375 -0
- package/ios/Packages/CoreObjC/bits.h +315 -0
- package/ios/Packages/CoreObjC/bwdet.c +129 -0
- package/ios/Packages/CoreObjC/bwdet.h +69 -0
- package/ios/Packages/CoreObjC/common.h +151 -0
- package/ios/Packages/CoreObjC/energy.c +70 -0
- package/ios/Packages/CoreObjC/energy.h +43 -0
- package/ios/Packages/CoreObjC/fastmath.h +158 -0
- package/ios/Packages/CoreObjC/include/PcmConverter.h +22 -0
- package/ios/Packages/CoreObjC/lc3.c +704 -0
- package/ios/Packages/CoreObjC/lc3.h +313 -0
- package/ios/Packages/CoreObjC/lc3_cpp.h +283 -0
- package/ios/Packages/CoreObjC/lc3_private.h +163 -0
- package/ios/Packages/CoreObjC/ltpf.c +905 -0
- package/ios/Packages/CoreObjC/ltpf.h +111 -0
- package/ios/Packages/CoreObjC/ltpf_arm.h +506 -0
- package/ios/Packages/CoreObjC/ltpf_neon.h +281 -0
- package/ios/Packages/CoreObjC/makefile.mk +35 -0
- package/ios/Packages/CoreObjC/mdct.c +469 -0
- package/ios/Packages/CoreObjC/mdct.h +57 -0
- package/ios/Packages/CoreObjC/mdct_neon.h +296 -0
- package/ios/Packages/CoreObjC/meson.build +61 -0
- package/ios/Packages/CoreObjC/plc.c +61 -0
- package/ios/Packages/CoreObjC/plc.h +57 -0
- package/ios/Packages/CoreObjC/rnnoise.h +114 -0
- package/ios/Packages/CoreObjC/sns.c +880 -0
- package/ios/Packages/CoreObjC/sns.h +103 -0
- package/ios/Packages/CoreObjC/spec.c +907 -0
- package/ios/Packages/CoreObjC/spec.h +119 -0
- package/ios/Packages/CoreObjC/tables.c +3457 -0
- package/ios/Packages/CoreObjC/tables.h +94 -0
- package/ios/Packages/CoreObjC/tns.c +457 -0
- package/ios/Packages/CoreObjC/tns.h +99 -0
- package/ios/Packages/SherpaOnnx/Model/joiner.onnx +0 -0
- package/ios/Packages/SherpaOnnx/Model/tokens.txt +502 -0
- package/ios/Packages/SherpaOnnx/SherpaOnnx.swift +2383 -0
- package/ios/Packages/SherpaOnnx/sherpa-onnx.xcframework/Info.plist +48 -0
- package/ios/Packages/SherpaOnnx/sherpa-onnx.xcframework/ios-arm64/Headers/sherpa-onnx/c-api/c-api.h +4689 -0
- package/ios/Packages/SherpaOnnx/sherpa-onnx.xcframework/ios-arm64/Headers/sherpa-onnx/c-api/cxx-api.h +2036 -0
- package/ios/Packages/SherpaOnnx/sherpa-onnx.xcframework/ios-arm64/libsherpa-onnx.a +0 -0
- package/ios/Packages/SherpaOnnx/sherpa-onnx.xcframework/ios-arm64_x86_64-simulator/Headers/sherpa-onnx/c-api/c-api.h +4689 -0
- package/ios/Packages/SherpaOnnx/sherpa-onnx.xcframework/ios-arm64_x86_64-simulator/Headers/sherpa-onnx/c-api/cxx-api.h +2036 -0
- package/ios/Packages/SherpaOnnx/sherpa-onnx.xcframework/ios-arm64_x86_64-simulator/libsherpa-onnx.a +0 -0
- package/ios/Packages/libbz2/module.modulemap +5 -0
- package/ios/Packages/libbz2/shim.h +1 -0
- package/ios/PhotoReceiverModule.swift +129 -0
- package/ios/Source/BluetoothSDK.swift +2303 -0
- package/ios/Source/BluetoothSDKDebug.swift +12 -0
- package/ios/Source/BluetoothSdkDefaults.swift +29 -0
- package/ios/Source/Bridge.swift +708 -0
- package/ios/Source/Bridging-Header.h +16 -0
- package/ios/Source/DeviceManager.swift +2109 -0
- package/ios/Source/DeviceStore.swift +336 -0
- package/ios/Source/GeneratedChangelogCatalog.swift +7 -0
- package/ios/Source/GeneratedReleaseMetadata.swift +11 -0
- package/ios/Source/ObservableStore.swift +118 -0
- package/ios/Source/OtaManifest.swift +211 -0
- package/ios/Source/PrivacyInfo.xcprivacy +23 -0
- package/ios/Source/ReleaseChangelog.swift +65 -0
- package/ios/Source/Resources/G2Firmware/README.md +10 -0
- package/ios/Source/audio/AudioModels.swift +178 -0
- package/ios/Source/audio/PcmStreamPlayer.swift +410 -0
- package/ios/Source/camera/CameraModels.swift +866 -0
- package/ios/Source/connection/ScanSession.swift +27 -0
- package/ios/Source/controllers/ControllerManager.swift +184 -0
- package/ios/Source/controllers/R1.swift +829 -0
- package/ios/Source/errors/BluetoothSdkError.swift +19 -0
- package/ios/Source/events/BluetoothEvents.swift +342 -0
- package/ios/Source/internal/BleTraceLogger.swift +192 -0
- package/ios/Source/internal/BluetoothAvailability.swift +78 -0
- package/ios/Source/internal/BluetoothSdkAnalytics.swift +199 -0
- package/ios/Source/internal/ValueParsing.swift +99 -0
- package/ios/Source/requests/DisplayRequests.swift +82 -0
- package/ios/Source/services/PhoneMic.swift +662 -0
- package/ios/Source/sgcs/Ar99.swift +2451 -0
- package/ios/Source/sgcs/Frame.swift +649 -0
- package/ios/Source/sgcs/G1.swift +2554 -0
- package/ios/Source/sgcs/G2.swift +6887 -0
- package/ios/Source/sgcs/G2CfwClassification.swift +43 -0
- package/ios/Source/sgcs/G2CfwRenderer.swift +1279 -0
- package/ios/Source/sgcs/G2CfwTextureCache.swift +233 -0
- package/ios/Source/sgcs/G2FlashProtocol.swift +312 -0
- package/ios/Source/sgcs/G2Flasher.swift +773 -0
- package/ios/Source/sgcs/Mach1.swift +541 -0
- package/ios/Source/sgcs/MentraLive.swift +7011 -0
- package/ios/Source/sgcs/MentraLiveL2capChannel.swift +183 -0
- package/ios/Source/sgcs/MentraLivePairingAdvertisement.swift +64 -0
- package/ios/Source/sgcs/MentraNex.swift +3221 -0
- package/ios/Source/sgcs/Nimo.swift +1886 -0
- package/ios/Source/sgcs/SGCManager.swift +608 -0
- package/ios/Source/sgcs/Simulated.swift +274 -0
- package/ios/Source/sgcs/ar99/ota/Ar99OtaManager.swift +637 -0
- package/ios/Source/sgcs/glassly_ble.pb.swift +4354 -0
- package/ios/Source/speakerid/SpeakerIdEngine.swift +573 -0
- package/ios/Source/status/DeviceStatus.swift +981 -0
- package/ios/Source/status/RuntimeState.swift +359 -0
- package/ios/Source/status/WifiHotspotStatus.swift +345 -0
- package/ios/Source/streaming/StreamModels.swift +693 -0
- package/ios/Source/stt/STTTools.swift +191 -0
- package/ios/Source/stt/SherpaOnnxTranscriber.swift +466 -0
- package/ios/Source/tts/TTSTools.swift +171 -0
- package/ios/Source/types/DeviceModels.swift +177 -0
- package/ios/Source/utils/AudioSessionMonitor.swift +283 -0
- package/ios/Source/utils/BinaryCodec.swift +61 -0
- package/ios/Source/utils/BleJsonCompact.swift +405 -0
- package/ios/Source/utils/BleWireProtocol.swift +92 -0
- package/ios/Source/utils/Constants.swift +78 -0
- package/ios/Source/utils/Enums.swift +95 -0
- package/ios/Source/utils/G1Text.swift +2096 -0
- package/ios/Source/utils/JSCExperiment.swift +241 -0
- package/ios/Source/utils/MemoryMonitor.swift +44 -0
- package/ios/Source/utils/MessageChunkReassembler.swift +190 -0
- package/ios/Source/utils/MessageChunker.swift +294 -0
- package/ios/Source/utils/Models.swift +135 -0
- package/ios/Source/utils/PhoneAudioMonitor.swift +230 -0
- package/ios/Source/utils/TarBz2Extractor.swift +257 -0
- package/ios/Tests/BluetoothSDKTests/G2CfwClassificationTests.swift +78 -0
- package/ios/Tests/BluetoothSDKTests/G2CfwRendererTests.swift +372 -0
- package/ios/Tests/BluetoothSDKTests/G2CfwTextureCacheTests.swift +162 -0
- package/ios/Tests/BluetoothSDKTests/G2FlashProtocolTests.swift +182 -0
- package/ios/Tests/MentraLivePairingAdvertisementTests.swift +160 -0
- package/ios/Tests/ReleaseChangelogTests.swift +13 -0
- package/package.json +129 -0
- package/plugin/build/index.d.ts +10 -0
- package/plugin/build/index.js +12 -0
- package/plugin/build/withAndroid.d.ts +3 -0
- package/plugin/build/withAndroid.js +190 -0
- package/plugin/build/withIos.d.ts +5 -0
- package/plugin/build/withIos.js +108 -0
- package/scripts/inject-ios-sdk-version.mjs +65 -0
- package/scripts/public-ota-api.test.mjs +37 -0
- package/scripts/verify-release-package.mjs +45 -0
- package/scripts/write-release-metadata.mjs +152 -0
- package/scripts/write-release-metadata.test.mjs +37 -0
- package/src/BluetoothSdk.types.ts +1623 -0
- package/src/_internal.ts +16 -0
- package/src/_private/BluetoothSdkModule.ts +684 -0
- package/src/_private/LocalNetworkModule.ts +50 -0
- package/src/_private/cameraRequestPayload.ts +34 -0
- package/src/_private/photoRequestPayload.ts +90 -0
- package/src/_private/sdkOtaManifest.ts +18 -0
- package/src/changelogs.ts +46 -0
- package/src/debug.ts +9 -0
- package/src/generated/changelogCatalog.ts +13 -0
- package/src/generated/releaseMetadata.ts +20 -0
- package/src/index.ts +321 -0
- package/src/ota-server/OtaServer.types.ts +10 -0
- package/src/ota-server/OtaServerModule.ts +23 -0
- package/src/ota-server/OtaServerModule.web.ts +17 -0
- package/src/ota-server/index.ts +2 -0
- package/src/ota-transport/index.ts +116 -0
- package/src/photo-receiver/PhotoReceiver.types.ts +20 -0
- package/src/photo-receiver/PhotoReceiverModule.ts +11 -0
- package/src/photo-receiver/PhotoReceiverModule.web.ts +17 -0
- package/src/photo-receiver/index.ts +2 -0
- package/src/react/index.ts +21 -0
- package/src/react/useBluetooth.ts +309 -0
- package/src/react/useBluetoothEvent.ts +35 -0
- package/src/react/useBluetoothScan.ts +173 -0
- package/src/react/useBluetoothStatus.ts +180 -0
- package/src/react/useGlassesConnection.ts +202 -0
- package/src/types/index.ts +12 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sdkOtaManifest.js","sourceRoot":"","sources":["../../src/_private/sdkOtaManifest.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAC,8BAA8B,EAAC,MAAM,8BAA8B,CAAA;AAE3E,MAAM,WAAW,GAAG,OAAO,CAAC,oBAAoB,CAAuB,CAAA;AAEvE,8DAA8D;AAC9D,MAAM,CAAC,MAAM,qBAAqB,GAAW,CAAC,WAAW,CAAC,OAAO,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,CAAA;AAE/E;;GAEG;AACH,MAAM,UAAU,uBAAuB;IACrC,OAAO,8BAA8B,CAAC,cAAc,CAAA;AACtD,CAAC","sourcesContent":["/**\n * Release CI embeds one immutable OTA manifest URL into every SDK distribution.\n * Source builds remain unpinned and must opt in through the debug configuration API.\n */\n\nimport {BLUETOOTH_SDK_RELEASE_METADATA} from \"../generated/releaseMetadata\"\n\nconst packageJson = require(\"../../package.json\") as {version?: string}\n\n/** This Bluetooth SDK package's own version, as published. */\nexport const BLUETOOTH_SDK_VERSION: string = (packageJson.version ?? \"\").trim()\n\n/**\n * The immutable manifest URL embedded by release CI, or null for an unpinned source build.\n */\nexport function sdkPinnedOtaManifestUrl(): string | null {\n return BLUETOOTH_SDK_RELEASE_METADATA.otaManifestUrl\n}\n"]}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { ReleaseChangelog } from "./BluetoothSdk.types";
|
|
2
|
+
/**
|
|
3
|
+
* Return authored release notes crossed between two product versions, newest first.
|
|
4
|
+
* The target release is always included, including transitions within one base train.
|
|
5
|
+
*/
|
|
6
|
+
export declare function getReleaseChangelogs(fromVersion?: string | null, toVersion?: string | null): ReleaseChangelog[];
|
|
7
|
+
//# sourceMappingURL=changelogs.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"changelogs.d.ts","sourceRoot":"","sources":["../src/changelogs.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,gBAAgB,EAAC,MAAM,sBAAsB,CAAA;AAuB1D;;;GAGG;AACH,wBAAgB,oBAAoB,CAAC,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,EAAE,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,gBAAgB,EAAE,CAkB/G"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { GENERATED_RELEASE_CHANGELOGS } from "./generated/changelogCatalog";
|
|
2
|
+
import { BLUETOOTH_SDK_RELEASE_METADATA } from "./generated/releaseMetadata";
|
|
3
|
+
const BASE_VERSION_PATTERN = /^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:[-+].*)?$/;
|
|
4
|
+
function baseVersion(version, label) {
|
|
5
|
+
const match = BASE_VERSION_PATTERN.exec(version.trim());
|
|
6
|
+
if (!match)
|
|
7
|
+
throw new Error(`${label} must be a semantic version such as 3.1.0, 3.1.0-dev.4, or 3.1.0-beta.2`);
|
|
8
|
+
return `${match[1]}.${match[2]}.${match[3]}`;
|
|
9
|
+
}
|
|
10
|
+
function compareVersions(left, right) {
|
|
11
|
+
const a = left.split(".").map(Number);
|
|
12
|
+
const b = right.split(".").map(Number);
|
|
13
|
+
for (let index = 0; index < 3; index += 1) {
|
|
14
|
+
const left = a[index] ?? 0;
|
|
15
|
+
const right = b[index] ?? 0;
|
|
16
|
+
if (left !== right)
|
|
17
|
+
return left - right;
|
|
18
|
+
}
|
|
19
|
+
return 0;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Return authored release notes crossed between two product versions, newest first.
|
|
23
|
+
* The target release is always included, including transitions within one base train.
|
|
24
|
+
*/
|
|
25
|
+
export function getReleaseChangelogs(fromVersion, toVersion) {
|
|
26
|
+
const fallbackTarget = BLUETOOTH_SDK_RELEASE_METADATA.familyBaseVersion ?? GENERATED_RELEASE_CHANGELOGS[0]?.version;
|
|
27
|
+
if (!fallbackTarget && !toVersion)
|
|
28
|
+
return [];
|
|
29
|
+
const target = baseVersion(toVersion ?? fallbackTarget, "toVersion");
|
|
30
|
+
if (!GENERATED_RELEASE_CHANGELOGS.some(({ version }) => version === target)) {
|
|
31
|
+
throw new Error(`No changelog is bundled for target version ${target}`);
|
|
32
|
+
}
|
|
33
|
+
if (!fromVersion) {
|
|
34
|
+
return GENERATED_RELEASE_CHANGELOGS.filter(({ version }) => version === target).map((entry) => ({ ...entry }));
|
|
35
|
+
}
|
|
36
|
+
const source = baseVersion(fromVersion, "fromVersion");
|
|
37
|
+
const direction = compareVersions(target, source);
|
|
38
|
+
return GENERATED_RELEASE_CHANGELOGS.filter(({ version }) => {
|
|
39
|
+
if (direction === 0)
|
|
40
|
+
return version === target;
|
|
41
|
+
if (direction > 0)
|
|
42
|
+
return compareVersions(version, source) > 0 && compareVersions(version, target) <= 0;
|
|
43
|
+
return compareVersions(version, source) < 0 && compareVersions(version, target) >= 0;
|
|
44
|
+
}).map((entry) => ({ ...entry }));
|
|
45
|
+
}
|
|
46
|
+
//# sourceMappingURL=changelogs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"changelogs.js","sourceRoot":"","sources":["../src/changelogs.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,4BAA4B,EAAC,MAAM,8BAA8B,CAAA;AACzE,OAAO,EAAC,8BAA8B,EAAC,MAAM,6BAA6B,CAAA;AAE1E,MAAM,oBAAoB,GAAG,uDAAuD,CAAA;AAEpF,SAAS,WAAW,CAAC,OAAe,EAAE,KAAa;IACjD,MAAM,KAAK,GAAG,oBAAoB,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC,CAAA;IACvD,IAAI,CAAC,KAAK;QAAE,MAAM,IAAI,KAAK,CAAC,GAAG,KAAK,yEAAyE,CAAC,CAAA;IAC9G,OAAO,GAAG,KAAK,CAAC,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,CAAC,EAAE,CAAA;AAC9C,CAAC;AAED,SAAS,eAAe,CAAC,IAAY,EAAE,KAAa;IAClD,MAAM,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,CAAA;IACrC,MAAM,CAAC,GAAG,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,CAAA;IACtC,KAAK,IAAI,KAAK,GAAG,CAAC,EAAE,KAAK,GAAG,CAAC,EA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AAE,EAAE;QACvD,IAAI,SAAS,KAAK,CAAC;YAAE,OAAO,OAAO,KAAK,MAAM,CAAA;QAC9C,IAAI,SAAS,GAAG,CAAC;YAAE,OAAO,eAAe,CAAC,OAAO,EAAE,MAAM,CAAC,GAAG,CAAC,IAAI,eAAe,CAAC,OAAO,EAAE,MAAM,CAAC,IAAI,CAAC,CAAA;QACvG,OAAO,eAAe,CAAC,OAAO,EAAE,MAAM,CAAC,GAAG,CAAC,IAAI,eAAe,CAAC,OAAO,EAAE,MAAM,CAAC,IAAI,CAAC,CAAA;IACtF,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,EAAC,GAAG,KAAK,EAAC,CAAC,CAAC,CAAA;AACjC,CAAC","sourcesContent":["import type {ReleaseChangelog} from \"./BluetoothSdk.types\"\nimport {GENERATED_RELEASE_CHANGELOGS} from \"./generated/changelogCatalog\"\nimport {BLUETOOTH_SDK_RELEASE_METADATA} from \"./generated/releaseMetadata\"\n\nconst BASE_VERSION_PATTERN = /^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:[-+].*)?$/\n\nfunction baseVersion(version: string, label: string): string {\n const match = BASE_VERSION_PATTERN.exec(version.trim())\n if (!match) throw new Error(`${label} must be a semantic version such as 3.1.0, 3.1.0-dev.4, or 3.1.0-beta.2`)\n return `${match[1]}.${match[2]}.${match[3]}`\n}\n\nfunction compareVersions(left: string, right: string): number {\n const a = left.split(\".\").map(Number)\n const b = right.split(\".\").map(Number)\n for (let index = 0; index < 3; index += 1) {\n const left = a[index] ?? 0\n const right = b[index] ?? 0\n if (left !== right) return left - right\n }\n return 0\n}\n\n/**\n * Return authored release notes crossed between two product versions, newest first.\n * The target release is always included, including transitions within one base train.\n */\nexport function getReleaseChangelogs(fromVersion?: string | null, toVersion?: string | null): ReleaseChangelog[] {\n const fallbackTarget = BLUETOOTH_SDK_RELEASE_METADATA.familyBaseVersion ?? GENERATED_RELEASE_CHANGELOGS[0]?.version\n if (!fallbackTarget && !toVersion) return []\n const target = baseVersion(toVersion ?? fallbackTarget, \"toVersion\")\n if (!GENERATED_RELEASE_CHANGELOGS.some(({version}) => version === target)) {\n throw new Error(`No changelog is bundled for target version ${target}`)\n }\n if (!fromVersion) {\n return GENERATED_RELEASE_CHANGELOGS.filter(({version}) => version === target).map((entry) => ({...entry}))\n }\n\n const source = baseVersion(fromVersion, \"fromVersion\")\n const direction = compareVersions(target, source)\n return GENERATED_RELEASE_CHANGELOGS.filter(({version}) => {\n if (direction === 0) return version === target\n if (direction > 0) return compareVersions(version, source) > 0 && compareVersions(version, target) <= 0\n return compareVersions(version, source) < 0 && compareVersions(version, target) >= 0\n }).map((entry) => ({...entry}))\n}\n"]}
|
package/build/debug.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"debug.d.ts","sourceRoot":"","sources":["../src/debug.ts"],"names":[],"mappings":"AAEA,wBAAgB,gBAAgB,CAAC,aAAa,EAAE,MAAM,GAAG,IAAI,CAE5D;AAED,wBAAgB,gBAAgB,IAAI,MAAM,CAEzC"}
|
package/build/debug.js
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import PrivateBluetoothSdkModule from "./_private/BluetoothSdkModule";
|
|
2
|
+
export function setOtaVersionUrl(otaVersionUrl) {
|
|
3
|
+
PrivateBluetoothSdkModule.setOtaVersionUrl(otaVersionUrl);
|
|
4
|
+
}
|
|
5
|
+
export function getOtaVersionUrl() {
|
|
6
|
+
return PrivateBluetoothSdkModule.getOtaVersionUrl();
|
|
7
|
+
}
|
|
8
|
+
//# sourceMappingURL=debug.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"debug.js","sourceRoot":"","sources":["../src/debug.ts"],"names":[],"mappings":"AAAA,OAAO,yBAAyB,MAAM,+BAA+B,CAAA;AAErE,MAAM,UAAU,gBAAgB,CAAC,aAAqB;IACpD,yBAAyB,CAAC,gBAAgB,CAAC,aAAa,CAAC,CAAA;AAC3D,CAAC;AAED,MAAM,UAAU,gBAAgB;IAC9B,OAAO,yBAAyB,CAAC,gBAAgB,EAAE,CAAA;AACrD,CAAC","sourcesContent":["import PrivateBluetoothSdkModule from \"./_private/BluetoothSdkModule\"\n\nexport function setOtaVersionUrl(otaVersionUrl: string): void {\n PrivateBluetoothSdkModule.setOtaVersionUrl(otaVersionUrl)\n}\n\nexport function getOtaVersionUrl(): string {\n return PrivateBluetoothSdkModule.getOtaVersionUrl()\n}\n"]}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/** Generated from /changelogs. Do not edit directly. */
|
|
2
|
+
export declare const GENERATED_RELEASE_CHANGELOGS: readonly [{
|
|
3
|
+
readonly version: "3.1.0";
|
|
4
|
+
readonly markdown: "Software updates are more reliable, with clearer progress and recovery when the glasses restart.\n\n- GlasslyOS, Glassly Engine, the Bluetooth SDK, and the glasses client now share one coordinated release version.\n- Mentra Live updates can continue across APK, system, and firmware restarts without asking the user to start the same update again.\n- Bluetooth photo capture and transfer diagnostics are more precise and less disruptive to normal glasses traffic.";
|
|
5
|
+
}, {
|
|
6
|
+
readonly version: "0.1.0";
|
|
7
|
+
readonly markdown: "First coordinated Glassly release: the app, Glassly Engine, and the Bluetooth SDK now ship one shared release version.\n\n- The Glassly App, Glassly Engine, and the Bluetooth SDK are versioned and published together.\n- Mentra Live updates can continue across APK, system, and firmware restarts without asking the user to start the same update again.\n- Bluetooth photo capture and transfer diagnostics are more precise and less disruptive to normal glasses traffic.";
|
|
8
|
+
}];
|
|
9
|
+
//# sourceMappingURL=changelogCatalog.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"changelogCatalog.d.ts","sourceRoot":"","sources":["../../src/generated/changelogCatalog.ts"],"names":[],"mappings":"AAAA,wDAAwD;AACxD,eAAO,MAAM,4BAA4B;;;;;;EAWxC,CAAA"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/** Generated from /changelogs. Do not edit directly. */
|
|
2
|
+
export const GENERATED_RELEASE_CHANGELOGS = Object.freeze([
|
|
3
|
+
{
|
|
4
|
+
"version": "3.1.0",
|
|
5
|
+
"markdown": "Software updates are more reliable, with clearer progress and recovery when the glasses restart.\n\n- GlasslyOS, Glassly Engine, the Bluetooth SDK, and the glasses client now share one coordinated release version.\n- Mentra Live updates can continue across APK, system, and firmware restarts without asking the user to start the same update again.\n- Bluetooth photo capture and transfer diagnostics are more precise and less disruptive to normal glasses traffic."
|
|
6
|
+
},
|
|
7
|
+
{
|
|
8
|
+
"version": "0.1.0",
|
|
9
|
+
"markdown": "First coordinated Glassly release: the app, Glassly Engine, and the Bluetooth SDK now ship one shared release version.\n\n- The Glassly App, Glassly Engine, and the Bluetooth SDK are versioned and published together.\n- Mentra Live updates can continue across APK, system, and firmware restarts without asking the user to start the same update again.\n- Bluetooth photo capture and transfer diagnostics are more precise and less disruptive to normal glasses traffic."
|
|
10
|
+
}
|
|
11
|
+
]);
|
|
12
|
+
//# sourceMappingURL=changelogCatalog.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"changelogCatalog.js","sourceRoot":"","sources":["../../src/generated/changelogCatalog.ts"],"names":[],"mappings":"AAAA,wDAAwD;AACxD,MAAM,CAAC,MAAM,4BAA4B,GAAG,MAAM,CAAC,MAAM,CACzD;IACE;QACE,SAAS,EAAE,OAAO;QAClB,UAAU,EAAE,idAAid;KAC9d;IACD;QACE,SAAS,EAAE,OAAO;QAClB,UAAU,EAAE,odAAod;KACje;CACO,CACT,CAAA","sourcesContent":["/** Generated from /changelogs. Do not edit directly. */\nexport const GENERATED_RELEASE_CHANGELOGS = Object.freeze(\n[\n {\n \"version\": \"3.1.0\",\n \"markdown\": \"Software updates are more reliable, with clearer progress and recovery when the glasses restart.\\n\\n- GlasslyOS, Glassly Engine, the Bluetooth SDK, and the glasses client now share one coordinated release version.\\n- Mentra Live updates can continue across APK, system, and firmware restarts without asking the user to start the same update again.\\n- Bluetooth photo capture and transfer diagnostics are more precise and less disruptive to normal glasses traffic.\"\n },\n {\n \"version\": \"0.1.0\",\n \"markdown\": \"First coordinated Glassly release: the app, Glassly Engine, and the Bluetooth SDK now ship one shared release version.\\n\\n- The Glassly App, Glassly Engine, and the Bluetooth SDK are versioned and published together.\\n- Mentra Live updates can continue across APK, system, and firmware restarts without asking the user to start the same update again.\\n- Bluetooth photo capture and transfer diagnostics are more precise and less disruptive to normal glasses traffic.\"\n }\n] as const,\n)\n"]}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/** Generated by release CI. Do not edit in a release checkout. */
|
|
2
|
+
export interface BluetoothSdkReleaseMetadata {
|
|
3
|
+
schemaVersion: 1;
|
|
4
|
+
familyBaseVersion: string | null;
|
|
5
|
+
releaseIdentity: string | null;
|
|
6
|
+
releaseSetId: string | null;
|
|
7
|
+
sourceCommit: string | null;
|
|
8
|
+
otaManifestUrl: string | null;
|
|
9
|
+
otaManifestSha256: string | null;
|
|
10
|
+
}
|
|
11
|
+
export declare const BLUETOOTH_SDK_RELEASE_METADATA: Readonly<BluetoothSdkReleaseMetadata>;
|
|
12
|
+
//# sourceMappingURL=releaseMetadata.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"releaseMetadata.d.ts","sourceRoot":"","sources":["../../src/generated/releaseMetadata.ts"],"names":[],"mappings":"AAAA,kEAAkE;AAClE,MAAM,WAAW,2BAA2B;IAC1C,aAAa,EAAE,CAAC,CAAA;IAChB,iBAAiB,EAAE,MAAM,GAAG,IAAI,CAAA;IAChC,eAAe,EAAE,MAAM,GAAG,IAAI,CAAA;IAC9B,YAAY,EAAE,MAAM,GAAG,IAAI,CAAA;IAC3B,YAAY,EAAE,MAAM,GAAG,IAAI,CAAA;IAC3B,cAAc,EAAE,MAAM,GAAG,IAAI,CAAA;IAC7B,iBAAiB,EAAE,MAAM,GAAG,IAAI,CAAA;CACjC;AAED,eAAO,MAAM,8BAA8B,EAAE,QAAQ,CAAC,2BAA2B,CAQ/E,CAAA"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export const BLUETOOTH_SDK_RELEASE_METADATA = Object.freeze({
|
|
2
|
+
"schemaVersion": 1,
|
|
3
|
+
"familyBaseVersion": "0.1.0",
|
|
4
|
+
"releaseIdentity": "0.1.0-dev.26",
|
|
5
|
+
"releaseSetId": "glassly-0.1.0-dev.26",
|
|
6
|
+
"sourceCommit": "b63f66924c61de31540b5093d05ff036c756ed74",
|
|
7
|
+
"otaManifestUrl": null,
|
|
8
|
+
"otaManifestSha256": null
|
|
9
|
+
});
|
|
10
|
+
//# sourceMappingURL=releaseMetadata.js.map
|
|
@@ -0,0 +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,cAAc;IACjC,cAAc,EAAE,sBAAsB;IACtC,cAAc,EAAE,0CAA0C;IAC1D,gBAAgB,EAAE,IAAI;IACtB,mBAAmB,EAAE,IAAI;CAC1B,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\": \"0.1.0\",\n \"releaseIdentity\": \"0.1.0-dev.26\",\n \"releaseSetId\": \"glassly-0.1.0-dev.26\",\n \"sourceCommit\": \"b63f66924c61de31540b5093d05ff036c756ed74\",\n \"otaManifestUrl\": null,\n \"otaManifestSha256\": null\n})\n"]}
|
package/build/index.d.ts
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { BluetoothSdkPublicModule } from "./BluetoothSdk.types";
|
|
2
|
+
export declare const BluetoothSdk: BluetoothSdkPublicModule;
|
|
3
|
+
export default BluetoothSdk;
|
|
4
|
+
export { CAMERA_FOV_DEFAULT, CAMERA_FOV_MAX, CAMERA_FOV_MIN, DeviceModels, isBusyGlassesConnectionStatus, isConnectedGlassesConnectionStatus, isConnectedWifiStatus, isEnabledHotspotStatus, isReadyGlassesConnectionStatus, } from "./BluetoothSdk.types";
|
|
5
|
+
export type { AccelEvent, Ar99OtaStatusEvent, AudioConnectedEvent, AudioDisconnectedEvent, AudioPairingNeededEvent, BatteryStatusEvent, BluetoothSdkEvent, BluetoothSdkEventListener, BluetoothSdkEventMap, BluetoothSdkEventName, BluetoothSdkPublicModule as BluetoothSdkModule, BluetoothSdkSubscription, ButtonPhotoSize, PhotoCaptureDefaults, ButtonPressEvent, CameraFovPreset, CameraFovRequest, CameraFovResult, CameraRoiPosition, CompatibleGlassesSearchStopEvent, ConnectOptions, ConnectedGlassesConnectionStatus, ConnectedWifiStatus, Device, DeviceModel, EnabledHotspotStatus, GalleryStatusEvent, G2FirmwareArtifact, G2FirmwareFlashProgressEvent, G2FirmwareFlashResult, G2FirmwareTarget, GlassesConnectionStatus, GlassesMediaVolumeGetResult, GlassesMediaVolumeSetResult, GlassesNotReadyEvent, HeadUpEvent, HotspotErrorEvent, HotspotStatus, HotspotStatusChangeEvent, GlassesSessionChangedEvent, KeepAliveAckEvent, LocalTranscriptionEvent, LogEvent, MicLc3Event, MicHealthEvent, MicMode, MicPcmEvent, MicPreference, OtaStartAckEvent, OtaProgress, OtaProgressStatus, OtaStage, OtaStatus, OtaStatusEvent, OtaQueryResult, OtaUpdateInfo, ReleaseChangelog, SpeakerEnrollProgressEvent, SpeakerEnrollResultEvent, MtkUpdateCompleteEvent, PairFailureEvent, PairingInfoEvent, EnteringPairingModeEvent, OwnerReplacedEvent, PhotoCaptureMetadata, PhotoResolvedConfig, PhotoCompression, PhotoFpsRange, PhotoMeteredPreview, PhotoMode, PublicBluetoothStatus, PublicGlassesStatus, PhotoTransferMethod, PhotoResponseEvent, PhotoRequestedCaptureConfig, PhotoRequestParams, PhotoSize, PhotoStatusEvent, PhotoStatusState, PhotoSuccessResponseEvent, RgbLedAction, RgbLedColor, RgbLedControlResponseEvent, RgbLedControlSuccessResponseEvent, ScanModelOptions, ScanOptions, ScanResultsCallback, SpeakingStatusEvent, SettingsAckEvent, SettingsAckSetting, SettingsAckSuccessEvent, SettingsAckSuccessStatus, SettingsAckStatus, StreamAudioConfig, StreamResolvedConfig, StreamStartRequest, StreamStatusEvent, StreamStatusLifecycleState, StreamStatusReconnectState, StreamStatusState, StreamVideoConfig, SwipeVolumeStatusEvent, SwitchStatusEvent, TouchEvent, VideoRecordingDefaults, VideoRecordingStartedStatusEvent, VideoRecordingStatusEvent, VideoRecordingStatusState, VideoRecordingStoppedStatusEvent, VideoRecordingSuccessStatusEvent, VersionInfoEvent, VersionInfoResult, WifiScanResultEvent, VoiceActivityDetectionStatusEvent, WifiSearchResult, WifiStatus, WifiStatusChangeEvent, } from "./BluetoothSdk.types";
|
|
6
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAGV,wBAAwB,EAIzB,MAAM,sBAAsB,CAAA;AA+E7B,eAAO,MAAM,YAAY,EAAE,wBAmGzB,CAAA;AAEF,eAAe,YAAY,CAAA;AAE3B,OAAO,EACL,kBAAkB,EAClB,cAAc,EACd,cAAc,EACd,YAAY,EACZ,6BAA6B,EAC7B,kCAAkC,EAClC,qBAAqB,EACrB,sBAAsB,EACtB,8BAA8B,GAC/B,MAAM,sBAAsB,CAAA;AAE7B,YAAY,EACV,UAAU,E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ACvB,wBAAwB,EACxB,iBAAiB,EACjB,iBAAiB,EACjB,oBAAoB,EACpB,kBAAkB,EAClB,iBAAiB,EACjB,0BAA0B,EAC1B,0BAA0B,EAC1B,iBAAiB,EACjB,iBAAiB,EACjB,sBAAsB,EACtB,iBAAiB,EACjB,UAAU,EACV,sBAAsB,EACtB,gCAAgC,EAChC,yBAAyB,EACzB,yBAAyB,EACzB,gCAAgC,EAChC,gCAAgC,EAChC,gBAAgB,EAChB,iBAAiB,EACjB,mBAAmB,EACnB,iCAAiC,EACjC,gBAAgB,EAChB,UAAU,EACV,qBAAqB,GACtB,MAAM,sBAAsB,CAAA"}
|
package/build/index.js
ADDED
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
import PrivateBluetoothSdkModule from "./_private/BluetoothSdkModule";
|
|
2
|
+
import { getReleaseChangelogs } from "./changelogs";
|
|
3
|
+
const PUBLIC_EVENT_NAMES = new Set([
|
|
4
|
+
"log",
|
|
5
|
+
"device_discovered",
|
|
6
|
+
"default_device_changed",
|
|
7
|
+
"glasses_not_ready",
|
|
8
|
+
"button_press",
|
|
9
|
+
"touch_event",
|
|
10
|
+
"accel_event",
|
|
11
|
+
"head_up",
|
|
12
|
+
"voice_activity_detection_status",
|
|
13
|
+
"speaking_status",
|
|
14
|
+
"battery_status",
|
|
15
|
+
"local_transcription",
|
|
16
|
+
"wifi_status_change",
|
|
17
|
+
"wifi_scan_result",
|
|
18
|
+
"hotspot_status_change",
|
|
19
|
+
"hotspot_error",
|
|
20
|
+
"photo_response",
|
|
21
|
+
"photo_status",
|
|
22
|
+
"camera_status",
|
|
23
|
+
"video_recording_status",
|
|
24
|
+
"media_success",
|
|
25
|
+
"media_error",
|
|
26
|
+
"gallery_status",
|
|
27
|
+
"compatible_glasses_search_stop",
|
|
28
|
+
"swipe_volume_status",
|
|
29
|
+
"switch_status",
|
|
30
|
+
"rgb_led_control_response",
|
|
31
|
+
"settings_ack",
|
|
32
|
+
"pair_failure",
|
|
33
|
+
"pairing_info",
|
|
34
|
+
"entering_pairing_mode",
|
|
35
|
+
"owner_replaced",
|
|
36
|
+
"audio_pairing_needed",
|
|
37
|
+
"audio_connected",
|
|
38
|
+
"audio_disconnected",
|
|
39
|
+
"mic_pcm",
|
|
40
|
+
"mic_lc3",
|
|
41
|
+
"mic_health",
|
|
42
|
+
"stream_status",
|
|
43
|
+
"mtk_update_complete",
|
|
44
|
+
"glasses_session_changed",
|
|
45
|
+
"ota_start_ack",
|
|
46
|
+
"ota_status",
|
|
47
|
+
"ar99_ota_status",
|
|
48
|
+
"g2_firmware_flash_progress",
|
|
49
|
+
"version_info",
|
|
50
|
+
"extraction_progress",
|
|
51
|
+
]);
|
|
52
|
+
const addListener = (eventName, listener) => {
|
|
53
|
+
if (!PUBLIC_EVENT_NAMES.has(eventName)) {
|
|
54
|
+
throw new Error(`Unsupported BluetoothSdk event "${eventName}". Use @glassly/bluetooth-sdk/react for status state.`);
|
|
55
|
+
}
|
|
56
|
+
return PrivateBluetoothSdkModule.addListener(eventName, listener);
|
|
57
|
+
};
|
|
58
|
+
const startOtaUpdate = (otaVersionUrl) => {
|
|
59
|
+
return PrivateBluetoothSdkModule.startOtaUpdate(otaVersionUrl);
|
|
60
|
+
};
|
|
61
|
+
const queryOtaStatus = () => {
|
|
62
|
+
return PrivateBluetoothSdkModule.sendOtaQueryStatus();
|
|
63
|
+
};
|
|
64
|
+
const bindPublicMethod = (name) => {
|
|
65
|
+
const method = PrivateBluetoothSdkModule[name];
|
|
66
|
+
if (typeof method === "function") {
|
|
67
|
+
return method.bind(PrivateBluetoothSdkModule);
|
|
68
|
+
}
|
|
69
|
+
return (async () => {
|
|
70
|
+
throw new Error(`BluetoothSdk.${String(name)} is not available in this native build. Rebuild the app.`);
|
|
71
|
+
});
|
|
72
|
+
};
|
|
73
|
+
export const BluetoothSdk = Object.freeze({
|
|
74
|
+
addListener,
|
|
75
|
+
getGlassesStatus: bindPublicMethod("getGlassesStatus"),
|
|
76
|
+
getBluetoothStatus: bindPublicMethod("getBluetoothStatus"),
|
|
77
|
+
subscribeGlassesStatus: (listener) => PrivateBluetoothSdkModule.onGlassesStatus(listener),
|
|
78
|
+
subscribeBluetoothStatus: (listener) => PrivateBluetoothSdkModule.onBluetoothStatus(listener),
|
|
79
|
+
getDefaultDevice: bindPublicMethod("getDefaultDevice"),
|
|
80
|
+
setDefaultDevice: bindPublicMethod("setDefaultDevice"),
|
|
81
|
+
clearDefaultDevice: bindPublicMethod("clearDefaultDevice"),
|
|
82
|
+
startScan: bindPublicMethod("startScan"),
|
|
83
|
+
stopScan: bindPublicMethod("stopScan"),
|
|
84
|
+
scan: bindPublicMethod("scan"),
|
|
85
|
+
connect: bindPublicMethod("connect"),
|
|
86
|
+
connectDefault: bindPublicMethod("connectDefault"),
|
|
87
|
+
cancelConnectionAttempt: bindPublicMethod("cancelConnectionAttempt"),
|
|
88
|
+
disconnect: bindPublicMethod("disconnect"),
|
|
89
|
+
forget: bindPublicMethod("forget"),
|
|
90
|
+
displayText: bindPublicMethod("displayText"),
|
|
91
|
+
clearDisplay: bindPublicMethod("clearDisplay"),
|
|
92
|
+
showDashboard: bindPublicMethod("showDashboard"),
|
|
93
|
+
toggleHeadUp: bindPublicMethod("toggleHeadUp"),
|
|
94
|
+
showNativeNotificationPanel: bindPublicMethod("showNativeNotificationPanel"),
|
|
95
|
+
setDashboardPosition: bindPublicMethod("setDashboardPosition"),
|
|
96
|
+
setHeadUpAngle: bindPublicMethod("setHeadUpAngle"),
|
|
97
|
+
setImuEnabled: bindPublicMethod("setImuEnabled"),
|
|
98
|
+
setScreenDisabled: bindPublicMethod("setScreenDisabled"),
|
|
99
|
+
ping: bindPublicMethod("ping"),
|
|
100
|
+
requestWifiScan: bindPublicMethod("requestWifiScan"),
|
|
101
|
+
sendWifiCredentials: bindPublicMethod("sendWifiCredentials"),
|
|
102
|
+
forgetWifiNetwork: bindPublicMethod("forgetWifiNetwork"),
|
|
103
|
+
setHotspotState: bindPublicMethod("setHotspotState"),
|
|
104
|
+
setSystemTime: bindPublicMethod("setSystemTime"),
|
|
105
|
+
setWifiAdbState: bindPublicMethod("setWifiAdbState"),
|
|
106
|
+
setGalleryModeEnabled: bindPublicMethod("setGalleryModeEnabled"),
|
|
107
|
+
setVoiceActivityDetectionEnabled: bindPublicMethod("setVoiceActivityDetectionEnabled"),
|
|
108
|
+
setLoudnessGateEnabled: bindPublicMethod("setLoudnessGateEnabled"),
|
|
109
|
+
/**
|
|
110
|
+
* @deprecated Sticky action-button photo presets are deprecated. Prefer per-request
|
|
111
|
+
* `requestPhoto(...)` options (e.g. `mode: "text"` for text sensor size/crop, or explicit per-shot
|
|
112
|
+
* fields). Still functional until removed in a future release.
|
|
113
|
+
*/
|
|
114
|
+
setPhotoCaptureDefaults: bindPublicMethod("setPhotoCaptureDefaults"),
|
|
115
|
+
setVideoRecordingDefaults: ({ width, height, fps }) => {
|
|
116
|
+
const method = PrivateBluetoothSdkModule.setVideoRecordingDefaults;
|
|
117
|
+
if (typeof method !== "function") {
|
|
118
|
+
return Promise.reject(new Error("BluetoothSdk.setVideoRecordingDefaults is not available in this native build. Rebuild the app."));
|
|
119
|
+
}
|
|
120
|
+
return PrivateBluetoothSdkModule.setVideoRecordingDefaults(width, height, fps);
|
|
121
|
+
},
|
|
122
|
+
setMaxVideoRecordingDuration: bindPublicMethod("setMaxVideoRecordingDuration"),
|
|
123
|
+
setCameraFov: bindPublicMethod("setCameraFov"),
|
|
124
|
+
setLegacyCameraFov: bindPublicMethod("setLegacyCameraFov"),
|
|
125
|
+
setCameraFovOverride: bindPublicMethod("setCameraFovOverride"),
|
|
126
|
+
releaseCameraFovOverride: bindPublicMethod("releaseCameraFovOverride"),
|
|
127
|
+
setCameraTuningConfig: bindPublicMethod("setCameraTuningConfig"),
|
|
128
|
+
queryGalleryStatus: bindPublicMethod("queryGalleryStatus"),
|
|
129
|
+
requestPhoto: bindPublicMethod("requestPhoto"),
|
|
130
|
+
warmUpCamera: bindPublicMethod("warmUpCamera"),
|
|
131
|
+
stopCameraWarmUp: bindPublicMethod("stopCameraWarmUp"),
|
|
132
|
+
startVideoRecording: bindPublicMethod("startVideoRecording"),
|
|
133
|
+
stopVideoRecording: bindPublicMethod("stopVideoRecording"),
|
|
134
|
+
queryVideoRecordingStatus: bindPublicMethod("queryVideoRecordingStatus"),
|
|
135
|
+
startStream: bindPublicMethod("startStream"),
|
|
136
|
+
stopStream: bindPublicMethod("stopStream"),
|
|
137
|
+
setMicState: bindPublicMethod("setMicState"),
|
|
138
|
+
setPreferredMic: bindPublicMethod("setPreferredMic"),
|
|
139
|
+
setOwnAppAudioPlaying: bindPublicMethod("setOwnAppAudioPlaying"),
|
|
140
|
+
getGlassesMediaVolume: bindPublicMethod("getGlassesMediaVolume"),
|
|
141
|
+
setGlassesMediaVolume: bindPublicMethod("setGlassesMediaVolume"),
|
|
142
|
+
rgbLedControl: bindPublicMethod("rgbLedControl"),
|
|
143
|
+
requestVersionInfo: bindPublicMethod("requestVersionInfo"),
|
|
144
|
+
availableG2FirmwareArtifacts: bindPublicMethod("availableG2FirmwareArtifacts"),
|
|
145
|
+
startG2FirmwareFlash: bindPublicMethod("startG2FirmwareFlash"),
|
|
146
|
+
setOtaVersionUrl: bindPublicMethod("setOtaVersionUrl"),
|
|
147
|
+
getOtaVersionUrl: bindPublicMethod("getOtaVersionUrl"),
|
|
148
|
+
checkForOtaUpdate: bindPublicMethod("checkForOtaUpdate"),
|
|
149
|
+
getReleaseChangelogs,
|
|
150
|
+
startOtaUpdate,
|
|
151
|
+
queryOtaStatus,
|
|
152
|
+
startAr99OtaFromFile: bindPublicMethod("startAr99OtaFromFile"),
|
|
153
|
+
cancelAr99Ota: bindPublicMethod("cancelAr99Ota"),
|
|
154
|
+
sendAr99FactoryReset: bindPublicMethod("sendAr99FactoryReset"),
|
|
155
|
+
buildAr99OtaSignature: bindPublicMethod("buildAr99OtaSignature"),
|
|
156
|
+
setSttModelDetails: bindPublicMethod("setSttModelDetails"),
|
|
157
|
+
getSttModelPath: bindPublicMethod("getSttModelPath"),
|
|
158
|
+
checkSttModelAvailable: bindPublicMethod("checkSttModelAvailable"),
|
|
159
|
+
validateSttModel: bindPublicMethod("validateSttModel"),
|
|
160
|
+
extractTarBz2: bindPublicMethod("extractTarBz2"),
|
|
161
|
+
restartTranscriber: bindPublicMethod("restartTranscriber"),
|
|
162
|
+
setTtsModelDetails: bindPublicMethod("setTtsModelDetails"),
|
|
163
|
+
getTtsModelPath: bindPublicMethod("getTtsModelPath"),
|
|
164
|
+
getTtsModelLanguage: bindPublicMethod("getTtsModelLanguage"),
|
|
165
|
+
checkTtsModelAvailable: bindPublicMethod("checkTtsModelAvailable"),
|
|
166
|
+
validateTtsModel: bindPublicMethod("validateTtsModel"),
|
|
167
|
+
generateTtsAudio: bindPublicMethod("generateTtsAudio"),
|
|
168
|
+
});
|
|
169
|
+
export default BluetoothSdk;
|
|
170
|
+
export { CAMERA_FOV_DEFAULT, CAMERA_FOV_MAX, CAMERA_FOV_MIN, DeviceModels, isBusyGlassesConnectionStatus, isConnectedGlassesConnectionStatus, isConnectedWifiStatus, isEnabledHotspotStatus, isReadyGlassesConnectionStatus, } from "./BluetoothSdk.types";
|
|
171
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,yBAAyB,MAAM,+BAA+B,CAAA;AASrE,OAAO,EAAC,oBAAoB,EAAC,MAAM,cAAc,CAAA;AAEjD,MAAM,kBAAkB,GAAG,IAAI,GAAG,CAAwB;IACxD,KAAK;IACL,mBAAmB;IACnB,wBAAwB;IACxB,mBAAmB;IACnB,cAAc;IACd,aAAa;IACb,aAAa;IACb,SAAS;IACT,iCAAiC;IACjC,iBAAiB;IACjB,gBAAgB;IAChB,qBAAqB;IACrB,oBAAoB;IACpB,kBAAkB;IAClB,uBAAuB;IACvB,eAAe;IACf,gBAAgB;IAChB,cAAc;IACd,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gB,CAAC,eAAe,CAAC;IAChD,oBAAoB,EAAE,gBAAgB,CAAC,sBAAsB,CAAC;IAC9D,qBAAqB,EAAE,gBAAgB,CAAC,uBAAuB,CAAC;IAChE,kBAAkB,EAAE,gBAAgB,CAAC,oBAAoB,CAAC;IAC1D,eAAe,EAAE,gBAAgB,CAAC,iBAAiB,CAAC;IACpD,sBAAsB,EAAE,gBAAgB,CAAC,wBAAwB,CAAC;IAClE,gBAAgB,EAAE,gBAAgB,CAAC,kBAAkB,CAAC;IACtD,aAAa,EAAE,gBAAgB,CAAC,eAAe,CAAC;IAChD,kBAAkB,EAAE,gBAAgB,CAAC,oBAAoB,CAAC;IAC1D,kBAAkB,EAAE,gBAAgB,CAAC,oBAAoB,CAAC;IAC1D,eAAe,EAAE,gBAAgB,CAAC,iBAAiB,CAAC;IACpD,mBAAmB,EAAE,gBAAgB,CAAC,qBAAqB,CAAC;IAC5D,sBAAsB,EAAE,gBAAgB,CAAC,wBAAwB,CAAC;IAClE,gBAAgB,EAAE,gBAAgB,CAAC,kBAAkB,CAAC;IACtD,gBAAgB,EAAE,gBAAgB,CAAC,kBAAkB,CAAC;CACvD,CAAC,CAAA;AAEF,eAAe,YAAY,CAAA;AAE3B,OAAO,EACL,kBAAkB,EAClB,cAAc,EACd,cAAc,EACd,YAAY,EACZ,6BAA6B,EAC7B,kCAAkC,EAClC,qBAAqB,EACrB,sBAAsB,EACtB,8BAA8B,GAC/B,MAAM,sBAAsB,CAAA","sourcesContent":["import PrivateBluetoothSdkModule from \"./_private/BluetoothSdkModule\"\nimport type {\n BluetoothSdkEventListener,\n BluetoothSdkEventName,\n BluetoothSdkPublicModule,\n PublicBluetoothStatus,\n PublicGlassesStatus,\n VideoRecordingDefaults,\n} from \"./BluetoothSdk.types\"\nimport {getReleaseChangelogs} from \"./changelogs\"\n\nconst PUBLIC_EVENT_NAMES = new Set<BluetoothSdkEventName>([\n \"log\",\n \"device_discovered\",\n \"default_device_changed\",\n \"glasses_not_ready\",\n \"button_press\",\n \"touch_event\",\n \"accel_event\",\n \"head_up\",\n \"voice_activity_detection_status\",\n \"speaking_status\",\n \"battery_status\",\n \"local_transcription\",\n \"wifi_status_change\",\n \"wifi_scan_result\",\n \"hotspot_status_change\",\n \"hotspot_error\",\n \"photo_response\",\n \"photo_status\",\n \"camera_status\",\n \"video_recording_status\",\n \"media_success\",\n \"media_error\",\n \"gallery_status\",\n \"compatible_glasses_search_stop\",\n \"swipe_volume_status\",\n \"switch_status\",\n \"rgb_led_control_response\",\n \"settings_ack\",\n \"pair_failure\",\n \"pairing_info\",\n \"entering_pairing_mode\",\n \"owner_replaced\",\n \"audio_pairing_needed\",\n \"audio_connected\",\n \"audio_disconnected\",\n \"mic_pcm\",\n \"mic_lc3\",\n \"mic_health\",\n \"stream_status\",\n \"mtk_update_complete\",\n \"glasses_session_changed\",\n \"ota_start_ack\",\n \"ota_status\",\n \"ar99_ota_status\",\n \"g2_firmware_flash_progress\",\n \"version_info\",\n \"extraction_progress\",\n])\n\nconst addListener: BluetoothSdkPublicModule[\"addListener\"] = (eventName, listener) => {\n if (!PUBLIC_EVENT_NAMES.has(eventName)) {\n throw new Error(`Unsupported BluetoothSdk event \"${eventName}\". Use @glassly/bluetooth-sdk/react for status state.`)\n }\n return PrivateBluetoothSdkModule.addListener(eventName, listener as BluetoothSdkEventListener<BluetoothSdkEventName>)\n}\n\nconst startOtaUpdate: BluetoothSdkPublicModule[\"startOtaUpdate\"] = (otaVersionUrl) => {\n return PrivateBluetoothSdkModule.startOtaUpdate(otaVersionUrl)\n}\n\nconst queryOtaStatus: BluetoothSdkPublicModule[\"queryOtaStatus\"] = () => {\n return PrivateBluetoothSdkModule.sendOtaQueryStatus()\n}\n\nconst bindPublicMethod = <K extends keyof BluetoothSdkPublicModule>(name: K): BluetoothSdkPublicModule[K] => {\n const method = (PrivateBluetoothSdkModule as unknown as Record<string, unknown>)[name]\n if (typeof method === \"function\") {\n return method.bind(PrivateBluetoothSdkModule) as BluetoothSdkPublicModule[K]\n }\n\n return (async () => {\n throw new Error(`BluetoothSdk.${String(name)} is not available in this native build. Rebuild the app.`)\n }) as unknown as BluetoothSdkPublicModule[K]\n}\n\nexport const BluetoothSdk: BluetoothSdkPublicModule = Object.freeze({\n addListener,\n getGlassesStatus: bindPublicMethod(\"getGlassesStatus\"),\n getBluetoothStatus: bindPublicMethod(\"getBluetoothStatus\"),\n subscribeGlassesStatus: (listener: (changed: Partial<PublicGlassesStatus>) => void) =>\n PrivateBluetoothSdkModule.onGlassesStatus(listener),\n subscribeBluetoothStatus: (listener: (changed: Partial<PublicBluetoothStatus>) => void) =>\n PrivateBluetoothSdkModule.onBluetoothStatus(listener),\n getDefaultDevice: bindPublicMethod(\"getDefaultDevice\"),\n setDefaultDevice: bindPublicMethod(\"setDefaultDevice\"),\n clearDefaultDevice: bindPublicMethod(\"clearDefaultDevice\"),\n startScan: bindPublicMethod(\"startScan\"),\n stopScan: bindPublicMethod(\"stopScan\"),\n scan: bindPublicMethod(\"scan\") as BluetoothSdkPublicModule[\"scan\"],\n connect: bindPublicMethod(\"connect\"),\n connectDefault: bindPublicMethod(\"connectDefault\"),\n cancelConnectionAttempt: bindPublicMethod(\"cancelConnectionAttempt\"),\n disconnect: bindPublicMethod(\"disconnect\"),\n forget: bindPublicMethod(\"forget\"),\n displayText: bindPublicMethod(\"displayText\"),\n clearDisplay: bindPublicMethod(\"clearDisplay\"),\n showDashboard: bindPublicMethod(\"showDashboard\"),\n toggleHeadUp: bindPublicMethod(\"toggleHeadUp\"),\n showNativeNotificationPanel: bindPublicMethod(\"showNativeNotificationPanel\"),\n setDashboardPosition: bindPublicMethod(\"setDashboardPosition\"),\n setHeadUpAngle: bindPublicMethod(\"setHeadUpAngle\"),\n setImuEnabled: bindPublicMethod(\"setImuEnabled\"),\n setScreenDisabled: bindPublicMethod(\"setScreenDisabled\"),\n ping: bindPublicMethod(\"ping\"),\n requestWifiScan: bindPublicMethod(\"requestWifiScan\"),\n sendWifiCredentials: bindPublicMethod(\"sendWifiCredentials\"),\n forgetWifiNetwork: bindPublicMethod(\"forgetWifiNetwork\"),\n setHotspotState: bindPublicMethod(\"setHotspotState\"),\n setSystemTime: bindPublicMethod(\"setSystemTime\"),\n setWifiAdbState: bindPublicMethod(\"setWifiAdbState\"),\n setGalleryModeEnabled: bindPublicMethod(\"setGalleryModeEnabled\"),\n setVoiceActivityDetectionEnabled: bindPublicMethod(\"setVoiceActivityDetectionEnabled\"),\n setLoudnessGateEnabled: bindPublicMethod(\"setLoudnessGateEnabled\"),\n /**\n * @deprecated Sticky action-button photo presets are deprecated. Prefer per-request\n * `requestPhoto(...)` options (e.g. `mode: \"text\"` for text sensor size/crop, or explicit per-shot\n * fields). Still functional until removed in a future release.\n */\n setPhotoCaptureDefaults: bindPublicMethod(\"setPhotoCaptureDefaults\"),\n setVideoRecordingDefaults: ({width, height, fps}: VideoRecordingDefaults) => {\n const method = (PrivateBluetoothSdkModule as unknown as Record<string, unknown>).setVideoRecordingDefaults\n if (typeof method !== \"function\") {\n return Promise.reject(\n new Error(\"BluetoothSdk.setVideoRecordingDefaults is not available in this native build. Rebuild the app.\"),\n )\n }\n return PrivateBluetoothSdkModule.setVideoRecordingDefaults(width, height, fps)\n },\n setMaxVideoRecordingDuration: bindPublicMethod(\"setMaxVideoRecordingDuration\"),\n setCameraFov: bindPublicMethod(\"setCameraFov\"),\n setLegacyCameraFov: bindPublicMethod(\"setLegacyCameraFov\"),\n setCameraFovOverride: bindPublicMethod(\"setCameraFovOverride\"),\n releaseCameraFovOverride: bindPublicMethod(\"releaseCameraFovOverride\"),\n setCameraTuningConfig: bindPublicMethod(\"setCameraTuningConfig\"),\n queryGalleryStatus: bindPublicMethod(\"queryGalleryStatus\"),\n requestPhoto: bindPublicMethod(\"requestPhoto\"),\n warmUpCamera: bindPublicMethod(\"warmUpCamera\"),\n stopCameraWarmUp: bindPublicMethod(\"stopCameraWarmUp\"),\n startVideoRecording: bindPublicMethod(\"startVideoRecording\"),\n stopVideoRecording: bindPublicMethod(\"stopVideoRecording\"),\n queryVideoRecordingStatus: bindPublicMethod(\"queryVideoRecordingStatus\"),\n startStream: bindPublicMethod(\"startStream\"),\n stopStream: bindPublicMethod(\"stopStream\"),\n setMicState: bindPublicMethod(\"setMicState\"),\n setPreferredMic: bindPublicMethod(\"setPreferredMic\"),\n setOwnAppAudioPlaying: bindPublicMethod(\"setOwnAppAudioPlaying\"),\n getGlassesMediaVolume: bindPublicMethod(\"getGlassesMediaVolume\"),\n setGlassesMediaVolume: bindPublicMethod(\"setGlassesMediaVolume\"),\n rgbLedControl: bindPublicMethod(\"rgbLedControl\"),\n requestVersionInfo: bindPublicMethod(\"requestVersionInfo\"),\n availableG2FirmwareArtifacts: bindPublicMethod(\"availableG2FirmwareArtifacts\"),\n startG2FirmwareFlash: bindPublicMethod(\"startG2FirmwareFlash\"),\n setOtaVersionUrl: bindPublicMethod(\"setOtaVersionUrl\"),\n getOtaVersionUrl: bindPublicMethod(\"getOtaVersionUrl\"),\n checkForOtaUpdate: bindPublicMethod(\"checkForOtaUpdate\"),\n getReleaseChangelogs,\n startOtaUpdate,\n queryOtaStatus,\n startAr99OtaFromFile: bindPublicMethod(\"startAr99OtaFromFile\"),\n cancelAr99Ota: bindPublicMethod(\"cancelAr99Ota\"),\n sendAr99FactoryReset: bindPublicMethod(\"sendAr99FactoryReset\"),\n buildAr99OtaSignature: bindPublicMethod(\"buildAr99OtaSignature\"),\n setSttModelDetails: bindPublicMethod(\"setSttModelDetails\"),\n getSttModelPath: bindPublicMethod(\"getSttModelPath\"),\n checkSttModelAvailable: bindPublicMethod(\"checkSttModelAvailable\"),\n validateSttModel: bindPublicMethod(\"validateSttModel\"),\n extractTarBz2: bindPublicMethod(\"extractTarBz2\"),\n restartTranscriber: bindPublicMethod(\"restartTranscriber\"),\n setTtsModelDetails: bindPublicMethod(\"setTtsModelDetails\"),\n getTtsModelPath: bindPublicMethod(\"getTtsModelPath\"),\n getTtsModelLanguage: bindPublicMethod(\"getTtsModelLanguage\"),\n checkTtsModelAvailable: bindPublicMethod(\"checkTtsModelAvailable\"),\n validateTtsModel: bindPublicMethod(\"validateTtsModel\"),\n generateTtsAudio: bindPublicMethod(\"generateTtsAudio\"),\n})\n\nexport default BluetoothSdk\n\nexport {\n CAMERA_FOV_DEFAULT,\n CAMERA_FOV_MAX,\n CAMERA_FOV_MIN,\n DeviceModels,\n isBusyGlassesConnectionStatus,\n isConnectedGlassesConnectionStatus,\n isConnectedWifiStatus,\n isEnabledHotspotStatus,\n isReadyGlassesConnectionStatus,\n} from \"./BluetoothSdk.types\"\n\nexport type {\n AccelEvent,\n Ar99OtaStatusEvent,\n AudioConnectedEvent,\n AudioDisconnectedEvent,\n AudioPairingNeededEvent,\n BatteryStatusEvent,\n BluetoothSdkEvent,\n BluetoothSdkEventListener,\n BluetoothSdkEventMap,\n BluetoothSdkEventName,\n BluetoothSdkPublicModule as BluetoothSdkModule,\n BluetoothSdkSubscription,\n ButtonPhotoSize,\n PhotoCaptureDefaults,\n ButtonPressEvent,\n CameraFovPreset,\n CameraFovRequest,\n CameraFovResult,\n CameraRoiPosition,\n CompatibleGlassesSearchStopEvent,\n ConnectOptions,\n ConnectedGlassesConnectionStatus,\n ConnectedWifiStatus,\n Device,\n DeviceModel,\n EnabledHotspotStatus,\n GalleryStatusEvent,\n G2FirmwareArtifact,\n G2FirmwareFlashProgressEvent,\n G2FirmwareFlashResult,\n G2FirmwareTarget,\n GlassesConnectionStatus,\n GlassesMediaVolumeGetResult,\n GlassesMediaVolumeSetResult,\n GlassesNotReadyEvent,\n HeadUpEvent,\n HotspotErrorEvent,\n HotspotStatus,\n HotspotStatusChangeEvent,\n GlassesSessionChangedEvent,\n KeepAliveAckEvent,\n LocalTranscriptionEvent,\n LogEvent,\n MicLc3Event,\n MicHealthEvent,\n MicMode,\n MicPcmEvent,\n MicPreference,\n OtaStartAckEvent,\n OtaProgress,\n OtaProgressStatus,\n OtaStage,\n OtaStatus,\n OtaStatusEvent,\n OtaQueryResult,\n OtaUpdateInfo,\n ReleaseChangelog,\n SpeakerEnrollProgressEvent,\n SpeakerEnrollResultEvent,\n MtkUpdateCompleteEvent,\n PairFailureEvent,\n PairingInfoEvent,\n EnteringPairingModeEvent,\n OwnerReplacedEvent,\n PhotoCaptureMetadata,\n PhotoResolvedConfig,\n PhotoCompression,\n PhotoFpsRange,\n PhotoMeteredPreview,\n PhotoMode,\n PublicBluetoothStatus,\n PublicGlassesStatus,\n PhotoTransferMethod,\n PhotoResponseEvent,\n PhotoRequestedCaptureConfig,\n PhotoRequestParams,\n PhotoSize,\n PhotoStatusEvent,\n PhotoStatusState,\n PhotoSuccessResponseEvent,\n RgbLedAction,\n RgbLedColor,\n RgbLedControlResponseEvent,\n RgbLedControlSuccessResponseEvent,\n ScanModelOptions,\n ScanOptions,\n ScanResultsCallback,\n SpeakingStatusEvent,\n SettingsAckEvent,\n SettingsAckSetting,\n SettingsAckSuccessEvent,\n SettingsAckSuccessStatus,\n SettingsAckStatus,\n StreamAudioConfig,\n StreamResolvedConfig,\n StreamStartRequest,\n StreamStatusEvent,\n StreamStatusLifecycleState,\n StreamStatusReconnectState,\n StreamStatusState,\n StreamVideoConfig,\n SwipeVolumeStatusEvent,\n SwitchStatusEvent,\n TouchEvent,\n VideoRecordingDefaults,\n VideoRecordingStartedStatusEvent,\n VideoRecordingStatusEvent,\n VideoRecordingStatusState,\n VideoRecordingStoppedStatusEvent,\n VideoRecordingSuccessStatusEvent,\n VersionInfoEvent,\n VersionInfoResult,\n WifiScanResultEvent,\n VoiceActivityDetectionStatusEvent,\n WifiSearchResult,\n WifiStatus,\n WifiStatusChangeEvent,\n} from \"./BluetoothSdk.types\"\n"]}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export type OtaServerResult = {
|
|
2
|
+
baseUrl: string;
|
|
3
|
+
host: string;
|
|
4
|
+
manifestUrl: string;
|
|
5
|
+
port: number;
|
|
6
|
+
};
|
|
7
|
+
export type OtaServerModuleEvents = {
|
|
8
|
+
artifactDownloadProgress: (event: {
|
|
9
|
+
destination: string;
|
|
10
|
+
bytesWritten: number;
|
|
11
|
+
contentLength: number;
|
|
12
|
+
}) => void;
|
|
13
|
+
};
|
|
14
|
+
//# sourceMappingURL=OtaServer.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OtaServer.types.d.ts","sourceRoot":"","sources":["../../src/ota-server/OtaServer.types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,eAAe,GAAG;IAC5B,OAAO,EAAE,MAAM,CAAA;IACf,IAAI,EAAE,MAAM,CAAA;IACZ,WAAW,EAAE,MAAM,CAAA;IACnB,IAAI,EAAE,MAAM,CAAA;CACb,CAAA;AAED,MAAM,MAAM,qBAAqB,GAAG;IAClC,wBAAwB,EAAE,CAAC,KAAK,EAAE;QAAC,WAAW,EAAE,MAAM,CAAC;QAAC,YAAY,EAAE,MAAM,CAAC;QAAC,aAAa,EAAE,MAAM,CAAA;KAAC,KAAK,IAAI,CAAA;CAC9G,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OtaServer.types.js","sourceRoot":"","sources":["../../src/ota-server/OtaServer.types.ts"],"names":[],"mappings":"","sourcesContent":["export type OtaServerResult = {\n baseUrl: string\n host: string\n manifestUrl: string\n port: number\n}\n\nexport type OtaServerModuleEvents = {\n artifactDownloadProgress: (event: {destination: string; bytesWritten: number; contentLength: number}) => void\n}\n"]}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { NativeModule } from "expo";
|
|
2
|
+
import type { OtaServerModuleEvents, OtaServerResult } from "./OtaServer.types";
|
|
3
|
+
declare class OtaServerModule extends NativeModule<OtaServerModuleEvents> {
|
|
4
|
+
/**
|
|
5
|
+
* Serve `manifestJson` at /version.json and `artifactPaths` (sha256 -> local file path)
|
|
6
|
+
* at /artifacts/<sha256>. Pass `host` when the caller knows the authoritative local
|
|
7
|
+
* address (e.g. from the scoped hotspot network); omit to fall back to interface
|
|
8
|
+
* scanning. Returns the URLs to hand to the glasses via ota_start.
|
|
9
|
+
*/
|
|
10
|
+
startOtaServer(manifestJson: string, artifactPaths: Record<string, string>, host?: string | null): Promise<OtaServerResult>;
|
|
11
|
+
stopOtaServer(): Promise<void>;
|
|
12
|
+
/** Wait for iPhone Wi-Fi (`en0`) to acquire an address on the glasses gateway subnet. */
|
|
13
|
+
waitForWifiAddress(gateway: string, timeoutMs: number): Promise<string>;
|
|
14
|
+
downloadArtifact(source: string, destination: string): Promise<{
|
|
15
|
+
statusCode: number;
|
|
16
|
+
bytesWritten: number;
|
|
17
|
+
}>;
|
|
18
|
+
}
|
|
19
|
+
declare const _default: OtaServerModule;
|
|
20
|
+
export default _default;
|
|
21
|
+
//# sourceMappingURL=OtaServerModule.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OtaServerModule.d.ts","sourceRoot":"","sources":["../../src/ota-server/OtaServerModule.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,YAAY,EAAsB,MAAM,MAAM,CAAA;AAEtD,OAAO,KAAK,EAAC,qBAAqB,EAAE,eAAe,EAAC,MAAM,mBAAmB,CAAA;AAE7E,OAAO,OAAO,eAAgB,SAAQ,YAAY,CAAC,qBAAqB,CAAC;IACvE;;;;;OAKG;IACH,cAAc,CACZ,YAAY,EAAE,MAAM,EACpB,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EACrC,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,GACnB,OAAO,CAAC,eAAe,CAAC;IAC3B,aAAa,IAAI,OAAO,CAAC,IAAI,CAAC;IAC9B,yFAAyF;IACzF,kBAAkB,CAAC,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IACvE,gBAAgB,CAAC,MAAM,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC;QAAC,UAAU,EAAE,MAAM,CAAC;QAAC,YAAY,EAAE,MAAM,CAAA;KAAC,CAAC;CAC3G;;AAED,wBAAgE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OtaServerModule.js","sourceRoot":"","sources":["../../src/ota-server/OtaServerModule.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,YAAY,EAAE,mBAAmB,EAAC,MAAM,MAAM,CAAA;AAsBtD,eAAe,mBAAmB,CAAkB,WAAW,CAAC,CAAA","sourcesContent":["import {NativeModule, requireNativeModule} from \"expo\"\n\nimport type {OtaServerModuleEvents, OtaServerResult} from \"./OtaServer.types\"\n\ndeclare class OtaServerModule extends NativeModule<OtaServerModuleEvents> {\n /**\n * Serve `manifestJson` at /version.json and `artifactPaths` (sha256 -> local file path)\n * at /artifacts/<sha256>. Pass `host` when the caller knows the authoritative local\n * address (e.g. from the scoped hotspot network); omit to fall back to interface\n * scanning. Returns the URLs to hand to the glasses via ota_start.\n */\n startOtaServer(\n manifestJson: string,\n artifactPaths: Record<string, string>,\n host?: string | null,\n ): Promise<OtaServerResult>\n stopOtaServer(): Promise<void>\n /** Wait for iPhone Wi-Fi (`en0`) to acquire an address on the glasses gateway subnet. */\n waitForWifiAddress(gateway: string, timeoutMs: number): Promise<string>\n downloadArtifact(source: string, destination: string): Promise<{statusCode: number; bytesWritten: number}>\n}\n\nexport default requireNativeModule<OtaServerModule>(\"OtaServer\")\n"]}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { NativeModule } from "expo";
|
|
2
|
+
import type { OtaServerModuleEvents, OtaServerResult } from "./OtaServer.types";
|
|
3
|
+
declare class OtaServerModule extends NativeModule<OtaServerModuleEvents> {
|
|
4
|
+
startOtaServer(): Promise<OtaServerResult>;
|
|
5
|
+
stopOtaServer(): Promise<void>;
|
|
6
|
+
waitForWifiAddress(): Promise<string>;
|
|
7
|
+
}
|
|
8
|
+
declare const _default: typeof OtaServerModule;
|
|
9
|
+
export default _default;
|
|
10
|
+
//# sourceMappingURL=OtaServerModule.web.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OtaServerModule.web.d.ts","sourceRoot":"","sources":["../../src/ota-server/OtaServerModule.web.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,YAAY,EAAoB,MAAM,MAAM,CAAA;AAEpD,OAAO,KAAK,EAAC,qBAAqB,EAAE,eAAe,EAAC,MAAM,mBAAmB,CAAA;AAE7E,cAAM,eAAgB,SAAQ,YAAY,CAAC,qBAAqB,CAAC;IACzD,cAAc,IAAI,OAAO,CAAC,eAAe,CAAC;IAI1C,aAAa,IAAI,OAAO,CAAC,IAAI,CAAC;IAE9B,kBAAkB,IAAI,OAAO,CAAC,MAAM,CAAC;CAG5C;;AAED,wBAA8D"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { NativeModule, registerWebModule } from "expo";
|
|
2
|
+
class OtaServerModule extends NativeModule {
|
|
3
|
+
async startOtaServer() {
|
|
4
|
+
throw new Error("The OTA server is only available in native apps.");
|
|
5
|
+
}
|
|
6
|
+
async stopOtaServer() { }
|
|
7
|
+
async waitForWifiAddress() {
|
|
8
|
+
throw new Error("The OTA server is only available in native apps.");
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
export default registerWebModule(OtaServerModule, "OtaServer");
|
|
12
|
+
//# sourceMappingURL=OtaServerModule.web.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OtaServerModule.web.js","sourceRoot":"","sources":["../../src/ota-server/OtaServerModule.web.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,YAAY,EAAE,iBAAiB,EAAC,MAAM,MAAM,CAAA;AAIpD,MAAM,eAAgB,SAAQ,YAAmC;IAC/D,KAAK,CAAC,cAAc;QAClB,MAAM,IAAI,KAAK,CAAC,kDAAkD,CAAC,CAAA;IACrE,CAAC;IAED,KAAK,CAAC,aAAa,KAAmB,CAAC;IAEvC,KAAK,CAAC,kBAAkB;QACtB,MAAM,IAAI,KAAK,CAAC,kDAAkD,CAAC,CAAA;IACrE,CAAC;CACF;AAED,eAAe,iBAAiB,CAAC,eAAe,EAAE,WAAW,CAAC,CAAA","sourcesContent":["import {NativeModule, registerWebModule} from \"expo\"\n\nimport type {OtaServerModuleEvents, OtaServerResult} from \"./OtaServer.types\"\n\nclass OtaServerModule extends NativeModule<OtaServerModuleEvents> {\n async startOtaServer(): Promise<OtaServerResult> {\n throw new Error(\"The OTA server is only available in native apps.\")\n }\n\n async stopOtaServer(): Promise<void> {}\n\n async waitForWifiAddress(): Promise<string> {\n throw new Error(\"The OTA server is only available in native apps.\")\n }\n}\n\nexport default registerWebModule(OtaServerModule, \"OtaServer\")\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ota-server/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,OAAO,EAAC,MAAM,mBAAmB,CAAA;AACzC,cAAc,mBAAmB,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/ota-server/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,OAAO,EAAC,MAAM,mBAAmB,CAAA;AACzC,cAAc,mBAAmB,CAAA","sourcesContent":["export {default} from \"./OtaServerModule\"\nexport * from \"./OtaServer.types\"\n"]}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
export type OtaTransportSubscription = {
|
|
2
|
+
remove(): void;
|
|
3
|
+
};
|
|
4
|
+
export type OtaLocalNetworkConnection = {
|
|
5
|
+
connected: boolean;
|
|
6
|
+
ssid: string;
|
|
7
|
+
localAddress?: string;
|
|
8
|
+
};
|
|
9
|
+
export type OtaLocalNetworkLostEvent = {
|
|
10
|
+
ssid: string;
|
|
11
|
+
};
|
|
12
|
+
export type OtaLocalNetworkResponse = {
|
|
13
|
+
status: number;
|
|
14
|
+
headers: Record<string, string>;
|
|
15
|
+
bodyBase64: string;
|
|
16
|
+
};
|
|
17
|
+
export type OtaLocalNetworkDownloadResult = {
|
|
18
|
+
statusCode: number;
|
|
19
|
+
bytesWritten: number;
|
|
20
|
+
headers: Record<string, string>;
|
|
21
|
+
};
|
|
22
|
+
export type OtaLocalNetworkDownloadProgress = {
|
|
23
|
+
requestId: string;
|
|
24
|
+
bytesWritten: number;
|
|
25
|
+
contentLength: number;
|
|
26
|
+
statusCode?: number;
|
|
27
|
+
headers?: Record<string, string>;
|
|
28
|
+
};
|
|
29
|
+
export type OtaArtifactDownloadProgress = {
|
|
30
|
+
destination: string;
|
|
31
|
+
bytesWritten: number;
|
|
32
|
+
contentLength: number;
|
|
33
|
+
};
|
|
34
|
+
export type OtaServerResult = {
|
|
35
|
+
baseUrl: string;
|
|
36
|
+
host: string;
|
|
37
|
+
manifestUrl: string;
|
|
38
|
+
port: number;
|
|
39
|
+
};
|
|
40
|
+
/**
|
|
41
|
+
* Scoped networking for traffic that must stay on a Mentra Live hotspot while
|
|
42
|
+
* the phone's default route remains on cellular or another Wi-Fi network.
|
|
43
|
+
*
|
|
44
|
+
* The module is optional because iOS uses its system Wi-Fi join flow instead.
|
|
45
|
+
*/
|
|
46
|
+
export declare const otaLocalNetwork: Readonly<{
|
|
47
|
+
isAvailable: () => boolean;
|
|
48
|
+
connect: (ssid: string, password: string) => Promise<OtaLocalNetworkConnection>;
|
|
49
|
+
request: (requestId: string, url: string, method: string, headers: Record<string, string>, body: string | null, timeoutMs: number) => Promise<OtaLocalNetworkResponse>;
|
|
50
|
+
download: (requestId: string, url: string, destination: string, headers: Record<string, string>, connectionTimeoutMs: number, readTimeoutMs: number) => Promise<OtaLocalNetworkDownloadResult>;
|
|
51
|
+
cancel: (requestId: string) => Promise<void>;
|
|
52
|
+
disconnect: () => Promise<void>;
|
|
53
|
+
onDownloadProgress: (listener: (event: OtaLocalNetworkDownloadProgress) => void) => OtaTransportSubscription;
|
|
54
|
+
onNetworkLost: (listener: (event: OtaLocalNetworkLostEvent) => void) => OtaTransportSubscription;
|
|
55
|
+
}>;
|
|
56
|
+
/** Native HTTP server and artifact downloader used by the Engine OTA coordinator. */
|
|
57
|
+
export declare const otaServer: Readonly<{
|
|
58
|
+
start: (manifestJson: string, artifactPaths: Record<string, string>, host?: string | null) => Promise<OtaServerResult>;
|
|
59
|
+
stop: () => Promise<void>;
|
|
60
|
+
waitForWifiAddress: (gateway: string, timeoutMs: number) => Promise<string>;
|
|
61
|
+
downloadArtifact: (source: string, destination: string) => Promise<{
|
|
62
|
+
statusCode: number;
|
|
63
|
+
bytesWritten: number;
|
|
64
|
+
}>;
|
|
65
|
+
onArtifactDownloadProgress: (listener: (event: OtaArtifactDownloadProgress) => void) => OtaTransportSubscription;
|
|
66
|
+
}>;
|
|
67
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ota-transport/index.ts"],"names":[],"mappings":"AAMA,MAAM,MAAM,wBAAwB,GAAG;IAAC,MAAM,IAAI,IAAI,CAAA;CAAC,CAAA;AAEvD,MAAM,MAAM,yBAAyB,GAAG;IACtC,SAAS,EAAE,OAAO,CAAA;IAClB,IAAI,EAAE,MAAM,CAAA;IACZ,YAAY,CAAC,EAAE,MAAM,CAAA;CACtB,CAAA;AAED,MAAM,MAAM,wBAAwB,GAAG;IAAC,IAAI,EAAE,MAAM,CAAA;CAAC,CAAA;AAErD,MAAM,MAAM,uBAAuB,GAAG;IACpC,MAAM,EAAE,MAAM,CAAA;IACd,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IAC/B,UAAU,EAAE,MAAM,CAAA;CACnB,CAAA;AAED,MAAM,MAAM,6BAA6B,GAAG;IAC1C,UAAU,EAAE,MAAM,CAAA;IAClB,YAAY,EAAE,MAAM,CAAA;IACpB,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;CAChC,CAAA;AAED,MAAM,MAAM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