@ethora/chat-component 26.9.8 → 26.10.3

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.
Files changed (140) hide show
  1. package/README.md +2 -1
  2. package/dist/{ChatProfileModal-3UH0H5Ec.js → ChatProfileModal-D73ioMj9.js} +44 -44
  3. package/dist/FilePreviewModal-BeGa8s4u.js +1763 -0
  4. package/dist/{ManageDataModal-BblTuE9g.js → ManageDataModal-DxhvKwLo.js} +17 -17
  5. package/dist/{MarkdownBody-RMEx8yW2.js → MarkdownBody-fzjy9KUP.js} +1 -1
  6. package/dist/{MessageSearchModal-CrYR2EH8.js → MessageSearchModal-3I0b3Nut.js} +40 -40
  7. package/dist/{PublicChatsModal-Bi5r4mrV.js → PublicChatsModal-Dzwl63q-.js} +19 -19
  8. package/dist/{SideDrawer-CDAoobvX.js → SideDrawer-BPebE2tZ.js} +37 -37
  9. package/dist/{UserProfileModal-4Frgvam-.js → UserProfileModal-BS5FZdJb.js} +10 -10
  10. package/dist/{UserSettingsModal-C-mb-9cb.js → UserSettingsModal-pBqmF_r2.js} +5 -5
  11. package/dist/{VideoCallOverlay-92dFLb9U.js → VideoCallOverlay-PIg8Z5Xr.js} +3824 -3708
  12. package/dist/{VisibilityModal-zIAV6dAP.js → VisibilityModal-CnBRSRQ9.js} +11 -11
  13. package/dist/api.config.d.ts +0 -23
  14. package/dist/assets/icons.d.ts +2 -3
  15. package/dist/components/ContextMenu/ContextMenuComponents.d.ts +24 -8
  16. package/dist/components/ExampleComponents/CustomMessage.d.ts +27 -9
  17. package/dist/components/Files/fileCategory.d.ts +4 -2
  18. package/dist/components/MainComponents/AlbumGrid.d.ts +22 -0
  19. package/dist/components/MainComponents/AttachmentList.d.ts +6 -6
  20. package/dist/components/MainComponents/ChooseChatMessage.d.ts +12 -4
  21. package/dist/components/MainComponents/EditWrapper.d.ts +12 -4
  22. package/dist/components/MainComponents/ImageUnavailable.d.ts +21 -0
  23. package/dist/components/MainComponents/MediaUploadOverlay.d.ts +31 -0
  24. package/dist/components/MainComponents/MessageContainer.d.ts +3 -0
  25. package/dist/components/MainComponents/MessageList.d.ts +2 -1
  26. package/dist/components/MainComponents/SystemMessage.d.ts +3 -1
  27. package/dist/components/MessageBubble/CustomDivider.d.ts +3 -1
  28. package/dist/components/MessageBubble/MediaCaption.d.ts +9 -0
  29. package/dist/components/MessageBubble/MessageAvatarPhoto.d.ts +17 -0
  30. package/dist/components/MessageBubble/MessageReaction.d.ts +6 -0
  31. package/dist/components/MessageBubble/MessageReply.d.ts +3 -1
  32. package/dist/components/MessageBubble/QuickReplies.d.ts +2 -0
  33. package/dist/components/Modals/FilePreviewModal/FilePreviewModal.d.ts +8 -10
  34. package/dist/components/Modals/FilePreviewModal/ImageLightbox.d.ts +4 -0
  35. package/dist/components/Modals/FilePreviewModal/PdfView.d.ts +4 -0
  36. package/dist/components/Modals/FilePreviewModal/ViewerChrome.d.ts +100 -0
  37. package/dist/components/Modals/MessageSearchModal/MessageHitResults.d.ts +3 -1
  38. package/dist/components/Modals/ModalReportChat/ModalReportChat.d.ts +3 -1
  39. package/dist/components/Modals/NewChatModal/styledNewChatComponents.d.ts +15 -5
  40. package/dist/components/Modals/SettingsModals/SharedStyledComponents.d.ts +27 -15
  41. package/dist/components/Modals/SettingsModals/Visibility/StyledComponents.d.ts +18 -6
  42. package/dist/components/Modals/SideDrawer/DrawerProfileParts.d.ts +27 -9
  43. package/dist/components/Modals/SideDrawer/SideDrawer.d.ts +39 -13
  44. package/dist/components/Modals/motionVariants.d.ts +8 -10
  45. package/dist/components/Modals/styledModalComponents.d.ts +53 -25
  46. package/dist/components/Notification/index.d.ts +3 -1
  47. package/dist/components/RoomComponents/LastMessageItem.d.ts +2 -0
  48. package/dist/components/RoomComponents/styled/LastMessageMedia.d.ts +19 -0
  49. package/dist/components/RoomComponents/styled/LastTextMessage.d.ts +2 -2
  50. package/dist/components/RoomComponents/styled/StyledRoomComponents.d.ts +29 -8
  51. package/dist/components/UsersList/StyledComponents.d.ts +18 -6
  52. package/dist/components/VideoCalls/VideoCallSession.d.ts +13 -0
  53. package/dist/components/styled/ChatWrapperBox.d.ts +9 -2
  54. package/dist/components/styled/DateLabel.d.ts +3 -1
  55. package/dist/components/styled/FileCard.d.ts +20 -0
  56. package/dist/components/styled/Loader.d.ts +3 -1
  57. package/dist/components/styled/MediaModal.d.ts +6 -2
  58. package/dist/components/styled/MediaSurface.d.ts +56 -0
  59. package/dist/components/styled/MessageImage.d.ts +9 -10
  60. package/dist/components/styled/NewMessageLabel.d.ts +3 -1
  61. package/dist/components/styled/RoomListComponents/index.d.ts +66 -22
  62. package/dist/components/styled/SendInput.d.ts +12 -2
  63. package/dist/components/styled/StyledComponents.d.ts +199 -41
  64. package/dist/components/styled/StyledInputComponents/MediaComponents.d.ts +78 -24
  65. package/dist/components/styled/StyledInputComponents/StyledInputComponents.d.ts +60 -22
  66. package/dist/components/styled/StyledInputComponents/VideoComponents.d.ts +18 -6
  67. package/dist/components/styled/TreadLabel.d.ts +3 -1
  68. package/dist/components/styled/UnsupportedType.d.ts +1 -0
  69. package/dist/components/styled/VideoMessage.d.ts +13 -6
  70. package/dist/e2ee/callKey.d.ts +32 -0
  71. package/dist/e2ee/fileEnvelope.d.ts +16 -5
  72. package/dist/e2ee/omemo.d.ts +18 -0
  73. package/dist/firebase-messaging-sw.js +20 -3
  74. package/dist/{handleCopyClick-BtXos0AJ.js → handleCopyClick-vPvh9hOU.js} +1 -1
  75. package/dist/helpers/albumLayout.d.ts +53 -0
  76. package/dist/helpers/attachments.d.ts +22 -1
  77. package/dist/helpers/avatarImageCache.d.ts +9 -0
  78. package/dist/helpers/caption.d.ts +63 -0
  79. package/dist/helpers/composerFocus.d.ts +22 -0
  80. package/dist/helpers/createMainMessageForThread.d.ts +1 -1
  81. package/dist/helpers/downloadFile.d.ts +19 -0
  82. package/dist/helpers/fileKind.d.ts +17 -0
  83. package/dist/helpers/lastMessagePreview.d.ts +55 -0
  84. package/dist/helpers/mapWithConcurrency.d.ts +8 -0
  85. package/dist/helpers/mediaBox.d.ts +110 -0
  86. package/dist/helpers/mediaBubble.d.ts +67 -0
  87. package/dist/helpers/mediaLabel.d.ts +10 -0
  88. package/dist/helpers/mediaSendRetry.d.ts +25 -0
  89. package/dist/helpers/messageRuns.d.ts +10 -0
  90. package/dist/helpers/receiptState.d.ts +48 -0
  91. package/dist/helpers/repairFilenameEncoding.d.ts +11 -0
  92. package/dist/helpers/roomImageGallery.d.ts +34 -0
  93. package/dist/helpers/safeUrl.d.ts +15 -0
  94. package/dist/helpers/secureFileUrl.d.ts +4 -1
  95. package/dist/helpers/textareaFit.d.ts +31 -0
  96. package/dist/helpers/timestamp.d.ts +7 -0
  97. package/dist/helpers/userEntry.d.ts +14 -0
  98. package/dist/helpers/viewerSender.d.ts +47 -0
  99. package/dist/hooks/useAvatarImage.d.ts +21 -0
  100. package/dist/hooks/useIsMobileViewport.d.ts +5 -0
  101. package/dist/hooks/useMediaProbe.d.ts +41 -0
  102. package/dist/hooks/usePaneWidthVar.d.ts +11 -0
  103. package/dist/hooks/usePdfThumbnail.d.ts +0 -1
  104. package/dist/hooks/usePrefersReducedMotion.d.ts +2 -0
  105. package/dist/hooks/useRoomInitialization.d.ts +2 -2
  106. package/dist/hooks/useRoomUrl.d.ts +2 -2
  107. package/dist/hooks/useSendMessage.d.ts +4 -1
  108. package/dist/{main-BnLtessp.js → main-CghdNDlB.js} +20803 -16260
  109. package/dist/main.js +10 -10
  110. package/dist/networking/api-requests/auth.api.d.ts +13 -5
  111. package/dist/networking/api-requests/user.api.d.ts +4 -4
  112. package/dist/networking/callKeyStanza.d.ts +7 -0
  113. package/dist/networking/deliveryReceiptBatcher.d.ts +53 -0
  114. package/dist/networking/displayedMarkerThrottle.d.ts +29 -0
  115. package/dist/networking/receiptsPolicy.d.ts +32 -0
  116. package/dist/networking/stanzaHandlers.d.ts +4 -2
  117. package/dist/networking/xmpp/sendDisplayedMarker.xmpp.d.ts +2 -0
  118. package/dist/networking/xmpp/sendMediaMessage.xmpp.d.ts +8 -0
  119. package/dist/networking/xmpp/sendReceivedReceipt.xmpp.d.ts +2 -0
  120. package/dist/networking/xmppClient.d.ts +5 -0
  121. package/dist/roomStore/callSlice.d.ts +6 -1
  122. package/dist/roomStore/index.d.ts +10 -0
  123. package/dist/roomStore/roomsSlice.d.ts +22 -3
  124. package/dist/styles/motion.d.ts +22 -2
  125. package/dist/types/models/attachment.model.d.ts +19 -0
  126. package/dist/types/models/config.model.d.ts +56 -2
  127. package/dist/types/models/customComponents.model.d.ts +2 -0
  128. package/dist/types/models/message.model.d.ts +9 -0
  129. package/dist/types/models/modal.model.d.ts +19 -0
  130. package/dist/types/models/room.model.d.ts +17 -0
  131. package/dist/types/models/xmpp.model.d.ts +3 -0
  132. package/dist/utils/messageNotificationContent.d.ts +34 -0
  133. package/dist/version.d.ts +1 -1
  134. package/package.json +8 -7
  135. package/public/firebase-messaging-sw.js +20 -3
  136. package/dist/FilePreviewModal-Cgj1iHry.js +0 -743
  137. package/dist/components/RoomComponents/styled/LastAudioMessage.d.ts +0 -6
  138. package/dist/components/RoomComponents/styled/LastMessageFile.d.ts +0 -6
  139. package/dist/components/RoomComponents/styled/LastMessagePhoto.d.ts +0 -6
  140. package/dist/components/RoomComponents/styled/LastMessageVideo.d.ts +0 -6
