@lavitre/apps 1.49.0

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 (69) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +121 -0
  3. package/dist/Common/AiChannel.d.ts +59 -0
  4. package/dist/Common/AiChannel.js +97 -0
  5. package/dist/Common/AiChannel.js.map +1 -0
  6. package/dist/Common/BlobStore.d.ts +44 -0
  7. package/dist/Common/BlobStore.js +186 -0
  8. package/dist/Common/BlobStore.js.map +1 -0
  9. package/dist/Common/Common.Model.d.ts +1020 -0
  10. package/dist/Common/Common.Model.js +21 -0
  11. package/dist/Common/Common.Model.js.map +1 -0
  12. package/dist/Common/CrdtChannel.d.ts +198 -0
  13. package/dist/Common/CrdtChannel.js +659 -0
  14. package/dist/Common/CrdtChannel.js.map +1 -0
  15. package/dist/Common/Version.d.ts +21 -0
  16. package/dist/Common/Version.js +62 -0
  17. package/dist/Common/Version.js.map +1 -0
  18. package/dist/Common/index.d.ts +6 -0
  19. package/dist/Common/index.js +32 -0
  20. package/dist/Common/index.js.map +1 -0
  21. package/dist/CompanionConnector/CompanionConnector.Model.d.ts +85 -0
  22. package/dist/CompanionConnector/CompanionConnector.Model.js +17 -0
  23. package/dist/CompanionConnector/CompanionConnector.Model.js.map +1 -0
  24. package/dist/CompanionConnector/CompanionConnector.d.ts +28 -0
  25. package/dist/CompanionConnector/CompanionConnector.js +385 -0
  26. package/dist/CompanionConnector/CompanionConnector.js.map +1 -0
  27. package/dist/CompanionConnector/index.d.ts +2 -0
  28. package/dist/CompanionConnector/index.js +3 -0
  29. package/dist/CompanionConnector/index.js.map +1 -0
  30. package/dist/CompanionFrame/CompanionFrame.d.ts +103 -0
  31. package/dist/CompanionFrame/CompanionFrame.js +100 -0
  32. package/dist/CompanionFrame/CompanionFrame.js.map +1 -0
  33. package/dist/CompanionFrame/index.d.ts +1 -0
  34. package/dist/CompanionFrame/index.js +2 -0
  35. package/dist/CompanionFrame/index.js.map +1 -0
  36. package/dist/Connector/Connector.Model.d.ts +567 -0
  37. package/dist/Connector/Connector.Model.js +2 -0
  38. package/dist/Connector/Connector.Model.js.map +1 -0
  39. package/dist/Connector/Connector.d.ts +227 -0
  40. package/dist/Connector/Connector.js +1337 -0
  41. package/dist/Connector/Connector.js.map +1 -0
  42. package/dist/Connector/index.d.ts +2 -0
  43. package/dist/Connector/index.js +3 -0
  44. package/dist/Connector/index.js.map +1 -0
  45. package/dist/Frame/Frame.Model.d.ts +533 -0
  46. package/dist/Frame/Frame.Model.js +2 -0
  47. package/dist/Frame/Frame.Model.js.map +1 -0
  48. package/dist/Frame/Frame.d.ts +309 -0
  49. package/dist/Frame/Frame.js +1408 -0
  50. package/dist/Frame/Frame.js.map +1 -0
  51. package/dist/Frame/SyncAdapter.d.ts +75 -0
  52. package/dist/Frame/SyncAdapter.js +134 -0
  53. package/dist/Frame/SyncAdapter.js.map +1 -0
  54. package/dist/Frame/index.d.ts +3 -0
  55. package/dist/Frame/index.js +4 -0
  56. package/dist/Frame/index.js.map +1 -0
  57. package/dist/MediaLink/MediaLink.d.ts +178 -0
  58. package/dist/MediaLink/MediaLink.js +1432 -0
  59. package/dist/MediaLink/MediaLink.js.map +1 -0
  60. package/dist/MediaLink/index.d.ts +1 -0
  61. package/dist/MediaLink/index.js +2 -0
  62. package/dist/MediaLink/index.js.map +1 -0
  63. package/dist/Native/index.d.ts +170 -0
  64. package/dist/Native/index.js +19 -0
  65. package/dist/Native/index.js.map +1 -0
  66. package/dist/Version.d.ts +1 -0
  67. package/dist/Version.js +2 -0
  68. package/dist/Version.js.map +1 -0
  69. package/package.json +76 -0
