@ethora/chat-component 26.4.5 → 26.5.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/README.md +7 -4
- package/dist/assets/icons.d.ts +4 -12
- package/dist/assets/illustrations/EmptyChatIllustration.d.ts +7 -0
- package/dist/assets/illustrations/NoMessagesIllustration.d.ts +7 -0
- package/dist/components/MainComponents/FallbackScreen.d.ts +12 -0
- package/dist/helpers/hiddenRooms.d.ts +9 -0
- package/dist/helpers/resolveIconColor.d.ts +23 -0
- package/dist/hooks/useUnreadMessagesCounter.d.ts +9 -0
- package/dist/main.js +15478 -15337
- package/dist/main.js.map +1 -1
- package/dist/types/models/config.model.d.ts +42 -1
- package/package.json +1 -3
|
@@ -48,6 +48,15 @@ export interface FontFaceSource {
|
|
|
48
48
|
export interface TypographyConfig {
|
|
49
49
|
/** Family applied to the chat UI, optionally with fallbacks. */
|
|
50
50
|
fontFamily?: string;
|
|
51
|
+
/**
|
|
52
|
+
* Base font size for chat text. A number is treated as pixels (e.g. `18`),
|
|
53
|
+
* a string is used verbatim if it carries a unit (`"1.1rem"`, `"18px"`) or
|
|
54
|
+
* parsed as pixels otherwise. Published as the `--ethora-font-size` CSS
|
|
55
|
+
* variable (plus derived `-xs` / `-sm` / `-lg` variants) which the chat's
|
|
56
|
+
* text styles read, so message text, sender names, timestamps, inputs,
|
|
57
|
+
* room names and badges all scale proportionally. Default 16px.
|
|
58
|
+
*/
|
|
59
|
+
fontSize?: number | string;
|
|
51
60
|
/** A full Google Fonts stylesheet URL, e.g.
|
|
52
61
|
* "https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap". */
|
|
53
62
|
googleFontsUrl?: string;
|
|
@@ -71,9 +80,41 @@ export interface IConfig {
|
|
|
71
80
|
colors?: {
|
|
72
81
|
primary: string;
|
|
73
82
|
secondary: string;
|
|
83
|
+
/**
|
|
84
|
+
* Default colour applied to the chat's icons (attach, microphone, send,
|
|
85
|
+
* file, empty-state illustrations, etc.). When omitted, icons fall back
|
|
86
|
+
* to `primary`. Set to a specific colour to decouple icons from the
|
|
87
|
+
* primary theme colour.
|
|
88
|
+
*/
|
|
89
|
+
icons?: string;
|
|
74
90
|
};
|
|
75
|
-
/** Configurable font family / weights for the chat UI. See TypographyConfig. */
|
|
91
|
+
/** Configurable font family / size / weights for the chat UI. See TypographyConfig. */
|
|
76
92
|
typography?: TypographyConfig;
|
|
93
|
+
/**
|
|
94
|
+
* Custom screens shown instead of the built-in Ethora UI when the chat
|
|
95
|
+
* cannot be displayed. Each value may be a plain string (rendered as
|
|
96
|
+
* centered text) or any React node. When a value is omitted, the default
|
|
97
|
+
* built-in UI for that state (e.g. the Ethora login form) is kept.
|
|
98
|
+
*/
|
|
99
|
+
fallbackScreens?: {
|
|
100
|
+
/** Replaces the default Ethora login form when there is no user session. */
|
|
101
|
+
noUser?: React.ReactNode;
|
|
102
|
+
/** Shown when the XMPP connection is lost / cannot be established. */
|
|
103
|
+
noConnection?: React.ReactNode;
|
|
104
|
+
/** Shown when the user has no chat room to display. */
|
|
105
|
+
noRoom?: React.ReactNode;
|
|
106
|
+
};
|
|
107
|
+
/**
|
|
108
|
+
* Hide specific rooms from the room list and unread counters without
|
|
109
|
+
* leaving them. Useful to suppress auto-created rooms such as the default
|
|
110
|
+
* "Main chat" created with a new Ethora app.
|
|
111
|
+
*/
|
|
112
|
+
hiddenRooms?: {
|
|
113
|
+
/** Case-insensitive exact room titles to hide, e.g. ["Main chat"]. */
|
|
114
|
+
titles?: string[];
|
|
115
|
+
/** Full room JIDs to hide. */
|
|
116
|
+
jids?: string[];
|
|
117
|
+
};
|
|
77
118
|
googleLogin?: {
|
|
78
119
|
enabled: boolean;
|
|
79
120
|
firebaseConfig: FBConfig;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ethora/chat-component",
|
|
3
|
-
"version": "26.
|
|
3
|
+
"version": "26.5.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "dist/main.js",
|
|
6
6
|
"types": "dist/main.d.ts",
|
|
@@ -35,7 +35,6 @@
|
|
|
35
35
|
"axios": "^1.10.0",
|
|
36
36
|
"emoji-mart": "^5.6.0",
|
|
37
37
|
"firebase": "^11.9.1",
|
|
38
|
-
"i": "^0.3.7",
|
|
39
38
|
"js-sha256": "^0.11.1",
|
|
40
39
|
"ltx": "^3.1.2",
|
|
41
40
|
"react": "^18.3.1",
|
|
@@ -48,7 +47,6 @@
|
|
|
48
47
|
"redux": "^5.0.1",
|
|
49
48
|
"redux-persist": "^6.0.0",
|
|
50
49
|
"redux-persist-transform-encrypt": "^5.1.1",
|
|
51
|
-
"redux-saga": "^1.3.0",
|
|
52
50
|
"rehype-raw": "^7.0.0",
|
|
53
51
|
"remark-gfm": "^4.0.1",
|
|
54
52
|
"styled-components": "^6.1.19",
|