@mentra/sdk 2.1.31-beta.6 → 3.0.0-alpha.3

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.
Files changed (169) hide show
  1. package/README.md +54 -9
  2. package/dist/MiniAppServer.d.ts +58 -0
  3. package/dist/MiniAppServer.d.ts.map +1 -0
  4. package/dist/app/server/index.d.ts +143 -88
  5. package/dist/app/server/index.d.ts.map +1 -1
  6. package/dist/app/session/events.d.ts +20 -3
  7. package/dist/app/session/events.d.ts.map +1 -1
  8. package/dist/app/session/index.d.ts +56 -3
  9. package/dist/app/session/index.d.ts.map +1 -1
  10. package/dist/app/session/modules/audio-output-stream.d.ts +108 -0
  11. package/dist/app/session/modules/audio-output-stream.d.ts.map +1 -0
  12. package/dist/app/session/modules/audio.d.ts +36 -1
  13. package/dist/app/session/modules/audio.d.ts.map +1 -1
  14. package/dist/app/session/modules/camera-managed-extension.d.ts +37 -33
  15. package/dist/app/session/modules/camera-managed-extension.d.ts.map +1 -1
  16. package/dist/app/session/modules/camera.d.ts +108 -50
  17. package/dist/app/session/modules/camera.d.ts.map +1 -1
  18. package/dist/app/session/modules/index.d.ts +4 -3
  19. package/dist/app/session/modules/index.d.ts.map +1 -1
  20. package/dist/app/session/modules/led.d.ts.map +1 -1
  21. package/dist/app/session/modules/location.d.ts.map +1 -1
  22. package/dist/app/session/settings.d.ts +5 -1
  23. package/dist/app/session/settings.d.ts.map +1 -1
  24. package/dist/app/webview/index.d.ts +67 -9
  25. package/dist/app/webview/index.d.ts.map +1 -1
  26. package/dist/constants/log-messages/updates.d.ts +32 -9
  27. package/dist/constants/log-messages/updates.d.ts.map +1 -1
  28. package/dist/constants/log-messages/warning.d.ts +12 -0
  29. package/dist/constants/log-messages/warning.d.ts.map +1 -1
  30. package/dist/display-utils.d.ts +3 -1
  31. package/dist/display-utils.d.ts.map +1 -1
  32. package/dist/display-utils.js +443 -26
  33. package/dist/display-utils.js.map +10 -6
  34. package/dist/index.d.ts +22 -14
  35. package/dist/index.d.ts.map +1 -1
  36. package/dist/index.js +8877 -4236
  37. package/dist/index.js.map +63 -31
  38. package/dist/internal/_SessionManager.d.ts +76 -0
  39. package/dist/internal/_SessionManager.d.ts.map +1 -0
  40. package/dist/logging/clean-transport.d.ts +50 -0
  41. package/dist/logging/clean-transport.d.ts.map +1 -0
  42. package/dist/logging/errors.d.ts +90 -0
  43. package/dist/logging/errors.d.ts.map +1 -0
  44. package/dist/logging/logger.d.ts +72 -1
  45. package/dist/logging/logger.d.ts.map +1 -1
  46. package/dist/logging/telemetry-transport.d.ts +51 -0
  47. package/dist/logging/telemetry-transport.d.ts.map +1 -0
  48. package/dist/session/DataStreamRouter.d.ts +219 -0
  49. package/dist/session/DataStreamRouter.d.ts.map +1 -0
  50. package/dist/session/MentraSession.d.ts +102 -0
  51. package/dist/session/MentraSession.d.ts.map +1 -0
  52. package/dist/session/index.d.ts +2 -0
  53. package/dist/session/index.d.ts.map +1 -0
  54. package/dist/session/internal/_ConnectionManager.d.ts +43 -0
  55. package/dist/session/internal/_ConnectionManager.d.ts.map +1 -0
  56. package/dist/session/internal/_MessageRouter.d.ts +11 -0
  57. package/dist/session/internal/_MessageRouter.d.ts.map +1 -0
  58. package/dist/session/internal/_SubscriptionManager.d.ts +32 -0
  59. package/dist/session/internal/_SubscriptionManager.d.ts.map +1 -0
  60. package/dist/session/internal/_V2AudioStreamShim.d.ts +12 -0
  61. package/dist/session/internal/_V2AudioStreamShim.d.ts.map +1 -0
  62. package/dist/session/internal/_V2CameraShim.d.ts +51 -0
  63. package/dist/session/internal/_V2CameraShim.d.ts.map +1 -0
  64. package/dist/session/internal/_V2EventManagerShim.d.ts +51 -0
  65. package/dist/session/internal/_V2EventManagerShim.d.ts.map +1 -0
  66. package/dist/session/internal/_V2SessionShim.d.ts +165 -0
  67. package/dist/session/internal/_V2SessionShim.d.ts.map +1 -0
  68. package/dist/session/internal/_V2SettingsShim.d.ts +17 -0
  69. package/dist/session/internal/_V2SettingsShim.d.ts.map +1 -0
  70. package/dist/session/managers/CameraManager.d.ts +197 -0
  71. package/dist/session/managers/CameraManager.d.ts.map +1 -0
  72. package/dist/session/managers/DashboardManager.d.ts +131 -0
  73. package/dist/session/managers/DashboardManager.d.ts.map +1 -0
  74. package/dist/session/managers/DeviceManager.d.ts +332 -0
  75. package/dist/session/managers/DeviceManager.d.ts.map +1 -0
  76. package/dist/session/managers/DisplayManager.d.ts +171 -0
  77. package/dist/session/managers/DisplayManager.d.ts.map +1 -0
  78. package/dist/session/managers/LedManager.d.ts +131 -0
  79. package/dist/session/managers/LedManager.d.ts.map +1 -0
  80. package/dist/session/managers/LocationManager.d.ts +255 -0
  81. package/dist/session/managers/LocationManager.d.ts.map +1 -0
  82. package/dist/session/managers/MicManager.d.ts +252 -0
  83. package/dist/session/managers/MicManager.d.ts.map +1 -0
  84. package/dist/session/managers/PermissionsManager.d.ts +182 -0
  85. package/dist/session/managers/PermissionsManager.d.ts.map +1 -0
  86. package/dist/session/managers/PhoneManager.d.ts +295 -0
  87. package/dist/session/managers/PhoneManager.d.ts.map +1 -0
  88. package/dist/session/managers/SpeakerManager.d.ts +285 -0
  89. package/dist/session/managers/SpeakerManager.d.ts.map +1 -0
  90. package/dist/session/managers/StorageManager.d.ts +289 -0
  91. package/dist/session/managers/StorageManager.d.ts.map +1 -0
  92. package/dist/session/managers/TimeUtils.d.ts +175 -0
  93. package/dist/session/managers/TimeUtils.d.ts.map +1 -0
  94. package/dist/session/managers/TranscriptionManager.d.ts +195 -0
  95. package/dist/session/managers/TranscriptionManager.d.ts.map +1 -0
  96. package/dist/session/managers/TranslationManager.d.ts +189 -0
  97. package/dist/session/managers/TranslationManager.d.ts.map +1 -0
  98. package/dist/session.d.ts +41 -0
  99. package/dist/session.d.ts.map +1 -0
  100. package/dist/session.js +4168 -0
  101. package/dist/session.js.map +44 -0
  102. package/dist/transport/Transport.d.ts +119 -0
  103. package/dist/transport/Transport.d.ts.map +1 -0
  104. package/dist/transport/WebSocketTransport.d.ts +73 -0
  105. package/dist/transport/WebSocketTransport.d.ts.map +1 -0
  106. package/dist/types/index.d.ts +31 -5
  107. package/dist/types/index.d.ts.map +1 -1
  108. package/dist/types/message-types.d.ts +25 -9
  109. package/dist/types/message-types.d.ts.map +1 -1
  110. package/dist/types/messages/app-to-cloud.d.ts +113 -16
  111. package/dist/types/messages/app-to-cloud.d.ts.map +1 -1
  112. package/dist/types/messages/cloud-to-app.d.ts +50 -4
  113. package/dist/types/messages/cloud-to-app.d.ts.map +1 -1
  114. package/dist/types/messages/cloud-to-glasses.d.ts +43 -14
  115. package/dist/types/messages/cloud-to-glasses.d.ts.map +1 -1
  116. package/dist/types/messages/glasses-to-cloud.d.ts +5 -5
  117. package/dist/types/messages/glasses-to-cloud.d.ts.map +1 -1
  118. package/dist/types/models.d.ts +17 -0
  119. package/dist/types/models.d.ts.map +1 -1
  120. package/dist/types/rtmp-stream.d.ts +4 -4
  121. package/dist/types/rtmp-stream.d.ts.map +1 -1
  122. package/dist/types/streams.d.ts +6 -1
  123. package/dist/types/streams.d.ts.map +1 -1
  124. package/dist/types/webhooks.d.ts +11 -0
  125. package/dist/types/webhooks.d.ts.map +1 -1
  126. package/dist/utils/error-utils.d.ts +139 -0
  127. package/dist/utils/error-utils.d.ts.map +1 -0
  128. package/dist/utils/permissions-utils.d.ts +30 -7
  129. package/dist/utils/permissions-utils.d.ts.map +1 -1
  130. package/node_modules/@mentra/types/dist/applet.d.ts +5 -1
  131. package/node_modules/@mentra/types/dist/applet.d.ts.map +1 -1
  132. package/node_modules/@mentra/types/dist/capabilities/even-realities-g2.d.ts +12 -0
  133. package/node_modules/@mentra/types/dist/capabilities/even-realities-g2.d.ts.map +1 -0
  134. package/node_modules/@mentra/types/dist/capabilities/even-realities-g2.js +61 -0
  135. package/node_modules/@mentra/types/dist/capabilities/mentra-display.d.ts +12 -0
  136. package/node_modules/@mentra/types/dist/capabilities/mentra-display.d.ts.map +1 -0
  137. package/node_modules/@mentra/types/dist/capabilities/mentra-display.js +54 -0
  138. package/node_modules/@mentra/types/dist/capabilities/none.d.ts +13 -0
  139. package/node_modules/@mentra/types/dist/capabilities/none.d.ts.map +1 -0
  140. package/node_modules/@mentra/types/dist/capabilities/none.js +67 -0
  141. package/node_modules/@mentra/types/dist/enums.d.ts +8 -2
  142. package/node_modules/@mentra/types/dist/enums.d.ts.map +1 -1
  143. package/node_modules/@mentra/types/dist/enums.js +9 -2
  144. package/node_modules/@mentra/types/dist/hardware.d.ts +3 -1
  145. package/node_modules/@mentra/types/dist/hardware.d.ts.map +1 -1
  146. package/node_modules/@mentra/types/dist/hardware.js +12 -2
  147. package/node_modules/@mentra/types/dist/index.d.ts +1 -1
  148. package/node_modules/@mentra/types/dist/index.d.ts.map +1 -1
  149. package/node_modules/@mentra/types/dist/index.js +2 -1
  150. package/node_modules/@mentra/types/package.json +2 -2
  151. package/package.json +24 -12
  152. package/dist/examples/managed-rtmp-streaming-example.d.ts +0 -2
  153. package/dist/examples/managed-rtmp-streaming-example.d.ts.map +0 -1
  154. package/dist/examples/managed-rtmp-streaming-with-restream-example.d.ts +0 -11
  155. package/dist/examples/managed-rtmp-streaming-with-restream-example.d.ts.map +0 -1
  156. package/dist/examples/rtmp-streaming-example.d.ts +0 -2
  157. package/dist/examples/rtmp-streaming-example.d.ts.map +0 -1
  158. package/node_modules/@mentra/types/src/applet.ts +0 -51
  159. package/node_modules/@mentra/types/src/capabilities/even-realities-g1.ts +0 -63
  160. package/node_modules/@mentra/types/src/capabilities/mentra-live.ts +0 -103
  161. package/node_modules/@mentra/types/src/capabilities/simulated-glasses.ts +0 -76
  162. package/node_modules/@mentra/types/src/capabilities/vuzix-z100.ts +0 -60
  163. package/node_modules/@mentra/types/src/cli.ts +0 -169
  164. package/node_modules/@mentra/types/src/device.ts +0 -43
  165. package/node_modules/@mentra/types/src/enums.ts +0 -36
  166. package/node_modules/@mentra/types/src/hardware.ts +0 -172
  167. package/node_modules/@mentra/types/src/index.ts +0 -64
  168. package/node_modules/@mentra/types/tsconfig.json +0 -22
  169. package/node_modules/@mentra/types/tsconfig.tsbuildinfo +0 -1
