@cometchat/chat-uikit-react 6.3.10 → 6.3.12
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 +98 -32
- package/dist/index.js +1 -9
- package/dist/index.js.map +1 -1
- package/dist/styles/CometChatFullScreenViewer.css +2 -2
- package/dist/styles/CometChatMessageComposer.css +5 -0
- package/dist/styles/components/CometChatFullScreenViewer.css +2 -2
- package/dist/styles/components/CometChatMessageComposer.css +5 -0
- package/dist/types/CometChatUIKit/UIKitSettings.d.ts +21 -0
- package/dist/types/components/BaseComponents/CometChatImageBubble/useCometChatImageBubble.d.ts +1 -0
- package/dist/types/components/BaseComponents/CometChatList/CometChatList.d.ts +12 -0
- package/dist/types/components/BaseComponents/CometChatList/useCometChatList.d.ts +1 -0
- package/dist/types/components/BaseComponents/CometChatMessageBubble/CometChatMessageBubble.d.ts +1 -0
- package/dist/types/components/CometChatGroupMembers/CometChatGroupMembers.d.ts +12 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/utils/useSecureMedia.d.ts +19 -0
- package/package.json +4 -4
|
@@ -82,7 +82,7 @@
|
|
|
82
82
|
|
|
83
83
|
circle.cometchat-fullscreen-viewer__body-download-progress-background {
|
|
84
84
|
stroke: var(--cometchat-static-white);
|
|
85
|
-
stroke-dasharray:
|
|
85
|
+
stroke-dasharray: 251.33 251.33;
|
|
86
86
|
stroke-width: 2;
|
|
87
87
|
fill: none;
|
|
88
88
|
opacity: .2;
|
|
@@ -90,7 +90,7 @@ circle.cometchat-fullscreen-viewer__body-download-progress-background {
|
|
|
90
90
|
|
|
91
91
|
circle.cometchat-fullscreen-viewer__body-download-progress-foreground {
|
|
92
92
|
stroke: var(--cometchat-static-white);
|
|
93
|
-
stroke-dasharray: 0
|
|
93
|
+
stroke-dasharray: 0 251.33;
|
|
94
94
|
stroke-width: 2;
|
|
95
95
|
fill: none;
|
|
96
96
|
stroke-linecap: round;
|
|
@@ -187,6 +187,11 @@
|
|
|
187
187
|
.cometchat-mention-list>.cometchat {
|
|
188
188
|
border-radius: inherit;
|
|
189
189
|
}
|
|
190
|
+
|
|
191
|
+
.cometchat-mention-list .cometchat-users .cometchat-list{
|
|
192
|
+
max-height: 336px;
|
|
193
|
+
}
|
|
194
|
+
|
|
190
195
|
.cometchat-mention-list .cometchat-list .cometchat-list__header-title{
|
|
191
196
|
display: none;
|
|
192
197
|
}
|
|
@@ -82,7 +82,7 @@
|
|
|
82
82
|
|
|
83
83
|
circle.cometchat-fullscreen-viewer__body-download-progress-background {
|
|
84
84
|
stroke: var(--cometchat-static-white);
|
|
85
|
-
stroke-dasharray:
|
|
85
|
+
stroke-dasharray: 251.33 251.33;
|
|
86
86
|
stroke-width: 2;
|
|
87
87
|
fill: none;
|
|
88
88
|
opacity: .2;
|
|
@@ -90,7 +90,7 @@ circle.cometchat-fullscreen-viewer__body-download-progress-background {
|
|
|
90
90
|
|
|
91
91
|
circle.cometchat-fullscreen-viewer__body-download-progress-foreground {
|
|
92
92
|
stroke: var(--cometchat-static-white);
|
|
93
|
-
stroke-dasharray: 0
|
|
93
|
+
stroke-dasharray: 0 251.33;
|
|
94
94
|
stroke-width: 2;
|
|
95
95
|
fill: none;
|
|
96
96
|
stroke-linecap: round;
|
|
@@ -187,6 +187,11 @@
|
|
|
187
187
|
.cometchat-mention-list>.cometchat {
|
|
188
188
|
border-radius: inherit;
|
|
189
189
|
}
|
|
190
|
+
|
|
191
|
+
.cometchat-mention-list .cometchat-users .cometchat-list{
|
|
192
|
+
max-height: 336px;
|
|
193
|
+
}
|
|
194
|
+
|
|
190
195
|
.cometchat-mention-list .cometchat-list .cometchat-list__header-title{
|
|
191
196
|
display: none;
|
|
192
197
|
}
|
|
@@ -79,6 +79,11 @@ export declare class UIKitSettings {
|
|
|
79
79
|
* @type {CometChat.StorageMode}
|
|
80
80
|
*/
|
|
81
81
|
readonly storageMode: CometChat.StorageMode;
|
|
82
|
+
/**
|
|
83
|
+
* Secure media mode for accessing protected media resources. Defaults to EMBEDDED if not set.
|
|
84
|
+
* @type {CometChat.SecureMediaMode}
|
|
85
|
+
*/
|
|
86
|
+
readonly secureMediaMode: CometChat.SecureMediaMode;
|
|
82
87
|
/**
|
|
83
88
|
* Private constructor to initialize the settings using the provided builder.
|
|
84
89
|
* @param {UIKitSettingsBuilder} builder - The builder instance containing the settings configuration.
|
|
@@ -145,6 +150,11 @@ export declare class UIKitSettings {
|
|
|
145
150
|
* @returns {CometChat.StorageMode} The storage mode.
|
|
146
151
|
*/
|
|
147
152
|
getStorageMode(): CometChat.StorageMode;
|
|
153
|
+
/**
|
|
154
|
+
* Retrieves the secure media mode.
|
|
155
|
+
* @returns {CometChat.SecureMediaMode} The secure media mode.
|
|
156
|
+
*/
|
|
157
|
+
getSecureMediaMode(): CometChat.SecureMediaMode;
|
|
148
158
|
}
|
|
149
159
|
export declare class UIKitSettingsBuilder {
|
|
150
160
|
/**
|
|
@@ -218,6 +228,11 @@ export declare class UIKitSettingsBuilder {
|
|
|
218
228
|
* @type {CometChat.StorageMode}
|
|
219
229
|
*/
|
|
220
230
|
storageMode?: CometChat.StorageMode;
|
|
231
|
+
/**
|
|
232
|
+
* Secure media mode for accessing protected media resources. Defaults to EMBEDDED if not set.
|
|
233
|
+
* @type {CometChat.SecureMediaMode}
|
|
234
|
+
*/
|
|
235
|
+
secureMediaMode?: CometChat.SecureMediaMode;
|
|
221
236
|
/**
|
|
222
237
|
* Builds and returns an instance of UIKitSettings.
|
|
223
238
|
* @returns {UIKitSettings} A new instance of UIKitSettings with the specified configuration.
|
|
@@ -300,4 +315,10 @@ export declare class UIKitSettingsBuilder {
|
|
|
300
315
|
* @returns {UIKitSettingsBuilder} The builder instance.
|
|
301
316
|
*/
|
|
302
317
|
setStorageMode(storageMode: CometChat.StorageMode): UIKitSettingsBuilder;
|
|
318
|
+
/**
|
|
319
|
+
* Sets the secure media mode for accessing protected media resources. Defaults to EMBEDDED.
|
|
320
|
+
* @param {CometChat.SecureMediaMode} secureMediaMode - The secure media mode.
|
|
321
|
+
* @returns {UIKitSettingsBuilder} The builder instance.
|
|
322
|
+
*/
|
|
323
|
+
setSecureMediaMode(secureMediaMode: CometChat.SecureMediaMode): UIKitSettingsBuilder;
|
|
303
324
|
}
|
|
@@ -147,6 +147,18 @@ interface ListProps<T> {
|
|
|
147
147
|
*
|
|
148
148
|
*/
|
|
149
149
|
scrollToEnd?: boolean;
|
|
150
|
+
/**
|
|
151
|
+
* @internal
|
|
152
|
+
*
|
|
153
|
+
* Skips the scroll height check when triggering onScrolledToBottom callback in CometChatList.
|
|
154
|
+
* When true, the callback fires even if the list content fits within the list body container.
|
|
155
|
+
* Uses the screen/viewport as the intersection root instead of the list body,
|
|
156
|
+
* so the callback triggers when the bottom of the list becomes visible on screen.
|
|
157
|
+
* Useful when the list is embedded in a parent scrollable container.
|
|
158
|
+
*
|
|
159
|
+
* @defaultValue `false`
|
|
160
|
+
*/
|
|
161
|
+
observeScrollFromViewport?: boolean;
|
|
150
162
|
}
|
|
151
163
|
/**
|
|
152
164
|
* Renders a list component that can display a title, search bar,
|
|
@@ -12,6 +12,7 @@ type Args = {
|
|
|
12
12
|
didTopObserverCallbackRunRef: React.MutableRefObject<boolean>;
|
|
13
13
|
errorHandler: (error: unknown) => void;
|
|
14
14
|
scrolledUpCallback?: (boolean?: boolean) => void;
|
|
15
|
+
observeScrollFromViewport?: boolean;
|
|
15
16
|
};
|
|
16
17
|
export declare function useCometChatList(args: Args): void;
|
|
17
18
|
export {};
|
|
@@ -161,6 +161,18 @@ interface GroupMembersProps {
|
|
|
161
161
|
* @defaultValue `false`
|
|
162
162
|
*/
|
|
163
163
|
showScrollbar?: boolean;
|
|
164
|
+
/**
|
|
165
|
+
* @internal
|
|
166
|
+
*
|
|
167
|
+
* Skips the scroll height check when triggering onScrolledToBottom callback in CometChatList.
|
|
168
|
+
* When true, the callback fires even if the list content fits within the list body container.
|
|
169
|
+
* Uses the screen/viewport as the intersection root instead of the list body,
|
|
170
|
+
* so the callback triggers when the bottom of the list becomes visible on screen.
|
|
171
|
+
* Useful when the list is embedded in a parent scrollable container.
|
|
172
|
+
*
|
|
173
|
+
* @defaultValue `false`
|
|
174
|
+
*/
|
|
175
|
+
observeScrollFromViewport?: boolean;
|
|
164
176
|
}
|
|
165
177
|
export type Action = {
|
|
166
178
|
type: "appendGroupMembers";
|
package/dist/types/index.d.ts
CHANGED
|
@@ -123,3 +123,4 @@ export { CometChatAIAssistantTools } from './modals/CometChatAIAssistantTools';
|
|
|
123
123
|
export { CometChatStreamMessageBubble } from './components/BaseComponents/CometChatStreamMessageBubble/CometChatStreamMessageBubble';
|
|
124
124
|
export { CometChatAIAssistantMessageBubble } from './components/BaseComponents/CometChatAIAssistantMessageBubble/CometChatAIAssistantMessageBubble';
|
|
125
125
|
export { CometChatAIAssistantChatHistory } from './components/CometChatAIAssistantChatHistory/CometChatAIAssistantChatHistory';
|
|
126
|
+
export { useSecureMedia, resolveSecureUrl, requiresSecureMediaAccess } from './utils/useSecureMedia';
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export interface UseSecureMediaResult {
|
|
2
|
+
resolvedUrl: string | null;
|
|
3
|
+
isLoading: boolean;
|
|
4
|
+
error: Error | null;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* Checks whether the given URL requires secure presigned access.
|
|
8
|
+
*/
|
|
9
|
+
export declare function requiresSecureMediaAccess(url: string): boolean;
|
|
10
|
+
/**
|
|
11
|
+
* Resolves a media URL to a presigned URL if secure access is required, else returns as-is.
|
|
12
|
+
* For imperative/non-hook contexts (downloads, WaveSurfer load, etc.).
|
|
13
|
+
*/
|
|
14
|
+
export declare function resolveSecureUrl(url: string): Promise<string>;
|
|
15
|
+
/**
|
|
16
|
+
* React hook that resolves a media URL to a presigned URL if secure access is required.
|
|
17
|
+
* Handles cancellation on unmount/url change.
|
|
18
|
+
*/
|
|
19
|
+
export declare function useSecureMedia(url: string | null): UseSecureMediaResult;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cometchat/chat-uikit-react",
|
|
3
|
-
"version": "6.3.
|
|
3
|
+
"version": "6.3.12",
|
|
4
4
|
"description": "Ready-to-use Chat UI Components for React(Javascript/Web)",
|
|
5
5
|
"author": "CometChat",
|
|
6
6
|
"exports": {
|
|
@@ -8,12 +8,12 @@
|
|
|
8
8
|
"./css-variables.css": "./dist/styles/css-variables.css"
|
|
9
9
|
},
|
|
10
10
|
"dependencies": {
|
|
11
|
-
"@cometchat/chat-sdk-javascript": "^4.1.
|
|
11
|
+
"@cometchat/chat-sdk-javascript": "^4.1.7",
|
|
12
12
|
"@rollup/plugin-json": "^6.1.0",
|
|
13
13
|
"rxjs": "^7.8.1",
|
|
14
14
|
"react-markdown": "^10.1.0",
|
|
15
15
|
"@types/react-syntax-highlighter": "^15.5.13",
|
|
16
|
-
"react-syntax-highlighter": "^
|
|
16
|
+
"react-syntax-highlighter": "^16.1.0",
|
|
17
17
|
"remark-gfm": "^4.0.1"
|
|
18
18
|
},
|
|
19
19
|
"scripts": {
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"typescript": "^5.0.4",
|
|
47
47
|
"webpack": "^5.68.0",
|
|
48
48
|
"webpack-cli": "^4.9.2",
|
|
49
|
-
"webpack-dev-server": "^
|
|
49
|
+
"webpack-dev-server": "^5.2.3"
|
|
50
50
|
},
|
|
51
51
|
"peerDependencies": {
|
|
52
52
|
"@types/react": ">=18.0.0 <20.0.0",
|