@lavitre/apps 1.58.0 → 1.60.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.
package/README.md CHANGED
@@ -126,6 +126,24 @@ settingsSchema: { type: 'object', properties: { city: { type: 'string' } } }
126
126
 
127
127
  `type: 'object'` + `properties` is only for a setting that is itself an object. The wrong shape is a type error since 1.50 (`SettingsSchemaProperties`), and plain-JS apps get it unwrapped at runtime with a `console.error` — hosts that predate the 2026-09 fix crash their settings form on it. Every `properties` value and `items` must be a schema object (never `items: 'string'`), and `required` is an array of key names on the enclosing object. Always read settings through `ensureDefaultValue(hostInformation.settings, defaults)`: the value may be `null` or partial.
128
128
 
129
+ ### Frame kinds — one start position per kind of frame (SDK 1.59)
130
+
131
+ An app that opens several kinds of frames declares them in `ConnectorOptions.frameKinds`, and each `openFrame` names its kind. The Vitre settings then list a start position for each kind next to the app's own ("Carbone – PDF"), so a PDF can open on one monitor and a board on another. A frame without a kind, or with an unknown one, opens at the app's position.
132
+
133
+ ```ts
134
+ connector = new Connector(postMessage, init, {
135
+ name: 'Carbone',
136
+ frameKinds: [
137
+ { id: 'board', name: 'Page blanche' },
138
+ { id: 'pdf', name: 'PDF' },
139
+ ],
140
+ })
141
+
142
+ connector.openFrame({ frameConnectorId, name: file.name, url: './pdf.html', frameKind: 'pdf', insightsName: 'PDF' })
143
+ ```
144
+
145
+ The `id` is stored in the Vitre settings: keep it stable and untranslated (letters, digits, `-`, `_`, `.`; others are dropped with a `console.error`). `insightsName` stays the analytics label. Frames opened with `requestOpenStreamFrame` take `frameKind` too. Hosts that predate the option ignore both fields.
146
+
129
147
  ### Local camera preview — `LocalPreview`
130
148
 
131
149
  Shows the Vitre's main camera the way the participants see it: zoom and offsets of the device in fullscreen (else of this device), rotation and mirror of the local camera. Same rendering as the host's own video element.
@@ -142,18 +160,39 @@ preview.dispose()
142
160
 
143
161
  It listens through `frame.addDeviceStateListener`, so the app's `onDeviceScalingUpdated` & co. stay its own. While the camera cannot be opened, `preview.error` (also in `addListener`'s state) says why — `NotAllowedError`, `NotFoundError`, `TimeoutError`… — and retries continue with a growing delay. `getScaledStream` redraws each frame in a worker on Chromium (insertable streams), on the main thread when the worker cannot run (CSP without `blob:` in `worker-src`), and with a canvas elsewhere. Apps drawing the preview themselves use the pure helpers from `@lavitre/apps/Common`: `resolvePreviewScaling(hostInformation)` → `computePreviewLayout(scaling)` → `previewMatrix(layout, srcW, srcH, outW, outH)`, a matrix for `ctx.setTransform` or CSS `matrix()`.
144
162
 
163
+ ### NFC tags — `watchNfcTags` (SDK 1.60)
164
+
165
+ On a native Vitre with a USB NFC reader (any PC/SC contactless reader: ACS ACR122U / ACR1252U, Identiv, HID Omnikey…), an app holding the `nfc` authorization in its manifest is told when a badge or tag is put down and lifted.
166
+
167
+ ```ts
168
+ import { watchNfcTags } from '@lavitre/apps/Native'
169
+
170
+ const stop = watchNfcTags(
171
+ (e) => {
172
+ if (e.type === 'tagPresent') console.log('badge', e.uid, 'on', e.reader) // uid: upper-case hex, e.g. "AD9B6846"
173
+ if (e.type === 'tagRemoved') console.log('lifted from', e.reader)
174
+ },
175
+ {
176
+ reader: (name) => name.includes('PICC'), // optional: by PC/SC reader name
177
+ onUnavailable: () => console.log('no NFC here'), // web/PWA, companion, no `nfc` authorization, Vitre older than 26.11
178
+ },
179
+ )
180
+ ```
181
+
182
+ It waits for `laVitreNative.nfc` (the host adds it shortly after load), reports a tag already on a reader as `tagPresent`, and drops a repeated `tagPresent` for the same tag. Events also include `readerAdded` / `readerRemoved`. Read-only: the UID and the ATR (the tag type), never a channel to send commands to the card; contact smart cards and virtual ones (Windows Hello) are not reported. `laVitreNative.nfc` (`getReaders`, `addTagHandler`, `removeTagHandler`) is there for apps that want the raw bridge. There is no NFC on web/PWA or the companion: no browser API reaches these readers.
183
+
145
184
  ### Native or web host — `isNativeHost`
146
185
 
147
186
  ```ts
148
187
  import { getHostEnvironment, isNativeHost, laVitreNative } from '@lavitre/apps/Native'
149
188
 
150
189
  if (isNativeHost()) {
151
- // desktop Vitre: laVitreNative is there; its io / serialport only with the matching authorization
190
+ // desktop Vitre: laVitreNative is there; its io / serialport / nfc only with the matching authorization
152
191
  }
153
192
  getHostEnvironment() // 'native' | 'web'
154
193
  ```
155
194
 
156
- The native Vitre injects `window.laVitreNative` into every app frame before any script runs, whatever the manifest; a Vitre in a browser or PWA and the companion leave it unset (`laVitreNative` is then `null`). Feature-detect the members you use: `io` and `serialport` depend on the app's authorizations and arrive shortly after load.
195
+ The native Vitre injects `window.laVitreNative` into every app frame before any script runs, whatever the manifest; a Vitre in a browser or PWA and the companion leave it unset (`laVitreNative` is then `null`). Feature-detect the members you use: `io`, `serialport` and `nfc` depend on the app's authorizations and arrive shortly after load.
157
196
 
158
197
  ### AppSettings API — `getSettings` / `setSettings` (three levels)
159
198
 
@@ -514,6 +514,15 @@ export type OpenFrameOptions = {
514
514
  * option ignore it (no annotation on a freeResize frame).
515
515
  */
516
516
  annotation?: 'enabled';
517
+ /**
518
+ * The kind of this frame: the `id` of one of the app's
519
+ * `ConnectorOptions.frameKinds`. The host opens the frame at the start
520
+ * position the Vitre settings give that kind, else at the app's position.
521
+ * Travels with the frame, so a peer Vitre showing it applies its own
522
+ * position for the same kind. Unlike `insightsName`, it is an identifier,
523
+ * not a label. Hosts that predate the option ignore it.
524
+ */
525
+ frameKind?: string;
517
526
  };