@@ -2,9 +2,9 @@
2
2
  * 📷 Camera Module
3
3
  *
4
4
  * Unified camera functionality for App Sessions.
5
- * Handles both photo requests and RTMP streaming from connected glasses.
5
+ * Handles photo requests and livestreaming from connected glasses.
6
6
  */
7
- import { PhotoData, RtmpStreamStatus, ManagedStreamStatus, StreamStatusCheckResponse } from "../../../types";
7
+ import { PhotoData, StreamStatus, ManagedStreamStatus, StreamStatusCheckResponse, CameraRoiPosition } from "../../../types";
8
8
  import { VideoConfig, AudioConfig, StreamConfig, StreamStatusHandler } from "../../../types/rtmp-stream";
9
9
  import { Logger } from "pino";
10
10
  import { ManagedStreamOptions, ManagedStreamResult } from "./camera-managed-extension";
@@ -28,19 +28,36 @@ export interface PhotoRequestOptions {
28
28
  size?: "small" | "medium" | "large" | "full";
29
29
  /** Image compression level for upload optimization. Defaults to "none". */
30
30
  compress?: "none" | "medium" | "heavy";
31
+ /** Controls shutter sound. Defaults to true if omitted. */
32
+ sound?: boolean;
31
33
  }
32
34
  /**
33
- * Configuration options for an RTMP stream
35
+ * Configuration options for a stream (RTMP, SRT, or WHIP)
34
36
  */
