@cometchat/chat-uikit-react 6.3.11 → 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.
@@ -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: 113 113;
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 113;
93
+ stroke-dasharray: 0 251.33;
94
94
  stroke-width: 2;
95
95
  fill: none;
96
96
  stroke-linecap: round;
@@ -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: 113 113;
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 113;
93
+ stroke-dasharray: 0 251.33;
94
94
  stroke-width: 2;
95
95
  fill: none;
96
96
  stroke-linecap: round;
@@ -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
  }
@@ -4,4 +4,5 @@ export declare const useCometChatImageBubble: ({ src, placeholderImage, }: {
4
4
  }) => {
5
5
  image: string;
6
6
  updateImage: () => void;
7
+ cleanup: () => void;
7
8
  };
@@ -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.11",
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,7 +8,7 @@
8
8
  "./css-variables.css": "./dist/styles/css-variables.css"
9
9
  },
10
10
  "dependencies": {
11
- "@cometchat/chat-sdk-javascript": "^4.1.6",
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",