@tavus/embed 0.3.0 → 0.4.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 +18 -4
- package/dist/index.d.ts +6 -0
- package/dist/index.iife.js +34 -34
- package/dist/index.mjs +6886 -6766
- package/package.json +1 -1
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
|
|
38
|
-
| ----------------- |
|
|
39
|
-
| `deployment-id` | string
|
|
40
|
-
| `override-config` | JSON
|
|
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. */
|