@tavus/embed 0.3.0 → 0.5.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
@@ -34,10 +34,11 @@ Importing the package registers the `<tavus-embed>` custom element as a side eff
34
34
 
35
35
  ## Attributes
36
36
 
37
- | Attribute | Type | Description |
38
- | ----------------- | ------ | ------------------------------------------------------------------------------- |
39
- | `deployment-id` | string | The Tavus deployment ID. Fetches configuration from `/v2/deployments/:id/init`. |
40
- | `override-config` | JSON | Optional JSON object that is deep-merged over the fetched config. |
37
+ | Attribute | Type | Description |
38
+ | ----------------- | --------------------------- | ------------------------------------------------------------------------------- |
39
+ | `deployment-id` | string | The Tavus deployment ID. Fetches configuration from `/v2/deployments/:id/init`. |
40
+ | `override-config` | JSON | Optional JSON object that is deep-merged over the fetched config. |
41
+ | `layout` | `"inline" \| "full-screen"` | Where the preview copy sits. Defaults to `inline`. See [Layout](#layout). |
41
42
 
42
43
  ## Sizing
43
44
 
@@ -49,6 +50,19 @@ Importing the package registers the `<tavus-embed>` custom element as a side eff
49
50
  </div>
50
51
  ```
51
52
 
53
+ ## Layout
54
+
55
+ `layout` only changes how the preview screen arranges its copy — sizing stays entirely yours (the element always fills its parent, in either mode).
56
+
57
+ - `inline` (default): the greeting and the start button share a bar along the bottom edge. Below a container width of `56.25rem` the greeting moves up to the top corner, since the bar has no room for both.
58
+ - `full-screen`: the greeting always sits in the top-left corner and the start button is centered above the lower edge, clear of the replica's face. Meant for a section that gives the embed the whole viewport; the in-call fullscreen toggle is dropped, since the page is already the app.
59
+
60
+ ```html
61
+ <section style="height: 100dvh;">
62
+ <tavus-embed deployment-id="YOUR_DEPLOYMENT_ID" layout="full-screen"></tavus-embed>
63
+ </section>
64
+ ```
65
+
52
66
  ## License
53
67
 
54
68
  MIT
package/dist/index.d.ts CHANGED
@@ -1,6 +1,12 @@
1
1
  export { TavusIntegration, TAVUS_EVENT_NAMES } from './integration.ts';
2
2
  export type { TavusEventName, TavusEventMap, TavusInteraction } from './integration.ts';
3
3
  interface TavusEmbedAttributes {
4
+ /**
5
+ * Where the preview screen puts its copy. `"full-screen"` pins it to the
6
+ * top-left corner with the action above the lower edge; anything else keeps
7
+ * the bottom bar. Arrangement only — sizing is always the host page's.
8
+ */
9
+ layout?: "inline" | "full-screen";
4
10
  /** Deployment to load. Resolved via the `/init` fetch. */
5
11
  "deployment-id"?: string;
6
12
  /** JSON `OverrideConfig`, deep-merged on top of the fetched config. */
@@ -13,6 +19,12 @@ interface TavusEmbedAttributes {
13
19
  "memory-stores"?: string;
14
20
  /** API base origin override (defaults to the production API). */
15
21
  "base-url"?: string;
22
+ /**
23
+ * @experimental Undocumented JSON escape hatch for tuning the expanded card
24
+ * (`enabled`, `aspect`, `custom_aspect`, `max_width`, `max_height`). Not part
25
+ * of the supported surface — it may change or disappear without notice.
26
+ */
27
+ "expand-options"?: string;
16
28
  /** Preview/auth token forwarded to `/init` and `/start`. */
17
29
  token?: string;
18
30
  }