@characterxyz/web 0.4.0 → 0.6.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/dist/index.d.ts +14 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -33,11 +33,18 @@ interface VideoClip {
|
|
|
33
33
|
/** H.264 MP4, colour | matte side by side (Safari, with a canvas unpack). */
|
|
34
34
|
packedUrl: string | null;
|
|
35
35
|
seconds: number | null;
|
|
36
|
+
/** The same clip at 960 px tall, for the launcher; present once the server has made it. */
|
|
37
|
+
smallUrl?: string | null;
|
|
36
38
|
}
|
|
37
39
|
interface VideoCharacter {
|
|
38
40
|
anchor: {
|
|
39
41
|
url: string | null;
|
|
40
42
|
alphaUrl: string | null;
|
|
43
|
+
/** The cut-out still at 960 px tall (WebP), for the launcher. */
|
|
44
|
+
smallUrl?: string | null;
|
|
45
|
+
/** The full still's size: the face landmarks are in its pixels, not the copy's. */
|
|
46
|
+
width?: number;
|
|
47
|
+
height?: number;
|
|
41
48
|
} | null;
|
|
42
49
|
clips: Partial<Record<'idle' | 'talking' | 'listening' | 'entrance', VideoClip>>;
|
|
43
50
|
/** Where the face is, in the anchor still's pixels. */
|
|
@@ -96,11 +103,15 @@ interface ChatMessage {
|
|
|
96
103
|
/** The contact card: which fields to ask, and the consent line to show. */
|
|
97
104
|
interface DetailsForm {
|
|
98
105
|
/** Always `name` and `email`; `phone` and `company` when the key asks for them. */
|
|
99
|
-
fields: ('name' | 'email' | 'phone' | 'company')[];
|
|
106
|
+
fields: ('name' | 'email' | 'phone' | 'company' | 'reason')[];
|
|
100
107
|
/** The brand's privacy policy, linked from the consent line. */
|
|
101
108
|
privacyUrl: string | null;
|
|
102
109
|
/** Shown under the card; sending is the consent. */
|
|
103
110
|
consent: string;
|
|
111
|
+
/** The card's reason field, when the author set a label. */
|
|
112
|
+
reasonLabel?: string | null;
|
|
113
|
+
/** Choices offered for the reason; the visitor may still pick Other. */
|
|
114
|
+
reasonOptions?: string[];
|
|
104
115
|
}
|
|
105
116
|
/** What a visitor leaves. */
|
|
106
117
|
interface ContactDetails {
|
|
@@ -108,6 +119,8 @@ interface ContactDetails {
|
|
|
108
119
|
email: string;
|
|
109
120
|
phone?: string;
|
|
110
121
|
company?: string;
|
|
122
|
+
/** Why they reached out, from the card's options or typed as Other. */
|
|
123
|
+
reason?: string;
|
|
111
124
|
}
|
|
112
125
|
/**
|
|
113
126
|
* How the agent opens the conversation on this site, written by the agent
|
package/package.json
CHANGED