@dinghy-chat/widget 0.20.0 → 0.22.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/shared.d.ts +29 -1
- package/package.json +1 -1
package/dist/shared.d.ts
CHANGED
|
@@ -35,6 +35,18 @@ export interface WidgetSettings {
|
|
|
35
35
|
emailAsk: "off" | "after_first" | "before_first";
|
|
36
36
|
/** The "Powered by Dinghy" line. */
|
|
37
37
|
branding: boolean;
|
|
38
|
+
/** A chime when a reply arrives and the visitor is not looking at the chat. */
|
|
39
|
+
sound: boolean;
|
|
40
|
+
/** The visitor gets the conversation by email when it closes. The widget does not use it. */
|
|
41
|
+
transcript: boolean;
|
|
42
|
+
/** Whose faces the header shows. `online` falls back to the latest repliers when nobody is. */
|
|
43
|
+
headerFaces: "online" | "repliers" | "chosen" | "none";
|
|
44
|
+
/** How many faces, 1 to HEADER_FACES_MAX. */
|
|
45
|
+
headerFaceCount: number;
|
|
46
|
+
/** A green dot on the face of each member who is online now. */
|
|
47
|
+
headerDot: boolean;
|
|
48
|
+
/** Under the title while someone is online: "Online", or the usual reply time. */
|
|
49
|
+
headerStatus: "presence" | "reply_time";
|
|
38
50
|
}
|
|
39
51
|
/** A member the widget's header shows: a first name and a picture, never an email. */
|
|
40
52
|
export interface TeamFace {
|
|
@@ -46,14 +58,23 @@ export interface TeamFace {
|
|
|
46
58
|
}
|
|
47
59
|
/** The saved settings, as the widget's appearance route answers them. */
|
|
48
60
|
export interface SavedAppearance extends WidgetSettings {
|
|
61
|
+
/** The chat sends the visitor's unsent words, so operators see them as they type. */
|
|
62
|
+
typingPreview: boolean;
|
|
49
63
|
logoUrl: string | null;
|
|
50
|
-
/** Up to
|
|
64
|
+
/** Up to HEADER_FACES_MAX members, the ones who sent the latest replies, newest first. */
|
|
51
65
|
team: TeamFace[];
|
|
66
|
+
/**
|
|
67
|
+
* The header's candidates, in order: every member for `online`, which the widget cuts to the
|
|
68
|
+
* members online now, the latest repliers for `repliers`, the chosen members for `chosen`.
|
|
69
|
+
*/
|
|
70
|
+
faces: TeamFace[];
|
|
52
71
|
}
|
|
53
72
|
/** The longest title an owner can save. */
|
|
54
73
|
export declare const TITLE_MAX = 40;
|
|
55
74
|
/** The longest greeting or away text. */
|
|
56
75
|
export declare const TEXT_MAX = 200;
|
|
76
|
+
/** The most faces the header shows. */
|
|
77
|
+
export declare const HEADER_FACES_MAX = 5;
|
|
57
78
|
/** The roundest corners an owner can save. */
|
|
58
79
|
export declare const RADIUS_MAX_PX = 24;
|
|
59
80
|
/** The widget's own colors, which a null color in the settings keeps. */
|
|
@@ -63,6 +84,11 @@ export declare const DEFAULT_COLORS: {
|
|
|
63
84
|
};
|
|
64
85
|
/** What a new workspace saves, and what the widget shows when the server cannot answer. */
|
|
65
86
|
export declare const WIDGET_DEFAULTS: SavedAppearance;
|
|
87
|
+
/**
|
|
88
|
+
* The saved settings over the defaults. A tab that loaded before an upgrade, or the five-minute
|
|
89
|
+
* cache, can hand over an answer without the fields that came later.
|
|
90
|
+
*/
|
|
91
|
+
export declare const withDefaults: (answer: Partial<SavedAppearance> | null | undefined) => SavedAppearance;
|
|
66
92
|
/**
|
|
67
93
|
* The first word of a name, which is all a visitor learns of an operator. It stops at an @ too, so
|
|
68
94
|
* a name typed as an email never shows one.
|
|
@@ -176,4 +202,6 @@ export declare function rememberOpen(publicKey: string, open: boolean): void;
|
|
|
176
202
|
* chatted.
|
|
177
203
|
*/
|
|
178
204
|
export declare function forgetVisitor(publicKey: string): void;
|
|
205
|
+
/** The longest message, in characters: the composers' limit, which the server checks too. */
|
|
206
|
+
export declare const MESSAGE_MAX = 10000;
|
|
179
207
|
export {};
|