@@ -1,7 +1,7 @@
1
1
  import { jsxs as r, jsx as s } from "react/jsx-runtime";
2
2
  import { useState as b, useEffect as x } from "react";
3
- import { x as o, a as L, p as N, u as P, aM as D, aN as z } from "./main-BnLtessp.js";
4
- import { S as I, D as C, a as $, b as k, e as w, f as p } from "./SideDrawer-CDAoobvX.js";
3
+ import { E as o, a as L, x as P, u as R, aR as D, aS as z } from "./main-CghdNDlB.js";
4
+ import { S as I, D as C, a as $, b as k, e as S, f as p } from "./SideDrawer-BPebE2tZ.js";
5
5
  o.div``;
6
6
  o.div`
7
7
  font-size: 16px;
@@ -13,7 +13,7 @@ o.p`
13
13
  color: var(--ethora-color-text-muted, #6b7280);
14
14
  margin-bottom: 32px;
15
15
  `;
16
- const O = o.div`
16
+ const w = o.div`
17
17
  display: flex;
18
18
  flex-direction: column;
19
19
  gap: 6px;
@@ -25,7 +25,7 @@ const O = o.div`
25
25
  `, u = o.input`
26
26
  accent-color: ${({ $radioColor: i }) => i || "var(--ethora-color-primary, #0052CD)"};
27
27
  margin: 0px;
28
- `, M = o.div`
28
+ `, N = o.div`
29
29
  padding: 10px 15px;
30
30
  margin-top: 16px;
31
31
  color: ${({ type: i }) => i === "success" ? "#10b981" : "#ef4444"};
@@ -39,12 +39,12 @@ const O = o.div`
39
39
  background: ${({ type: i }) => i === "success" ? "rgba(16, 185, 129, 0.15)" : "rgba(242, 118, 107, 0.15)"};
40
40
  border-color: ${({ type: i }) => i === "success" ? "var(--ethora-color-success, #10b981)" : "var(--ethora-color-danger, #ef4444)"};
41
41
  }
42
- `, B = ({
42
+ `, M = ({
43
43
  handleCloseModal: i
44
44
  }) => {
45
- const S = L(), e = N(), { user: n, config: l } = P(
45
+ const O = L(), e = P(), { user: n, config: l } = R(
46
46
  (t) => t.chatSettingStore
47
- ), g = (t) => S(z(t)), [a, m] = b(n?.isProfileOpen), [c, v] = b(n?.isAssetsOpen), [f, y] = b(null), d = (t, A) => {
47
+ ), g = (t) => O(z(t)), [a, m] = b(n?.isProfileOpen), [c, v] = b(n?.isAssetsOpen), [f, y] = b(null), d = (t, A) => {
48
48
  y({ message: t, type: A }), setTimeout(() => y(null), 3e3);
49
49
  };
50
50
  return x(() => {
@@ -64,7 +64,7 @@ const O = o.div`
64
64
  children: [
65
65
  /* @__PURE__ */ r(C, { children: [
66
66
  /* @__PURE__ */ s($, { children: e("settings.visibility.profileLabel") }),
67
- /* @__PURE__ */ s(k, { children: /* @__PURE__ */ s(w, { children: /* @__PURE__ */ r(O, { children: [
67
+ /* @__PURE__ */ s(k, { children: /* @__PURE__ */ s(S, { children: /* @__PURE__ */ r(w, { children: [
68
68
  /* @__PURE__ */ r(h, { children: [
69
69
  /* @__PURE__ */ s(
70
70
  u,
@@ -97,7 +97,7 @@ const O = o.div`
97
97
  ] }),
98
98
  /* @__PURE__ */ r(C, { children: [
99
99
  /* @__PURE__ */ s($, { children: e("settings.visibility.documentsLabel") }),
100
- /* @__PURE__ */ s(k, { children: /* @__PURE__ */ s(w, { children: /* @__PURE__ */ r(O, { children: [
100
+ /* @__PURE__ */ s(k, { children: /* @__PURE__ */ s(S, { children: /* @__PURE__ */ r(w, { children: [
101
101
  /* @__PURE__ */ r(h, { children: [
102
102
  /* @__PURE__ */ s(
103
103
  u,
@@ -128,11 +128,11 @@ const O = o.div`
128
128
  /* @__PURE__ */ s(p, { children: e("settings.visibility.individualDescription") })
129
129
  ] }) }) })
130
130
  ] }),
131
- f && /* @__PURE__ */ s(M, { type: f.type, children: f.message })
131
+ f && /* @__PURE__ */ s(N, { type: f.type, children: f.message })
132
132
  ]
133
133
  }
134
134
  );
135
135
  };
136
136
  export {
137
- B as default
137
+ M as default
138
138
  };
@@ -1,27 +1,4 @@
1
1
  export declare const appToken = "JWT eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJkYXRhIjp7ImlzVXNlckRhdGFFbmNyeXB0ZWQiOmZhbHNlLCJwYXJlbnRBcHBJZCI6bnVsbCwiaXNBbGxvd2VkTmV3QXBwQ3JlYXRlIjp0cnVlLCJpc0Jhc2VBcHAiOnRydWUsIl9pZCI6IjY0NmNjOGRjOTZkNGE0ZGM4ZjdiMmYyZCIsImRpc3BsYXlOYW1lIjoiRXRob3JhIiwiZG9tYWluTmFtZSI6ImV0aG9yYSIsImNyZWF0b3JJZCI6IjY0NmNjOGQzOTZkNGE0ZGM4ZjdiMmYyNSIsInVzZXJzQ2FuRnJlZSI6dHJ1ZSwiZGVmYXVsdEFjY2Vzc0Fzc2V0c09wZW4iOnRydWUsImRlZmF1bHRBY2Nlc3NQcm9maWxlT3BlbiI6dHJ1ZSwiYnVuZGxlSWQiOiJjb20uZXRob3JhIiwicHJpbWFyeUNvbG9yIjoiIzAwM0U5QyIsInNlY29uZGFyeUNvbG9yIjoiIzI3NzVFQSIsImNvaW5TeW1ib2wiOiJFVE8iLCJjb2luTmFtZSI6IkV0aG9yYSBDb2luIiwiUkVBQ1RfQVBQX0ZJUkVCQVNFX0FQSV9LRVkiOiJBSXphU3lEUWRrdnZ4S0t4NC1XcmpMUW9ZZjA4R0ZBUmdpX3FPNGciLCJSRUFDVF9BUFBfRklSRUJBU0VfQVVUSF9ET01BSU4iOiJldGhvcmEtNjY4ZTkuZmlyZWJhc2VhcHAuY29tIiwiUkVBQ1RfQVBQX0ZJUkVCQVNFX1BST0pFQ1RfSUQiOiJldGhvcmEtNjY4ZTkiLCJSRUFDVF9BUFBfRklSRUJBU0VfU1RPUkFHRV9CVUNLRVQiOiJldGhvcmEtNjY4ZTkuYXBwc3BvdC5jb20iLCJSRUFDVF9BUFBfRklSRUJBU0VfTUVTU0FHSU5HX1NFTkRFUl9JRCI6Ijk3MjkzMzQ3MDA1NCIsIlJFQUNUX0FQUF9GSVJFQkFTRV9BUFBfSUQiOiIxOjk3MjkzMzQ3MDA1NDp3ZWI6ZDQ2ODJlNzZlZjAyZmQ5YjljZGFhNyIsIlJFQUNUX0FQUF9GSVJFQkFTRV9NRUFTVVJNRU5UX0lEIjoiRy1XSE03WFJaNEM4IiwiUkVBQ1RfQVBQX1NUUklQRV9QVUJMSVNIQUJMRV9LRVkiOiIiLCJSRUFDVF9BUFBfU1RSSVBFX1NFQ1JFVF9LRVkiOiIiLCJjcmVhdGVkQXQiOiIyMDIzLTA1LTIzVDE0OjA4OjI4LjEzNloiLCJ1cGRhdGVkQXQiOiIyMDIzLTA1LTIzVDE0OjA4OjI4LjEzNloiLCJfX3YiOjB9LCJpYXQiOjE2ODQ4NTA5MjV9.-IqNVMsf8GyS9Z-_yuNW7hpSmejajjAy-W0J8TadRIM";
2
- export declare const defaultUser: {
3
- _id: string;
4
- firstName: string;
5
- lastName: string;
6
- xmppPassword: string;
7
- walletAddress: string;
8
- token: string;
9
- refreshToken: string;
10
- profileImage: string;
11
- isProfileOpen: boolean;
12
- isAssetsOpen: boolean;
13
- referrerId: string;
14
- isAllowedNewAppCreate: boolean;
15
- isAgreeWithTerms: boolean;
16
- company: any[];
17
- appId: string;
18
- homeScreen: string;
19
- defaultWallet: {
20
- walletAddress: string;
21
- };
22
- email: string;
23
- username: string;
24
- };
25
2
  export declare const defRoom: {
26
3
  jid: string;
27
4
  };
@@ -148,10 +148,9 @@ export declare const InSendingIcon: ({ fill, color, ...props }: {
148
148
  fill?: string;
149
149
  color?: string;
150
150
  }) => import("react/jsx-runtime").JSX.Element;
151
- export declare const DoubleTick: ({ fill, color, ...props }: {
151
+ export declare const DoubleTick: ({ stroke, ...props }: {
152
152
  [x: string]: any;
153
- fill?: string;
154
- color?: string;
153
+ stroke?: string;
155
154
  }) => import("react/jsx-runtime").JSX.Element;
156
155
  export declare const RedCross: ({ color, ...props }: {
157
156
  [x: string]: any;
@@ -1,10 +1,26 @@
1
- export declare const ContainerInteractions: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
2
- export declare const ReactionContainer: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
3
- export declare const ReactionBadge: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, never>> & string;
4
- export declare const ArrowButton: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
1
+ export declare const ContainerInteractions: import('styled-components/dist/types').IStyledComponentBase<"web", Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "style"> & {
2
+ style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
3
+ }> & string;
4
+ export declare const ReactionContainer: import('styled-components/dist/types').IStyledComponentBase<"web", Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "style"> & {
5
+ style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
6
+ }> & string;
7
+ export declare const ReactionBadge: import('styled-components/dist/types').IStyledComponentBase<"web", Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "style"> & {
8
+ style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
9
+ }> & string;
10
+ export declare const ArrowButton: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Merged<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "style"> & {
11
+ style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
12
+ }, {
5
13
  $isRotated: boolean;
6
14
  }>> & string;
7
- export declare const ContextMenu: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
8
- export declare const MenuItem: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
9
- export declare const Overlay: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
10
- export declare const Delimeter: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
15
+ export declare const ContextMenu: import('styled-components/dist/types').IStyledComponentBase<"web", Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "style"> & {
16
+ style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
17
+ }> & string;
18
+ export declare const MenuItem: import('styled-components/dist/types').IStyledComponentBase<"web", Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "style"> & {
19
+ style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
20
+ }> & string;
21
+ export declare const Overlay: import('styled-components/dist/types').IStyledComponentBase<"web", Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "style"> & {
22
+ style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
23
+ }> & string;
24
+ export declare const Delimeter: import('styled-components/dist/types').IStyledComponentBase<"web", Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "style"> & {
25
+ style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
26
+ }> & string;
@@ -1,20 +1,38 @@
1
1
  import { default as React } from 'react';
2
2
  import { MessageProps } from '../../types/types';
3
- export declare const MessageContainer: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
3
+ export declare const MessageContainer: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Merged<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "style"> & {
4
+ style?: React.CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
5
+ }, {
4
6
  $isUser: boolean;
5
7
  }>> & string;
6
- export declare const MessageBubble: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
8
+ export declare const MessageBubble: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Merged<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "style"> & {
9
+ style?: React.CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
10
+ }, {
7
11
  $isUser: boolean;
8
12
  }>> & string;
9
- export declare const MessageText: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, never>> & string;
10
- export declare const UserName: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {
13
+ export declare const MessageText: import('styled-components/dist/types').IStyledComponentBase<"web", Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, "style"> & {
14
+ style?: React.CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
15
+ }> & string;
16
+ export declare const UserName: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Merged<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "style"> & {
17
+ style?: React.CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
18
+ }, {
11
19
  $isUser: boolean;
12
20
  color?: string;
13
21
  }>> & string;
14
- export declare const MessageTimestamp: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, never>> & string;
15
- export declare const MessagePhoto: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<React.DetailedHTMLProps<React.ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>, never>> & string;
16
- export declare const MessagePhotoContainer: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
17
- export declare const SystemMessage: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
18
- export declare const SystemMessageText: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, never>> & string;
22
+ export declare const MessageTimestamp: import('styled-components/dist/types').IStyledComponentBase<"web", Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "style"> & {
23
+ style?: React.CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
24
+ }> & string;
25
+ export declare const MessagePhoto: import('styled-components/dist/types').IStyledComponentBase<"web", Omit<React.DetailedHTMLProps<React.ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>, "style"> & {
26
+ style?: React.CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
27
+ }> & string;
28
+ export declare const MessagePhotoContainer: import('styled-components/dist/types').IStyledComponentBase<"web", Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "style"> & {
29
+ style?: React.CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
30
+ }> & string;
31
+ export declare const SystemMessage: import('styled-components/dist/types').IStyledComponentBase<"web", Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "style"> & {
32
+ style?: React.CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
33
+ }> & string;
34
+ export declare const SystemMessageText: import('styled-components/dist/types').IStyledComponentBase<"web", Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, "style"> & {
35
+ style?: React.CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
36
+ }> & string;
19
37
  declare const CustomMessageExample: React.ForwardRefExoticComponent<MessageProps & React.RefAttributes<HTMLDivElement>>;
20
38
  export default CustomMessageExample;
@@ -7,7 +7,9 @@ export type FileCategory = 'media' | 'documents' | 'audio';
7
7
  * with thumbnails); audio/* gets its own chip; everything else falls back
8
8
  * to "Documents".
9
9
  */
10
- export declare function getFileCategory(mimetype?: string | null): FileCategory;
11
- export declare function isPreviewable(file: Pick<ApiFile, 'mimetype'>): boolean;
10
+ export declare function getFileCategory(mimetype?: string | null, name?: string | null): FileCategory;
11
+ export declare function isPreviewable(file: Pick<ApiFile, 'mimetype'> & {
12
+ originalname?: string;
13
+ }): boolean;
12
14
  /** Human-readable byte size, e.g. formatBytes(1536) -> "1.5 KB". */
13
15
  export declare function formatBytes(bytes?: number | null): string;
@@ -0,0 +1,22 @@
1
+ import { default as React } from 'react';
2
+ import { IAttachment, ModalFile } from '../../types/types';
3
+ export interface AlbumGridItem {
4
+ attachment: IAttachment;
5
+ /** Position in the message's `attachments`, used for retry. */
6
+ index: number;
7
+ }
8
+ interface AlbumGridProps {
9
+ items: AlbumGridItem[];
10
+ /** Called with the failed tile's index when the user asks to retry it. */
11
+ onRetry?: (index: number) => void;
12
+ /** Who posted the album and when, handed to the viewer header. */
13
+ sender?: ModalFile['sender'];
14
+ date?: string;
15
+ }
16
+ /**
17
+ * Photo/video album for a message with several media files. Layout comes
18
+ * from getAlbumLayout; a tile tap opens that file in the preview modal, and
19
+ * a tile still in flight or failed shows its state over the thumbnail.
20
+ */
21
+ declare const AlbumGrid: React.FC<AlbumGridProps>;
22
+ export default AlbumGrid;
@@ -1,12 +1,12 @@
1
1
  import { default as React } from 'react';
2
- import { IAttachment } from '../../types/types';
2
+ import { IAttachment, ModalFile } from '../../types/types';
3
3
  interface AttachmentListProps {
4
4
  attachments: IAttachment[];
5
- /** See CustomMessageImage's `onUnavailable` - only wired to the full-width
6
- * single-image renderer (AttachmentRow), not the multi-file grid tiles,
7
- * since one dead thumbnail there shouldn't tombstone a message that still
8
- * has other live attachments. */
9
- onUnavailable?: () => void;
5
+ /** Re-sends the file at this index of `attachments` after a failed upload. */
6
+ onRetryAttachment?: (index: number) => void;
7
+ /** Who posted the message and when; the viewer header shows both. */
8
+ sender?: ModalFile['sender'];
9
+ date?: string;
10
10
  }
11
11
  declare const AttachmentList: React.FC<AttachmentListProps>;
12
12
  export default AttachmentList;
@@ -1,7 +1,15 @@
1
- export declare const ChooseChatMessageContainer: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
2
- export declare const ChooseChatMessageContainerBoxText: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
3
- export declare const ChooseChatTitle: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
4
- export declare const ChooseChatDescription: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
1
+ export declare const ChooseChatMessageContainer: import('styled-components/dist/types').IStyledComponentBase<"web", Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "style"> & {
2
+ style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
3
+ }> & string;
4
+ export declare const ChooseChatMessageContainerBoxText: import('styled-components/dist/types').IStyledComponentBase<"web", Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "style"> & {
5
+ style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
6
+ }> & string;
7
+ export declare const ChooseChatTitle: import('styled-components/dist/types').IStyledComponentBase<"web", Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "style"> & {
8
+ style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
9
+ }> & string;
10
+ export declare const ChooseChatDescription: import('styled-components/dist/types').IStyledComponentBase<"web", Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "style"> & {
11
+ style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
12
+ }> & string;
5
13
  interface ChooseChatMessageProps {
6
14
  /**
7
15
  * True when a specific room WAS requested (a QR code, a shared link, a
@@ -1,8 +1,16 @@
1
1
  import { default as React, FC } from 'react';
2
- export declare const EditContainer: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
3
- export declare const EditInfoBox: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
4
- export declare const EditTitle: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
5
- export declare const EditText: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
2
+ export declare const EditContainer: import('styled-components/dist/types').IStyledComponentBase<"web", Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "style"> & {
3
+ style?: React.CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
4
+ }> & string;
5
+ export declare const EditInfoBox: import('styled-components/dist/types').IStyledComponentBase<"web", Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "style"> & {
6
+ style?: React.CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
7
+ }> & string;
8
+ export declare const EditTitle: import('styled-components/dist/types').IStyledComponentBase<"web", Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "style"> & {
9
+ style?: React.CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
10
+ }> & string;
11
+ export declare const EditText: import('styled-components/dist/types').IStyledComponentBase<"web", Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "style"> & {
12
+ style?: React.CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
13
+ }> & string;
6
14
  interface EditWrapperProps {
7
15
  text: string;
8
16
  onClose: () => void;
@@ -0,0 +1,21 @@
1
+ import { default as React } from 'react';
2
+ export interface ImageUnavailableArtProps {
3
+ /** Rendered width and height in CSS pixels. The viewBox scales crisply. */
4
+ size?: number;
5
+ }
6
+ export declare const ImageUnavailableArt: React.FC<ImageUnavailableArtProps>;
7
+ export interface ImageUnavailableStateProps {
8
+ /**
9
+ * Compact: the glyph only, about 28px, for album grid tiles. Full: the
10
+ * illustration, the caption and a hint, for a solo bubble or the viewer.
11
+ */
12
+ compact?: boolean;
13
+ /**
14
+ * Shows a "Try again" action. The picture sits inside the bubble's open
15
+ * button, so the action is a span with button semantics, not a <button>.
16
+ */
17
+ onRetry?: () => void;
18
+ }
19
+ /** Self-contained "could not load" state that fills its positioned parent. */
20
+ export declare const ImageUnavailableState: React.FC<ImageUnavailableStateProps>;
21
+ export default ImageUnavailableState;
@@ -0,0 +1,31 @@
1
+ import { default as React } from 'react';
2
+ /** How long the scrim takes to fade once the upload is done. */
3
+ export declare const SCRIM_FADE_MS = 180;
4
+ /** The circular-arrow retry mark, shared by the failed tile and the "+N" badge. */
5
+ export declare const RetryIcon: React.FC<{
6
+ size?: number;
7
+ }>;
8
+ /**
9
+ * Thin circular progress ring. The SVG is a fixed 40px square with a
10
+ * viewBox, so it can never stretch; the arc is drawn by moving the dash
11
+ * offset from the full circumference (empty) down to zero (complete).
12
+ */
13
+ export declare const ProgressRing: React.FC<{
14
+ percent: number;
15
+ children?: React.ReactNode;
16
+ }>;
17
+ interface MediaUploadOverlayProps {
18
+ /** `uploading` covers "waiting for the siblings" too; `failed` is a retry prompt. */
19
+ status: 'uploading' | 'failed';
20
+ progress?: number;
21
+ /** Upload is done: fade the scrim out instead of leaving it up. */
22
+ leaving?: boolean;
23
+ }
24
+ /**
25
+ * State layer over an outgoing attachment: a frosted scrim with a progress
26
+ * ring while it goes up, and a tinted scrim with a retry glyph once it has
27
+ * failed. The parent owns the click, so this stays pointer-transparent and
28
+ * can sit inside a button without nesting interactive elements.
29
+ */
30
+ export declare const MediaUploadOverlay: React.FC<MediaUploadOverlayProps>;
31
+ export default MediaUploadOverlay;
@@ -6,6 +6,7 @@ interface MessageContainerProps {
6
6
  isUser: boolean;
7
7
  $isUser?: boolean;
8
8
  isReply: boolean;
9
+ isLastInGroup?: boolean;
9
10
  }>;
10
11
  message: IMessage;
11
12
  activeMessage: IMessage;
@@ -13,6 +14,8 @@ interface MessageContainerProps {
13
14
  xmppUsername: string;
14
15
  isReply: boolean;
15
16
  showDateLabel: boolean;
17
+ /** False when the next row is the same sender's message (a run continues). */
18
+ isLastInGroup?: boolean;
16
19
  className?: string;
17
20
  }
18
21
  export declare const MessageContainer: React.NamedExoticComponent<MessageContainerProps>;
@@ -15,4 +15,5 @@ interface MessageListProps<TMessage extends IMessage> {
15
15
  activeMessage?: IMessage;
16
16
  }
17
17
  declare const MessageList: <TMessage extends IMessage>({ CustomMessage, loadMoreMessages, roomJID, config, loading, isReply, activeMessage, }: MessageListProps<TMessage>) => import("react/jsx-runtime").JSX.Element;
18
- export default MessageList;
18
+ declare const _default: typeof MessageList;
19
+ export default _default;
@@ -6,7 +6,9 @@ interface SystemMessageProps {
6
6
  secondary?: string;
7
7
  };
8
8
  }
9
- export declare const CustomSystemMessageText: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
9
+ export declare const CustomSystemMessageText: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Merged<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "style"> & {
10
+ style?: React.CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
11
+ }, {
10
12
  $primary?: string;
11
13
  }>> & string;
12
14
  declare const SystemMessage: React.FC<SystemMessageProps>;
@@ -1,4 +1,6 @@
1
- export declare const CustomDivider: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
1
+ export declare const CustomDivider: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Merged<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "style"> & {
2
+ style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
3
+ }, {
2
4
  $configColor: string;
3
5
  $configColorUser: string;
4
6
  $isUser: boolean;
@@ -0,0 +1,9 @@
1
+ import { default as React } from 'react';
2
+ import { MentionClickHandler } from '../../helpers/parseMessageBody';
3
+ interface MediaCaptionProps {
4
+ /** The message: its caption, or the text a legacy sender put in `body`. */
5
+ message: object;
6
+ onMentionClick?: MentionClickHandler;
7
+ }
8
+ declare const MediaCaption: React.FC<MediaCaptionProps>;
9
+ export default MediaCaption;
@@ -0,0 +1,17 @@
1
+ import { default as React, CSSProperties } from 'react';
2
+ interface MessageAvatarPhotoProps {
3
+ /** Sender photo URL; empty renders the initials circle alone. */
4
+ src?: string | null;
5
+ /** Display name, used for the initials. */
6
+ username?: string;
7
+ style?: CSSProperties;
8
+ }
9
+ /**
10
+ * Sender avatar in a message bubble. The initials circle is always rendered
11
+ * (no layout shift, nothing waits on the network); the photo is layered over
12
+ * it and faded in once it has loaded. A photo that fails to load leaves the
13
+ * initials, where the old bare <img> showed a broken-image glyph. A sender
14
+ * with many bubbles shares one load through useAvatarImage's cache.
15
+ */
16
+ export declare const MessageAvatarPhoto: React.FC<MessageAvatarPhotoProps>;
17
+ export {};
@@ -5,6 +5,12 @@ interface MessageReactionProps {
5
5
  reaction: Record<string, ReactionMessage>;
6
6
  changeReaction: (reaction: string) => void;
7
7
  userName?: string;
8
+ /**
9
+ * Reports how far the chip rows hang below the bubble's bottom edge, in px,
10
+ * whenever their rendered height changes (one row hangs REACTION_HANG_PX).
11
+ * The message row uses it to reserve room for every wrapped row.
12
+ */
13
+ onHangChange?: (hangPx: number) => void;
8
14
  }
9
15
  export declare const MessageReaction: FC<MessageReactionProps>;
10
16
  export {};
@@ -1,5 +1,7 @@
1
1
  import { FC } from 'react';
2
- export declare const StyledMessageReply: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
2
+ export declare const StyledMessageReply: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Merged<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "style"> & {
3
+ style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
4
+ }, {
3
5
  $isUser: boolean;
4
6
  $configColor: string;
5
7
  }>> & string;
@@ -1,9 +1,11 @@
1
1
  import { default as React } from 'react';
2
2
  import { QuickReply } from '../../helpers/quickReplies';
3
+ import { ChatColorScheme } from '../../types/types';
3
4
  interface QuickRepliesProps {
4
5
  replies: QuickReply[];
5
6
  messageId: string;
6
7
  accentColor?: string;
8
+ colorScheme?: ChatColorScheme;
7
9
  /** Already answered - the chips are gone for good. */
8
10
  answered?: boolean;
9
11
  onSelect: (reply: QuickReply, questionId: string) => void;
@@ -7,17 +7,15 @@ interface FilePreviewModalProps {
7
7
  *
8
8
  * Images get a real lightbox: previous/next across every image loaded for
9
9
  * the room (see helpers/roomImageGallery for exactly what that set is),
10
- * wheel/pinch zoom with bounded panning, double-click/double-tap to toggle
11
- * fit, arrow-key and swipe navigation. Video, PDF and unsupported files take
12
- * the same paths they always did and get no navigation chrome, so opening a
13
- * PDF is the experience it was before.
10
+ * a thumbnail strip, wheel/pinch zoom with bounded panning, double-click or
11
+ * double-tap to toggle fit, arrow and swipe navigation, and a blurred
12
+ * low-resolution stand-in while the full picture loads. Video, audio, PDF and
13
+ * other files each get their own view; none of them get gallery chrome.
14
14
  *
15
- * Escape, initial focus and focus restore are NOT handled here: the modal
16
- * layer (Modals/Modal/Modal.tsx) already runs `useModalDismiss` around every
17
- * entry in MODAL_COMPONENTS, this one included. Adding a second Escape
18
- * listener would double-handle the key and fight that hook's focus restore,
19
- * so the only key listener below is for the arrows, and it explicitly leaves
20
- * every other key (Escape included) alone.
15
+ * Escape and initial focus are handled by useModalDismiss at the modal layer
16
+ * (Modals/Modal/ModalContent.tsx), which also restores focus to the opener on
17
+ * close. This component adds the Tab trap and the arrow and zoom keys, and it
18
+ * leaves Escape alone so the key is not handled twice.
21
19
  */
22
20
  declare const FilePreviewModal: React.FC<FilePreviewModalProps>;
23
21
  export default FilePreviewModal;
@@ -11,6 +11,10 @@ export interface ImageLightboxHandle {
11
11
  interface ImageLightboxProps {
12
12
  src: string;
13
13
  alt: string;
14
+ /** Low-res stand-in painted blurred until `src` has loaded. */
15
+ previewSrc?: string;
16
+ /** Visually hidden label for the loading spinner (screen readers). */
17
+ loadingLabel?: string;
14
18
  /** Swipe (touch) navigation; also used to report gesture direction. */
15
19
  onSwipeLeft?: () => void;
16
20
  onSwipeRight?: () => void;
@@ -10,6 +10,10 @@ interface PdfViewerProps {
10
10
  * opened was handed to a third-party host - and broke outright whenever that
11
11
  * page changed or was unreachable. Rendering locally keeps the file URL
12
12
  * inside the app and works offline-ish (the PDF itself still has to load).
13
+ *
14
+ * All pages stack in one scroll container. Every page has a placeholder sized
15
+ * from its real aspect, but only the few near the viewport render a canvas,
16
+ * so a 200-page document costs about as much as a 7-page one.
13
17
  */
14
18
  declare const PdfViewer: React.FC<PdfViewerProps>;
15
19
  export default PdfViewer;