@@ -0,0 +1,1020 @@
1
+ export type DeviceType = 'vitre' | 'guest' | 'vitreMini' | 'vitrePrimary' | 'vitreSecondary' | 'tableau' | 'vitreGuest' | 'companion';
2
+ export type Privacy = 'none' | 'muted' | 'blurred' | 'mutedSender';
3
+ export type Language = 'fr' | 'en' | 'it';
4
+ export type CompanionUser = {
5
+ id: string;
6
+ firstName: string;
7
+ lastName: string;
8
+ roles: string[];
9
+ isAdministrator: boolean;
10
+ };
11
+ export type CompanionInformation = {
12
+ id: string;
13
+ name: string;
14
+ color: string;
15
+ user?: CompanionUser;
16
+ language: Language;
17
+ origin: string;
18
+ version?: string;
19
+ };
20
+ /**
21
+ * @deprecated Use string
22
+ */
23
+ export type LegacyI18nMap = {
24
+ fr: string;
25
+ en: string;
26
+ it: string;
27
+ };
28
+ export type I18nMap = string | LegacyI18nMap;
29
+ export type FileData = {
30
+ id?: string;
31
+ name: string;
32
+ mime: string;
33
+ data: ArrayBufferLike;
34
+ shareTargetId?: string;
35
+ };
36
+ export type DeviceScalingVersion = 'legacy' | 'rotationIndependent';
37
+ export type Ratio = 'ratio16_9' | 'ratio9_16';
38
+ export type CropMode = 'cropped' | 'notCropped';
39
+ export type DeviceScaling = {
40
+ scale: number;
41
+ offsetX: number;
42
+ offsetY: number;
43
+ orientation?: Orientation;
44
+ orientationBy?: OrientationBy;
45
+ ratio?: Ratio;
46
+ cropMode?: CropMode;
47
+ version?: DeviceScalingVersion;
48
+ };
49
+ export type DeviceFullscreen = 'fullscreen' | 'localDevice' | 'notFullscreen';
50
+ export type Device = {
51
+ id: string;
52
+ name: string;
53
+ color: string;
54
+ type: DeviceType;
55
+ privacy: Privacy;
56
+ mainDeviceId?: string;
57
+ /**
58
+ * represent the scaling applied on the local camera stream when sending to this device
59
+ */
60
+ sendingScaling?: DeviceScaling;
61
+ orientation?: Orientation;
62
+ orientationBy?: OrientationBy;
63
+ fullscreen?: DeviceFullscreen;
64
+ };
65
+ export type TeamInfo = {
66
+ id: string;
67
+ name: string;
68
+ domain: string;
69
+ };
70
+ export type HostInformation = {
71
+ language: Language;
72
+ device: Device;
73
+ version?: string;
74
+ devicesInSpace: Device[];
75
+ spaceTeam: TeamInfo;
76
+ owner: TeamInfo;
77
+ origin: string;
78
+ team: string;
79
+ teamId: string;
80
+ space: Space;
81
+ color: string;
82
+ privacy: Privacy;
83
+ guestInviteUrl: string;
84
+ displays: Display[];
85
+ settings?: any;
86
+ vitreSettings: VitreSettings;
87
+ companionCode?: string;
88
+ /**
89
+ * `true` when the frame iframe is loaded by a la Vitre **companion**
90
+ * (i.e. the host is `lavitre-companion`, not a Vitre). Apps can use
91
+ * this to pick the right SDK surface — `initializeCompanionFrame` /
92
+ * `CompanionFrame` on the companion side, `initializeFrame` / `Frame`
93
+ * on the Vitre side — and to branch UI / behaviour that genuinely
94
+ * differs between the two contexts (e.g. show a "Leave this frame"
95
+ * button on the companion that calls `closeOnCompanion()`, omit it on
96
+ * the Vitre).
97
+ *
98
+ * Undefined / false on the Vitre side. Set by
99
+ * `lavitre-companion/.../CompanionApps.State.fs:buildVitreLikeHostInformation`.
100
+ * Backward-compat: old hosts simply omit the field, so apps that read
101
+ * it as `?? false` keep working unchanged. Added 1.15.
102
+ */
103
+ isCompanion?: boolean;
104
+ };
105
+ export type SendMessageTo = {
106
+ connectorId?: string;
107
+ deviceIds?: string[];
108
+ message: string;
109
+ fileData?: FileData;
110
+ };
111
+ export type SendMessageToAll = {
112
+ connectorId?: string;
113
+ message: string;
114
+ fileData?: FileData;
115
+ };
116
+ export type SendKnockKnock = {
117
+ deviceIds?: string[];
118
+ };
119
+ export type DeviceJoined = {
120
+ device: Device;
121
+ };
122
+ export type DeviceLeft = {
123
+ deviceId: string;
124
+ };
125
+ export type DeviceMessageReceived = {
126
+ from: string;
127
+ message: string;
128
+ fileData?: FileData;
129
+ fromConnectorId?: string;
130
+ };
131
+ export type MenuCategory = {
132
+ label: string;
133
+ description?: string;
134
+ order?: number;
135
+ };
136
+ export type NumberRange = {
137
+ id: string;
138
+ min: number;
139
+ max: number;
140
+ value: number;
141
+ step: number;
142
+ };
143
+ export type Field = {
144
+ type: 'numberRange';
145
+ } & NumberRange;
146
+ export type Availability = {
147
+ vitre?: boolean;
148
+ companion?: boolean;
149
+ companionAdmin?: boolean;
150
+ };
151
+ /**
152
+ * Declares that clicking a MenuEntry on the companion opens a frame on
153
+ * the companion side (and on the Vitre too, if `kind === 'normal'`).
154
+ *
155
+ * `kind === 'local'` — the frame lives only on the companion that opened
156
+ * it; its lifecycle is independent of any frame on the Vitre.
157
+ *
158
+ * `kind === 'normal'` — the frame on the companion is paired with a
159
+ * frame on the Vitre via the same `frameConnectorId`. Per-frame messages
160
+ * and yjs CRDT updates flow between them transparently.
161
+ */
162
+ export type CompanionFrameTarget = {
163
+ kind: 'local' | 'normal';
164
+ frameConnectorId: string;
165
+ options: Omit<OpenFrameOptions, 'frameConnectorId'>;
166
+ };
167
+ export type EntryType = 'button' | 'toggle' | 'companionOpenLink';
168
+ export type OverlayIcon = {
169
+ iconUrl?: string;
170
+ iconUrlChecked?: string;
171
+ iconUrlUnchecked?: string;
172
+ };
173
+ export type MenuEntry = {
174
+ label: string;
175
+ id: string;
176
+ tag?: any;
177
+ order?: number;
178
+ hasConfirm?: boolean;
179
+ isChecked?: boolean;
180
+ isDisabled?: boolean;
181
+ category?: MenuCategory;
182
+ maskIconUrl?: string;
183
+ iconUrl?: string;
184
+ maskIconUrlChecked?: string;
185
+ iconUrlChecked?: string;
186
+ overlayIcons?: OverlayIcon[];
187
+ menu?: MenuEntry[];
188
+ description?: string;
189
+ isCloseOnClick?: boolean;
190
+ type?: EntryType;
191
+ focus?: boolean;
192
+ field?: Field;
193
+ linkUrl?: string;
194
+ radioGroup?: string;
195
+ availability?: Availability;
196
+ /**
197
+ * If set, the host opens a companion frame when this entry is clicked
198
+ * on the companion. The connector does not have to react to the
199
+ * `menuClicked` event for this case — the frame opens automatically.
200
+ *
201
+ * Only honored when `availability.companion === true`.
202
+ */
203
+ opensCompanionFrame?: CompanionFrameTarget;
204
+ };
205
+ export type Size = {
206
+ width: number;
207
+ height: number;
208
+ };
209
+ export type Rect = {
210
+ x: number;
211
+ y: number;
212
+ width: number;
213
+ height: number;
214
+ };
215
+ export type Display = {
216
+ bounds: Rect;
217
+ };
218
+ export type MonitorReference = {
219
+ type: 'contentMonitor';
220
+ } | {
221
+ type: 'monitorIndex';
222
+ index: number;
223
+ };
224
+ export type LayoutPosition = {
225
+ /**
226
+ * @deprecated Use left
227
+ */
228
+ x?: string;
229
+ /**
230
+ * @deprecated Use top
231
+ */
232
+ y?: string;
233
+ width?: string;
234
+ height?: string;
235
+ left?: string;
236
+ top?: string;
237
+ right?: string;
238
+ bottom?: string;
239
+ centerX?: string;
240
+ centerY?: string;
241
+ monitor?: MonitorReference;
242
+ isFullscreen?: boolean;
243
+ };
244
+ export type DeviceRule = {
245
+ deviceType?: DeviceType;
246
+ };
247
+ export type LayoutPositionRule = {
248
+ type: 'deviceRule';
249
+ } & DeviceRule;
250
+ export type LayoutPositionWithRules = {
251
+ width?: string;
252
+ height?: string;
253
+ left?: string;
254
+ top?: string;
255
+ right?: string;
256
+ bottom?: string;
257
+ centerX?: string;
258
+ centerY?: string;
259
+ monitor?: MonitorReference;
260
+ isFullscreen?: boolean;
261
+ rules?: LayoutPositionRule[];
262
+ };
263
+ export type ViewMode = 'frame' | 'overlay';
264
+ export type FramePrivacy = 'shared' | 'pinned' | 'local';
265
+ /**
266
+ * Audience filter for the companion-frame open-on-companion behaviour. See
267
+ * `CompanionFrameOption`. `'all'` means every connected companion is
268
+ * targeted; `'administrator'` means only companions whose authenticated
269
+ * user has the `administrator` role.
270
+ */
271
+ export type CompanionFrameAudience = 'all' | 'administrator';
272
+ /**
273
+ * Declares how an opened frame should surface on connected companions. Lives
274
+ * on `OpenFrameOptions` so the behaviour is decided per `connector.openFrame`
275
+ * call. Companion side honours this at `FrameOpenedByVitre` reception time
276
+ * (see `CompanionApps.State.fs`):
277
+ *
278
+ * - `autoOpen`: when set and the audience matches, the companion
279
+ * auto-navigates to the new frame full-page IF it is
280
+ * currently on the main Vitre page. If it is busy
281
+ * (already on a frame, camera-share, etc.) the
282
+ * auto-open is suppressed and a menu entry is added
283
+ * to the CURRENT page's options instead. Auto-open
284
+ * never preempts a busy companion.
285
+ *
286
+ * - `menuVisibility`: when set, a menu entry is added on the companion
287
+ * side (in the current frame's options menu) for the
288
+ * target audience, regardless of `autoOpen`. The
289
+ * entry, when clicked, navigates to the frame.
290
+ *
291
+ * - `url`: REQUIRED. The URL the companion loads in its own
292
+ * paired iframe. This is intentionally separate from
293
+ * the Vitre frame's `OpenFrameOptions.url` so the
294
+ * companion can present a different UI (and load its
295
+ * own companion-frame entry point, e.g.
296
+ * `companionFrame.html` initialised with
297
+ * `initializeCompanionFrame`). The companion frame is
298
+ * paired with the Vitre frame by the same
299
+ * `frameConnectorId`, so per-frame messages and yjs
300
+ * CRDT updates still flow between them.
301
+ *
302
+ * - `showBackButton`: controls the host's own "back" affordance on the
303
+ * companion's full-page frame. The companion renders
304
+ * the frame chrome-free (no la Vitre header) except a
305
+ * single back button — the same control as the
306
+ * camera-share page — that dismisses the frame. Set
307
+ * `false` to hide it (e.g. when the app draws its own
308
+ * close UI); the user can still leave via the device /
309
+ * browser back gesture. Defaults to `true` (shown).
310
+ *
311
+ * `url` is mandatory; `autoOpen` / `menuVisibility` / `showBackButton` are
312
+ * independent and may be set together. If `autoOpen` and `menuVisibility`
313
+ * are both absent the companion mounts nothing — no navigation, no menu —
314
+ * and only the Vitre-side frame is shown.
315
+ */
316
+ /**
317
+ * Subset of `MenuEntry` used to customise the companion menu entry that
318
+ * (re)opens this companion frame — the entry surfaced when an `autoOpen` is
319
+ * suppressed because the companion was busy, or added via `menuVisibility`.
320
+ * Only the fields relevant to a host-driven open are exposed; the entry's
321
+ * `id` and click behaviour are owned by the host. Any field left unset falls
322
+ * back to the frame's `name` (label), no icon, and default ordering.
323
+ */
324
+ export type CompanionFrameOpenMenuEntry = Pick<MenuEntry, 'label' | 'maskIconUrl' | 'iconUrl' | 'category' | 'description' | 'order'>;
325
+ export type CompanionFrameOption = {
326
+ url: string;
327
+ autoOpen?: CompanionFrameAudience;
328
+ menuVisibility?: CompanionFrameAudience;
329
+ /**
330
+ * @deprecated Renamed to `showCloseButton`. Still honoured for backward
331
+ * compatibility, but `showCloseButton` takes precedence when both are set.
332
+ */
333
+ showBackButton?: boolean;
334
+ /**
335
+ * Whether the full-page companion frame shows the host's close button (the
336
+ * control that dismisses the frame). Defaults to `true` when unset. Renamed
337
+ * from the deprecated `showBackButton`.
338
+ */
339
+ showCloseButton?: boolean;
340
+ /**
341
+ * Customises the companion menu entry that (re)opens this frame — the
342
+ * busy-`autoOpen` fallback entry or the `menuVisibility` entry. Omit to
343
+ * label the entry with the frame's `name` (no icon / category).
344
+ */
345
+ openMenuEntry?: CompanionFrameOpenMenuEntry;
346
+ };
347
+ export type PositionType = 'Local' | 'Synced';
348
+ export type Interaction = 'notAllowed' | 'autoActiveOnFullscreen' | 'allowed';
349
+ export type BorderMode = 'borderLess' | 'border';
350
+ export type BorderOptions = {
351
+ mode: BorderMode;
352
+ showToggleInMenu?: boolean;
353
+ };
354
+ export type StreamCapture = {
355
+ data: ArrayBufferLike;
356
+ };
357
+ export type VoiceAction = {
358
+ id: string;
359
+ message: I18nMap;
360
+ };
361
+ export type VoiceActionDetection = {
362
+ id: string;
363
+ message: string;
364
+ language: string;
365
+ confidence: number;
366
+ };
367
+ export type OpenFrameOptions = {
368
+ frameConnectorId: string;
369
+ streamId?: string;
370
+ name: string;
371
+ url: string;
372
+ size?: Size;
373
+ minSize?: Size;
374
+ maxSize?: Size;
375
+ startPosition?: LayoutPosition;
376
+ startPositions?: LayoutPositionWithRules[];
377
+ /**
378
+ * @deprecated Use startPosition.isFullscreen
379
+ */
380
+ startMode?: FrameStartMode;
381
+ /**
382
+ * @deprecated Use interaction property
383
+ */
384
+ touchMode?: FrameTouchMode;
385
+ interaction?: Interaction;
386
+ allowFullscreen?: boolean;
387
+ menuVisibility?: MenuVisibility;
388
+ /**
389
+ * @deprecated Use menuVisibility property vitre v20
390
+ */
391
+ hideMenu?: boolean;
392
+ startInteractive?: boolean;
393
+ resizeMode?: ResizeMode;
394
+ border?: BorderOptions;
395
+ data?: any;
396
+ file?: FileData;
397
+ mode?: ViewMode;
398
+ privacy?: FramePrivacy;
399
+ positionType?: PositionType;
400
+ voiceActions?: VoiceAction[];
401
+ state?: Record<string, any>;
402
+ visibility?: Visibility;
403
+ closable?: boolean;
404
+ closeLabel?: string;
405
+ /**
406
+ * Optional declaration of how this frame should surface on connected
407
+ * companions. See `CompanionFrameOption`. When omitted the companion
408
+ * side ignores the open (no auto-navigation, no menu) — the same
409
+ * behaviour pre-1.13.
410
+ */
411
+ companionFrame?: CompanionFrameOption;
412
+ /**
413
+ * Optional id of the device (see `HostInformation.devicesInSpace[].id`)
414
+ * that should *own* the shared frame. The owner drives the languette
415
+ * colour and, when it is a Vitre, takes over hosting the frame so it
416
+ * survives the opener disconnecting (ownership transfer). When omitted
417
+ * the opener owns the frame, as before. Change it afterwards with
418
+ * `connector.setFrameOwner(frameConnectorId, owner)`.
419
+ */
420
+ owner?: string;
421
+ /**
422
+ * SDK 1.32 — when `true`, the `file` is delivered ONLY to the opening
423
+ * Vitre. The frame still opens and syncs on other peers, but the file
424
+ * bytes are not propagated and the remote frames open without it. The
425
+ * `data` field keeps syncing normally. The host strips the file before
426
+ * cross-vitre sync — this is purely sender-side, so no peer-version gate
427
+ * is needed (older receivers simply get a frame with no file, a state
428
+ * they already handle). Has no effect when no `file` is provided.
429
+ */
430
+ localFile?: boolean;
431
+ /**
432
+ * Icon shown for this frame's shared content on connected companions. A
433
+ * bitmap (full colour). May be a path relative to the connector URL — the
434
+ * host resolves it to an absolute URL. When both `iconUrl` and `maskIconUrl`
435
+ * are set the companion prefers `maskIconUrl`. When neither is set the
436
+ * companion falls back to the app icon (`ConnectorOptions.iconUrl`).
437
+ */
438
+ iconUrl?: string;
439
+ /**
440
+ * Monochrome mask icon for this frame's shared content, tinted by the
441
+ * companion theme (CSS `mask`). May be relative to the connector URL —
442
+ * resolved absolute by the host. Preferred over `iconUrl` when both are set.
443
+ */
444
+ maskIconUrl?: string;
445
+ /**
446
+ * CSS background applied to this frame's shared-content surface on the
447
+ * Vitre (and on peer Vitres / tableaux showing it). Any CSS `background`
448
+ * value — a colour, gradient, or `url(...)`. When set it overrides the
449
+ * default surface background (`.lavitre-shared-object-content`, normally
450
+ * black). Not resolved against the connector URL: pass an absolute URL if
451
+ * you reference an image. When omitted the default background is kept.
452
+ */
453
+ background?: string;
454
+ /**
455
+ * CSS `box-shadow` applied to this frame's shared-content surface on the
456
+ * Vitre (and on peer Vitres / tableaux showing it). When set it overrides
457
+ * the default surface shadow (`.lavitre-shared-object-content`). Pass
458
+ * `'none'` to remove the shadow. When omitted the default shadow is kept.
459
+ */
460
+ boxShadow?: string;
461
+ /**
462
+ * CSS `drop-shadow` filter applied to this frame's shared-content surface on
463
+ * the Vitre (and on peer Vitres / tableaux showing it). The value is the
464
+ * argument of the CSS `drop-shadow()` filter function — e.g.
465
+ * `'0 4px 8px rgba(0,0,0,.5)'` — which the host wraps as
466
+ * `filter: drop-shadow(<value>)`. Unlike `boxShadow` it follows the rendered
467
+ * alpha shape, so it casts a shadow around non-rectangular / transparent
468
+ * content (pair it with a transparent `background`). Pass `'none'` to remove
469
+ * any filter. When omitted no drop-shadow filter is applied.
470
+ */
471
+ dropShadow?: string;
472
+ /**
473
+ * CSS `backdrop-filter: blur(...)` applied to this frame's shared-content
474
+ * surface on the Vitre (and on peer Vitres / tableaux showing it). The value
475
+ * is the argument of the CSS `blur()` function — e.g. `'8px'` — which the
476
+ * host wraps as `backdrop-filter: blur(<value>)`. It blurs whatever is
477
+ * *behind* the surface (frosted-glass effect), so pair it with a translucent
478
+ * `background`. Pass `'none'` to remove the backdrop filter. When omitted no
479
+ * backdrop blur is applied.
480
+ */
481
+ backdropBlur?: string;
482
+ /**
483
+ * Name to report for this frame in usage analytics ("insights"), instead of
484
+ * the app's own name. A single app can open several kinds of frames — e.g.
485
+ * Carbone opens "Page blanche", "PDF", "Image" — and by default every frame
486
+ * is recorded under the app name ("Carbone"). Set `insightsName` per open to
487
+ * distinguish them in the stats. When omitted the analytics fall back to the
488
+ * current behaviour (the app name, then the frame `name`). Purely a reporting
489
+ * label — it does not affect the frame UI (`name` still drives the visible
490
+ * label) and never reaches other peers.
491
+ */
492
+ insightsName?: string;
493
+ };
494
+ /**
495
+ * Visual style of a frame's shared-content surface and its companion icon,
496
+ * settable at open time (subset of `OpenFrameOptions`) and updatable at any
497
+ * time with `connector.setChromeStyle(frameConnectorId, style)`. Every field
498
+ * is optional: a field left `undefined` keeps the current value; pass an empty
499
+ * string to clear an override back to the host default (e.g. `background: ''`).
500
+ */
501
+ export type ChromeStyle = {
502
+ /** See `OpenFrameOptions.background`. */
503
+ background?: string;
504
+ /** See `OpenFrameOptions.boxShadow`. */
505
+ boxShadow?: string;
506
+ /** See `OpenFrameOptions.dropShadow`. */
507
+ dropShadow?: string;
508
+ /** See `OpenFrameOptions.backdropBlur`. */
509
+ backdropBlur?: string;
510
+ /** See `OpenFrameOptions.iconUrl` (companion icon, bitmap). */
511
+ iconUrl?: string;
512
+ /** See `OpenFrameOptions.maskIconUrl` (companion icon, monochrome mask). */
513
+ maskIconUrl?: string;
514
+ };
515
+ /**
516
+ * @deprecated Use interaction property
517
+ */
518
+ export declare enum FrameTouchMode {
519
+ ReadOnly = "readonly",
520
+ FullscreenOnly = "fullscreenOnly",
521
+ HostButtonInOut = "hostButtonInOut",
522
+ HostButtonMinimizeOnFullscreen = "hostButtonMinimizeOnFullscreen"
523
+ }
524
+ /**
525
+ * @deprecated Use startPosition.isFullscreen
526
+ */
527
+ export declare enum FrameStartMode {
528
+ Window = "window",
529
+ Fullscreen = "fullscreen"
530
+ }
531
+ export type ResizeMode =
532
+ /**
533
+ * @deprecated The method should not be used
534
+ */
535
+ 'scale'
536
+ /**
537
+ * @deprecated The method should not be used
538
+ */
539
+ | 'resize'
540
+ /**
541
+ * @deprecated The method should not be used
542
+ */
543
+ | 'resizeAndKeepRatio' | 'no' | 'uniformRenderTransform' | 'freeRenderTransform' | 'uniformResize' | 'freeResize';
544
+ export type VideoContentHint = 'motion' | 'detail';
545
+ export type MenuClicked = {
546
+ menuId: string;
547
+ isChecked: boolean;
548
+ tag: any | undefined;
549
+ };
550
+ export type LoadedFrame = {
551
+ src: string;
552
+ name: string;
553
+ frameConnectorId: string;
554
+ };
555
+ export type LocalConnectorMessageReceived = {
556
+ data: any;
557
+ fileData?: FileData;
558
+ from?: string;
559
+ };
560
+ export type SendToLocalFrame = {
561
+ frameConnectorId?: string;
562
+ data: any;
563
+ fileData?: FileData;
564
+ };
565
+ export type EnumerateLoadedFramesCompleted = {
566
+ requestId: string;
567
+ frames: LoadedFrame[];
568
+ };
569
+ export type EnumerateLoadedFrames = {
570
+ requestId: string;
571
+ };
572
+ export type PrivacyChanged = {
573
+ privacy: Privacy;
574
+ };
575
+ export type MessageTargetCompanion = {
576
+ type: 'companion';
577
+ companionConnectionId: string;
578
+ };
579
+ export type MessageTarget = MessageTargetCompanion;
580
+ /**
581
+ * A peer (Vitre or companion) that currently has a given frame open on
582
+ * its side. Identified by the host's connection id so apps can address
583
+ * it individually with the per-peer messaging APIs.
584
+ */
585
+ export type FramePeer = {
586
+ peerId: string;
587
+ deviceType: DeviceType;
588
+ name?: string;
589
+ };
590
+ /**
591
+ * Companion frame peer-presence wire events.
592
+ *
593
+ * `CompanionFramePeersUpdated` is the authoritative full snapshot — it
594
+ * carries the complete current peer set and fires on every change.
595
+ * `CompanionFramePeerJoined` / `CompanionFramePeerLeft` are convenience
596
+ * incremental events derived from the same stream. Consumers should
597
+ * subscribe to ONE model (snapshot OR incremental pair), not both, to
598
+ * avoid double-counting every transition.
599
+ */
600
+ export type CompanionFramePeerJoined = {
601
+ peer: FramePeer;
602
+ };
603
+ export type CompanionFramePeerLeft = {
604
+ peerId: string;
605
+ };
606
+ export type CompanionFramePeersUpdated = {
607
+ peers: FramePeer[];
608
+ };
609
+ export type AppMessage = {
610
+ data: any;
611
+ fileData?: FileData;
612
+ target?: MessageTarget;
613
+ };
614
+ export type CameraExposureValue = {
615
+ type: 'manual';
616
+ exposure: number;
617
+ compensation: number;
618
+ };
619
+ export type CameraExposureAuto = {
620
+ type: 'auto';
621
+ };
622
+ export type CameraSettings = {
623
+ exposure: CameraExposureAuto | CameraExposureValue;
624
+ deviceId?: string;
625
+ deviceName?: string;
626
+ };
627
+ export type StreamUsage = 'mainStream' | 'sharedStream';
628
+ export type Orientation = 'left' | 'right' | 'top' | 'bottom';
629
+ export type OrientationBy = 'system' | 'emulated';
630
+ export type ConnectedMediaDevice = {
631
+ deviceId: string;
632
+ groupId: string;
633
+ kind: MediaDeviceKind;
634
+ label: string;
635
+ inUseBy: StreamUsage[];
636
+ orientation?: Orientation;
637
+ orientationBySystem?: boolean;
638
+ };
639
+ export type AuthenticationMode = 'open' | 'userAccount';
640
+ export type SecuritySettings = {
641
+ authentication: AuthenticationMode;
642
+ };
643
+ export type GuestSpace = {
644
+ type: 'guestSpace';
645
+ space: string;
646
+ teamDomain: string;
647
+ label: string;
648
+ };
649
+ export type TeamSpace = {
650
+ type: 'teamSpace';
651
+ space: string;
652
+ };
653
+ export type Space = GuestSpace | TeamSpace;
654
+ /**
655
+ * Snapshot of the current active preset's noise filter selection.
656
+ *
657
+ * `active` and entries in `available` are the string ids of the F#
658
+ * `Settings.Audio.AudioFilterLevel` enum. The current set is:
659
+ *
660
+ * "none" | "rnnoise" | "rnnoise2" | "speex" | "noisegate" | "deepfilternet3"
661
+ *
662
+ * Apps should treat the list as open — newer la Vitre builds may surface
663
+ * additional filter ids the app doesn't know about. Render unknown ids
664
+ * gracefully (e.g. as a generic option) rather than asserting on the set.
665
+ */
666
+ export type AudioFilterView = {
667
+ active: string;
668
+ available: string[];
669
+ };
670
+ /**
671
+ * User-editable subset of the voice-profile chain (the "custom" profile).
672
+ * Only meaningful when the active profile is "custom"; for the four frozen
673
+ * profiles an app shows their fixed values read-only from its own table.
674
+ */
675
+ export type CustomVoiceProfileView = {
676
+ /** EQ presence (clarity) gain, dB. */
677
+ presenceDb: number;
678
+ /** Compressor threshold, dB. */
679
+ compThresholdDb: number;
680
+ /** Compressor ratio, >= 1. */
681
+ compRatio: number;
682
+ /** De-esser sibilance cut, dB (negative). */
683
+ deEsserCutDb: number;
684
+ };
685
+ export type CustomVoiceProfileSettingsSetter = {
686
+ presenceDb?: number;
687
+ compThresholdDb?: number;
688
+ compRatio?: number;
689
+ deEsserCutDb?: number;
690
+ };
691
+ /**
692
+ * Voice profile (EQ + compressor + de-esser preset) applied for every
693
+ * filter — including `none`. Ids:
694
+ *
695
+ * "naturel" | "broadcast" | "douce" | "antifatigue" | "custom"
696
+ */
697
+ export type VoiceProfileView = {
698
+ active: string;
699
+ available: string[];
700
+ /** Persisted custom params (always present; edited only when
701
+ * `active === 'custom'`). */
702
+ custom: CustomVoiceProfileView;
703
+ };
704
+ /**
705
+ * DeepFilterNet 3 live-tunable knobs.
706
+ *
707
+ * `inputGainDb` and `wetDryMix` exist server-side but are intentionally
708
+ * NOT exposed to apps — the SDK contract only covers the noise-reduction
709
+ * tuning knobs that make sense in a "voice quality" UI.
710
+ */
711
+ export type Dfn3View = {
712
+ /** Suppression cap, 0..100 dB. Higher = more aggressive denoising. */
713
+ attenLimDb: number;
714
+ /** Post-filter strength, 0..0.1. 0 disables it. */
715
+ postFilterBeta: number;
716
+ };
717
+ export type Dfn3SettingsSetter = {
718
+ attenLimDb?: number;
719
+ postFilterBeta?: number;
720
+ };
721
+ export type AudioSettings = {
722
+ volume: number;
723
+ isMuted: boolean;
724
+ selectedPreset: string;
725
+ audioPresets: string[];
726
+ /**
727
+ * The following three are optional on the wire — older la Vitre builds
728
+ * don't emit them. When undefined, treat as "feature not available on
729
+ * this Vitre" rather than as a default value.
730
+ */
731
+ filter?: AudioFilterView;
732
+ voiceProfile?: VoiceProfileView;
733
+ dfn3?: Dfn3View;
734
+ };
735
+ export type AudioSettingsSetter = {
736
+ volume?: number;
737
+ isMuted?: boolean;
738
+ selectedPreset?: string;
739
+ /**
740
+ * Use one of `AudioFilterView.available` ids — unknown values are
741
+ * silently dropped host-side rather than crashing the audio pipeline.
742
+ */
743
+ filter?: string;
744
+ voiceProfile?: string;
745
+ /**
746
+ * Partial setter — only the fields present in the object are written.
747
+ * Existing DFN3 properties not listed here (including `inputGainDb`
748
+ * and `wetDryMix` which apps cannot manipulate) are preserved.
749
+ */
750
+ dfn3?: Dfn3SettingsSetter;
751
+ /**
752
+ * Partial setter for the "custom" voice profile knobs. Only applied
753
+ * when the active voice profile is "custom"; persisted regardless.
754
+ */
755
+ customVoiceProfile?: CustomVoiceProfileSettingsSetter;
756
+ };
757
+ export type VitreSettings = {
758
+ availableMediaDevices: ConnectedMediaDevice[];
759
+ audioSettings: AudioSettings;
760
+ cameraSettings: CameraSettings;
761
+ security: SecuritySettings;
762
+ spaces: Space[];
763
+ currentSpace: Space;
764
+ language: Language;
765
+ color: string;
766
+ name?: string;
767
+ };
768
+ export type VitreSettingsSetter = {
769
+ cameraSettings?: CameraSettings;
770
+ audioSettings?: AudioSettingsSetter;
771
+ };
772
+ export type DeviceTarget = 'all' | 'single';
773
+ export type KnockKnock = {
774
+ from: Device;
775
+ target: DeviceTarget;
776
+ };
777
+ export type AppId = string;
778
+ export type ShareFileRequest = {
779
+ fileData: FileData;
780
+ targetAppId?: AppId;
781
+ /** SDK 1.20 — explicit owner device id for the resulting share. */
782
+ owner?: string;
783
+ };
784
+ export type ShareDataRequest = {
785
+ url: string;
786
+ targetAppId?: AppId;
787
+ /** SDK 1.20 — explicit owner device id for the resulting share. */
788
+ owner?: string;
789
+ };
790
+ export type SaveSettings = {
791
+ settings: any;
792
+ };
793
+ export type SettingsUpdated = {
794
+ settings: any;
795
+ };
796
+ export type ChangeTeamSpace = {
797
+ space: string;
798
+ };
799
+ export type ChangeTeamSpaceGuest = {
800
+ space: string;
801
+ teamDomain: string;
802
+ };
803
+ export type NotificationButton = {
804
+ id: string;
805
+ tag?: any;
806
+ iconUrl: string;
807
+ dismissOnClick?: boolean;
808
+ };
809
+ export type NotificationInfo = {
810
+ id: string;
811
+ message: string;
812
+ iconUrl: string;
813
+ buttons?: NotificationButton[];
814
+ closeTimeout?: number;
815
+ };
816
+ export type HideNotification = {
817
+ id: string;
818
+ };
819
+ export type NotificationDismissed = {
820
+ id: string;
821
+ };
822
+ export type NotificationButtonClicked = {
823
+ id: string;
824
+ buttonId: string;
825
+ tag?: any;
826
+ };
827
+ export type DevicePrivacyChanged = {
828
+ device: Device;
829
+ };
830
+ export type SDKInitRequest = {
831
+ type: 'SDKInitRequest';
832
+ version: string;
833
+ };
834
+ export type ChangePrivacy = {
835
+ privacy: Privacy;
836
+ };
837
+ export type DeviceFrameReference = {
838
+ frameConnectorId: string;
839
+ deviceId: string;
840
+ };
841
+ export type PendingDevicesInfo = {
842
+ pendingDevices: Device[];
843
+ };
844
+ export type EventTelemetry = {
845
+ name: string;
846
+ properties?: Record<string, any>;
847
+ };
848
+ export type StartEventTelemetry = {
849
+ name: string;
850
+ };
851
+ export type DeviceFullscreenUpdated = {
852
+ deviceId: string;
853
+ fullscreen: DeviceFullscreen;
854
+ };
855
+ export type PositionUpdated = {
856
+ position: Rect;
857
+ isFullscreen: boolean;
858
+ zIndex: number;
859
+ };
860
+ export type Visibility = 'hidden' | 'visible' | 'visibleInFullscreenOnly';
861
+ export type MenuVisibility = 'hidden' | 'visible' | 'visibleInFullscreenOnly';
862
+ export type VisibilityChanged = {
863
+ visibility: Visibility;
864
+ };
865
+ export type SetVisibility = {
866
+ visibility: Visibility;
867
+ };
868
+ export type DeviceScalingUpdated = {
869
+ deviceId: string;
870
+ sendingScaling: DeviceScaling;
871
+ orientation: Orientation;
872
+ orientationBy: OrientationBy;
873
+ };
874
+ export type UpdateStateEntry = {
875
+ action: 'add';
876
+ key: string;
877
+ value: any;
878
+ } | {
879
+ action: 'addOwned';
880
+ key: string;
881
+ value: any;
882
+ } | {
883
+ action: 'remove';
884
+ key: string;
885
+ };
886
+ export type UpdatedStateEntry = {
887
+ action: 'add';
888
+ key: string;
889
+ value: any;
890
+ } | {
891
+ action: 'remove';
892
+ key: string;
893
+ } | {
894
+ action: 'addOwned';
895
+ key: string;
896
+ value: any;
897
+ owner: string;
898
+ };
899
+ export type UpdateState = {
900
+ updates: UpdateStateEntry[];
901
+ };
902
+ export type ReplacedBy = 'local' | 'remote';
903
+ export type StateReplaced = {
904
+ state: Record<string, any>;
905
+ delta: UpdatedStateEntry[];
906
+ replacedBy: ReplacedBy;
907
+ };
908
+ export type GetStats = {
909
+ requestId: string;
910
+ };
911
+ export type SetReducedAudioMode = {
912
+ enabled: boolean;
913
+ };
914
+ export type DeviceTransceiverWebRTCStats = {
915
+ deviceId: string;
916
+ transceiverId: string;
917
+ receiverStats?: any[];
918
+ receiverStatsError?: string;
919
+ senderStats?: any[];
920
+ senderStatsError?: string;
921
+ videoSendingParameters?: VideoSendingParameters;
922
+ /** Since 1.44: label of the outgoing track (originalTrack when the host wraps it). Absent on older hosts; explicit null on newer hosts when the transceiver has no sender track. */
923
+ trackLabel?: string;
924
+ /** Since 1.44: sender track getSettings(), unwrapped via originalTrack when present. Absent on older hosts; null on newer hosts without a sender track. */
925
+ trackSettings?: MediaTrackSettings;
926
+ /** Since 1.44: sender track getConstraints(). Absent on older hosts; null on newer hosts without a sender track. */
927
+ trackConstraints?: MediaTrackConstraints;
928
+ /** Since 1.44: sender track muted flag. Absent on older hosts; null on newer hosts without a sender track. */
929
+ trackMuted?: boolean;
930
+ /** Since 1.44: sender track enabled flag. Absent on older hosts; null on newer hosts without a sender track. */
931
+ trackEnabled?: boolean;
932
+ /** Since 1.44: host sending parameters isEnabled (false under confidentiality). Absent on older hosts; null on newer hosts without a sender track. */
933
+ sendingEnabled?: boolean;
934
+ };
935
+ export type MemoryInfo = {
936
+ slotsInUse: number;
937
+ slots: number;
938
+ mbAvailable?: number;
939
+ };
940
+ export type VideoSendingParameters = {
941
+ size?: Size;
942
+ bitrate?: number;
943
+ };
944
+ export type StatsResponse = {
945
+ requestId: string;
946
+ webrtcStats: DeviceTransceiverWebRTCStats[];
947
+ memory?: MemoryInfo;
948
+ cpuUsage?: number;
949
+ audioFilter?: string;
950
+ };
951
+ export type ConnectionCodeUpdated = {
952
+ companionCode?: string;
953
+ };
954
+ export type FieldUpdated = {
955
+ field: Field;
956
+ };
957
+ export type SendToSerialPort = {
958
+ com: number;
959
+ baudRate: number;
960
+ readTimeout: number;
961
+ ackLineStartsWith?: string;
962
+ nackLineStartsWith?: string;
963
+ lines: string[];
964
+ };
965
+ export type RequestSerialPortAccess = {
966
+ port?: string;
967
+ };
968
+ export type SerialPortAccessReason = 'denied' | 'cancelled' | 'timeout';
969
+ export type SerialPortAccessResult = {
970
+ port?: string;
971
+ reason?: SerialPortAccessReason;
972
+ };
973
+ export type StreamSizeUpdate = {
974
+ deviceId: string;
975
+ size: Size;
976
+ };
977
+ export type RequestStreamSizeUpdate = {
978
+ updates: StreamSizeUpdate[];
979
+ };
980
+ export type DisconnectGuests = {
981
+ deviceIds: string[];
982
+ };
983
+ export type Characteristic = {
984
+ uuid: string;
985
+ description: string;
986
+ properties: string;
987
+ };
988
+ export type OpenBTService = {
989
+ serviceId: string;
990
+ requestId: string;
991
+ };
992
+ export type CloseBTService = {
993
+ handleId: string;
994
+ };
995
+ export type WriteToCharacteristic = {
996
+ handleId: string;
997
+ uuid: string;
998
+ buffer: ArrayBufferLike;
999
+ };
1000
+ export type BluetoothFromApp = ({
1001
+ '@BluetoothFromApp': 'openBTService';
1002
+ } & OpenBTService) | ({
1003
+ '@BluetoothFromApp': 'closeBTService';
1004
+ } & CloseBTService) | ({
1005
+ '@BluetoothFromApp': 'writeToCharacteristic';
1006
+ } & WriteToCharacteristic);
1007
+ export type OpenBTServiceResponseData = {
1008
+ requestId: string;
1009
+ handleId: string;
1010
+ characteristics: Characteristic[];
1011
+ };
1012
+ export type OpenBTServiceResponse = {
1013
+ requestId: string;
1014
+ isSuccess: boolean;
1015
+ response?: OpenBTServiceResponseData;
1016
+ error?: string;
1017
+ };
1018
+ export type BluetoothToApp = {
1019
+ '@BluetoothToApp': 'openBTServiceResponse';
1020
+ } & OpenBTServiceResponse;