35
- export interface RtmpStreamOptions {
36
- /** The RTMP URL to stream to (e.g., rtmp://server.example.com/live/stream-key) */
37
- rtmpUrl: string;
37
+ export interface StreamOptions {
38
+ /** The stream URL to stream to. Supports rtmp://, rtmps://, srt://, and https:// (WHIP) protocols.
39
+ * @example "rtmp://server.example.com/live/stream-key"
40
+ * @example "srt://server.example.com:4201?streamid=your-stream-id"
41
+ * @example "https://server.example.com/whip/endpoint"
42
+ */
43
+ streamUrl: string;
38
44
  /** Optional video configuration settings */
39
45
  video?: VideoConfig;
40
46
  /** Optional audio configuration settings */
41
47
  audio?: AudioConfig;
42
48
  /** Optional stream configuration settings */
43
49
  stream?: StreamConfig;
50
+ /** Controls stream start/stop sounds. Defaults to true if omitted. */
51
+ sound?: boolean;
52
+ }
53
+ /**
54
+ * Options for setting the camera FOV and ROI position
55
+ */
56
+ export interface CameraFovOptions {
57
+ /** Field of view in degrees (82-118). 118 means full sensor, no crop. */
58
+ fov: number;
59
+ /** ROI crop position. Ignored when fov is 118. Defaults to "center". */
60
+ roiPosition?: CameraRoiPosition;
44
61
  }
45
62
  /**
46
63
  * 📷 Camera Module Implementation
@@ -48,7 +65,7 @@ export interface RtmpStreamOptions {
48
65
  * Unified camera management for App Sessions.
49
66
  * Provides methods for:
50
67
  * - 📸 Requesting photos from glasses
51
- * - 📹 Starting/stopping RTMP streams
68
+ * - 📹 Starting/stopping livestreams
52
69
  * - 🔍 Monitoring photo and stream status
53
70
  * - 🧹 Cleanup and cancellation
54
71
  *
@@ -57,16 +74,16 @@ export interface RtmpStreamOptions {
57
74
  * // Request a photo
58
75
  * const photoData = await session.camera.requestPhoto({ saveToGallery: true });
59
76
  *
60
- * // Start streaming
61
- * await session.camera.startStream({ rtmpUrl: 'rtmp://example.com/live/key' });
77
+ * // Start a livestream (managed, WebRTC by default)
78
+ * const urls = await session.camera.startLivestream();
79
+ *
80
+ * // Start a local livestream (unmanaged, to your own server)
81
+ * await session.camera.startLocalLivestream({ streamUrl: 'srt://192.168.1.100:4201' });
62
82
  *
63
83
  * // Monitor stream status
64
- * session.camera.onStreamStatus((status) => {
84
+ * session.camera.onLocalLivestreamStatus((status) => {
65
85
  * console.log('Stream status:', status.status);
66
86
  * });
67
- *
68
- * // Stop streaming
69
- * await session.camera.stopStream();
70
87
  * ```
71
88
  */
72
89
  export declare class CameraModule {
@@ -119,7 +136,7 @@ export declare class CameraModule {
119
136
  * @deprecated Photo requests are now managed at AppServer level. This method delegates to AppServer.
120
137
  *
121
138
  * @param requestId - The request ID to cancel
122
- * @returns true if the request was cancelled, false if it wasn't found
139
+ * @returns true if the request was found and cancelled
123
140
  */
124
141
  cancelPhotoRequest(requestId: string): boolean;
125
142
  /**
@@ -130,32 +147,51 @@ export declare class CameraModule {
130
147
  */
131
148
  cancelAllPhotoRequests(): number;
132
149
  /**
133
- * 📹 Start an RTMP stream to the specified URL
150
+ * 🔭 Set the camera field-of-view and ROI crop position
151
+ *
152
+ * Fire-and-forget: the promise resolves once the message is sent.
153
+ * The phone applies the setting and pushes it to the glasses over BLE.
154
+ *
155
+ * @param options - FOV (82-118) and optional ROI position
156
+ *
157
+ * @example
158
+ * ```typescript
159
+ * // Narrow crop, looking at the top of the frame
160
+ * await session.camera.setFov({ fov: 92, roiPosition: "top" });
161
+ *
162
+ * // Full sensor, no crop (roiPosition is ignored)
163
+ * await session.camera.setFov({ fov: 118 });
164
+ * ```
165
+ */
166
+ setFov(options: CameraFovOptions): Promise<void>;
167
+ /**
168
+ * 📹 Start a local livestream to your own server (supports SRT, RTMP, WHIP)
134
169
  *
135
- * @param options - Configuration options for the stream
170
+ * Use this when streaming to a server you control (local network or remote).
171
+ * For managed streaming with automatic WebRTC playback, use `startLivestream()` instead.
172
+ *
173
+ * @param options - Configuration options including the stream URL
136
174
  * @returns Promise that resolves when the stream request is sent (not when streaming begins)
137
175
  *
138
176
  * @example
139
177
  * ```typescript
140
- * await session.camera.startStream({
141
- * rtmpUrl: 'rtmp://live.example.com/stream/key',
142
- * video: { resolution: '1920x1080', bitrate: 5000 },
143
- * audio: { bitrate: 128 }
178
+ * await session.camera.startLocalLivestream({
179
+ * streamUrl: 'srt://192.168.1.100:4201?streamid=my-stream',
144
180
  * });
145
181
  * ```
146
182
  */
147
- startStream(options: RtmpStreamOptions): Promise<void>;
183
+ startLocalLivestream(options: StreamOptions): Promise<void>;
148
184
  /**
149
- * 🛑 Stop the current RTMP stream
185
+ * 🛑 Stop the current local livestream
150
186
  *
151
187
  * @returns Promise that resolves when the stop request is sent
152
188
  *
153
189
  * @example
154
190
  * ```typescript
155
- * await session.camera.stopStream();
191
+ * await session.camera.stopLocalLivestream();
156
192
  * ```
157
193
  */
158
- stopStream(): Promise<void>;
194
+ stopLocalLivestream(): Promise<void>;
159
195
  /**
160
196
  * 🔍 Check if currently streaming
161
197
  *
@@ -173,7 +209,7 @@ export declare class CameraModule {
173
209
  *
174
210
  * @returns The current stream status, or undefined if not available
175
211
  */
176
- getStreamStatus(): RtmpStreamStatus | undefined;
212
+ getStreamStatus(): StreamStatus | undefined;
177
213
  /**
178
214
  * 📺 Subscribe to RTMP stream status updates
179
215
  * This uses the standard stream subscription mechanism
@@ -184,13 +220,13 @@ export declare class CameraModule {
184
220
  */
185
221
  unsubscribeFromStreamStatusUpdates(): void;
186
222
  /**
187
- * 👂 Listen for stream status updates using the standard event system
223
+ * 👂 Listen for local livestream status updates
188
224
  * @param handler - Function to call when stream status changes
189
225
  * @returns Cleanup function to remove the handler
190
226
  *
191
227
  * @example
192
228
  * ```typescript
193
- * const cleanup = session.camera.onStreamStatus((status) => {
229
+ * const cleanup = session.camera.onLocalLivestreamStatus((status) => {
194
230
  * console.log('Stream status:', status.status);
195
231
  * if (status.status === 'error') {
196
232
  * console.error('Stream error:', status.errorDetails);
@@ -201,7 +237,7 @@ export declare class CameraModule {
201
237
  * cleanup();
202
238
  * ```
203
239
  */
204
- onStreamStatus(handler: StreamStatusHandler): () => void;
240
+ onLocalLivestreamStatus(handler: StreamStatusHandler): () => void;
205
241
  /**
206
242
  * 🔄 Update internal stream state based on a status message
207
243
  * For internal use by AppSession
@@ -210,52 +246,74 @@ export declare class CameraModule {
210
246
  */
211
247
  updateStreamState(message: any): void;
212
248
  /**
213
- * 📹 Start a managed stream
249
+ * 📹 Start a livestream
214
250
  *
215
- * The cloud handles the RTMP endpoint and returns HLS/DASH URLs for viewing.
216
- * Multiple apps can consume the same managed stream simultaneously.
251
+ * Managed by Mentra cloud. Returns playback URLs automatically.
252
+ * By default uses WebRTC for sub-second latency. If restreamDestinations
253
+ * are provided, switches to SRT ingest with HLS/DASH playback.
254
+ * Multiple miniapps can consume the same livestream simultaneously.
217
255
  *
218
- * @param options - Configuration options for the managed stream
219
- * @returns Promise that resolves with viewing URLs when the stream is ready
256
+ * @param options - Configuration options for the livestream
257
+ * @returns Promise that resolves with playback URLs when the stream is ready
220
258
  *
221
259
  * @example
222
260
  * ```typescript
223
- * const urls = await session.camera.startManagedStream({
224
- * quality: '720p',
225
- * enableWebRTC: true
261
+ * // Default: WebRTC (low latency)
262
+ * const urls = await session.camera.startLivestream();
263
+ * console.log('WebRTC URL:', urls.webrtcUrl);
264
+ *
265
+ * // With restream destinations: SRT + HLS/DASH
266
+ * const urls = await session.camera.startLivestream({
267
+ * restreamDestinations: [{ url: 'rtmp://...', name: 'YouTube' }]
226
268
  * });
227
269
  * console.log('HLS URL:', urls.hlsUrl);
228
270
  * ```
229
271
  */
230
- startManagedStream(options?: ManagedStreamOptions): Promise<ManagedStreamResult>;
272
+ startLivestream(options?: ManagedStreamOptions): Promise<ManagedStreamResult>;
231
273
  /**
232
- * 🛑 Stop the current managed stream
274
+ * 🛑 Stop the current livestream
233
275
  *
234
- * This will stop streaming for this app only. If other apps are consuming
235
- * the same managed stream, it will continue for them.
276
+ * This will stop streaming for this miniapp only. If other miniapps are consuming
277
+ * the same livestream, it will continue for them.
236
278
  *
237
279
  * @returns Promise that resolves when the stop request is sent
238
280
  */
239
- stopManagedStream(): Promise<void>;
281
+ stopLivestream(): Promise<void>;
240
282
  /**
241
- * 🔔 Register a handler for managed stream status updates
283
+ * 🔔 Register a handler for livestream status updates
242
284
  *
243
285
  * @param handler - Function to call when stream status changes
244
286
  * @returns Cleanup function to unregister the handler
245
287
  */
246
- onManagedStreamStatus(handler: (status: ManagedStreamStatus) => void): () => void;
288
+ onLivestreamStatus(handler: (status: ManagedStreamStatus) => void): () => void;
247
289
  /**
248
- * 📊 Check if currently managed streaming
290
+ * 📊 Check if a livestream is active
249
291
  *
250
- * @returns true if a managed stream is active
292
+ * @returns true if a livestream is active
251
293
  */
252
- isManagedStreamActive(): boolean;
294
+ isLivestreamActive(): boolean;
253
295
  /**
254
- * 🔗 Get current managed stream URLs
296
+ * 🔗 Get current livestream URLs
255
297
  *
256
298
  * @returns Current stream URLs or undefined if not streaming
257
299
  */
300
+ getLivestreamUrls(): ManagedStreamResult | undefined;
301
+ /** @deprecated Use `startLivestream()` instead */
302
+ startManagedStream(options?: ManagedStreamOptions): Promise<ManagedStreamResult>;
303
+ /** @deprecated Use `stopLivestream()` instead */
304
+ stopManagedStream(): Promise<void>;
305
+ /** @deprecated Use `onLivestreamStatus()` instead */
306
+ onManagedStreamStatus(handler: (status: ManagedStreamStatus) => void): () => void;
307
+ /** @deprecated Use `isLivestreamActive()` instead */
308
+ isManagedStreamActive(): boolean;
309
+ /** @deprecated Use `getLivestreamUrls()` instead */
258
310
  getManagedStreamUrls(): ManagedStreamResult | undefined;
311
+ /** @deprecated Use `startLocalLivestream()` instead */
312
+ startStream(options: StreamOptions): Promise<void>;
313
+ /** @deprecated Use `stopLocalLivestream()` instead */
314
+ stopStream(): Promise<void>;
315
+ /** @deprecated Use `onLocalLivestreamStatus()` instead */
316
+ onStreamStatus(handler: StreamStatusHandler): () => void;
259
317
  /**
260
318
  * 🔍 Check for any existing streams (managed or unmanaged) for the current user
261
319
  *
@@ -272,7 +330,7 @@ export declare class CameraModule {
272
330
  * if (streamInfo.streamInfo?.type === 'managed') {
273
331
  * console.log('HLS URL:', streamInfo.streamInfo.hlsUrl);
274
332
  * } else {
275
- * console.log('RTMP URL:', streamInfo.streamInfo.rtmpUrl);
333
+ * console.log('Stream URL:', streamInfo.streamInfo.streamUrl);
276
334
  * }
277
335
  * }
278
336
  * ```
@@ -290,7 +348,7 @@ export declare class CameraModule {
290
348
  previewUrl?: string;
291
349
  thumbnailUrl?: string;
292
350
  activeViewers?: number;
293
- rtmpUrl?: string;
351
+ streamUrl?: string;
294
352
  requestingAppId?: string;
295
353
  };
296
354
  }>;
@@ -320,5 +378,5 @@ export declare class CameraModule {
320
378
  photoRequests: number;
321
379
  };
322
380
  }
323
- export { VideoConfig, AudioConfig, StreamConfig, StreamStatusHandler };
381
+ export type { VideoConfig, AudioConfig, StreamConfig, StreamStatusHandler };
324
382
  //# sourceMappingURL=camera.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"camera.d.ts","sourceRoot":"","sources":["../../../../src/app/session/modules/camera.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAEL,SAAS,EAIT,gBAAgB,EAEhB,mBAAmB,EACnB,yBAAyB,EAC1B,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,YAAY,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AAEzG,OAAO,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AAC9B,OAAO,EAA0B,oBAAoB,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AAG/G;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC,sDAAsD;IACtD,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,kEAAkE;IAClE,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,6DAA6D;IAC7D,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;;;;OAMG;IACH,IAAI,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,OAAO,GAAG,MAAM,CAAC;IAC7C,2EAA2E;IAC3E,QAAQ,CAAC,EAAE,MAAM,GAAG,QAAQ,GAAG,OAAO,CAAC;CACxC;AAED;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,kFAAkF;IAClF,OAAO,EAAE,MAAM,CAAC;IAChB,4CAA4C;IAC5C,KAAK,CAAC,EAAE,WAAW,CAAC;IACpB,4CAA4C;IAC5C,KAAK,CAAC,EAAE,WAAW,CAAC;IACpB,6CAA6C;IAC7C,MAAM,CAAC,EAAE,YAAY,CAAC;CACvB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,qBAAa,YAAY;IACvB,OAAO,CAAC,OAAO,CAAM;IACrB,OAAO,CAAC,WAAW,CAAS;IAC5B,OAAO,CAAC,SAAS,CAAS;IAC1B,OAAO,CAAC,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,EAAE;YACX,IAAI,EAAE,SAAS,GAAG,WAAW,CAAC;YAC9B,QAAQ,EAAE,MAAM,CAAC;YACjB,MAAM,EAAE,MAAM,CAAC;YACf,SAAS,EAAE,IAAI,CAAC;YAEhB,MAAM,CAAC,EAAE,MAAM,CAAC;YAChB,OAAO,CAAC,EAAE,MAAM,CAAC;YACjB,SAAS,CAAC,EAAE,MAAM,CAAC;YACnB,UAAU,CAAC,EAAE,MAAM,CAAC;YACpB,YAAY,CAAC,EAAE,MAAM,CAAC;YACtB,aAAa,CAAC,EAAE,MAAM,CAAC;YAEvB,SAAS,CAAC,EAAE,MAAM,CAAC;YACnB,eAAe,CAAC,EAAE,MAAM,CAAC;SAC1B,CAAC;KACH,CAAC;IAIF;;;OAGG;IACH,yBAAyB,CAAC,QAAQ,EAAE,yBAAyB,GAAG,IAAI;IAIpE;;;OAGG;IACH,yBAAyB,CAAC,OAAO,EAAE,mBAAmB,GAAG,IAAI;IAQ7D;;;;;OAKG;IACH,eAAe,CAAC,YAAY,EAAE,MAAM,GAAG,IAAI;IAI3C;;;;OAIG;IACH,iBAAiB,IAAI;QAAE,aAAa,EAAE,MAAM,CAAA;KAAE;CAe/C;AAGD,YAAY,EAAE,WAAW,EAAE,WAAW,EAAE,YAAY,EAAE,mBAAmB,EAAE,CAAC"}
@@ -1,4 +1,5 @@
1
- export * from './audio';
2
- export * from './camera';
3
- export * from './camera-managed-extension';
1
+ export * from "./audio";
2
+ export * from "./audio-output-stream";
3
+ export * from "./camera";
4
+ export * from "./camera-managed-extension";
4
5
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/app/session/modules/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,4BAA4B,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/app/session/modules/index.ts"],"names":[],"mappings":"AAA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AC;CA4BrF"}
1
+ {"version":3,"file":"location.d.ts","sourceRoot":"","sources":["../../../../src/app/session/modules/location.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,IAAI,CAAC;AAChC,OAAO,EAAyB,cAAc,EAAyB,MAAM,gBAAgB,CAAC;AAE9F,qBAAa,eAAe;IAC1B,OAAO,CAAC,OAAO,CAAa;IAC5B,OAAO,CAAC,0BAA0B,CAAwB;gBAE9C,OAAO,EAAE,UAAU;IAKxB,iBAAiB,CACtB,OAAO,EAAE;QACP,QAAQ,EACJ,UAAU,GACV,MAAM,GACN,UAAU,GACV,WAAW,GACX,eAAe,GACf,WAAW,GACX,iBAAiB,GACjB,SAAS,CAAC;KACf,EACD,OAAO,EAAE,CAAC,IAAI,EAAE,cAAc,KAAK,IAAI,GACtC,MAAM,IAAI;IAmBN,qBAAqB,IAAI,IAAI;IAUvB,iBAAiB,CAAC,OAAO,EAAE;QAAE,QAAQ,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,cAAc,CAAC;CA4BvF"}
@@ -1,3 +1,4 @@
1
+ import type { Logger } from "pino";
1
2
  import { AppSetting, AppSettings } from "../../types";
2
3
  /**
3
4
  * Change information for a single setting
@@ -28,6 +29,7 @@ export declare class SettingsManager {
28
29
  private settings;
29
30
  private emitter;
30
31
  private apiClient?;
32
+ private logger;
31
33
  private mentraosSettings;
32
34
  private mentraosEmitter;
33
35
  private subscribeFn?;
@@ -39,8 +41,10 @@ export declare class SettingsManager {
39
41
  * @param wsUrl WebSocket URL (for deriving HTTP API URL)
40
42
  * @param userId User ID (for authenticated requests)
41
43
  * @param subscribeFn Optional function to call to subscribe to streams
44
+ * @param logger Logger instance from the parent session
42
45
  */
43
- constructor(initialSettings?: AppSettings, packageName?: string, wsUrl?: string, userId?: string, subscribeFn?: (streams: string[]) => Promise<void>);
46
+ constructor(initialSettings?: AppSettings, packageName?: string, wsUrl?: string, userId?: string, subscribeFn?: (streams: string[]) => Promise<void>, // Added parameter
47
+ logger?: Logger);
44
48
  /**
45
49
  * Configure the API client
46
50
  *
@@ -1 +1 @@
1
- {"version":3,"file":"settings.d.ts","sourceRoot":"","sources":["../../../src/app/session/settings.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAKtD;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,QAAQ,EAAE,GAAG,CAAC;IACd,QAAQ,EAAE,GAAG,CAAC;CACf;AAED;;GAEG;AACH,MAAM,MAAM,iBAAiB,GAAG,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC;AAE9D;;GAEG;AACH,MAAM,MAAM,qBAAqB,GAAG,CAAC,OAAO,EAAE,iBAAiB,KAAK,IAAI,CAAC;AAEzE;;GAEG;AACH,MAAM,MAAM,yBAAyB,CAAC,CAAC,GAAG,GAAG,IAAI,CAC/C,QAAQ,EAAE,CAAC,EACX,QAAQ,EAAE,CAAC,KACR,IAAI,CAAC;AAUV;;;;;GAKG;AACH,qBAAa,eAAe;IAE1B,OAAO,CAAC,QAAQ,CAAmB;IAGnC,OAAO,CAAC,OAAO,CAAsB;IAGrC,OAAO,CAAC,SAAS,CAAC,CAAY;IAG9B,OAAO,CAAC,gBAAgB,CAA2B;IACnD,OAAO,CAAC,eAAe,CAAsB;IAC7C,OAAO,CAAC,WAAW,CAAC,CAAuC;IAE3D;;;;;;;;OAQG;gBAED,eAAe,GAAE,WAAgB,EACjC,WAAW,CAAC,EAAE,MAAM,EACpB,KAAK,CAAC,EAAE,MAAM,EACd,MAAM,CAAC,EAAE,MAAM,EACf,WAAW,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,OAAO,CAAC,IAAI,CAAC;IAWpD;;;;;;OAMG;IACH,kBAAkB,CAAC,WAAW,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,IAAI;IAS5E;;;;;;OAMG;IACH,cAA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;IAenC;;;;;;;;;;;;;OAaG;IACH,gBAAgB,CAAC,CAAC,GAAG,GAAG,EAAE,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE,yBAAyB,CAAC,CAAC,CAAC,GAAG,MAAM,IAAI;IAIzF;;;;;;;OAOG;IACH,wBAAwB,CAAC,CAAC,GAAG,GAAG,EAAE,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE,yBAAyB,CAAC,CAAC,CAAC,GAAG,MAAM,IAAI;IAIjG;;;;OAIG;IACH,sBAAsB,CAAC,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,IAAI;IA6B9D;;;;;OAKG;IACH,uBAAuB,CAAC,CAAC,GAAG,GAAG,EAAE,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,QAAQ,EAAE,CAAC,EAAE,QAAQ,EAAE,CAAC,KAAK,IAAI,GAAG,MAAM,IAAI;IAgCtG;;OAEG;IACH,kBAAkB,CAAC,CAAC,GAAG,GAAG,EAAE,GAAG,EAAE,MAAM,EAAE,YAAY,CAAC,EAAE,CAAC,GAAG,CAAC;CAO9D"}
@@ -1,5 +1,6 @@
1
- import { Response, NextFunction } from "express";
2
- import { AuthenticatedRequest } from "../../types";
1
+ import { Hono } from "hono";
2
+ import type { MiddlewareHandler } from "hono";
3
+ import { AuthVariables, MentraAuthContext, MentraAuthHonoContext } from "../../types";
3
4
  import { AppSession } from "../session";
4
5
  /**
5
6
  * Extracts the temporary token from a URL string.
@@ -20,17 +21,16 @@ export declare function exchangeToken(cloudApiUrl: string, tempToken: string, ap
20
21
  userId: string;
21
22
  }>;
22
23
  /**
23
- * Express middleware for automatically handling the token exchange.
24
+ * Hono middleware for automatically handling the token exchange.
24
25
  * Assumes API key and Cloud URL are available (e.g., via environment variables).
25
- * Adds `req.authUserId` if successful.
26
+ * Sets context variables `authUserId` and `activeSession` if successful.
26
27
  *
27
28
  * @param options Configuration options.
28
- * @param options.cloudApiUrl The base URL of the MentraOS Cloud API.
29
29
  * @param options.apiKey Your App's secret API key.
30
- * @param options.tokenQueryParam The name of the query parameter containing the token (default: 'aos_temp_token').
30
+ * @param options.packageName Your App's package name.
31
31
  * @param options.cookieName The name of the cookie to store the session token (default: 'aos_session').
32
32
  * @param options.cookieSecret Secret key used to sign the session cookie. MUST be provided and kept secure.
33
- * @param options.cookieOptions Options for the session cookie (default: { httpOnly: true, secure: process.env.NODE_ENV === 'production' }).
33
+ * @param options.cookieOptions Options for the session cookie.
34
34
  */
35
35
  export declare function createAuthMiddleware(options: {
36
36
  apiKey: string;
@@ -42,8 +42,66 @@ export declare function createAuthMiddleware(options: {
42
42
  httpOnly?: boolean;
43
43
  secure?: boolean;
44
44
  maxAge?: number;
45
- sameSite?: boolean | "lax" | "strict" | "none";
45
+ sameSite?: "Lax" | "Strict" | "None";
46
46
  path?: string;
47
47
  };
48
- }): (req: AuthenticatedRequest, res: Response, next: NextFunction) => Promise<void>;
48
+ }): MiddlewareHandler<{
49
+ Variables: AuthVariables;
50
+ }>;
51
+ /**
52
+ * Read the authenticated Mentra context from a Hono request context.
53
+ *
54
+ * This helper intentionally hides the underlying context variable names so
55
+ * app code does not depend on implementation details like `authUserId`.
56
+ */
57
+ export declare function getMentraAuth(c: MentraAuthHonoContext): MentraAuthContext;
58
+ /**
59
+ * Read the authenticated Mentra context and throw if no authenticated user
60
+ * is present. Intended for SDK-owned middleware / helpers that want a strict
61
+ * contract after authentication has been enforced.
62
+ */
63
+ export declare function requireMentraAuth(c: MentraAuthHonoContext): {
64
+ userId: string;
65
+ session: AppSession | null;
66
+ };
67
+ /**
68
+ * Generates a frontend token for client-side authentication.
69
+ * The token format is userId:hash where hash = sha256(userId + sha256(apiKey))
70
+ * @param userId The user ID to embed in the token
71
+ * @param apiKey The app's API key
72
+ * @returns A frontend token string
73
+ */
74
+ export declare function generateFrontendToken(userId: string, apiKey: string): string;
75
+ /**
76
+ * Creates a Hono sub-app with authentication routes for frontend token exchange.
77
+ * Mount this at /api/mentra/auth to enable frontend-initiated authentication.
78
+ *
79
+ * This is required for apps using Bun's fullstack dev server where the HTML
80
+ * is served directly by Bun's routes (bypassing Hono middleware).
81
+ *
82
+ * @example
83
+ * ```typescript
84
+ * import { createMentraAuthRoutes } from "@mentra/sdk";
85
+ *
86
+ * const app = new MyAppServer({...});
87
+ *
88
+ * app.route("/api/mentra/auth", createMentraAuthRoutes({
89
+ * apiKey: API_KEY,
90
+ * packageName: PACKAGE_NAME,
91
+ * cookieSecret: COOKIE_SECRET,
92
+ * }));
93
+ * ```
94
+ */
95
+ export declare function createMentraAuthRoutes(options: {
96
+ apiKey: string;
97
+ packageName: string;
98
+ cookieSecret: string;
99
+ cookieOptions?: {
100
+ httpOnly?: boolean;
101
+ secure?: boolean;
102
+ maxAge?: number;
103
+ sameSite?: "Lax" | "Strict" | "None";
104
+ path?: string;
105
+ };
106
+ }): Hono;
49
107
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/app/webview/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACjD,OAAO,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAKnD,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAMxC;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAQ3D;AAED;;;;;;;;GAQG;AACH,wBAAsB,aAAa,CACjC,WAAW,EAAE,MAAM,EACnB,SAAS,EAAE,MAAM,EACjB,MAAM,EAAE,MAAM,EACd,WAAW,EAAE,MAAM,GAClB,OAAO,CAAC;IAAE,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC,CAyC7B;AA6JD;;;;;;;;;;;;GAYG;AACH,wBAAgB,oBAAoB,CAAC,OAAO,EAAE;IAC5C,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,E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}
@@ -1,18 +1,41 @@
1
1
  /**
2
2
  * updates.ts
3
3
  *
4
- * This file defines constant messages that should be displayed
5
- * in the terminal to notify developers about new SDK releases.
4
+ * SDK update notification messages and dist-tag utilities.
6
5
  *
7
- * Each function generates a stylized ASCII message (banner-style)
8
- * that highlights the latest SDK version and provides the npm install command.
9
- * https://patorjk.com/software/taag/
6
+ * Previously used boxen-bordered ASCII art banners. Now returns plain
7
+ * single-line strings that the clean transport formats with color/prefix.
10
8
  *
11
- * These messages are intended to be logged to the console or shown in
12
- * terminal output so developers are aware of updates in a clear
13
- * and visually distinct way.
9
+ * The clean logger renders this as:
10
+ * MentraOS ⚠ SDK update available: 2.1.29 2.1.30 bun install @mentra/sdk@latest
11
+ * MentraOS ⚠ SDK update available: 3.0.0-hono.4 → 3.0.0-hono.5 — bun install @mentra/sdk@hono
12
+ */
13
+ /**
14
+ * Determine the npm dist-tag (release track) from a semver version string.
15
+ *
16
+ * Parses the prerelease identifier:
17
+ * "2.1.29" → "latest" (no prerelease)
18
+ * "2.1.31-beta.5" → "beta"
19
+ * "3.0.0-hono.4" → "hono"
20
+ * "2.1.2-alpha.0" → "alpha"
21
+ * "4.0.0-rc.1" → "rc"
22
+ * "1.0.0-unknown.1" → "latest" (unrecognized prerelease falls back to latest)
23
+ *
24
+ * @param version - The installed SDK version string
25
+ * @returns The dist-tag name (e.g., "latest", "beta", "hono")
26
+ */
27
+ export declare function getDistTag(version: string): string;
28
+ /**
29
+ * Generate a single-line SDK update notification message.
14
30
  *
31
+ * The install command uses the correct dist-tag so developers on non-latest
32
+ * tracks (beta, hono, etc.) aren't told to install @latest which would
33
+ * downgrade/brick their app.
15
34
  *
35
+ * @param currentVersion - The currently installed SDK version
36
+ * @param latestVersion - The latest available SDK version for this track
37
+ * @param tag - The npm dist-tag for the install command (default: "latest")
38
+ * @returns A plain string suitable for `logger.warn()`
16
39
  */
17
- export declare const newSDKUpdate: (versionNumb: string) => string;
40
+ export declare const newSDKUpdate: (currentVersion: string, latestVersion: string, tag?: string) => string;
18
41
  //# sourceMappingURL=updates.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"updates.d.ts","sourceRoot":"","sources":["../../../src/constants/log-messages/updates.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAmCH,eAAO,MAAM,YAAY,GAAI,aAAa,MAAM,KAAG,MAElD,CAAC"}
1
+ {"version":3,"file":"updates.d.ts","sourceRoot":"","sources":["../../../src/constants/log-messages/updates.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AASH;;;;;;;;;;;;;GAaG;AACH,wBAAgB,UAAU,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAIlD;AAED;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,YAAY,GAAI,gBAAgB,MAAM,EAAE,eAAe,MAAM,EAAE,MAAK,MAAiB,KAAG,MAEpG,CAAC"}
@@ -1,3 +1,15 @@
1
+ /**
2
+ * warning.ts
3
+ *
4
+ * Permission warning messages for the MentraOS SDK.
5
+ *
6
+ * Previously used boxen-bordered ASCII art banners with side-by-side layouts.
7
+ * Now returns plain single-line strings that the clean transport formats with
8
+ * color/prefix.
9
+ *
10
+ * The clean logger renders these as:
11
+ * MentraOS ⚠ camera permission required for requestPhoto — enable at https://console.mentra.glass/apps/org.example.myapp/edit
12
+ */
1
13
  export declare const noMicrophoneWarn: (funcName?: string, packageName?: string) => string;
2
14
  export declare const locationWarn: (funcName?: string, packageName?: string) => string;
3
15
  export declare const baackgroundLocationWarn: (funcName?: string, packageName?: string) => string;
@@ -1 +1 @@
1
- {"version":3,"file":"warning.d.ts","sourceRoot":"","sources":["../../../src/constants/log-messages/warning.ts"],"names":[],"mappings":"AA0EA,eAAO,MAAM,gBAAgB,GAC3B,WAAW,MAAM,EACjB,cAAc,MAAM,KACnB,MAEF,CAAC;AAEF,eAAO,MAAM,YAAY,GACvB,WAAW,MAAM,EACjB,cAAc,MAAM,KACnB,MAEF,CAAC;AAEF,eAAO,MAAM,uBAAuB,GAClC,WAAW,MAAM,EACjB,cAAc,MAAM,KACnB,MAEF,CAAC;AAEF,eAAO,MAAM,YAAY,GACvB,WAAW,MAAM,EACjB,cAAc,MAAM,KACnB,MAEF,CAAC;AAEF,eAAO,MAAM,mBAAmB,GAC9B,WAAW,MAAM,EACjB,cAAc,MAAM,KACnB,MAEF,CAAC;AAEF,eAAO,MAAM,mBAAmB,GAC9B,WAAW,MAAM,EACjB,cAAc,MAAM,KACnB,MAEF,CAAC;AAEF,eAAO,MAAM,UAAU,GAAI,WAAW,MAAM,EAAE,cAAc,MAAM,KAAG,MAEpE,CAAC"}
1
+ {"version":3,"file":"warning.d.ts","sourceRoot":"","sources":["../../../src/constants/log-messages/warning.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAgBH,eAAO,MAAM,gBAAgB,GAAI,WAAW,MAAM,EAAE,cAAc,MAAM,KAAG,MACb,CAAC;AAE/D,eAAO,MAAM,YAAY,GAAI,WAAW,MAAM,EAAE,cAAc,MAAM,KAAG,MACX,CAAC;AAE7D,eAAO,MAAM,uBAAuB,GAAI,WAAW,MAAM,EAAE,cAAc,MAAM,KAAG,MACX,CAAC;AAExE,eAAO,MAAM,YAAY,GAAI,WAAW,MAAM,EAAE,cAAc,MAAM,KAAG,MACX,CAAC;AAE7D,eAAO,MAAM,mBAAmB,GAAI,WAAW,MAAM,EAAE,cAAc,MAAM,KAAG,MACT,CAAC;AAEtE,eAAO,MAAM,mBAAmB,GAAI,WAAW,MAAM,EAAE,cAAc,MAAM,KAAG,MACT,CAAC;AAEtE,eAAO,MAAM,UAAU,GAAI,WAAW,MAAM,EAAE,cAAc,MAAM,KAAG,MACX,CAAC"}
@@ -4,6 +4,8 @@
4
4
  * Glasses-agnostic, pixel-accurate text measurement and wrapping library
5
5
  * for smart glasses displays.
6
6
  *
7
+ * This module re-exports from the shared @mentra/display-utils package.
8
+ *
7
9
  * @example
8
10
  * ```typescript
9
11
  * import {
@@ -26,5 +28,5 @@
26
28
  * const viewport = scrollView.getViewport()
27
29
  * ```
28
30
  */
29
- export { type DisplayProfile, type FontMetrics, type UniformScriptWidths, type FallbackConfig, type DisplayConstraints, type ScriptType, G1_PROFILE, G1_PROFILE_LEGACY, G1_HYPHEN_WIDTH_PX, G1_SPACE_WIDTH_PX, TextMeasurer, type CharMeasurement, type TextMeasurement, detectScript, isCJKCharacter, isKoreanCharacter, isUniformWidthScript, isUnsupportedScript, needsHyphenForBreak, SCRIPT_RANGES, TextWrapper, type WrapOptions, type WrapResult, type LineMetrics, type BreakMode, DEFAULT_WRAP_OPTIONS, DisplayHelpers, type TruncateResult, type Page, type Chunk, ScrollView, type ScrollPosition, type ScrollViewport, createDisplayToolkit, createG1Toolkit, createG1LegacyToolkit, } from "./display-utils/index";
31
+ export * from "@mentra/display-utils";
30
32
  //# sourceMappingURL=display-utils.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"display-utils.d.ts","sourceRoot":"","sources":["../src/display-utils.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAGH,OAAO,EAEL,KAAK,cAAc,EACnB,KAAK,WAAW,EAChB,KAAK,mBAAmB,EACxB,KAAK,cAAc,EACnB,KAAK,kBAAkB,EACvB,KAAK,UAAU,EACf,UAAU,EACV,iBAAiB,EACjB,kBAAkB,EAClB,iBAAiB,EAGjB,YAAY,EACZ,KAAK,eAAe,EACpB,KAAK,eAAe,EACpB,YAAY,EACZ,cAAc,EACd,iBAAiB,EACjB,oBAAoB,EACpB,mBAAmB,EACnB,mBAAmB,EACnB,aAAa,EAGb,WAAW,EACX,KAAK,WAAW,EAChB,KAAK,UAAU,EACf,KAAK,WAAW,EAChB,KAAK,SAAS,EACd,oBAAoB,EAGpB,cAAc,EACd,KAAK,cAAc,EACnB,KAAK,IAAI,EACT,KAAK,KAAK,EAGV,UAAU,EACV,KAAK,cAAc,EACnB,KAAK,cAAc,EAGnB,oBAAoB,EACpB,eAAe,EACf,qBAAqB,GACtB,MAAM,uBAAuB,CAAA"}
1
+ {"version":3,"file":"display-utils.d.ts","sourceRoot":"","sources":["../src/display-utils.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAGH,cAAc,uBAAuB,CAAA"}