@ethora/chat-component 26.10.5 → 26.10.6

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/main.js CHANGED
@@ -1,4 +1,4 @@
1
- import { bs as a, bt as r, bu as b, bv as o, bw as t, bx as u, by as i, bz as p, bA as h, bB as n, bC as d, i as l, bD as y, S as I, bE as T, bF as f, bG as m, bH as R, bI as g, bJ as c, bK as C, bL as A, bM as E, aq as F, ar as M, bN as Q, bO as k } from "./main-Cdwk7Rjj.js";
1
+ import { bs as a, bt as r, bu as b, bv as o, bw as t, bx as u, by as i, bz as p, bA as h, bB as n, bC as d, i as l, bD as y, S as I, bE as T, bF as f, bG as m, bH as R, bI as g, bJ as c, bK as C, bL as A, bM as E, aq as F, ar as M, bN as Q, bO as k } from "./main-36gqdbJ8.js";
2
2
  export {
3
3
  a as AuthTestIds,
4
4
  r as Chat,
@@ -215,6 +215,27 @@ export interface IConfig {
215
215
  maxFileSizeMb?: number;
216
216
  /** `accept` attribute handed to the file picker. Omit to allow anything. */
217
217
  accept?: string;
218
+ /**
219
+ * Where the text typed with the files goes. Default `'separate'`: the media
220
+ * message is sent without the caption, and the caption follows as a normal
221
+ * text message once the media send settles (the same wire shape as 26.9.8,
222
+ * so readers that do not know `<data caption>` still show it). `'inline'`
223
+ * carries the caption on the media message itself (`<data caption>`,
224
+ * `captionMentions`), one message per send, but readers that predate it
225
+ * (older web builds, React Native, server push) show no text for it.
226
+ */
227
+ captionMode?: 'inline' | 'separate';
228
+ };
229
+ /**
230
+ * Which upload route chat attachments use. Default `'auto'`: try
231
+ * `POST /v2/files/secure` and fall back to `POST /v1/files/` if the backend
232
+ * rejects it. `'legacy'` posts straight to `/v1/files/` and never calls the
233
+ * secure route; use it on a backend whose secure-files URLs cannot be read
234
+ * yet. `'secure'` uses the secure route only and reports its errors without
235
+ * falling back.
236
+ */
237
+ uploads?: {
238
+ endpoint?: 'auto' | 'secure' | 'legacy';
218
239
  };
219
240
  /** First-page PDF thumbnails inside message bubbles. */
220
241
  pdfPreview?: {
@@ -368,6 +389,20 @@ export interface IConfig {
368
389
  * the backend predates the /v1/chats/blocked route).
369
390
  */
370
391
  disableUserBlock?: boolean;
392
+ /**
393
+ * Opt-in backend features. Each flag turns on client code that calls a route
394
+ * not every backend deployment serves yet, so the default keeps the control
395
+ * hidden rather than showing an action that fails.
396
+ */
397
+ features?: {
398
+ /**
399
+ * Show the "Block user" item in a 1-1 chat's menu and enable the
400
+ * /v1/chats/blocked calls behind it. Default false: the production backend
401
+ * does not serve that route yet. `disableUserBlock: true` still hides the
402
+ * item when this is true.
403
+ */
404
+ userBlock?: boolean;
405
+ };
371
406
  defaultRooms?: ConfigRoom[];
372
407
  /**
373
408
  * The "Files" tab shown in the sidebar alongside "Chats". Backed by
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ethora/chat-component",
3
- "version": "26.10.5",
3
+ "version": "26.10.6",
4
4
  "type": "module",
5
5
  "main": "dist/main.js",
6
6
  "types": "dist/main.d.ts",