@webority/chat-core 0.165.6 → 0.166.1
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/look.js +1 -1
- package/dist/types/look.d.ts +25 -2
- package/package.json +1 -1
package/dist/look.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var e=5,t={launcher:{style:`Round`,entrance:`Rise`,idle:`None`,labelReveal:`Bubble`,compact:!1,mark:`Icon`},panel:{motion:`Spring`,widthPx:420,maxHeightPx:650,bottomGapPx:24,height:`Fixed`,placement:`Floating`,replyAvatars:`First`,greetingLoaderMs:0},phone:{maxWidthPx:768,mode:`FullScreen`,sheetHeightDvh:85,sheetMaxHeightPx:640,hideLauncher:!1},input:{ring:!0,sendReveal:`OnText`,sendIcon:`arrow-up`,mark:`None`,edge:`None`,placeholder:`Plain`,busyEdge:`Off`},starters:{style:`Chips`,recentRows:0},footer:{layout:`Stacked`,disclaimer:`Show`},avoid:{liftSelectors:[`footer`,`.form-actions-sticky`,`.wui-tabbar`],menuSelectors:[`.offcanvas.show`,`wui-drawer[open]`,`[data-menu-open]`],darkSelectors:[`[data-theme='dark']`,`[data-bs-theme='dark']`],autoOpenOptOutSelector:`[data-chat-no-autoopen]`,autoOpenBusySelectors:[`[data-chat-busy]`]},motion:`On`,avatar:null,avatarMotion:`Still`,expressive:!1};function n(e){let n=e??{};return{launcher:{...t.launcher,...n.launcher},panel:{...t.panel,...n.panel},phone:{...t.phone,...n.phone},input:{...t.input,...n.input},starters:{...t.starters,...n.starters},footer:{...t.footer,...n.footer},avoid:{...t.avoid,...n.avoid},motion:n.motion??t.motion,avatar:n.avatar??t.avatar,avatarMotion:n.avatarMotion??t.avatarMotion,expressive:n.expressive??t.expressive}}export{e as CHAT_RECENT_ROWS_MAX,t as defaultChatLook,n as mergeLook};
|
|
1
|
+
var e=5,t={launcher:{style:`Round`,entrance:`Rise`,idle:`None`,labelReveal:`Bubble`,compact:!1,mark:`Icon`},panel:{motion:`Spring`,widthPx:420,maxHeightPx:650,bottomGapPx:24,height:`Fixed`,placement:`Floating`,replyAvatars:`First`,greetingLoaderMs:0},phone:{maxWidthPx:768,mode:`FullScreen`,sheetHeightDvh:85,sheetMaxHeightPx:640,hideLauncher:!1,launcherLabel:!1,entrance:`Fade`,offsetXPx:null,offsetYPx:null},input:{ring:!0,sendReveal:`OnText`,sendIcon:`arrow-up`,mark:`None`,edge:`None`,placeholder:`Plain`,busyEdge:`Off`,markInsetPx:null,sendInsetPx:null,rowHeightPx:null,markAlign:`Centre`},starters:{style:`Chips`,recentRows:0,heading:!1,gapPx:null},footer:{layout:`Stacked`,disclaimer:`Show`},avoid:{liftGapPx:20,liftSelectors:[`footer`,`.form-actions-sticky`,`.wui-tabbar`],menuSelectors:[`.offcanvas.show`,`wui-drawer[open]`,`[data-menu-open]`],darkSelectors:[`[data-theme='dark']`,`[data-bs-theme='dark']`],autoOpenOptOutSelector:`[data-chat-no-autoopen]`,autoOpenBusySelectors:[`[data-chat-busy]`]},motion:`On`,avatar:null,avatarMotion:`Still`,expressive:!1};function n(e){let n=e??{};return{launcher:{...t.launcher,...n.launcher},panel:{...t.panel,...n.panel},phone:{...t.phone,...n.phone},input:{...t.input,...n.input},starters:{...t.starters,...n.starters},footer:{...t.footer,...n.footer},avoid:{...t.avoid,...n.avoid},motion:n.motion??t.motion,avatar:n.avatar??t.avatar,avatarMotion:n.avatarMotion??t.avatarMotion,expressive:n.expressive??t.expressive}}export{e as CHAT_RECENT_ROWS_MAX,t as defaultChatLook,n as mergeLook};
|
package/dist/types/look.d.ts
CHANGED
|
@@ -29,6 +29,10 @@ export type ChatInputEdge = "None" | "Gradient";
|
|
|
29
29
|
export type ChatInputPlaceholder = "Plain" | "Gradient";
|
|
30
30
|
/** Whether the ask box edge sweeps while a reply is thinking or streaming. */
|
|
31
31
|
export type ChatInputBusyEdge = "Off" | "Sweep";
|
|
32
|
+
/** How a phone launcher arrives: Fade fades in where it sits; Match plays the launcher's own entrance. */
|
|
33
|
+
export type ChatPhoneEntrance = "Fade" | "Match";
|
|
34
|
+
/** Where the ask box mark sits against the send button: Centre of the row, or Bottom, on the send button's bottom line. */
|
|
35
|
+
export type ChatInputMarkAlign = "Centre" | "Bottom";
|
|
32
36
|
/** How the starter questions are laid out: wrapping chips, or full-width rows with an icon. */
|
|
33
37
|
export type ChatStartersStyle = "Chips" | "Rows";
|
|
34
38
|
/** The most recent chats a welcome screen can list. */
|
|
@@ -54,15 +58,25 @@ export interface ChatLook {
|
|
|
54
58
|
/** How long the typing pill shows before the greeting on first open; 0 shows the greeting at once. */
|
|
55
59
|
greetingLoaderMs: number;
|
|
56
60
|
};
|
|
57
|
-
/**
|
|
61
|
+
/**
|
|
62
|
+
* hideLauncher hides the launcher while the panel is open on a phone. launcherLabel shows the launcher label on a phone instead of clipping it.
|
|
63
|
+
* entrance sets how the phone launcher arrives. offsetXPx and offsetYPx set the launcher's distance from the screen edge and bottom; null keeps the built-in 16 and 16.
|
|
64
|
+
*/
|
|
58
65
|
phone: {
|
|
59
66
|
maxWidthPx: number;
|
|
60
67
|
mode: ChatPhoneMode;
|
|
61
68
|
sheetHeightDvh: number;
|
|
62
69
|
sheetMaxHeightPx: number;
|
|
63
70
|
hideLauncher: boolean;
|
|
71
|
+
launcherLabel: boolean;
|
|
72
|
+
entrance: ChatPhoneEntrance;
|
|
73
|
+
offsetXPx: number | null;
|
|
74
|
+
offsetYPx: number | null;
|
|
64
75
|
};
|
|
65
|
-
/**
|
|
76
|
+
/**
|
|
77
|
+
* sendIcon is a shared icon name for the send button.
|
|
78
|
+
* markInsetPx and sendInsetPx set the space at the ask box's start and end; rowHeightPx sets its minimum row height; null keeps the built-in value.
|
|
79
|
+
*/
|
|
66
80
|
input: {
|
|
67
81
|
ring: boolean;
|
|
68
82
|
sendReveal: ChatSendReveal;
|
|
@@ -71,12 +85,19 @@ export interface ChatLook {
|
|
|
71
85
|
edge: ChatInputEdge;
|
|
72
86
|
placeholder: ChatInputPlaceholder;
|
|
73
87
|
busyEdge: ChatInputBusyEdge;
|
|
88
|
+
markInsetPx: number | null;
|
|
89
|
+
sendInsetPx: number | null;
|
|
90
|
+
rowHeightPx: number | null;
|
|
91
|
+
markAlign: ChatInputMarkAlign;
|
|
74
92
|
};
|
|
75
93
|
/** The starter questions on the empty welcome screen, on the web surfaces; the phone ignores it. */
|
|
76
94
|
/** recentRows lists that many of the visitor's recent chats under the starters, 0 to 5; 0 lists none. */
|
|
95
|
+
/** heading draws the starters' label as a visible heading; gapPx sets the space between the last starter and the ask box, null keeps the built-in layout. */
|
|
77
96
|
starters: {
|
|
78
97
|
style: ChatStartersStyle;
|
|
79
98
|
recentRows: number;
|
|
99
|
+
heading: boolean;
|
|
100
|
+
gapPx: number | null;
|
|
80
101
|
};
|
|
81
102
|
/** The lines under the composer on the web surfaces (the elements and React); the phone footer ignores it. */
|
|
82
103
|
footer: {
|
|
@@ -84,6 +105,8 @@ export interface ChatLook {
|
|
|
84
105
|
disclaimer: ChatFooterDisclaimer;
|
|
85
106
|
};
|
|
86
107
|
avoid: {
|
|
108
|
+
/** The space in pixels the launcher keeps above a banner or footer it lifts over. */
|
|
109
|
+
liftGapPx: number;
|
|
87
110
|
liftSelectors: string[];
|
|
88
111
|
menuSelectors: string[];
|
|
89
112
|
darkSelectors: string[];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webority/chat-core",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.166.1",
|
|
4
4
|
"description": "The headless Webority Chat engine: the client over the chat routes, the session state machine over message parts, the stream reader, profile resolution with screen narrowing, the default English labels and a fixture client for sandboxes and tests. No DOM and no UI.",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
6
6
|
"type": "module",
|