518
527
  /**
519
528
  * Visual style of a frame's shared-content surface and its companion icon,
@@ -1 +1 @@
1
- {"version":3,"file":"Common.Model.js","sourceRoot":"","sources":["../../Common/Common.Model.ts"],"names":[],"mappings":"AAomBA;;GAEG;AACH,MAAM,CAAN,IAAY,cAOX;AAPD,WAAY,cAAc;IACxB,wFAAwF;IACxF,uCAAqB,CAAA;IACrB,mDAAiC,CAAA;IACjC,kEAAkE;IAClE,qDAAmC,CAAA;IACnC,mFAAiE,CAAA;AACnE,CAAC,EAPW,cAAc,KAAd,cAAc,QAOzB;AAED;;GAEG;AACH,MAAM,CAAN,IAAY,cAGX;AAHD,WAAY,cAAc;IACxB,mCAAiB,CAAA;IACjB,2CAAyB,CAAA;AAC3B,CAAC,EAHW,cAAc,KAAd,cAAc,QAGzB","sourcesContent":["export type DeviceType =\n | 'vitre'\n | 'guest'\n | 'vitreMini'\n | 'vitrePrimary'\n | 'vitreSecondary'\n | 'tableau'\n | 'vitreGuest'\n | 'companion'\n\nexport type Privacy = 'none' | 'muted' | 'blurred' | 'mutedSender'\n\nexport type Language = 'fr' | 'en' | 'it'\n\n/// A signed-in companion user. `isAdministrator` is derived host-side from\n/// `roles.includes('administrator')` and surfaced as a boolean so apps can\n/// gate features without hard-coding the magic role string; `roles` is still\n/// available for fine-grained checks.\nexport type CompanionUser = {\n id: string\n firstName: string\n lastName: string\n roles: string[]\n isAdministrator: boolean\n}\n\n/// A companion's own identity and runtime context. Surfaced as\n/// `connector.companionInformation` (CompanionConnector) and\n/// `frame.companionInformation` (companion-side Frame / CompanionFrame).\n/// Strictly distinct from the Vitre identity (`hostInformation`).\n///\n/// `name` is the companion's chosen display name — a mandatory field on the\n/// connect page (account fullname, mobile device name, or manually entered,\n/// stored locally). It is also what the Vitre shows as this companion peer's\n/// name. `user` is present only when signed in (guest sessions omit it).\n/// `language` / `origin` / `version` describe the companion runtime, not the\n/// Vitre. Undefined on Vitre-side frames (a Vitre has no companion identity).\nexport type CompanionInformation = {\n /// Stable identifier for this companion as a participant (the signed-in\n /// user id, or a fallback for guest sessions). Distinct from the Vitre's\n /// `hostInformation.device.id`. Apps that render the companion as a\n /// collaboration peer (cursors, awareness) should key on this.\n id: string\n name: string\n /// The companion participant's colour (cursor / awareness). Distinct from\n /// the Vitre's `hostInformation.device.color`.\n color: string\n user?: CompanionUser\n language: Language\n origin: string\n version?: string\n}\n\n/**\n * @deprecated Use string\n */\nexport type LegacyI18nMap = {\n fr: string\n en: string\n it: string\n}\nexport type I18nMap = string | LegacyI18nMap\n\nexport type FileData = {\n id?: string\n name: string\n mime: string\n data: ArrayBufferLike\n shareTargetId?: string\n}\n\nexport type DeviceScalingVersion = 'legacy' | 'rotationIndependent'\n\nexport type Ratio = 'ratio16_9' | 'ratio9_16'\n\nexport type CropMode = 'cropped' | 'notCropped'\n\nexport type DeviceScaling = {\n scale: number\n offsetX: number\n offsetY: number\n orientation?: Orientation\n orientationBy?: OrientationBy\n ratio?: Ratio\n cropMode?: CropMode\n version?: DeviceScalingVersion\n}\n\nexport type DeviceFullscreen = 'fullscreen' | 'localDevice' | 'notFullscreen'\n\nexport type Device = {\n id: string\n name: string\n color: string\n type: DeviceType\n privacy: Privacy\n mainDeviceId?: string\n /**\n * represent the scaling applied on the local camera stream when sending to this device\n */\n sendingScaling?: DeviceScaling\n orientation?: Orientation\n orientationBy?: OrientationBy\n fullscreen?: DeviceFullscreen\n}\n\nexport type TeamInfo = {\n id: string\n name: string\n domain: string\n}\n\nexport type HostInformation = {\n language: Language\n device: Device\n version?: string\n devicesInSpace: Device[]\n spaceTeam: TeamInfo\n owner: TeamInfo\n origin: string\n team: string\n teamId: string\n space: Space\n color: string\n privacy: Privacy\n guestInviteUrl: string\n displays: Display[]\n settings?: any\n vitreSettings: VitreSettings\n companionCode?: string\n /**\n * `true` when the frame iframe is loaded by a la Vitre **companion**\n * (i.e. the host is `lavitre-companion`, not a Vitre). Apps can use\n * this to pick the right SDK surface — `initializeCompanionFrame` /\n * `CompanionFrame` on the companion side, `initializeFrame` / `Frame`\n * on the Vitre side — and to branch UI / behaviour that genuinely\n * differs between the two contexts (e.g. show a \"Leave this frame\"\n * button on the companion that calls `closeOnCompanion()`, omit it on\n * the Vitre).\n *\n * Undefined / false on the Vitre side. Set by\n * `lavitre-companion/.../CompanionApps.State.fs:buildVitreLikeHostInformation`.\n * Backward-compat: old hosts simply omit the field, so apps that read\n * it as `?? false` keep working unchanged. Added 1.15.\n */\n isCompanion?: boolean\n}\n\nexport type SendMessageTo = {\n connectorId?: string\n deviceIds?: string[]\n message: string\n fileData?: FileData\n}\n\nexport type SendMessageToAll = {\n connectorId?: string\n message: string\n fileData?: FileData\n}\n\nexport type SendKnockKnock = {\n deviceIds?: string[]\n}\n\nexport type DeviceJoined = {\n device: Device\n}\n\nexport type DeviceLeft = {\n deviceId: string\n}\n\nexport type DeviceMessageReceived = {\n from: string\n message: string\n fileData?: FileData\n fromConnectorId?: string\n}\n\nexport type MenuCategory = {\n label: string\n description?: string\n order?: number\n}\n\nexport type NumberRange = {\n id: string\n min: number\n max: number\n value: number\n step: number\n}\n\nexport type Field = { type: 'numberRange' } & NumberRange\n\nexport type Availability = {\n vitre?: boolean\n companion?: boolean\n companionAdmin?: boolean\n}\n\n/**\n * Declares that clicking a MenuEntry on the companion opens a frame on\n * the companion side (and on the Vitre too, if `kind === 'normal'`).\n *\n * `kind === 'local'` — the frame lives only on the companion that opened\n * it; its lifecycle is independent of any frame on the Vitre.\n *\n * `kind === 'normal'` — the frame on the companion is paired with a\n * frame on the Vitre via the same `frameConnectorId`. Per-frame messages\n * and yjs CRDT updates flow between them transparently.\n */\nexport type CompanionFrameTarget = {\n kind: 'local' | 'normal'\n frameConnectorId: string\n options: Omit<OpenFrameOptions, 'frameConnectorId'>\n}\n\nexport type EntryType = 'button' | 'toggle' | 'companionOpenLink'\n\nexport type OverlayIcon = {\n iconUrl?: string\n iconUrlChecked?: string\n iconUrlUnchecked?: string\n}\n\nexport type MenuEntry = {\n label: string\n id: string\n tag?: any\n order?: number\n hasConfirm?: boolean\n isChecked?: boolean\n isDisabled?: boolean\n category?: MenuCategory\n maskIconUrl?: string\n iconUrl?: string\n maskIconUrlChecked?: string\n iconUrlChecked?: string\n overlayIcons?: OverlayIcon[]\n menu?: MenuEntry[]\n description?: string\n isCloseOnClick?: boolean\n type?: EntryType\n focus?: boolean\n field?: Field\n linkUrl?: string\n radioGroup?: string\n availability?: Availability\n /**\n * If set, the host opens a companion frame when this entry is clicked\n * on the companion. The connector does not have to react to the\n * `menuClicked` event for this case — the frame opens automatically.\n *\n * Only honored when `availability.companion === true`.\n */\n opensCompanionFrame?: CompanionFrameTarget\n}\n\nexport type Size = {\n width: number\n height: number\n}\n\nexport type Rect = {\n x: number\n y: number\n width: number\n height: number\n}\n\nexport type Display = {\n bounds: Rect\n}\n\nexport type MonitorReference =\n | { type: 'contentMonitor' }\n | { type: 'monitorIndex'; index: number }\n\nexport type LayoutPosition = {\n /**\n * @deprecated Use left\n */\n x?: string\n /**\n * @deprecated Use top\n */\n y?: string\n width?: string\n height?: string\n left?: string\n top?: string\n right?: string\n bottom?: string\n centerX?: string\n centerY?: string\n monitor?: MonitorReference\n isFullscreen?: boolean\n}\n\nexport type DeviceRule = { deviceType?: DeviceType }\n\nexport type LayoutPositionRule = { type: 'deviceRule' } & DeviceRule\n\nexport type LayoutPositionWithRules = {\n width?: string\n height?: string\n left?: string\n top?: string\n right?: string\n bottom?: string\n centerX?: string\n centerY?: string\n monitor?: MonitorReference\n isFullscreen?: boolean\n rules?: LayoutPositionRule[]\n}\n\nexport type ViewMode = 'frame' | 'overlay'\n\nexport type FramePrivacy = 'shared' | 'pinned' | 'local'\n\n/**\n * Audience filter for the companion-frame open-on-companion behaviour. See\n * `CompanionFrameOption`. `'all'` means every connected companion is\n * targeted; `'administrator'` means only companions whose authenticated\n * user has the `administrator` role.\n */\nexport type CompanionFrameAudience = 'all' | 'administrator'\n\n/**\n * Declares how an opened frame should surface on connected companions. Lives\n * on `OpenFrameOptions` so the behaviour is decided per `connector.openFrame`\n * call. Companion side honours this at `FrameOpenedByVitre` reception time\n * (see `CompanionApps.State.fs`):\n *\n * - `autoOpen`: when set and the audience matches, the companion\n * auto-navigates to the new frame full-page IF it is\n * currently on the main Vitre page. If it is busy\n * (already on a frame, camera-share, etc.) the\n * auto-open is suppressed and a menu entry is added\n * to the CURRENT page's options instead. Auto-open\n * never preempts a busy companion.\n *\n * - `menuVisibility`: when set, a menu entry is added on the companion\n * side (in the current frame's options menu) for the\n * target audience, regardless of `autoOpen`. The\n * entry, when clicked, navigates to the frame.\n *\n * - `url`: REQUIRED. The URL the companion loads in its own\n * paired iframe. This is intentionally separate from\n * the Vitre frame's `OpenFrameOptions.url` so the\n * companion can present a different UI (and load its\n * own companion-frame entry point, e.g.\n * `companionFrame.html` initialised with\n * `initializeCompanionFrame`). The companion frame is\n * paired with the Vitre frame by the same\n * `frameConnectorId`, so per-frame messages and yjs\n * CRDT updates still flow between them.\n *\n * - `showBackButton`: controls the host's own \"back\" affordance on the\n * companion's full-page frame. The companion renders\n * the frame chrome-free (no la Vitre header) except a\n * single back button — the same control as the\n * camera-share page — that dismisses the frame. Set\n * `false` to hide it (e.g. when the app draws its own\n * close UI); the user can still leave via the device /\n * browser back gesture. Defaults to `true` (shown).\n *\n * - `edgeToEdge`: lets the frame cover the companion's whole surface,\n * system bars included; the app then keeps its controls\n * clear of them with `frame.safeAreaInsets`. See the\n * field doc.\n *\n * `url` is mandatory; `autoOpen` / `menuVisibility` / `showBackButton` /\n * `edgeToEdge` are independent and may be set together. If `autoOpen` and `menuVisibility`\n * are both absent the companion mounts nothing — no navigation, no menu —\n * and only the Vitre-side frame is shown.\n */\n/**\n * Subset of `MenuEntry` used to customise the companion menu entry that\n * (re)opens this companion frame — the entry surfaced when an `autoOpen` is\n * suppressed because the companion was busy, or added via `menuVisibility`.\n * Only the fields relevant to a host-driven open are exposed; the entry's\n * `id` and click behaviour are owned by the host. Any field left unset falls\n * back to the frame's `name` (label), no icon, and default ordering.\n */\nexport type CompanionFrameOpenMenuEntry = Pick<\n MenuEntry,\n 'label' | 'maskIconUrl' | 'iconUrl' | 'category' | 'description' | 'order'\n>\n\nexport type CompanionFrameOption = {\n url: string\n autoOpen?: CompanionFrameAudience\n menuVisibility?: CompanionFrameAudience\n /**\n * @deprecated Renamed to `showCloseButton`. Still honoured for backward\n * compatibility, but `showCloseButton` takes precedence when both are set.\n */\n showBackButton?: boolean\n /**\n * Whether the full-page companion frame shows the host's close button (the\n * control that dismisses the frame). Defaults to `true` when unset. Renamed\n * from the deprecated `showBackButton`.\n */\n showCloseButton?: boolean\n /**\n * Customises the companion menu entry that (re)opens this frame — the\n * busy-`autoOpen` fallback entry or the `menuVisibility` entry. Omit to\n * label the entry with the frame's `name` (no icon / category).\n */\n openMenuEntry?: CompanionFrameOpenMenuEntry\n /**\n * Whether the full-page companion frame covers the companion's whole\n * surface, system bars included (Android edge-to-edge: the navigation bar\n * is drawn translucent over the content). Set `true` only when the app\n * shifts its own controls with `frame.safeAreaInsets` — or with the\n * `--lavitre-safe-area-inset-*` CSS variables the SDK sets from it. When\n * unset or `false` the host keeps the iframe clear of the bars itself, so\n * a frame that knows nothing about insets is never covered. Added 1.51.\n */\n edgeToEdge?: boolean\n}\n\nexport type PositionType = 'Local' | 'Synced'\n\nexport type Interaction = 'notAllowed' | 'autoActiveOnFullscreen' | 'allowed'\n\nexport type BorderMode = 'borderLess' | 'border'\n\nexport type BorderOptions = {\n mode: BorderMode\n showToggleInMenu?: boolean\n}\n\nexport type StreamCapture = {\n data: ArrayBufferLike\n}\n\nexport type VoiceAction = {\n id: string\n message: I18nMap\n}\n\nexport type VoiceActionDetection = {\n id: string\n message: string\n language: string\n confidence: number\n}\n\nexport type OpenFrameOptions = {\n frameConnectorId: string\n streamId?: string\n name: string\n url: string\n size?: Size\n minSize?: Size\n maxSize?: Size\n startPosition?: LayoutPosition\n startPositions?: LayoutPositionWithRules[]\n /**\n * @deprecated Use startPosition.isFullscreen\n */\n startMode?: FrameStartMode\n /**\n * @deprecated Use interaction property\n */\n touchMode?: FrameTouchMode\n interaction?: Interaction\n allowFullscreen?: boolean\n menuVisibility?: MenuVisibility\n /**\n * @deprecated Use menuVisibility property vitre v20\n */\n hideMenu?: boolean\n startInteractive?: boolean\n resizeMode?: ResizeMode\n border?: BorderOptions\n data?: any\n file?: FileData\n mode?: ViewMode\n privacy?: FramePrivacy\n positionType?: PositionType\n voiceActions?: VoiceAction[]\n state?: Record<string, any>\n visibility?: Visibility\n closable?: boolean\n closeLabel?: string\n /**\n * Optional declaration of how this frame should surface on connected\n * companions. See `CompanionFrameOption`. When omitted the companion\n * side ignores the open (no auto-navigation, no menu) — the same\n * behaviour pre-1.13.\n */\n companionFrame?: CompanionFrameOption\n /**\n * Optional id of the device (see `HostInformation.devicesInSpace[].id`)\n * that should *own* the shared frame. The owner drives the languette\n * colour and, when it is a Vitre, takes over hosting the frame so it\n * survives the opener disconnecting (ownership transfer). When omitted\n * the opener owns the frame, as before. Change it afterwards with\n * `connector.setFrameOwner(frameConnectorId, owner)`.\n */\n owner?: string\n /**\n * SDK 1.32 — when `true`, the `file` is delivered ONLY to the opening\n * Vitre. The frame still opens and syncs on other peers, but the file\n * bytes are not propagated and the remote frames open without it. The\n * `data` field keeps syncing normally. The host strips the file before\n * cross-vitre sync — this is purely sender-side, so no peer-version gate\n * is needed (older receivers simply get a frame with no file, a state\n * they already handle). Has no effect when no `file` is provided.\n */\n localFile?: boolean\n /**\n * Icon shown for this frame's shared content on connected companions. A\n * bitmap (full colour). May be a path relative to the connector URL — the\n * host resolves it to an absolute URL. When both `iconUrl` and `maskIconUrl`\n * are set the companion prefers `maskIconUrl`. When neither is set the\n * companion falls back to the app icon (`ConnectorOptions.iconUrl`).\n */\n iconUrl?: string\n /**\n * Monochrome mask icon for this frame's shared content, tinted by the\n * companion theme (CSS `mask`). May be relative to the connector URL —\n * resolved absolute by the host. Preferred over `iconUrl` when both are set.\n */\n maskIconUrl?: string\n /**\n * CSS background applied to this frame's shared-content surface on the\n * Vitre (and on peer Vitres / tableaux showing it). Any CSS `background`\n * value — a colour, gradient, or `url(...)`. When set it overrides the\n * default surface background (`.lavitre-shared-object-content`, normally\n * black). Not resolved against the connector URL: pass an absolute URL if\n * you reference an image. When omitted the default background is kept.\n */\n background?: string\n /**\n * CSS `box-shadow` applied to this frame's shared-content surface on the\n * Vitre (and on peer Vitres / tableaux showing it). When set it overrides\n * the default surface shadow (`.lavitre-shared-object-content`). Pass\n * `'none'` to remove the shadow. When omitted the default shadow is kept.\n */\n boxShadow?: string\n /**\n * CSS `drop-shadow` filter applied to this frame's shared-content surface on\n * the Vitre (and on peer Vitres / tableaux showing it). The value is the\n * argument of the CSS `drop-shadow()` filter function — e.g.\n * `'0 4px 8px rgba(0,0,0,.5)'` — which the host wraps as\n * `filter: drop-shadow(<value>)`. Unlike `boxShadow` it follows the rendered\n * alpha shape, so it casts a shadow around non-rectangular / transparent\n * content (pair it with a transparent `background`). Pass `'none'` to remove\n * any filter. When omitted no drop-shadow filter is applied.\n */\n dropShadow?: string\n /**\n * CSS `backdrop-filter: blur(...)` applied to this frame's shared-content\n * surface on the Vitre (and on peer Vitres / tableaux showing it). The value\n * is the argument of the CSS `blur()` function — e.g. `'8px'` — which the\n * host wraps as `backdrop-filter: blur(<value>)`. It blurs whatever is\n * *behind* the surface (frosted-glass effect), so pair it with a translucent\n * `background`. Pass `'none'` to remove the backdrop filter. When omitted no\n * backdrop blur is applied.\n */\n backdropBlur?: string\n /**\n * Name to report for this frame in usage analytics (\"insights\"), instead of\n * the app's own name. A single app can open several kinds of frames — e.g.\n * Carbone opens \"Page blanche\", \"PDF\", \"Image\" — and by default every frame\n * is recorded under the app name (\"Carbone\"). Set `insightsName` per open to\n * distinguish them in the stats. When omitted the analytics fall back to the\n * current behaviour (the app name, then the frame `name`). Purely a reporting\n * label — it does not affect the frame UI (`name` still drives the visible\n * label) and never reaches other peers.\n */\n insightsName?: string\n /**\n * `'enabled'` lets people annotate this frame whatever its `resizeMode`. By\n * default the host only offers annotation on frames that keep their aspect\n * ratio (`uniformResize`, …): strokes are stored relative to the frame, so\n * they stretch when a `freeResize` frame changes shape. Opt in when that is\n * acceptable — e.g. a website frame people point at. Hosts that predate the\n * option ignore it (no annotation on a freeResize frame).\n */\n annotation?: 'enabled'\n}\n\n/**\n * Visual style of a frame's shared-content surface and its companion icon,\n * settable at open time (subset of `OpenFrameOptions`) and updatable at any\n * time with `connector.setChromeStyle(frameConnectorId, style)`. Every field\n * is optional: a field left `undefined` keeps the current value; pass an empty\n * string to clear an override back to the host default (e.g. `background: ''`).\n */\nexport type ChromeStyle = {\n /** See `OpenFrameOptions.background`. */\n background?: string\n /** See `OpenFrameOptions.boxShadow`. */\n boxShadow?: string\n /** See `OpenFrameOptions.dropShadow`. */\n dropShadow?: string\n /** See `OpenFrameOptions.backdropBlur`. */\n backdropBlur?: string\n /** See `OpenFrameOptions.iconUrl` (companion icon, bitmap). */\n iconUrl?: string\n /** See `OpenFrameOptions.maskIconUrl` (companion icon, monochrome mask). */\n maskIconUrl?: string\n}\n\n/**\n * @deprecated Use interaction property\n */\nexport enum FrameTouchMode {\n // Host will only allow manipulations. Touch events will not be forwarded to the webview\n ReadOnly = 'readonly',\n FullscreenOnly = 'fullscreenOnly',\n // Host will show a toggle button for interacting with the webview\n HostButtonInOut = 'hostButtonInOut',\n HostButtonMinimizeOnFullscreen = 'hostButtonMinimizeOnFullscreen',\n}\n\n/**\n * @deprecated Use startPosition.isFullscreen\n */\nexport enum FrameStartMode {\n Window = 'window',\n Fullscreen = 'fullscreen',\n}\n\nexport type ResizeMode =\n /**\n * @deprecated The method should not be used\n */\n | 'scale'\n /**\n * @deprecated The method should not be used\n */\n | 'resize'\n /**\n * @deprecated The method should not be used\n */\n | 'resizeAndKeepRatio'\n | 'no'\n | 'uniformRenderTransform'\n | 'freeRenderTransform'\n | 'uniformResize'\n | 'freeResize'\n\nexport type VideoContentHint = 'motion' | 'detail'\n\nexport type MenuClicked = {\n menuId: string\n isChecked: boolean\n tag: any | undefined\n}\n\nexport type LoadedFrame = {\n src: string\n name: string\n frameConnectorId: string\n}\n\nexport type LocalConnectorMessageReceived = {\n data: any\n fileData?: FileData\n from?: string\n}\n\nexport type SendToLocalFrame = {\n frameConnectorId?: string\n data: any\n fileData?: FileData\n}\n\nexport type EnumerateLoadedFramesCompleted = {\n requestId: string\n frames: LoadedFrame[]\n}\n\nexport type EnumerateLoadedFrames = {\n requestId: string\n}\n\nexport type PrivacyChanged = {\n privacy: Privacy\n}\n\nexport type MessageTargetCompanion = {\n type: 'companion'\n companionConnectionId: string\n}\n\nexport type MessageTarget = MessageTargetCompanion\n\n/**\n * A peer (Vitre or companion) that currently has a given frame open on\n * its side. Identified by the host's connection id so apps can address\n * it individually with the per-peer messaging APIs.\n */\nexport type FramePeer = {\n peerId: string\n deviceType: DeviceType\n name?: string\n}\n\n/**\n * Companion frame peer-presence wire events.\n *\n * `CompanionFramePeersUpdated` is the authoritative full snapshot — it\n * carries the complete current peer set and fires on every change.\n * `CompanionFramePeerJoined` / `CompanionFramePeerLeft` are convenience\n * incremental events derived from the same stream. Consumers should\n * subscribe to ONE model (snapshot OR incremental pair), not both, to\n * avoid double-counting every transition.\n */\nexport type CompanionFramePeerJoined = {\n peer: FramePeer\n}\n\nexport type CompanionFramePeerLeft = {\n peerId: string\n}\n\nexport type CompanionFramePeersUpdated = {\n peers: FramePeer[]\n}\n\nexport type AppMessage = {\n data: any\n fileData?: FileData\n target?: MessageTarget\n}\n\nexport type CameraExposureValue = {\n type: 'manual'\n exposure: number\n compensation: number\n}\n\nexport type CameraExposureAuto = {\n type: 'auto'\n}\n\nexport type CameraSettings = {\n exposure: CameraExposureAuto | CameraExposureValue\n deviceId?: string\n deviceName?: string\n}\n\nexport type StreamUsage = 'mainStream' | 'sharedStream'\n\nexport type Orientation = 'left' | 'right' | 'top' | 'bottom'\nexport type OrientationBy = 'system' | 'emulated'\n\nexport type ConnectedMediaDevice = {\n deviceId: string\n groupId: string\n kind: MediaDeviceKind\n label: string\n inUseBy: StreamUsage[]\n orientation?: Orientation\n orientationBySystem?: boolean\n}\n\nexport type AuthenticationMode = 'open' | 'userAccount'\n\nexport type SecuritySettings = {\n authentication: AuthenticationMode\n}\n\nexport type GuestSpace = {\n type: 'guestSpace'\n space: string\n teamDomain: string\n label: string\n}\n\nexport type TeamSpace = {\n type: 'teamSpace'\n space: string\n}\n\nexport type Space = GuestSpace | TeamSpace\n\n/**\n * Snapshot of the current active preset's noise filter selection.\n *\n * `active` and entries in `available` are the string ids of the F#\n * `Settings.Audio.AudioFilterLevel` enum. The current set is:\n *\n * \"none\" | \"rnnoise\" | \"rnnoise2\" | \"speex\" | \"noisegate\" | \"deepfilternet3\"\n *\n * Apps should treat the list as open — newer la Vitre builds may surface\n * additional filter ids the app doesn't know about. Render unknown ids\n * gracefully (e.g. as a generic option) rather than asserting on the set.\n */\nexport type AudioFilterView = {\n active: string\n available: string[]\n}\n\n/**\n * User-editable subset of the voice-profile chain (the \"custom\" profile).\n * Only meaningful when the active profile is \"custom\"; for the four frozen\n * profiles an app shows their fixed values read-only from its own table.\n */\nexport type CustomVoiceProfileView = {\n /** EQ presence (clarity) gain, dB. */\n presenceDb: number\n /** Compressor threshold, dB. */\n compThresholdDb: number\n /** Compressor ratio, >= 1. */\n compRatio: number\n /** De-esser sibilance cut, dB (negative). */\n deEsserCutDb: number\n}\n\nexport type CustomVoiceProfileSettingsSetter = {\n presenceDb?: number\n compThresholdDb?: number\n compRatio?: number\n deEsserCutDb?: number\n}\n\n/**\n * Voice profile (EQ + compressor + de-esser preset) applied for every\n * filter — including `none`. Ids:\n *\n * \"naturel\" | \"broadcast\" | \"douce\" | \"antifatigue\" | \"custom\"\n */\nexport type VoiceProfileView = {\n active: string\n available: string[]\n /** Persisted custom params (always present; edited only when\n * `active === 'custom'`). */\n custom: CustomVoiceProfileView\n}\n\n/**\n * DeepFilterNet 3 live-tunable knobs.\n *\n * `inputGainDb` and `wetDryMix` exist server-side but are intentionally\n * NOT exposed to apps — the SDK contract only covers the noise-reduction\n * tuning knobs that make sense in a \"voice quality\" UI.\n */\nexport type Dfn3View = {\n /** Suppression cap, 0..100 dB. Higher = more aggressive denoising. */\n attenLimDb: number\n /** Post-filter strength, 0..0.1. 0 disables it. */\n postFilterBeta: number\n}\n\nexport type Dfn3SettingsSetter = {\n attenLimDb?: number\n postFilterBeta?: number\n}\n\nexport type AudioSettings = {\n volume: number\n isMuted: boolean\n selectedPreset: string\n audioPresets: string[]\n /**\n * The following three are optional on the wire — older la Vitre builds\n * don't emit them. When undefined, treat as \"feature not available on\n * this Vitre\" rather than as a default value.\n */\n filter?: AudioFilterView\n voiceProfile?: VoiceProfileView\n dfn3?: Dfn3View\n}\n\nexport type AudioSettingsSetter = {\n volume?: number\n isMuted?: boolean\n selectedPreset?: string\n /**\n * Use one of `AudioFilterView.available` ids — unknown values are\n * silently dropped host-side rather than crashing the audio pipeline.\n */\n filter?: string\n voiceProfile?: string\n /**\n * Partial setter — only the fields present in the object are written.\n * Existing DFN3 properties not listed here (including `inputGainDb`\n * and `wetDryMix` which apps cannot manipulate) are preserved.\n */\n dfn3?: Dfn3SettingsSetter\n /**\n * Partial setter for the \"custom\" voice profile knobs. Only applied\n * when the active voice profile is \"custom\"; persisted regardless.\n */\n customVoiceProfile?: CustomVoiceProfileSettingsSetter\n}\n\nexport type VitreSettings = {\n availableMediaDevices: ConnectedMediaDevice[]\n audioSettings: AudioSettings\n cameraSettings: CameraSettings\n security: SecuritySettings\n spaces: Space[]\n currentSpace: Space\n language: Language\n color: string\n name?: string\n}\n\nexport type VitreSettingsSetter = {\n cameraSettings?: CameraSettings\n audioSettings?: AudioSettingsSetter\n}\n\nexport type DeviceTarget = 'all' | 'single'\n\nexport type KnockKnock = {\n from: Device\n target: DeviceTarget\n}\n\nexport type AppId = string\n\nexport type ShareFileRequest = {\n fileData: FileData\n targetAppId?: AppId\n /** SDK 1.20 — explicit owner device id for the resulting share. */\n owner?: string\n}\n\nexport type ShareDataRequest = {\n url: string\n targetAppId?: AppId\n /** SDK 1.20 — explicit owner device id for the resulting share. */\n owner?: string\n}\n\nexport type SaveSettings = {\n settings: any\n}\n\nexport type SettingsUpdated = {\n settings: any\n}\n\n/**\n * SDK 1.52 — the three levels of the AppSettings API (`Connector.getSettings`\n * / `setSettings`, `Frame.getSettings` / `setSettings`):\n * - `vitre` — this vitre only.\n * - `team` — the vitre's team, shared by every vitre/app instance in it.\n * - `space` — the space the vitre is currently in.\n *\n * Distinct from the legacy per-app `settingsSchema`/`saveSettings`/\n * `onSettingsUpdated` mechanism (a single, vitre-scoped JSON blob rendered by\n * the host's settings form) — the AppSettings API is app-driven, versioned,\n * and readable/writable at any of the three levels.\n */\nexport type AppSettingsLevel = 'vitre' | 'team' | 'space'\n\n/**\n * A JSON object of app settings at one `level`, with the optimistic-\n * concurrency `version` it was read/written at. `version` is `0` when the\n * level was never written. Max 64 KB serialized. Never store secrets —\n * every vitre/app instance of the team can read it.\n */\nexport type AppSettingsValue = {\n level: AppSettingsLevel\n /**\n * Since 1.58, for `team` and `space`: the defaults of the app's own\n * `lavitre.settings.json` overlaid with what is stored (objects merged key\n * by key, arrays replaced). Same as `stored` when the app ships no file.\n */\n value: Record<string, unknown>\n /** Since 1.58: what is actually stored, without the defaults. */\n stored?: Record<string, unknown>\n version: number\n /** Since 1.58: `version` of the app's `lavitre.settings.json`, when it ships one. */\n schemaVersion?: number\n}\n\n/** App → host: read the app's settings at `level`. Answered by `AppSettingsResponse`. */\nexport type GetAppSettings = {\n requestId: string\n level: AppSettingsLevel\n}\n\n/**\n * App → host: write the app's settings at `level`. `expectedVersion` must be\n * the version last observed for that level (via `AppSettingsResponse` or\n * `AppSettingsChanged`) — `0` if never written. A stale `expectedVersion`\n * fails with `AppSettingsResponse.error === 'conflict'`.\n */\nexport type SetAppSettings = {\n requestId: string\n level: AppSettingsLevel\n value: Record<string, unknown>\n expectedVersion: number\n /**\n * Since 1.58: `version` of the app's `lavitre.settings.json`. The server\n * records it with the value, so the portal knows which form the value was\n * written for. Older hosts drop it.\n */\n schemaVersion?: number\n}\n\n/** Host → app: reply to `GetAppSettings` / `SetAppSettings`, matched by `requestId`. */\nexport type AppSettingsResponse = {\n requestId: string\n level: AppSettingsLevel\n ok: boolean\n value?: Record<string, unknown>\n version?: number\n error?: 'conflict' | 'tooLarge' | 'invalid' | 'unavailable' | 'failed'\n}\n\n/**\n * Host → app: pushed whenever the settings at `level` change — including\n * changes this app itself made with `setSettings`, and changes made by\n * another vitre/app instance sharing the same team/space.\n */\nexport type AppSettingsChanged = {\n level: AppSettingsLevel\n value: Record<string, unknown>\n version: number\n}\n\n/**\n * SDK 1.53 — scope for the public storage API (`Connector.publicStorage` /\n * `Frame.publicStorage`):\n * - `app` — this app's own space in the vitre's public storage.\n * - `shared` — a space all the team's apps share.\n *\n * Files in either scope go to the vitre's TEAM storage and are readable by\n * ANYONE without authentication at the returned `url` — never store private\n * data there. Only a Vitre-hosted app can write (a companion connector has\n * no `publicStorage`).\n */\nexport type PublicStorageScope = 'app' | 'shared'\n\n/**\n * App → host: upload (or overwrite) a file in public storage. Any\n * well-formed content type (HTML/JS run on the folder's own site,\n * `https://{token}.lavit.re`); older hosts accept media and documents only.\n * 50 MB max. Overwriting an existing\n * `path` replaces the file (readers revalidate). Answered by\n * `PublicStorageResponse`.\n *\n * `expiresIn` (SDK 1.54) is optional, in seconds — validated locally by the\n * SDK (`validateExpiresIn`) before this message is even sent. Omitted when\n * not requested; a host that predates this field ignores it. The vitre host\n * relays it to the server, which deletes the file once it elapses.\n */\nexport type PutPublicFile = {\n requestId: string\n scope: PublicStorageScope\n path: string\n contentType: string\n data: ArrayBuffer\n expiresIn?: number\n}\n\n/** App → host: delete a file from public storage. Answered by `PublicStorageResponse`. */\nexport type DeletePublicFile = {\n requestId: string\n scope: PublicStorageScope\n path: string\n}\n\n/**\n * App → host: list files in `scope`, optionally filtered to paths starting\n * with `prefix`. Answered by `PublicStorageResponse`.\n */\nexport type ListPublicFiles = {\n requestId: string\n scope: PublicStorageScope\n prefix?: string\n}\n\n/**\n * A file written to public storage. `url` is the stable, unauthenticated\n * link.\n *\n * `expiresAt` (SDK 1.54, ISO UTC) is present only when the file was\n * `put` with `expiresIn` — the link answers 404 and the server deletes the\n * file once this instant passes. Absent for a permanent file.\n *\n * `downloadUrl` (SDK 1.54) is `url` with `?download=1`, forcing a browser\n * download with the file's name instead of navigating to it — handy for a\n * QR code pointed at by a phone. The host may omit it (older hosts); when\n * absent the SDK fills it locally from `url` (see `withDownloadUrlFallback`),\n * so apps can always read `downloadUrl` regardless of host version.\n */\nexport type PublicFile = {\n path: string\n url: string\n size: number\n expiresAt?: string\n downloadUrl?: string\n}\n\n/** One entry returned by `listPublicFiles`. */\nexport type PublicFileEntry = PublicFile & {\n updatedAt?: string\n}\n\n/**\n * Host → app: reply to `PutPublicFile` / `DeletePublicFile` / `ListPublicFiles`,\n * matched by `requestId`. `file` answers a put, `files`/`baseUrl` answer a list.\n */\nexport type PublicStorageResponse = {\n requestId: string\n ok: boolean\n url?: string\n file?: PublicFile\n files?: PublicFileEntry[]\n baseUrl?: string\n error?:\n | 'tooLarge'\n | 'unsupportedType'\n | 'invalidPath'\n | 'storageNotConfigured'\n | 'unavailable'\n | 'failed'\n}\n\n/** Result of `publicStorage.list` — every app/vitre instance of the team sees the same files. */\nexport type PublicStorageListResult = {\n baseUrl: string\n files: PublicFileEntry[]\n}\n\n/**\n * SDK 1.56 — scope for the private storage API (`Connector.privateStorage`\n * / `Frame.privateStorage` / `CompanionConnector.privateStorage` /\n * `CompanionFrame.privateStorage`). Identical values to\n * `PublicStorageScope` — aliased rather than redefined.\n *\n * Unlike public storage, files in either scope have NO public link: they\n * are readable by any vitre or companion of the team (via `get` or a\n * temporary `getLink` signed link), never by an anonymous visitor. Only a\n * Vitre-hosted app can write (`put`/`delete`) — a companion connector/frame\n * only has `list`/`get`/`getLink`.\n */\nexport type PrivateStorageScope = PublicStorageScope\n\n/**\n * App → host: upload (or overwrite) a file in private storage. Any content\n * type is accepted — nothing here is ever served publicly as-is; 50 MB max.\n * Overwriting an existing `path` replaces the file (readers revalidate).\n * Vitre-only — the companion host answers with `error: 'unsupported'`.\n * Answered by `PrivateStorageResponse`.\n *\n * `expiresIn` is optional, in seconds — validated locally by the SDK\n * (`validatePrivateExpiresIn`) before this message is even sent. Omitted\n * when not requested, which keeps the file permanent.\n */\nexport type PutPrivateFile = {\n requestId: string\n scope: PrivateStorageScope\n path: string\n contentType: string\n data: ArrayBuffer\n expiresIn?: number\n}\n\n/**\n * App → host: delete a file from private storage. Resolves even if the\n * path didn't exist. Vitre-only — the companion host answers with\n * `error: 'unsupported'`. Answered by `PrivateStorageResponse`.\n */\nexport type DeletePrivateFile = {\n requestId: string\n scope: PrivateStorageScope\n path: string\n}\n\n/**\n * App → host: list files in `scope`, optionally filtered to paths starting\n * with `prefix`. Expired files are omitted. Answered by\n * `PrivateStorageResponse`.\n */\nexport type ListPrivateFiles = {\n requestId: string\n scope: PrivateStorageScope\n prefix?: string\n}\n\n/**\n * App → host: download the bytes of a private file. Answered by\n * `PrivateStorageResponse` (`data` + `contentType`), or\n * `error: 'notFound'` if the path doesn't exist or has expired.\n */\nexport type GetPrivateFile = {\n requestId: string\n scope: PrivateStorageScope\n path: string\n}\n\n/**\n * App → host: mint a temporary signed link to a private file — readable\n * without authentication for `expiresIn` seconds (host default 3600, max\n * 604800 — validated locally by the SDK, `validateLinkExpiresIn`), or until\n * the file itself is deleted/expires, whichever comes first. Answered by\n * `PrivateStorageResponse` (`link`), or `error: 'notFound'` if the path\n * doesn't exist or has expired.\n */\nexport type GetPrivateFileLink = {\n requestId: string\n scope: PrivateStorageScope\n path: string\n expiresIn?: number\n}\n\n/**\n * A file in private storage. Unlike `PublicFile` there is no stable `url` —\n * private files have no public link; use `getLink` for a temporary signed\n * one.\n *\n * `expiresAt` (ISO UTC) is present only when the file was `put` with\n * `expiresIn`. Absent for a permanent file.\n */\nexport type PrivateFile = {\n path: string\n size: number\n /** Set on the answer to `put`; absent from `list` results (storage listings carry no type). */\n contentType?: string\n updatedAt?: string\n expiresAt?: string\n}\n\n/**\n * A temporary signed link to a private file, from `getLink`. `url` opens\n * the file inline (when its content type is allowlisted) or downloads it;\n * `downloadUrl` is the same link forcing a download under the file's name\n * (`?download=1`), handy for a QR code. Dies at `expiresAt`, or earlier if\n * the underlying file is deleted or itself expires first.\n */\nexport type PrivateFileLink = {\n url: string\n downloadUrl: string\n expiresAt: string\n}\n\n/**\n * Host → app: reply to `PutPrivateFile` / `DeletePrivateFile` /\n * `ListPrivateFiles` / `GetPrivateFile` / `GetPrivateFileLink`, matched by\n * `requestId`. `file` answers a put, `files` answers a list, `data` +\n * `contentType` answer a get (`data` is an `ArrayBuffer`, transferred),\n * `link` answers a getLink.\n */\nexport type PrivateStorageResponse = {\n requestId: string\n ok: boolean\n file?: PrivateFile\n files?: PrivateFile[]\n data?: ArrayBuffer\n contentType?: string\n link?: PrivateFileLink\n error?: 'tooLarge' | 'invalidPath' | 'storageNotConfigured' | 'notFound' | 'unavailable' | 'failed'\n}\n\n/** Result of `privateStorage.list`. */\nexport type PrivateStorageListResult = {\n scope: PrivateStorageScope\n files: PrivateFile[]\n}\n\nexport type ChangeTeamSpace = {\n space: string\n}\n\nexport type ChangeTeamSpaceGuest = {\n space: string\n teamDomain: string\n}\n\nexport type NotificationButton = {\n id: string\n tag?: any\n iconUrl: string\n dismissOnClick?: boolean\n}\n\nexport type NotificationInfo = {\n id: string\n message: string\n iconUrl: string\n buttons?: NotificationButton[]\n closeTimeout?: number\n}\n\nexport type HideNotification = {\n id: string\n}\n\nexport type NotificationDismissed = {\n id: string\n}\n\nexport type NotificationButtonClicked = {\n id: string\n buttonId: string\n tag?: any\n}\n\nexport type DevicePrivacyChanged = { device: Device }\n\nexport type SDKInitRequest = {\n type: 'SDKInitRequest'\n version: string\n}\n\nexport type ChangePrivacy = {\n privacy: Privacy\n}\n\nexport type DeviceFrameReference = {\n frameConnectorId: string\n deviceId: string\n}\n\nexport type PendingDevicesInfo = {\n pendingDevices: Device[]\n}\n\nexport type EventTelemetry = {\n name: string\n properties?: Record<string, any>\n}\n\nexport type StartEventTelemetry = { name: string }\n\nexport type DeviceFullscreenUpdated = {\n deviceId: string\n fullscreen: DeviceFullscreen\n}\n\nexport type PositionUpdated = {\n position: Rect\n isFullscreen: boolean\n zIndex: number\n}\n\n/**\n * Distances, in CSS px of the frame's own viewport, from each edge of the\n * frame to the nearest edge of the area the host guarantees free of system\n * UI (Android navigation bar, display cutout, …). All zero unless the host\n * runs the frame edge-to-edge (`CompanionFrameOption.edgeToEdge`). Added 1.51.\n */\nexport type SafeAreaInsets = {\n top: number\n right: number\n bottom: number\n left: number\n}\n\nexport type SafeAreaInsetsUpdated = {\n safeAreaInsets: SafeAreaInsets\n}\n\nexport type Visibility = 'hidden' | 'visible' | 'visibleInFullscreenOnly'\nexport type MenuVisibility = 'hidden' | 'visible' | 'visibleInFullscreenOnly'\n\nexport type VisibilityChanged = {\n visibility: Visibility\n}\n\nexport type SetVisibility = { visibility: Visibility }\n\nexport type DeviceScalingUpdated = {\n deviceId: string\n sendingScaling: DeviceScaling\n orientation: Orientation\n orientationBy: OrientationBy\n}\n\nexport type UpdateStateEntry =\n | {\n action: 'add'\n key: string\n value: any\n }\n | {\n action: 'addOwned'\n key: string\n value: any\n }\n | {\n action: 'remove'\n key: string\n }\n\nexport type UpdatedStateEntry =\n | {\n action: 'add'\n key: string\n value: any\n }\n | {\n action: 'remove'\n key: string\n }\n | {\n action: 'addOwned'\n key: string\n value: any\n owner: string\n }\n\nexport type UpdateState = {\n updates: UpdateStateEntry[]\n}\n\nexport type ReplacedBy = 'local' | 'remote'\n\nexport type StateReplaced = {\n state: Record<string, any>\n delta: UpdatedStateEntry[]\n replacedBy: ReplacedBy\n}\n\nexport type GetStats = { requestId: string }\n\nexport type SetReducedAudioMode = { enabled: boolean }\n\nexport type DeviceTransceiverWebRTCStats = {\n deviceId: string\n transceiverId: string\n receiverStats?: any[]\n receiverStatsError?: string\n senderStats?: any[]\n senderStatsError?: string\n videoSendingParameters?: VideoSendingParameters\n /** 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. */\n trackLabel?: string\n /** Since 1.44: sender track getSettings(), unwrapped via originalTrack when present. Absent on older hosts; null on newer hosts without a sender track. */\n trackSettings?: MediaTrackSettings\n /** Since 1.44: sender track getConstraints(). Absent on older hosts; null on newer hosts without a sender track. */\n trackConstraints?: MediaTrackConstraints\n /** Since 1.44: sender track muted flag. Absent on older hosts; null on newer hosts without a sender track. */\n trackMuted?: boolean\n /** Since 1.44: sender track enabled flag. Absent on older hosts; null on newer hosts without a sender track. */\n trackEnabled?: boolean\n /** Since 1.44: host sending parameters isEnabled (false under confidentiality). Absent on older hosts; null on newer hosts without a sender track. */\n sendingEnabled?: boolean\n}\n\nexport type MemoryInfo = {\n slotsInUse: number\n slots: number\n mbAvailable?: number\n}\n\nexport type VideoSendingParameters = {\n size?: Size\n bitrate?: number\n}\n\nexport type StatsResponse = {\n requestId: string\n webrtcStats: DeviceTransceiverWebRTCStats[]\n memory?: MemoryInfo\n cpuUsage?: number\n audioFilter?: string\n}\n\nexport type ConnectionCodeUpdated = {\n companionCode?: string\n}\n\nexport type FieldUpdated = {\n field: Field\n}\n\nexport type SendToSerialPort = {\n com: number\n baudRate: number\n readTimeout: number\n ackLineStartsWith?: string\n nackLineStartsWith?: string\n lines: string[]\n}\n\n/// Ask the host for access to a serial port. Resolves with the granted port\n/// name (empty string if denied/cancelled).\n/// - `port` given: the host pre-grants that port (so the next\n/// `navigator.serial.requestPort()` resolves to it silently) and resolves\n/// with `port`.\n/// - `port` omitted: the host shows its port-picker; resolves with the port\n/// the user chose (and pre-grants it).\n/// Honoured only when the app holds the WebSerial authorization.\nexport type RequestSerialPortAccess = {\n port?: string\n}\n\n/// Reply to RequestSerialPortAccess. On success `port` is the granted port\n/// name. On failure `port` is omitted and `reason` is one of the failure codes\n/// (the SDK rejects the promise with that reason).\nexport type SerialPortAccessReason = 'denied' | 'cancelled' | 'timeout'\nexport type SerialPortAccessResult = {\n port?: string\n reason?: SerialPortAccessReason\n}\n\nexport type StreamSizeUpdate = {\n deviceId: string\n size: Size\n}\n\nexport type RequestStreamSizeUpdate = {\n updates: StreamSizeUpdate[]\n}\n\nexport type DisconnectGuests = {\n deviceIds: string[]\n}\n\nexport type Characteristic = {\n uuid: string\n description: string\n properties: string\n}\n\nexport type OpenBTService = {\n serviceId: string\n requestId: string\n}\n\nexport type CloseBTService = {\n handleId: string\n}\n\nexport type WriteToCharacteristic = {\n handleId: string\n uuid: string\n buffer: ArrayBufferLike\n}\n\nexport type BluetoothFromApp =\n | ({ '@BluetoothFromApp': 'openBTService' } & OpenBTService)\n | ({ '@BluetoothFromApp': 'closeBTService' } & CloseBTService)\n | ({ '@BluetoothFromApp': 'writeToCharacteristic' } & WriteToCharacteristic)\n\nexport type OpenBTServiceResponseData = {\n requestId: string\n handleId: string\n characteristics: Characteristic[]\n}\n\nexport type OpenBTServiceResponse = {\n requestId: string\n isSuccess: boolean\n response?: OpenBTServiceResponseData\n error?: string\n}\n\nexport type BluetoothToApp = {\n '@BluetoothToApp': 'openBTServiceResponse'\n} & OpenBTServiceResponse\n"]}
1
+ {"version":3,"file":"Common.Model.js","sourceRoot":"","sources":["../../Common/Common.Model.ts"],"names":[],"mappings":"AA6mBA;;GAEG;AACH,MAAM,CAAN,IAAY,cAOX;AAPD,WAAY,cAAc;IACxB,wFAAwF;IACxF,uCAAqB,CAAA;IACrB,mDAAiC,CAAA;IACjC,kEAAkE;IAClE,qDAAmC,CAAA;IACnC,mFAAiE,CAAA;AACnE,CAAC,EAPW,cAAc,KAAd,cAAc,QAOzB;AAED;;GAEG;AACH,MAAM,CAAN,IAAY,cAGX;AAHD,WAAY,cAAc;IACxB,mCAAiB,CAAA;IACjB,2CAAyB,CAAA;AAC3B,CAAC,EAHW,cAAc,KAAd,cAAc,QAGzB","sourcesContent":["export type DeviceType =\n | 'vitre'\n | 'guest'\n | 'vitreMini'\n | 'vitrePrimary'\n | 'vitreSecondary'\n | 'tableau'\n | 'vitreGuest'\n | 'companion'\n\nexport type Privacy = 'none' | 'muted' | 'blurred' | 'mutedSender'\n\nexport type Language = 'fr' | 'en' | 'it'\n\n/// A signed-in companion user. `isAdministrator` is derived host-side from\n/// `roles.includes('administrator')` and surfaced as a boolean so apps can\n/// gate features without hard-coding the magic role string; `roles` is still\n/// available for fine-grained checks.\nexport type CompanionUser = {\n id: string\n firstName: string\n lastName: string\n roles: string[]\n isAdministrator: boolean\n}\n\n/// A companion's own identity and runtime context. Surfaced as\n/// `connector.companionInformation` (CompanionConnector) and\n/// `frame.companionInformation` (companion-side Frame / CompanionFrame).\n/// Strictly distinct from the Vitre identity (`hostInformation`).\n///\n/// `name` is the companion's chosen display name — a mandatory field on the\n/// connect page (account fullname, mobile device name, or manually entered,\n/// stored locally). It is also what the Vitre shows as this companion peer's\n/// name. `user` is present only when signed in (guest sessions omit it).\n/// `language` / `origin` / `version` describe the companion runtime, not the\n/// Vitre. Undefined on Vitre-side frames (a Vitre has no companion identity).\nexport type CompanionInformation = {\n /// Stable identifier for this companion as a participant (the signed-in\n /// user id, or a fallback for guest sessions). Distinct from the Vitre's\n /// `hostInformation.device.id`. Apps that render the companion as a\n /// collaboration peer (cursors, awareness) should key on this.\n id: string\n name: string\n /// The companion participant's colour (cursor / awareness). Distinct from\n /// the Vitre's `hostInformation.device.color`.\n color: string\n user?: CompanionUser\n language: Language\n origin: string\n version?: string\n}\n\n/**\n * @deprecated Use string\n */\nexport type LegacyI18nMap = {\n fr: string\n en: string\n it: string\n}\nexport type I18nMap = string | LegacyI18nMap\n\nexport type FileData = {\n id?: string\n name: string\n mime: string\n data: ArrayBufferLike\n shareTargetId?: string\n}\n\nexport type DeviceScalingVersion = 'legacy' | 'rotationIndependent'\n\nexport type Ratio = 'ratio16_9' | 'ratio9_16'\n\nexport type CropMode = 'cropped' | 'notCropped'\n\nexport type DeviceScaling = {\n scale: number\n offsetX: number\n offsetY: number\n orientation?: Orientation\n orientationBy?: OrientationBy\n ratio?: Ratio\n cropMode?: CropMode\n version?: DeviceScalingVersion\n}\n\nexport type DeviceFullscreen = 'fullscreen' | 'localDevice' | 'notFullscreen'\n\nexport type Device = {\n id: string\n name: string\n color: string\n type: DeviceType\n privacy: Privacy\n mainDeviceId?: string\n /**\n * represent the scaling applied on the local camera stream when sending to this device\n */\n sendingScaling?: DeviceScaling\n orientation?: Orientation\n orientationBy?: OrientationBy\n fullscreen?: DeviceFullscreen\n}\n\nexport type TeamInfo = {\n id: string\n name: string\n domain: string\n}\n\nexport type HostInformation = {\n language: Language\n device: Device\n version?: string\n devicesInSpace: Device[]\n spaceTeam: TeamInfo\n owner: TeamInfo\n origin: string\n team: string\n teamId: string\n space: Space\n color: string\n privacy: Privacy\n guestInviteUrl: string\n displays: Display[]\n settings?: any\n vitreSettings: VitreSettings\n companionCode?: string\n /**\n * `true` when the frame iframe is loaded by a la Vitre **companion**\n * (i.e. the host is `lavitre-companion`, not a Vitre). Apps can use\n * this to pick the right SDK surface — `initializeCompanionFrame` /\n * `CompanionFrame` on the companion side, `initializeFrame` / `Frame`\n * on the Vitre side — and to branch UI / behaviour that genuinely\n * differs between the two contexts (e.g. show a \"Leave this frame\"\n * button on the companion that calls `closeOnCompanion()`, omit it on\n * the Vitre).\n *\n * Undefined / false on the Vitre side. Set by\n * `lavitre-companion/.../CompanionApps.State.fs:buildVitreLikeHostInformation`.\n * Backward-compat: old hosts simply omit the field, so apps that read\n * it as `?? false` keep working unchanged. Added 1.15.\n */\n isCompanion?: boolean\n}\n\nexport type SendMessageTo = {\n connectorId?: string\n deviceIds?: string[]\n message: string\n fileData?: FileData\n}\n\nexport type SendMessageToAll = {\n connectorId?: string\n message: string\n fileData?: FileData\n}\n\nexport type SendKnockKnock = {\n deviceIds?: string[]\n}\n\nexport type DeviceJoined = {\n device: Device\n}\n\nexport type DeviceLeft = {\n deviceId: string\n}\n\nexport type DeviceMessageReceived = {\n from: string\n message: string\n fileData?: FileData\n fromConnectorId?: string\n}\n\nexport type MenuCategory = {\n label: string\n description?: string\n order?: number\n}\n\nexport type NumberRange = {\n id: string\n min: number\n max: number\n value: number\n step: number\n}\n\nexport type Field = { type: 'numberRange' } & NumberRange\n\nexport type Availability = {\n vitre?: boolean\n companion?: boolean\n companionAdmin?: boolean\n}\n\n/**\n * Declares that clicking a MenuEntry on the companion opens a frame on\n * the companion side (and on the Vitre too, if `kind === 'normal'`).\n *\n * `kind === 'local'` — the frame lives only on the companion that opened\n * it; its lifecycle is independent of any frame on the Vitre.\n *\n * `kind === 'normal'` — the frame on the companion is paired with a\n * frame on the Vitre via the same `frameConnectorId`. Per-frame messages\n * and yjs CRDT updates flow between them transparently.\n */\nexport type CompanionFrameTarget = {\n kind: 'local' | 'normal'\n frameConnectorId: string\n options: Omit<OpenFrameOptions, 'frameConnectorId'>\n}\n\nexport type EntryType = 'button' | 'toggle' | 'companionOpenLink'\n\nexport type OverlayIcon = {\n iconUrl?: string\n iconUrlChecked?: string\n iconUrlUnchecked?: string\n}\n\nexport type MenuEntry = {\n label: string\n id: string\n tag?: any\n order?: number\n hasConfirm?: boolean\n isChecked?: boolean\n isDisabled?: boolean\n category?: MenuCategory\n maskIconUrl?: string\n iconUrl?: string\n maskIconUrlChecked?: string\n iconUrlChecked?: string\n overlayIcons?: OverlayIcon[]\n menu?: MenuEntry[]\n description?: string\n isCloseOnClick?: boolean\n type?: EntryType\n focus?: boolean\n field?: Field\n linkUrl?: string\n radioGroup?: string\n availability?: Availability\n /**\n * If set, the host opens a companion frame when this entry is clicked\n * on the companion. The connector does not have to react to the\n * `menuClicked` event for this case — the frame opens automatically.\n *\n * Only honored when `availability.companion === true`.\n */\n opensCompanionFrame?: CompanionFrameTarget\n}\n\nexport type Size = {\n width: number\n height: number\n}\n\nexport type Rect = {\n x: number\n y: number\n width: number\n height: number\n}\n\nexport type Display = {\n bounds: Rect\n}\n\nexport type MonitorReference =\n | { type: 'contentMonitor' }\n | { type: 'monitorIndex'; index: number }\n\nexport type LayoutPosition = {\n /**\n * @deprecated Use left\n */\n x?: string\n /**\n * @deprecated Use top\n */\n y?: string\n width?: string\n height?: string\n left?: string\n top?: string\n right?: string\n bottom?: string\n centerX?: string\n centerY?: string\n monitor?: MonitorReference\n isFullscreen?: boolean\n}\n\nexport type DeviceRule = { deviceType?: DeviceType }\n\nexport type LayoutPositionRule = { type: 'deviceRule' } & DeviceRule\n\nexport type LayoutPositionWithRules = {\n width?: string\n height?: string\n left?: string\n top?: string\n right?: string\n bottom?: string\n centerX?: string\n centerY?: string\n monitor?: MonitorReference\n isFullscreen?: boolean\n rules?: LayoutPositionRule[]\n}\n\nexport type ViewMode = 'frame' | 'overlay'\n\nexport type FramePrivacy = 'shared' | 'pinned' | 'local'\n\n/**\n * Audience filter for the companion-frame open-on-companion behaviour. See\n * `CompanionFrameOption`. `'all'` means every connected companion is\n * targeted; `'administrator'` means only companions whose authenticated\n * user has the `administrator` role.\n */\nexport type CompanionFrameAudience = 'all' | 'administrator'\n\n/**\n * Declares how an opened frame should surface on connected companions. Lives\n * on `OpenFrameOptions` so the behaviour is decided per `connector.openFrame`\n * call. Companion side honours this at `FrameOpenedByVitre` reception time\n * (see `CompanionApps.State.fs`):\n *\n * - `autoOpen`: when set and the audience matches, the companion\n * auto-navigates to the new frame full-page IF it is\n * currently on the main Vitre page. If it is busy\n * (already on a frame, camera-share, etc.) the\n * auto-open is suppressed and a menu entry is added\n * to the CURRENT page's options instead. Auto-open\n * never preempts a busy companion.\n *\n * - `menuVisibility`: when set, a menu entry is added on the companion\n * side (in the current frame's options menu) for the\n * target audience, regardless of `autoOpen`. The\n * entry, when clicked, navigates to the frame.\n *\n * - `url`: REQUIRED. The URL the companion loads in its own\n * paired iframe. This is intentionally separate from\n * the Vitre frame's `OpenFrameOptions.url` so the\n * companion can present a different UI (and load its\n * own companion-frame entry point, e.g.\n * `companionFrame.html` initialised with\n * `initializeCompanionFrame`). The companion frame is\n * paired with the Vitre frame by the same\n * `frameConnectorId`, so per-frame messages and yjs\n * CRDT updates still flow between them.\n *\n * - `showBackButton`: controls the host's own \"back\" affordance on the\n * companion's full-page frame. The companion renders\n * the frame chrome-free (no la Vitre header) except a\n * single back button — the same control as the\n * camera-share page — that dismisses the frame. Set\n * `false` to hide it (e.g. when the app draws its own\n * close UI); the user can still leave via the device /\n * browser back gesture. Defaults to `true` (shown).\n *\n * - `edgeToEdge`: lets the frame cover the companion's whole surface,\n * system bars included; the app then keeps its controls\n * clear of them with `frame.safeAreaInsets`. See the\n * field doc.\n *\n * `url` is mandatory; `autoOpen` / `menuVisibility` / `showBackButton` /\n * `edgeToEdge` are independent and may be set together. If `autoOpen` and `menuVisibility`\n * are both absent the companion mounts nothing — no navigation, no menu —\n * and only the Vitre-side frame is shown.\n */\n/**\n * Subset of `MenuEntry` used to customise the companion menu entry that\n * (re)opens this companion frame — the entry surfaced when an `autoOpen` is\n * suppressed because the companion was busy, or added via `menuVisibility`.\n * Only the fields relevant to a host-driven open are exposed; the entry's\n * `id` and click behaviour are owned by the host. Any field left unset falls\n * back to the frame's `name` (label), no icon, and default ordering.\n */\nexport type CompanionFrameOpenMenuEntry = Pick<\n MenuEntry,\n 'label' | 'maskIconUrl' | 'iconUrl' | 'category' | 'description' | 'order'\n>\n\nexport type CompanionFrameOption = {\n url: string\n autoOpen?: CompanionFrameAudience\n menuVisibility?: CompanionFrameAudience\n /**\n * @deprecated Renamed to `showCloseButton`. Still honoured for backward\n * compatibility, but `showCloseButton` takes precedence when both are set.\n */\n showBackButton?: boolean\n /**\n * Whether the full-page companion frame shows the host's close button (the\n * control that dismisses the frame). Defaults to `true` when unset. Renamed\n * from the deprecated `showBackButton`.\n */\n showCloseButton?: boolean\n /**\n * Customises the companion menu entry that (re)opens this frame — the\n * busy-`autoOpen` fallback entry or the `menuVisibility` entry. Omit to\n * label the entry with the frame's `name` (no icon / category).\n */\n openMenuEntry?: CompanionFrameOpenMenuEntry\n /**\n * Whether the full-page companion frame covers the companion's whole\n * surface, system bars included (Android edge-to-edge: the navigation bar\n * is drawn translucent over the content). Set `true` only when the app\n * shifts its own controls with `frame.safeAreaInsets` — or with the\n * `--lavitre-safe-area-inset-*` CSS variables the SDK sets from it. When\n * unset or `false` the host keeps the iframe clear of the bars itself, so\n * a frame that knows nothing about insets is never covered. Added 1.51.\n */\n edgeToEdge?: boolean\n}\n\nexport type PositionType = 'Local' | 'Synced'\n\nexport type Interaction = 'notAllowed' | 'autoActiveOnFullscreen' | 'allowed'\n\nexport type BorderMode = 'borderLess' | 'border'\n\nexport type BorderOptions = {\n mode: BorderMode\n showToggleInMenu?: boolean\n}\n\nexport type StreamCapture = {\n data: ArrayBufferLike\n}\n\nexport type VoiceAction = {\n id: string\n message: I18nMap\n}\n\nexport type VoiceActionDetection = {\n id: string\n message: string\n language: string\n confidence: number\n}\n\nexport type OpenFrameOptions = {\n frameConnectorId: string\n streamId?: string\n name: string\n url: string\n size?: Size\n minSize?: Size\n maxSize?: Size\n startPosition?: LayoutPosition\n startPositions?: LayoutPositionWithRules[]\n /**\n * @deprecated Use startPosition.isFullscreen\n */\n startMode?: FrameStartMode\n /**\n * @deprecated Use interaction property\n */\n touchMode?: FrameTouchMode\n interaction?: Interaction\n allowFullscreen?: boolean\n menuVisibility?: MenuVisibility\n /**\n * @deprecated Use menuVisibility property vitre v20\n */\n hideMenu?: boolean\n startInteractive?: boolean\n resizeMode?: ResizeMode\n border?: BorderOptions\n data?: any\n file?: FileData\n mode?: ViewMode\n privacy?: FramePrivacy\n positionType?: PositionType\n voiceActions?: VoiceAction[]\n state?: Record<string, any>\n visibility?: Visibility\n closable?: boolean\n closeLabel?: string\n /**\n * Optional declaration of how this frame should surface on connected\n * companions. See `CompanionFrameOption`. When omitted the companion\n * side ignores the open (no auto-navigation, no menu) — the same\n * behaviour pre-1.13.\n */\n companionFrame?: CompanionFrameOption\n /**\n * Optional id of the device (see `HostInformation.devicesInSpace[].id`)\n * that should *own* the shared frame. The owner drives the languette\n * colour and, when it is a Vitre, takes over hosting the frame so it\n * survives the opener disconnecting (ownership transfer). When omitted\n * the opener owns the frame, as before. Change it afterwards with\n * `connector.setFrameOwner(frameConnectorId, owner)`.\n */\n owner?: string\n /**\n * SDK 1.32 — when `true`, the `file` is delivered ONLY to the opening\n * Vitre. The frame still opens and syncs on other peers, but the file\n * bytes are not propagated and the remote frames open without it. The\n * `data` field keeps syncing normally. The host strips the file before\n * cross-vitre sync — this is purely sender-side, so no peer-version gate\n * is needed (older receivers simply get a frame with no file, a state\n * they already handle). Has no effect when no `file` is provided.\n */\n localFile?: boolean\n /**\n * Icon shown for this frame's shared content on connected companions. A\n * bitmap (full colour). May be a path relative to the connector URL — the\n * host resolves it to an absolute URL. When both `iconUrl` and `maskIconUrl`\n * are set the companion prefers `maskIconUrl`. When neither is set the\n * companion falls back to the app icon (`ConnectorOptions.iconUrl`).\n */\n iconUrl?: string\n /**\n * Monochrome mask icon for this frame's shared content, tinted by the\n * companion theme (CSS `mask`). May be relative to the connector URL —\n * resolved absolute by the host. Preferred over `iconUrl` when both are set.\n */\n maskIconUrl?: string\n /**\n * CSS background applied to this frame's shared-content surface on the\n * Vitre (and on peer Vitres / tableaux showing it). Any CSS `background`\n * value — a colour, gradient, or `url(...)`. When set it overrides the\n * default surface background (`.lavitre-shared-object-content`, normally\n * black). Not resolved against the connector URL: pass an absolute URL if\n * you reference an image. When omitted the default background is kept.\n */\n background?: string\n /**\n * CSS `box-shadow` applied to this frame's shared-content surface on the\n * Vitre (and on peer Vitres / tableaux showing it). When set it overrides\n * the default surface shadow (`.lavitre-shared-object-content`). Pass\n * `'none'` to remove the shadow. When omitted the default shadow is kept.\n */\n boxShadow?: string\n /**\n * CSS `drop-shadow` filter applied to this frame's shared-content surface on\n * the Vitre (and on peer Vitres / tableaux showing it). The value is the\n * argument of the CSS `drop-shadow()` filter function — e.g.\n * `'0 4px 8px rgba(0,0,0,.5)'` — which the host wraps as\n * `filter: drop-shadow(<value>)`. Unlike `boxShadow` it follows the rendered\n * alpha shape, so it casts a shadow around non-rectangular / transparent\n * content (pair it with a transparent `background`). Pass `'none'` to remove\n * any filter. When omitted no drop-shadow filter is applied.\n */\n dropShadow?: string\n /**\n * CSS `backdrop-filter: blur(...)` applied to this frame's shared-content\n * surface on the Vitre (and on peer Vitres / tableaux showing it). The value\n * is the argument of the CSS `blur()` function — e.g. `'8px'` — which the\n * host wraps as `backdrop-filter: blur(<value>)`. It blurs whatever is\n * *behind* the surface (frosted-glass effect), so pair it with a translucent\n * `background`. Pass `'none'` to remove the backdrop filter. When omitted no\n * backdrop blur is applied.\n */\n backdropBlur?: string\n /**\n * Name to report for this frame in usage analytics (\"insights\"), instead of\n * the app's own name. A single app can open several kinds of frames — e.g.\n * Carbone opens \"Page blanche\", \"PDF\", \"Image\" — and by default every frame\n * is recorded under the app name (\"Carbone\"). Set `insightsName` per open to\n * distinguish them in the stats. When omitted the analytics fall back to the\n * current behaviour (the app name, then the frame `name`). Purely a reporting\n * label — it does not affect the frame UI (`name` still drives the visible\n * label) and never reaches other peers.\n */\n insightsName?: string\n /**\n * `'enabled'` lets people annotate this frame whatever its `resizeMode`. By\n * default the host only offers annotation on frames that keep their aspect\n * ratio (`uniformResize`, …): strokes are stored relative to the frame, so\n * they stretch when a `freeResize` frame changes shape. Opt in when that is\n * acceptable — e.g. a website frame people point at. Hosts that predate the\n * option ignore it (no annotation on a freeResize frame).\n */\n annotation?: 'enabled'\n /**\n * The kind of this frame: the `id` of one of the app's\n * `ConnectorOptions.frameKinds`. The host opens the frame at the start\n * position the Vitre settings give that kind, else at the app's position.\n * Travels with the frame, so a peer Vitre showing it applies its own\n * position for the same kind. Unlike `insightsName`, it is an identifier,\n * not a label. Hosts that predate the option ignore it.\n */\n frameKind?: string\n}\n\n/**\n * Visual style of a frame's shared-content surface and its companion icon,\n * settable at open time (subset of `OpenFrameOptions`) and updatable at any\n * time with `connector.setChromeStyle(frameConnectorId, style)`. Every field\n * is optional: a field left `undefined` keeps the current value; pass an empty\n * string to clear an override back to the host default (e.g. `background: ''`).\n */\nexport type ChromeStyle = {\n /** See `OpenFrameOptions.background`. */\n background?: string\n /** See `OpenFrameOptions.boxShadow`. */\n boxShadow?: string\n /** See `OpenFrameOptions.dropShadow`. */\n dropShadow?: string\n /** See `OpenFrameOptions.backdropBlur`. */\n backdropBlur?: string\n /** See `OpenFrameOptions.iconUrl` (companion icon, bitmap). */\n iconUrl?: string\n /** See `OpenFrameOptions.maskIconUrl` (companion icon, monochrome mask). */\n maskIconUrl?: string\n}\n\n/**\n * @deprecated Use interaction property\n */\nexport enum FrameTouchMode {\n // Host will only allow manipulations. Touch events will not be forwarded to the webview\n ReadOnly = 'readonly',\n FullscreenOnly = 'fullscreenOnly',\n // Host will show a toggle button for interacting with the webview\n HostButtonInOut = 'hostButtonInOut',\n HostButtonMinimizeOnFullscreen = 'hostButtonMinimizeOnFullscreen',\n}\n\n/**\n * @deprecated Use startPosition.isFullscreen\n */\nexport enum FrameStartMode {\n Window = 'window',\n Fullscreen = 'fullscreen',\n}\n\nexport type ResizeMode =\n /**\n * @deprecated The method should not be used\n */\n | 'scale'\n /**\n * @deprecated The method should not be used\n */\n | 'resize'\n /**\n * @deprecated The method should not be used\n */\n | 'resizeAndKeepRatio'\n | 'no'\n | 'uniformRenderTransform'\n | 'freeRenderTransform'\n | 'uniformResize'\n | 'freeResize'\n\nexport type VideoContentHint = 'motion' | 'detail'\n\nexport type MenuClicked = {\n menuId: string\n isChecked: boolean\n tag: any | undefined\n}\n\nexport type LoadedFrame = {\n src: string\n name: string\n frameConnectorId: string\n}\n\nexport type LocalConnectorMessageReceived = {\n data: any\n fileData?: FileData\n from?: string\n}\n\nexport type SendToLocalFrame = {\n frameConnectorId?: string\n data: any\n fileData?: FileData\n}\n\nexport type EnumerateLoadedFramesCompleted = {\n requestId: string\n frames: LoadedFrame[]\n}\n\nexport type EnumerateLoadedFrames = {\n requestId: string\n}\n\nexport type PrivacyChanged = {\n privacy: Privacy\n}\n\nexport type MessageTargetCompanion = {\n type: 'companion'\n companionConnectionId: string\n}\n\nexport type MessageTarget = MessageTargetCompanion\n\n/**\n * A peer (Vitre or companion) that currently has a given frame open on\n * its side. Identified by the host's connection id so apps can address\n * it individually with the per-peer messaging APIs.\n */\nexport type FramePeer = {\n peerId: string\n deviceType: DeviceType\n name?: string\n}\n\n/**\n * Companion frame peer-presence wire events.\n *\n * `CompanionFramePeersUpdated` is the authoritative full snapshot — it\n * carries the complete current peer set and fires on every change.\n * `CompanionFramePeerJoined` / `CompanionFramePeerLeft` are convenience\n * incremental events derived from the same stream. Consumers should\n * subscribe to ONE model (snapshot OR incremental pair), not both, to\n * avoid double-counting every transition.\n */\nexport type CompanionFramePeerJoined = {\n peer: FramePeer\n}\n\nexport type CompanionFramePeerLeft = {\n peerId: string\n}\n\nexport type CompanionFramePeersUpdated = {\n peers: FramePeer[]\n}\n\nexport type AppMessage = {\n data: any\n fileData?: FileData\n target?: MessageTarget\n}\n\nexport type CameraExposureValue = {\n type: 'manual'\n exposure: number\n compensation: number\n}\n\nexport type CameraExposureAuto = {\n type: 'auto'\n}\n\nexport type CameraSettings = {\n exposure: CameraExposureAuto | CameraExposureValue\n deviceId?: string\n deviceName?: string\n}\n\nexport type StreamUsage = 'mainStream' | 'sharedStream'\n\nexport type Orientation = 'left' | 'right' | 'top' | 'bottom'\nexport type OrientationBy = 'system' | 'emulated'\n\nexport type ConnectedMediaDevice = {\n deviceId: string\n groupId: string\n kind: MediaDeviceKind\n label: string\n inUseBy: StreamUsage[]\n orientation?: Orientation\n orientationBySystem?: boolean\n}\n\nexport type AuthenticationMode = 'open' | 'userAccount'\n\nexport type SecuritySettings = {\n authentication: AuthenticationMode\n}\n\nexport type GuestSpace = {\n type: 'guestSpace'\n space: string\n teamDomain: string\n label: string\n}\n\nexport type TeamSpace = {\n type: 'teamSpace'\n space: string\n}\n\nexport type Space = GuestSpace | TeamSpace\n\n/**\n * Snapshot of the current active preset's noise filter selection.\n *\n * `active` and entries in `available` are the string ids of the F#\n * `Settings.Audio.AudioFilterLevel` enum. The current set is:\n *\n * \"none\" | \"rnnoise\" | \"rnnoise2\" | \"speex\" | \"noisegate\" | \"deepfilternet3\"\n *\n * Apps should treat the list as open — newer la Vitre builds may surface\n * additional filter ids the app doesn't know about. Render unknown ids\n * gracefully (e.g. as a generic option) rather than asserting on the set.\n */\nexport type AudioFilterView = {\n active: string\n available: string[]\n}\n\n/**\n * User-editable subset of the voice-profile chain (the \"custom\" profile).\n * Only meaningful when the active profile is \"custom\"; for the four frozen\n * profiles an app shows their fixed values read-only from its own table.\n */\nexport type CustomVoiceProfileView = {\n /** EQ presence (clarity) gain, dB. */\n presenceDb: number\n /** Compressor threshold, dB. */\n compThresholdDb: number\n /** Compressor ratio, >= 1. */\n compRatio: number\n /** De-esser sibilance cut, dB (negative). */\n deEsserCutDb: number\n}\n\nexport type CustomVoiceProfileSettingsSetter = {\n presenceDb?: number\n compThresholdDb?: number\n compRatio?: number\n deEsserCutDb?: number\n}\n\n/**\n * Voice profile (EQ + compressor + de-esser preset) applied for every\n * filter — including `none`. Ids:\n *\n * \"naturel\" | \"broadcast\" | \"douce\" | \"antifatigue\" | \"custom\"\n */\nexport type VoiceProfileView = {\n active: string\n available: string[]\n /** Persisted custom params (always present; edited only when\n * `active === 'custom'`). */\n custom: CustomVoiceProfileView\n}\n\n/**\n * DeepFilterNet 3 live-tunable knobs.\n *\n * `inputGainDb` and `wetDryMix` exist server-side but are intentionally\n * NOT exposed to apps — the SDK contract only covers the noise-reduction\n * tuning knobs that make sense in a \"voice quality\" UI.\n */\nexport type Dfn3View = {\n /** Suppression cap, 0..100 dB. Higher = more aggressive denoising. */\n attenLimDb: number\n /** Post-filter strength, 0..0.1. 0 disables it. */\n postFilterBeta: number\n}\n\nexport type Dfn3SettingsSetter = {\n attenLimDb?: number\n postFilterBeta?: number\n}\n\nexport type AudioSettings = {\n volume: number\n isMuted: boolean\n selectedPreset: string\n audioPresets: string[]\n /**\n * The following three are optional on the wire — older la Vitre builds\n * don't emit them. When undefined, treat as \"feature not available on\n * this Vitre\" rather than as a default value.\n */\n filter?: AudioFilterView\n voiceProfile?: VoiceProfileView\n dfn3?: Dfn3View\n}\n\nexport type AudioSettingsSetter = {\n volume?: number\n isMuted?: boolean\n selectedPreset?: string\n /**\n * Use one of `AudioFilterView.available` ids — unknown values are\n * silently dropped host-side rather than crashing the audio pipeline.\n */\n filter?: string\n voiceProfile?: string\n /**\n * Partial setter — only the fields present in the object are written.\n * Existing DFN3 properties not listed here (including `inputGainDb`\n * and `wetDryMix` which apps cannot manipulate) are preserved.\n */\n dfn3?: Dfn3SettingsSetter\n /**\n * Partial setter for the \"custom\" voice profile knobs. Only applied\n * when the active voice profile is \"custom\"; persisted regardless.\n */\n customVoiceProfile?: CustomVoiceProfileSettingsSetter\n}\n\nexport type VitreSettings = {\n availableMediaDevices: ConnectedMediaDevice[]\n audioSettings: AudioSettings\n cameraSettings: CameraSettings\n security: SecuritySettings\n spaces: Space[]\n currentSpace: Space\n language: Language\n color: string\n name?: string\n}\n\nexport type VitreSettingsSetter = {\n cameraSettings?: CameraSettings\n audioSettings?: AudioSettingsSetter\n}\n\nexport type DeviceTarget = 'all' | 'single'\n\nexport type KnockKnock = {\n from: Device\n target: DeviceTarget\n}\n\nexport type AppId = string\n\nexport type ShareFileRequest = {\n fileData: FileData\n targetAppId?: AppId\n /** SDK 1.20 — explicit owner device id for the resulting share. */\n owner?: string\n}\n\nexport type ShareDataRequest = {\n url: string\n targetAppId?: AppId\n /** SDK 1.20 — explicit owner device id for the resulting share. */\n owner?: string\n}\n\nexport type SaveSettings = {\n settings: any\n}\n\nexport type SettingsUpdated = {\n settings: any\n}\n\n/**\n * SDK 1.52 — the three levels of the AppSettings API (`Connector.getSettings`\n * / `setSettings`, `Frame.getSettings` / `setSettings`):\n * - `vitre` — this vitre only.\n * - `team` — the vitre's team, shared by every vitre/app instance in it.\n * - `space` — the space the vitre is currently in.\n *\n * Distinct from the legacy per-app `settingsSchema`/`saveSettings`/\n * `onSettingsUpdated` mechanism (a single, vitre-scoped JSON blob rendered by\n * the host's settings form) — the AppSettings API is app-driven, versioned,\n * and readable/writable at any of the three levels.\n */\nexport type AppSettingsLevel = 'vitre' | 'team' | 'space'\n\n/**\n * A JSON object of app settings at one `level`, with the optimistic-\n * concurrency `version` it was read/written at. `version` is `0` when the\n * level was never written. Max 64 KB serialized. Never store secrets —\n * every vitre/app instance of the team can read it.\n */\nexport type AppSettingsValue = {\n level: AppSettingsLevel\n /**\n * Since 1.58, for `team` and `space`: the defaults of the app's own\n * `lavitre.settings.json` overlaid with what is stored (objects merged key\n * by key, arrays replaced). Same as `stored` when the app ships no file.\n */\n value: Record<string, unknown>\n /** Since 1.58: what is actually stored, without the defaults. */\n stored?: Record<string, unknown>\n version: number\n /** Since 1.58: `version` of the app's `lavitre.settings.json`, when it ships one. */\n schemaVersion?: number\n}\n\n/** App → host: read the app's settings at `level`. Answered by `AppSettingsResponse`. */\nexport type GetAppSettings = {\n requestId: string\n level: AppSettingsLevel\n}\n\n/**\n * App → host: write the app's settings at `level`. `expectedVersion` must be\n * the version last observed for that level (via `AppSettingsResponse` or\n * `AppSettingsChanged`) — `0` if never written. A stale `expectedVersion`\n * fails with `AppSettingsResponse.error === 'conflict'`.\n */\nexport type SetAppSettings = {\n requestId: string\n level: AppSettingsLevel\n value: Record<string, unknown>\n expectedVersion: number\n /**\n * Since 1.58: `version` of the app's `lavitre.settings.json`. The server\n * records it with the value, so the portal knows which form the value was\n * written for. Older hosts drop it.\n */\n schemaVersion?: number\n}\n\n/** Host → app: reply to `GetAppSettings` / `SetAppSettings`, matched by `requestId`. */\nexport type AppSettingsResponse = {\n requestId: string\n level: AppSettingsLevel\n ok: boolean\n value?: Record<string, unknown>\n version?: number\n error?: 'conflict' | 'tooLarge' | 'invalid' | 'unavailable' | 'failed'\n}\n\n/**\n * Host → app: pushed whenever the settings at `level` change — including\n * changes this app itself made with `setSettings`, and changes made by\n * another vitre/app instance sharing the same team/space.\n */\nexport type AppSettingsChanged = {\n level: AppSettingsLevel\n value: Record<string, unknown>\n version: number\n}\n\n/**\n * SDK 1.53 — scope for the public storage API (`Connector.publicStorage` /\n * `Frame.publicStorage`):\n * - `app` — this app's own space in the vitre's public storage.\n * - `shared` — a space all the team's apps share.\n *\n * Files in either scope go to the vitre's TEAM storage and are readable by\n * ANYONE without authentication at the returned `url` — never store private\n * data there. Only a Vitre-hosted app can write (a companion connector has\n * no `publicStorage`).\n */\nexport type PublicStorageScope = 'app' | 'shared'\n\n/**\n * App → host: upload (or overwrite) a file in public storage. Any\n * well-formed content type (HTML/JS run on the folder's own site,\n * `https://{token}.lavit.re`); older hosts accept media and documents only.\n * 50 MB max. Overwriting an existing\n * `path` replaces the file (readers revalidate). Answered by\n * `PublicStorageResponse`.\n *\n * `expiresIn` (SDK 1.54) is optional, in seconds — validated locally by the\n * SDK (`validateExpiresIn`) before this message is even sent. Omitted when\n * not requested; a host that predates this field ignores it. The vitre host\n * relays it to the server, which deletes the file once it elapses.\n */\nexport type PutPublicFile = {\n requestId: string\n scope: PublicStorageScope\n path: string\n contentType: string\n data: ArrayBuffer\n expiresIn?: number\n}\n\n/** App → host: delete a file from public storage. Answered by `PublicStorageResponse`. */\nexport type DeletePublicFile = {\n requestId: string\n scope: PublicStorageScope\n path: string\n}\n\n/**\n * App → host: list files in `scope`, optionally filtered to paths starting\n * with `prefix`. Answered by `PublicStorageResponse`.\n */\nexport type ListPublicFiles = {\n requestId: string\n scope: PublicStorageScope\n prefix?: string\n}\n\n/**\n * A file written to public storage. `url` is the stable, unauthenticated\n * link.\n *\n * `expiresAt` (SDK 1.54, ISO UTC) is present only when the file was\n * `put` with `expiresIn` — the link answers 404 and the server deletes the\n * file once this instant passes. Absent for a permanent file.\n *\n * `downloadUrl` (SDK 1.54) is `url` with `?download=1`, forcing a browser\n * download with the file's name instead of navigating to it — handy for a\n * QR code pointed at by a phone. The host may omit it (older hosts); when\n * absent the SDK fills it locally from `url` (see `withDownloadUrlFallback`),\n * so apps can always read `downloadUrl` regardless of host version.\n */\nexport type PublicFile = {\n path: string\n url: string\n size: number\n expiresAt?: string\n downloadUrl?: string\n}\n\n/** One entry returned by `listPublicFiles`. */\nexport type PublicFileEntry = PublicFile & {\n updatedAt?: string\n}\n\n/**\n * Host → app: reply to `PutPublicFile` / `DeletePublicFile` / `ListPublicFiles`,\n * matched by `requestId`. `file` answers a put, `files`/`baseUrl` answer a list.\n */\nexport type PublicStorageResponse = {\n requestId: string\n ok: boolean\n url?: string\n file?: PublicFile\n files?: PublicFileEntry[]\n baseUrl?: string\n error?:\n | 'tooLarge'\n | 'unsupportedType'\n | 'invalidPath'\n | 'storageNotConfigured'\n | 'unavailable'\n | 'failed'\n}\n\n/** Result of `publicStorage.list` — every app/vitre instance of the team sees the same files. */\nexport type PublicStorageListResult = {\n baseUrl: string\n files: PublicFileEntry[]\n}\n\n/**\n * SDK 1.56 — scope for the private storage API (`Connector.privateStorage`\n * / `Frame.privateStorage` / `CompanionConnector.privateStorage` /\n * `CompanionFrame.privateStorage`). Identical values to\n * `PublicStorageScope` — aliased rather than redefined.\n *\n * Unlike public storage, files in either scope have NO public link: they\n * are readable by any vitre or companion of the team (via `get` or a\n * temporary `getLink` signed link), never by an anonymous visitor. Only a\n * Vitre-hosted app can write (`put`/`delete`) — a companion connector/frame\n * only has `list`/`get`/`getLink`.\n */\nexport type PrivateStorageScope = PublicStorageScope\n\n/**\n * App → host: upload (or overwrite) a file in private storage. Any content\n * type is accepted — nothing here is ever served publicly as-is; 50 MB max.\n * Overwriting an existing `path` replaces the file (readers revalidate).\n * Vitre-only — the companion host answers with `error: 'unsupported'`.\n * Answered by `PrivateStorageResponse`.\n *\n * `expiresIn` is optional, in seconds — validated locally by the SDK\n * (`validatePrivateExpiresIn`) before this message is even sent. Omitted\n * when not requested, which keeps the file permanent.\n */\nexport type PutPrivateFile = {\n requestId: string\n scope: PrivateStorageScope\n path: string\n contentType: string\n data: ArrayBuffer\n expiresIn?: number\n}\n\n/**\n * App → host: delete a file from private storage. Resolves even if the\n * path didn't exist. Vitre-only — the companion host answers with\n * `error: 'unsupported'`. Answered by `PrivateStorageResponse`.\n */\nexport type DeletePrivateFile = {\n requestId: string\n scope: PrivateStorageScope\n path: string\n}\n\n/**\n * App → host: list files in `scope`, optionally filtered to paths starting\n * with `prefix`. Expired files are omitted. Answered by\n * `PrivateStorageResponse`.\n */\nexport type ListPrivateFiles = {\n requestId: string\n scope: PrivateStorageScope\n prefix?: string\n}\n\n/**\n * App → host: download the bytes of a private file. Answered by\n * `PrivateStorageResponse` (`data` + `contentType`), or\n * `error: 'notFound'` if the path doesn't exist or has expired.\n */\nexport type GetPrivateFile = {\n requestId: string\n scope: PrivateStorageScope\n path: string\n}\n\n/**\n * App → host: mint a temporary signed link to a private file — readable\n * without authentication for `expiresIn` seconds (host default 3600, max\n * 604800 — validated locally by the SDK, `validateLinkExpiresIn`), or until\n * the file itself is deleted/expires, whichever comes first. Answered by\n * `PrivateStorageResponse` (`link`), or `error: 'notFound'` if the path\n * doesn't exist or has expired.\n */\nexport type GetPrivateFileLink = {\n requestId: string\n scope: PrivateStorageScope\n path: string\n expiresIn?: number\n}\n\n/**\n * A file in private storage. Unlike `PublicFile` there is no stable `url` —\n * private files have no public link; use `getLink` for a temporary signed\n * one.\n *\n * `expiresAt` (ISO UTC) is present only when the file was `put` with\n * `expiresIn`. Absent for a permanent file.\n */\nexport type PrivateFile = {\n path: string\n size: number\n /** Set on the answer to `put`; absent from `list` results (storage listings carry no type). */\n contentType?: string\n updatedAt?: string\n expiresAt?: string\n}\n\n/**\n * A temporary signed link to a private file, from `getLink`. `url` opens\n * the file inline (when its content type is allowlisted) or downloads it;\n * `downloadUrl` is the same link forcing a download under the file's name\n * (`?download=1`), handy for a QR code. Dies at `expiresAt`, or earlier if\n * the underlying file is deleted or itself expires first.\n */\nexport type PrivateFileLink = {\n url: string\n downloadUrl: string\n expiresAt: string\n}\n\n/**\n * Host → app: reply to `PutPrivateFile` / `DeletePrivateFile` /\n * `ListPrivateFiles` / `GetPrivateFile` / `GetPrivateFileLink`, matched by\n * `requestId`. `file` answers a put, `files` answers a list, `data` +\n * `contentType` answer a get (`data` is an `ArrayBuffer`, transferred),\n * `link` answers a getLink.\n */\nexport type PrivateStorageResponse = {\n requestId: string\n ok: boolean\n file?: PrivateFile\n files?: PrivateFile[]\n data?: ArrayBuffer\n contentType?: string\n link?: PrivateFileLink\n error?: 'tooLarge' | 'invalidPath' | 'storageNotConfigured' | 'notFound' | 'unavailable' | 'failed'\n}\n\n/** Result of `privateStorage.list`. */\nexport type PrivateStorageListResult = {\n scope: PrivateStorageScope\n files: PrivateFile[]\n}\n\nexport type ChangeTeamSpace = {\n space: string\n}\n\nexport type ChangeTeamSpaceGuest = {\n space: string\n teamDomain: string\n}\n\nexport type NotificationButton = {\n id: string\n tag?: any\n iconUrl: string\n dismissOnClick?: boolean\n}\n\nexport type NotificationInfo = {\n id: string\n message: string\n iconUrl: string\n buttons?: NotificationButton[]\n closeTimeout?: number\n}\n\nexport type HideNotification = {\n id: string\n}\n\nexport type NotificationDismissed = {\n id: string\n}\n\nexport type NotificationButtonClicked = {\n id: string\n buttonId: string\n tag?: any\n}\n\nexport type DevicePrivacyChanged = { device: Device }\n\nexport type SDKInitRequest = {\n type: 'SDKInitRequest'\n version: string\n}\n\nexport type ChangePrivacy = {\n privacy: Privacy\n}\n\nexport type DeviceFrameReference = {\n frameConnectorId: string\n deviceId: string\n}\n\nexport type PendingDevicesInfo = {\n pendingDevices: Device[]\n}\n\nexport type EventTelemetry = {\n name: string\n properties?: Record<string, any>\n}\n\nexport type StartEventTelemetry = { name: string }\n\nexport type DeviceFullscreenUpdated = {\n deviceId: string\n fullscreen: DeviceFullscreen\n}\n\nexport type PositionUpdated = {\n position: Rect\n isFullscreen: boolean\n zIndex: number\n}\n\n/**\n * Distances, in CSS px of the frame's own viewport, from each edge of the\n * frame to the nearest edge of the area the host guarantees free of system\n * UI (Android navigation bar, display cutout, …). All zero unless the host\n * runs the frame edge-to-edge (`CompanionFrameOption.edgeToEdge`). Added 1.51.\n */\nexport type SafeAreaInsets = {\n top: number\n right: number\n bottom: number\n left: number\n}\n\nexport type SafeAreaInsetsUpdated = {\n safeAreaInsets: SafeAreaInsets\n}\n\nexport type Visibility = 'hidden' | 'visible' | 'visibleInFullscreenOnly'\nexport type MenuVisibility = 'hidden' | 'visible' | 'visibleInFullscreenOnly'\n\nexport type VisibilityChanged = {\n visibility: Visibility\n}\n\nexport type SetVisibility = { visibility: Visibility }\n\nexport type DeviceScalingUpdated = {\n deviceId: string\n sendingScaling: DeviceScaling\n orientation: Orientation\n orientationBy: OrientationBy\n}\n\nexport type UpdateStateEntry =\n | {\n action: 'add'\n key: string\n value: any\n }\n | {\n action: 'addOwned'\n key: string\n value: any\n }\n | {\n action: 'remove'\n key: string\n }\n\nexport type UpdatedStateEntry =\n | {\n action: 'add'\n key: string\n value: any\n }\n | {\n action: 'remove'\n key: string\n }\n | {\n action: 'addOwned'\n key: string\n value: any\n owner: string\n }\n\nexport type UpdateState = {\n updates: UpdateStateEntry[]\n}\n\nexport type ReplacedBy = 'local' | 'remote'\n\nexport type StateReplaced = {\n state: Record<string, any>\n delta: UpdatedStateEntry[]\n replacedBy: ReplacedBy\n}\n\nexport type GetStats = { requestId: string }\n\nexport type SetReducedAudioMode = { enabled: boolean }\n\nexport type DeviceTransceiverWebRTCStats = {\n deviceId: string\n transceiverId: string\n receiverStats?: any[]\n receiverStatsError?: string\n senderStats?: any[]\n senderStatsError?: string\n videoSendingParameters?: VideoSendingParameters\n /** 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. */\n trackLabel?: string\n /** Since 1.44: sender track getSettings(), unwrapped via originalTrack when present. Absent on older hosts; null on newer hosts without a sender track. */\n trackSettings?: MediaTrackSettings\n /** Since 1.44: sender track getConstraints(). Absent on older hosts; null on newer hosts without a sender track. */\n trackConstraints?: MediaTrackConstraints\n /** Since 1.44: sender track muted flag. Absent on older hosts; null on newer hosts without a sender track. */\n trackMuted?: boolean\n /** Since 1.44: sender track enabled flag. Absent on older hosts; null on newer hosts without a sender track. */\n trackEnabled?: boolean\n /** Since 1.44: host sending parameters isEnabled (false under confidentiality). Absent on older hosts; null on newer hosts without a sender track. */\n sendingEnabled?: boolean\n}\n\nexport type MemoryInfo = {\n slotsInUse: number\n slots: number\n mbAvailable?: number\n}\n\nexport type VideoSendingParameters = {\n size?: Size\n bitrate?: number\n}\n\nexport type StatsResponse = {\n requestId: string\n webrtcStats: DeviceTransceiverWebRTCStats[]\n memory?: MemoryInfo\n cpuUsage?: number\n audioFilter?: string\n}\n\nexport type ConnectionCodeUpdated = {\n companionCode?: string\n}\n\nexport type FieldUpdated = {\n field: Field\n}\n\nexport type SendToSerialPort = {\n com: number\n baudRate: number\n readTimeout: number\n ackLineStartsWith?: string\n nackLineStartsWith?: string\n lines: string[]\n}\n\n/// Ask the host for access to a serial port. Resolves with the granted port\n/// name (empty string if denied/cancelled).\n/// - `port` given: the host pre-grants that port (so the next\n/// `navigator.serial.requestPort()` resolves to it silently) and resolves\n/// with `port`.\n/// - `port` omitted: the host shows its port-picker; resolves with the port\n/// the user chose (and pre-grants it).\n/// Honoured only when the app holds the WebSerial authorization.\nexport type RequestSerialPortAccess = {\n port?: string\n}\n\n/// Reply to RequestSerialPortAccess. On success `port` is the granted port\n/// name. On failure `port` is omitted and `reason` is one of the failure codes\n/// (the SDK rejects the promise with that reason).\nexport type SerialPortAccessReason = 'denied' | 'cancelled' | 'timeout'\nexport type SerialPortAccessResult = {\n port?: string\n reason?: SerialPortAccessReason\n}\n\nexport type StreamSizeUpdate = {\n deviceId: string\n size: Size\n}\n\nexport type RequestStreamSizeUpdate = {\n updates: StreamSizeUpdate[]\n}\n\nexport type DisconnectGuests = {\n deviceIds: string[]\n}\n\nexport type Characteristic = {\n uuid: string\n description: string\n properties: string\n}\n\nexport type OpenBTService = {\n serviceId: string\n requestId: string\n}\n\nexport type CloseBTService = {\n handleId: string\n}\n\nexport type WriteToCharacteristic = {\n handleId: string\n uuid: string\n buffer: ArrayBufferLike\n}\n\nexport type BluetoothFromApp =\n | ({ '@BluetoothFromApp': 'openBTService' } & OpenBTService)\n | ({ '@BluetoothFromApp': 'closeBTService' } & CloseBTService)\n | ({ '@BluetoothFromApp': 'writeToCharacteristic' } & WriteToCharacteristic)\n\nexport type OpenBTServiceResponseData = {\n requestId: string\n handleId: string\n characteristics: Characteristic[]\n}\n\nexport type OpenBTServiceResponse = {\n requestId: string\n isSuccess: boolean\n response?: OpenBTServiceResponseData\n error?: string\n}\n\nexport type BluetoothToApp = {\n '@BluetoothToApp': 'openBTServiceResponse'\n} & OpenBTServiceResponse\n"]}
@@ -104,6 +104,29 @@ export type ConnectorOptions = {
104
104
  /** react-jsonschema-form `uiSchema`, keyed like `settingsSchema` (one entry per field). */
105
105
  settingsSchemaUI?: any;
106
106
  voiceActions?: VoiceAction[];
107
+ /**
108
+ * The kinds of frames this app opens, when it opens more than one — e.g.
109
+ * Carbone's "Page blanche", "PDF", "Image". Each kind gets its own entry in
110
+ * the Vitre's app start positions (settings), next to the app itself, so a
111
+ * PDF can open on one monitor and a board on another. A frame says which
112
+ * kind it is with `OpenFrameOptions.frameKind`. Declared up front because
113
+ * the settings list them before any frame has been opened.
114
+ *
115
+ * Hosts that predate the option ignore it: every frame of the app opens at
116
+ * the app's own position.
117
+ */
118
+ frameKinds?: FrameKind[];
119
+ };
120
+ /** One kind of frame an app opens — see `ConnectorOptions.frameKinds`. */
121
+ export type FrameKind = {
122
+ /**
123
+ * Stable identifier, stored in the Vitre settings: never translate it, and
124
+ * never change it once released, or the positions saved for it are lost.
125
+ * Letters, digits, `-`, `_` and `.` only.
126
+ */
127
+ id: string;
128
+ /** Label shown in the settings, after the app name ("Carbone – PDF"). */
129
+ name: string;
107
130
  };
108
131
  /**
109
132
  * One setting: the JSON-Schema subset the la Vitre settings form renders
@@ -177,6 +200,8 @@ export type OpenStreamFrame = {
177
200
  menuVisibility?: MenuVisibility;
178
201
  closable?: boolean;
179
202
  closeLabel?: string;
203
+ /** See `OpenFrameOptions.frameKind`. */
204
+ frameKind?: string;
180
205
  };
181
206
  export type SetRootMenu = {
182
207
  menu: RootMenuEntry[];
@@ -1 +1 @@
1
- {"version":3,"file":"Connector.Model.js","sourceRoot":"","sources":["../../Connector/Connector.Model.ts"],"names":[],"mappings":"","sourcesContent":["import type {\n AppMessage,\n AppSettingsChanged,\n AppSettingsResponse,\n BorderOptions,\n ChangePrivacy,\n ChangeTeamSpace,\n ChangeTeamSpaceGuest,\n ChromeStyle,\n ConnectedMediaDevice,\n ConnectionCodeUpdated,\n DeletePublicFile,\n DeviceFrameReference,\n DeviceFullscreenUpdated,\n DeviceJoined,\n DeviceLeft,\n DeviceMessageReceived,\n DevicePrivacyChanged,\n DeviceScalingUpdated,\n EnumerateLoadedFrames,\n EnumerateLoadedFramesCompleted,\n EventTelemetry,\n FieldUpdated,\n FileData,\n FramePrivacy,\n GetAppSettings,\n GetStats,\n HideNotification,\n HostInformation,\n Interaction,\n KnockKnock,\n LayoutPosition,\n LayoutPositionWithRules,\n ListPublicFiles,\n LocalConnectorMessageReceived,\n MenuClicked,\n MenuEntry,\n MenuVisibility,\n NotificationButtonClicked,\n NotificationDismissed,\n NotificationInfo,\n OpenFrameOptions,\n PendingDevicesInfo,\n PositionType,\n PositionUpdated,\n PrivacyChanged,\n PublicStorageResponse,\n PutPublicFile,\n DeletePrivateFile,\n GetPrivateFile,\n GetPrivateFileLink,\n ListPrivateFiles,\n PrivateStorageResponse,\n PutPrivateFile,\n RequestSerialPortAccess,\n SerialPortAccessResult,\n ResizeMode,\n SaveSettings,\n SendKnockKnock,\n SendMessageTo,\n SendMessageToAll,\n SendToLocalFrame,\n SendToSerialPort,\n SetAppSettings,\n SetReducedAudioMode,\n SettingsUpdated,\n ShareDataRequest,\n ShareFileRequest,\n Size,\n StartEventTelemetry,\n StateReplaced,\n StatsResponse,\n UpdateState,\n ViewMode,\n Visibility,\n VitreSettings,\n VitreSettingsSetter,\n VoiceAction,\n VoiceActionDetection,\n} from '../Common/index.js'\n\nexport type InitializeConnector = {\n hostInfo: HostInformation\n appId?: string\n state?: Record<string, any>\n}\n\nexport type RegExpDefinition = {\n pattern: string\n options: string\n}\n\nexport type ShareTargetOptions = {\n name?: string\n urlDomains?: string[]\n urlRegex?: string[]\n urlRegexWithOptions?: RegExpDefinition[]\n files?: FileShareTarget[]\n /**\n * Icon shown for this share target in the companion import picker. A bitmap\n * (full colour). May be a path relative to the connector URL — the host\n * resolves it to an absolute URL. When both `iconUrl` and `maskIconUrl` are\n * set, the companion prefers `maskIconUrl`. When neither is set the picker\n * falls back to the app icon (`ConnectorOptions.iconUrl`).\n */\n iconUrl?: string\n /**\n * Monochrome mask icon for this share target, tinted by the companion theme\n * (CSS `mask`). May be relative to the connector URL — resolved absolute by\n * the host. Preferred over `iconUrl` when both are set.\n */\n maskIconUrl?: string\n}\n\nexport type FileShareTarget = {\n fileExtension?: string\n fileExtensionRegex?: RegExpDefinition\n binaryHeader?: ArrayBufferLike\n mimeTypes?: string[]\n tag?: any\n id: string\n}\n\nexport type MenuCategoryInfo = {\n type: 'mainMenu'\n label?: string\n description?: string\n order?: number\n}\n\nexport type SettingsMenuCategoryInfo = {\n type: 'settingsMenu'\n label?: string\n description?: string\n}\n\nexport type MainMenuQuickActions = {\n type: 'mainMenuQuickActions'\n label?: string\n description?: string\n order?: number\n}\n\nexport type ExportMenuCategory = {\n type: 'exportMenu'\n label?: string\n description?: string\n order?: number\n}\n\nexport type RootMenuCategory =\n | { type: 'desktopIcons' }\n | MainMenuQuickActions\n | MenuCategoryInfo\n | SettingsMenuCategoryInfo\n | ExportMenuCategory\n\nexport type RootMenuEntry = Omit<MenuEntry, 'category'> & {\n category?: RootMenuCategory\n}\n\nexport type ConnectorOptions = {\n name: string\n iconUrl?: string\n menu?: RootMenuEntry[]\n /**\n * @deprecated Use `shareTargets`. When `shareTargets` is set the host uses it\n * and ignores this field. Kept on the wire for older Vitres that only read a\n * single share target — the SDK mirrors `shareTargets[0]` here automatically.\n */\n shareTarget?: ShareTargetOptions\n /**\n * Share targets advertised by this app. Several may be declared so an app can\n * receive distinct kinds of content (each with its own `name`/matchers). When\n * provided, this supersedes the deprecated singular `shareTarget`.\n */\n shareTargets?: ShareTargetOptions[]\n /**\n * The app's settings, rendered by the la Vitre settings form and read back from\n * `hostInformation.settings`.\n *\n * This is a **map of fields**, NOT a full JSON schema: one key per setting, the\n * same keys as `hostInformation.settings`. The host builds the enclosing\n * `{ type: 'object', title: <app name>, properties: … }` itself.\n *\n * ```ts\n * // RIGHT\n * settingsSchema: {\n * city: { type: 'string', title: 'City', default: 'Paris' },\n * layout: { type: 'object', title: 'Layout', properties: { columns: { type: 'number' } } },\n * }\n * // WRONG — a full JSON schema\n * settingsSchema: { type: 'object', properties: { city: { type: 'string' } } }\n * ```\n */\n settingsSchema?: SettingsSchemaProperties\n /** react-jsonschema-form `uiSchema`, keyed like `settingsSchema` (one entry per field). */\n settingsSchemaUI?: any\n voiceActions?: VoiceAction[]\n}\n\n/**\n * One setting: the JSON-Schema subset the la Vitre settings form renders\n * (`string`, `number`, `boolean`, `enum`, `array` with `items`, `object` with\n * `properties`). Every nested `properties` value and `items` is itself a\n * `SettingsFieldSchema` object, never a bare string; `required` is a list of key\n * names on the enclosing object, never `required: true` on a field.\n */\nexport type SettingsFieldSchema = {\n type?: string\n title?: string\n description?: string\n default?: unknown\n enum?: unknown[]\n enumNames?: string[]\n items?: SettingsFieldSchema | SettingsFieldSchema[]\n properties?: SettingsSchemaProperties\n required?: string[]\n [keyword: string]: unknown\n}\n\n/** A map of fields — see `ConnectorOptions.settingsSchema`. */\nexport type SettingsSchemaProperties = { [field: string]: SettingsFieldSchema }\n\nexport type ConnectorInitialized = {\n options: ConnectorOptions\n}\n\nexport type OpenFrame = {\n options: OpenFrameOptions\n}\n\nexport type OpenLocalFrame = {\n options: OpenFrameOptions\n}\n\nexport type EnumerateMediaDevices = {\n requestId: string\n}\n\nexport type OpenStream = {\n requestId: string\n streamId: string\n constraints: MediaStreamConstraints\n}\n\nexport type OpenStreamFrame = {\n constraints?: MediaStreamConstraints\n streamSourceUrl?: string\n requestId: string\n frameConnectorId: string\n name: string\n url: string\n allowFullscreen?: boolean\n /**\n * @deprecated Use menuVisibility property vitre v20\n */\n hideMenu?: boolean\n startPosition?: LayoutPosition\n startPositions?: LayoutPositionWithRules[]\n interaction?: Interaction\n resizeMode?: ResizeMode\n mode?: ViewMode\n data?: any\n file?: FileData\n privacy?: FramePrivacy\n mirrorInitiatorStream?: boolean\n size?: Size\n minSize?: Size\n maxSize?: Size\n startInteractive?: boolean\n border?: BorderOptions\n positionType?: PositionType\n voiceActions?: VoiceAction[]\n visibility?: Visibility\n menuVisibility?: MenuVisibility\n closable?: boolean\n closeLabel?: string\n}\n\nexport type SetRootMenu = {\n menu: RootMenuEntry[]\n}\n\nexport type SettingsSchema = {\n /** A map of fields, NOT a full JSON schema — see `ConnectorOptions.settingsSchema`. */\n schema: SettingsSchemaProperties\n schemaUI: any\n}\n\nexport type SetFramePosition = {\n frameConnectorId: string\n position: LayoutPosition\n}\n\nexport type CloseFrame = {\n frameConnectorId: string\n}\n\nexport type SetFrameOwner = {\n frameConnectorId: string\n /** Device id of the new owner (HostInformation.devicesInSpace[].id). */\n owner: string\n}\n\n/// Live update of an already-open frame's shared-content style (background /\n/// box-shadow / drop-shadow surface, and companion icon). Emitted by\n/// `connector.setChromeStyle`. Only the provided fields are changed; the others\n/// keep their current value.\nexport type SetChromeStyle = {\n frameConnectorId: string\n} & ChromeStyle\n\n/// Host→app notification that an already-open shared frame's owner was\n/// reassigned via `setFrameOwner`, INCLUDING changes initiated by another\n/// device in the space. Surfaced on the SDK `Connector` as\n/// `onFrameOwnerChanged`. `owner` is the new owner's device id\n/// (HostInformation.devicesInSpace[].id).\nexport type FrameOwnerChanged = {\n frameConnectorId: string\n owner: string\n}\n\n/**\n * @deprecated Use `SetShareTargets` (`setShareTargets`).\n */\nexport type SetShareTarget = {\n shareTarget: ShareTargetOptions\n}\n\nexport type SetShareTargets = {\n shareTargets: ShareTargetOptions[]\n}\n\nexport type FrameUnloaded = {\n frameConnectorId: string\n}\n\nexport type FrameInfo = {\n frameConnectorId: string\n zIndex: number\n}\n\nexport type ShareDataReceived = {\n data: ShareData\n}\n\nexport type FileShareDataReceived = {\n data: FileData\n}\n\nexport type ShareData = {\n url: string\n}\n\nexport type TrackKind = 'audio' | 'video'\n\nexport type MediaTrackInfo = {\n id: string\n kind: TrackKind\n deviceName: string\n capabilities: MediaTrackCapabilities\n settings: MediaTrackSettings\n}\n\nexport type OpenStreamCompleted = {\n requestId: string\n streamId: string\n error?: string\n tracks?: MediaTrackInfo[]\n}\n\n/// One track of an app-provided shared stream. `readable` is the transferable\n/// output of a `MediaStreamTrackProcessor` (breakout box) — the host rebuilds a\n/// live `MediaStreamTrack` from it via `MediaStreamTrackGenerator`. Listed in\n/// the postMessage transfer list, so the host receives the SAME stream\n/// zero-copy (no re-encode) — works only when app and host are same-site\n/// (e.g. `*.apps.lavit.re` ↔ `app.lavit.re`) and Chromium.\nexport type ShareStreamTrack = {\n kind: TrackKind\n readable: ReadableStream\n settings?: MediaTrackSettings\n}\n\nexport type ShareStreamOptions = {\n /** Display label for the share (defaults to the app name). */\n name?: string\n /** Source resolution hint, used by the host to size the share. */\n width?: number\n height?: number\n /**\n * Controls how remote peers render this shared stream.\n *\n * - `'appFrame'` (default when absent): receivers load the app iframe, exactly\n * as before this field existed. N-1 receivers that do not know this field\n * will behave as `'appFrame'` automatically (backward-compatible).\n * - `'standard'`: receivers render a classic shared-video languette without\n * loading the app iframe. Use when the app provides raw video/audio and the\n * frame UI is not meaningful on the receiver side (e.g. a camera feed).\n */\n receiverDisplay?: 'standard' | 'appFrame'\n}\n\nexport type ShareStream = {\n requestId: string\n sharedStreamId: string\n options?: ShareStreamOptions\n tracks: ShareStreamTrack[]\n}\n\n/// Swap the source track(s) of an already-open app share WITHOUT closing it.\n/// The host swaps the underlying track in place (sender.replaceTrack on the\n/// vitre→peer side, no renegotiation), so peers see continuity.\nexport type ReplaceShareStream = {\n requestId: string\n sharedStreamId: string\n tracks: ShareStreamTrack[]\n}\n\nexport type StopShareStream = {\n sharedStreamId: string\n}\n\nexport type ShareStreamCompleted = {\n requestId: string\n sharedStreamId: string\n error?: string\n}\n\nexport type OpenStreamFrameCompleted = {\n requestId: string\n error?: string\n tracks?: MediaTrackInfo[]\n streamSourceUrl?: string\n}\n\nexport type EnumerateMediaDevicesCompleted = {\n requestId: string\n devices: ConnectedMediaDevice[]\n}\n\nexport type FramePositionUpdated = {\n frameConnectorId: string\n} & PositionUpdated\n\nexport type ExternalMessageReceived = {\n requestId: string\n appId: string\n message: any\n apiKeyId: string\n apiKeyName: string\n}\n\nexport type ExternalMessageResponseData = {\n requestId: string\n response?: any\n}\n\nexport type RequestAppTokenData = {\n requestId: string\n}\n\nexport type AppTokenReceivedData = {\n requestId: string\n token?: string\n error?: string\n}\n\nexport type ExecuteInFrameData = {\n requestId: string\n /** Must match the `name` attribute of the <iframe> embedded in frame.html. */\n frameName: string\n /** Runs as a function body — use `return <expr>` to yield a value. */\n code: string\n}\n\nexport type ExecuteInFrameResultData = {\n requestId: string\n /** JSON string of the injected code's return value; absent on error. */\n result?: string\n error?: string\n}\n\nexport type SetFrameSize = {\n frameId: string\n size: Size\n}\n\n/// Inbound to a Vitre `Connector` from a companion-side\n/// `CompanionConnector` (same `appId`). `fromCompanionId` is the\n/// connection-id of the sending companion so the Vitre connector can reply\n/// targeted-back via `sendMessageToCompanionConnector`.\nexport type MessageFromCompanionConnector = {\n fromCompanionId: string\n message: string\n fileData?: FileData\n}\n\n/// Inbound to a Vitre `Connector` when a companion FRAME sent a message via\n/// `CompanionFrame.sendMessageToVitreConnector` (works for a local companion\n/// frame with no paired Vitre frame). Carries the `frameConnectorId` of the\n/// companion frame that spoke, on top of the connector-message shape.\nexport type MessageFromCompanionFrame = {\n fromCompanionId: string\n frameConnectorId: string\n message: string\n fileData?: FileData\n}\n\n/// Inbound to a Vitre `Connector` when a connected companion clicks a\n/// menu entry that lives on a frame's options menu AND was declared with\n/// `availability: 'companion'` (or `'companionAdmin'`). The click did NOT\n/// fire on the Vitre — it fired on the companion-side render of the\n/// frame's options. The Vitre-side connector receives this so the app\n/// can react (typically: call `openCompanionFrame` from the companion's\n/// main connector, or push state into the frame). Distinct from\n/// `menuClicked` so apps that only care about Vitre-side menu clicks\n/// don't get woken up by companion clicks.\n///\n/// `frameConnectorId` is the id of the frame whose options menu was\n/// clicked; `fromCompanionId` is the connection-id of the clicker so\n/// targeted reactions are possible.\nexport type FrameMenuClickedOnCompanion = {\n frameConnectorId: string\n fromCompanionId: string\n menuId: string\n isChecked: boolean\n tag?: any\n}\n\n/// Target for `sendMessageToCompanionConnector` — broadcast to every\n/// companion currently connected to the Vitre, or address a single\n/// companion by id. Discriminated on `kind` so the union is unambiguous\n/// for callers and for the host that routes on this shape (a structural\n/// `{ all: true } | { companionId }` would let `{ all: true, companionId }`\n/// slip past the type system via an intermediate variable).\nexport type CompanionConnectorTarget =\n | { kind: 'all' }\n | { kind: 'one'; companionId: string }\n\n/// Payload emitted by a Vitre `Connector` when it wants to talk to the\n/// companion-side `CompanionConnector` for the same `appId`.\nexport type SendMessageToCompanionConnector = {\n target: CompanionConnectorTarget\n message: string\n fileData?: FileData\n}\n\nexport type ConnectorApiMessagesIn =\n | ({ type: 'devicePrivacyChanged' } & DevicePrivacyChanged)\n | ({ type: 'initialize' } & InitializeConnector)\n | ({ type: 'deviceJoined' } & DeviceJoined)\n | ({ type: 'deviceLeft' } & DeviceLeft)\n | ({ type: 'deviceMessageReceived' } & DeviceMessageReceived)\n | ({ type: 'deviceFullscreenUpdated' } & DeviceFullscreenUpdated)\n | ({ type: 'menuClicked' } & MenuClicked)\n | ({ type: 'fieldUpdated' } & FieldUpdated)\n | ({ type: 'shareDataReceived' } & ShareDataReceived)\n | ({ type: 'fileShareDataReceived' } & FileShareDataReceived)\n | ({ type: 'frameLoaded' } & FrameInfo)\n | ({ type: 'frameConnectorLoaded' } & FrameInfo)\n | ({ type: 'frameConnectorLoading' } & OpenFrame)\n | ({ type: 'privacyChanged' } & PrivacyChanged)\n | ({ type: 'frameUnloaded' } & FrameUnloaded)\n | ({\n type: 'enumerateMediaDevicesCompleted'\n } & EnumerateMediaDevicesCompleted)\n | ({ type: 'openStreamCompleted' } & OpenStreamCompleted)\n | ({ type: 'openStreamFrameCompleted' } & OpenStreamFrameCompleted)\n | ({ type: 'shareStreamCompleted' } & ShareStreamCompleted)\n | ({\n type: 'enumerateLoadedFramesCompleted'\n } & EnumerateLoadedFramesCompleted)\n | ({ type: 'localConnectorMessageReceived' } & LocalConnectorMessageReceived)\n | ({ type: 'extensionMessage' } & AppMessage)\n | ({ type: 'vitreSettingsResponse' } & VitreSettings)\n | ({ type: 'knockKnockReceived' } & KnockKnock)\n | ({ type: 'settingsUpdated' } & SettingsUpdated)\n | ({ type: 'vitreSettingsUpdated' } & VitreSettings)\n | ({ type: 'notificationDismissed' } & NotificationDismissed)\n | ({ type: 'notificationButtonClicked' } & NotificationButtonClicked)\n | ({ type: 'frameZIndexChanged' } & FrameInfo)\n | ({ type: 'deviceFrameLoaded' } & DeviceFrameReference)\n | ({ type: 'deviceFrameUnloaded' } & DeviceFrameReference)\n | ({ type: 'deviceFrameConnectorLoaded' } & DeviceFrameReference)\n | ({ type: 'pendingDevicesConnectionRequested' } & PendingDevicesInfo)\n | ({ type: 'appMessage' } & AppMessage)\n | ({ type: 'voiceActionDetected' } & VoiceActionDetection)\n | ({ type: 'framePositionUpdated' } & FramePositionUpdated)\n | ({ type: 'deviceScalingUpdated' } & DeviceScalingUpdated)\n | ({ type: 'stateReplaced' } & StateReplaced)\n | ({ type: 'statsResponse' } & StatsResponse)\n | ({ type: 'serialPortAccessResult'; requestId: string } & SerialPortAccessResult)\n | ({ type: 'frameOwnerChanged' } & FrameOwnerChanged)\n | ({ type: 'connectionCodeUpdated' } & ConnectionCodeUpdated)\n | ({ type: 'externalMessageReceived' } & ExternalMessageReceived)\n | ({ type: 'appTokenReceived' } & AppTokenReceivedData)\n | ({ type: 'appSettingsResponse' } & AppSettingsResponse)\n | ({ type: 'appSettingsChanged' } & AppSettingsChanged)\n | ({ type: 'publicStorageResponse' } & PublicStorageResponse)\n | ({ type: 'privateStorageResponse' } & PrivateStorageResponse)\n | ({ type: 'executeInFrameResult' } & ExecuteInFrameResultData)\n | ({ type: 'mediaDevicesChanged' } & MediaDevicesChanged)\n | { type: 'crdtUpdate'; update: ArrayBufferLike }\n | { type: 'crdtSyncComplete' }\n | { type: 'crdtRequestSync' }\n | { type: 'crdtAwarenessUpdate'; update: ArrayBufferLike }\n | { type: 'crdtSubdocUpdate'; guid: string; update: ArrayBufferLike }\n | { type: 'crdtSubdocSyncComplete'; guid: string }\n | {\n type: 'crdtSubdocTransferProgress'\n guid: string\n receivedBytes: number\n totalBytes: number\n }\n | { type: 'crdtSubdocRequestSync'; guid: string }\n | ({\n type: 'messageFromCompanionConnector'\n } & MessageFromCompanionConnector)\n | ({\n type: 'messageFromCompanionFrame'\n } & MessageFromCompanionFrame)\n | ({\n type: 'frameMenuClickedOnCompanion'\n } & FrameMenuClickedOnCompanion)\n\nexport type MediaDevicesChanged = {\n devices: ConnectedMediaDevice[]\n}\n\nexport type ConnectorApiMessagesOut =\n | ({ type: 'sendMessageTo' } & SendMessageTo)\n | ({ type: 'sendMessageToAll' } & SendMessageToAll)\n | ({ type: 'connectorInitialized' } & ConnectorInitialized)\n | ({ type: 'openFrame' } & OpenFrame)\n | ({ type: 'openLocalFrame' } & OpenLocalFrame)\n | ({ type: 'sendToLocalFrame' } & SendToLocalFrame)\n | ({ type: 'enumerateMediaDevices' } & EnumerateMediaDevices)\n | ({ type: 'openStream' } & OpenStream)\n | ({ type: 'openStreamFrame' } & OpenStreamFrame)\n | ({ type: 'shareStream' } & ShareStream)\n | ({ type: 'replaceShareStream' } & ReplaceShareStream)\n | ({ type: 'stopShareStream' } & StopShareStream)\n | ({ type: 'setRootMenu' } & SetRootMenu)\n | ({ type: 'enumerateLoadedFrames' } & EnumerateLoadedFrames)\n | ({ type: 'setShareTarget' } & SetShareTarget)\n | ({ type: 'setShareTargets' } & SetShareTargets)\n | ({ type: 'extensionMessage' } & AppMessage)\n | ({ type: 'appMessage' } & AppMessage)\n | { type: 'getVitreSettings' }\n | ({ type: 'setVitreSettings' } & VitreSettingsSetter)\n | ({ type: 'shareFile' } & ShareFileRequest)\n | ({ type: 'shareData' } & ShareDataRequest)\n | ({ type: 'saveSettings' } & SaveSettings)\n | ({ type: 'getAppSettings' } & GetAppSettings)\n | ({ type: 'setAppSettings' } & SetAppSettings)\n | ({ type: 'putPublicFile' } & PutPublicFile)\n | ({ type: 'deletePublicFile' } & DeletePublicFile)\n | ({ type: 'listPublicFiles' } & ListPublicFiles)\n | ({ type: 'putPrivateFile' } & PutPrivateFile)\n | ({ type: 'deletePrivateFile' } & DeletePrivateFile)\n | ({ type: 'listPrivateFiles' } & ListPrivateFiles)\n | ({ type: 'getPrivateFile' } & GetPrivateFile)\n | ({ type: 'getPrivateFileLink' } & GetPrivateFileLink)\n | ({ type: 'changeTeamSpace' } & ChangeTeamSpace)\n | ({ type: 'changeTeamSpaceGuest' } & ChangeTeamSpaceGuest)\n | ({ type: 'showNotification' } & NotificationInfo)\n | ({ type: 'hideNotification' } & HideNotification)\n | ({ type: 'changePrivacy' } & ChangePrivacy)\n | ({ type: 'trackEvent' } & EventTelemetry)\n | ({ type: 'startTrackEvent' } & StartEventTelemetry)\n | ({ type: 'stopTrackEvent' } & EventTelemetry)\n | ({ type: 'setSettingsSchema' } & SettingsSchema)\n | { type: 'setVoiceActions'; actions: VoiceAction[] }\n | ({ type: 'closeFrame' } & CloseFrame)\n | ({ type: 'setFrameOwner' } & SetFrameOwner)\n | ({ type: 'setChromeStyle' } & SetChromeStyle)\n | ({ type: 'setFramePosition' } & SetFramePosition)\n | ({ type: 'updateState' } & UpdateState)\n | ({ type: 'sendKnockKnock' } & SendKnockKnock)\n | ({ type: 'getStats' } & GetStats)\n | ({ type: 'setReducedAudioMode' } & SetReducedAudioMode)\n | ({ type: 'externalMessageResponse' } & ExternalMessageResponseData)\n | ({ type: 'requestAppToken' } & RequestAppTokenData)\n | ({ type: 'executeInFrame' } & ExecuteInFrameData)\n | ({ type: 'setFrameSize' } & SetFrameSize)\n | ({ type: 'sendToSerialPort' } & SendToSerialPort)\n | ({ type: 'requestSerialPortAccess'; requestId: string } & RequestSerialPortAccess)\n | { type: 'crdtUpdate'; update: ArrayBufferLike }\n | { type: 'crdtRequestSync' }\n | { type: 'crdtAwarenessUpdate'; update: ArrayBufferLike }\n | { type: 'crdtRequestAwareness' }\n | { type: 'crdtSubdocUpdate'; guid: string; update: ArrayBufferLike }\n | { type: 'crdtSubdocRequestSync'; guid: string }\n | ({\n type: 'sendMessageToCompanionConnector'\n } & SendMessageToCompanionConnector)\n"]}
1
+ {"version":3,"file":"Connector.Model.js","sourceRoot":"","sources":["../../Connector/Connector.Model.ts"],"names":[],"mappings":"","sourcesContent":["import type {\n AppMessage,\n AppSettingsChanged,\n AppSettingsResponse,\n BorderOptions,\n ChangePrivacy,\n ChangeTeamSpace,\n ChangeTeamSpaceGuest,\n ChromeStyle,\n ConnectedMediaDevice,\n ConnectionCodeUpdated,\n DeletePublicFile,\n DeviceFrameReference,\n DeviceFullscreenUpdated,\n DeviceJoined,\n DeviceLeft,\n DeviceMessageReceived,\n DevicePrivacyChanged,\n DeviceScalingUpdated,\n EnumerateLoadedFrames,\n EnumerateLoadedFramesCompleted,\n EventTelemetry,\n FieldUpdated,\n FileData,\n FramePrivacy,\n GetAppSettings,\n GetStats,\n HideNotification,\n HostInformation,\n Interaction,\n KnockKnock,\n LayoutPosition,\n LayoutPositionWithRules,\n ListPublicFiles,\n LocalConnectorMessageReceived,\n MenuClicked,\n MenuEntry,\n MenuVisibility,\n NotificationButtonClicked,\n NotificationDismissed,\n NotificationInfo,\n OpenFrameOptions,\n PendingDevicesInfo,\n PositionType,\n PositionUpdated,\n PrivacyChanged,\n PublicStorageResponse,\n PutPublicFile,\n DeletePrivateFile,\n GetPrivateFile,\n GetPrivateFileLink,\n ListPrivateFiles,\n PrivateStorageResponse,\n PutPrivateFile,\n RequestSerialPortAccess,\n SerialPortAccessResult,\n ResizeMode,\n SaveSettings,\n SendKnockKnock,\n SendMessageTo,\n SendMessageToAll,\n SendToLocalFrame,\n SendToSerialPort,\n SetAppSettings,\n SetReducedAudioMode,\n SettingsUpdated,\n ShareDataRequest,\n ShareFileRequest,\n Size,\n StartEventTelemetry,\n StateReplaced,\n StatsResponse,\n UpdateState,\n ViewMode,\n Visibility,\n VitreSettings,\n VitreSettingsSetter,\n VoiceAction,\n VoiceActionDetection,\n} from '../Common/index.js'\n\nexport type InitializeConnector = {\n hostInfo: HostInformation\n appId?: string\n state?: Record<string, any>\n}\n\nexport type RegExpDefinition = {\n pattern: string\n options: string\n}\n\nexport type ShareTargetOptions = {\n name?: string\n urlDomains?: string[]\n urlRegex?: string[]\n urlRegexWithOptions?: RegExpDefinition[]\n files?: FileShareTarget[]\n /**\n * Icon shown for this share target in the companion import picker. A bitmap\n * (full colour). May be a path relative to the connector URL — the host\n * resolves it to an absolute URL. When both `iconUrl` and `maskIconUrl` are\n * set, the companion prefers `maskIconUrl`. When neither is set the picker\n * falls back to the app icon (`ConnectorOptions.iconUrl`).\n */\n iconUrl?: string\n /**\n * Monochrome mask icon for this share target, tinted by the companion theme\n * (CSS `mask`). May be relative to the connector URL — resolved absolute by\n * the host. Preferred over `iconUrl` when both are set.\n */\n maskIconUrl?: string\n}\n\nexport type FileShareTarget = {\n fileExtension?: string\n fileExtensionRegex?: RegExpDefinition\n binaryHeader?: ArrayBufferLike\n mimeTypes?: string[]\n tag?: any\n id: string\n}\n\nexport type MenuCategoryInfo = {\n type: 'mainMenu'\n label?: string\n description?: string\n order?: number\n}\n\nexport type SettingsMenuCategoryInfo = {\n type: 'settingsMenu'\n label?: string\n description?: string\n}\n\nexport type MainMenuQuickActions = {\n type: 'mainMenuQuickActions'\n label?: string\n description?: string\n order?: number\n}\n\nexport type ExportMenuCategory = {\n type: 'exportMenu'\n label?: string\n description?: string\n order?: number\n}\n\nexport type RootMenuCategory =\n | { type: 'desktopIcons' }\n | MainMenuQuickActions\n | MenuCategoryInfo\n | SettingsMenuCategoryInfo\n | ExportMenuCategory\n\nexport type RootMenuEntry = Omit<MenuEntry, 'category'> & {\n category?: RootMenuCategory\n}\n\nexport type ConnectorOptions = {\n name: string\n iconUrl?: string\n menu?: RootMenuEntry[]\n /**\n * @deprecated Use `shareTargets`. When `shareTargets` is set the host uses it\n * and ignores this field. Kept on the wire for older Vitres that only read a\n * single share target — the SDK mirrors `shareTargets[0]` here automatically.\n */\n shareTarget?: ShareTargetOptions\n /**\n * Share targets advertised by this app. Several may be declared so an app can\n * receive distinct kinds of content (each with its own `name`/matchers). When\n * provided, this supersedes the deprecated singular `shareTarget`.\n */\n shareTargets?: ShareTargetOptions[]\n /**\n * The app's settings, rendered by the la Vitre settings form and read back from\n * `hostInformation.settings`.\n *\n * This is a **map of fields**, NOT a full JSON schema: one key per setting, the\n * same keys as `hostInformation.settings`. The host builds the enclosing\n * `{ type: 'object', title: <app name>, properties: … }` itself.\n *\n * ```ts\n * // RIGHT\n * settingsSchema: {\n * city: { type: 'string', title: 'City', default: 'Paris' },\n * layout: { type: 'object', title: 'Layout', properties: { columns: { type: 'number' } } },\n * }\n * // WRONG — a full JSON schema\n * settingsSchema: { type: 'object', properties: { city: { type: 'string' } } }\n * ```\n */\n settingsSchema?: SettingsSchemaProperties\n /** react-jsonschema-form `uiSchema`, keyed like `settingsSchema` (one entry per field). */\n settingsSchemaUI?: any\n voiceActions?: VoiceAction[]\n /**\n * The kinds of frames this app opens, when it opens more than one — e.g.\n * Carbone's \"Page blanche\", \"PDF\", \"Image\". Each kind gets its own entry in\n * the Vitre's app start positions (settings), next to the app itself, so a\n * PDF can open on one monitor and a board on another. A frame says which\n * kind it is with `OpenFrameOptions.frameKind`. Declared up front because\n * the settings list them before any frame has been opened.\n *\n * Hosts that predate the option ignore it: every frame of the app opens at\n * the app's own position.\n */\n frameKinds?: FrameKind[]\n}\n\n/** One kind of frame an app opens — see `ConnectorOptions.frameKinds`. */\nexport type FrameKind = {\n /**\n * Stable identifier, stored in the Vitre settings: never translate it, and\n * never change it once released, or the positions saved for it are lost.\n * Letters, digits, `-`, `_` and `.` only.\n */\n id: string\n /** Label shown in the settings, after the app name (\"Carbone – PDF\"). */\n name: string\n}\n\n/**\n * One setting: the JSON-Schema subset the la Vitre settings form renders\n * (`string`, `number`, `boolean`, `enum`, `array` with `items`, `object` with\n * `properties`). Every nested `properties` value and `items` is itself a\n * `SettingsFieldSchema` object, never a bare string; `required` is a list of key\n * names on the enclosing object, never `required: true` on a field.\n */\nexport type SettingsFieldSchema = {\n type?: string\n title?: string\n description?: string\n default?: unknown\n enum?: unknown[]\n enumNames?: string[]\n items?: SettingsFieldSchema | SettingsFieldSchema[]\n properties?: SettingsSchemaProperties\n required?: string[]\n [keyword: string]: unknown\n}\n\n/** A map of fields — see `ConnectorOptions.settingsSchema`. */\nexport type SettingsSchemaProperties = { [field: string]: SettingsFieldSchema }\n\nexport type ConnectorInitialized = {\n options: ConnectorOptions\n}\n\nexport type OpenFrame = {\n options: OpenFrameOptions\n}\n\nexport type OpenLocalFrame = {\n options: OpenFrameOptions\n}\n\nexport type EnumerateMediaDevices = {\n requestId: string\n}\n\nexport type OpenStream = {\n requestId: string\n streamId: string\n constraints: MediaStreamConstraints\n}\n\nexport type OpenStreamFrame = {\n constraints?: MediaStreamConstraints\n streamSourceUrl?: string\n requestId: string\n frameConnectorId: string\n name: string\n url: string\n allowFullscreen?: boolean\n /**\n * @deprecated Use menuVisibility property vitre v20\n */\n hideMenu?: boolean\n startPosition?: LayoutPosition\n startPositions?: LayoutPositionWithRules[]\n interaction?: Interaction\n resizeMode?: ResizeMode\n mode?: ViewMode\n data?: any\n file?: FileData\n privacy?: FramePrivacy\n mirrorInitiatorStream?: boolean\n size?: Size\n minSize?: Size\n maxSize?: Size\n startInteractive?: boolean\n border?: BorderOptions\n positionType?: PositionType\n voiceActions?: VoiceAction[]\n visibility?: Visibility\n menuVisibility?: MenuVisibility\n closable?: boolean\n closeLabel?: string\n /** See `OpenFrameOptions.frameKind`. */\n frameKind?: string\n}\n\nexport type SetRootMenu = {\n menu: RootMenuEntry[]\n}\n\nexport type SettingsSchema = {\n /** A map of fields, NOT a full JSON schema — see `ConnectorOptions.settingsSchema`. */\n schema: SettingsSchemaProperties\n schemaUI: any\n}\n\nexport type SetFramePosition = {\n frameConnectorId: string\n position: LayoutPosition\n}\n\nexport type CloseFrame = {\n frameConnectorId: string\n}\n\nexport type SetFrameOwner = {\n frameConnectorId: string\n /** Device id of the new owner (HostInformation.devicesInSpace[].id). */\n owner: string\n}\n\n/// Live update of an already-open frame's shared-content style (background /\n/// box-shadow / drop-shadow surface, and companion icon). Emitted by\n/// `connector.setChromeStyle`. Only the provided fields are changed; the others\n/// keep their current value.\nexport type SetChromeStyle = {\n frameConnectorId: string\n} & ChromeStyle\n\n/// Host→app notification that an already-open shared frame's owner was\n/// reassigned via `setFrameOwner`, INCLUDING changes initiated by another\n/// device in the space. Surfaced on the SDK `Connector` as\n/// `onFrameOwnerChanged`. `owner` is the new owner's device id\n/// (HostInformation.devicesInSpace[].id).\nexport type FrameOwnerChanged = {\n frameConnectorId: string\n owner: string\n}\n\n/**\n * @deprecated Use `SetShareTargets` (`setShareTargets`).\n */\nexport type SetShareTarget = {\n shareTarget: ShareTargetOptions\n}\n\nexport type SetShareTargets = {\n shareTargets: ShareTargetOptions[]\n}\n\nexport type FrameUnloaded = {\n frameConnectorId: string\n}\n\nexport type FrameInfo = {\n frameConnectorId: string\n zIndex: number\n}\n\nexport type ShareDataReceived = {\n data: ShareData\n}\n\nexport type FileShareDataReceived = {\n data: FileData\n}\n\nexport type ShareData = {\n url: string\n}\n\nexport type TrackKind = 'audio' | 'video'\n\nexport type MediaTrackInfo = {\n id: string\n kind: TrackKind\n deviceName: string\n capabilities: MediaTrackCapabilities\n settings: MediaTrackSettings\n}\n\nexport type OpenStreamCompleted = {\n requestId: string\n streamId: string\n error?: string\n tracks?: MediaTrackInfo[]\n}\n\n/// One track of an app-provided shared stream. `readable` is the transferable\n/// output of a `MediaStreamTrackProcessor` (breakout box) — the host rebuilds a\n/// live `MediaStreamTrack` from it via `MediaStreamTrackGenerator`. Listed in\n/// the postMessage transfer list, so the host receives the SAME stream\n/// zero-copy (no re-encode) — works only when app and host are same-site\n/// (e.g. `*.apps.lavit.re` ↔ `app.lavit.re`) and Chromium.\nexport type ShareStreamTrack = {\n kind: TrackKind\n readable: ReadableStream\n settings?: MediaTrackSettings\n}\n\nexport type ShareStreamOptions = {\n /** Display label for the share (defaults to the app name). */\n name?: string\n /** Source resolution hint, used by the host to size the share. */\n width?: number\n height?: number\n /**\n * Controls how remote peers render this shared stream.\n *\n * - `'appFrame'` (default when absent): receivers load the app iframe, exactly\n * as before this field existed. N-1 receivers that do not know this field\n * will behave as `'appFrame'` automatically (backward-compatible).\n * - `'standard'`: receivers render a classic shared-video languette without\n * loading the app iframe. Use when the app provides raw video/audio and the\n * frame UI is not meaningful on the receiver side (e.g. a camera feed).\n */\n receiverDisplay?: 'standard' | 'appFrame'\n}\n\nexport type ShareStream = {\n requestId: string\n sharedStreamId: string\n options?: ShareStreamOptions\n tracks: ShareStreamTrack[]\n}\n\n/// Swap the source track(s) of an already-open app share WITHOUT closing it.\n/// The host swaps the underlying track in place (sender.replaceTrack on the\n/// vitre→peer side, no renegotiation), so peers see continuity.\nexport type ReplaceShareStream = {\n requestId: string\n sharedStreamId: string\n tracks: ShareStreamTrack[]\n}\n\nexport type StopShareStream = {\n sharedStreamId: string\n}\n\nexport type ShareStreamCompleted = {\n requestId: string\n sharedStreamId: string\n error?: string\n}\n\nexport type OpenStreamFrameCompleted = {\n requestId: string\n error?: string\n tracks?: MediaTrackInfo[]\n streamSourceUrl?: string\n}\n\nexport type EnumerateMediaDevicesCompleted = {\n requestId: string\n devices: ConnectedMediaDevice[]\n}\n\nexport type FramePositionUpdated = {\n frameConnectorId: string\n} & PositionUpdated\n\nexport type ExternalMessageReceived = {\n requestId: string\n appId: string\n message: any\n apiKeyId: string\n apiKeyName: string\n}\n\nexport type ExternalMessageResponseData = {\n requestId: string\n response?: any\n}\n\nexport type RequestAppTokenData = {\n requestId: string\n}\n\nexport type AppTokenReceivedData = {\n requestId: string\n token?: string\n error?: string\n}\n\nexport type ExecuteInFrameData = {\n requestId: string\n /** Must match the `name` attribute of the <iframe> embedded in frame.html. */\n frameName: string\n /** Runs as a function body — use `return <expr>` to yield a value. */\n code: string\n}\n\nexport type ExecuteInFrameResultData = {\n requestId: string\n /** JSON string of the injected code's return value; absent on error. */\n result?: string\n error?: string\n}\n\nexport type SetFrameSize = {\n frameId: string\n size: Size\n}\n\n/// Inbound to a Vitre `Connector` from a companion-side\n/// `CompanionConnector` (same `appId`). `fromCompanionId` is the\n/// connection-id of the sending companion so the Vitre connector can reply\n/// targeted-back via `sendMessageToCompanionConnector`.\nexport type MessageFromCompanionConnector = {\n fromCompanionId: string\n message: string\n fileData?: FileData\n}\n\n/// Inbound to a Vitre `Connector` when a companion FRAME sent a message via\n/// `CompanionFrame.sendMessageToVitreConnector` (works for a local companion\n/// frame with no paired Vitre frame). Carries the `frameConnectorId` of the\n/// companion frame that spoke, on top of the connector-message shape.\nexport type MessageFromCompanionFrame = {\n fromCompanionId: string\n frameConnectorId: string\n message: string\n fileData?: FileData\n}\n\n/// Inbound to a Vitre `Connector` when a connected companion clicks a\n/// menu entry that lives on a frame's options menu AND was declared with\n/// `availability: 'companion'` (or `'companionAdmin'`). The click did NOT\n/// fire on the Vitre — it fired on the companion-side render of the\n/// frame's options. The Vitre-side connector receives this so the app\n/// can react (typically: call `openCompanionFrame` from the companion's\n/// main connector, or push state into the frame). Distinct from\n/// `menuClicked` so apps that only care about Vitre-side menu clicks\n/// don't get woken up by companion clicks.\n///\n/// `frameConnectorId` is the id of the frame whose options menu was\n/// clicked; `fromCompanionId` is the connection-id of the clicker so\n/// targeted reactions are possible.\nexport type FrameMenuClickedOnCompanion = {\n frameConnectorId: string\n fromCompanionId: string\n menuId: string\n isChecked: boolean\n tag?: any\n}\n\n/// Target for `sendMessageToCompanionConnector` — broadcast to every\n/// companion currently connected to the Vitre, or address a single\n/// companion by id. Discriminated on `kind` so the union is unambiguous\n/// for callers and for the host that routes on this shape (a structural\n/// `{ all: true } | { companionId }` would let `{ all: true, companionId }`\n/// slip past the type system via an intermediate variable).\nexport type CompanionConnectorTarget =\n | { kind: 'all' }\n | { kind: 'one'; companionId: string }\n\n/// Payload emitted by a Vitre `Connector` when it wants to talk to the\n/// companion-side `CompanionConnector` for the same `appId`.\nexport type SendMessageToCompanionConnector = {\n target: CompanionConnectorTarget\n message: string\n fileData?: FileData\n}\n\nexport type ConnectorApiMessagesIn =\n | ({ type: 'devicePrivacyChanged' } & DevicePrivacyChanged)\n | ({ type: 'initialize' } & InitializeConnector)\n | ({ type: 'deviceJoined' } & DeviceJoined)\n | ({ type: 'deviceLeft' } & DeviceLeft)\n | ({ type: 'deviceMessageReceived' } & DeviceMessageReceived)\n | ({ type: 'deviceFullscreenUpdated' } & DeviceFullscreenUpdated)\n | ({ type: 'menuClicked' } & MenuClicked)\n | ({ type: 'fieldUpdated' } & FieldUpdated)\n | ({ type: 'shareDataReceived' } & ShareDataReceived)\n | ({ type: 'fileShareDataReceived' } & FileShareDataReceived)\n | ({ type: 'frameLoaded' } & FrameInfo)\n | ({ type: 'frameConnectorLoaded' } & FrameInfo)\n | ({ type: 'frameConnectorLoading' } & OpenFrame)\n | ({ type: 'privacyChanged' } & PrivacyChanged)\n | ({ type: 'frameUnloaded' } & FrameUnloaded)\n | ({\n type: 'enumerateMediaDevicesCompleted'\n } & EnumerateMediaDevicesCompleted)\n | ({ type: 'openStreamCompleted' } & OpenStreamCompleted)\n | ({ type: 'openStreamFrameCompleted' } & OpenStreamFrameCompleted)\n | ({ type: 'shareStreamCompleted' } & ShareStreamCompleted)\n | ({\n type: 'enumerateLoadedFramesCompleted'\n } & EnumerateLoadedFramesCompleted)\n | ({ type: 'localConnectorMessageReceived' } & LocalConnectorMessageReceived)\n | ({ type: 'extensionMessage' } & AppMessage)\n | ({ type: 'vitreSettingsResponse' } & VitreSettings)\n | ({ type: 'knockKnockReceived' } & KnockKnock)\n | ({ type: 'settingsUpdated' } & SettingsUpdated)\n | ({ type: 'vitreSettingsUpdated' } & VitreSettings)\n | ({ type: 'notificationDismissed' } & NotificationDismissed)\n | ({ type: 'notificationButtonClicked' } & NotificationButtonClicked)\n | ({ type: 'frameZIndexChanged' } & FrameInfo)\n | ({ type: 'deviceFrameLoaded' } & DeviceFrameReference)\n | ({ type: 'deviceFrameUnloaded' } & DeviceFrameReference)\n | ({ type: 'deviceFrameConnectorLoaded' } & DeviceFrameReference)\n | ({ type: 'pendingDevicesConnectionRequested' } & PendingDevicesInfo)\n | ({ type: 'appMessage' } & AppMessage)\n | ({ type: 'voiceActionDetected' } & VoiceActionDetection)\n | ({ type: 'framePositionUpdated' } & FramePositionUpdated)\n | ({ type: 'deviceScalingUpdated' } & DeviceScalingUpdated)\n | ({ type: 'stateReplaced' } & StateReplaced)\n | ({ type: 'statsResponse' } & StatsResponse)\n | ({ type: 'serialPortAccessResult'; requestId: string } & SerialPortAccessResult)\n | ({ type: 'frameOwnerChanged' } & FrameOwnerChanged)\n | ({ type: 'connectionCodeUpdated' } & ConnectionCodeUpdated)\n | ({ type: 'externalMessageReceived' } & ExternalMessageReceived)\n | ({ type: 'appTokenReceived' } & AppTokenReceivedData)\n | ({ type: 'appSettingsResponse' } & AppSettingsResponse)\n | ({ type: 'appSettingsChanged' } & AppSettingsChanged)\n | ({ type: 'publicStorageResponse' } & PublicStorageResponse)\n | ({ type: 'privateStorageResponse' } & PrivateStorageResponse)\n | ({ type: 'executeInFrameResult' } & ExecuteInFrameResultData)\n | ({ type: 'mediaDevicesChanged' } & MediaDevicesChanged)\n | { type: 'crdtUpdate'; update: ArrayBufferLike }\n | { type: 'crdtSyncComplete' }\n | { type: 'crdtRequestSync' }\n | { type: 'crdtAwarenessUpdate'; update: ArrayBufferLike }\n | { type: 'crdtSubdocUpdate'; guid: string; update: ArrayBufferLike }\n | { type: 'crdtSubdocSyncComplete'; guid: string }\n | {\n type: 'crdtSubdocTransferProgress'\n guid: string\n receivedBytes: number\n totalBytes: number\n }\n | { type: 'crdtSubdocRequestSync'; guid: string }\n | ({\n type: 'messageFromCompanionConnector'\n } & MessageFromCompanionConnector)\n | ({\n type: 'messageFromCompanionFrame'\n } & MessageFromCompanionFrame)\n | ({\n type: 'frameMenuClickedOnCompanion'\n } & FrameMenuClickedOnCompanion)\n\nexport type MediaDevicesChanged = {\n devices: ConnectedMediaDevice[]\n}\n\nexport type ConnectorApiMessagesOut =\n | ({ type: 'sendMessageTo' } & SendMessageTo)\n | ({ type: 'sendMessageToAll' } & SendMessageToAll)\n | ({ type: 'connectorInitialized' } & ConnectorInitialized)\n | ({ type: 'openFrame' } & OpenFrame)\n | ({ type: 'openLocalFrame' } & OpenLocalFrame)\n | ({ type: 'sendToLocalFrame' } & SendToLocalFrame)\n | ({ type: 'enumerateMediaDevices' } & EnumerateMediaDevices)\n | ({ type: 'openStream' } & OpenStream)\n | ({ type: 'openStreamFrame' } & OpenStreamFrame)\n | ({ type: 'shareStream' } & ShareStream)\n | ({ type: 'replaceShareStream' } & ReplaceShareStream)\n | ({ type: 'stopShareStream' } & StopShareStream)\n | ({ type: 'setRootMenu' } & SetRootMenu)\n | ({ type: 'enumerateLoadedFrames' } & EnumerateLoadedFrames)\n | ({ type: 'setShareTarget' } & SetShareTarget)\n | ({ type: 'setShareTargets' } & SetShareTargets)\n | ({ type: 'extensionMessage' } & AppMessage)\n | ({ type: 'appMessage' } & AppMessage)\n | { type: 'getVitreSettings' }\n | ({ type: 'setVitreSettings' } & VitreSettingsSetter)\n | ({ type: 'shareFile' } & ShareFileRequest)\n | ({ type: 'shareData' } & ShareDataRequest)\n | ({ type: 'saveSettings' } & SaveSettings)\n | ({ type: 'getAppSettings' } & GetAppSettings)\n | ({ type: 'setAppSettings' } & SetAppSettings)\n | ({ type: 'putPublicFile' } & PutPublicFile)\n | ({ type: 'deletePublicFile' } & DeletePublicFile)\n | ({ type: 'listPublicFiles' } & ListPublicFiles)\n | ({ type: 'putPrivateFile' } & PutPrivateFile)\n | ({ type: 'deletePrivateFile' } & DeletePrivateFile)\n | ({ type: 'listPrivateFiles' } & ListPrivateFiles)\n | ({ type: 'getPrivateFile' } & GetPrivateFile)\n | ({ type: 'getPrivateFileLink' } & GetPrivateFileLink)\n | ({ type: 'changeTeamSpace' } & ChangeTeamSpace)\n | ({ type: 'changeTeamSpaceGuest' } & ChangeTeamSpaceGuest)\n | ({ type: 'showNotification' } & NotificationInfo)\n | ({ type: 'hideNotification' } & HideNotification)\n | ({ type: 'changePrivacy' } & ChangePrivacy)\n | ({ type: 'trackEvent' } & EventTelemetry)\n | ({ type: 'startTrackEvent' } & StartEventTelemetry)\n | ({ type: 'stopTrackEvent' } & EventTelemetry)\n | ({ type: 'setSettingsSchema' } & SettingsSchema)\n | { type: 'setVoiceActions'; actions: VoiceAction[] }\n | ({ type: 'closeFrame' } & CloseFrame)\n | ({ type: 'setFrameOwner' } & SetFrameOwner)\n | ({ type: 'setChromeStyle' } & SetChromeStyle)\n | ({ type: 'setFramePosition' } & SetFramePosition)\n | ({ type: 'updateState' } & UpdateState)\n | ({ type: 'sendKnockKnock' } & SendKnockKnock)\n | ({ type: 'getStats' } & GetStats)\n | ({ type: 'setReducedAudioMode' } & SetReducedAudioMode)\n | ({ type: 'externalMessageResponse' } & ExternalMessageResponseData)\n | ({ type: 'requestAppToken' } & RequestAppTokenData)\n | ({ type: 'executeInFrame' } & ExecuteInFrameData)\n | ({ type: 'setFrameSize' } & SetFrameSize)\n | ({ type: 'sendToSerialPort' } & SendToSerialPort)\n | ({ type: 'requestSerialPortAccess'; requestId: string } & RequestSerialPortAccess)\n | { type: 'crdtUpdate'; update: ArrayBufferLike }\n | { type: 'crdtRequestSync' }\n | { type: 'crdtAwarenessUpdate'; update: ArrayBufferLike }\n | { type: 'crdtRequestAwareness' }\n | { type: 'crdtSubdocUpdate'; guid: string; update: ArrayBufferLike }\n | { type: 'crdtSubdocRequestSync'; guid: string }\n | ({\n type: 'sendMessageToCompanionConnector'\n } & SendMessageToCompanionConnector)\n"]}
@@ -9,6 +9,7 @@ import { PublicStorageError, PUBLIC_STORAGE_TIMEOUT_MS, PUBLIC_STORAGE_PUT_TIMEO
9
9
  import { PrivateStorageError, PRIVATE_STORAGE_TIMEOUT_MS, PRIVATE_STORAGE_PUT_TIMEOUT_MS, PRIVATE_STORAGE_GET_TIMEOUT_MS, MAX_PRIVATE_FILE_SIZE_BYTES, validatePrivatePath, validatePrivateExpiresIn, validateLinkExpiresIn, privateFileExpiryField, } from '../Common/PrivateStorage.js';
10
10
  import { apiVersion } from '../Version.js';
11
11
  import { normalizeSettingsSchema } from './SettingsSchema.js';
12
+ import { normalizeFrameKinds } from './FrameKinds.js';
12
13
  export class Connector {
13
14
  /** @deprecated Use `crdt.doc`. The setter forwards to `crdt.attach(doc)`
14
15
  * so legacy callers that ever assigned `connector.yjsDoc = myDoc` keep
@@ -589,6 +590,7 @@ export class Connector {
589
590
  this.options = {
590
591
  ...options,
591
592
  settingsSchema: normalizeSettingsSchema(options.settingsSchema),
593
+ frameKinds: normalizeFrameKinds(options.frameKinds),
592
594
  shareTarget: options.shareTarget ??
593
595
  (options.shareTargets?.length ? options.shareTargets[0] : undefined),
594
596
  };