From 5db28ca3273ccb4108156ddd96746c0a2816dd6a Mon Sep 17 00:00:00 2001 From: Shea Duma Date: Sun, 29 Mar 2026 19:55:58 +0300 Subject: [PATCH 001/103] added basic bundled rendering --- src/app/components/RenderMessageContent.tsx | 20 +- .../components/message/MsgTypeRenderers.tsx | 76 +++- .../components/url-preview/UrlPreviewCard.tsx | 394 +++++++++--------- 3 files changed, 278 insertions(+), 212 deletions(-) diff --git a/src/app/components/RenderMessageContent.tsx b/src/app/components/RenderMessageContent.tsx index 6f3617858..985f15ce3 100644 --- a/src/app/components/RenderMessageContent.tsx +++ b/src/app/components/RenderMessageContent.tsx @@ -1,5 +1,5 @@ import { memo, useMemo, useCallback } from 'react'; -import { MsgType } from '$types/matrix-sdk'; +import { IPreviewUrlResponse, MsgType } from '$types/matrix-sdk'; import { testMatrixTo } from '$plugins/matrix-to'; import { useSetting } from '$state/hooks/settings'; import { settingsAtom, CaptionPosition } from '$state/settings'; @@ -111,7 +111,6 @@ function RenderMessageContentInternal({ const mediaLinks = analyzed.filter((item) => item.type !== null); const toRender = mediaLinks.length > 0 ? mediaLinks : [analyzed[0]]; - return ( {toRender.map(({ url, type }) => { @@ -131,6 +130,16 @@ function RenderMessageContentInternal({ }, [ts, clientUrlPreview, urlPreview] ); + const renderBundledPreviews = useCallback( + (bundles: IPreviewUrlResponse[]) => ( + + {bundles.map((bundle) => ( + + ))} + + ), + [] + ); const renderCaption = () => { const hasCaption = content.body && content.body.trim().length > 0; @@ -144,6 +153,7 @@ function RenderMessageContentInternal({ content={content} renderBody={renderBody} renderUrlsPreview={urlPreview ? renderUrlsPreview : undefined} + renderBundledPreviews={renderBundledPreviews} /> ); return ( @@ -163,6 +173,7 @@ function RenderMessageContentInternal({ content={content} renderBody={renderBody} renderUrlsPreview={urlPreview ? renderUrlsPreview : undefined} + renderBundledPreviews={renderBundledPreviews} /> ); @@ -225,7 +236,8 @@ function RenderMessageContentInternal({ edited={edited} content={content} renderBody={renderBody} - renderUrlsPreview={urlPreview ? renderUrlsPreview : undefined} + renderUrlsPreview={renderUrlsPreview} + renderBundledPreviews={renderBundledPreviews} /> ); } @@ -247,6 +259,7 @@ function RenderMessageContentInternal({ content={content} renderBody={renderBody} renderUrlsPreview={urlPreview ? renderUrlsPreview : undefined} + renderBundledPreviews={renderBundledPreviews} /> ); } @@ -258,6 +271,7 @@ function RenderMessageContentInternal({ content={content} renderBody={renderBody} renderUrlsPreview={urlPreview ? renderUrlsPreview : undefined} + renderBundledPreviews={renderBundledPreviews} /> ); } diff --git a/src/app/components/message/MsgTypeRenderers.tsx b/src/app/components/message/MsgTypeRenderers.tsx index 6d1a63cce..647e10dd2 100644 --- a/src/app/components/message/MsgTypeRenderers.tsx +++ b/src/app/components/message/MsgTypeRenderers.tsx @@ -1,6 +1,6 @@ import { CSSProperties, ReactNode, useMemo } from 'react'; import { Box, Chip, Icon, Icons, Text, toRem } from 'folds'; -import { IContent } from '$types/matrix-sdk'; +import { IContent, IPreviewUrlResponse } from '$types/matrix-sdk'; import { JUMBO_EMOJI_REG, URL_REG } from '$utils/regex'; import { trimReplyFromBody } from '$utils/room'; import { @@ -82,9 +82,17 @@ type MTextProps = { content: Record; renderBody: (props: RenderBodyProps) => ReactNode; renderUrlsPreview?: (urls: string[]) => ReactNode; + renderBundledPreviews?: (bundles: IPreviewUrlResponse[]) => ReactNode; style?: CSSProperties; }; -export function MText({ edited, content, renderBody, renderUrlsPreview, style }: MTextProps) { +export function MText({ + edited, + content, + renderBody, + renderUrlsPreview, + renderBundledPreviews, + style, +}: MTextProps) { const [jumboEmojiSize] = useSetting(settingsAtom, 'jumboEmojiSize'); const body = typeof content.body === 'string' ? content.body : ''; @@ -139,8 +147,13 @@ export function MText({ edited, content, renderBody, renderUrlsPreview, style }: if (!body && !customBody) return ; - const urlsMatch = renderUrlsPreview && trimmedBody.match(URL_REG); - const urls = urlsMatch ? [...new Set(urlsMatch)] : undefined; + let urls: string[] | undefined; + let bundleContent: IPreviewUrlResponse[] | undefined; + if (!content['com.beeper.linkpreviews']) { + const urlsMatch = renderUrlsPreview && trimmedBody.match(URL_REG); + urls = urlsMatch ? [...new Set(urlsMatch)] : undefined; + } else if ((content['com.beeper.linkpreviews'] as Array).length > 0) + bundleContent = content['com.beeper.linkpreviews'] as IPreviewUrlResponse[]; if ((content['com.beeper.per_message_profile'] as PerMessageProfileBeeperFormat)?.has_fallback) { // unwrap per-message profile fallback if present @@ -167,7 +180,11 @@ export function MText({ edited, content, renderBody, renderUrlsPreview, style }: customBody: unwrappedForwardedContent, })} {edited && } - {renderUrlsPreview && urls && urls.length > 0 && renderUrlsPreview(urls)} + {(renderUrlsPreview && urls && urls.length > 0 && renderUrlsPreview(urls)) || + (renderBundledPreviews && + bundleContent && + bundleContent.length > 0 && + renderBundledPreviews(bundleContent))} ); } @@ -185,7 +202,11 @@ export function MText({ edited, content, renderBody, renderUrlsPreview, style }: })} {edited && } - {renderUrlsPreview && urls && urls.length > 0 && renderUrlsPreview(urls)} + {(renderUrlsPreview && urls && urls.length > 0 && renderUrlsPreview(urls)) || + (renderBundledPreviews && + bundleContent && + bundleContent.length > 0 && + renderBundledPreviews(bundleContent))} ); } @@ -196,6 +217,7 @@ type MEmoteProps = { content: Record; renderBody: (props: RenderBodyProps) => ReactNode; renderUrlsPreview?: (urls: string[]) => ReactNode; + renderBundledPreviews?: (bundles: IPreviewUrlResponse[]) => ReactNode; }; export function MEmote({ displayName, @@ -203,6 +225,7 @@ export function MEmote({ content, renderBody, renderUrlsPreview, + renderBundledPreviews, }: MEmoteProps) { const { body, formatted_body: customBody } = content; const [jumboEmojiSize] = useSetting(settingsAtom, 'jumboEmojiSize'); @@ -211,10 +234,16 @@ export function MEmote({ return ; } const trimmedBody = trimReplyFromBody(body); - const urlsMatch = renderUrlsPreview && trimmedBody.match(URL_REG); - const urls = urlsMatch ? [...new Set(urlsMatch)] : undefined; const isJumbo = JUMBO_EMOJI_REG.test(trimmedBody); + let urls: string[] | undefined; + let bundleContent: IPreviewUrlResponse[] | undefined; + if (!content['com.beeper.linkpreviews']) { + const urlsMatch = renderUrlsPreview && trimmedBody.match(URL_REG); + urls = urlsMatch ? [...new Set(urlsMatch)] : undefined; + } else if ((content['com.beeper.linkpreviews'] as Array).length > 0) + bundleContent = content['com.beeper.linkpreviews'] as IPreviewUrlResponse[]; + return ( <> } - {renderUrlsPreview && urls && urls.length > 0 && renderUrlsPreview(urls)} + {(renderUrlsPreview && urls && urls.length > 0 && renderUrlsPreview(urls)) || + (renderBundledPreviews && + bundleContent && + bundleContent.length > 0 && + renderBundledPreviews(bundleContent))} ); } @@ -239,8 +272,15 @@ type MNoticeProps = { content: Record; renderBody: (props: RenderBodyProps) => ReactNode; renderUrlsPreview?: (urls: string[]) => ReactNode; + renderBundledPreviews?: (bundles: IPreviewUrlResponse[]) => ReactNode; }; -export function MNotice({ edited, content, renderBody, renderUrlsPreview }: MNoticeProps) { +export function MNotice({ + edited, + content, + renderBody, + renderUrlsPreview, + renderBundledPreviews, +}: MNoticeProps) { const { body, formatted_body: customBody } = content; const [jumboEmojiSize] = useSetting(settingsAtom, 'jumboEmojiSize'); @@ -248,10 +288,16 @@ export function MNotice({ edited, content, renderBody, renderUrlsPreview }: MNot return ; } const trimmedBody = trimReplyFromBody(body); - const urlsMatch = renderUrlsPreview && trimmedBody.match(URL_REG); - const urls = urlsMatch ? [...new Set(urlsMatch)] : undefined; + let urls: string[] | undefined; const isJumbo = JUMBO_EMOJI_REG.test(trimmedBody); + let bundleContent: IPreviewUrlResponse[] | undefined; + if (!content['com.beeper.linkpreviews']) { + const urlsMatch = renderUrlsPreview && trimmedBody.match(URL_REG); + urls = urlsMatch ? [...new Set(urlsMatch)] : undefined; + } else if ((content['com.beeper.linkpreviews'] as Array).length > 0) + bundleContent = content['com.beeper.linkpreviews'] as IPreviewUrlResponse[]; + return ( <> } - {renderUrlsPreview && urls && urls.length > 0 && renderUrlsPreview(urls)} + {(renderUrlsPreview && urls && urls.length > 0 && renderUrlsPreview(urls)) || + (renderBundledPreviews && + bundleContent && + bundleContent.length > 0 && + renderBundledPreviews(bundleContent))} ); } diff --git a/src/app/components/url-preview/UrlPreviewCard.tsx b/src/app/components/url-preview/UrlPreviewCard.tsx index 3ac780f74..529325f3c 100644 --- a/src/app/components/url-preview/UrlPreviewCard.tsx +++ b/src/app/components/url-preview/UrlPreviewCard.tsx @@ -41,177 +41,81 @@ const openMediaInNewTab = async (url: string | undefined) => { window.open(blobUrl, '_blank'); }; -export const UrlPreviewCard = as<'div', { url: string; ts: number; mediaType?: string | null }>( - ({ url, ts, mediaType, ...props }, ref) => { - const mx = useMatrixClient(); - const useAuthentication = useMediaAuthentication(); +export const UrlPreviewCard = as< + 'div', + { url: string; ts?: number; mediaType?: string | null; bundle?: IPreviewUrlResponse } +>(({ url, ts, mediaType, bundle, ...props }, ref) => { + const mx = useMatrixClient(); + const useAuthentication = useMediaAuthentication(); - const isDirect = !!mediaType; + const isDirect = !!mediaType; - const [previewStatus, loadPreview] = useAsyncCallback( - useCallback(() => { - if (isDirect) return Promise.resolve(null); - const clientCache = getClientCache(mx); - const cached = clientCache.get(url); - if (cached !== undefined) return cached; - const urlPreview = mx.getUrlPreview(url, ts); - clientCache.set(url, urlPreview); - urlPreview.finally(() => clientCache.delete(url)); - return urlPreview; - }, [url, ts, mx, isDirect]) + const [previewStatus, loadPreview] = useAsyncCallback( + useCallback(() => { + if (isDirect) return Promise.resolve(null); + if (!ts && !bundle) return Promise.resolve(null); + const clientCache = getClientCache(mx); + const cached = clientCache.get(url); + if (cached !== undefined) return cached; + const urlPreview = !bundle ? mx?.getUrlPreview(url, ts ?? -1) : Promise.resolve(bundle); + clientCache.set(url, urlPreview); + urlPreview.finally(() => clientCache.delete(url)); + return urlPreview; + }, [isDirect, mx, url, ts, bundle]) + ); + + useEffect(() => { + loadPreview(); + }, [url, loadPreview]); + + if (previewStatus.status === AsyncStatus.Error) return null; + + const renderContent = (prev: IPreviewUrlResponse) => { + const siteName = prev['og:site_name']; + const title = prev['og:title']; + const description = prev['og:description']; + const imgUrl = mxcUrlToHttp( + mx, + prev['og:image'] || '', + useAuthentication, + 256, + 256, + 'scale', + false ); - - useEffect(() => { - loadPreview(); - }, [url, loadPreview]); - - if (previewStatus.status === AsyncStatus.Error) return null; - - const renderContent = (prev: IPreviewUrlResponse) => { - const siteName = prev['og:site_name']; - const title = prev['og:title']; - const description = prev['og:description']; - const imgUrl = mxcUrlToHttp( - mx, - prev['og:image'] || '', - useAuthentication, - 256, - 256, - 'scale', - false - ); - const handleAuxClick = (ev: React.MouseEvent) => { - if (!prev['og:image']) { - console.warn('No image'); + const handleAuxClick = (ev: React.MouseEvent) => { + if (!prev['og:image']) { + console.warn('No image'); + return; + } + if (ev.button === 1) { + ev.preventDefault(); + const mxcUrl = mxcUrlToHttp(mx, prev['og:image'], /* useAuthentication */ true); + if (!mxcUrl) { + console.error('Error converting mxc:// url.'); return; } - if (ev.button === 1) { - ev.preventDefault(); - const mxcUrl = mxcUrlToHttp(mx, prev['og:image'], /* useAuthentication */ true); - if (!mxcUrl) { - console.error('Error converting mxc:// url.'); - return; - } - openMediaInNewTab(mxcUrl); - } - }; - - return ( - - - - {typeof siteName === 'string' && `${siteName} | `} - {safeDecodeUrl(url)} - - {title && ( - - {title} - - )} - {description && ( - - {description} - - )} - - {prev['og:video'] && ( - - ); + openMediaInNewTab(mxcUrl); + } }; - let previewContent; - if (previewStatus.status === AsyncStatus.Success) { - previewContent = previewStatus.data ? ( - renderContent(previewStatus.data) - ) : ( - + return ( + + + {typeof siteName === 'string' && `${siteName} | `} {safeDecodeUrl(url)} + {title && ( + + {title} + + )} + {description && ( + + {description} + + )} - ); - } else { - previewContent = ( - - - - ); - } - return ( - - {previewContent} - + {prev['og:video'] && ( + + ); + }; + + let previewContent; + if (previewStatus.status === AsyncStatus.Success) { + previewContent = previewStatus.data ? ( + renderContent(previewStatus.data) + ) : ( + + + {safeDecodeUrl(url)} + + + ); + } else { + previewContent = ( + + + ); } -); + return ( + + {previewContent} + + ); +}); export const UrlPreviewHolder = as<'div'>(({ children, ...props }, ref) => { const scrollRef = useRef(null); From a80b4b967f19e805ab9f8e57fd9b809d62f7a019 Mon Sep 17 00:00:00 2001 From: Shea Duma Date: Mon, 30 Mar 2026 00:02:18 +0300 Subject: [PATCH 002/103] added setting for bundled previews and check for the body to align closer to msc 4095 --- src/app/components/RenderMessageContent.tsx | 27 +++++++----- .../components/message/MsgTypeRenderers.tsx | 44 ++++++++----------- .../components/url-preview/UrlPreviewCard.tsx | 29 +++++++----- src/app/features/room/RoomTimeline.tsx | 2 + src/app/features/settings/general/General.tsx | 20 ++++++--- .../timeline/useTimelineEventRenderer.tsx | 4 ++ src/app/state/settings.ts | 2 + 7 files changed, 78 insertions(+), 50 deletions(-) diff --git a/src/app/components/RenderMessageContent.tsx b/src/app/components/RenderMessageContent.tsx index 985f15ce3..08c5e281d 100644 --- a/src/app/components/RenderMessageContent.tsx +++ b/src/app/components/RenderMessageContent.tsx @@ -42,6 +42,7 @@ type RenderMessageContentProps = { edited?: boolean; getContent: () => T; mediaAutoLoad?: boolean; + bundledPreview?: boolean; urlPreview?: boolean; clientUrlPreview?: boolean; highlightRegex?: RegExp; @@ -68,6 +69,7 @@ function RenderMessageContentInternal({ edited, getContent, mediaAutoLoad, + bundledPreview, urlPreview, clientUrlPreview, highlightRegex, @@ -115,13 +117,13 @@ function RenderMessageContentInternal({ {toRender.map(({ url, type }) => { if (type) { - return ; + return ; } if (clientUrlPreview && youtubeUrl(url)) { return ; } if (urlPreview) { - return ; + return ; } return null; })} @@ -134,11 +136,16 @@ function RenderMessageContentInternal({ (bundles: IPreviewUrlResponse[]) => ( {bundles.map((bundle) => ( - + ))} ), - [] + [urlPreview] ); const renderCaption = () => { @@ -153,7 +160,7 @@ function RenderMessageContentInternal({ content={content} renderBody={renderBody} renderUrlsPreview={urlPreview ? renderUrlsPreview : undefined} - renderBundledPreviews={renderBundledPreviews} + renderBundledPreviews={bundledPreview ? renderBundledPreviews : undefined} /> ); return ( @@ -173,7 +180,7 @@ function RenderMessageContentInternal({ content={content} renderBody={renderBody} renderUrlsPreview={urlPreview ? renderUrlsPreview : undefined} - renderBundledPreviews={renderBundledPreviews} + renderBundledPreviews={bundledPreview ? renderBundledPreviews : undefined} /> ); @@ -236,8 +243,8 @@ function RenderMessageContentInternal({ edited={edited} content={content} renderBody={renderBody} - renderUrlsPreview={renderUrlsPreview} - renderBundledPreviews={renderBundledPreviews} + renderUrlsPreview={urlPreview ? renderUrlsPreview : undefined} + renderBundledPreviews={bundledPreview ? renderBundledPreviews : undefined} /> ); } @@ -259,7 +266,7 @@ function RenderMessageContentInternal({ content={content} renderBody={renderBody} renderUrlsPreview={urlPreview ? renderUrlsPreview : undefined} - renderBundledPreviews={renderBundledPreviews} + renderBundledPreviews={bundledPreview ? renderBundledPreviews : undefined} /> ); } @@ -271,7 +278,7 @@ function RenderMessageContentInternal({ content={content} renderBody={renderBody} renderUrlsPreview={urlPreview ? renderUrlsPreview : undefined} - renderBundledPreviews={renderBundledPreviews} + renderBundledPreviews={bundledPreview ? renderBundledPreviews : undefined} /> ); } diff --git a/src/app/components/message/MsgTypeRenderers.tsx b/src/app/components/message/MsgTypeRenderers.tsx index 647e10dd2..2047fdd6d 100644 --- a/src/app/components/message/MsgTypeRenderers.tsx +++ b/src/app/components/message/MsgTypeRenderers.tsx @@ -147,13 +147,11 @@ export function MText({ if (!body && !customBody) return ; - let urls: string[] | undefined; - let bundleContent: IPreviewUrlResponse[] | undefined; - if (!content['com.beeper.linkpreviews']) { - const urlsMatch = renderUrlsPreview && trimmedBody.match(URL_REG); - urls = urlsMatch ? [...new Set(urlsMatch)] : undefined; - } else if ((content['com.beeper.linkpreviews'] as Array).length > 0) - bundleContent = content['com.beeper.linkpreviews'] as IPreviewUrlResponse[]; + let bundleContent: object[] | undefined; + const urlsMatch = trimmedBody.match(URL_REG); + const urls = urlsMatch ? [...new Set(urlsMatch)] : undefined; + bundleContent = content['com.beeper.linkpreviews'] as object[]; + bundleContent = bundleContent?.filter((bundle) => !!urls?.includes((bundle as any).matched_url)); if ((content['com.beeper.per_message_profile'] as PerMessageProfileBeeperFormat)?.has_fallback) { // unwrap per-message profile fallback if present @@ -184,7 +182,7 @@ export function MText({ (renderBundledPreviews && bundleContent && bundleContent.length > 0 && - renderBundledPreviews(bundleContent))} + renderBundledPreviews(bundleContent as IPreviewUrlResponse[]))} ); } @@ -206,7 +204,7 @@ export function MText({ (renderBundledPreviews && bundleContent && bundleContent.length > 0 && - renderBundledPreviews(bundleContent))} + renderBundledPreviews(bundleContent as IPreviewUrlResponse[]))} ); } @@ -236,13 +234,11 @@ export function MEmote({ const trimmedBody = trimReplyFromBody(body); const isJumbo = JUMBO_EMOJI_REG.test(trimmedBody); - let urls: string[] | undefined; - let bundleContent: IPreviewUrlResponse[] | undefined; - if (!content['com.beeper.linkpreviews']) { - const urlsMatch = renderUrlsPreview && trimmedBody.match(URL_REG); - urls = urlsMatch ? [...new Set(urlsMatch)] : undefined; - } else if ((content['com.beeper.linkpreviews'] as Array).length > 0) - bundleContent = content['com.beeper.linkpreviews'] as IPreviewUrlResponse[]; + let bundleContent: object[] | undefined; + const urlsMatch = trimmedBody.match(URL_REG); + const urls = urlsMatch ? [...new Set(urlsMatch)] : undefined; + bundleContent = content['com.beeper.linkpreviews'] as object[]; + bundleContent = bundleContent?.filter((bundle) => !!urls?.includes((bundle as any).matched_url)); return ( <> @@ -262,7 +258,7 @@ export function MEmote({ (renderBundledPreviews && bundleContent && bundleContent.length > 0 && - renderBundledPreviews(bundleContent))} + renderBundledPreviews(bundleContent as IPreviewUrlResponse[]))} ); } @@ -288,15 +284,13 @@ export function MNotice({ return ; } const trimmedBody = trimReplyFromBody(body); - let urls: string[] | undefined; const isJumbo = JUMBO_EMOJI_REG.test(trimmedBody); - let bundleContent: IPreviewUrlResponse[] | undefined; - if (!content['com.beeper.linkpreviews']) { - const urlsMatch = renderUrlsPreview && trimmedBody.match(URL_REG); - urls = urlsMatch ? [...new Set(urlsMatch)] : undefined; - } else if ((content['com.beeper.linkpreviews'] as Array).length > 0) - bundleContent = content['com.beeper.linkpreviews'] as IPreviewUrlResponse[]; + let bundleContent: object[] | undefined; + const urlsMatch = trimmedBody.match(URL_REG); + const urls = urlsMatch ? [...new Set(urlsMatch)] : undefined; + bundleContent = content['com.beeper.linkpreviews'] as object[]; + bundleContent = bundleContent?.filter((bundle) => !!urls?.includes((bundle as any).matched_url)); return ( <> @@ -315,7 +309,7 @@ export function MNotice({ (renderBundledPreviews && bundleContent && bundleContent.length > 0 && - renderBundledPreviews(bundleContent))} + renderBundledPreviews(bundleContent as IPreviewUrlResponse[]))} ); } diff --git a/src/app/components/url-preview/UrlPreviewCard.tsx b/src/app/components/url-preview/UrlPreviewCard.tsx index 529325f3c..63586b436 100644 --- a/src/app/components/url-preview/UrlPreviewCard.tsx +++ b/src/app/components/url-preview/UrlPreviewCard.tsx @@ -43,8 +43,14 @@ const openMediaInNewTab = async (url: string | undefined) => { export const UrlPreviewCard = as< 'div', - { url: string; ts?: number; mediaType?: string | null; bundle?: IPreviewUrlResponse } ->(({ url, ts, mediaType, bundle, ...props }, ref) => { + { + urlPreview: boolean; + url: string; + ts?: number; + mediaType?: string | null; + bundle?: IPreviewUrlResponse; + } +>(({ urlPreview, url, ts, mediaType, bundle, ...props }, ref) => { const mx = useMatrixClient(); const useAuthentication = useMediaAuthentication(); @@ -54,14 +60,17 @@ export const UrlPreviewCard = as< useCallback(() => { if (isDirect) return Promise.resolve(null); if (!ts && !bundle) return Promise.resolve(null); - const clientCache = getClientCache(mx); - const cached = clientCache.get(url); - if (cached !== undefined) return cached; - const urlPreview = !bundle ? mx?.getUrlPreview(url, ts ?? -1) : Promise.resolve(bundle); - clientCache.set(url, urlPreview); - urlPreview.finally(() => clientCache.delete(url)); - return urlPreview; - }, [isDirect, mx, url, ts, bundle]) + if (urlPreview && ts) { + const clientCache = getClientCache(mx); + const cached = clientCache.get(url); + if (cached !== undefined) return cached; + const previewResult = mx?.getUrlPreview(url, ts); + clientCache.set(url, previewResult); + previewResult.finally(() => clientCache.delete(url)); + return previewResult; + } + return Promise.resolve(bundle); + }, [isDirect, ts, bundle, urlPreview, mx, url]) ); useEffect(() => { diff --git a/src/app/features/room/RoomTimeline.tsx b/src/app/features/room/RoomTimeline.tsx index fb4b33515..432e5370f 100644 --- a/src/app/features/room/RoomTimeline.tsx +++ b/src/app/features/room/RoomTimeline.tsx @@ -131,6 +131,7 @@ export function RoomTimeline({ const [hideMembershipEvents] = useSetting(settingsAtom, 'hideMembershipEvents'); const [hideNickAvatarEvents] = useSetting(settingsAtom, 'hideNickAvatarEvents'); const [mediaAutoLoad] = useSetting(settingsAtom, 'mediaAutoLoad'); + const [showBundledPreview] = useSetting(settingsAtom, 'bundledPreview'); const [urlPreview] = useSetting(settingsAtom, 'urlPreview'); const [encUrlPreview] = useSetting(settingsAtom, 'encUrlPreview'); const [clientUrlPreview] = useSetting(settingsAtom, 'clientUrlPreview'); @@ -543,6 +544,7 @@ export function RoomTimeline({ hour24Clock, dateFormatString, mediaAutoLoad, + showBundledPreview, showUrlPreview, showClientUrlPreview, autoplayStickers, diff --git a/src/app/features/settings/general/General.tsx b/src/app/features/settings/general/General.tsx index f7b8a6531..d2cdc0cc7 100644 --- a/src/app/features/settings/general/General.tsx +++ b/src/app/features/settings/general/General.tsx @@ -870,6 +870,7 @@ function Messages() { 'hideNickAvatarEvents' ); const [mediaAutoLoad, setMediaAutoLoad] = useSetting(settingsAtom, 'mediaAutoLoad'); + const [bundledPreview, setBundledPreview] = useSetting(settingsAtom, 'bundledPreview'); const [urlPreview, setUrlPreview] = useSetting(settingsAtom, 'urlPreview'); const [encUrlPreview, setEncUrlPreview] = useSetting(settingsAtom, 'encUrlPreview'); const [clientUrlPreview, setClientUrlPreview] = useSetting(settingsAtom, 'clientUrlPreview'); @@ -958,20 +959,29 @@ function Messages() { } + /> + + + } /> } /> Date: Mon, 30 Mar 2026 00:19:38 +0300 Subject: [PATCH 003/103] added changeset --- .changeset/add_msc4095_displaying.md | 5 +++++ src/app/components/message/MsgTypeRenderers.tsx | 4 +++- 2 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 .changeset/add_msc4095_displaying.md diff --git a/.changeset/add_msc4095_displaying.md b/.changeset/add_msc4095_displaying.md new file mode 100644 index 000000000..a8b83ed00 --- /dev/null +++ b/.changeset/add_msc4095_displaying.md @@ -0,0 +1,5 @@ +--- +default: minor +--- + +Add support for rendering bundled urls per MSC4095 diff --git a/src/app/components/message/MsgTypeRenderers.tsx b/src/app/components/message/MsgTypeRenderers.tsx index 2047fdd6d..bd3c72ce5 100644 --- a/src/app/components/message/MsgTypeRenderers.tsx +++ b/src/app/components/message/MsgTypeRenderers.tsx @@ -149,9 +149,11 @@ export function MText({ let bundleContent: object[] | undefined; const urlsMatch = trimmedBody.match(URL_REG); - const urls = urlsMatch ? [...new Set(urlsMatch)] : undefined; + let urls = urlsMatch ? [...new Set(urlsMatch)] : undefined; bundleContent = content['com.beeper.linkpreviews'] as object[]; bundleContent = bundleContent?.filter((bundle) => !!urls?.includes((bundle as any).matched_url)); + if (renderUrlsPreview && bundleContent) + urls = bundleContent.map((bundle) => (bundle as any).matched_url); if ((content['com.beeper.per_message_profile'] as PerMessageProfileBeeperFormat)?.has_fallback) { // unwrap per-message profile fallback if present From 5ab31d8dbdbcfa52736e2cab2b9bf97cd82ce305 Mon Sep 17 00:00:00 2001 From: 7w1 Date: Wed, 1 Apr 2026 14:13:09 -0500 Subject: [PATCH 004/103] capture focus when replying to messages --- src/app/features/room/RoomInput.tsx | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/app/features/room/RoomInput.tsx b/src/app/features/room/RoomInput.tsx index 70eca4dc2..bc30145c8 100644 --- a/src/app/features/room/RoomInput.tsx +++ b/src/app/features/room/RoomInput.tsx @@ -419,6 +419,24 @@ export const RoomInput = forwardRef( } }, [mentionInReplies, mx, replyDraft]); + const prevReplyEventId = useRef(replyDraft?.eventId); + useEffect(() => { + if (replyDraft?.eventId !== prevReplyEventId.current) { + prevReplyEventId.current = replyDraft?.eventId; + + if (replyDraft?.eventId) { + requestAnimationFrame(() => { + try { + ReactEditor.focus(editor); + moveCursor(editor); + } catch { + // Ignore focus errors + } + }); + } + } + }, [replyDraft?.eventId, editor]); + const handleFileMetadata = useCallback( (fileItem: TUploadItem, metadata: TUploadMetadata) => { setSelectedFiles({ From fe09f2a2d2c0964e94c970aaca7875dc94c608b4 Mon Sep 17 00:00:00 2001 From: 7w1 Date: Wed, 1 Apr 2026 16:08:01 -0500 Subject: [PATCH 005/103] add changeset --- .changeset/fix-focus-capture-reply.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/fix-focus-capture-reply.md diff --git a/.changeset/fix-focus-capture-reply.md b/.changeset/fix-focus-capture-reply.md new file mode 100644 index 000000000..30b559f9c --- /dev/null +++ b/.changeset/fix-focus-capture-reply.md @@ -0,0 +1,5 @@ +--- +default: patch +--- + +Fix reply button not capturing editor focus. From 8c0646ffa14019b2647e3ccc8129903ac6ca0282 Mon Sep 17 00:00:00 2001 From: 7w1 Date: Wed, 1 Apr 2026 16:27:16 -0500 Subject: [PATCH 006/103] add setting to collapse folders by default --- .changeset/feat-collpase-folder-setting.md | 5 +++++ src/app/features/settings/cosmetics/Themes.tsx | 18 ++++++++++++++++++ src/app/state/openedSidebarFolder.ts | 5 +++++ src/app/state/settings.ts | 5 ++--- 4 files changed, 30 insertions(+), 3 deletions(-) create mode 100644 .changeset/feat-collpase-folder-setting.md diff --git a/.changeset/feat-collpase-folder-setting.md b/.changeset/feat-collpase-folder-setting.md new file mode 100644 index 000000000..b49339c45 --- /dev/null +++ b/.changeset/feat-collpase-folder-setting.md @@ -0,0 +1,5 @@ +--- +default: minor +--- + +Add a setting to collapse sidebar folders by default. diff --git a/src/app/features/settings/cosmetics/Themes.tsx b/src/app/features/settings/cosmetics/Themes.tsx index 707bab42c..1e449c65a 100644 --- a/src/app/features/settings/cosmetics/Themes.tsx +++ b/src/app/features/settings/cosmetics/Themes.tsx @@ -468,6 +468,10 @@ function PageZoomInput() { export function Appearance() { const [twitterEmoji, setTwitterEmoji] = useSetting(settingsAtom, 'twitterEmoji'); const [showEasterEggs, setShowEasterEggs] = useSetting(settingsAtom, 'showEasterEggs'); + const [closeFoldersByDefault, setCloseFoldersByDefault] = useSetting( + settingsAtom, + 'closeFoldersByDefault' + ); return ( @@ -485,6 +489,20 @@ export function Appearance() { /> + + + } + /> + + >( storeKey, (key) => { + const settings = getSettings(); + if (settings.closeFoldersByDefault) { + return new Set(); + } const arrayValue = getLocalStorageItem(key, []); return new Set(arrayValue); }, diff --git a/src/app/state/settings.ts b/src/app/state/settings.ts index 85ca08500..d8e56e9d2 100644 --- a/src/app/state/settings.ts +++ b/src/app/state/settings.ts @@ -110,13 +110,11 @@ export interface Settings { alwaysShowCallButton: boolean; faviconForMentionsOnly: boolean; highlightMentions: boolean; - /** - * whether to enable pk compat - */ pkCompat: boolean; pmpProxying: boolean; mentionInReplies: boolean; showPersonaSetting: boolean; + closeFoldersByDefault: boolean; // furry stuff renderAnimals: boolean; @@ -214,6 +212,7 @@ const defaultSettings: Settings = { pmpProxying: false, mentionInReplies: true, showPersonaSetting: false, + closeFoldersByDefault: false, // furry stuff renderAnimals: true, From 77c3cccbc169598974f1db7f7a30af54cb5ed345 Mon Sep 17 00:00:00 2001 From: 7w1 Date: Wed, 1 Apr 2026 16:56:28 -0500 Subject: [PATCH 007/103] add dismiss button to messages --- .changeset/feat-dismiss-local-echo.md | 5 +++++ src/app/features/room/message/Message.tsx | 26 +++++++++++++++++++++++ 2 files changed, 31 insertions(+) create mode 100644 .changeset/feat-dismiss-local-echo.md diff --git a/.changeset/feat-dismiss-local-echo.md b/.changeset/feat-dismiss-local-echo.md new file mode 100644 index 000000000..4fa2adbb4 --- /dev/null +++ b/.changeset/feat-dismiss-local-echo.md @@ -0,0 +1,5 @@ +--- +default: minor +--- + +Add a "Dismiss" button to command response messages. diff --git a/src/app/features/room/message/Message.tsx b/src/app/features/room/message/Message.tsx index 4bfab3bbb..6a6a7340a 100644 --- a/src/app/features/room/message/Message.tsx +++ b/src/app/features/room/message/Message.tsx @@ -679,6 +679,7 @@ function MessageInternal( ); const MSG_CONTENT_STYLE = { maxWidth: '100%' }; + const isSableFeedback = mEvent.getId()?.startsWith('~sable-feedback-'); const msgContentJSX = ( )} + {isSableFeedback && ( + + + + Only you can see this. + + { + evt.preventDefault(); + evt.stopPropagation(); + const eventId = mEvent.getId(); + if (eventId) { + room.removeEvent(eventId); + room.emit(RoomEvent.LocalEchoUpdated, mEvent, room); + } + }} + > + Dismiss + + + )} ); From 81b0233c78fa3eef7fd98b814a873beb55402cb4 Mon Sep 17 00:00:00 2001 From: 7w1 Date: Wed, 1 Apr 2026 17:31:48 -0500 Subject: [PATCH 008/103] add focusId to setting --- src/app/features/settings/cosmetics/Themes.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/src/app/features/settings/cosmetics/Themes.tsx b/src/app/features/settings/cosmetics/Themes.tsx index e2868b61b..3e5c8cac1 100644 --- a/src/app/features/settings/cosmetics/Themes.tsx +++ b/src/app/features/settings/cosmetics/Themes.tsx @@ -507,6 +507,7 @@ export function Appearance() { Date: Wed, 1 Apr 2026 21:04:48 -0500 Subject: [PATCH 009/103] fix: Make scrolling in encrypted rooms with many PMP messages no longer "sticky" --- .changeset/fix-pmp-encrypted-sticky-scrolling.md | 5 +++++ src/app/features/room/message/Message.tsx | 5 ----- 2 files changed, 5 insertions(+), 5 deletions(-) create mode 100644 .changeset/fix-pmp-encrypted-sticky-scrolling.md diff --git a/.changeset/fix-pmp-encrypted-sticky-scrolling.md b/.changeset/fix-pmp-encrypted-sticky-scrolling.md new file mode 100644 index 000000000..df6d3b941 --- /dev/null +++ b/.changeset/fix-pmp-encrypted-sticky-scrolling.md @@ -0,0 +1,5 @@ +--- +default: patch +--- + +Fixed the "sticky scrolling" issue in encrypted rooms with many PMP messages. diff --git a/src/app/features/room/message/Message.tsx b/src/app/features/room/message/Message.tsx index 4bfab3bbb..27b456c18 100644 --- a/src/app/features/room/message/Message.tsx +++ b/src/app/features/room/message/Message.tsx @@ -396,11 +396,6 @@ function MessageInternal( triggerTimelineRegroup(); }; - if (mEvent.getClearContent()) { - setContentVersion((v) => (v === 0 ? 1 : v)); - triggerTimelineRegroup(); - } - mEvent.on(MatrixEventEvent.Decrypted, onUpdate); mEvent.on(MatrixEventEvent.Replaced, onUpdate); return () => { From a5251818d3b294e1356c398be43a9f6ba07ecb88 Mon Sep 17 00:00:00 2001 From: hazre Date: Thu, 2 Apr 2026 13:49:48 +0200 Subject: [PATCH 010/103] fix: preserve linkification in formatted body text --- src/app/components/message/RenderBody.tsx | 58 +++++++++++++++--- src/app/features/room/RoomTimeline.tsx | 2 +- src/app/features/room/ThreadDrawer.tsx | 2 +- .../plugins/react-custom-html-parser.test.tsx | 50 ++++++++++++++++ src/app/plugins/react-custom-html-parser.tsx | 59 +++++++++++++++---- 5 files changed, 148 insertions(+), 23 deletions(-) diff --git a/src/app/components/message/RenderBody.tsx b/src/app/components/message/RenderBody.tsx index ad027db22..fe73afe5b 100644 --- a/src/app/components/message/RenderBody.tsx +++ b/src/app/components/message/RenderBody.tsx @@ -1,12 +1,12 @@ import { MouseEventHandler, useEffect, useState } from 'react'; import parse, { HTMLReactParserOptions } from 'html-react-parser'; import Linkify from 'linkify-react'; -import { Opts } from 'linkifyjs'; +import { find, Opts } from 'linkifyjs'; import { PopOut, RectCords, Text, Tooltip, TooltipProvider, toRem } from 'folds'; import { sanitizeCustomHtml } from '$utils/sanitize'; import { highlightText, scaleSystemEmoji } from '$plugins/react-custom-html-parser'; import { useRoomAbbreviationsContext } from '$hooks/useRoomAbbreviations'; -import { splitByAbbreviations } from '$utils/abbreviations'; +import { splitByAbbreviations, TextSegment } from '$utils/abbreviations'; import { MessageEmptyContent } from './content'; function getRenderedBodyText(text: string, highlightRegex?: RegExp): (string | JSX.Element)[] { @@ -28,6 +28,47 @@ function renderLinkifiedBodyText( ); } +type RenderTextFn = (text: string, key?: string) => JSX.Element; + +function splitBodyTextByAbbreviations( + text: string, + abbrMap: Map, + linkifyOpts?: Opts +): TextSegment[] { + if (abbrMap.size === 0) return [{ id: 'txt-0', text }]; + + const linkMatches = find(text, linkifyOpts).filter((match) => match.isLink); + if (linkMatches.length === 0) return splitByAbbreviations(text, abbrMap); + + const segments: Array> = []; + let lastIndex = 0; + + linkMatches.forEach(({ start, end }) => { + if (start > lastIndex) { + splitByAbbreviations(text.slice(lastIndex, start), abbrMap).forEach( + ({ text: segmentText, termKey }) => { + segments.push({ text: segmentText, termKey }); + } + ); + } + + segments.push({ text: text.slice(start, end) }); + lastIndex = end; + }); + + if (lastIndex < text.length) { + splitByAbbreviations(text.slice(lastIndex), abbrMap).forEach( + ({ text: segmentText, termKey }) => { + segments.push({ text: segmentText, termKey }); + } + ); + } + + return segments.length > 0 + ? segments.map((segment, index) => ({ ...segment, id: `txt-${index}` })) + : [{ id: 'txt-0', text }]; +} + type AbbreviationTermProps = { text: string; definition: string; @@ -84,11 +125,12 @@ function AbbreviationTerm({ text, definition }: AbbreviationTermProps) { * extra closures in the common case). */ export function buildAbbrReplaceTextNode( - abbrMap: Map -): ((text: string) => JSX.Element | undefined) | undefined { + abbrMap: Map, + linkifyOpts?: Opts +): ((text: string, renderText: RenderTextFn) => JSX.Element | undefined) | undefined { if (abbrMap.size === 0) return undefined; - return function replaceTextNode(text: string) { - const segments = splitByAbbreviations(text, abbrMap); + return function replaceTextNode(text: string, renderText: RenderTextFn) { + const segments = splitBodyTextByAbbreviations(text, abbrMap, linkifyOpts); if (!segments.some((s) => s.termKey !== undefined)) return undefined; return ( <> @@ -100,7 +142,7 @@ export function buildAbbrReplaceTextNode( definition={abbrMap.get(seg.termKey) ?? ''} /> ) : ( - seg.text + renderText(seg.text, seg.id) ) )} @@ -130,7 +172,7 @@ export function RenderBody({ if (body === '') return ; if (abbrMap.size > 0) { - const segments = splitByAbbreviations(body, abbrMap); + const segments = splitBodyTextByAbbreviations(body, abbrMap, linkifyOpts); if (segments.some((s) => s.termKey !== undefined)) { return ( <> diff --git a/src/app/features/room/RoomTimeline.tsx b/src/app/features/room/RoomTimeline.tsx index c37c6d385..e703d0206 100644 --- a/src/app/features/room/RoomTimeline.tsx +++ b/src/app/features/room/RoomTimeline.tsx @@ -520,7 +520,7 @@ export function RoomTimeline({ handleMentionClick: mentionClickHandler, nicknames, autoplayEmojis, - replaceTextNode: buildAbbrReplaceTextNode(abbrMap), + replaceTextNode: buildAbbrReplaceTextNode(abbrMap, linkifyOpts), }), [ mx, diff --git a/src/app/features/room/ThreadDrawer.tsx b/src/app/features/room/ThreadDrawer.tsx index 73b6e7787..8d056addc 100644 --- a/src/app/features/room/ThreadDrawer.tsx +++ b/src/app/features/room/ThreadDrawer.tsx @@ -412,7 +412,7 @@ export function ThreadDrawer({ room, threadRootId, onClose, overlay }: ThreadDra handleSpoilerClick: spoilerClickHandler, handleMentionClick: mentionClickHandler, nicknames, - replaceTextNode: buildAbbrReplaceTextNode(abbrMap), + replaceTextNode: buildAbbrReplaceTextNode(abbrMap, linkifyOpts), }), [ mx, diff --git a/src/app/plugins/react-custom-html-parser.test.tsx b/src/app/plugins/react-custom-html-parser.test.tsx index 09a85ac1e..5d0e11e81 100644 --- a/src/app/plugins/react-custom-html-parser.test.tsx +++ b/src/app/plugins/react-custom-html-parser.test.tsx @@ -2,6 +2,7 @@ import { render, screen } from '@testing-library/react'; import parse from 'html-react-parser'; import { afterEach, describe, expect, it, vi } from 'vitest'; import * as customHtmlCss from '$styles/CustomHtml.css'; +import { buildAbbrReplaceTextNode } from '$components/message/RenderBody'; import { sanitizeCustomHtml } from '$utils/sanitize'; import { LINKIFY_OPTS, @@ -257,4 +258,53 @@ describe('react custom html parser', () => { expect(logSpy).not.toHaveBeenCalled(); }); + + it('linkifies bare urls in formatted html text nodes even when abbreviation replacement runs', () => { + const parserOptions = getReactCustomHtmlParser(createMatrixClient(), '!room:example.com', { + settingsLinkBaseUrl, + linkifyOpts: LINKIFY_OPTS, + handleMentionClick: undefined, + replaceTextNode: buildAbbrReplaceTextNode(new Map([['PR', 'Pull request']]), LINKIFY_OPTS), + }); + + render( +
+ {parse( + '

figured out the section could be removed; set up a PR for it: https://github.com/SableClient/Sable/pull/626

', + parserOptions + )} +
+ ); + + expect(screen.getByText('PR')).toBeInTheDocument(); + expect( + screen.getByRole('link', { + name: 'https://github.com/SableClient/Sable/pull/626', + }) + ).toHaveAttribute('href', 'https://github.com/SableClient/Sable/pull/626'); + }); + + it('keeps the full link intact when an abbreviation term appears inside the url token', () => { + const parserOptions = getReactCustomHtmlParser(createMatrixClient(), '!room:example.com', { + settingsLinkBaseUrl, + linkifyOpts: LINKIFY_OPTS, + handleMentionClick: undefined, + replaceTextNode: buildAbbrReplaceTextNode(new Map([['PR', 'Pull request']]), LINKIFY_OPTS), + }); + + render( +
+ {parse( + '

see https://github.com/SableClient/Sable/pull/PR/626 for context

', + parserOptions + )} +
+ ); + + expect( + screen.getByRole('link', { + name: 'https://github.com/SableClient/Sable/pull/PR/626', + }) + ).toHaveAttribute('href', 'https://github.com/SableClient/Sable/pull/PR/626'); + }); }); diff --git a/src/app/plugins/react-custom-html-parser.tsx b/src/app/plugins/react-custom-html-parser.tsx index c9749bd5a..c39ac976c 100644 --- a/src/app/plugins/react-custom-html-parser.tsx +++ b/src/app/plugins/react-custom-html-parser.tsx @@ -2,6 +2,7 @@ import { CSSProperties, ComponentPropsWithoutRef, + Fragment, ReactEventHandler, ReactNode, useMemo, @@ -500,14 +501,52 @@ export const getReactCustomHtmlParser = ( useAuthentication?: boolean; nicknames?: Nicknames; autoplayEmojis?: boolean; - replaceTextNode?: (text: string) => JSX.Element | undefined; + replaceTextNode?: ( + text: string, + renderText: (text: string, key?: string) => JSX.Element + ) => JSX.Element | undefined; } ): HTMLReactParserOptions => { const { replaceTextNode } = params; + + const shouldLinkifyDomText = (domNode: DOMText): boolean => + !(domNode.parent && 'name' in domNode.parent && domNode.parent.name === 'code') && + !(domNode.parent && 'name' in domNode.parent && domNode.parent.name === 'a'); + + const decorateText = (text: string) => { + let jsx = scaleSystemEmoji(text); + + if (params.highlightRegex) { + jsx = highlightText(params.highlightRegex, jsx); + } + + return jsx; + }; + + const renderReplacementText = (text: string, linkify: boolean, key?: string): JSX.Element => { + const decoratedText = decorateText(text); + + if (linkify) { + return ( + + {decoratedText} + + ); + } + + return {decoratedText}; + }; + const opts: HTMLReactParserOptions = { replace: (domNode) => { if (replaceTextNode && domNode instanceof DOMText) { - return replaceTextNode(domNode.data) ?? undefined; + const replacement = replaceTextNode(domNode.data, (text, key) => + renderReplacementText(text, shouldLinkifyDomText(domNode), key) + ); + + if (replacement !== undefined) { + return replacement; + } } if (domNode instanceof Element && 'name' in domNode) { const { name, attribs, children, parent } = domNode; @@ -839,20 +878,14 @@ export const getReactCustomHtmlParser = ( } if (domNode instanceof DOMText) { - const linkify = - !(domNode.parent && 'name' in domNode.parent && domNode.parent.name === 'code') && - !(domNode.parent && 'name' in domNode.parent && domNode.parent.name === 'a'); - - let jsx = scaleSystemEmoji(domNode.data); - - if (params.highlightRegex) { - jsx = highlightText(params.highlightRegex, jsx); - } + const linkify = shouldLinkifyDomText(domNode); + const decoratedText = decorateText(domNode.data); if (linkify) { - return {jsx}; + return {decoratedText}; } - return jsx; + + return decoratedText; } return undefined; }, From 00c454424a83f52e8ff965767de98bd4cd6f8c99 Mon Sep 17 00:00:00 2001 From: hazre Date: Thu, 2 Apr 2026 14:02:13 +0200 Subject: [PATCH 011/103] docs: add changeset for formatted body links --- .changeset/fix-formatted-body-linkify.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/fix-formatted-body-linkify.md diff --git a/.changeset/fix-formatted-body-linkify.md b/.changeset/fix-formatted-body-linkify.md new file mode 100644 index 000000000..cbd310aba --- /dev/null +++ b/.changeset/fix-formatted-body-linkify.md @@ -0,0 +1,5 @@ +--- +default: patch +--- + +Fixes links not being clickable in formatted messages, including messages that use abbreviations. From a2c6eeb1b7ffc0943904779f4e27aaf5193fa638 Mon Sep 17 00:00:00 2001 From: Shea Duma Date: Sun, 5 Apr 2026 05:42:40 +0300 Subject: [PATCH 012/103] fix invisible names --- .changeset/fix-hidden-names.md | 5 +++++ src/app/utils/room.ts | 5 +++++ 2 files changed, 10 insertions(+) create mode 100644 .changeset/fix-hidden-names.md diff --git a/.changeset/fix-hidden-names.md b/.changeset/fix-hidden-names.md new file mode 100644 index 000000000..b3aa8fb1a --- /dev/null +++ b/.changeset/fix-hidden-names.md @@ -0,0 +1,5 @@ +--- +default: patch +--- + +Fix some zero-width (invisible) names diff --git a/src/app/utils/room.ts b/src/app/utils/room.ts index 34fb527d8..b23a02f6f 100644 --- a/src/app/utils/room.ts +++ b/src/app/utils/room.ts @@ -529,6 +529,11 @@ export const getMemberDisplayName = ( const member = room.getMember(userId); const name = member?.rawDisplayName; if (name === userId) return undefined; + if ( + name?.replace(/[\p{Cc}\p{Cf}\u180B-\u180F\uFE00-\uFE0F\uE0100-\uE01EF\u200B-\u200D]/gu, '') + .length === 0 + ) + return undefined; return name; }; From 73c139f7190f7a2524ec8ea48cae2f93e72e4c9b Mon Sep 17 00:00:00 2001 From: Septicity Date: Sun, 5 Apr 2026 06:05:45 -0500 Subject: [PATCH 013/103] Re-introduce custom HTML formatting for long messages - The issue that this was originally removed to fix was actually only related to jumbo emojis. - Since I've kept the safety mechanisms for jumbo emojis, there should be no regression. --- .../fix-html-formatting-on-long-messages.md | 5 +++++ .../components/message/MsgTypeRenderers.tsx | 19 +++++-------------- 2 files changed, 10 insertions(+), 14 deletions(-) create mode 100644 .changeset/fix-html-formatting-on-long-messages.md diff --git a/.changeset/fix-html-formatting-on-long-messages.md b/.changeset/fix-html-formatting-on-long-messages.md new file mode 100644 index 000000000..2a34189b0 --- /dev/null +++ b/.changeset/fix-html-formatting-on-long-messages.md @@ -0,0 +1,5 @@ +--- +default: minor +--- + +Re-introduced custom HTML formatting for long messages diff --git a/src/app/components/message/MsgTypeRenderers.tsx b/src/app/components/message/MsgTypeRenderers.tsx index 6d1a63cce..7312a319d 100644 --- a/src/app/components/message/MsgTypeRenderers.tsx +++ b/src/app/components/message/MsgTypeRenderers.tsx @@ -97,15 +97,6 @@ export function MText({ edited, content, renderBody, renderUrlsPreview, style }: [customBody, body] ); - const safeCustomBody = useMemo(() => { - if (!customBody) return undefined; - if (customBody.length > 8000) { - const imageTags = customBody.match(/]*>/g); - return imageTags ? imageTags.join(' ') : undefined; - } - return customBody; - }, [customBody]); - const isForwarded = useMemo(() => { const forwardMeta = content['moe.sable.message.forward']; return typeof forwardMeta === 'object'; @@ -122,7 +113,7 @@ export function MText({ edited, content, renderBody, renderUrlsPreview, style }: const isJumbo = useMemo(() => { if (!trimmedBody || trimmedBody.length >= 500) return false; if ( - (unwrappedPerMessageProfileMessage ?? safeCustomBody)?.match( + (unwrappedPerMessageProfileMessage ?? customBody)?.match( /^(]*data-mx-emoticon[^>]*\/>){1,20}$/i ) ) @@ -130,12 +121,12 @@ export function MText({ edited, content, renderBody, renderUrlsPreview, style }: if (!JUMBO_EMOJI_REG.test(trimmedBody)) return false; if (trimmedBody.includes(':')) { - const hasImage = safeCustomBody && /]*>/i.test(safeCustomBody); + const hasImage = customBody && /]*>/i.test(customBody); if (!hasImage) return false; } return true; - }, [unwrappedPerMessageProfileMessage, trimmedBody, safeCustomBody]); + }, [unwrappedPerMessageProfileMessage, trimmedBody, customBody]); if (!body && !customBody) return ; @@ -175,13 +166,13 @@ export function MText({ edited, content, renderBody, renderUrlsPreview, style }: return ( <> {renderBody({ body: trimmedBody, - customBody: safeCustomBody, + customBody: typeof customBody === 'string' ? customBody : undefined, })} {edited && } From 88fffdbc4d3b398b817299340e1ebb69d428eb4f Mon Sep 17 00:00:00 2001 From: Shea Duma Date: Mon, 6 Apr 2026 03:00:32 +0300 Subject: [PATCH 014/103] added statuses to dms --- src/app/components/room-avatar/RoomAvatar.css.ts | 1 - src/app/features/room-nav/RoomNavItem.tsx | 12 ++++++++++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/src/app/components/room-avatar/RoomAvatar.css.ts b/src/app/components/room-avatar/RoomAvatar.css.ts index c9745a9aa..7cf6cad0d 100644 --- a/src/app/components/room-avatar/RoomAvatar.css.ts +++ b/src/app/components/room-avatar/RoomAvatar.css.ts @@ -5,7 +5,6 @@ export const RoomAvatar = style({ backgroundColor: color.Secondary.Container, color: color.Secondary.OnContainer, textTransform: 'capitalize', - selectors: { '&[data-image-loaded="true"]': { backgroundColor: 'transparent', diff --git a/src/app/features/room-nav/RoomNavItem.tsx b/src/app/features/room-nav/RoomNavItem.tsx index f9d279062..09f3e83b1 100644 --- a/src/app/features/room-nav/RoomNavItem.tsx +++ b/src/app/features/room-nav/RoomNavItem.tsx @@ -68,6 +68,7 @@ import { useCallPreferencesAtom } from '$state/hooks/callPreferences'; import { CallControlState } from '$plugins/call/CallControlState'; import { useAutoDiscoveryInfo } from '$hooks/useAutoDiscoveryInfo'; import { livekitSupport } from '$hooks/useLivekitSupport'; +import { useUserPresence } from '$hooks/useUserPresence'; import { RoomNavUser } from './RoomNavUser'; /** @@ -282,6 +283,8 @@ export function RoomNavItem({ const dmUserId = direct ? room.getAvatarFallbackMember()?.userId : undefined; const matrixRoomName = useRoomName(room); const roomName = (dmUserId && nicknames[dmUserId]) || matrixRoomName; + const presence = useUserPresence(dmUserId ?? ''); + const roomDescription = direct ? presence?.status : 'aaa'; const { navigateRoom } = useRoomNavigate(); const navigate = useNavigate(); @@ -413,15 +416,20 @@ export function RoomNavItem({ /> )} - + {roomName} + {roomDescription && ( + + {presence?.status} + + )} {!optionsVisible && !unread && !selected && typingMember.length > 0 && ( From 31fec891f7524c00213f1da4dcd63e475a951c4c Mon Sep 17 00:00:00 2001 From: Shea Duma Date: Mon, 6 Apr 2026 04:54:14 +0300 Subject: [PATCH 015/103] added presence and setting --- src/app/features/room-nav/RoomNavItem.tsx | 106 ++++++++++++------ .../features/settings/cosmetics/Themes.tsx | 10 ++ src/app/pages/client/direct/Direct.tsx | 2 + src/app/state/settings.ts | 2 + 4 files changed, 83 insertions(+), 37 deletions(-) diff --git a/src/app/features/room-nav/RoomNavItem.tsx b/src/app/features/room-nav/RoomNavItem.tsx index 09f3e83b1..15e615720 100644 --- a/src/app/features/room-nav/RoomNavItem.tsx +++ b/src/app/features/room-nav/RoomNavItem.tsx @@ -26,7 +26,12 @@ import { useNavigate } from 'react-router-dom'; import { NavButton, NavItem, NavItemContent, NavItemOptions } from '$components/nav'; import { UnreadBadge, UnreadBadgeCenter } from '$components/unread-badge'; import { RoomAvatar, RoomIcon } from '$components/room-avatar'; -import { getDirectRoomAvatarUrl, getRoomAvatarUrl, roomHaveUnread } from '$utils/room'; +import { + getDirectRoomAvatarUrl, + getRoomAvatarUrl, + getStateEvent, + roomHaveUnread, +} from '$utils/room'; import { nameInitials } from '$utils/common'; import { useMatrixClient } from '$hooks/useMatrixClient'; import { useRoomUnread } from '$state/hooks/unread'; @@ -68,7 +73,9 @@ import { useCallPreferencesAtom } from '$state/hooks/callPreferences'; import { CallControlState } from '$plugins/call/CallControlState'; import { useAutoDiscoveryInfo } from '$hooks/useAutoDiscoveryInfo'; import { livekitSupport } from '$hooks/useLivekitSupport'; -import { useUserPresence } from '$hooks/useUserPresence'; +import { Presence, useUserPresence } from '$hooks/useUserPresence'; +import { StateEvent } from '$types/matrix/room'; +import { AvatarPresence, PresenceBadge } from '$components/presence'; import { RoomNavUser } from './RoomNavUser'; /** @@ -256,6 +263,7 @@ type RoomNavItemProps = { notificationMode?: RoomNotificationMode; showAvatar?: boolean; direct?: boolean; + customDMCards?: boolean; }; export function RoomNavItem({ @@ -263,6 +271,7 @@ export function RoomNavItem({ selected, showAvatar, direct, + customDMCards, notificationMode, linkPath, }: RoomNavItemProps) { @@ -284,7 +293,13 @@ export function RoomNavItem({ const matrixRoomName = useRoomName(room); const roomName = (dmUserId && nicknames[dmUserId]) || matrixRoomName; const presence = useUserPresence(dmUserId ?? ''); - const roomDescription = direct ? presence?.status : 'aaa'; + const [topicEvent, setTopicEvent] = useState(getStateEvent(room, StateEvent.RoomTopic)); + + // Ensures that the description does not stick to the position the room is in the row + useEffect(() => setTopicEvent(getStateEvent(room, StateEvent.RoomTopic)), [room, setTopicEvent]); + const roomDescription = direct + ? (customDMCards && (topicEvent?.getContent().topic as string)) || presence?.status + : undefined; const { navigateRoom } = useRoomNavigate(); const navigate = useNavigate(); @@ -384,38 +399,47 @@ export function RoomNavItem({ - - {showAvatar ? ( - ( - - {nameInitials(roomName)} - - )} - /> - ) : ( - - )} - + + ) + } + > + + {showAvatar ? ( + ( + + {nameInitials(roomName)} + + )} + /> + ) : ( + + )} + + {roomDescription && ( - - {presence?.status} + + {roomDescription} )} diff --git a/src/app/features/settings/cosmetics/Themes.tsx b/src/app/features/settings/cosmetics/Themes.tsx index 3e5c8cac1..f543a19ea 100644 --- a/src/app/features/settings/cosmetics/Themes.tsx +++ b/src/app/features/settings/cosmetics/Themes.tsx @@ -481,6 +481,7 @@ function PageZoomInput() { export function Appearance() { const [twitterEmoji, setTwitterEmoji] = useSetting(settingsAtom, 'twitterEmoji'); + const [customDMCards, setCustomDMCards] = useSetting(settingsAtom, 'customDMCards'); const [showEasterEggs, setShowEasterEggs] = useSetting(settingsAtom, 'showEasterEggs'); const [closeFoldersByDefault, setCloseFoldersByDefault] = useSetting( settingsAtom, @@ -519,6 +520,15 @@ export function Appearance() { />
+ + } + /> + + Date: Mon, 6 Apr 2026 05:26:27 +0300 Subject: [PATCH 016/103] update all pages to show the right room image --- src/app/components/room-avatar/RoomAvatar.css.ts | 1 + src/app/features/common-settings/general/RoomProfile.tsx | 5 ++++- src/app/features/room-settings/RoomSettings.tsx | 5 ++++- src/app/features/room/RoomViewHeader.tsx | 3 ++- 4 files changed, 11 insertions(+), 3 deletions(-) diff --git a/src/app/components/room-avatar/RoomAvatar.css.ts b/src/app/components/room-avatar/RoomAvatar.css.ts index 7cf6cad0d..c9745a9aa 100644 --- a/src/app/components/room-avatar/RoomAvatar.css.ts +++ b/src/app/components/room-avatar/RoomAvatar.css.ts @@ -5,6 +5,7 @@ export const RoomAvatar = style({ backgroundColor: color.Secondary.Container, color: color.Secondary.OnContainer, textTransform: 'capitalize', + selectors: { '&[data-image-loaded="true"]': { backgroundColor: 'transparent', diff --git a/src/app/features/common-settings/general/RoomProfile.tsx b/src/app/features/common-settings/general/RoomProfile.tsx index cd523f32b..6425d4555 100644 --- a/src/app/features/common-settings/general/RoomProfile.tsx +++ b/src/app/features/common-settings/general/RoomProfile.tsx @@ -35,6 +35,8 @@ import { useFilePicker } from '$hooks/useFilePicker'; import { AsyncStatus, useAsyncCallback } from '$hooks/useAsyncCallback'; import { useAlive } from '$hooks/useAlive'; import { RoomPermissionsAPI } from '$hooks/useRoomPermissions'; +import { useSetting } from '$state/hooks/settings'; +import { settingsAtom } from '$state/settings'; type RoomProfileEditProps = { canEditAvatar: boolean; @@ -294,8 +296,9 @@ export function RoomProfile({ permissions }: RoomProfileProps) { const room = useRoom(); const directs = useAtomValue(mDirectAtom); const isDm = directs.has(room.roomId); + const [customDMCards] = useSetting(settingsAtom, 'customDMCards'); - const avatar = useRoomAvatar(room, directs.has(room.roomId)); + const avatar = useRoomAvatar(room, directs.has(room.roomId) && !customDMCards); const name = useRoomName(room); const topic = useRoomTopic(room); const joinRule = useRoomJoinRule(room); diff --git a/src/app/features/room-settings/RoomSettings.tsx b/src/app/features/room-settings/RoomSettings.tsx index 02fb0e849..def0d4483 100644 --- a/src/app/features/room-settings/RoomSettings.tsx +++ b/src/app/features/room-settings/RoomSettings.tsx @@ -17,6 +17,8 @@ import { Members } from '$features/common-settings/members'; import { EmojisStickers } from '$features/common-settings/emojis-stickers'; import { DeveloperTools } from '$features/common-settings/developer-tools'; import { Cosmetics } from '$features/common-settings/cosmetics/Cosmetics'; +import { settingsAtom } from '$state/settings'; +import { useSetting } from '$state/hooks/settings'; import { Permissions } from './permissions'; import { General } from './general'; import { RoomAbbreviations } from './abbreviations/RoomAbbreviations'; @@ -81,8 +83,9 @@ export function RoomSettings({ initialPage, requestClose }: RoomSettingsProps) { const mx = useMatrixClient(); const useAuthentication = useMediaAuthentication(); const mDirects = useAtomValue(mDirectAtom); + const [customDMCards] = useSetting(settingsAtom, 'customDMCards'); - const roomAvatar = useRoomAvatar(room, mDirects.has(room.roomId)); + const roomAvatar = useRoomAvatar(room, mDirects.has(room.roomId) && !customDMCards); const roomName = useRoomName(room); const joinRuleContent = useRoomJoinRule(room); diff --git a/src/app/features/room/RoomViewHeader.tsx b/src/app/features/room/RoomViewHeader.tsx index 8552332cf..921b517f9 100644 --- a/src/app/features/room/RoomViewHeader.tsx +++ b/src/app/features/room/RoomViewHeader.tsx @@ -350,6 +350,7 @@ export function RoomViewHeader({ callView }: Readonly<{ callView?: boolean }>) { const [menuAnchor, setMenuAnchor] = useState(); const [pinMenuAnchor, setPinMenuAnchor] = useState(); const direct = useIsDirectRoom(); + const [customDMCards] = useSetting(settingsAtom, 'customDMCards'); const [chat, setChat] = useAtom(callChatAtom); const [threadBrowserOpen, setThreadBrowserOpen] = useAtom( @@ -366,7 +367,7 @@ export function RoomViewHeader({ callView }: Readonly<{ callView?: boolean }>) { const encryptionEvent = useStateEvent(room, StateEvent.RoomEncryption); const encryptedRoom = !!encryptionEvent; - const avatarMxc = useRoomAvatar(room, direct); + const avatarMxc = useRoomAvatar(room, direct && !customDMCards); const name = useRoomName(room); const topic = useRoomTopic(room); const avatarUrl = avatarMxc From d92f47a96f6574d8d0ce686cdf44ff988977c956 Mon Sep 17 00:00:00 2001 From: Shea Duma Date: Mon, 6 Apr 2026 06:02:23 +0300 Subject: [PATCH 017/103] add changeset and statuses in member tile --- .changeset/feat-add-DM-statuses.md | 5 +++ .changeset/feat-add-custom-DM-looks.md | 5 +++ .changeset/feat-add-statuses-in-Members.md | 5 +++ src/app/components/member-tile/MemberTile.tsx | 40 ++++++++++++------- .../common-settings/members/Members.tsx | 8 +++- 5 files changed, 48 insertions(+), 15 deletions(-) create mode 100644 .changeset/feat-add-DM-statuses.md create mode 100644 .changeset/feat-add-custom-DM-looks.md create mode 100644 .changeset/feat-add-statuses-in-Members.md diff --git a/.changeset/feat-add-DM-statuses.md b/.changeset/feat-add-DM-statuses.md new file mode 100644 index 000000000..55e0aa3be --- /dev/null +++ b/.changeset/feat-add-DM-statuses.md @@ -0,0 +1,5 @@ +--- +default: minor +--- + +Add statuses to DMs diff --git a/.changeset/feat-add-custom-DM-looks.md b/.changeset/feat-add-custom-DM-looks.md new file mode 100644 index 000000000..a2df236d5 --- /dev/null +++ b/.changeset/feat-add-custom-DM-looks.md @@ -0,0 +1,5 @@ +--- +default: minor +--- + +Add custom DM images and descriptions diff --git a/.changeset/feat-add-statuses-in-Members.md b/.changeset/feat-add-statuses-in-Members.md new file mode 100644 index 000000000..9ea6f93ce --- /dev/null +++ b/.changeset/feat-add-statuses-in-Members.md @@ -0,0 +1,5 @@ +--- +default: minor +--- + +Add statuses to Member Tile diff --git a/src/app/components/member-tile/MemberTile.tsx b/src/app/components/member-tile/MemberTile.tsx index 9af782eef..40321c06d 100644 --- a/src/app/components/member-tile/MemberTile.tsx +++ b/src/app/components/member-tile/MemberTile.tsx @@ -7,6 +7,8 @@ import { useSableCosmetics } from '$hooks/useSableCosmetics'; import { useAtomValue } from 'jotai'; import { nicknamesAtom } from '$state/nicknames'; import { UserAvatar } from '$components/user-avatar'; +import { useUserPresence } from '$hooks/useUserPresence'; +import { AvatarPresence, PresenceBadge } from '$components/presence'; import * as css from './style.css'; const getName = (room: Room, member: RoomMember, nicknames: Record) => @@ -25,7 +27,7 @@ export const MemberTile = as<'button', MemberTileProps>( ({ as: AsMemberTile = 'button', mx, room, member, useAuthentication, after, ...props }, ref) => { const nicknames = useAtomValue(nicknamesAtom); const name = getName(room, member, nicknames); - const username = getMxIdLocalPart(member.userId); + const presence = useUserPresence(member.userId ?? ''); const avatarMxcUrl = member.getMxcAvatarUrl(); const avatarUrl = avatarMxcUrl @@ -37,23 +39,33 @@ export const MemberTile = as<'button', MemberTileProps>( return ( - - } - /> - + + ) : undefined + } + > + + } + /> + + {name} - - - {username} - - + {presence && presence.status && ( + + + {presence.status} + + + )} {after} diff --git a/src/app/features/common-settings/members/Members.tsx b/src/app/features/common-settings/members/Members.tsx index 19b8ffc46..678d29248 100644 --- a/src/app/features/common-settings/members/Members.tsx +++ b/src/app/features/common-settings/members/Members.tsx @@ -305,6 +305,7 @@ export function Members({ requestClose }: MembersProps) { if ('userId' in tagOrMember) { const server = getMxIdServer(tagOrMember.userId); + const username = getMxIdLocalPart(tagOrMember.userId); return ( + + ) From 3b2a7957235c287b8e55d3194d3d4f1964407e7a Mon Sep 17 00:00:00 2001 From: Shea Duma Date: Mon, 6 Apr 2026 07:06:27 +0300 Subject: [PATCH 018/103] move presence pill next to status in member drawer to avoid z-fighting --- src/app/components/member-tile/MemberTile.tsx | 27 +++++++------------ 1 file changed, 10 insertions(+), 17 deletions(-) diff --git a/src/app/components/member-tile/MemberTile.tsx b/src/app/components/member-tile/MemberTile.tsx index 40321c06d..b017890c4 100644 --- a/src/app/components/member-tile/MemberTile.tsx +++ b/src/app/components/member-tile/MemberTile.tsx @@ -39,28 +39,21 @@ export const MemberTile = as<'button', MemberTileProps>( return ( - - ) : undefined - } - > - - } - /> - - + + } + /> + {name} {presence && presence.status && ( - + + {presence.status} From 83f931148a416467bf8261edf22f08ac54f97b19 Mon Sep 17 00:00:00 2001 From: Shea Duma Date: Mon, 6 Apr 2026 07:15:18 +0300 Subject: [PATCH 019/103] making linter happi :smile: --- src/app/components/member-tile/MemberTile.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/components/member-tile/MemberTile.tsx b/src/app/components/member-tile/MemberTile.tsx index b017890c4..e30c226c7 100644 --- a/src/app/components/member-tile/MemberTile.tsx +++ b/src/app/components/member-tile/MemberTile.tsx @@ -8,7 +8,7 @@ import { useAtomValue } from 'jotai'; import { nicknamesAtom } from '$state/nicknames'; import { UserAvatar } from '$components/user-avatar'; import { useUserPresence } from '$hooks/useUserPresence'; -import { AvatarPresence, PresenceBadge } from '$components/presence'; +import { PresenceBadge } from '$components/presence'; import * as css from './style.css'; const getName = (room: Room, member: RoomMember, nicknames: Record) => From b7f46e10ca6bb08a3b4bf58fdc67b6bee8ede9a3 Mon Sep 17 00:00:00 2001 From: Evie Gauthier Date: Tue, 31 Mar 2026 10:47:08 -0400 Subject: [PATCH 020/103] fix(caddy): add cache-control headers for assets, sw.js, and index.html --- Caddyfile | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Caddyfile b/Caddyfile index 63fec50e6..d32ef3bb9 100644 --- a/Caddyfile +++ b/Caddyfile @@ -16,6 +16,13 @@ try_files {path} /index.html + # Content-hashed assets can be cached indefinitely — the filename changes on every build. + header /assets/* Cache-Control "public, max-age=31536000, immutable" + # Workbox SW must be revalidated on every load so the browser picks up updates. + header /sw.js Cache-Control "no-cache" + # index.html must not be cached so the browser always gets the latest app shell. + header /index.html Cache-Control "no-cache" + # Required for Sentry browser profiling (JS Self-Profiling API) header Document-Policy "js-profiling" } From 0b00dca282f2c61db1a10f8a0ccce582d7335c97 Mon Sep 17 00:00:00 2001 From: Evie Gauthier Date: Tue, 31 Mar 2026 12:27:20 -0400 Subject: [PATCH 021/103] chore: add changeset for caddy-cache-headers --- .changeset/caddy-cache-headers.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/caddy-cache-headers.md diff --git a/.changeset/caddy-cache-headers.md b/.changeset/caddy-cache-headers.md new file mode 100644 index 000000000..498db7463 --- /dev/null +++ b/.changeset/caddy-cache-headers.md @@ -0,0 +1,5 @@ +--- +default: patch +--- + +Add cache-control headers in Caddyfile for assets, service worker, and index.html From 202567bf058880a96d6afe90a552bd99cdf2ca3f Mon Sep 17 00:00:00 2001 From: Evie Gauthier Date: Mon, 6 Apr 2026 12:35:25 -0400 Subject: [PATCH 022/103] fix(pwa): re-enable Workbox precaching (remove if guard and injectionPoint override) --- src/sw.ts | 4 +--- vite.config.ts | 6 +++++- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/sw.ts b/src/sw.ts index bd09cd8d3..d843963bd 100644 --- a/src/sw.ts +++ b/src/sw.ts @@ -902,7 +902,5 @@ self.addEventListener('notificationclick', (event: NotificationEvent) => { ); }); -if (self.__WB_MANIFEST) { - precacheAndRoute(self.__WB_MANIFEST); -} +precacheAndRoute(self.__WB_MANIFEST); cleanupOutdatedCaches(); diff --git a/vite.config.ts b/vite.config.ts index a130df507..9b32ceac9 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -176,7 +176,11 @@ export default defineConfig(({ command }) => ({ injectRegister: false, manifest: false, injectManifest: { - injectionPoint: undefined, + // element-call is a self-contained embedded app; exclude its large assets + // from the SW precache manifest (they are not part of the Sable shell). + globIgnores: ['public/element-call/**'], + // The app's own crypto WASM and main bundle exceed the 2 MiB default. + maximumFileSizeToCacheInBytes: 10 * 1024 * 1024, // 10 MiB }, devOptions: { enabled: true, From 58176a610e4b23a6d0c39a83f2cd00f557326cb9 Mon Sep 17 00:00:00 2001 From: Evie Gauthier Date: Mon, 6 Apr 2026 12:35:26 -0400 Subject: [PATCH 023/103] chore: add changeset for workbox-precaching --- .changeset/workbox-precaching.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/workbox-precaching.md diff --git a/.changeset/workbox-precaching.md b/.changeset/workbox-precaching.md new file mode 100644 index 000000000..2537469a5 --- /dev/null +++ b/.changeset/workbox-precaching.md @@ -0,0 +1,5 @@ +--- +default: patch +--- + +Fix Workbox precaching by removing injectionPoint override that was silently disabling all precache entries From b3e434dbc21cfb09a48a6ddad228f06060baccba Mon Sep 17 00:00:00 2001 From: Evie Gauthier Date: Mon, 6 Apr 2026 12:51:03 -0400 Subject: [PATCH 024/103] feat(threads): thread drawer, thread browser, live reply counts, and unread badges --- src/app/features/room/RoomTimeline.tsx | 8 +- src/app/features/room/ThreadBrowser.tsx | 291 +++++- src/app/features/room/ThreadDrawer.css.ts | 2 + src/app/features/room/ThreadDrawer.tsx | 836 +++++++++--------- .../hooks/timeline/useProcessedTimeline.ts | 10 +- src/app/hooks/timeline/useTimelineActions.ts | 28 +- .../timeline/useTimelineEventRenderer.tsx | 88 +- src/app/hooks/useMessageEdit.ts | 49 + src/app/styles/overrides/General.css.ts | 4 +- src/client/initMatrix.ts | 2 + 10 files changed, 827 insertions(+), 491 deletions(-) create mode 100644 src/app/hooks/useMessageEdit.ts diff --git a/src/app/features/room/RoomTimeline.tsx b/src/app/features/room/RoomTimeline.tsx index e703d0206..3e5d162f6 100644 --- a/src/app/features/room/RoomTimeline.tsx +++ b/src/app/features/room/RoomTimeline.tsx @@ -32,6 +32,7 @@ import { MessageBase, CompactPlaceholder, DefaultPlaceholder } from '$components import { RoomIntro } from '$components/room-intro'; import { useMatrixClient } from '$hooks/useMatrixClient'; import { useAlive } from '$hooks/useAlive'; +import { useMessageEdit } from '$hooks/useMessageEdit'; import { useDocumentFocusChange } from '$hooks/useDocumentFocusChange'; import { markAsRead } from '$utils/notifications'; import { @@ -124,6 +125,8 @@ export function RoomTimeline({ }: Readonly) { const mx = useMatrixClient(); const alive = useAlive(); + + const { editId, handleEdit } = useMessageEdit(editor, { onReset: onEditorReset, alive }); const { navigateRoom } = useRoomNavigate(); const [hideReads] = useSetting(settingsAtom, 'hideReads'); @@ -166,7 +169,6 @@ export function RoomTimeline({ return myPowerLevel < sendLevel; }, [powerLevels, mx]); - const [editId, setEditId] = useState(); const [unreadInfo, setUnreadInfo] = useState(() => getRoomUnreadInfo(room, true)); const readUptoEventIdRef = useRef(undefined); @@ -460,7 +462,6 @@ export function RoomTimeline({ room, mx, editor, - alive, nicknames, globalProfiles, spaceId: optionalSpace?.roomId, @@ -469,8 +470,7 @@ export function RoomTimeline({ setReplyDraft, openThreadId, setOpenThread, - setEditId, - onEditorReset, + handleEdit, handleOpenEvent: (id) => { const evtTimeline = getEventTimeline(room, id); const absoluteIndex = evtTimeline diff --git a/src/app/features/room/ThreadBrowser.tsx b/src/app/features/room/ThreadBrowser.tsx index 0d9240c38..4cf718a8e 100644 --- a/src/app/features/room/ThreadBrowser.tsx +++ b/src/app/features/room/ThreadBrowser.tsx @@ -15,12 +15,21 @@ import { Icons, Input, Scroll, + Spinner, Text, Avatar, config, Chip, } from 'folds'; -import { MatrixEvent, Room, Thread, ThreadEvent } from '$types/matrix-sdk'; +import { + EventTimelineSet, + MatrixEvent, + NotificationCountType, + Room, + RoomEvent, + Thread, + ThreadEvent, +} from '$types/matrix-sdk'; import { useAtomValue } from 'jotai'; import { HTMLReactParserOptions } from 'html-react-parser'; import { Opts as LinkifyOpts } from 'linkifyjs'; @@ -54,6 +63,7 @@ import { makeMentionCustomProps, renderMatrixMention, } from '$plugins/react-custom-html-parser'; +import { UnreadBadge, UnreadBadgeCenter } from '$components/unread-badge'; import { EncryptedContent } from './message'; import * as css from './ThreadDrawer.css'; @@ -61,9 +71,10 @@ type ThreadPreviewProps = { room: Room; thread: Thread; onClick: (threadId: string) => void; + onJump?: () => void; }; -function ThreadPreview({ room, thread, onClick }: ThreadPreviewProps) { +function ThreadPreview({ room, thread, onClick, onJump }: ThreadPreviewProps) { const mx = useMatrixClient(); const useAuthentication = useMediaAuthentication(); const { navigateRoom } = useRoomNavigate(); @@ -121,8 +132,25 @@ function ThreadPreview({ room, thread, onClick }: ThreadPreviewProps) { (evt) => { evt.stopPropagation(); navigateRoom(room.roomId, thread.id); + onJump?.(); }, - [navigateRoom, room.roomId, thread.id] + [navigateRoom, room.roomId, thread.id, onJump] + ); + + const [, forceUnread] = useState(0); + useEffect(() => { + const onUnread = (_count: unknown, threadId?: string) => { + if (!threadId || threadId === thread.id) forceUnread((n) => n + 1); + }; + room.on(RoomEvent.UnreadNotifications as any, onUnread); + return () => { + room.off(RoomEvent.UnreadNotifications as any, onUnread); + }; + }, [room, thread.id]); + const unreadTotal = room.getThreadUnreadNotificationCount(thread.id, NotificationCountType.Total); + const unreadHighlight = room.getThreadUnreadNotificationCount( + thread.id, + NotificationCountType.Highlight ); const { rootEvent } = thread; @@ -134,9 +162,19 @@ function ThreadPreview({ room, thread, onClick }: ThreadPreviewProps) { const senderAvatarMxc = getMemberAvatarMxc(room, senderId); const getContent = (() => rootEvent.getContent()) as GetContentCallback; - const replyCount = thread.events.filter( + // Prefer a locally-counted reply count (based on events already in the thread + // timeline) but fall back to thread.length which is the server-reported count + // from bundled m.thread aggregations. This means that for threads discovered + // via fetchRoomThreads() whose timeline hasn't been paginated yet we still + // show the correct count rather than zero. + const localReplyCount = thread.events.filter( (ev: MatrixEvent) => ev.getId() !== thread.id && !reactionOrEditEvent(ev) ).length; + // Use Math.max so we never show fewer replies than the server reports. + // thread.length is the server-reported count from bundled m.thread aggregations; + // it may slightly overcount reactions but is far more accurate than a partial + // local cache (e.g. 5 loaded vs 22 on server). + const replyCount = Math.max(localReplyCount, thread.length ?? 0); const lastReply = thread.events .filter((ev: MatrixEvent) => ev.getId() !== thread.id && !reactionOrEditEvent(ev)) @@ -189,7 +227,12 @@ function ThreadPreview({ room, thread, onClick }: ThreadPreviewProps) { dateFormatString={dateFormatString} /> - + + {unreadTotal > 0 && ( + + 0} count={unreadTotal} /> + + )} Jump @@ -204,13 +247,7 @@ function ThreadPreview({ room, thread, onClick }: ThreadPreviewProps) { onClick={handleJumpClick} /> )} - + {() => { if (rootEvent.isRedacted()) { @@ -268,22 +305,165 @@ type ThreadBrowserProps = { }; export function ThreadBrowser({ room, onOpenThread, onClose, overlay }: ThreadBrowserProps) { + const mx = useMatrixClient(); const [, forceUpdate] = useState(0); const [query, setQuery] = useState(''); + const [loadingMore, setLoadingMore] = useState(false); + const [canLoadMore, setCanLoadMore] = useState(false); const searchRef = useRef(null); + const threadListTimelineSetRef = useRef(null); + const loadingMoreRef = useRef(false); + const canLoadMoreRef = useRef(false); + canLoadMoreRef.current = canLoadMore; - // Re-render when threads change. + // On mount, set up thread event listeners, create the server-side thread + // timeline sets, then fetch page 1 via paginate. The two operations are + // sequenced in a single effect so that createThreadsTimelineSets() always + // resolves before fetchRoomThreads() runs — the SDK's fetchRoomThreadList + // has an early-return guard (`if (this.threadsTimelineSets.length === 0)`) + // that silently no-ops when the sets haven't been created yet, so running + // both in parallel (the old two-effect approach) caused fetchRoomThreads to + // always be a no-op and left threadsReady=true prematurely. useEffect(() => { const onUpdate = () => forceUpdate((n) => n + 1); room.on(ThreadEvent.New as any, onUpdate); room.on(ThreadEvent.Update as any, onUpdate); room.on(ThreadEvent.NewReply as any, onUpdate); + + let cancelled = false; + const loadThreads = async () => { + setLoadingMore(true); + try { + // Create the timeline sets first — required before fetchRoomThreads(). + const sets = await room.createThreadsTimelineSets(); + if (!sets || cancelled) return; + const [allThreadsSet] = sets; + threadListTimelineSetRef.current = allThreadsSet; + + // Now fetch page 1 from the /threads endpoint. threadsTimelineSets is + // populated so fetchRoomThreadList will not early-return. + await room.fetchRoomThreads().catch((err: unknown) => { + // eslint-disable-next-line no-console + console.warn('ThreadBrowser: fetchRoomThreads failed', err); + }); + + // Paginate to load the first page into the timeline set. + const hasMore = await mx.paginateEventTimeline(allThreadsSet.getLiveTimeline(), { + backwards: true, + }); + // Ensure Thread objects exist for server-returned thread roots not yet + // known locally (threads outside the current sliding-sync window). + // fetchRoomThreads() creates Thread objects internally but uses + // room.findEventById() to set rootEvent — if the root event isn't in + // the sliding-sync cache, rootEvent ends up undefined, and + // ThreadPreview returns null for those threads. Backfill here using + // the event we already have from the threads timeline set. + allThreadsSet + .getLiveTimeline() + .getEvents() + .filter((event) => !!event.getId()) + .forEach((event) => { + const id = event.getId()!; + const existingThread = room.getThread(id); + + const bundled = (event.getUnsigned() as any)?.['m.relations']?.['m.thread']; + const bundledCount: number | undefined = + typeof bundled?.count === 'number' ? bundled.count : undefined; + if (!existingThread) { + room.createThread(id, event, [], false); + } else { + if (!existingThread.rootEvent) { + existingThread.rootEvent = event; + existingThread.setEventMetadata(event); + } + // Seed/update replyCount from bundled aggregations. This is needed + // for threads that were created by sliding-sync BEFORE fetchRoomThreads + // ran: SS delivers root events without bundled aggregations, so + // room.createThread() sets replyCount=0 and the SDK's fast-path + // ("replyCount===0 → initialEventsFetched=true, no server fetch") fires. + // Later, fetchRoomThreads() brings events WITH bundled counts, but + // createThread() is idempotent and returns the stale thread unchanged. + // Backfilling replyCount here lets ThreadPreview show the right count + // and lets Case C in ThreadDrawer know there are replies to fetch. + + if (bundledCount !== undefined && (existingThread as any).replyCount === 0) { + (existingThread as any).replyCount = bundledCount; + } + } + }); + if (!cancelled) { + setCanLoadMore(hasMore); + forceUpdate((n) => n + 1); + } + } catch { + // Server doesn't support thread list API; fall back to locally known threads. + } finally { + if (!cancelled) setLoadingMore(false); + } + }; + loadThreads(); + return () => { + cancelled = true; room.off(ThreadEvent.New as any, onUpdate); room.off(ThreadEvent.Update as any, onUpdate); room.off(ThreadEvent.NewReply as any, onUpdate); }; - }, [room]); + }, [room, mx]); + + const handleLoadMore = useCallback(async () => { + const tls = threadListTimelineSetRef.current; + if (!tls || loadingMore) return; + setLoadingMore(true); + try { + const hasMore = await mx.paginateEventTimeline(tls.getLiveTimeline(), { backwards: true }); + tls + .getLiveTimeline() + .getEvents() + .filter((event) => !!event.getId()) + .forEach((event) => { + const id = event.getId()!; + const existingThread = room.getThread(id); + + const bundled = (event.getUnsigned() as any)?.['m.relations']?.['m.thread']; + const bundledCount: number | undefined = + typeof bundled?.count === 'number' ? bundled.count : undefined; + if (!existingThread) { + room.createThread(id, event, [], false); + } else { + if (!existingThread.rootEvent) { + existingThread.rootEvent = event; + existingThread.setEventMetadata(event); + } + + if (bundledCount !== undefined && (existingThread as any).replyCount === 0) { + (existingThread as any).replyCount = bundledCount; + } + } + }); + setCanLoadMore(hasMore); + forceUpdate((n) => n + 1); + } catch { + // ignore + } finally { + setLoadingMore(false); + loadingMoreRef.current = false; + } + }, [mx, room, loadingMore]); + + const handleLoadMoreRef = useRef(handleLoadMore); + handleLoadMoreRef.current = handleLoadMore; + + const handleThreadsScroll = useCallback( + (e: React.UIEvent) => { + const el = e.currentTarget; + const distanceFromBottom = el.scrollHeight - el.scrollTop - el.clientHeight; + if (distanceFromBottom < 200 && canLoadMoreRef.current && !loadingMoreRef.current) { + handleLoadMoreRef.current(); + } + }, + [] + ); const allThreads = room.getThreads().sort((a: Thread, b: Thread) => { const aTs = a.events.at(-1)?.getTs() ?? a.rootEvent?.getTs() ?? 0; @@ -309,7 +489,7 @@ export function ThreadBrowser({ room, onOpenThread, onClose, overlay }: ThreadBr direction="Column" shrink="No" > -
+
@@ -317,9 +497,6 @@ export function ThreadBrowser({ room, onOpenThread, onClose, overlay }: ThreadBr - - # {room.name} - - {threads.length === 0 ? ( - - - - {lowerQuery ? 'No threads match your search.' : 'No threads yet.'} - - - ) : ( - - {threads.map((thread: Thread) => ( - - ))} - - )} + {(() => { + if (threads.length === 0 && loadingMore) + return ( + + + + ); + if (threads.length === 0) + return ( + + + + {lowerQuery ? 'No threads match your search.' : 'No threads yet.'} + + + ); + return ( + <> + + {threads.map((thread: Thread) => ( + + ))} + + {loadingMore && ( + + + + )} + + ); + })()} diff --git a/src/app/features/room/ThreadDrawer.css.ts b/src/app/features/room/ThreadDrawer.css.ts index 5cb755075..4b2d9c1a1 100644 --- a/src/app/features/room/ThreadDrawer.css.ts +++ b/src/app/features/room/ThreadDrawer.css.ts @@ -60,7 +60,9 @@ export const ThreadBrowserItem = style({ background: 'none', border: 'none', color: 'inherit', + overflow: 'hidden', ':hover': { backgroundColor: color.SurfaceVariant.Container, + transform: 'none', }, }); diff --git a/src/app/features/room/ThreadDrawer.tsx b/src/app/features/room/ThreadDrawer.tsx index 8d056addc..94e3ab1ed 100644 --- a/src/app/features/room/ThreadDrawer.tsx +++ b/src/app/features/room/ThreadDrawer.tsx @@ -1,6 +1,8 @@ import { MouseEventHandler, useCallback, useEffect, useMemo, useRef, useState } from 'react'; -import { Box, Header, Icon, IconButton, Icons, Scroll, Text, config } from 'folds'; +import { Box, Header, Icon, IconButton, Icons, Scroll, Spinner, Text, config } from 'folds'; import { + Direction, + IEvent, MatrixEvent, PushProcessor, ReceiptType, @@ -13,11 +15,6 @@ import { useAtomValue, useSetAtom } from 'jotai'; import { ReactEditor } from 'slate-react'; import { HTMLReactParserOptions } from 'html-react-parser'; import { Opts as LinkifyOpts } from 'linkifyjs'; -import { ImageContent, MSticker, RedactedContent, Reply } from '$components/message'; -import { RenderMessageContent } from '$components/RenderMessageContent'; -import { Image } from '$components/media'; -import { ImageViewer } from '$components/image-viewer'; -import { ClientSideHoverFreeze } from '$components/ClientSideHoverFreeze'; import { factoryRenderLinkifyWithMention, getReactCustomHtmlParser, @@ -25,26 +22,20 @@ import { makeMentionCustomProps, renderMatrixMention, } from '$plugins/react-custom-html-parser'; -import { - getEditedEvent, - getEventReactions, - getMemberDisplayName, - reactionOrEditEvent, -} from '$utils/room'; +import { getEditedEvent, getMemberDisplayName, reactionOrEditEvent } from '$utils/room'; import { getMxIdLocalPart, toggleReaction } from '$utils/matrix'; -import { minuteDifference } from '$utils/time'; import { useMatrixClient } from '$hooks/useMatrixClient'; import { useMediaAuthentication } from '$hooks/useMediaAuthentication'; import { useSettingsLinkBaseUrl } from '$features/settings/useSettingsLinkBaseUrl'; import { nicknamesAtom } from '$state/nicknames'; -import { MessageLayout, MessageSpacing, settingsAtom } from '$state/settings'; +import { settingsAtom } from '$state/settings'; import { useSetting } from '$state/hooks/settings'; import { useRoomAbbreviationsContext } from '$hooks/useRoomAbbreviations'; import { buildAbbrReplaceTextNode } from '$components/message/RenderBody'; import { createMentionElement, moveCursor, useEditor } from '$components/editor'; import { useMentionClickHandler } from '$hooks/useMentionClickHandler'; import { useSpoilerClickHandler } from '$hooks/useSpoilerClickHandler'; -import { GetContentCallback, MessageEvent, StateEvent } from '$types/matrix/room'; +import { MessageEvent, StateEvent } from '$types/matrix/room'; import { usePowerLevelsContext } from '$hooks/usePowerLevels'; import { useRoomPermissions } from '$hooks/useRoomPermissions'; import { useRoomCreators } from '$hooks/useRoomCreators'; @@ -52,7 +43,12 @@ import { useImagePackRooms } from '$hooks/useImagePackRooms'; import { useOpenUserRoomProfile } from '$state/hooks/userRoomProfile'; import { IReplyDraft, roomIdToReplyDraftAtomFamily } from '$state/room/roomInputDrafts'; import { roomToParentsAtom } from '$state/room/roomToParents'; -import { EncryptedContent, Message, Reactions } from './message'; +import { useIgnoredUsers } from '$hooks/useIgnoredUsers'; +import { useGetMemberPowerTag } from '$hooks/useMemberPowerTag'; +import { useMemberEventParser } from '$hooks/useMemberEventParser'; +import { useMessageEdit } from '$hooks/useMessageEdit'; +import { useProcessedTimeline, ProcessedEvent } from '$hooks/timeline/useProcessedTimeline'; +import { useTimelineEventRenderer } from '$hooks/timeline/useTimelineEventRenderer'; import { RoomInput } from './RoomInput'; import { RoomViewFollowing, RoomViewFollowingPlaceholder } from './RoomViewFollowing'; import * as css from './ThreadDrawer.css'; @@ -87,268 +83,6 @@ export function getThreadReplyEvents(room: Room, threadRootId: string): MatrixEv ); } -type ForwardedMessageProps = { - isForwarded: boolean; - originalTimestamp: number; - originalRoomId: string; - originalEventId: string; - originalEventPrivate: boolean; -}; - -type ThreadMessageProps = { - room: Room; - mEvent: MatrixEvent; - threadRootId: string; - editId: string | undefined; - onEditId: (id?: string) => void; - messageLayout: MessageLayout; - messageSpacing: MessageSpacing; - canDelete: boolean; - canSendReaction: boolean; - canPinEvent: boolean; - imagePackRooms: Room[]; - activeReplyId: string | undefined; - hour24Clock: boolean; - dateFormatString: string; - onUserClick: MouseEventHandler; - onUsernameClick: MouseEventHandler; - onReplyClick: MouseEventHandler; - onReactionToggle: (targetEventId: string, key: string, shortcode?: string) => void; - onResend?: (event: MatrixEvent) => void; - onDeleteFailedSend?: (event: MatrixEvent) => void; - pushProcessor: PushProcessor; - linkifyOpts: LinkifyOpts; - htmlReactParserOptions: HTMLReactParserOptions; - showHideReads: boolean; - showDeveloperTools: boolean; - onReferenceClick: MouseEventHandler; - jumpToEventId?: string; - collapse?: boolean; -}; - -function ThreadMessage({ - room, - threadRootId: threadRootIdProp, - mEvent, - editId, - onEditId, - messageLayout, - messageSpacing, - canDelete, - canSendReaction, - collapse = false, - canPinEvent, - imagePackRooms, - activeReplyId, - hour24Clock, - dateFormatString, - onUserClick, - onUsernameClick, - onReplyClick, - onReactionToggle, - onResend, - onDeleteFailedSend, - pushProcessor, - linkifyOpts, - htmlReactParserOptions, - showHideReads, - showDeveloperTools, - onReferenceClick, - jumpToEventId, -}: ThreadMessageProps) { - // Use the thread's own timeline set so reactions/edits on thread events are found correctly - const threadTimelineSet = room.getThread(threadRootIdProp)?.timelineSet; - const timelineSet = threadTimelineSet ?? room.getUnfilteredTimelineSet(); - const mEventId = mEvent.getId()!; - const senderId = mEvent.getSender() ?? ''; - const nicknames = useAtomValue(nicknamesAtom); - const senderDisplayName = - getMemberDisplayName(room, senderId, nicknames) ?? getMxIdLocalPart(senderId) ?? senderId; - - const [mediaAutoLoad] = useSetting(settingsAtom, 'mediaAutoLoad'); - const [urlPreview] = useSetting(settingsAtom, 'urlPreview'); - const [encUrlPreview] = useSetting(settingsAtom, 'encUrlPreview'); - const showUrlPreview = room.hasEncryptionStateEvent() ? encUrlPreview : urlPreview; - const [autoplayStickers] = useSetting(settingsAtom, 'autoplayStickers'); - - const editedEvent = getEditedEvent(mEventId, mEvent, timelineSet); - const editedNewContent = editedEvent?.getContent()['m.new_content']; - const baseContent = mEvent.getContent(); - const safeContent = - Object.keys(baseContent).length > 0 ? baseContent : mEvent.getOriginalContent(); - const getContent = (() => editedNewContent ?? safeContent) as GetContentCallback; - - const reactionRelations = getEventReactions(timelineSet, mEventId); - const reactions = reactionRelations?.getSortedAnnotationsByKey(); - const hasReactions = reactions && reactions.length > 0; - - const pushActions = pushProcessor.actionsForEvent(mEvent); - let notifyHighlight: 'silent' | 'loud' | undefined; - if (pushActions?.notify && pushActions.tweaks?.highlight) { - notifyHighlight = pushActions.tweaks?.sound ? 'loud' : 'silent'; - } - - // Extract message forwarding info - const forwardContent = safeContent['moe.sable.message.forward'] as - | { - original_timestamp?: unknown; - original_room_id?: string; - original_event_id?: string; - original_event_private?: boolean; - } - | undefined; - - const messageForwardedProps: ForwardedMessageProps | undefined = forwardContent - ? { - isForwarded: true, - originalTimestamp: - typeof forwardContent.original_timestamp === 'number' - ? forwardContent.original_timestamp - : mEvent.getTs(), - originalRoomId: forwardContent.original_room_id ?? room.roomId, - originalEventId: forwardContent.original_event_id ?? '', - originalEventPrivate: forwardContent.original_event_private ?? false, - } - : undefined; - - const { replyEventId } = mEvent; - - const relation = mEvent.getRelation(); - const contentRelatesTo = mEvent.getContent()?.['m.relates_to']; - const isFallback = - relation?.is_falling_back === true || contentRelatesTo?.is_falling_back === true; - - return ( - - ) - } - reactions={ - hasReactions ? ( - - ) : undefined - } - > - {mEvent.isRedacted() ? ( - - ) : ( - - {() => { - if (mEvent.isRedacted()) - return ( - - ); - - if (mEvent.getType() === MessageEvent.Sticker) - return ( - ( - { - if (!autoplayStickers && p.src) { - return ( - - - - ); - } - return ; - }} - renderViewer={(p) => } - /> - )} - /> - ); - - if (mEvent.getType() === MessageEvent.RoomMessage) { - return ( - - ); - } - - return ( - - ); - }} - - )} - - ); -} - type ThreadDrawerProps = { room: Room; threadRootId: string; @@ -360,12 +94,25 @@ export function ThreadDrawer({ room, threadRootId, onClose, overlay }: ThreadDra const mx = useMatrixClient(); const drawerRef = useRef(null); const editor = useEditor(); - const [, forceUpdate] = useState(0); - const [editId, setEditId] = useState(undefined); + const [forceUpdateCounter, forceUpdate] = useState(0); const [jumpToEventId, setJumpToEventId] = useState(undefined); + const [loadingOlderReplies, setLoadingOlderReplies] = useState(false); + const [canPageBack, setCanPageBack] = useState(true); + // Ref guard so the auto-paginate effect never starts a second concurrent request. + const paginatingOlderRef = useRef(false); const scrollRef = useRef(null); const prevReplyCountRef = useRef(0); - const replyEventsRef = useRef([]); + const processedEventsRef = useRef([]); + // Track whether we've already attempted a server fetch for a given threadRootId. + // Prevents infinite re-fetch loops on genuinely empty threads while still + // allowing the first fetch even when thread.length === 0 (sliding sync case + // where bundled aggregations are absent so replyCount defaults to 0). + const serverFetchAttemptedRef = useRef(null); + // True while the viewport auto-fill is actively paginating backwards. + // Used so the auto-scroll effect keeps the user anchored to the bottom + // (showing latest replies) while older content is prepended at the top. + const autoFillInProgressRef = useRef(false); + const { editId, handleEdit } = useMessageEdit(editor); const nicknames = useAtomValue(nicknamesAtom); const pushProcessor = useMemo(() => new PushProcessor(mx), [mx]); const useAuthentication = useMediaAuthentication(); @@ -380,6 +127,20 @@ export function ThreadDrawer({ room, threadRootId, onClose, overlay }: ThreadDra const [dateFormatString] = useSetting(settingsAtom, 'dateFormatString'); const [hideReads] = useSetting(settingsAtom, 'hideReads'); const [showDeveloperTools] = useSetting(settingsAtom, 'developerTools'); + const [mediaAutoLoad] = useSetting(settingsAtom, 'mediaAutoLoad'); + const [urlPreview] = useSetting(settingsAtom, 'urlPreview'); + const [encUrlPreview] = useSetting(settingsAtom, 'encUrlPreview'); + const [clientUrlPreview] = useSetting(settingsAtom, 'clientUrlPreview'); + const [encClientUrlPreview] = useSetting(settingsAtom, 'encClientUrlPreview'); + const [autoplayStickers] = useSetting(settingsAtom, 'autoplayStickers'); + const [autoplayEmojis] = useSetting(settingsAtom, 'autoplayEmojis'); + const [showHiddenEvents] = useSetting(settingsAtom, 'showHiddenEvents'); + const [showTombstoneEvents] = useSetting(settingsAtom, 'showTombstoneEvents'); + const [hideMemberInReadOnly] = useSetting(settingsAtom, 'hideMembershipInReadOnly'); + const showUrlPreview = room.hasEncryptionStateEvent() ? encUrlPreview : urlPreview; + const showClientUrlPreview = room.hasEncryptionStateEvent() + ? clientUrlPreview && encClientUrlPreview + : clientUrlPreview; // Memoized parsing options const linkifyOpts = useMemo( @@ -412,6 +173,7 @@ export function ThreadDrawer({ room, threadRootId, onClose, overlay }: ThreadDra handleSpoilerClick: spoilerClickHandler, handleMentionClick: mentionClickHandler, nicknames, + autoplayEmojis, replaceTextNode: buildAbbrReplaceTextNode(abbrMap, linkifyOpts), }), [ @@ -423,6 +185,7 @@ export function ThreadDrawer({ room, threadRootId, onClose, overlay }: ThreadDra useAuthentication, nicknames, settingsLinkBaseUrl, + autoplayEmojis, abbrMap, ] ); @@ -435,6 +198,17 @@ export function ThreadDrawer({ room, threadRootId, onClose, overlay }: ThreadDra const canDeleteOwn = permissions.event(MessageEvent.RoomRedaction, mx.getSafeUserId()); const canSendReaction = permissions.event(MessageEvent.Reaction, mx.getSafeUserId()); const canPinEvent = permissions.stateEvent(StateEvent.RoomPinnedEvents, mx.getSafeUserId()); + const isReadOnly = useMemo(() => { + const myPowerLevel = powerLevels?.users?.[mx.getUserId()!] ?? powerLevels?.users_default ?? 0; + const sendLevel = powerLevels?.events?.['m.room.message'] ?? powerLevels?.events_default ?? 0; + return myPowerLevel < sendLevel; + }, [powerLevels, mx]); + const getMemberPowerTag = useGetMemberPowerTag(room, creators, powerLevels); + const parseMemberEvent = useMemberEventParser(); + + // Ignored users + const ignoredUsersList = useIgnoredUsers(); + const ignoredUsersSet = useMemo(() => new Set(ignoredUsersList), [ignoredUsersList]); // Image packs const roomToParents = useAtomValue(roomToParentsAtom); @@ -448,31 +222,116 @@ export function ThreadDrawer({ room, threadRootId, onClose, overlay }: ThreadDra // User profile popup const openUserRoomProfile = useOpenUserRoomProfile(); - const rootEvent = room.findEventById(threadRootId); + // Thread timeline data for useProcessedTimeline + const thread = room.getThread(threadRootId); + const threadTimeline = thread?.timelineSet.getLiveTimeline(); - // When the drawer is opened with classic sync (no server-side thread support), - // room.createThread() may have been called with empty initialEvents so - // thread.events only has the root. Backfill events from the main room - // timeline so the authoritative source is populated for subsequent renders. + // Prefer the event from the main timeline (already indexed), but fall back + // to thread.rootEvent — populated from bundled /threads server data even when + // the root is outside the currently-loaded timeline window. + const rootEvent = room.findEventById(threadRootId) ?? thread?.rootEvent; + const totalEvents = threadTimeline?.getEvents().length ?? 0; + const linkedTimelines = useMemo( + () => (threadTimeline ? [threadTimeline] : []), + // eslint-disable-next-line react-hooks/exhaustive-deps + [threadTimeline, totalEvents] + ); + const items = useMemo(() => Array.from({ length: totalEvents }, (_, i) => i), [totalEvents]); + + const processedEvents = useProcessedTimeline({ + items, + linkedTimelines, + skipThreadFilter: true, + ignoredUsersSet, + showHiddenEvents, + showTombstoneEvents, + mxUserId: mx.getUserId(), + readUptoEventId: undefined, + hideMembershipEvents: true, + hideNickAvatarEvents: true, + isReadOnly, + hideMemberInReadOnly, + }); + + // When the thread's own timeline is empty (server-side threads not yet fetched, + // or classic sync before backfill completes), fall back to scanning the main + // room timeline directly so replies are shown immediately. + const displayReplies = useMemo((): ProcessedEvent[] => { + const filtered = processedEvents.filter((e) => e.id !== threadRootId); + if (filtered.length > 0) return filtered; + const timelineSet = thread?.timelineSet ?? room.getUnfilteredTimelineSet(); + return getThreadReplyEvents(room, threadRootId).map((ev, idx) => ({ + id: ev.getId()!, + itemIndex: idx, + mEvent: ev, + timelineSet, + eventSender: ev.getSender() ?? null, + collapsed: false, + willRenderNewDivider: false, + willRenderDayDivider: false, + })); + // forceUpdateCounter makes this recompute whenever events arrive + // eslint-disable-next-line react-hooks/exhaustive-deps + }, [room, threadRootId, thread, processedEvents, forceUpdateCounter]); + + processedEventsRef.current = displayReplies; + + const processedReplies = displayReplies; + + // Ensure the Thread object exists and has its reply events loaded. // - // IMPORTANT: skip this backfill when server-side thread support is active - // (initialEventsFetched starts false). In that case the SDK will call - // updateThreadMetadata() → resetLiveTimeline() + paginateEventTimeline() - // automatically. Calling thread.addEvents() ourselves first would trigger - // that same cascade prematurely and cause a flood of - // "EventTimelineSet.addEventToTimeline: Ignoring event=…" warnings because - // canContain() fails while the timeline is in the middle of being reset and - // repopulated. + // Case A — no Thread object yet (e.g. root event was loaded via jump/backward + // pagination but the SDK hasn't created a Thread shell for it): + // Call room.createThread() so the SDK constructor kicks off + // updateThreadMetadata() → resetLiveTimeline() + paginateEventTimeline() + // automatically. ThreadEvent.Update fires when done → forceUpdate → re-render. + // DO NOT call resetLiveTimeline() or paginateEventTimeline() ourselves — + // that would race with the SDK's own initialization and cause a flood of + // "Ignoring event … does not belong in timeline" warnings. + // + // If the root is also outside the local timeline (e.g. a thread discovered + // via ThreadBrowser but whose root predates the sliding-sync window), we + // fetch it bare with fetchRoomEvent — this does NOT add it to the main + // room timeline or cause any TimelineRefresh side-effects. + // + // Case B — Thread exists but initialEventsFetched is false (server-side thread + // support active; SDK's updateThreadMetadata() is running): + // Do nothing — the SDK will fire ThreadEvent.Update when done. + // + // Case C — Thread exists, initialEventsFetched is true (classic sync or SDK + // has already finished initialising): + // With classic sync the SDK never paginates thread timelines, so we backfill + // from the main live timeline. With server-side threads the SDK already + // populated thread.events; this block is a no-op in that case. useEffect(() => { - const thread = room.getThread(threadRootId); - if (!thread) return; - // initialEventsFetched === false ↔ Thread.hasServerSideSupport is set. - // The SDK handles initialization itself; our manual backfill must not run. - if (!thread.initialEventsFetched) return; - const hasRepliesInThread = thread.events.some( + // Case A: create thread shell; SDK handles the rest asynchronously. + if (!room.getThread(threadRootId)) { + const localRoot = room.findEventById(threadRootId); + if (localRoot) { + room.createThread(threadRootId, localRoot, [], false); + } else { + // Root not in local timeline — fetch it from the server without + // touching the main timeline (no TimelineRefresh side-effect). + mx.fetchRoomEvent(room.roomId, threadRootId) + .then((rawEvt) => { + if (room.getThread(threadRootId)) return; // created concurrently + room.createThread(threadRootId, new MatrixEvent(rawEvt as IEvent), [], false); + }) + .catch(() => {}); + } + } + + const currThread = room.getThread(threadRootId); + // Case B: SDK is actively initialising — don't interfere. + if (!currThread || !currThread.initialEventsFetched) return; + + // Case C: SDK is done (or classic sync). Backfill from live timeline if + // thread.events is still empty (classic sync path; server-side was already + // populated by paginateEventTimeline inside updateThreadMetadata). + const hasRepliesInThread = currThread.events.some( (ev) => ev.getId() !== threadRootId && !reactionOrEditEvent(ev) ); - if (hasRepliesInThread) return; // already populated, nothing to do + if (hasRepliesInThread) return; const liveEvents = room .getUnfilteredTimelineSet() @@ -485,9 +344,44 @@ export function ThreadDrawer({ room, threadRootId, onClose, overlay }: ThreadDra !reactionOrEditEvent(ev) ); if (liveEvents.length > 0) { - thread.addEvents(liveEvents, false); + // thread.addEvents() is typed as void but is internally async; schedule + // forceUpdate in a microtask so the timeline has been updated first. + currThread.addEvents(liveEvents, false); + Promise.resolve().then(() => forceUpdate((n) => n + 1)); + return; } - }, [room, threadRootId]); + + // No local events anywhere. We always attempt one server fetch here because + // with sliding sync the server omits bundled aggregations from subscription + // timeline events, leaving thread.replyCount at 0 even when the server has + // replies (the old `if (!currThread.length) return` guard incorrectly bailed + // out in that case). We use serverFetchAttemptedRef to ensure we only try + // once per threadRootId — if the paginate truly returns nothing, the ref + // prevents an infinite re-fetch loop. + if (serverFetchAttemptedRef.current === threadRootId) return; + serverFetchAttemptedRef.current = threadRootId; + + // Do NOT call resetLiveTimeline() here. Resetting a thread timeline emits + // RoomEvent.TimelineReset on the thread's EventTimelineSet; Thread's own + // onTimelineReset handler then awaits processRootEventPromise (a live + // fetchRootEvent network call). If that promise is still pending this + // creates a deadlock that hangs and eventually crashes the app — observed + // on both classic sync and sliding sync. + // + // Calling paginateEventTimeline directly is safe: the thread's back-token + // is null (set by the fast path when replyCount was 0 at construction), but + // the SDK maps null → undefined for the `from` parameter and calls + // fetchRelations without a cursor, which correctly fetches the latest + // replies from the server. + mx.paginateEventTimeline(currThread.timelineSet.getLiveTimeline(), { backwards: true }) + .then(() => forceUpdate((n) => n + 1)) + .catch(() => {}); + // forceUpdateCounter must be in deps so this effect re-runs after + // ThreadEvent.Update fires (which flips initialEventsFetched from false to + // true). Without it the effect runs once on mount, hits Case B + // (initialEventsFetched=false) and never runs again — leaving the drawer + // empty on sliding sync where replyCount starts at 0. + }, [mx, room, threadRootId, forceUpdate, forceUpdateCounter]); // Re-render when new thread events arrive (including reactions via ThreadEvent.Update). useEffect(() => { @@ -542,10 +436,10 @@ export function ThreadDrawer({ room, threadRootId, onClose, overlay }: ThreadDra // Mark thread as read when viewing it useEffect(() => { const markThreadAsRead = async () => { - const thread = room.getThread(threadRootId); - if (!thread) return; + const currentThread = room.getThread(threadRootId); + if (!currentThread) return; - const events = thread.events || []; + const events = currentThread.events || []; if (events.length === 0) return; const lastEvent = events[events.length - 1]; @@ -554,7 +448,7 @@ export function ThreadDrawer({ room, threadRootId, onClose, overlay }: ThreadDra const userId = mx.getUserId(); if (!userId) return; - const readUpToId = thread.getEventReadUpTo(userId, false); + const readUpToId = currentThread.getEventReadUpTo(userId, false); const lastEventId = lastEvent.getId(); // Only send receipt if we haven't already read up to the last event @@ -570,22 +464,90 @@ export function ThreadDrawer({ room, threadRootId, onClose, overlay }: ThreadDra // Mark as read when opened and when new messages arrive markThreadAsRead(); - }, [mx, room, threadRootId, forceUpdate]); + }, [mx, room, threadRootId, forceUpdateCounter]); const replyEvents = getThreadReplyEvents(room, threadRootId); + const isThreadLoading = !!thread && !thread.initialEventsFetched && replyEvents.length === 0; - replyEventsRef.current = replyEvents; + const hasOlderReplies = + canPageBack && + !!thread?.initialEventsFetched && + thread?.timelineSet.getLiveTimeline().getPaginationToken(Direction.Backward) != null; - // Auto-scroll to bottom when event count grows (if the user is near the bottom). + // Keep a ref so the scroll handler always reads the latest value without deps. + const hasOlderRepliesRef = useRef(hasOlderReplies); + hasOlderRepliesRef.current = hasOlderReplies; + + const loadOlderReplies = useCallback(() => { + const t = room.getThread(threadRootId); + if (!t || !t.initialEventsFetched || paginatingOlderRef.current) return; + paginatingOlderRef.current = true; + setLoadingOlderReplies(true); + mx.paginateEventTimeline(t.timelineSet.getLiveTimeline(), { backwards: true }) + .then((hasMore) => { + paginatingOlderRef.current = false; + if (!hasMore) setCanPageBack(false); + setLoadingOlderReplies(false); + forceUpdate((n) => n + 1); + }) + .catch(() => { + paginatingOlderRef.current = false; + setLoadingOlderReplies(false); + }); + }, [mx, room, threadRootId, forceUpdate]); + + const loadOlderRepliesRef = useRef(loadOlderReplies); + loadOlderRepliesRef.current = loadOlderReplies; + + useEffect(() => { + setCanPageBack(true); + autoFillInProgressRef.current = false; + }, [threadRootId]); + + const handleRepliesScroll = useCallback(() => { + const el = scrollRef.current; + if (!el) return; + if (el.scrollTop < 200 && hasOlderRepliesRef.current && !paginatingOlderRef.current) { + loadOlderRepliesRef.current(); + } + }, []); + + // Auto-scroll to bottom when event count grows. + // During viewport auto-fill (autoFillInProgressRef) we ALWAYS scroll to the + // bottom: older messages are prepended at the top, so scrollTop stays at 0 + // (clamped), and when content first overflows the isAtBottom check would be + // false — leaving the user staring at the oldest messages instead of the + // latest ones. useEffect(() => { const el = scrollRef.current; if (!el) return; const isAtBottom = el.scrollHeight - el.scrollTop - el.clientHeight < 150; - if (prevReplyCountRef.current === 0 || isAtBottom) { + if (prevReplyCountRef.current === 0 || isAtBottom || autoFillInProgressRef.current) { el.scrollTop = el.scrollHeight; } - prevReplyCountRef.current = replyEvents.length; - }, [replyEvents.length]); + prevReplyCountRef.current = processedReplies.length; + }, [processedReplies.length]); + + // Auto-fill viewport: paginate backwards until content overflows the scroll + // container, then stop. The scroll handler (handleRepliesScroll) loads more + // when the user scrolls back up past the top threshold. + useEffect(() => { + if (paginatingOlderRef.current) return; + const el = scrollRef.current; + if (!el) return; + if (!hasOlderReplies) { + autoFillInProgressRef.current = false; + return; + } + if (el.scrollHeight <= el.clientHeight) { + // Content doesn't yet fill the viewport — paginate one more page. + autoFillInProgressRef.current = true; + loadOlderRepliesRef.current(); + } else { + // Content now overflows — fill is complete. + autoFillInProgressRef.current = false; + } + }, [processedReplies.length, hasOlderReplies]); const handleUserClick: MouseEventHandler = useCallback( (evt) => { @@ -677,16 +639,29 @@ export function ThreadDrawer({ room, threadRootId, onClose, overlay }: ThreadDra [mx, room, threadRootId] ); - const handleEdit = useCallback( - (evtId?: string) => { - setEditId(evtId); - if (!evtId) { - ReactEditor.focus(editor); - moveCursor(editor); + const handleEditLastMessage = useCallback(() => { + const userId = mx.getUserId(); + const ownReply = [...processedEventsRef.current] + .reverse() + .find( + (e) => + e.id !== threadRootId && + e.mEvent.getSender() === userId && + !e.mEvent.isRedacted() && + !reactionOrEditEvent(e.mEvent) + ); + const ownId = ownReply?.id; + if (ownId) { + handleEdit(ownId); + const el = drawerRef.current; + if (el) { + el.querySelector(`[data-message-id="${ownId}"]`)?.scrollIntoView({ + block: 'nearest', + behavior: 'smooth', + }); } - }, - [editor] - ); + } + }, [mx, threadRootId, handleEdit]); const handleResend = useCallback( (event: MatrixEvent) => { @@ -707,7 +682,7 @@ export function ThreadDrawer({ room, threadRootId, onClose, overlay }: ThreadDra const targetId = evt.currentTarget.getAttribute('data-event-id'); if (!targetId) return; const isRoot = targetId === threadRootId; - const isInReplies = replyEventsRef.current.some((e) => e.getId() === targetId); + const isInReplies = processedEventsRef.current.some((e) => e.id === targetId); if (!isRoot && !isInReplies) return; setJumpToEventId(targetId); setTimeout(() => setJumpToEventId(undefined), 2500); @@ -720,42 +695,63 @@ export function ThreadDrawer({ room, threadRootId, onClose, overlay }: ThreadDra [threadRootId] ); - const sharedMessageProps = { + // Map jumpToEventId to a focusItem index for useTimelineEventRenderer highlighting + const jumpIndex = jumpToEventId ? processedEvents.findIndex((e) => e.id === jumpToEventId) : -1; + const focusItem = + jumpIndex >= 0 + ? { index: processedEvents[jumpIndex].itemIndex, highlight: true, scrollTo: false as const } + : undefined; + + const renderMatrixEvent = useTimelineEventRenderer({ room, - threadRootId, - editId, - onEditId: handleEdit, - messageLayout, - messageSpacing, - canDelete: canRedact || canDeleteOwn, - canSendReaction, - canPinEvent, - imagePackRooms, - activeReplyId, - hour24Clock, - dateFormatString, - onUserClick: handleUserClick, - onUsernameClick: handleUsernameClick, - onReplyClick: handleReplyClick, - onReactionToggle: handleReactionToggle, - onResend: handleResend, - onDeleteFailedSend: handleDeleteFailedSend, + mx, pushProcessor, - linkifyOpts, - htmlReactParserOptions, - showHideReads: hideReads, - showDeveloperTools, - onReferenceClick: handleOpenReply, - jumpToEventId, - }; + nicknames, + imagePackRooms, + settings: { + messageLayout, + messageSpacing, + hideReads, + showDeveloperTools, + hour24Clock, + dateFormatString, + mediaAutoLoad, + showUrlPreview, + showClientUrlPreview, + autoplayStickers, + hideMemberInReadOnly, + isReadOnly, + hideMembershipEvents: true, + hideNickAvatarEvents: true, + showHiddenEvents, + hideThreadChip: true, + }, + state: { focusItem, editId, activeReplyId, openThreadId: threadRootId }, + permissions: { + canRedact, + canDeleteOwn, + canSendReaction, + canPinEvent, + }, + callbacks: { + onUserClick: handleUserClick, + onUsernameClick: handleUsernameClick, + onReplyClick: handleReplyClick, + onReactionToggle: handleReactionToggle, + onEditId: handleEdit, + onResend: handleResend, + onDeleteFailedSend: handleDeleteFailedSend, + setOpenThread: () => {}, + handleOpenReply, + }, + utils: { htmlReactParserOptions, linkifyOpts, getMemberPowerTag, parseMemberEvent }, + }); // Latest thread event for the following indicator (latest reply, or root if no replies) const threadParticipantIds = new Set( - [rootEvent, ...replyEvents].map((ev) => ev?.getSender()).filter(Boolean) as string[] + processedEvents.map((e) => e.mEvent.getSender()).filter(Boolean) as string[] ); - const latestThreadEventId = ( - replyEvents.length > 0 ? replyEvents[replyEvents.length - 1] : rootEvent - )?.getId(); + const latestThreadEventId = processedEvents.at(-1)?.id ?? rootEvent?.getId(); return ( - - # {room.name} - - + {renderMatrixEvent( + rootEvent.getType(), + typeof rootEvent.getStateKey() === 'string', + rootEvent.getId()!, + rootEvent, + processedEvents.find((e) => e.id === threadRootId)?.itemIndex ?? 0, + thread?.timelineSet ?? room.getUnfilteredTimelineSet(), + false + )} )} @@ -820,58 +822,77 @@ export function ThreadDrawer({ room, threadRootId, onClose, overlay }: ThreadDra variant="Background" visibility="Hover" direction="Vertical" - hideTrack + size="300" + onScroll={handleRepliesScroll} style={{ flexGrow: 1 }} > - {replyEvents.length === 0 ? ( - - - - No replies yet. Start the thread below! - - - ) : ( - <> - {/* Reply count label inside scroll area */} - - - {replyEvents.length} {replyEvents.length === 1 ? 'reply' : 'replies'} - - - - {replyEvents.map((mEvent, i) => { - const prevEvent = i > 0 ? replyEvents[i - 1] : undefined; - const collapse = - prevEvent !== undefined && - prevEvent.getSender() === mEvent.getSender() && - prevEvent.getType() === mEvent.getType() && - minuteDifference(prevEvent.getTs(), mEvent.getTs()) < 2; - return ( - - ); - })} - - - )} + {(() => { + if (isThreadLoading) + return ( + + + + ); + if (processedReplies.length === 0) + return ( + + + + No replies yet. Start the thread below! + + + ); + return ( + <> + {loadingOlderReplies && ( + + + + )} + {/* Reply count label inside scroll area */} + + + {processedReplies.length} {processedReplies.length === 1 ? 'reply' : 'replies'} + + + + {processedReplies.map((e) => + renderMatrixEvent( + e.mEvent.getType(), + typeof e.mEvent.getStateKey() === 'string', + e.id, + e.mEvent, + e.itemIndex, + e.timelineSet, + e.collapsed + ) + )} + + + ); + })()} @@ -885,6 +906,7 @@ export function ThreadDrawer({ room, threadRootId, onClose, overlay }: ThreadDra threadRootId={threadRootId} editor={editor} fileDropContainerRef={drawerRef} + onEditLastMessage={handleEditLastMessage} /> {hideReads ? ( diff --git a/src/app/hooks/timeline/useProcessedTimeline.ts b/src/app/hooks/timeline/useProcessedTimeline.ts index f1f799308..44e9500a2 100644 --- a/src/app/hooks/timeline/useProcessedTimeline.ts +++ b/src/app/hooks/timeline/useProcessedTimeline.ts @@ -20,6 +20,12 @@ export interface UseProcessedTimelineOptions { hideNickAvatarEvents: boolean; isReadOnly: boolean; hideMemberInReadOnly: boolean; + /** + * When true, skip the filter that removes events whose `threadRootId` points + * to a different event. Required when processing a thread's own timeline + * where every reply legitimately has `threadRootId` set to the root. + */ + skipThreadFilter?: boolean; } export interface ProcessedEvent { @@ -55,6 +61,7 @@ export function useProcessedTimeline({ hideNickAvatarEvents, isReadOnly, hideMemberInReadOnly, + skipThreadFilter, }: UseProcessedTimelineOptions): ProcessedEvent[] { return useMemo(() => { let prevEvent: MatrixEvent | undefined; @@ -116,7 +123,7 @@ export function useProcessedTimeline({ } } - if (threadRootId !== undefined && threadRootId !== mEventId) return acc; + if (!skipThreadFilter && threadRootId !== undefined && threadRootId !== mEventId) return acc; const isReactionOrEdit = reactionOrEditEvent(mEvent); if (isReactionOrEdit) return acc; @@ -193,5 +200,6 @@ export function useProcessedTimeline({ hideNickAvatarEvents, isReadOnly, hideMemberInReadOnly, + skipThreadFilter, ]); } diff --git a/src/app/hooks/timeline/useTimelineActions.ts b/src/app/hooks/timeline/useTimelineActions.ts index e7bb45f68..621e92aef 100644 --- a/src/app/hooks/timeline/useTimelineActions.ts +++ b/src/app/hooks/timeline/useTimelineActions.ts @@ -5,13 +5,12 @@ import { ReactEditor } from 'slate-react'; import { getMxIdLocalPart, toggleReaction } from '$utils/matrix'; import { getMemberDisplayName, getEditedEvent } from '$utils/room'; -import { createMentionElement, isEmptyEditor, moveCursor } from '$components/editor'; +import { createMentionElement, moveCursor } from '$components/editor'; export interface UseTimelineActionsOptions { room: Room; mx: MatrixClient; editor: Editor; - alive: () => boolean; nicknames: Record; globalProfiles: Record; spaceId?: string; @@ -27,8 +26,7 @@ export interface UseTimelineActionsOptions { setReplyDraft: (draft: any) => void; openThreadId?: string; setOpenThread: (threadId: string | undefined) => void; - setEditId: (editId: string | undefined) => void; - onEditorReset?: () => void; + handleEdit: (editId?: string) => void; handleOpenEvent: (eventId: string) => void; } @@ -36,7 +34,6 @@ export function useTimelineActions({ room, mx, editor, - alive, nicknames, globalProfiles, spaceId, @@ -45,8 +42,7 @@ export function useTimelineActions({ setReplyDraft, openThreadId, setOpenThread, - setEditId, - onEditorReset, + handleEdit, handleOpenEvent, }: UseTimelineActionsOptions) { const handleOpenReply: MouseEventHandler = useCallback( @@ -209,24 +205,6 @@ export function useTimelineActions({ [mx] ); - const handleEdit = useCallback( - (targetEditId?: string) => { - if (targetEditId) { - setEditId(targetEditId); - return; - } - setEditId(undefined); - - requestAnimationFrame(() => { - if (!alive()) return; - if (isEmptyEditor(editor)) onEditorReset?.(); - ReactEditor.focus(editor); - moveCursor(editor); - }); - }, - [editor, alive, onEditorReset, setEditId] - ); - return { handleOpenReply, handleUserClick, diff --git a/src/app/hooks/timeline/useTimelineEventRenderer.tsx b/src/app/hooks/timeline/useTimelineEventRenderer.tsx index f7dca411a..9b56ea774 100644 --- a/src/app/hooks/timeline/useTimelineEventRenderer.tsx +++ b/src/app/hooks/timeline/useTimelineEventRenderer.tsx @@ -1,10 +1,14 @@ -import { MouseEventHandler, useCallback, useMemo } from 'react'; +import { MouseEventHandler, useCallback, useEffect, useMemo, useState } from 'react'; import { useTranslation } from 'react-i18next'; import { useAtomValue } from 'jotai'; import { + IThreadBundledRelationship, MatrixClient, MatrixEvent, + NotificationCountType, Room, + RoomEvent, + ThreadEvent, PushProcessor, EventTimelineSet, IContent, @@ -47,6 +51,7 @@ import { } from '$utils/room'; import { getLinkedTimelines, getLiveTimeline } from '$utils/timeline'; import * as customHtmlCss from '$styles/CustomHtml.css'; +import { UnreadBadge, UnreadBadgeCenter } from '$components/unread-badge'; import { EncryptedContent, Event, @@ -105,20 +110,49 @@ function ThreadReplyChip({ const useAuthentication = useMediaAuthentication(); const nicknames = useAtomValue(nicknamesAtom); + const [counter, forceUpdate] = useState(0); + const thread = room.getThread(mEventId); + useEffect(() => { + if (!thread) return () => {}; + const onUpdate = () => forceUpdate((n) => n + 1); + thread.on(ThreadEvent.NewReply as any, onUpdate); + thread.on(ThreadEvent.Update as any, onUpdate); + room.on(RoomEvent.Redaction as any, onUpdate); + return () => { + thread.off(ThreadEvent.NewReply as any, onUpdate); + thread.off(ThreadEvent.Update as any, onUpdate); + room.off(RoomEvent.Redaction as any, onUpdate); + }; + }, [room, thread]); + const replyEvents = useMemo(() => { + // With threadSupport:true, reply events live in thread.timelineSet not the main room timeline. + // Prefer thread.events when available so avatars and preview text are populated. + if (thread) { + const fromThread = thread.events.filter( + (ev) => ev.getId() !== mEventId && !reactionOrEditEvent(ev) + ); + if (fromThread.length > 0) return fromThread; + } const linkedTimelines = getLinkedTimelines(getLiveTimeline(room)); return linkedTimelines .flatMap((tl) => tl.getEvents()) .filter( (ev) => ev.threadRootId === mEventId && ev.getId() !== mEventId && !reactionOrEditEvent(ev) ); - }, [room, mEventId]); + // eslint-disable-next-line react-hooks/exhaustive-deps -- counter is a cache-busting key, not used directly in body + }, [room, mEventId, thread, counter]); if (!thread) return null; - const replyCount = thread.length ?? 0; + // Prefer the server-authoritative bundled count. thread.length only reflects + // events fetched into the local timeline, which can be much lower than the + // true total before the thread drawer is first opened and paginated. + const bundledCount = + thread.rootEvent?.getServerAggregatedRelation('m.thread')?.count; + const replyCount = bundledCount ?? thread.length ?? 0; if (replyCount === 0) return null; const uniqueSenders: string[] = []; @@ -146,6 +180,12 @@ function ThreadReplyChip({ const isOpen = openThreadId === mEventId; + const unreadTotal = room.getThreadUnreadNotificationCount(mEventId, NotificationCountType.Total); + const unreadHighlight = room.getThreadUnreadNotificationCount( + mEventId, + NotificationCountType.Highlight + ); + return ( )} + {unreadTotal > 0 && ( + + 0} count={unreadTotal} /> + + )} ); } @@ -226,6 +271,7 @@ export interface TimelineEventRendererOptions { hideMembershipEvents: boolean; hideNickAvatarEvents: boolean; showHiddenEvents: boolean; + hideThreadChip?: boolean; }; state: { focusItem?: { index: number; highlight: boolean; scrollTo: boolean }; @@ -280,6 +326,7 @@ export function useTimelineEventRenderer({ hideMembershipEvents, hideNickAvatarEvents, showHiddenEvents, + hideThreadChip, }, state: { focusItem, editId, activeReplyId, openThreadId }, permissions: { canRedact, canDeleteOwn, canSendReaction, canPinEvent }, @@ -309,9 +356,16 @@ export function useTimelineEventRenderer({ isRedacted, getUnsigned, getTs, - replyEventId, + getWireContent, + replyEventId: rawReplyEventId, threadRootId, } = mEvent; + // In the thread drawer (hideThreadChip=true), suppress reply headers for events + // that only have m.in_reply_to as a non-thread-client fallback (is_falling_back: true). + const replyEventId = + hideThreadChip && getWireContent.call(mEvent)?.['m.relates_to']?.is_falling_back + ? undefined + : rawReplyEventId; const reactionRelations = getEventReactions(timelineSet, mEventId); const reactions = reactionRelations?.getSortedAnnotationsByKey(); @@ -400,7 +454,7 @@ export function useTimelineEventRenderer({ room={room} timelineSet={timelineSet} replyEventId={replyEventId} - threadRootId={threadRootId} + threadRootId={hideThreadChip ? undefined : threadRootId} mentions={baseContent['m.mentions']} onClick={handleOpenReply} /> @@ -408,7 +462,7 @@ export function useTimelineEventRenderer({ } reactions={(() => { const threadChip = - room.getThread(mEventId) || threadRootId ? ( + !hideThreadChip && (room.getThread(mEventId) || threadRootId) ? ( ) } reactions={(() => { const threadChip = - room.getThread(mEventId) || threadRootId ? ( + !hideThreadChip && (room.getThread(mEventId) || threadRootId) ? ( @@ -691,7 +755,7 @@ export function useTimelineEventRenderer({ } reactions={(() => { const threadChip = - room.getThread(mEventId) || threadRootId ? ( + !hideThreadChip && (room.getThread(mEventId) || threadRootId) ? ( void; + alive?: () => boolean; +} + +/** + * Manages the "edit mode" state for a message composer. + * + * Centralises the `editId` state and the `handleEdit` callback so both + * `RoomTimeline` and `ThreadDrawer` share identical behaviour: setting an + * edit target activates the editor for that event; clearing it resets the + * editor and returns focus. + */ +export function useMessageEdit( + editor: Editor, + options?: UseMessageEditOptions +): { editId: string | undefined; handleEdit: (editId?: string) => void } { + const [editId, setEditId] = useState(undefined); + + // Use refs so the callback never goes stale on options changes. + const aliveRef = useRef(options?.alive); + aliveRef.current = options?.alive; + const onResetRef = useRef(options?.onReset); + onResetRef.current = options?.onReset; + + const handleEdit = useCallback( + (targetEditId?: string) => { + if (targetEditId) { + setEditId(targetEditId); + return; + } + setEditId(undefined); + requestAnimationFrame(() => { + if (aliveRef.current && !aliveRef.current()) return; + if (onResetRef.current && isEmptyEditor(editor)) onResetRef.current(); + ReactEditor.focus(editor); + moveCursor(editor); + }); + }, + [editor] + ); + + return { editId, handleEdit }; +} diff --git a/src/app/styles/overrides/General.css.ts b/src/app/styles/overrides/General.css.ts index 34ef9ada8..4edb6ea98 100644 --- a/src/app/styles/overrides/General.css.ts +++ b/src/app/styles/overrides/General.css.ts @@ -40,7 +40,9 @@ globalStyle( button[class*="_1684mq51"]:has(img):hover, [data-index] [class*="_1r9nvaso"]:hover, [data-index] [class*="_1r9nvaso"] *:hover, - [data-index] button:has(p):hover + [data-index] button:has(p):hover, + [data-index] button:hover, + [data-index] [role="button"]:hover `, { transform: 'none !important', diff --git a/src/client/initMatrix.ts b/src/client/initMatrix.ts index 093093ba2..f6f428a10 100644 --- a/src/client/initMatrix.ts +++ b/src/client/initMatrix.ts @@ -429,6 +429,7 @@ export const startClient = async (mx: MatrixClient, config?: StartClientConfig): await mx.startClient({ lazyLoadMembers: true, pollTimeout: FAST_SYNC_POLL_TIMEOUT_MS, + threadSupport: true, }); // Attach an ongoing classic-sync observer — equivalent to SlidingSyncManager's // onLifecycle listener. Tracks state transitions, initial-sync timing, and errors. @@ -581,6 +582,7 @@ export const startClient = async (mx: MatrixClient, config?: StartClientConfig): await mx.startClient({ lazyLoadMembers: true, slidingSync: manager.slidingSync, + threadSupport: true, }); } catch (err) { debugLog.error('network', 'Failed to start client with sliding sync', { From 76333bdb6ddb8565cad237768749cf08918cec09 Mon Sep 17 00:00:00 2001 From: Evie Gauthier Date: Mon, 6 Apr 2026 12:51:04 -0400 Subject: [PATCH 025/103] chore: add changeset for feat-thread-enhancements --- .changeset/feat-thread-enhancements.md | 5 +++++ src/app/features/room/ThreadBrowser.tsx | 17 +++++++---------- 2 files changed, 12 insertions(+), 10 deletions(-) create mode 100644 .changeset/feat-thread-enhancements.md diff --git a/.changeset/feat-thread-enhancements.md b/.changeset/feat-thread-enhancements.md new file mode 100644 index 000000000..b2532c19c --- /dev/null +++ b/.changeset/feat-thread-enhancements.md @@ -0,0 +1,5 @@ +--- +default: minor +--- + +Update threads: various fixes, browse all room threads, and see live reply counts on messages. diff --git a/src/app/features/room/ThreadBrowser.tsx b/src/app/features/room/ThreadBrowser.tsx index 4cf718a8e..51a01780b 100644 --- a/src/app/features/room/ThreadBrowser.tsx +++ b/src/app/features/room/ThreadBrowser.tsx @@ -454,16 +454,13 @@ export function ThreadBrowser({ room, onOpenThread, onClose, overlay }: ThreadBr const handleLoadMoreRef = useRef(handleLoadMore); handleLoadMoreRef.current = handleLoadMore; - const handleThreadsScroll = useCallback( - (e: React.UIEvent) => { - const el = e.currentTarget; - const distanceFromBottom = el.scrollHeight - el.scrollTop - el.clientHeight; - if (distanceFromBottom < 200 && canLoadMoreRef.current && !loadingMoreRef.current) { - handleLoadMoreRef.current(); - } - }, - [] - ); + const handleThreadsScroll = useCallback((e: React.UIEvent) => { + const el = e.currentTarget; + const distanceFromBottom = el.scrollHeight - el.scrollTop - el.clientHeight; + if (distanceFromBottom < 200 && canLoadMoreRef.current && !loadingMoreRef.current) { + handleLoadMoreRef.current(); + } + }, []); const allThreads = room.getThreads().sort((a: Thread, b: Thread) => { const aTs = a.events.at(-1)?.getTs() ?? a.rootEvent?.getTs() ?? 0; From e5aadcb2032b373e0160ad2bdb7e6b45fac3c25c Mon Sep 17 00:00:00 2001 From: Septicity Date: Mon, 6 Apr 2026 16:17:33 -0500 Subject: [PATCH 026/103] fix: Re-introduce timeline regrouping for PMP messages after sticky scroll fix --- src/app/features/room/message/Message.tsx | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/app/features/room/message/Message.tsx b/src/app/features/room/message/Message.tsx index 98e7e927a..053c5a17e 100644 --- a/src/app/features/room/message/Message.tsx +++ b/src/app/features/room/message/Message.tsx @@ -386,9 +386,9 @@ function MessageInternal( useEffect(() => { const triggerTimelineRegroup = () => { - room.emit(RoomEvent.Timeline, mEvent, room, false, false, { - liveEvent: true, - } as IRoomTimelineData); + // A Local Echo update seems to trigger a visual refresh without + // scrolling the viewport. + room.emit(RoomEvent.LocalEchoUpdated, mEvent, room); }; const onUpdate = () => { @@ -396,6 +396,11 @@ function MessageInternal( triggerTimelineRegroup(); }; + if (mEvent.getClearContent()) { + setContentVersion((v) => (v === 0 ? 1 : v)); + triggerTimelineRegroup(); + } + mEvent.on(MatrixEventEvent.Decrypted, onUpdate); mEvent.on(MatrixEventEvent.Replaced, onUpdate); return () => { From 3e234492fa8330ecbb6188461cc0a1296f41bb1c Mon Sep 17 00:00:00 2001 From: Shea Duma Date: Tue, 7 Apr 2026 07:01:48 +0300 Subject: [PATCH 027/103] add blank spaces and fix regression --- src/app/utils/room.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/app/utils/room.ts b/src/app/utils/room.ts index b23a02f6f..9391dbc90 100644 --- a/src/app/utils/room.ts +++ b/src/app/utils/room.ts @@ -530,8 +530,7 @@ export const getMemberDisplayName = ( const name = member?.rawDisplayName; if (name === userId) return undefined; if ( - name?.replace(/[\p{Cc}\p{Cf}\u180B-\u180F\uFE00-\uFE0F\uE0100-\uE01EF\u200B-\u200D]/gu, '') - .length === 0 + name?.replace(/[\p{Cc}\p{Cf}\u180B-\u180F\uFE00-\uFE0F\u200B-\u200D\t\n ]/gu, '').length === 0 ) return undefined; return name; From ccfd9afc3bc08a418ebda686873c359ec9f9d3c6 Mon Sep 17 00:00:00 2001 From: Matt Van Horn <455140+mvanhorn@users.noreply.github.com> Date: Tue, 7 Apr 2026 02:26:50 -0700 Subject: [PATCH 028/103] fix: prevent iOS overscroll on root element Add overscroll-behavior: none to the html element to prevent the elastic bounce-back scroll effect on iOS that competes with the timeline scroll. Fixes #500 --- src/index.css | 1 + 1 file changed, 1 insertion(+) diff --git a/src/index.css b/src/index.css index ceab92d93..cde45ce4c 100755 --- a/src/index.css +++ b/src/index.css @@ -78,6 +78,7 @@ html { height: 100%; overflow: hidden; + overscroll-behavior: none; } body { From 3525c32a6f50f005e3945254fac55c1059cf0c1d Mon Sep 17 00:00:00 2001 From: Matt Van Horn <455140+mvanhorn@users.noreply.github.com> Date: Tue, 7 Apr 2026 02:48:32 -0700 Subject: [PATCH 029/103] fix: use file name instead of "a voice message" for non-voice audio Only use "a voice message" as the fallback body text when the audio actually has waveform data (i.e., it was recorded as a voice message). Regular audio files (music, etc.) now fall back to the file name instead. Fixes #543 --- src/app/features/room/msgContent.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/app/features/room/msgContent.ts b/src/app/features/room/msgContent.ts index 0cec05a57..c4547deca 100644 --- a/src/app/features/room/msgContent.ts +++ b/src/app/features/room/msgContent.ts @@ -147,10 +147,12 @@ export type AudioMsgContent = IContent & { export const getAudioMsgContent = (item: TUploadItem, mxc: string): AudioMsgContent => { const { file, encInfo, metadata } = item; const { waveform, audioDuration, markedAsSpoiler } = metadata; + const isVoice = waveform !== undefined && waveform.length > 0; + const fallbackBody = isVoice ? 'a voice message' : file.name; let content: IContent = { msgtype: MsgType.Audio, filename: file.name, - body: item.body && item.body.length > 0 ? item.body : 'a voice message', + body: item.body && item.body.length > 0 ? item.body : fallbackBody, info: { mimetype: file.type, size: file.size, @@ -162,7 +164,7 @@ export const getAudioMsgContent = (item: TUploadItem, mxc: string): AudioMsgCont waveform: waveform?.map((v) => Math.round(v * 1024)), duration: markedAsSpoiler || !audioDuration ? 0 : audioDuration * 1000, }, - 'org.matrix.msc1767.text': item.body && item.body.length > 0 ? item.body : 'a voice message', + 'org.matrix.msc1767.text': item.body && item.body.length > 0 ? item.body : fallbackBody, 'org.matrix.msc3245.voice.v2': { duration: markedAsSpoiler || !audioDuration ? 0 : audioDuration, waveform: waveform?.map((v) => Math.round(v * 1024)), From 41ac5c69710e5ffd0f51f2823ad3d64a04319580 Mon Sep 17 00:00:00 2001 From: Matt Van Horn <455140+mvanhorn@users.noreply.github.com> Date: Tue, 7 Apr 2026 02:56:50 -0700 Subject: [PATCH 030/103] fix: constrain bug report modal to viewport height Add maxHeight: 90vh to the Modal and its inner Box container so the bug report screen doesn't overflow beyond the viewport, which was causing the close button and header text to be cropped off. Fixes #629 --- src/app/features/bug-report/BugReportModal.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app/features/bug-report/BugReportModal.tsx b/src/app/features/bug-report/BugReportModal.tsx index 1babed978..168d7b972 100644 --- a/src/app/features/bug-report/BugReportModal.tsx +++ b/src/app/features/bug-report/BugReportModal.tsx @@ -233,8 +233,8 @@ function BugReportModal() { escapeDeactivates: stopPropagation, }} > - - + +
Date: Tue, 7 Apr 2026 10:30:24 -0500 Subject: [PATCH 031/103] fix dms nav --- .changeset/fix-dms-nav-not-naving.dm | 5 +++++ src/app/pages/client/sidebar/DirectTab.tsx | 4 +++- 2 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 .changeset/fix-dms-nav-not-naving.dm diff --git a/.changeset/fix-dms-nav-not-naving.dm b/.changeset/fix-dms-nav-not-naving.dm new file mode 100644 index 000000000..53751aa01 --- /dev/null +++ b/.changeset/fix-dms-nav-not-naving.dm @@ -0,0 +1,5 @@ +--- +default: patch +--- + +Fix dms navigation not navigating to dms when local storage is messed up. \ No newline at end of file diff --git a/src/app/pages/client/sidebar/DirectTab.tsx b/src/app/pages/client/sidebar/DirectTab.tsx index 17c88a042..ffdf9c5ac 100644 --- a/src/app/pages/client/sidebar/DirectTab.tsx +++ b/src/app/pages/client/sidebar/DirectTab.tsx @@ -82,7 +82,9 @@ export function DirectTab() { const handleDirectClick = () => { const activePath = navToActivePath.get('direct'); - if (activePath && screenSize !== ScreenSize.Mobile) { + const activePathname = activePath?.pathname; + const isValidDirectPath = typeof activePathname === 'string' && activePathname.startsWith('/direct/'); + if (activePath && isValidDirectPath && screenSize !== ScreenSize.Mobile) { navigate(joinPathComponent(activePath)); return; } From dbd1b36f258ea52b00bdc436b69255301e37a1a0 Mon Sep 17 00:00:00 2001 From: 7w1 Date: Tue, 7 Apr 2026 10:34:16 -0500 Subject: [PATCH 032/103] formatting --- src/app/pages/client/sidebar/DirectTab.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/app/pages/client/sidebar/DirectTab.tsx b/src/app/pages/client/sidebar/DirectTab.tsx index ffdf9c5ac..72c2b7d5b 100644 --- a/src/app/pages/client/sidebar/DirectTab.tsx +++ b/src/app/pages/client/sidebar/DirectTab.tsx @@ -83,7 +83,8 @@ export function DirectTab() { const handleDirectClick = () => { const activePath = navToActivePath.get('direct'); const activePathname = activePath?.pathname; - const isValidDirectPath = typeof activePathname === 'string' && activePathname.startsWith('/direct/'); + const isValidDirectPath = + typeof activePathname === 'string' && activePathname.startsWith('/direct/'); if (activePath && isValidDirectPath && screenSize !== ScreenSize.Mobile) { navigate(joinPathComponent(activePath)); return; From 09fe8d9298b878547c1ba3a0dd47c99f0743d46d Mon Sep 17 00:00:00 2001 From: 7w1 Date: Tue, 7 Apr 2026 10:36:24 -0500 Subject: [PATCH 033/103] markdown file not dm file... --- .../{fix-dms-nav-not-naving.dm => fix-dms-nav-not-naving.md} | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename .changeset/{fix-dms-nav-not-naving.dm => fix-dms-nav-not-naving.md} (89%) diff --git a/.changeset/fix-dms-nav-not-naving.dm b/.changeset/fix-dms-nav-not-naving.md similarity index 89% rename from .changeset/fix-dms-nav-not-naving.dm rename to .changeset/fix-dms-nav-not-naving.md index 53751aa01..2e214e4a8 100644 --- a/.changeset/fix-dms-nav-not-naving.dm +++ b/.changeset/fix-dms-nav-not-naving.md @@ -2,4 +2,4 @@ default: patch --- -Fix dms navigation not navigating to dms when local storage is messed up. \ No newline at end of file +Fix dms navigation not navigating to dms when local storage is messed up. From 2a0b5d3e1d3ba2108de034539bd5e658d27bf872 Mon Sep 17 00:00:00 2001 From: 7w1 Date: Tue, 7 Apr 2026 10:42:22 -0500 Subject: [PATCH 034/103] linter --- src/app/features/room/message/Message.tsx | 1 - 1 file changed, 1 deletion(-) diff --git a/src/app/features/room/message/Message.tsx b/src/app/features/room/message/Message.tsx index 053c5a17e..887d24a66 100644 --- a/src/app/features/room/message/Message.tsx +++ b/src/app/features/room/message/Message.tsx @@ -36,7 +36,6 @@ import { RoomPinnedEventsEventContent, MatrixEventEvent, RoomEvent, - IRoomTimelineData, } from '$types/matrix-sdk'; import classNames from 'classnames'; import { useAtomValue, useSetAtom } from 'jotai'; From fb8450ec8b698ecb6ead09938898da68764e58cf Mon Sep 17 00:00:00 2001 From: Matt Van Horn <455140+mvanhorn@users.noreply.github.com> Date: Tue, 7 Apr 2026 12:25:37 -0700 Subject: [PATCH 035/103] docs: add changeset for iOS overscroll fix --- .changeset/fix-ios-overscroll.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/fix-ios-overscroll.md diff --git a/.changeset/fix-ios-overscroll.md b/.changeset/fix-ios-overscroll.md new file mode 100644 index 000000000..02b02f246 --- /dev/null +++ b/.changeset/fix-ios-overscroll.md @@ -0,0 +1,5 @@ +--- +default: patch +--- + +Fix iOS elastic bounce-back overscroll on the root element. From ea59ca2395ecf8a38c709b58261da4a10556b553 Mon Sep 17 00:00:00 2001 From: Matt Van Horn <455140+mvanhorn@users.noreply.github.com> Date: Tue, 7 Apr 2026 12:26:06 -0700 Subject: [PATCH 036/103] docs: add changeset for audio description fix --- .changeset/fix-audio-file-description.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/fix-audio-file-description.md diff --git a/.changeset/fix-audio-file-description.md b/.changeset/fix-audio-file-description.md new file mode 100644 index 000000000..89710332a --- /dev/null +++ b/.changeset/fix-audio-file-description.md @@ -0,0 +1,5 @@ +--- +default: patch +--- + +Use file name instead of "a voice message" for non-voice audio files. From 027f6ae1c00eebef59769ceadd2979d0c6556311 Mon Sep 17 00:00:00 2001 From: Matt Van Horn <455140+mvanhorn@users.noreply.github.com> Date: Tue, 7 Apr 2026 12:26:20 -0700 Subject: [PATCH 037/103] docs: add changeset for bug report modal fix --- .changeset/fix-bug-report-modal-overflow.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/fix-bug-report-modal-overflow.md diff --git a/.changeset/fix-bug-report-modal-overflow.md b/.changeset/fix-bug-report-modal-overflow.md new file mode 100644 index 000000000..c37f218a7 --- /dev/null +++ b/.changeset/fix-bug-report-modal-overflow.md @@ -0,0 +1,5 @@ +--- +default: patch +--- + +Constrain bug report modal to viewport height to prevent overflow. From 235431da00d91ed5142e725f71748cc0b94d9b47 Mon Sep 17 00:00:00 2001 From: Evie Gauthier Date: Wed, 8 Apr 2026 17:13:38 -0400 Subject: [PATCH 038/103] fix(threads): pass showBundledPreview setting to useTimelineEventRenderer --- src/app/features/room/ThreadDrawer.tsx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/app/features/room/ThreadDrawer.tsx b/src/app/features/room/ThreadDrawer.tsx index 94e3ab1ed..7e0e3960f 100644 --- a/src/app/features/room/ThreadDrawer.tsx +++ b/src/app/features/room/ThreadDrawer.tsx @@ -137,6 +137,7 @@ export function ThreadDrawer({ room, threadRootId, onClose, overlay }: ThreadDra const [showHiddenEvents] = useSetting(settingsAtom, 'showHiddenEvents'); const [showTombstoneEvents] = useSetting(settingsAtom, 'showTombstoneEvents'); const [hideMemberInReadOnly] = useSetting(settingsAtom, 'hideMembershipInReadOnly'); + const [showBundledPreview] = useSetting(settingsAtom, 'bundledPreview'); const showUrlPreview = room.hasEncryptionStateEvent() ? encUrlPreview : urlPreview; const showClientUrlPreview = room.hasEncryptionStateEvent() ? clientUrlPreview && encClientUrlPreview @@ -718,6 +719,7 @@ export function ThreadDrawer({ room, threadRootId, onClose, overlay }: ThreadDra mediaAutoLoad, showUrlPreview, showClientUrlPreview, + showBundledPreview, autoplayStickers, hideMemberInReadOnly, isReadOnly, From c47b842c74ca929d2f4e0548fdc07d5c9860a8af Mon Sep 17 00:00:00 2001 From: Shea Duma Date: Thu, 9 Apr 2026 07:18:14 +0300 Subject: [PATCH 039/103] basic working version --- .../settings/account/NameColorEditor.tsx | 158 +++++++++--------- src/app/features/settings/account/Profile.tsx | 22 ++- src/app/hooks/useUserProfile.ts | 37 +++- 3 files changed, 133 insertions(+), 84 deletions(-) diff --git a/src/app/features/settings/account/NameColorEditor.tsx b/src/app/features/settings/account/NameColorEditor.tsx index 8185dc2c0..9428a8e02 100644 --- a/src/app/features/settings/account/NameColorEditor.tsx +++ b/src/app/features/settings/account/NameColorEditor.tsx @@ -7,6 +7,7 @@ import { HexColorPickerPopOut } from '$components/HexColorPickerPopOut'; type NameColorEditorProps = { title: string; description?: string; + focusId?: string; current?: string; onSave: (color: string | null) => void; disabled?: boolean; @@ -15,6 +16,7 @@ type NameColorEditorProps = { export function NameColorEditor({ title, description, + focusId, current, onSave, disabled, @@ -57,89 +59,95 @@ export function NameColorEditor({ return ( - - - - } + - {(onOpen, opened) => ( - + )} + + + + handleUpdate(e.currentTarget.value)} + placeholder="#FFFFFF" + variant="Background" + size="300" + radii="300" + disabled={disabled ?? false} style={{ - width: '32px', - height: '32px', - borderRadius: '50%', - backgroundColor: tempColor, - boxShadow: 'inset 0 0 0 1px rgba(0,0,0,0.1)', + textTransform: 'uppercase', + fontFamily: 'monospace', + width: '100px', }} /> + {current && ( + + + + )} + + + + {hasChanged && ( + )} - - - - handleUpdate(e.currentTarget.value)} - placeholder="#FFFFFF" - variant="Background" - size="300" - radii="300" - disabled={disabled ?? false} - style={{ - textTransform: 'uppercase', - fontFamily: 'monospace', - width: '100px', - }} - /> - {current && ( - - - - )} - - - {hasChanged && ( - - )} - + } + /> ); } diff --git a/src/app/features/settings/account/Profile.tsx b/src/app/features/settings/account/Profile.tsx index 834bd511d..16e022a94 100644 --- a/src/app/features/settings/account/Profile.tsx +++ b/src/app/features/settings/account/Profile.tsx @@ -539,11 +539,30 @@ function ProfileExtended({ profile, userId }: Readonly) { gap="400" > handleSaveField('moe.sable.app.name_color', color)} /> + handleSaveField('moe.sable.app.name_color_dark_theme', color)} + /> + handleSaveField('moe.sable.app.name_color_light_theme', color)} + /> diff --git a/src/app/hooks/useUserProfile.ts b/src/app/hooks/useUserProfile.ts index 3308e6813..4d78035ea 100644 --- a/src/app/hooks/useUserProfile.ts +++ b/src/app/hooks/useUserProfile.ts @@ -9,6 +9,7 @@ import { useSetting } from '$state/hooks/settings'; import { settingsAtom } from '$state/settings'; import { MSC1767Text } from '$types/matrix/common'; import { useMatrixClient } from './useMatrixClient'; +import { ThemeKind, useActiveTheme } from './useTheme'; const inFlightProfiles = new Map>(); @@ -25,6 +26,8 @@ export type UserProfile = { status?: string; bannerUrl?: string; nameColor?: string; + nameColorDark?: string; + nameColorLight?: string; isCat?: boolean; hasCats?: boolean; extended?: Record; @@ -45,6 +48,8 @@ const normalizeInfo = (info: any): UserProfile => { 'chat.commet.profile_banner', 'chat.commet.profile_status', 'moe.sable.app.name_color', + 'moe.sable.app.name_color_dark_theme', + 'moe.sable.app.name_color_light_theme', 'kitty.meow.has_cats', 'kitty.meow.is_cat', ]); @@ -68,6 +73,8 @@ const normalizeInfo = (info: any): UserProfile => { status: info['chat.commet.profile_status'], bannerUrl: info['chat.commet.profile_banner'], nameColor: info['moe.sable.app.name_color'], + nameColorDark: info['moe.sable.app.name_color_dark_theme'], + nameColorLight: info['moe.sable.app.name_color_light_theme'], isCat: info['kitty.meow.is_cat'] === true, hasCats: info['kitty.meow.has_cats'] === true, extended, @@ -98,6 +105,7 @@ export const useUserProfile = ( const [renderGlobalColors] = useSetting(settingsAtom, 'renderGlobalNameColors'); const [renderRoomColors] = useSetting(settingsAtom, 'renderRoomColors'); const [renderRoomFonts] = useSetting(settingsAtom, 'renderRoomFonts'); + const themeKind = useActiveTheme().kind; const userSelector = useMemo(() => selectAtom(profilesCacheAtom, (db) => db[userId]), [userId]); @@ -202,12 +210,26 @@ export const useUserProfile = ( } } const validGlobalVal = isValidHex(data?.nameColor); + const validGlobalValDark = isValidHex(data?.nameColorDark); + const validGlobalValLight = isValidHex(data?.nameColorLight); - const hasGlobalColor = !!validGlobalVal; - const validGlobal = - (renderGlobalColors || userId === mx.getUserId()) && hasGlobalColor + const validGlobalGeneral = + (renderGlobalColors || userId === mx.getUserId()) && !!validGlobalVal ? validGlobalVal : undefined; + const validGlobalDark = + (renderGlobalColors || userId === mx.getUserId()) && + themeKind === ThemeKind.Dark && + !!validGlobalValDark + ? validGlobalValDark + : undefined; + const validGlobalLight = + (renderGlobalColors || userId === mx.getUserId()) && + themeKind === ThemeKind.Light && + !!validGlobalValLight + ? validGlobalValLight + : undefined; + const validGlobal = validGlobalDark ?? validGlobalLight ?? validGlobalGeneral; const validLocal = localColor && isValidHex(localColor) ? localColor : undefined; const validSpace = spaceColor && isValidHex(spaceColor) ? spaceColor : undefined; @@ -237,13 +259,14 @@ export const useUserProfile = ( }; }, [ cached, + initialProfile, + mx, userId, room, - mx, - legacyUsernameColor, - renderGlobalColors, - initialProfile, renderRoomColors, renderRoomFonts, + renderGlobalColors, + themeKind, + legacyUsernameColor, ]); }; From 8143a17d6d44be0d6a2fe65a034b008bb319ddc3 Mon Sep 17 00:00:00 2001 From: Shea Duma Date: Thu, 9 Apr 2026 07:26:24 +0300 Subject: [PATCH 040/103] added changeset --- .changeset/feat-add-theme-specific-colors.md | 5 +++++ src/app/features/settings/account/Profile.tsx | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) create mode 100644 .changeset/feat-add-theme-specific-colors.md diff --git a/.changeset/feat-add-theme-specific-colors.md b/.changeset/feat-add-theme-specific-colors.md new file mode 100644 index 000000000..1ad50e322 --- /dev/null +++ b/.changeset/feat-add-theme-specific-colors.md @@ -0,0 +1,5 @@ +--- +default: minor +--- + +Add the ability to set Global Name Colors dependent on the theme (dark/light) diff --git a/src/app/features/settings/account/Profile.tsx b/src/app/features/settings/account/Profile.tsx index 16e022a94..da2d140f6 100644 --- a/src/app/features/settings/account/Profile.tsx +++ b/src/app/features/settings/account/Profile.tsx @@ -547,7 +547,7 @@ function ProfileExtended({ profile, userId }: Readonly) { /> ) { /> Date: Thu, 9 Apr 2026 07:32:25 +0300 Subject: [PATCH 041/103] make the text and bubble not move around --- .../settings/account/NameColorEditor.tsx | 23 +++++++++---------- 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/src/app/features/settings/account/NameColorEditor.tsx b/src/app/features/settings/account/NameColorEditor.tsx index 9428a8e02..3215b0970 100644 --- a/src/app/features/settings/account/NameColorEditor.tsx +++ b/src/app/features/settings/account/NameColorEditor.tsx @@ -75,6 +75,17 @@ export function NameColorEditor({ }} > + {hasChanged && ( + + )} } > @@ -133,18 +144,6 @@ export function NameColorEditor({ )} - - {hasChanged && ( - - )} } /> From 42b758258ac0661834b7c7c9261e10895684b954 Mon Sep 17 00:00:00 2001 From: Evie Gauthier Date: Thu, 9 Apr 2026 13:31:06 -0400 Subject: [PATCH 042/103] fix(timeline): re-arm initial-scroll when TimelineReset blanks the view When the app returns from background, retryImmediately() triggers a fresh sliding sync response. If the server includes initial:true for the open room, the SDK emits RoomEvent.TimelineReset, replacing the live timeline with a new empty one. eventsLength drops to 0 but isReady stays true, leaving the message list visible but empty for ~500 ms until events re-arrive. Add a useLayoutEffect that detects eventsLength dropping to 0 while the timeline is already visible (isReady === true). It hides the content (opacity 0) and resets hasInitialScrolledRef so the initial-scroll effect re-arms. When events refill the timeline the existing 80 ms scroll timer fires again and sets isReady back to true, revealing the content. --- src/app/features/room/RoomTimeline.tsx | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/app/features/room/RoomTimeline.tsx b/src/app/features/room/RoomTimeline.tsx index 5c61d9dd4..5f3dba47e 100644 --- a/src/app/features/room/RoomTimeline.tsx +++ b/src/app/features/room/RoomTimeline.tsx @@ -328,6 +328,17 @@ export function RoomTimeline({ [] ); + // If the timeline was blanked while content was already visible — e.g. a + // TimelineReset fired by mx.retryImmediately() when the app comes back from + // background — hide the timeline (opacity 0) and re-arm the initial-scroll so + // it runs again once events refill the live timeline. + useLayoutEffect(() => { + if (!isReady) return; + if (timelineSync.eventsLength > 0) return; + setIsReady(false); + hasInitialScrolledRef.current = false; + }, [isReady, timelineSync.eventsLength]); + const recalcTopSpacer = useCallback(() => { const v = vListRef.current; if (!v) return; From dc5dbfdf4ffb7cadb9414a7aac0cc25ef186ada7 Mon Sep 17 00:00:00 2001 From: Evie Gauthier Date: Thu, 9 Apr 2026 14:04:59 -0400 Subject: [PATCH 043/103] fix(timeline): show skeleton placeholders while timeline reloads on foreground --- src/app/features/room/RoomTimeline.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/app/features/room/RoomTimeline.tsx b/src/app/features/room/RoomTimeline.tsx index 5f3dba47e..9076d4502 100644 --- a/src/app/features/room/RoomTimeline.tsx +++ b/src/app/features/room/RoomTimeline.tsx @@ -651,7 +651,7 @@ export function RoomTimeline({ const showLoadingPlaceholders = timelineSync.eventsLength === 0 && - (timelineSync.canPaginateBack || timelineSync.backwardStatus === 'loading'); + (!isReady || timelineSync.canPaginateBack || timelineSync.backwardStatus === 'loading'); let backPaginationJSX: ReactNode | undefined; if (timelineSync.canPaginateBack || timelineSync.backwardStatus !== 'idle') { @@ -719,7 +719,7 @@ export function RoomTimeline({ const vListItemCount = timelineSync.eventsLength === 0 && - (timelineSync.canPaginateBack || timelineSync.backwardStatus === 'loading') + (!isReady || timelineSync.canPaginateBack || timelineSync.backwardStatus === 'loading') ? 3 : timelineSync.eventsLength; const vListIndices = useMemo( @@ -851,7 +851,7 @@ export function RoomTimeline({ minHeight: 0, overflow: 'hidden', position: 'relative', - opacity: isReady ? 1 : 0, + opacity: isReady || showLoadingPlaceholders ? 1 : 0, }} > From 3aacd916db36238036c2ffca5149f1360200286f Mon Sep 17 00:00:00 2001 From: Evie Gauthier Date: Thu, 9 Apr 2026 15:13:11 -0400 Subject: [PATCH 044/103] chore: add changeset for timeline-blank-on-foreground fix --- .changeset/fix-timeline-blank-on-foreground.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/fix-timeline-blank-on-foreground.md diff --git a/.changeset/fix-timeline-blank-on-foreground.md b/.changeset/fix-timeline-blank-on-foreground.md new file mode 100644 index 000000000..a214a478f --- /dev/null +++ b/.changeset/fix-timeline-blank-on-foreground.md @@ -0,0 +1,5 @@ +--- +default: patch +--- + +Fix blank room timeline when app returns from background. When sliding sync delivers an `initial: true` response for the open room, a `TimelineReset` event now correctly shows skeleton placeholders while events reload instead of leaving an empty view. From 595d990ced5d4fdb33aa20e9384ca4aa872533e4 Mon Sep 17 00:00:00 2001 From: 7w1 Date: Thu, 9 Apr 2026 21:46:20 -0500 Subject: [PATCH 045/103] remove some unnecessary comments --- src/app/features/room/ThreadDrawer.tsx | 60 +------------------------- 1 file changed, 1 insertion(+), 59 deletions(-) diff --git a/src/app/features/room/ThreadDrawer.tsx b/src/app/features/room/ThreadDrawer.tsx index 7e0e3960f..92288e61c 100644 --- a/src/app/features/room/ThreadDrawer.tsx +++ b/src/app/features/room/ThreadDrawer.tsx @@ -98,19 +98,11 @@ export function ThreadDrawer({ room, threadRootId, onClose, overlay }: ThreadDra const [jumpToEventId, setJumpToEventId] = useState(undefined); const [loadingOlderReplies, setLoadingOlderReplies] = useState(false); const [canPageBack, setCanPageBack] = useState(true); - // Ref guard so the auto-paginate effect never starts a second concurrent request. const paginatingOlderRef = useRef(false); const scrollRef = useRef(null); const prevReplyCountRef = useRef(0); const processedEventsRef = useRef([]); - // Track whether we've already attempted a server fetch for a given threadRootId. - // Prevents infinite re-fetch loops on genuinely empty threads while still - // allowing the first fetch even when thread.length === 0 (sliding sync case - // where bundled aggregations are absent so replyCount defaults to 0). const serverFetchAttemptedRef = useRef(null); - // True while the viewport auto-fill is actively paginating backwards. - // Used so the auto-scroll effect keeps the user anchored to the bottom - // (showing latest replies) while older content is prepended at the top. const autoFillInProgressRef = useRef(false); const { editId, handleEdit } = useMessageEdit(editor); const nicknames = useAtomValue(nicknamesAtom); @@ -280,30 +272,6 @@ export function ThreadDrawer({ room, threadRootId, onClose, overlay }: ThreadDra const processedReplies = displayReplies; // Ensure the Thread object exists and has its reply events loaded. - // - // Case A — no Thread object yet (e.g. root event was loaded via jump/backward - // pagination but the SDK hasn't created a Thread shell for it): - // Call room.createThread() so the SDK constructor kicks off - // updateThreadMetadata() → resetLiveTimeline() + paginateEventTimeline() - // automatically. ThreadEvent.Update fires when done → forceUpdate → re-render. - // DO NOT call resetLiveTimeline() or paginateEventTimeline() ourselves — - // that would race with the SDK's own initialization and cause a flood of - // "Ignoring event … does not belong in timeline" warnings. - // - // If the root is also outside the local timeline (e.g. a thread discovered - // via ThreadBrowser but whose root predates the sliding-sync window), we - // fetch it bare with fetchRoomEvent — this does NOT add it to the main - // room timeline or cause any TimelineRefresh side-effects. - // - // Case B — Thread exists but initialEventsFetched is false (server-side thread - // support active; SDK's updateThreadMetadata() is running): - // Do nothing — the SDK will fire ThreadEvent.Update when done. - // - // Case C — Thread exists, initialEventsFetched is true (classic sync or SDK - // has already finished initialising): - // With classic sync the SDK never paginates thread timelines, so we backfill - // from the main live timeline. With server-side threads the SDK already - // populated thread.events; this block is a no-op in that case. useEffect(() => { // Case A: create thread shell; SDK handles the rest asynchronously. if (!room.getThread(threadRootId)) { @@ -352,36 +320,15 @@ export function ThreadDrawer({ room, threadRootId, onClose, overlay }: ThreadDra return; } - // No local events anywhere. We always attempt one server fetch here because - // with sliding sync the server omits bundled aggregations from subscription - // timeline events, leaving thread.replyCount at 0 even when the server has - // replies (the old `if (!currThread.length) return` guard incorrectly bailed - // out in that case). We use serverFetchAttemptedRef to ensure we only try - // once per threadRootId — if the paginate truly returns nothing, the ref - // prevents an infinite re-fetch loop. if (serverFetchAttemptedRef.current === threadRootId) return; serverFetchAttemptedRef.current = threadRootId; - // Do NOT call resetLiveTimeline() here. Resetting a thread timeline emits - // RoomEvent.TimelineReset on the thread's EventTimelineSet; Thread's own - // onTimelineReset handler then awaits processRootEventPromise (a live - // fetchRootEvent network call). If that promise is still pending this - // creates a deadlock that hangs and eventually crashes the app — observed - // on both classic sync and sliding sync. - // - // Calling paginateEventTimeline directly is safe: the thread's back-token - // is null (set by the fast path when replyCount was 0 at construction), but - // the SDK maps null → undefined for the `from` parameter and calls - // fetchRelations without a cursor, which correctly fetches the latest - // replies from the server. mx.paginateEventTimeline(currThread.timelineSet.getLiveTimeline(), { backwards: true }) .then(() => forceUpdate((n) => n + 1)) .catch(() => {}); // forceUpdateCounter must be in deps so this effect re-runs after // ThreadEvent.Update fires (which flips initialEventsFetched from false to - // true). Without it the effect runs once on mount, hits Case B - // (initialEventsFetched=false) and never runs again — leaving the drawer - // empty on sliding sync where replyCount starts at 0. + // true). }, [mx, room, threadRootId, forceUpdate, forceUpdateCounter]); // Re-render when new thread events arrive (including reactions via ThreadEvent.Update). @@ -514,11 +461,6 @@ export function ThreadDrawer({ room, threadRootId, onClose, overlay }: ThreadDra }, []); // Auto-scroll to bottom when event count grows. - // During viewport auto-fill (autoFillInProgressRef) we ALWAYS scroll to the - // bottom: older messages are prepended at the top, so scrollTop stays at 0 - // (clamped), and when content first overflows the isAtBottom check would be - // false — leaving the user staring at the oldest messages instead of the - // latest ones. useEffect(() => { const el = scrollRef.current; if (!el) return; From 02876e032f802704b379f5dafd62cba51ca8f780 Mon Sep 17 00:00:00 2001 From: 7w1 Date: Thu, 9 Apr 2026 21:47:30 -0500 Subject: [PATCH 046/103] Clean up comments in ThreadBrowser component Removed comments explaining reply count logic. --- src/app/features/room/ThreadBrowser.tsx | 8 -------- 1 file changed, 8 deletions(-) diff --git a/src/app/features/room/ThreadBrowser.tsx b/src/app/features/room/ThreadBrowser.tsx index 51a01780b..f5c58cf0d 100644 --- a/src/app/features/room/ThreadBrowser.tsx +++ b/src/app/features/room/ThreadBrowser.tsx @@ -162,18 +162,10 @@ function ThreadPreview({ room, thread, onClick, onJump }: ThreadPreviewProps) { const senderAvatarMxc = getMemberAvatarMxc(room, senderId); const getContent = (() => rootEvent.getContent()) as GetContentCallback; - // Prefer a locally-counted reply count (based on events already in the thread - // timeline) but fall back to thread.length which is the server-reported count - // from bundled m.thread aggregations. This means that for threads discovered - // via fetchRoomThreads() whose timeline hasn't been paginated yet we still - // show the correct count rather than zero. const localReplyCount = thread.events.filter( (ev: MatrixEvent) => ev.getId() !== thread.id && !reactionOrEditEvent(ev) ).length; // Use Math.max so we never show fewer replies than the server reports. - // thread.length is the server-reported count from bundled m.thread aggregations; - // it may slightly overcount reactions but is far more accurate than a partial - // local cache (e.g. 5 loaded vs 22 on server). const replyCount = Math.max(localReplyCount, thread.length ?? 0); const lastReply = thread.events From 29d90e6285e256ef9cbd9caca86ffd5056d82afa Mon Sep 17 00:00:00 2001 From: 7w1 Date: Thu, 9 Apr 2026 21:58:44 -0500 Subject: [PATCH 047/103] formatting --- src/app/features/room/ThreadDrawer.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/features/room/ThreadDrawer.tsx b/src/app/features/room/ThreadDrawer.tsx index 92288e61c..135c958a9 100644 --- a/src/app/features/room/ThreadDrawer.tsx +++ b/src/app/features/room/ThreadDrawer.tsx @@ -328,7 +328,7 @@ export function ThreadDrawer({ room, threadRootId, onClose, overlay }: ThreadDra .catch(() => {}); // forceUpdateCounter must be in deps so this effect re-runs after // ThreadEvent.Update fires (which flips initialEventsFetched from false to - // true). + // true). }, [mx, room, threadRootId, forceUpdate, forceUpdateCounter]); // Re-render when new thread events arrive (including reactions via ThreadEvent.Update). From e875fc06cb19e6f3e9a389362edec1ff388b6179 Mon Sep 17 00:00:00 2001 From: Shea Duma Date: Fri, 10 Apr 2026 06:06:43 +0300 Subject: [PATCH 048/103] bodge to fix the hero going under the screen when clicking the bottom item --- src/app/features/room/MembersDrawer.tsx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/app/features/room/MembersDrawer.tsx b/src/app/features/room/MembersDrawer.tsx index 0a74acfda..2f4849288 100644 --- a/src/app/features/room/MembersDrawer.tsx +++ b/src/app/features/room/MembersDrawer.tsx @@ -282,7 +282,12 @@ export function MembersDrawer({ room, members }: MembersDrawerProps) { const btn = evt.currentTarget as HTMLButtonElement; const userId = btn.getAttribute('data-user-id'); if (!userId) return; - openUserRoomProfile(room.roomId, space?.roomId, userId, btn.getBoundingClientRect(), 'Left'); + + const cords = btn.getBoundingClientRect(); + // BODGE, dependent on menuItem height staying at toRem(40) + cords.y = Math.min(cords.y, window.innerHeight - 42); + + openUserRoomProfile(room.roomId, space?.roomId, userId, cords, 'Left'); }; return ( From 0fdbc9081fcbadf1e2466665c62a064d24ea9ab7 Mon Sep 17 00:00:00 2001 From: 7w1 Date: Thu, 9 Apr 2026 22:08:53 -0500 Subject: [PATCH 049/103] Update link in About component to Open Collective --- src/app/features/settings/about/About.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/features/settings/about/About.tsx b/src/app/features/settings/about/About.tsx index fdd3d3834..88c3d9259 100644 --- a/src/app/features/settings/about/About.tsx +++ b/src/app/features/settings/about/About.tsx @@ -209,7 +209,7 @@ export function About({ requestBack, requestClose }: Readonly) { - {/* - */} From 1e43d2db4adf092951169c7f1a65aeada0b08302 Mon Sep 17 00:00:00 2001 From: 7w1 Date: Thu, 9 Apr 2026 22:10:33 -0500 Subject: [PATCH 051/103] Add donation link to contributing guidelines --- CONTRIBUTING.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 29f53db0b..c037e31df 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -7,6 +7,7 @@ All types of contributions are encouraged and valued. Please make sure to read t > And if you like the project, but just don't have time to contribute, that's fine. There are other easy ways to support the project and show your appreciation, which we would also be very happy about: > > - Star the project +> - [Donate](https://opencollective.com/sable)! ❤️ > - Talk about it! > - Refer this project in your project's readme > - Mention the project at local meetups and tell your friends/colleagues From ff8d1c73b2ea42c650647e18008c18c86c6f62cb Mon Sep 17 00:00:00 2001 From: 7w1 Date: Thu, 9 Apr 2026 22:12:00 -0500 Subject: [PATCH 052/103] Update donation links to Open Collective Updated support links for donations. --- .changeset/update-donation-links.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/update-donation-links.md diff --git a/.changeset/update-donation-links.md b/.changeset/update-donation-links.md new file mode 100644 index 000000000..3d68d3e97 --- /dev/null +++ b/.changeset/update-donation-links.md @@ -0,0 +1,5 @@ +--- +default: patch +--- + +Updated Support links to point to https://opencollective.com/sable From d6def47b4d82473acbbdda895f5d55f6e3285d19 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 10 Apr 2026 03:15:48 +0000 Subject: [PATCH 053/103] chore: prepare release 1.14.0 --- .changeset/add_msc4095_displaying.md | 5 --- ...nge-code-block-highlighting-to-arborium.md | 5 --- .changeset/feat-add-DM-statuses.md | 5 --- .changeset/feat-add-custom-DM-looks.md | 5 --- .changeset/feat-add-statuses-in-Members.md | 5 --- .changeset/feat-add-theme-specific-colors.md | 5 --- .changeset/feat-collpase-folder-setting.md | 5 --- .changeset/feat-dismiss-local-echo.md | 5 --- .changeset/feat-thread-enhancements.md | 5 --- .changeset/fix-audio-file-description.md | 5 --- .changeset/fix-bug-report-modal-overflow.md | 5 --- .changeset/fix-dms-nav-not-naving.md | 5 --- .changeset/fix-focus-capture-reply.md | 5 --- .changeset/fix-formatted-body-linkify.md | 5 --- .changeset/fix-hidden-names.md | 5 --- .../fix-html-formatting-on-long-messages.md | 5 --- .changeset/fix-ios-overscroll.md | 5 --- .../fix-pmp-encrypted-sticky-scrolling.md | 5 --- .../fix-timeline-blank-on-foreground.md | 5 --- .changeset/pr-602-centered-zoom.md | 5 --- .changeset/pr-602-multiplicative-zoom.md | 5 --- .changeset/pr-602-zoom-buttons.md | 5 --- .changeset/remove-right-click-drag.md | 5 --- .changeset/settings-links.md | 5 --- .changeset/settings-route-based-navigation.md | 5 --- .changeset/update-donation-links.md | 5 --- CHANGELOG.md | 34 +++++++++++++++++++ package.json | 2 +- 28 files changed, 35 insertions(+), 131 deletions(-) delete mode 100644 .changeset/add_msc4095_displaying.md delete mode 100644 .changeset/change-code-block-highlighting-to-arborium.md delete mode 100644 .changeset/feat-add-DM-statuses.md delete mode 100644 .changeset/feat-add-custom-DM-looks.md delete mode 100644 .changeset/feat-add-statuses-in-Members.md delete mode 100644 .changeset/feat-add-theme-specific-colors.md delete mode 100644 .changeset/feat-collpase-folder-setting.md delete mode 100644 .changeset/feat-dismiss-local-echo.md delete mode 100644 .changeset/feat-thread-enhancements.md delete mode 100644 .changeset/fix-audio-file-description.md delete mode 100644 .changeset/fix-bug-report-modal-overflow.md delete mode 100644 .changeset/fix-dms-nav-not-naving.md delete mode 100644 .changeset/fix-focus-capture-reply.md delete mode 100644 .changeset/fix-formatted-body-linkify.md delete mode 100644 .changeset/fix-hidden-names.md delete mode 100644 .changeset/fix-html-formatting-on-long-messages.md delete mode 100644 .changeset/fix-ios-overscroll.md delete mode 100644 .changeset/fix-pmp-encrypted-sticky-scrolling.md delete mode 100644 .changeset/fix-timeline-blank-on-foreground.md delete mode 100644 .changeset/pr-602-centered-zoom.md delete mode 100644 .changeset/pr-602-multiplicative-zoom.md delete mode 100644 .changeset/pr-602-zoom-buttons.md delete mode 100644 .changeset/remove-right-click-drag.md delete mode 100644 .changeset/settings-links.md delete mode 100644 .changeset/settings-route-based-navigation.md delete mode 100644 .changeset/update-donation-links.md diff --git a/.changeset/add_msc4095_displaying.md b/.changeset/add_msc4095_displaying.md deleted file mode 100644 index a8b83ed00..000000000 --- a/.changeset/add_msc4095_displaying.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -default: minor ---- - -Add support for rendering bundled urls per MSC4095 diff --git a/.changeset/change-code-block-highlighting-to-arborium.md b/.changeset/change-code-block-highlighting-to-arborium.md deleted file mode 100644 index 1071ef3dc..000000000 --- a/.changeset/change-code-block-highlighting-to-arborium.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -default: minor ---- - -Improve code blocks with faster, more accurate syntax highlighting, broader language support, and separate light and dark theme options. diff --git a/.changeset/feat-add-DM-statuses.md b/.changeset/feat-add-DM-statuses.md deleted file mode 100644 index 55e0aa3be..000000000 --- a/.changeset/feat-add-DM-statuses.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -default: minor ---- - -Add statuses to DMs diff --git a/.changeset/feat-add-custom-DM-looks.md b/.changeset/feat-add-custom-DM-looks.md deleted file mode 100644 index a2df236d5..000000000 --- a/.changeset/feat-add-custom-DM-looks.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -default: minor ---- - -Add custom DM images and descriptions diff --git a/.changeset/feat-add-statuses-in-Members.md b/.changeset/feat-add-statuses-in-Members.md deleted file mode 100644 index 9ea6f93ce..000000000 --- a/.changeset/feat-add-statuses-in-Members.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -default: minor ---- - -Add statuses to Member Tile diff --git a/.changeset/feat-add-theme-specific-colors.md b/.changeset/feat-add-theme-specific-colors.md deleted file mode 100644 index 1ad50e322..000000000 --- a/.changeset/feat-add-theme-specific-colors.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -default: minor ---- - -Add the ability to set Global Name Colors dependent on the theme (dark/light) diff --git a/.changeset/feat-collpase-folder-setting.md b/.changeset/feat-collpase-folder-setting.md deleted file mode 100644 index b49339c45..000000000 --- a/.changeset/feat-collpase-folder-setting.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -default: minor ---- - -Add a setting to collapse sidebar folders by default. diff --git a/.changeset/feat-dismiss-local-echo.md b/.changeset/feat-dismiss-local-echo.md deleted file mode 100644 index 4fa2adbb4..000000000 --- a/.changeset/feat-dismiss-local-echo.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -default: minor ---- - -Add a "Dismiss" button to command response messages. diff --git a/.changeset/feat-thread-enhancements.md b/.changeset/feat-thread-enhancements.md deleted file mode 100644 index b2532c19c..000000000 --- a/.changeset/feat-thread-enhancements.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -default: minor ---- - -Update threads: various fixes, browse all room threads, and see live reply counts on messages. diff --git a/.changeset/fix-audio-file-description.md b/.changeset/fix-audio-file-description.md deleted file mode 100644 index 89710332a..000000000 --- a/.changeset/fix-audio-file-description.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -default: patch ---- - -Use file name instead of "a voice message" for non-voice audio files. diff --git a/.changeset/fix-bug-report-modal-overflow.md b/.changeset/fix-bug-report-modal-overflow.md deleted file mode 100644 index c37f218a7..000000000 --- a/.changeset/fix-bug-report-modal-overflow.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -default: patch ---- - -Constrain bug report modal to viewport height to prevent overflow. diff --git a/.changeset/fix-dms-nav-not-naving.md b/.changeset/fix-dms-nav-not-naving.md deleted file mode 100644 index 2e214e4a8..000000000 --- a/.changeset/fix-dms-nav-not-naving.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -default: patch ---- - -Fix dms navigation not navigating to dms when local storage is messed up. diff --git a/.changeset/fix-focus-capture-reply.md b/.changeset/fix-focus-capture-reply.md deleted file mode 100644 index 30b559f9c..000000000 --- a/.changeset/fix-focus-capture-reply.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -default: patch ---- - -Fix reply button not capturing editor focus. diff --git a/.changeset/fix-formatted-body-linkify.md b/.changeset/fix-formatted-body-linkify.md deleted file mode 100644 index cbd310aba..000000000 --- a/.changeset/fix-formatted-body-linkify.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -default: patch ---- - -Fixes links not being clickable in formatted messages, including messages that use abbreviations. diff --git a/.changeset/fix-hidden-names.md b/.changeset/fix-hidden-names.md deleted file mode 100644 index b3aa8fb1a..000000000 --- a/.changeset/fix-hidden-names.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -default: patch ---- - -Fix some zero-width (invisible) names diff --git a/.changeset/fix-html-formatting-on-long-messages.md b/.changeset/fix-html-formatting-on-long-messages.md deleted file mode 100644 index 2a34189b0..000000000 --- a/.changeset/fix-html-formatting-on-long-messages.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -default: minor ---- - -Re-introduced custom HTML formatting for long messages diff --git a/.changeset/fix-ios-overscroll.md b/.changeset/fix-ios-overscroll.md deleted file mode 100644 index 02b02f246..000000000 --- a/.changeset/fix-ios-overscroll.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -default: patch ---- - -Fix iOS elastic bounce-back overscroll on the root element. diff --git a/.changeset/fix-pmp-encrypted-sticky-scrolling.md b/.changeset/fix-pmp-encrypted-sticky-scrolling.md deleted file mode 100644 index df6d3b941..000000000 --- a/.changeset/fix-pmp-encrypted-sticky-scrolling.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -default: patch ---- - -Fixed the "sticky scrolling" issue in encrypted rooms with many PMP messages. diff --git a/.changeset/fix-timeline-blank-on-foreground.md b/.changeset/fix-timeline-blank-on-foreground.md deleted file mode 100644 index a214a478f..000000000 --- a/.changeset/fix-timeline-blank-on-foreground.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -default: patch ---- - -Fix blank room timeline when app returns from background. When sliding sync delivers an `initial: true` response for the open room, a `TimelineReset` event now correctly shows skeleton placeholders while events reload instead of leaving an empty view. diff --git a/.changeset/pr-602-centered-zoom.md b/.changeset/pr-602-centered-zoom.md deleted file mode 100644 index 35c1a550e..000000000 --- a/.changeset/pr-602-centered-zoom.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -default: patch ---- - -Image zooming is now centered on the cursor position diff --git a/.changeset/pr-602-multiplicative-zoom.md b/.changeset/pr-602-multiplicative-zoom.md deleted file mode 100644 index 7a4def730..000000000 --- a/.changeset/pr-602-multiplicative-zoom.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -default: patch ---- - -Image zooming is now multiplicative instead of additive, resulting in a consistent "zooming speed". diff --git a/.changeset/pr-602-zoom-buttons.md b/.changeset/pr-602-zoom-buttons.md deleted file mode 100644 index 3c5ab5df6..000000000 --- a/.changeset/pr-602-zoom-buttons.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -default: patch ---- - -Image zoom buttons now zoom towards the center of the screen diff --git a/.changeset/remove-right-click-drag.md b/.changeset/remove-right-click-drag.md deleted file mode 100644 index 1627565d1..000000000 --- a/.changeset/remove-right-click-drag.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -default: patch ---- - -Right clicks no longer drag images in the viewer. diff --git a/.changeset/settings-links.md b/.changeset/settings-links.md deleted file mode 100644 index 7e36f2cc7..000000000 --- a/.changeset/settings-links.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -default: minor ---- - -You can now share direct links to specific settings, and opening one takes you to the right section and highlights the target option. diff --git a/.changeset/settings-route-based-navigation.md b/.changeset/settings-route-based-navigation.md deleted file mode 100644 index ff0abe0cb..000000000 --- a/.changeset/settings-route-based-navigation.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -default: minor ---- - -Settings now use route-based navigation with improved desktop and mobile behavior, including better back and close handling. diff --git a/.changeset/update-donation-links.md b/.changeset/update-donation-links.md deleted file mode 100644 index 3d68d3e97..000000000 --- a/.changeset/update-donation-links.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -default: patch ---- - -Updated Support links to point to https://opencollective.com/sable diff --git a/CHANGELOG.md b/CHANGELOG.md index 8d0dbcb8e..5695f023c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,39 @@ # Sable Client Changelog +## 1.14.0 (2026-04-10) + +### Features + +* Add support for rendering bundled urls per MSC4095 ([#590](https://github.com/SableClient/Sable/pull/590) by @nushea) +* Improve code blocks with faster, more accurate syntax highlighting, broader language support, and separate light and dark theme options. ([#576](https://github.com/SableClient/Sable/pull/576) by @hazre) +* Add statuses to DMs ([#644](https://github.com/SableClient/Sable/pull/644) by @nushea) +* Add custom DM images and descriptions ([#644](https://github.com/SableClient/Sable/pull/644) by @nushea) +* Add statuses to Member Tile ([#644](https://github.com/SableClient/Sable/pull/644) by @nushea) +* Add the ability to set Global Name Colors dependent on the theme (dark/light) ([#656](https://github.com/SableClient/Sable/pull/656) by @nushea) +* Add a setting to collapse sidebar folders by default. ([#624](https://github.com/SableClient/Sable/pull/624) by @7w1) +* Add a "Dismiss" button to command response messages. ([#625](https://github.com/SableClient/Sable/pull/625) by @7w1) +* Update threads: various fixes, browse all room threads, and see live reply counts on messages. ([#564](https://github.com/SableClient/Sable/pull/564) by @Just-Insane) +* Re-introduced custom HTML formatting for long messages ([#641](https://github.com/SableClient/Sable/pull/641) by @Septicity) +* You can now share direct links to specific settings, and opening one takes you to the right section and highlights the target option. ([#577](https://github.com/SableClient/Sable/pull/577) by @hazre) +* Settings now use route-based navigation with improved desktop and mobile behavior, including better back and close handling. ([#577](https://github.com/SableClient/Sable/pull/577) by @hazre) + +### Fixes + +* Use file name instead of "a voice message" for non-voice audio files. ([#651](https://github.com/SableClient/Sable/pull/651) by @mvanhorn) +* Constrain bug report modal to viewport height to prevent overflow. ([#652](https://github.com/SableClient/Sable/pull/652) by @mvanhorn) +* Fix dms navigation not navigating to dms when local storage is messed up. ([#653](https://github.com/SableClient/Sable/pull/653) by @7w1) +* Fix reply button not capturing editor focus. ([#623](https://github.com/SableClient/Sable/pull/623) by @7w1) +* Fixes links not being clickable in formatted messages, including messages that use abbreviations. ([#632](https://github.com/SableClient/Sable/pull/632) by @hazre) +* Fix some zero-width (invisible) names ([#640](https://github.com/SableClient/Sable/pull/640) by @nushea) +* Fix iOS elastic bounce-back overscroll on the root element. ([#650](https://github.com/SableClient/Sable/pull/650) by @mvanhorn) +* Fixed the "sticky scrolling" issue in encrypted rooms with many PMP messages. ([#626](https://github.com/SableClient/Sable/pull/626) by @Septicity) +* Fix blank room timeline when app returns from background. When sliding sync delivers an `initial: true` response for the open room, a `TimelineReset` event now correctly shows skeleton placeholders while events reload instead of leaving an empty view. ([#657](https://github.com/SableClient/Sable/pull/657) by @Just-Insane) +* Image zooming is now centered on the cursor position ([#602](https://github.com/SableClient/Sable/pull/602) by @mini-bomba) +* Image zooming is now multiplicative instead of additive, resulting in a consistent "zooming speed". ([#602](https://github.com/SableClient/Sable/pull/602) by @mini-bomba) +* Image zoom buttons now zoom towards the center of the screen ([#602](https://github.com/SableClient/Sable/pull/602) by @mini-bomba) +* Right clicks no longer drag images in the viewer. ([#620](https://github.com/SableClient/Sable/pull/620) by @Septicity) +* Updated Support links to point to https://opencollective.com/sable ([#661](https://github.com/SableClient/Sable/pull/661) by @7w1) + ## 1.13.1 (2026-03-30) ### Fixes diff --git a/package.json b/package.json index cab220bb1..980aa4b64 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "sable", - "version": "1.13.1", + "version": "1.14.0", "description": "An almost stable Matrix client", "type": "module", "packageManager": "pnpm@10.32.1+sha512.a706938f0e89ac1456b6563eab4edf1d1faf3368d1191fc5c59790e96dc918e4456ab2e67d613de1043d2e8c81f87303e6b40d4ffeca9df15ef1ad567348f2be", From afc33a18d13f9c85eb8cf55e4378c9c49c378bdd Mon Sep 17 00:00:00 2001 From: Shea Duma Date: Sat, 11 Apr 2026 04:25:45 +0300 Subject: [PATCH 054/103] break misc data into sections --- .../components/UserRoomProfileRenderer.tsx | 2 +- .../user-profile/UserRoomProfile.tsx | 68 +++++++++++++------ 2 files changed, 48 insertions(+), 22 deletions(-) diff --git a/src/app/components/UserRoomProfileRenderer.tsx b/src/app/components/UserRoomProfileRenderer.tsx index 97489d277..e8b247c01 100644 --- a/src/app/components/UserRoomProfileRenderer.tsx +++ b/src/app/components/UserRoomProfileRenderer.tsx @@ -23,7 +23,7 @@ function UserRoomProfileContextMenu({ state }: { state: UserRoomProfileState }) window.innerHeight / 2 ? 'End' : 'Start'} content={ ) { - const clamp = (str: any, len: number) => { - const stringified = String(str ?? ''); - return stringified.length > len ? `${stringified.slice(0, len)}...` : stringified; - }; const [showMore, setShowMore] = useState(false); + const [moreIndex, setMoreIndex] = useState(0); const [renderAnimals] = useSetting(settingsAtom, 'renderAnimals'); const isCat = profile.isCat === true; @@ -223,25 +220,54 @@ function UserExtendedSection({ {showMore && ( - - {unknownFields.map(([key, value]) => ( - - - {key} - + <> + + {unknownFields.length > 1 && ( + + )} + + {unknownFields[moreIndex][0]} + + {unknownFields.length > 1 && ( + + )} + + + - {clamp(renderValue(value), 128)} + {renderValue(unknownFields[moreIndex][1])} - ))} - + + )} )} From 688feabccff7d721dba3c78afb4780cf696ea992 Mon Sep 17 00:00:00 2001 From: Shea Duma Date: Sat, 11 Apr 2026 07:47:01 +0300 Subject: [PATCH 055/103] style misc data --- .../user-profile/UserRoomProfile.tsx | 84 +++++++++++++------ 1 file changed, 59 insertions(+), 25 deletions(-) diff --git a/src/app/components/user-profile/UserRoomProfile.tsx b/src/app/components/user-profile/UserRoomProfile.tsx index b76ff3989..5eddd236e 100644 --- a/src/app/components/user-profile/UserRoomProfile.tsx +++ b/src/app/components/user-profile/UserRoomProfile.tsx @@ -35,6 +35,7 @@ import { getSettings, settingsAtom } from '$state/settings'; import { filterPronounsByLanguage } from '$utils/pronouns'; import { useSetting } from '$state/hooks/settings'; import { useSettingsLinkBaseUrl } from '$features/settings/useSettingsLinkBaseUrl'; +import { TextViewerContent } from '$components/text-viewer'; import { CreatorChip } from './CreatorChip'; import { UserInviteAlert, UserBanAlert, UserModeration, UserKickAlert } from './UserModeration'; import { PowerChip } from './PowerChip'; @@ -206,22 +207,40 @@ function UserExtendedSection({ {unknownFields.length > 0 && ( - + {!showMore && ( + + + + )} {showMore && ( - <> - +
+ {unknownFields.length > 1 && ( )} - setShowMore(!showMore)} + style={{ + padding: '1rem', + justifyContent: 'flex-center', + width: 'fit-content', + wordBreak: 'break-word', + overflow: 'hidden', + flexGrow: '1', + }} > - {unknownFields[moreIndex][0]} - + + {unknownFields[moreIndex][0]} + + {unknownFields.length > 1 && (
)}
)} From 5f5957a293359b5588d789c6fb24a047a583af39 Mon Sep 17 00:00:00 2001 From: Shea Duma Date: Sat, 11 Apr 2026 11:54:55 +0300 Subject: [PATCH 056/103] style misc selector --- src/app/components/user-profile/UserChips.tsx | 2 +- .../user-profile/UserModeration.tsx | 4 +- .../user-profile/UserRoomProfile.tsx | 112 +++++++++++------- 3 files changed, 73 insertions(+), 45 deletions(-) diff --git a/src/app/components/user-profile/UserChips.tsx b/src/app/components/user-profile/UserChips.tsx index 1ce3b26c1..44432df22 100644 --- a/src/app/components/user-profile/UserChips.tsx +++ b/src/app/components/user-profile/UserChips.tsx @@ -433,7 +433,7 @@ export function IgnoredUserAlert() { - + Blocked User diff --git a/src/app/components/user-profile/UserModeration.tsx b/src/app/components/user-profile/UserModeration.tsx index a6f8c796e..fb7b679da 100644 --- a/src/app/components/user-profile/UserModeration.tsx +++ b/src/app/components/user-profile/UserModeration.tsx @@ -256,7 +256,9 @@ export function UserModeration({ userId, canKick, canBan, canInvite }: UserModer - Moderation + + Moderation + ) { const [showMore, setShowMore] = useState(false); - const [moreIndex, setMoreIndex] = useState(0); + const [moreIndex, setMoreIndex] = useState(-1); const [renderAnimals] = useSetting(settingsAtom, 'renderAnimals'); const isCat = profile.isCat === true; @@ -146,6 +146,69 @@ function UserExtendedSection({ ([key]) => !KNOWN_KEYS.includes(key) ); + function handleMiscSelector(index: number) { + setMoreIndex(index); + setShowMore(false); + } + + const miscSelector = useMemo( + () => ( + + handleMiscSelector(-1)} + > + + Show less + + {unknownFields.map(([key], index) => ( + handleMiscSelector(index)} + > + {key} + + ))} + + ), + [unknownFields] + ); + const miscHeader = useMemo( + () => ( + + + {showMore && miscSelector} + + ), + [miscSelector, moreIndex, showMore, unknownFields] + ); + return ( {(pronouns || localTime) && ( @@ -207,24 +270,8 @@ function UserExtendedSection({ {unknownFields.length > 0 && ( - {!showMore && ( - - - - )} - - {showMore && ( + {moreIndex === -1 && miscHeader} + {moreIndex > -1 && (
)} - + {miscHeader} {unknownFields.length > 1 && ( - {showMore && miscSelector} + {showMisc && miscSelector} ), - [miscSelector, moreIndex, showMore, unknownFields] + [miscSelector, miscDataIndex, showMisc, unknownFields] ); return ( @@ -270,8 +274,8 @@ function UserExtendedSection({ {unknownFields.length > 0 && ( - {moreIndex === -1 && miscHeader} - {moreIndex > -1 && ( + {miscDataIndex === -1 && miscHeader} + {miscDataIndex > -1 && (
- setMoreIndex(moreIndex === 0 ? unknownFields.length - 1 : moreIndex - 1) + setMiscDataIndex( + miscDataIndex === 0 ? unknownFields.length - 1 : miscDataIndex - 1 + ) } > @@ -306,7 +312,7 @@ function UserExtendedSection({ variant="Secondary" size="300" fill="None" - onClick={() => setMoreIndex((moreIndex + 1) % unknownFields.length)} + onClick={() => setMiscDataIndex((miscDataIndex + 1) % unknownFields.length)} > @@ -322,7 +328,7 @@ function UserExtendedSection({ }} > From 9d77e8ab9f881809032ecef356c2fcd00c4dd44a Mon Sep 17 00:00:00 2001 From: Shea Duma Date: Sat, 11 Apr 2026 20:43:34 +0300 Subject: [PATCH 059/103] small fix sticking and showing the wrong item in the preview --- .changeset/fix-status-sticking-issue.md | 4 ++++ src/app/features/room-nav/RoomNavItem.tsx | 4 +--- src/app/pages/client/sidebar/DirectDMsList.tsx | 7 +++++-- 3 files changed, 10 insertions(+), 5 deletions(-) create mode 100644 .changeset/fix-status-sticking-issue.md diff --git a/.changeset/fix-status-sticking-issue.md b/.changeset/fix-status-sticking-issue.md new file mode 100644 index 000000000..f9731da7e --- /dev/null +++ b/.changeset/fix-status-sticking-issue.md @@ -0,0 +1,4 @@ +--- +default: patch +--- +Fix status sometimes sticking in member tile diff --git a/src/app/features/room-nav/RoomNavItem.tsx b/src/app/features/room-nav/RoomNavItem.tsx index 15e615720..9ae9766fa 100644 --- a/src/app/features/room-nav/RoomNavItem.tsx +++ b/src/app/features/room-nav/RoomNavItem.tsx @@ -293,10 +293,8 @@ export function RoomNavItem({ const matrixRoomName = useRoomName(room); const roomName = (dmUserId && nicknames[dmUserId]) || matrixRoomName; const presence = useUserPresence(dmUserId ?? ''); - const [topicEvent, setTopicEvent] = useState(getStateEvent(room, StateEvent.RoomTopic)); + const topicEvent = getStateEvent(room, StateEvent.RoomTopic); - // Ensures that the description does not stick to the position the room is in the row - useEffect(() => setTopicEvent(getStateEvent(room, StateEvent.RoomTopic)), [room, setTopicEvent]); const roomDescription = direct ? (customDMCards && (topicEvent?.getContent().topic as string)) || presence?.status : undefined; diff --git a/src/app/pages/client/sidebar/DirectDMsList.tsx b/src/app/pages/client/sidebar/DirectDMsList.tsx index 16e829ce5..fa277695a 100644 --- a/src/app/pages/client/sidebar/DirectDMsList.tsx +++ b/src/app/pages/client/sidebar/DirectDMsList.tsx @@ -15,7 +15,7 @@ import { } from '$components/sidebar'; import { RoomAvatar } from '$components/room-avatar'; import { UserAvatar } from '$components/user-avatar'; -import { getDirectRoomAvatarUrl } from '$utils/room'; +import { getDirectRoomAvatarUrl, getRoomAvatarUrl } from '$utils/room'; import { useMediaAuthentication } from '$hooks/useMediaAuthentication'; import { nameInitials } from '$utils/common'; import { getCanonicalAliasOrRoomId, mxcUrlToHttp } from '$utils/matrix'; @@ -69,7 +69,10 @@ function DMItem({ room, selected }: DMItemProps) { ( From e0c61ebdcc3b09a54a73e23b7bb37dc0ceddea8f Mon Sep 17 00:00:00 2001 From: Shea Duma Date: Sat, 11 Apr 2026 20:51:05 +0300 Subject: [PATCH 060/103] making the md checker happi --- .changeset/fix-status-sticking-issue.md | 1 + 1 file changed, 1 insertion(+) diff --git a/.changeset/fix-status-sticking-issue.md b/.changeset/fix-status-sticking-issue.md index f9731da7e..c954c09ca 100644 --- a/.changeset/fix-status-sticking-issue.md +++ b/.changeset/fix-status-sticking-issue.md @@ -1,4 +1,5 @@ --- default: patch --- + Fix status sometimes sticking in member tile From 0b658e671b74a5b793a4c32b30f8336bacffce07 Mon Sep 17 00:00:00 2001 From: Shea Duma Date: Sun, 12 Apr 2026 03:06:57 +0300 Subject: [PATCH 061/103] proper fix for more wide presence issues too! --- src/app/features/room-nav/RoomNavItem.tsx | 21 ++++++--------------- src/app/hooks/useUserPresence.ts | 23 ++++++++++++++--------- 2 files changed, 20 insertions(+), 24 deletions(-) diff --git a/src/app/features/room-nav/RoomNavItem.tsx b/src/app/features/room-nav/RoomNavItem.tsx index 9ae9766fa..22886c224 100644 --- a/src/app/features/room-nav/RoomNavItem.tsx +++ b/src/app/features/room-nav/RoomNavItem.tsx @@ -26,12 +26,7 @@ import { useNavigate } from 'react-router-dom'; import { NavButton, NavItem, NavItemContent, NavItemOptions } from '$components/nav'; import { UnreadBadge, UnreadBadgeCenter } from '$components/unread-badge'; import { RoomAvatar, RoomIcon } from '$components/room-avatar'; -import { - getDirectRoomAvatarUrl, - getRoomAvatarUrl, - getStateEvent, - roomHaveUnread, -} from '$utils/room'; +import { getDirectRoomAvatarUrl, getRoomAvatarUrl, roomHaveUnread } from '$utils/room'; import { nameInitials } from '$utils/common'; import { useMatrixClient } from '$hooks/useMatrixClient'; import { useRoomUnread } from '$state/hooks/unread'; @@ -61,7 +56,7 @@ import { useRoomCreators } from '$hooks/useRoomCreators'; import { useRoomPermissions } from '$hooks/useRoomPermissions'; import { InviteUserPrompt } from '$components/invite-user-prompt'; import { ScreenSize, useScreenSizeContext } from '$hooks/useScreenSize'; -import { useRoomName } from '$hooks/useRoomMeta'; +import { useRoomName, useRoomTopic } from '$hooks/useRoomMeta'; import { nicknamesAtom } from '$state/nicknames'; import { useRoomNavigate } from '$hooks/useRoomNavigate'; @@ -74,7 +69,6 @@ import { CallControlState } from '$plugins/call/CallControlState'; import { useAutoDiscoveryInfo } from '$hooks/useAutoDiscoveryInfo'; import { livekitSupport } from '$hooks/useLivekitSupport'; import { Presence, useUserPresence } from '$hooks/useUserPresence'; -import { StateEvent } from '$types/matrix/room'; import { AvatarPresence, PresenceBadge } from '$components/presence'; import { RoomNavUser } from './RoomNavUser'; @@ -293,11 +287,8 @@ export function RoomNavItem({ const matrixRoomName = useRoomName(room); const roomName = (dmUserId && nicknames[dmUserId]) || matrixRoomName; const presence = useUserPresence(dmUserId ?? ''); - const topicEvent = getStateEvent(room, StateEvent.RoomTopic); - - const roomDescription = direct - ? (customDMCards && (topicEvent?.getContent().topic as string)) || presence?.status - : undefined; + const getRoomTopic = useRoomTopic(room); + const roomTopic = direct ? ((customDMCards && getRoomTopic) ?? presence?.status) : undefined; const { navigateRoom } = useRoomNavigate(); const navigate = useNavigate(); @@ -447,7 +438,7 @@ export function RoomNavItem({ > {roomName} - {roomDescription && ( + {roomTopic && ( - {roomDescription} + {roomTopic} )} diff --git a/src/app/hooks/useUserPresence.ts b/src/app/hooks/useUserPresence.ts index f1b858422..2c040b989 100644 --- a/src/app/hooks/useUserPresence.ts +++ b/src/app/hooks/useUserPresence.ts @@ -25,22 +25,27 @@ const getUserPresence = (user: User): UserPresence => ({ export const useUserPresence = (userId: string): UserPresence | undefined => { const mx = useMatrixClient(); const user = mx.getUser(userId); - const [presence, setPresence] = useState(() => (user ? getUserPresence(user) : undefined)); useEffect(() => { - const updatePresence: UserEventHandlerMap[UserEvent.Presence] = (event, u) => { - if (u.userId === user?.userId) { + if (!user) { + setPresence(undefined); + return undefined; + } + setPresence(getUserPresence(user)); + const updatePresence: UserEventHandlerMap[UserEvent.Presence] = (e, u) => { + if (u.userId === user.userId) { setPresence(getUserPresence(user)); } }; - user?.on(UserEvent.Presence, updatePresence); - user?.on(UserEvent.CurrentlyActive, updatePresence); - user?.on(UserEvent.LastPresenceTs, updatePresence); + user.on(UserEvent.Presence, updatePresence); + user.on(UserEvent.CurrentlyActive, updatePresence); + user.on(UserEvent.LastPresenceTs, updatePresence); + return () => { - user?.removeListener(UserEvent.Presence, updatePresence); - user?.removeListener(UserEvent.CurrentlyActive, updatePresence); - user?.removeListener(UserEvent.LastPresenceTs, updatePresence); + user.removeListener(UserEvent.Presence, updatePresence); + user.removeListener(UserEvent.CurrentlyActive, updatePresence); + user.removeListener(UserEvent.LastPresenceTs, updatePresence); }; }, [user]); From e16d96fab41852cc7bd7f478cc3f92fbec23c94c Mon Sep 17 00:00:00 2001 From: Shea Duma Date: Sun, 12 Apr 2026 04:02:21 +0300 Subject: [PATCH 062/103] fix issue #588 --- .changeset/add_better_misc_data_styling.md | 5 +++++ src/app/components/message/RenderBody.tsx | 3 ++- src/app/features/room/ThreadDrawer.tsx | 1 + 3 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 .changeset/add_better_misc_data_styling.md diff --git a/.changeset/add_better_misc_data_styling.md b/.changeset/add_better_misc_data_styling.md new file mode 100644 index 000000000..70e10a2bb --- /dev/null +++ b/.changeset/add_better_misc_data_styling.md @@ -0,0 +1,5 @@ +--- +default: fix +--- + +Fix spam-clicking abbreviations crashing sable diff --git a/src/app/components/message/RenderBody.tsx b/src/app/components/message/RenderBody.tsx index fe73afe5b..8b83dff99 100644 --- a/src/app/components/message/RenderBody.tsx +++ b/src/app/components/message/RenderBody.tsx @@ -77,8 +77,9 @@ function AbbreviationTerm({ text, definition }: AbbreviationTermProps) { const [anchor, setAnchor] = useState(); const handleClick: MouseEventHandler = (e) => { + if (e.currentTarget === null) return; e.stopPropagation(); - setAnchor((prev) => (prev ? undefined : e.currentTarget.getBoundingClientRect())); + setAnchor((prev) => (prev ? undefined : e.currentTarget?.getBoundingClientRect())); }; // On mobile, tapping an abbreviation pins the tooltip open. diff --git a/src/app/features/room/ThreadDrawer.tsx b/src/app/features/room/ThreadDrawer.tsx index 135c958a9..267e26b80 100644 --- a/src/app/features/room/ThreadDrawer.tsx +++ b/src/app/features/room/ThreadDrawer.tsx @@ -494,6 +494,7 @@ export function ThreadDrawer({ room, threadRootId, onClose, overlay }: ThreadDra const handleUserClick: MouseEventHandler = useCallback( (evt) => { + if (!evt.currentTarget) return; evt.preventDefault(); evt.stopPropagation(); const userId = evt.currentTarget.getAttribute('data-user-id'); From 471e77e15fc8aff9f6eb25e436b4140d4d4392e7 Mon Sep 17 00:00:00 2001 From: Shea Duma Date: Sun, 12 Apr 2026 10:18:52 +0300 Subject: [PATCH 063/103] fix showing multiple previews --- src/app/components/RenderMessageContent.tsx | 3 +- .../message/content/ImageContent.tsx | 1 + .../components/url-preview/UrlPreviewCard.tsx | 126 ++++++++++-------- 3 files changed, 75 insertions(+), 55 deletions(-) diff --git a/src/app/components/RenderMessageContent.tsx b/src/app/components/RenderMessageContent.tsx index cfc95b2cd..bcbf0201d 100644 --- a/src/app/components/RenderMessageContent.tsx +++ b/src/app/components/RenderMessageContent.tsx @@ -116,9 +116,10 @@ function RenderMessageContentInternal({ url, type: getMediaType(url), })); + if (filteredUrls.length > 0) console.log(filteredUrls); const mediaLinks = analyzed.filter((item) => item.type !== null); - const toRender = mediaLinks.length > 0 ? mediaLinks : [analyzed[0]]; + const toRender = mediaLinks.length > 0 ? mediaLinks : analyzed; return ( {toRender.map(({ url, type }) => { diff --git a/src/app/components/message/content/ImageContent.tsx b/src/app/components/message/content/ImageContent.tsx index ad51d2a4f..60cb9cb09 100644 --- a/src/app/components/message/content/ImageContent.tsx +++ b/src/app/components/message/content/ImageContent.tsx @@ -197,6 +197,7 @@ export const ImageContent = as<'div', ImageContentProps>( hasDimensions ? css.AbsoluteContainer : undefined, blurred && css.Blur )} + style={{ width: '100%' }} > {renderImage({ alt: body, diff --git a/src/app/components/url-preview/UrlPreviewCard.tsx b/src/app/components/url-preview/UrlPreviewCard.tsx index 63586b436..9e3dbdd1d 100644 --- a/src/app/components/url-preview/UrlPreviewCard.tsx +++ b/src/app/components/url-preview/UrlPreviewCard.tsx @@ -108,6 +108,15 @@ export const UrlPreviewCard = as< } }; + const ogW = ((prev['og:video'] && prev['og:video:width']) || + (prev['og:image'] && prev['og:image:width']) || + 1) as number; + const ogH = ((prev['og:video'] && prev['og:video:height']) || + (prev['og:image'] && prev['og:image:height']) || + 1) as number; + + const aspectRatio = ogW && ogH ? `${ogW} / ${ogH}` : undefined; + return ( { - const ogW = prev['og:image:width']; - const ogH = prev['og:image:height']; - const aspectRatio = ogW && ogH ? `${ogW} / ${ogH}` : undefined; - return ( - ( + + - } - renderImage={(p) => ( - - )} - /> - - ); - })()} + autoPlay + onAuxClick={handleAuxClick} + body={prev['og:title']} + url={prev['og:image']} + renderViewer={(p) => } + renderImage={(p) => ( + + )} + /> + + ))()} {!prev['og:video'] && !prev['og:image'] && prev['og:audio'] && ( {previewContent} @@ -345,24 +356,31 @@ export const UrlPreviewHolder = as<'div'>(({ children, ...props }, ref) => { )} - + {children} - {canScrollRight && ( - <> -
- - - - - )} + {canScrollRight && ( + <> +
+ + + + + )} From 9310e5c07c24c173f4d8640bd135af80a94d550b Mon Sep 17 00:00:00 2001 From: Shea Duma Date: Sun, 12 Apr 2026 10:31:21 +0300 Subject: [PATCH 064/103] moved embed settings to their own section --- src/app/features/settings/general/General.tsx | 139 ++++++++++-------- 1 file changed, 74 insertions(+), 65 deletions(-) diff --git a/src/app/features/settings/general/General.tsx b/src/app/features/settings/general/General.tsx index 291e76f2f..aaf91331b 100644 --- a/src/app/features/settings/general/General.tsx +++ b/src/app/features/settings/general/General.tsx @@ -883,18 +883,6 @@ function Messages() { 'hideNickAvatarEvents' ); const [mediaAutoLoad, setMediaAutoLoad] = useSetting(settingsAtom, 'mediaAutoLoad'); - const [bundledPreview, setBundledPreview] = useSetting(settingsAtom, 'bundledPreview'); - const [urlPreview, setUrlPreview] = useSetting(settingsAtom, 'urlPreview'); - const [encUrlPreview, setEncUrlPreview] = useSetting(settingsAtom, 'encUrlPreview'); - const [clientUrlPreview, setClientUrlPreview] = useSetting(settingsAtom, 'clientUrlPreview'); - const [encClientUrlPreview, setEncClientUrlPreview] = useSetting( - settingsAtom, - 'encClientUrlPreview' - ); - const [clientPreviewYoutube, setClientPreviewYoutube] = useSetting( - settingsAtom, - 'clientPreviewYoutube' - ); const [showHiddenEvents, setShowHiddenEvents] = useSetting(settingsAtom, 'showHiddenEvents'); const [showTombstoneEvents, setShowTombstoneEvents] = useSetting( settingsAtom, @@ -948,6 +936,22 @@ function Messages() { /> )} + + + + + setMediaAutoLoad(!v)} + /> + } + /> + setMediaAutoLoad(!v)} + value={hideMembershipInReadOnly} + onChange={setHideMembershipInReadOnly} /> } /> + + + + + } + /> + + + ); +} + +function Embeds() { + const [bundledPreview, setBundledPreview] = useSetting(settingsAtom, 'bundledPreview'); + const [urlPreview, setUrlPreview] = useSetting(settingsAtom, 'urlPreview'); + const [encUrlPreview, setEncUrlPreview] = useSetting(settingsAtom, 'encUrlPreview'); + const [clientUrlPreview, setClientUrlPreview] = useSetting(settingsAtom, 'clientUrlPreview'); + const [encClientUrlPreview, setEncClientUrlPreview] = useSetting( + settingsAtom, + 'encClientUrlPreview' + ); + const [clientPreviewYoutube, setClientPreviewYoutube] = useSetting( + settingsAtom, + 'clientPreviewYoutube' + ); + return ( + + Embeds - - - - - - } - /> - - - - - - } - /> - ); } @@ -1412,6 +1420,7 @@ export function General({ requestBack, requestClose }: Readonly) { + From 32a165a43ef82c58f91b9289ae7e4ee6af9089f2 Mon Sep 17 00:00:00 2001 From: Shea Duma Date: Sun, 12 Apr 2026 10:47:09 +0300 Subject: [PATCH 065/103] added setting for only showing one preview per legacy view --- src/app/components/RenderMessageContent.tsx | 6 +++--- src/app/features/settings/general/General.tsx | 11 +++++++++++ src/app/state/settings.ts | 2 ++ 3 files changed, 16 insertions(+), 3 deletions(-) diff --git a/src/app/components/RenderMessageContent.tsx b/src/app/components/RenderMessageContent.tsx index bcbf0201d..b6c940223 100644 --- a/src/app/components/RenderMessageContent.tsx +++ b/src/app/components/RenderMessageContent.tsx @@ -84,6 +84,7 @@ function RenderMessageContentInternal({ const [autoplayGifs] = useSetting(settingsAtom, 'autoplayGifs'); const [captionPosition] = useSetting(settingsAtom, 'captionPosition'); + const [multiplePreviews] = useSetting(settingsAtom, 'multiplePreviews'); const settingsLinkBaseUrl = useSettingsLinkBaseUrl(); const captionPositionMap = { [CaptionPosition.Above]: 'column-reverse', @@ -118,8 +119,7 @@ function RenderMessageContentInternal({ })); if (filteredUrls.length > 0) console.log(filteredUrls); - const mediaLinks = analyzed.filter((item) => item.type !== null); - const toRender = mediaLinks.length > 0 ? mediaLinks : analyzed; + const toRender = multiplePreviews ? analyzed : [analyzed[0]]; return ( {toRender.map(({ url, type }) => { @@ -137,7 +137,7 @@ function RenderMessageContentInternal({ ); }, - [ts, clientUrlPreview, settingsLinkBaseUrl, urlPreview] + [multiplePreviews, settingsLinkBaseUrl, clientUrlPreview, urlPreview, ts] ); const renderBundledPreviews = useCallback( (bundles: IPreviewUrlResponse[]) => ( diff --git a/src/app/features/settings/general/General.tsx b/src/app/features/settings/general/General.tsx index aaf91331b..7dbc245fa 100644 --- a/src/app/features/settings/general/General.tsx +++ b/src/app/features/settings/general/General.tsx @@ -1029,6 +1029,7 @@ function Messages() { } function Embeds() { + const [multiplePreviews, setMultiplePreviews] = useSetting(settingsAtom, 'multiplePreviews'); const [bundledPreview, setBundledPreview] = useSetting(settingsAtom, 'bundledPreview'); const [urlPreview, setUrlPreview] = useSetting(settingsAtom, 'urlPreview'); const [encUrlPreview, setEncUrlPreview] = useSetting(settingsAtom, 'encUrlPreview'); @@ -1044,6 +1045,16 @@ function Embeds() { return ( Embeds + + + } + /> + Date: Sun, 12 Apr 2026 10:50:50 +0300 Subject: [PATCH 066/103] added md --- .changeset/add_multiple_previews.md | 5 +++++ .gitignore | 3 +++ 2 files changed, 8 insertions(+) create mode 100644 .changeset/add_multiple_previews.md diff --git a/.changeset/add_multiple_previews.md b/.changeset/add_multiple_previews.md new file mode 100644 index 000000000..7e1d70782 --- /dev/null +++ b/.changeset/add_multiple_previews.md @@ -0,0 +1,5 @@ +--- +default: minor +--- + +Reorganize Embed settings and reintroduce multiple embeds diff --git a/.gitignore b/.gitignore index d6c83cfb1..7ec719709 100644 --- a/.gitignore +++ b/.gitignore @@ -23,3 +23,6 @@ build.sh # the following line was added with the "git ignore" tool by itsrye.dev, version 0.1.0 .lh + +# the following line was added with nvim by Shea because its annoying to clear every so often +.vscode/bookmarks.json From aafa651966140d96fa2a8b675b77a78c9ade1904 Mon Sep 17 00:00:00 2001 From: Shea Duma Date: Sun, 12 Apr 2026 11:02:48 +0300 Subject: [PATCH 067/103] forgot the console log --- src/app/components/RenderMessageContent.tsx | 1 - 1 file changed, 1 deletion(-) diff --git a/src/app/components/RenderMessageContent.tsx b/src/app/components/RenderMessageContent.tsx index b6c940223..f7908c7bf 100644 --- a/src/app/components/RenderMessageContent.tsx +++ b/src/app/components/RenderMessageContent.tsx @@ -117,7 +117,6 @@ function RenderMessageContentInternal({ url, type: getMediaType(url), })); - if (filteredUrls.length > 0) console.log(filteredUrls); const toRender = multiplePreviews ? analyzed : [analyzed[0]]; return ( From 294103f00a87e9be289a99707ca2a96f8fe7bebb Mon Sep 17 00:00:00 2001 From: Shea Duma Date: Tue, 14 Apr 2026 03:02:32 +0300 Subject: [PATCH 068/103] smol fix :plead: --- .changeset/fix-initial-pins.md | 5 ++ .../timeline/useTimelineEventRenderer.tsx | 49 ++++++++++--------- 2 files changed, 30 insertions(+), 24 deletions(-) create mode 100644 .changeset/fix-initial-pins.md diff --git a/.changeset/fix-initial-pins.md b/.changeset/fix-initial-pins.md new file mode 100644 index 000000000..424daeb28 --- /dev/null +++ b/.changeset/fix-initial-pins.md @@ -0,0 +1,5 @@ +--- +default: patch +--- + +Fix the first pin event in a room looking empty diff --git a/src/app/hooks/timeline/useTimelineEventRenderer.tsx b/src/app/hooks/timeline/useTimelineEventRenderer.tsx index f781894fd..3a798d583 100644 --- a/src/app/hooks/timeline/useTimelineEventRenderer.tsx +++ b/src/app/hooks/timeline/useTimelineEventRenderer.tsx @@ -1069,12 +1069,20 @@ export function useTimelineEventRenderer({ const senderName = getMemberDisplayName(room, senderId, nicknames) || getMxIdLocalPart(senderId); - const { pinned } = getContent.call(mEvent); - const prevPinned = getPrevContent.call(mEvent).pinned; + const pinned: string[] = getContent.call(mEvent).pinned; + const prevPinned: string[] = getPrevContent.call(mEvent).pinned; const pinsAdded = - prevPinned && pinned && pinned.filter((x: string) => !prevPinned.includes(x)); + prevPinned && pinned + ? pinned.filter((x: string) => !prevPinned.includes(x)) + : pinned.filter((x: string) => x.length > 0); const pinsRemoved = prevPinned && pinned && prevPinned.filter((x: string) => !pinned.includes(x)); + let allPins = + (pinsRemoved && pinsAdded && pinsAdded.concat(pinsRemoved)) || + pinsAdded || + pinsRemoved || + []; + allPins = allPins.slice(0, 4); const timeJSX = ( } /> From f70d9a99b4fb833d509f52e16fc9f81848b818ec Mon Sep 17 00:00:00 2001 From: Shea Duma Date: Tue, 14 Apr 2026 03:12:00 +0300 Subject: [PATCH 069/103] smoler fix :plead::plead: --- .../timeline/useTimelineEventRenderer.tsx | 47 ++++++++++--------- 1 file changed, 24 insertions(+), 23 deletions(-) diff --git a/src/app/hooks/timeline/useTimelineEventRenderer.tsx b/src/app/hooks/timeline/useTimelineEventRenderer.tsx index 3a798d583..1df35e699 100644 --- a/src/app/hooks/timeline/useTimelineEventRenderer.tsx +++ b/src/app/hooks/timeline/useTimelineEventRenderer.tsx @@ -1069,20 +1069,14 @@ export function useTimelineEventRenderer({ const senderName = getMemberDisplayName(room, senderId, nicknames) || getMxIdLocalPart(senderId); - const pinned: string[] = getContent.call(mEvent).pinned; - const prevPinned: string[] = getPrevContent.call(mEvent).pinned; + const { pinned } = getContent.call(mEvent); + const prevPinned = getPrevContent.call(mEvent).pinned; const pinsAdded = prevPinned && pinned ? pinned.filter((x: string) => !prevPinned.includes(x)) : pinned.filter((x: string) => x.length > 0); const pinsRemoved = - prevPinned && pinned && prevPinned.filter((x: string) => !pinned.includes(x)); - let allPins = - (pinsRemoved && pinsAdded && pinsAdded.concat(pinsRemoved)) || - pinsAdded || - pinsRemoved || - []; - allPins = allPins.slice(0, 4); + (prevPinned && pinned && prevPinned.filter((x: string) => !pinned.includes(x))) || []; const timeJSX = ( - - - ({ - useSetting: () => [settingsLinkBaseUrlOverride, setSettingsLinkBaseUrlOverride] as const, -})); - -vi.mock('$state/settings', () => ({ - settingsAtom: {}, -})); - -function renderSetting(settingsLinkBaseUrl = 'https://app.sable.moe') { - return render( - - - - ); -} - -describe('SettingsLinkBaseUrlSetting', () => { - beforeEach(() => { - settingsLinkBaseUrlOverride = undefined; - setSettingsLinkBaseUrlOverride.mockReset(); - }); - - it('uses Url casing in the visible setting title', () => { - renderSetting('https://config.example'); - - expect(screen.getByText('Settings Link Base Url')).toBeInTheDocument(); - }); - - it('shows the configured default in the input and no separate reset button', () => { - renderSetting('https://config.example'); - - expect(screen.getByRole('textbox', { name: 'Settings link base URL' })).toHaveValue( - 'https://config.example' - ); - expect(screen.getByRole('button', { name: 'Save' })).toBeDisabled(); - expect(screen.queryByRole('button', { name: 'Reset' })).not.toBeInTheDocument(); - }); - - it('uses an inline reset control to restore the configured default URL', () => { - renderSetting('https://config.example'); - - fireEvent.change(screen.getByRole('textbox', { name: 'Settings link base URL' }), { - target: { value: 'https://override.example' }, - }); - - expect( - screen.getByRole('button', { name: 'Reset settings link base URL' }) - ).toBeInTheDocument(); - - fireEvent.click(screen.getByRole('button', { name: 'Reset settings link base URL' })); - - expect(screen.getByRole('textbox', { name: 'Settings link base URL' })).toHaveValue( - 'https://config.example' - ); - expect(screen.getByRole('button', { name: 'Save' })).toBeDisabled(); - }); - - it('clears the override when saving the configured default URL', () => { - settingsLinkBaseUrlOverride = 'https://override.example'; - renderSetting('https://config.example'); - - fireEvent.change(screen.getByRole('textbox', { name: 'Settings link base URL' }), { - target: { value: 'https://config.example' }, - }); - fireEvent.click(screen.getByRole('button', { name: 'Save' })); - - expect(setSettingsLinkBaseUrlOverride).toHaveBeenCalledWith(undefined); - }); -}); diff --git a/src/app/features/settings/general/SettingsLinkBaseUrlSetting.tsx b/src/app/features/settings/general/SettingsLinkBaseUrlSetting.tsx deleted file mode 100644 index deb6b760b..000000000 --- a/src/app/features/settings/general/SettingsLinkBaseUrlSetting.tsx +++ /dev/null @@ -1,108 +0,0 @@ -import { ChangeEventHandler, FormEventHandler, useEffect, useMemo, useState } from 'react'; -import { Box, Button, config, Icon, IconButton, Icons, Input, Text } from 'folds'; -import { useClientConfig } from '$hooks/useClientConfig'; -import { SettingTile } from '$components/setting-tile'; -import { useSetting } from '$state/hooks/settings'; -import { settingsAtom } from '$state/settings'; -import { getConfiguredSettingsLinkBaseUrl, normalizeSettingsLinkBaseUrl } from '../settingsLink'; - -export function SettingsLinkBaseUrlSetting() { - const clientConfig = useClientConfig(); - const [settingsLinkBaseUrlOverride, setSettingsLinkBaseUrlOverride] = useSetting( - settingsAtom, - 'settingsLinkBaseUrlOverride' - ); - const configuredBaseUrl = useMemo( - () => getConfiguredSettingsLinkBaseUrl(clientConfig), - [clientConfig] - ); - const currentValue = - normalizeSettingsLinkBaseUrl(settingsLinkBaseUrlOverride) ?? configuredBaseUrl; - const [inputValue, setInputValue] = useState(currentValue); - - useEffect(() => { - setInputValue(currentValue); - }, [currentValue]); - - const trimmedValue = inputValue.trim(); - const normalizedInputValue = normalizeSettingsLinkBaseUrl(trimmedValue); - const nextOverrideValue = - normalizedInputValue && normalizedInputValue !== configuredBaseUrl - ? normalizedInputValue - : undefined; - const hasChanges = normalizedInputValue !== currentValue; - const isValid = Boolean(normalizedInputValue); - - const handleChange: ChangeEventHandler = (evt) => { - setInputValue(evt.currentTarget.value); - }; - - const handleSubmit: FormEventHandler = (evt) => { - evt.preventDefault(); - if (!isValid) return; - - setSettingsLinkBaseUrlOverride(nextOverrideValue); - setInputValue(normalizedInputValue ?? configuredBaseUrl); - }; - - const handleReset = () => { - setInputValue(configuredBaseUrl); - }; - - return ( - - - - - - - - ) - } - /> - - - - - {!isValid && ( - - Enter a full `http://` or `https://` URL. - - )} - - ); -} diff --git a/src/app/features/settings/settingsLink.test.ts b/src/app/features/settings/settingsLink.test.ts index cb695e28f..f47c53c10 100644 --- a/src/app/features/settings/settingsLink.test.ts +++ b/src/app/features/settings/settingsLink.test.ts @@ -1,37 +1,25 @@ import { describe, expect, it } from 'vitest'; import { - DEFAULT_SETTINGS_LINK_BASE_URL, buildSettingsLink, - getEffectiveSettingsLinkBaseUrl, parseSettingsLink, + SETTINGS_LINK_ACTION_PARAM, + SETTINGS_LINK_ACTION_SETTINGS, toSettingsFocusIdPart, } from './settingsLink'; describe('settingsLink', () => { - it('builds settings links for plain and hash-router base urls', () => { + it('builds settings links with the explicit action marker for plain and hash-router base urls', () => { expect(buildSettingsLink('https://app.example', 'appearance', 'message-link-preview')).toBe( - 'https://app.example/settings/appearance?focus=message-link-preview' + `https://app.example/settings/appearance?focus=message-link-preview&${SETTINGS_LINK_ACTION_PARAM}=${SETTINGS_LINK_ACTION_SETTINGS}` ); expect( buildSettingsLink('https://app.example/#/app', 'appearance', 'message-link-preview') - ).toBe('https://app.example/#/app/settings/appearance?focus=message-link-preview'); + ).toBe( + `https://app.example/#/app/settings/appearance?focus=message-link-preview&${SETTINGS_LINK_ACTION_PARAM}=${SETTINGS_LINK_ACTION_SETTINGS}` + ); }); - it('resolves the settings link base URL from built-in default, config, and override', () => { - expect(getEffectiveSettingsLinkBaseUrl({}, undefined)).toBe(DEFAULT_SETTINGS_LINK_BASE_URL); - expect(getEffectiveSettingsLinkBaseUrl({}, true as never)).toBe(DEFAULT_SETTINGS_LINK_BASE_URL); - expect( - getEffectiveSettingsLinkBaseUrl({ settingsLinkBaseUrl: 'https://config.example/' }) - ).toBe('https://config.example'); - expect( - getEffectiveSettingsLinkBaseUrl( - { settingsLinkBaseUrl: 'https://config.example' }, - 'https://override.example/' - ) - ).toBe('https://override.example'); - }); - - it('parses settings links from the same app origin only', () => { + it('parses plain same-base settings links for compatibility', () => { expect( parseSettingsLink( 'https://app.example', @@ -45,10 +33,39 @@ describe('settingsLink', () => { ) ).toEqual({ section: 'appearance', focus: 'message-link-preview' }); + expect(parseSettingsLink('https://app.example', 'https://app.example/home/')).toBeUndefined(); + }); + + it('parses cross-base settings links only when the explicit action marker is present', () => { + expect( + parseSettingsLink( + 'https://app.example', + `https://other.example/settings/appearance?focus=message-link-preview&${SETTINGS_LINK_ACTION_PARAM}=${SETTINGS_LINK_ACTION_SETTINGS}` + ) + ).toEqual({ section: 'appearance', focus: 'message-link-preview' }); + + expect( + parseSettingsLink( + 'https://app.example/#/app', + `https://other.example/#/client/settings/account?focus=status&${SETTINGS_LINK_ACTION_PARAM}=${SETTINGS_LINK_ACTION_SETTINGS}` + ) + ).toEqual({ section: 'account', focus: 'status' }); + expect( parseSettingsLink('https://app.example', 'https://other.example/settings/appearance') ).toBeUndefined(); - expect(parseSettingsLink('https://app.example', 'https://app.example/home/')).toBeUndefined(); + expect( + parseSettingsLink( + 'https://app.example', + `https://other.example/settings/appearance?${SETTINGS_LINK_ACTION_PARAM}=not-settings` + ) + ).toBeUndefined(); + expect( + parseSettingsLink( + 'https://app.example', + `https://other.example/redirect?next=/settings/appearance?focus=status&${SETTINGS_LINK_ACTION_PARAM}=${SETTINGS_LINK_ACTION_SETTINGS}` + ) + ).toBeUndefined(); }); it('rejects a same-origin hash settings link that does not match the configured app base', () => { diff --git a/src/app/features/settings/settingsLink.ts b/src/app/features/settings/settingsLink.ts index da652d28a..fa0c1dabc 100644 --- a/src/app/features/settings/settingsLink.ts +++ b/src/app/features/settings/settingsLink.ts @@ -1,4 +1,3 @@ -import type { ClientConfig } from '$hooks/useClientConfig'; import { getAppPathFromHref, getSettingsPath, withOriginBaseUrl } from '$pages/pathUtils'; import { isSettingsSectionId, type SettingsSectionId } from './routes'; @@ -7,70 +6,101 @@ export type SettingsLink = { focus?: string; }; -export const DEFAULT_SETTINGS_LINK_BASE_URL = 'https://app.sable.moe'; +export const SETTINGS_LINK_ACTION_PARAM = 'moe.sable.client.action'; +export const SETTINGS_LINK_ACTION_SETTINGS = 'settings'; -export const normalizeSettingsLinkBaseUrl = (value?: string | null): string | undefined => { - if (typeof value !== 'string') return undefined; +const withSettingsLinkAction = (path: string): string => { + const [pathname, search = ''] = path.split('?'); + const params = new URLSearchParams(search); + params.set(SETTINGS_LINK_ACTION_PARAM, SETTINGS_LINK_ACTION_SETTINGS); - const trimmed = value.trim(); - if (!trimmed) return undefined; - - try { - const url = new URL(trimmed); - if (url.protocol !== 'http:' && url.protocol !== 'https:') { - return undefined; - } - - return url.toString().replace(/\/+$/, ''); - } catch { - return undefined; - } + return `${pathname}?${params.toString()}`; }; -export const getConfiguredSettingsLinkBaseUrl = ( - clientConfig: Pick -): string => - normalizeSettingsLinkBaseUrl(clientConfig.settingsLinkBaseUrl) ?? DEFAULT_SETTINGS_LINK_BASE_URL; +const parseSettingsAppPath = (appPath: string): SettingsLink | undefined => { + if (!appPath.startsWith('/settings/')) return undefined; -export const getEffectiveSettingsLinkBaseUrl = ( - clientConfig: Pick, - override?: string -): string => - normalizeSettingsLinkBaseUrl(override) ?? getConfiguredSettingsLinkBaseUrl(clientConfig); + const [pathname, search = ''] = appPath.split('?'); + const sectionMatch = pathname.match(/^\/settings\/([^/]+)\/?$/); + if (!sectionMatch) return undefined; + + const section = sectionMatch[1]; + if (!isSettingsSectionId(section)) return undefined; + + const focus = new URLSearchParams(search).get('focus') ?? undefined; + + return { section, focus }; +}; + +const hasSettingsLinkAction = (search: string): boolean => + new URLSearchParams(search).get(SETTINGS_LINK_ACTION_PARAM) === SETTINGS_LINK_ACTION_SETTINGS; + +const getCrossBaseSettingsPathname = (pathname: string): string | undefined => + pathname.match(/(\/settings\/[^/]+\/?)$/)?.[1]; + +const getCrossBaseSettingsAppPath = (pathname: string, search: string): string | undefined => { + if (!hasSettingsLinkAction(search)) return undefined; + + const settingsPathname = getCrossBaseSettingsPathname(pathname); + if (!settingsPathname) return undefined; + + const appPath = search ? `${settingsPathname}?${search}` : settingsPathname; + return parseSettingsAppPath(appPath) ? appPath : undefined; +}; + +const getSameBaseSettingsAppPath = (baseUrl: string, href: string): string | undefined => { + const base = new URL(baseUrl); + const target = new URL(href); + + if (base.origin !== target.origin) return undefined; + + if (base.hash) { + const baseHash = base.hash.replace(/\/+$/, ''); + if (!(target.hash === baseHash || target.hash.startsWith(`${baseHash}/`))) { + return undefined; + } + } + + return getAppPathFromHref(baseUrl, href); +}; + +const getCrossBaseSettingsAppPathFromHref = (href: string): string | undefined => { + const target = new URL(href); + + const directAppPath = getCrossBaseSettingsAppPath( + target.pathname, + target.search.replace(/^\?/, '') + ); + if (directAppPath) { + return directAppPath; + } + + const hashPath = target.hash.startsWith('#') ? target.hash.slice(1) : target.hash; + if (!hashPath) return undefined; + + const [hashPathname, hashSearch = ''] = hashPath.split('?'); + return getCrossBaseSettingsAppPath(hashPathname, hashSearch); +}; export const buildSettingsLink = ( baseUrl: string, section: SettingsSectionId, focus?: string -): string => withOriginBaseUrl(baseUrl, getSettingsPath(section, focus)); +): string => withOriginBaseUrl(baseUrl, withSettingsLinkAction(getSettingsPath(section, focus))); export const parseSettingsLink = (baseUrl: string, href: string): SettingsLink | undefined => { try { - const base = new URL(baseUrl); - const target = new URL(href); - - if (base.origin !== target.origin) return undefined; - - if (base.hash) { - const baseHash = base.hash.replace(/\/+$/, ''); - if (!(target.hash === baseHash || target.hash.startsWith(`${baseHash}/`))) { - return undefined; - } + const sameBaseAppPath = getSameBaseSettingsAppPath(baseUrl, href); + if (sameBaseAppPath) { + return parseSettingsAppPath(sameBaseAppPath); } - const appPath = getAppPathFromHref(baseUrl, href); - if (!appPath.startsWith('/settings/')) return undefined; + const crossBaseAppPath = getCrossBaseSettingsAppPathFromHref(href); + if (crossBaseAppPath) { + return parseSettingsAppPath(crossBaseAppPath); + } - const [pathname, search = ''] = appPath.split('?'); - const sectionMatch = pathname.match(/^\/settings\/([^/]+)\/?$/); - if (!sectionMatch) return undefined; - - const section = sectionMatch[1]; - if (!isSettingsSectionId(section)) return undefined; - - const focus = new URLSearchParams(search).get('focus') ?? undefined; - - return { section, focus }; + return undefined; } catch { return undefined; } diff --git a/src/app/features/settings/useSettingsLinkBaseUrl.ts b/src/app/features/settings/useSettingsLinkBaseUrl.ts index 15eb73a66..6a68301c0 100644 --- a/src/app/features/settings/useSettingsLinkBaseUrl.ts +++ b/src/app/features/settings/useSettingsLinkBaseUrl.ts @@ -1,15 +1,9 @@ import { useMemo } from 'react'; import { useClientConfig } from '$hooks/useClientConfig'; -import { useSetting } from '$state/hooks/settings'; -import { settingsAtom } from '$state/settings'; -import { getEffectiveSettingsLinkBaseUrl } from './settingsLink'; +import { getOriginBaseUrl } from '$pages/pathUtils'; export const useSettingsLinkBaseUrl = (): string => { const clientConfig = useClientConfig(); - const [settingsLinkBaseUrlOverride] = useSetting(settingsAtom, 'settingsLinkBaseUrlOverride'); - return useMemo( - () => getEffectiveSettingsLinkBaseUrl(clientConfig, settingsLinkBaseUrlOverride), - [clientConfig, settingsLinkBaseUrlOverride] - ); + return useMemo(() => getOriginBaseUrl(clientConfig.hashRouter), [clientConfig.hashRouter]); }; diff --git a/src/app/hooks/useClientConfig.ts b/src/app/hooks/useClientConfig.ts index e523f15a7..87685337d 100644 --- a/src/app/hooks/useClientConfig.ts +++ b/src/app/hooks/useClientConfig.ts @@ -42,7 +42,6 @@ export type ClientConfig = { hashRouter?: HashRouterConfig; matrixToBaseUrl?: string; - settingsLinkBaseUrl?: string; }; const ClientConfigContext = createContext(null); diff --git a/src/app/plugins/react-custom-html-parser.test.tsx b/src/app/plugins/react-custom-html-parser.test.tsx index 5d0e11e81..0513cc74d 100644 --- a/src/app/plugins/react-custom-html-parser.test.tsx +++ b/src/app/plugins/react-custom-html-parser.test.tsx @@ -148,9 +148,10 @@ describe('react custom html parser', () => { {renderLink({ tagName: 'a', attributes: { - href: 'https://app.example/settings/appearance?focus=message-link-preview', + href: 'https://app.example/settings/appearance?focus=message-link-preview&moe.sable.client.action=settings', }, - content: 'https://app.example/settings/appearance?focus=message-link-preview', + content: + 'https://app.example/settings/appearance?focus=message-link-preview&moe.sable.client.action=settings', } as never)}
); @@ -165,14 +166,14 @@ describe('react custom html parser', () => { it('renders same-origin settings links as internal app links with settings metadata', () => { renderParsedHtml( - 'Appearance', + 'Appearance', { sanitize: false } ); const link = screen.getByRole('link', { name: 'Appearance' }); expect(link).toHaveAttribute( 'href', - 'https://app.example/settings/appearance?focus=message-link-preview' + 'https://app.example/settings/appearance?focus=message-link-preview&moe.sable.client.action=settings' ); expect(link).toHaveAttribute('data-settings-link-section', 'appearance'); expect(link).toHaveAttribute('data-settings-link-focus', 'message-link-preview'); @@ -181,6 +182,21 @@ describe('react custom html parser', () => { expect(link.className).toContain(customHtmlCss.MentionWithIcon); }); + it('renders marked cross-instance settings links as internal app links with settings metadata', () => { + renderParsedHtml( + 'Account', + { sanitize: false } + ); + + const link = screen.getByRole('link', { name: 'Account' }); + expect(link).toHaveAttribute( + 'href', + 'https://other.example/#/client/settings/account?focus=status&moe.sable.client.action=settings' + ); + expect(link).toHaveAttribute('data-settings-link-section', 'account'); + expect(link).toHaveAttribute('data-settings-link-focus', 'status'); + }); + it('renders matrix message permalinks with an icon instead of the Message prefix', () => { render(
diff --git a/src/app/state/settings.ts b/src/app/state/settings.ts index 05bb8e0fb..e26fff911 100644 --- a/src/app/state/settings.ts +++ b/src/app/state/settings.ts @@ -74,7 +74,6 @@ export interface Settings { developerTools: boolean; enableMSC4268CMD: boolean; settingsSyncEnabled: boolean; - settingsLinkBaseUrlOverride?: string; // Cosmetics! jumboEmojiSize: JumboEmojiSize; @@ -177,7 +176,6 @@ const defaultSettings: Settings = { developerTools: false, settingsSyncEnabled: false, - settingsLinkBaseUrlOverride: undefined, // Cosmetics! jumboEmojiSize: 'normal', diff --git a/src/app/utils/settingsSync.test.ts b/src/app/utils/settingsSync.test.ts index e3d29aebc..270d60a11 100644 --- a/src/app/utils/settingsSync.test.ts +++ b/src/app/utils/settingsSync.test.ts @@ -30,7 +30,6 @@ describe('NON_SYNCABLE_KEYS', () => { 'isPeopleDrawer', 'isWidgetDrawer', 'memberSortFilterIndex', - 'settingsLinkBaseUrlOverride', 'developerTools', 'settingsSyncEnabled', ] as const; diff --git a/src/app/utils/settingsSync.ts b/src/app/utils/settingsSync.ts index 0f6b25888..a154ff92d 100644 --- a/src/app/utils/settingsSync.ts +++ b/src/app/utils/settingsSync.ts @@ -14,7 +14,6 @@ export const NON_SYNCABLE_KEYS = new Set([ 'isPeopleDrawer', 'isWidgetDrawer', 'memberSortFilterIndex', - 'settingsLinkBaseUrlOverride', // Developer / diagnostic 'developerTools', // Sync toggle itself must never be uploaded (it's device-local) From bf30f94bf1ea9b69ac74bfcf114c1b3135ecaf55 Mon Sep 17 00:00:00 2001 From: hazre Date: Wed, 15 Apr 2026 19:10:33 +0200 Subject: [PATCH 074/103] Remove copy settings links from dynamic settings rows --- .changeset/remove-dynamic-settings-links.md | 5 + .../settings/account/Profile.test.tsx | 122 ++++++++++++++++++ src/app/features/settings/account/Profile.tsx | 1 + .../emojis-stickers/GlobalPacks.test.tsx | 69 ++++++++++ .../settings/emojis-stickers/GlobalPacks.tsx | 2 + .../notifications/KeywordMessages.test.tsx | 71 ++++++++++ .../notifications/KeywordMessages.tsx | 1 + 7 files changed, 271 insertions(+) create mode 100644 .changeset/remove-dynamic-settings-links.md create mode 100644 src/app/features/settings/account/Profile.test.tsx create mode 100644 src/app/features/settings/emojis-stickers/GlobalPacks.test.tsx create mode 100644 src/app/features/settings/notifications/KeywordMessages.test.tsx diff --git a/.changeset/remove-dynamic-settings-links.md b/.changeset/remove-dynamic-settings-links.md new file mode 100644 index 000000000..93a2d76e5 --- /dev/null +++ b/.changeset/remove-dynamic-settings-links.md @@ -0,0 +1,5 @@ +--- +default: patch +--- + +# Hide copied settings links on dynamic rows diff --git a/src/app/features/settings/account/Profile.test.tsx b/src/app/features/settings/account/Profile.test.tsx new file mode 100644 index 000000000..e58495b8e --- /dev/null +++ b/src/app/features/settings/account/Profile.test.tsx @@ -0,0 +1,122 @@ +import { render, within } from '@testing-library/react'; +import { describe, expect, it, vi } from 'vitest'; +import { ScreenSize, ScreenSizeProvider } from '$hooks/useScreenSize'; +import { SettingsLinkProvider } from '$features/settings/SettingsLinkContext'; +import { Profile } from './Profile'; + +const mockMatrixClient = { + getUserId: () => '@alice:example.org', + setAvatarUrl: vi.fn(), + setDisplayName: vi.fn(), + setExtendedProfileProperty: vi.fn(), + setPresence: vi.fn(), +}; + +vi.mock('$hooks/useMatrixClient', () => ({ + useMatrixClient: () => mockMatrixClient, +})); + +vi.mock('$hooks/useUserProfile', () => ({ + useUserProfile: () => ({ + displayName: 'Alice', + extended: { + 'example.favorite': 'Blue', + }, + }), +})); + +vi.mock('$hooks/useMediaAuthentication', () => ({ + useMediaAuthentication: () => false, +})); + +vi.mock('$hooks/useCapabilities', () => ({ + useCapabilities: () => ({}), +})); + +vi.mock('$hooks/useUserPresence', () => ({ + useUserPresence: () => undefined, +})); + +vi.mock('$hooks/useFilePicker', () => ({ + useFilePicker: () => vi.fn(), +})); + +vi.mock('$hooks/useObjectURL', () => ({ + useObjectURL: () => undefined, +})); + +vi.mock('$hooks/useAsyncCallback', () => ({ + AsyncStatus: { + Idle: 'idle', + Loading: 'loading', + Success: 'success', + Error: 'error', + }, + useAsyncCallback: (callback: (...args: unknown[]) => unknown) => [ + { status: 'idle' }, + callback, + vi.fn(), + ], +})); + +vi.mock('$components/user-avatar', () => ({ + UserAvatar: () =>
Avatar
, +})); + +vi.mock('jotai', async () => { + const actual = await vi.importActual('jotai'); + return { + ...actual, + useSetAtom: () => vi.fn(), + }; +}); + +vi.mock('./TimezoneEditor', () => ({ + TimezoneEditor: () =>
Timezone
, +})); + +vi.mock('./PronounEditor', () => ({ + PronounEditor: () =>
Pronouns
, +})); + +vi.mock('./BioEditor', () => ({ + BioEditor: () =>
Bio
, +})); + +vi.mock('./NameColorEditor', () => ({ + NameColorEditor: () =>
Name Color
, +})); + +vi.mock('./StatusEditor', () => ({ + StatusEditor: () =>
Status
, +})); + +vi.mock('./AnimalCosmetics', () => ({ + AnimalCosmetics: () =>
Animal Cosmetics
, +})); + +describe('Profile', () => { + it('does not show copy settings links for custom profile fields', () => { + const { container } = render( + + + + + + ); + + const displayNameTile = container.querySelector('[data-settings-focus="display-name"]'); + expect(displayNameTile).not.toBeNull(); + expect( + within(displayNameTile as HTMLElement).getByRole('button', { name: /copy settings link/i }) + ).toBeInTheDocument(); + + const customFieldTile = container.querySelector( + '[data-settings-focus="profile-field-example-favorite"]' + ); + expect(customFieldTile).not.toBeNull(); + expect( + within(customFieldTile as HTMLElement).queryByRole('button', { name: /copy settings link/i }) + ).not.toBeInTheDocument(); + }); +}); diff --git a/src/app/features/settings/account/Profile.tsx b/src/app/features/settings/account/Profile.tsx index da2d140f6..8ee4d9b35 100644 --- a/src/app/features/settings/account/Profile.tsx +++ b/src/app/features/settings/account/Profile.tsx @@ -658,6 +658,7 @@ function ProfileExtended({ profile, userId }: Readonly) { undefined, +} as never; + +vi.mock('$hooks/useImagePacks', () => ({ + useGlobalImagePacks: () => [globalPack], + useRoomsImagePacks: () => [], +})); + +vi.mock('$hooks/useMediaAuthentication', () => ({ + useMediaAuthentication: () => false, +})); + +vi.mock('$hooks/useMatrixClient', () => ({ + useMatrixClient: () => ({ + getRoom: () => undefined, + getAccountData: () => undefined, + setAccountData: vi.fn(), + }), +})); + +vi.mock('jotai', async () => { + const actual = await vi.importActual('jotai'); + return { + ...actual, + useAtomValue: () => [], + }; +}); + +describe('GlobalPacks', () => { + it('does not show copy settings links for individual pack rows', () => { + const { container } = render( + + + + + + ); + + const selectorTile = container.querySelector('[data-settings-focus="select-pack"]'); + expect(selectorTile).not.toBeNull(); + expect( + within(selectorTile as HTMLElement).getByRole('button', { name: /copy settings link/i }) + ).toBeInTheDocument(); + + const packTile = container.querySelector('[data-settings-focus="selected-pack-pack-1"]'); + expect(packTile).not.toBeNull(); + expect(screen.getByText('Animals')).toBeInTheDocument(); + expect( + within(packTile as HTMLElement).queryByRole('button', { name: /copy settings link/i }) + ).not.toBeInTheDocument(); + }); +}); diff --git a/src/app/features/settings/emojis-stickers/GlobalPacks.tsx b/src/app/features/settings/emojis-stickers/GlobalPacks.tsx index 224ed4934..622c12927 100644 --- a/src/app/features/settings/emojis-stickers/GlobalPacks.tsx +++ b/src/app/features/settings/emojis-stickers/GlobalPacks.tsx @@ -187,6 +187,7 @@ function GlobalPackSelector({ {pack.meta.attribution}} before={ @@ -361,6 +362,7 @@ export function GlobalPacks({ onViewPack }: GlobalPacksProps) { > {pack.meta.name ?? 'Unknown'} diff --git a/src/app/features/settings/notifications/KeywordMessages.test.tsx b/src/app/features/settings/notifications/KeywordMessages.test.tsx new file mode 100644 index 000000000..dde430909 --- /dev/null +++ b/src/app/features/settings/notifications/KeywordMessages.test.tsx @@ -0,0 +1,71 @@ +import { render, within } from '@testing-library/react'; +import { describe, expect, it, vi } from 'vitest'; +import { ScreenSize, ScreenSizeProvider } from '$hooks/useScreenSize'; +import { SettingsLinkProvider } from '$features/settings/SettingsLinkContext'; +import { KeywordMessagesNotifications } from './KeywordMessages'; + +vi.mock('$hooks/useAccountData', () => ({ + useAccountData: () => ({ + getContent: () => ({ + global: { + content: [ + { + rule_id: 'kitty', + pattern: 'kitty', + default: false, + actions: [], + }, + ], + }, + }), + }), +})); + +vi.mock('$hooks/useMatrixClient', () => ({ + useMatrixClient: () => ({ + addPushRule: vi.fn(), + deletePushRule: vi.fn(), + setPushRuleActions: vi.fn(), + }), +})); + +vi.mock('$hooks/useNotificationMode', () => ({ + NotificationMode: { + Notify: 'notify', + }, + getNotificationModeActions: () => [], + useNotificationActionsMode: () => 'notify', + useNotificationModeActions: () => () => [], +})); + +vi.mock('$components/setting-menu-selector', () => ({ + SettingMenuSelector: () =>
Mode
, +})); + +vi.mock('./NotificationLevelsHint', () => ({ + NotificationLevelsHint: () =>
Hint
, +})); + +describe('KeywordMessagesNotifications', () => { + it('does not show copy settings links for individual keyword rows', () => { + const { container } = render( + + + + + + ); + + const selectorTile = container.querySelector('[data-settings-focus="select-keyword"]'); + expect(selectorTile).not.toBeNull(); + expect( + within(selectorTile as HTMLElement).getByRole('button', { name: /copy settings link/i }) + ).toBeInTheDocument(); + + const keywordTile = container.querySelector('[data-settings-focus="keyword-kitty"]'); + expect(keywordTile).not.toBeNull(); + expect( + within(keywordTile as HTMLElement).queryByRole('button', { name: /copy settings link/i }) + ).not.toBeInTheDocument(); + }); +}); diff --git a/src/app/features/settings/notifications/KeywordMessages.tsx b/src/app/features/settings/notifications/KeywordMessages.tsx index 7eab66eb7..39de1e238 100644 --- a/src/app/features/settings/notifications/KeywordMessages.tsx +++ b/src/app/features/settings/notifications/KeywordMessages.tsx @@ -214,6 +214,7 @@ export function KeywordMessagesNotifications() { focusId={`keyword-${toSettingsFocusIdPart( pushRule.pattern ?? pushRule.rule_id ?? 'custom-keyword' )}`} + showSettingLinkAction={false} before={} after={} /> From 1717ca872f01ccbdaa6cb908fe6ce27165fe99d6 Mon Sep 17 00:00:00 2001 From: 7w1 Date: Thu, 16 Apr 2026 22:15:13 -0500 Subject: [PATCH 075/103] migrate to oxlint and oxfmt ran formatter fixed lint issues, primarily getting rid of "any"s and swapping to .toSorted() --- .oxfmtrc.json | 17 + .oxlintrc.json | 45 + .prettierignore | 8 - .prettierrc.json | 5 - .vscode/extensions.json | 2 +- .vscode/settings.json | 6 +- eslint.config.js | 143 -- fix_sort.py | 19 + knip.json | 3 +- knope.toml | 12 +- package.json | 20 +- pnpm-lock.yaml | 2172 ++++------------- scripts/normalize-imports.js | 4 +- scripts/utils/console-style.js | 2 +- src/app/components/AccountDataEditor.tsx | 5 +- src/app/components/ActionUIA.tsx | 5 +- src/app/components/AuthFlowsLoader.tsx | 15 +- src/app/components/BackRouteHandler.tsx | 3 +- src/app/components/BackupRestore.tsx | 8 +- src/app/components/CallEmbedProvider.tsx | 6 +- src/app/components/ClientConfigLoader.tsx | 5 +- src/app/components/ConfirmPasswordMatch.tsx | 3 +- src/app/components/DeviceVerification.tsx | 12 +- .../components/DeviceVerificationSetup.tsx | 8 +- .../components/DeviceVerificationStatus.ts | 9 +- .../components/GlobalKeyboardShortcuts.tsx | 6 +- src/app/components/HexColorPickerPopOut.tsx | 6 +- src/app/components/IncomingCallModal.tsx | 3 +- src/app/components/JoinRulesSwitcher.tsx | 8 +- src/app/components/ManualVerification.tsx | 8 +- src/app/components/Modal500.tsx | 3 +- src/app/components/Pdf-viewer/PdfViewer.tsx | 8 +- src/app/components/RenderMessageContent.tsx | 13 +- .../RoomNotificationSwitcher.test.tsx | 2 + .../components/RoomNotificationSwitcher.tsx | 3 +- src/app/components/RoomSummaryLoader.tsx | 11 +- src/app/components/RoomUnreadProvider.tsx | 4 +- src/app/components/SecretStorage.tsx | 9 +- src/app/components/ServerConfigsLoader.tsx | 8 +- src/app/components/SpecVersionsLoader.tsx | 6 +- .../components/SupportedUIAFlowsLoader.tsx | 4 +- src/app/components/SwipeableChatWrapper.tsx | 2 +- .../components/SwipeableMessageWrapper.tsx | 3 +- .../components/SwipeableOverlayWrapper.tsx | 2 +- src/app/components/UIAFlowOverlay.tsx | 2 +- src/app/components/UseStateProvider.tsx | 3 +- .../components/UserRoomProfileRenderer.tsx | 2 +- .../code-highlight/CodeHighlightRenderer.tsx | 2 +- .../create-room/AdditionalCreatorInput.tsx | 18 +- .../create-room/CreateRoomAccessSelector.tsx | 3 +- .../create-room/CreateRoomAliasInput.tsx | 8 +- .../create-room/CreateRoomTypeSelector.tsx | 3 +- .../create-room/RoomVersionSelector.tsx | 6 +- src/app/components/create-room/utils.ts | 13 +- src/app/components/cutout-card/CutoutCard.tsx | 3 +- src/app/components/editor/Editor.tsx | 23 +- src/app/components/editor/Elements.tsx | 7 +- src/app/components/editor/Toolbar.tsx | 10 +- .../editor/autocomplete/AutocompleteMenu.tsx | 7 +- .../autocomplete/AutocompleteNotice.tsx | 2 +- .../autocomplete/BaseAutocompleteMenu.tsx | 2 +- .../autocomplete/EmoticonAutocomplete.tsx | 24 +- .../autocomplete/RoomMentionAutocomplete.tsx | 15 +- .../autocomplete/UserMentionAutocomplete.tsx | 12 +- .../editor/autocomplete/autocompleteQuery.ts | 3 +- src/app/components/editor/input.ts | 8 +- src/app/components/editor/keyboard.ts | 2 +- src/app/components/editor/output.ts | 7 +- src/app/components/editor/slate.d.ts | 8 +- src/app/components/editor/utils.ts | 14 +- src/app/components/emoji-board/EmojiBoard.tsx | 26 +- .../emoji-board/components/Group.tsx | 2 +- .../emoji-board/components/Item.tsx | 9 +- .../emoji-board/components/Layout.tsx | 2 +- .../emoji-board/components/Preview.tsx | 3 +- .../emoji-board/components/SearchInput.tsx | 3 +- .../emoji-board/components/Sidebar.tsx | 5 +- .../emoji-board/components/Tabs.tsx | 2 +- .../emoji-board/useEmojiGroupIcons.ts | 3 +- .../components/event-history/EventHistory.tsx | 15 +- .../components/event-readers/EventReaders.tsx | 2 +- .../image-pack-view/ImagePackContent.tsx | 10 +- .../image-pack-view/ImagePackView.tsx | 2 +- .../components/image-pack-view/ImageTile.tsx | 9 +- .../components/image-pack-view/PackMeta.tsx | 6 +- .../image-pack-view/RoomImagePack.tsx | 5 +- .../image-pack-view/UsageSwitcher.tsx | 6 +- .../image-pack-view/UserImagePack.tsx | 3 +- src/app/components/info-card/InfoCard.tsx | 5 +- .../invite-user-prompt/InviteUserPrompt.tsx | 25 +- .../join-address-prompt/JoinAddressPrompt.tsx | 3 +- .../knock-room-prompt/KnockRoomPrompt.tsx | 5 +- .../leave-room-prompt/LeaveRoomPrompt.tsx | 2 +- .../leave-space-prompt/LeaveSpacePrompt.tsx | 2 +- src/app/components/media/Image.tsx | 3 +- src/app/components/media/MediaControls.tsx | 2 +- src/app/components/media/Video.tsx | 5 +- src/app/components/member-tile/MemberTile.tsx | 4 +- src/app/components/message/FileHeader.tsx | 5 +- .../components/message/MsgTypeRenderers.tsx | 37 +- src/app/components/message/Reaction.tsx | 2 +- src/app/components/message/RenderBody.tsx | 28 +- src/app/components/message/Reply.test.tsx | 6 +- src/app/components/message/Reply.tsx | 12 +- src/app/components/message/Time.tsx | 2 +- .../message/attachment/Attachment.css.ts | 3 +- .../message/content/AudioContent.tsx | 20 +- .../message/content/EventContent.tsx | 5 +- .../message/content/FileContent.tsx | 11 +- .../message/content/ImageContent.tsx | 10 +- .../message/content/ThumbnailContent.tsx | 5 +- .../message/content/VideoContent.tsx | 10 +- src/app/components/message/layout/Bubble.tsx | 5 +- src/app/components/message/layout/Compact.tsx | 2 +- src/app/components/message/layout/Modern.tsx | 2 +- .../components/message/layout/layout.css.ts | 3 +- .../message/modals/MessageDelete.tsx | 5 +- .../message/modals/MessageEditHistory.tsx | 4 +- .../message/modals/MessageForward.tsx | 3 +- .../message/modals/MessageReactions.tsx | 4 +- .../message/modals/MessageReadRecipts.tsx | 4 +- .../message/modals/MessageReport.tsx | 5 +- .../message/modals/MessageSource.tsx | 4 +- .../placeholder/CompactPlaceholder.tsx | 3 +- .../placeholder/DefaultPlaceholder.tsx | 16 +- .../placeholder/LinePlaceholder.css.ts | 8 +- src/app/components/nav/NavCategory.tsx | 2 +- src/app/components/nav/NavCategoryHeader.tsx | 2 +- src/app/components/nav/NavEmptyLayout.tsx | 2 +- src/app/components/nav/NavItem.tsx | 30 +- src/app/components/nav/NavItemContent.tsx | 2 +- src/app/components/nav/NavItemOptions.tsx | 2 +- src/app/components/nav/styles.css.ts | 9 +- .../NotificationBanner.tsx | 6 +- src/app/components/page/Page.tsx | 2 +- src/app/components/page/style.css.ts | 3 +- .../password-input/PasswordInput.tsx | 3 +- src/app/components/power/PowerSelector.tsx | 9 +- src/app/components/power/style.css.ts | 3 +- src/app/components/presence/Presence.tsx | 8 +- .../components/room-avatar/AvatarImage.tsx | 3 +- src/app/components/room-avatar/RoomAvatar.tsx | 5 +- src/app/components/room-card/RoomCard.tsx | 6 +- src/app/components/room-intro/RoomIntro.tsx | 5 +- .../ScrollTopContainer.tsx | 3 +- .../components/sequence-card/SequenceCard.tsx | 5 +- src/app/components/sequence-card/style.css.ts | 3 +- .../SettingMenuSelector.tsx | 3 +- .../components/setting-tile/SettingTile.tsx | 2 +- src/app/components/sidebar/Sidebar.css.ts | 3 +- src/app/components/sidebar/SidebarContent.tsx | 2 +- src/app/components/sidebar/SidebarItem.tsx | 2 +- .../components/sidebar/SidebarUnreadBadge.tsx | 3 +- .../components/splash-screen/SplashScreen.tsx | 2 +- .../components/stacked-avatar/styles.css.ts | 8 +- src/app/components/text-viewer/TextViewer.tsx | 3 +- src/app/components/time-date/PickerColumn.tsx | 2 +- src/app/components/uia-stages/DummyStage.tsx | 2 +- src/app/components/uia-stages/EmailStage.tsx | 13 +- .../components/uia-stages/PasswordStage.tsx | 4 +- .../components/uia-stages/ReCaptchaStage.tsx | 2 +- .../uia-stages/RegistrationTokenStage.tsx | 5 +- src/app/components/uia-stages/SSOStage.tsx | 2 +- src/app/components/uia-stages/TermsStage.tsx | 2 +- src/app/components/uia-stages/types.ts | 4 +- .../components/unread-badge/UnreadBadge.tsx | 2 +- .../components/upload-board/UploadBoard.tsx | 6 +- .../upload-card/CompactUploadCardRenderer.tsx | 5 +- .../components/upload-card/UploadCard.css.ts | 3 +- src/app/components/upload-card/UploadCard.tsx | 3 +- .../upload-card/UploadCardRenderer.tsx | 19 +- .../upload-card/UploadDescriptionEditor.tsx | 14 +- .../components/url-preview/ClientPreview.tsx | 3 +- .../components/url-preview/UrlPreviewCard.tsx | 24 +- src/app/components/user-avatar/UserAvatar.tsx | 3 +- .../components/user-profile/CreatorChip.tsx | 6 +- src/app/components/user-profile/PowerChip.tsx | 6 +- src/app/components/user-profile/UserChips.tsx | 12 +- src/app/components/user-profile/UserHero.tsx | 8 +- .../user-profile/UserRoomProfile.tsx | 28 +- .../components/virtualizer/VirtualTile.tsx | 2 +- src/app/features/add-existing/AddExisting.tsx | 20 +- .../features/bug-report/BugReportModal.tsx | 15 +- src/app/features/call-status/CallControl.tsx | 3 +- src/app/features/call-status/CallRoomName.tsx | 2 +- src/app/features/call-status/CallStatus.tsx | 2 +- src/app/features/call-status/LiveChip.tsx | 10 +- src/app/features/call-status/MemberGlance.tsx | 4 +- .../features/call-status/MemberSpeaking.tsx | 2 +- src/app/features/call/CallControls.tsx | 14 +- src/app/features/call/CallMemberCard.tsx | 4 +- src/app/features/call/PrescreenControls.tsx | 5 +- .../common-settings/cosmetics/Cosmetics.tsx | 23 +- .../developer-tools/DevelopTools.tsx | 21 +- .../developer-tools/SendRoomEvent.tsx | 9 +- .../developer-tools/StateEventEditor.tsx | 9 +- .../emojis-stickers/EmojisStickers.tsx | 2 +- .../emojis-stickers/RoomPacks.tsx | 20 +- .../common-settings/general/RoomAddress.tsx | 9 +- .../general/RoomEncryption.tsx | 6 +- .../general/RoomHistoryVisibility.tsx | 17 +- .../common-settings/general/RoomJoinRules.tsx | 14 +- .../common-settings/general/RoomProfile.tsx | 21 +- .../common-settings/general/RoomPublish.tsx | 7 +- .../common-settings/general/RoomUpgrade.tsx | 8 +- .../common-settings/members/Members.tsx | 15 +- .../permissions/PermissionGroups.tsx | 11 +- .../common-settings/permissions/Powers.tsx | 13 +- .../permissions/PowersEditor.tsx | 19 +- .../common-settings/permissions/types.ts | 2 +- src/app/features/create-chat/CreateChat.tsx | 6 +- src/app/features/create-room/CreateRoom.tsx | 9 +- .../features/create-room/CreateRoomModal.tsx | 2 +- src/app/features/create-space/CreateSpace.tsx | 9 +- .../create-space/CreateSpaceModal.tsx | 2 +- src/app/features/lobby/DnD.tsx | 5 +- src/app/features/lobby/HierarchyItemMenu.tsx | 17 +- src/app/features/lobby/Lobby.tsx | 41 +- src/app/features/lobby/LobbyHeader.tsx | 8 +- src/app/features/lobby/RoomItem.tsx | 8 +- src/app/features/lobby/SpaceHierarchyItem.tsx | 16 +- .../features/lobby/SpaceHierarchyNavItem.tsx | 9 +- src/app/features/lobby/SpaceItem.tsx | 14 +- src/app/features/lobby/SpaceNavItem.tsx | 7 +- .../features/message-search/MessageSearch.tsx | 8 +- .../features/message-search/SearchFilters.tsx | 18 +- .../features/message-search/SearchInput.tsx | 2 +- .../message-search/SearchResultGroup.tsx | 16 +- .../message-search/useMessageSearch.ts | 2 +- src/app/features/room-nav/RoomNavItem.tsx | 9 +- src/app/features/room-nav/RoomNavUser.tsx | 4 +- .../features/room-settings/RoomSettings.tsx | 3 +- .../room-settings/RoomSettingsRenderer.tsx | 2 +- .../abbreviations/RoomAbbreviations.tsx | 31 +- .../permissions/usePermissionItems.ts | 2 +- .../features/room/AudioMessageRecorder.tsx | 2 +- src/app/features/room/CommandAutocomplete.tsx | 16 +- src/app/features/room/MembersDrawer.tsx | 16 +- src/app/features/room/Room.tsx | 5 +- src/app/features/room/RoomCallButton.tsx | 8 +- src/app/features/room/RoomInput.tsx | 96 +- .../features/room/RoomInputPlaceholder.tsx | 2 +- src/app/features/room/RoomTimeline.css.ts | 3 +- src/app/features/room/RoomTimeline.tsx | 17 +- src/app/features/room/RoomTombstone.tsx | 2 +- src/app/features/room/RoomViewFollowing.tsx | 2 +- src/app/features/room/RoomViewHeader.tsx | 37 +- src/app/features/room/RoomViewTyping.tsx | 4 +- src/app/features/room/ThreadBrowser.tsx | 54 +- src/app/features/room/ThreadDrawer.test.ts | 3 + src/app/features/room/ThreadDrawer.tsx | 48 +- .../features/room/jump-to-time/JumpToTime.tsx | 11 +- .../room/message/EncryptedContent.tsx | 6 +- src/app/features/room/message/Message.tsx | 63 +- .../features/room/message/MessageEditor.tsx | 26 +- src/app/features/room/message/Reactions.tsx | 7 +- src/app/features/room/msgContent.ts | 8 +- .../room/reaction-viewer/ReactionViewer.tsx | 2 +- .../room/room-pin-menu/RoomPinMenu.tsx | 23 +- .../schedule-send/SchedulePickerDialog.tsx | 8 +- .../schedule-send/ScheduledMessagesList.tsx | 2 +- src/app/features/search/Search.tsx | 25 +- .../Persona/PerMessageProfileEditor.tsx | 39 +- .../Persona/PerMessageProfileOverview.tsx | 5 +- src/app/features/settings/Settings.tsx | 3 +- .../features/settings/SettingsSectionPage.tsx | 2 +- src/app/features/settings/about/About.tsx | 6 +- .../settings/account/AnimalCosmetics.tsx | 2 +- .../features/settings/account/BioEditor.tsx | 13 +- .../settings/account/IgnoredUserList.tsx | 5 +- src/app/features/settings/account/Profile.tsx | 20 +- .../settings/account/PronounEditor.tsx | 6 +- .../settings/account/StatusEditor.tsx | 3 +- .../settings/account/TimezoneEditor.tsx | 3 +- .../features/settings/cosmetics/Cosmetics.tsx | 9 +- .../settings/cosmetics/Themes.test.tsx | 2 + .../features/settings/cosmetics/Themes.tsx | 6 +- .../settings/developer-tools/AccountData.tsx | 2 +- .../developer-tools/DebugLogViewer.tsx | 9 +- .../settings/developer-tools/DevelopTools.tsx | 3 +- .../developer-tools/SentrySettings.tsx | 3 +- .../developer-tools/SyncDiagnostics.tsx | 5 +- .../features/settings/devices/DeviceTile.tsx | 5 +- .../features/settings/devices/LocalBackup.tsx | 3 +- .../settings/devices/OtherDevices.tsx | 9 +- .../settings/devices/Verification.tsx | 13 +- .../emojis-stickers/EmojisStickers.tsx | 2 +- .../settings/emojis-stickers/GlobalPacks.tsx | 20 +- src/app/features/settings/general/General.tsx | 15 +- .../general/SettingsLinkBaseUrlSetting.tsx | 3 +- .../settings/notifications/AllMessages.tsx | 8 +- .../notifications/KeywordMessages.tsx | 11 +- .../notifications/NotificationLevelsHint.tsx | 6 +- .../notifications/PushNotifications.tsx | 6 +- .../notifications/SpecialMessages.tsx | 9 +- .../notifications/SystemNotification.tsx | 6 +- src/app/features/space-nav/SpaceNavItem.tsx | 8 +- .../features/space-settings/SpaceSettings.tsx | 3 +- .../space-settings/SpaceSettingsRenderer.tsx | 2 +- .../permissions/usePermissionItems.ts | 2 +- .../features/widgets/GenericWidgetDriver.ts | 26 +- .../features/widgets/IntegrationManager.tsx | 2 +- src/app/features/widgets/WidgetIframe.tsx | 19 +- src/app/features/widgets/WidgetsDrawer.tsx | 22 +- .../hooks/timeline/useProcessedTimeline.ts | 10 +- src/app/hooks/timeline/useTimelineActions.ts | 16 +- .../timeline/useTimelineEventRenderer.tsx | 67 +- .../hooks/timeline/useTimelineSync.test.tsx | 3 +- src/app/hooks/timeline/useTimelineSync.ts | 14 +- src/app/hooks/types.ts | 2 +- src/app/hooks/useAccountData.ts | 2 +- src/app/hooks/useAccountDataCallback.ts | 3 +- src/app/hooks/useAlive.ts | 2 +- src/app/hooks/useAppVisibility.ts | 2 +- src/app/hooks/useAsyncCallback.ts | 3 +- src/app/hooks/useAsyncSearch.ts | 9 +- src/app/hooks/useAuthFlows.ts | 2 +- src/app/hooks/useAuthMetadata.ts | 2 +- src/app/hooks/useAutoDiscoveryInfo.ts | 2 +- src/app/hooks/useCall.ts | 6 +- src/app/hooks/useCallEmbed.ts | 14 +- src/app/hooks/useCallSignaling.ts | 14 +- src/app/hooks/useCallSpeakers.ts | 2 +- src/app/hooks/useCapabilities.ts | 2 +- src/app/hooks/useCategoryHandler.ts | 2 +- src/app/hooks/useCommands.ts | 128 +- src/app/hooks/useCrossSigning.ts | 3 +- src/app/hooks/useDateFormat.ts | 2 +- src/app/hooks/useDeviceList.ts | 3 +- src/app/hooks/useDeviceVerificationStatus.ts | 2 +- src/app/hooks/useDirectUsers.ts | 4 +- src/app/hooks/useFileDrop.ts | 3 +- src/app/hooks/useFilePasteHandler.ts | 3 +- src/app/hooks/useGetRoom.ts | 2 +- src/app/hooks/useGroupDMMembers.ts | 4 +- src/app/hooks/useImageGestures.ts | 13 +- src/app/hooks/useImagePackRooms.ts | 2 +- src/app/hooks/useImagePacks.ts | 17 +- src/app/hooks/useIntegrationManager.ts | 4 +- src/app/hooks/useKeyBackup.ts | 7 +- src/app/hooks/useLivekitSupport.ts | 2 +- src/app/hooks/useLocalRoomSummary.ts | 3 +- src/app/hooks/useMatrixClient.ts | 2 +- src/app/hooks/useMatrixEventRenderer.ts | 2 +- src/app/hooks/useMemberEventParser.tsx | 11 +- src/app/hooks/useMemberFilter.ts | 2 +- src/app/hooks/useMemberPowerCompare.ts | 3 +- src/app/hooks/useMemberPowerTag.ts | 12 +- src/app/hooks/useMemberSort.ts | 2 +- src/app/hooks/useMembership.ts | 3 +- src/app/hooks/useMentionClickHandler.ts | 5 +- src/app/hooks/useMessageEdit.ts | 2 +- src/app/hooks/useMessageSpacing.ts | 2 +- src/app/hooks/useMutualRooms.ts | 3 +- src/app/hooks/useNickname.ts | 4 +- src/app/hooks/useNotificationMode.ts | 3 +- src/app/hooks/useParsedLoginFlows.ts | 2 +- src/app/hooks/usePasswordEmail.ts | 7 +- src/app/hooks/usePerMessageProfile.ts | 64 +- src/app/hooks/usePowerLevelTags.ts | 9 +- src/app/hooks/usePowerLevels.ts | 24 +- src/app/hooks/usePushRule.ts | 7 +- src/app/hooks/useRecentEmoji.ts | 5 +- src/app/hooks/useRegisterEmail.ts | 7 +- src/app/hooks/useRoom.ts | 4 +- src/app/hooks/useRoomAbbreviations.ts | 9 +- src/app/hooks/useRoomAccountData.ts | 3 +- src/app/hooks/useRoomAliases.ts | 11 +- src/app/hooks/useRoomCreators.ts | 5 +- src/app/hooks/useRoomCreatorsTag.ts | 2 +- src/app/hooks/useRoomEvent.ts | 11 +- src/app/hooks/useRoomEventReaders.ts | 3 +- src/app/hooks/useRoomLatestRenderedEvent.ts | 5 +- src/app/hooks/useRoomMembers.ts | 3 +- src/app/hooks/useRoomMeta.ts | 3 +- src/app/hooks/useRoomNavigate.ts | 3 +- src/app/hooks/useRoomPermissions.ts | 5 +- src/app/hooks/useRoomPinnedEvents.ts | 2 +- src/app/hooks/useRoomState.ts | 9 +- src/app/hooks/useRoomTypingMembers.ts | 5 +- src/app/hooks/useRoomWidgets.ts | 6 +- .../hooks/useRoomsNotificationPreferences.ts | 6 +- src/app/hooks/useSableCosmetics.ts | 2 +- src/app/hooks/useScreenSize.ts | 2 +- src/app/hooks/useSecretStorage.ts | 7 +- src/app/hooks/useSessionProfiles.ts | 2 +- src/app/hooks/useSettingsSync.test.tsx | 6 +- src/app/hooks/useSettingsSync.ts | 2 +- src/app/hooks/useSidebarItems.ts | 5 +- src/app/hooks/useSpace.ts | 2 +- src/app/hooks/useSpaceHierarchy.ts | 22 +- src/app/hooks/useSpecVersions.ts | 2 +- src/app/hooks/useSpoilerClickHandler.ts | 3 +- src/app/hooks/useStateEvent.ts | 6 +- src/app/hooks/useStateEventCallback.ts | 3 +- src/app/hooks/useSyncState.ts | 3 +- src/app/hooks/useTextAreaCodeEditor.ts | 5 +- src/app/hooks/useTextAreaIntent.ts | 6 +- src/app/hooks/useTheme.ts | 2 +- src/app/hooks/useTypingStatusUpdater.ts | 4 +- src/app/hooks/useUIAFlows.ts | 3 +- src/app/hooks/useUserPresence.ts | 3 +- src/app/hooks/useUserProfile.ts | 30 +- src/app/hooks/useVerificationRequest.ts | 11 +- src/app/i18n.ts | 3 +- src/app/pages/FeatureCheck.tsx | 3 +- src/app/pages/MobileFriendly.tsx | 2 +- src/app/pages/Router.tsx | 5 +- src/app/pages/ThemeManager.tsx | 3 +- src/app/pages/auth/SSOLogin.tsx | 3 +- src/app/pages/auth/ServerPicker.tsx | 8 +- src/app/pages/auth/login/Login.tsx | 2 +- .../pages/auth/login/PasswordLoginForm.tsx | 11 +- src/app/pages/auth/login/TokenLogin.tsx | 5 +- src/app/pages/auth/login/loginUtil.ts | 14 +- .../auth/register/PasswordRegisterForm.tsx | 18 +- src/app/pages/auth/register/Register.tsx | 2 +- src/app/pages/auth/register/registerUtil.ts | 9 +- .../auth/reset-password/PasswordResetForm.tsx | 11 +- .../auth/reset-password/ResetPassword.tsx | 2 +- .../auth/reset-password/resetPasswordUtil.ts | 2 +- src/app/pages/client/AutoDiscovery.tsx | 6 +- .../pages/client/BackgroundNotifications.tsx | 66 +- src/app/pages/client/ClientBindAtoms.ts | 2 +- .../pages/client/ClientInitStorageAtom.tsx | 3 +- src/app/pages/client/ClientLayout.tsx | 2 +- src/app/pages/client/ClientNonUIFeatures.tsx | 38 +- .../ClientRoomsNotificationPreferences.tsx | 2 +- src/app/pages/client/ClientRoot.tsx | 9 +- src/app/pages/client/SidebarNav.tsx | 3 +- src/app/pages/client/SpecVersions.tsx | 2 +- src/app/pages/client/SyncStatus.tsx | 3 +- src/app/pages/client/direct/Direct.tsx | 10 +- src/app/pages/client/direct/RoomProvider.tsx | 2 +- src/app/pages/client/explore/Explore.tsx | 3 +- src/app/pages/client/explore/Server.tsx | 13 +- src/app/pages/client/home/Home.tsx | 10 +- src/app/pages/client/home/RoomProvider.tsx | 2 +- src/app/pages/client/inbox/Invites.tsx | 2 +- src/app/pages/client/inbox/Notifications.tsx | 26 +- .../client/sidebar/AccountSwitcherTab.tsx | 11 +- src/app/pages/client/sidebar/CreateTab.tsx | 8 +- .../pages/client/sidebar/DirectDMsList.tsx | 2 +- src/app/pages/client/sidebar/DirectTab.tsx | 6 +- src/app/pages/client/sidebar/HomeTab.tsx | 6 +- src/app/pages/client/sidebar/SpaceTabs.tsx | 25 +- .../pages/client/sidebar/UnverifiedTab.tsx | 4 +- .../client/sidebar/useSidebarDirectRoomIds.ts | 2 +- src/app/pages/client/space/RoomProvider.tsx | 2 +- src/app/pages/client/space/Space.tsx | 25 +- src/app/pages/client/space/SpaceProvider.tsx | 2 +- src/app/pages/pathSearchParam.ts | 2 +- src/app/pages/pathUtils.ts | 10 +- src/app/plugins/arborium/runtime.test.ts | 2 + src/app/plugins/arborium/runtime.ts | 6 +- src/app/plugins/arborium/themes.test.ts | 4 +- src/app/plugins/call/CallControl.ts | 7 +- src/app/plugins/call/CallEmbed.ts | 31 +- src/app/plugins/call/CallWidgetDriver.ts | 17 +- src/app/plugins/call/hooks.ts | 7 +- src/app/plugins/custom-emoji/ImagePack.ts | 7 +- .../plugins/custom-emoji/PackImageReader.ts | 5 +- .../plugins/custom-emoji/PackImagesReader.ts | 2 +- .../plugins/custom-emoji/PackMetaReader.ts | 3 +- .../plugins/custom-emoji/imagePackCache.ts | 2 +- src/app/plugins/custom-emoji/types.ts | 2 +- src/app/plugins/custom-emoji/utils.ts | 8 +- src/app/plugins/emoji.ts | 3 +- src/app/plugins/markdown/block/parser.ts | 2 +- src/app/plugins/markdown/block/rules.ts | 2 +- src/app/plugins/markdown/block/runner.ts | 2 +- src/app/plugins/markdown/block/type.ts | 2 +- src/app/plugins/markdown/inline/parser.ts | 2 +- src/app/plugins/markdown/inline/rules.ts | 2 +- src/app/plugins/markdown/inline/runner.ts | 5 +- src/app/plugins/markdown/inline/type.ts | 2 +- .../PKitCommandMessageHandler.ts | 7 +- .../PKitProxyMessageHandler.ts | 11 +- src/app/plugins/react-custom-html-parser.tsx | 28 +- src/app/plugins/recent-emoji.ts | 7 +- src/app/plugins/text-area/Operations.ts | 2 +- src/app/plugins/text-area/TextArea.ts | 2 +- .../plugins/text-area/TextAreaOperations.ts | 4 +- src/app/plugins/text-area/TextUtils.ts | 5 - src/app/plugins/text-area/index.ts | 1 - src/app/plugins/text-area/mods/Intent.ts | 4 +- src/app/plugins/utils.ts | 4 +- src/app/plugins/via-servers.ts | 9 +- .../voice-recorder-kit/useVoiceRecorder.ts | 2 +- src/app/state/backupRestore.ts | 3 +- src/app/state/callEmbed.ts | 4 +- src/app/state/callPreferences.ts | 4 +- src/app/state/closedLobbyCategories.ts | 3 +- src/app/state/closedNavCategories.ts | 3 +- src/app/state/createRoomModal.ts | 2 +- src/app/state/hooks/callPreferences.ts | 2 +- src/app/state/hooks/closedLobbyCategories.ts | 2 +- src/app/state/hooks/closedNavCategories.ts | 2 +- src/app/state/hooks/createRoomModal.ts | 5 +- src/app/state/hooks/createSpaceModal.ts | 3 +- src/app/state/hooks/navToActivePath.ts | 2 +- src/app/state/hooks/openedSidebarFolder.ts | 2 +- src/app/state/hooks/roomList.ts | 7 +- src/app/state/hooks/roomSettings.ts | 3 +- src/app/state/hooks/settings.ts | 2 +- src/app/state/hooks/spaceSettings.ts | 3 +- src/app/state/hooks/unread.ts | 5 +- src/app/state/hooks/useBindAtoms.ts | 2 +- src/app/state/hooks/userRoomProfile.ts | 7 +- src/app/state/mDirectList.ts | 3 +- src/app/state/modal.ts | 2 +- src/app/state/navToActivePath.ts | 5 +- src/app/state/nicknames.ts | 2 +- src/app/state/openedSidebarFolder.ts | 3 +- src/app/state/room-list/inviteList.ts | 8 +- src/app/state/room-list/roomList.ts | 5 +- src/app/state/room-list/utils.ts | 8 +- src/app/state/room/roomInputDrafts.ts | 8 +- src/app/state/room/roomToParents.ts | 24 +- src/app/state/room/roomToThreadBrowser.ts | 2 +- src/app/state/room/roomToUnread.ts | 85 +- src/app/state/scheduledMessages.ts | 2 +- src/app/state/searchModal.ts | 2 +- src/app/state/sessions.ts | 2 +- src/app/state/settings.ts | 2 +- src/app/state/typingMembers.ts | 5 +- src/app/state/upload.ts | 5 +- src/app/state/userRoomProfile.ts | 2 +- src/app/state/utils/atomWithLocalStorage.ts | 2 +- src/app/styles/ContainerColor.css.ts | 8 +- src/app/utils/MegolmExportEncryption.ts | 8 +- src/app/utils/abbreviations.ts | 7 +- .../utils/addStickerToDefaultStickerPack.ts | 11 +- src/app/utils/colorMXID.ts | 2 +- src/app/utils/common.ts | 4 +- src/app/utils/debug.ts | 2 +- src/app/utils/debugLogger.ts | 9 +- src/app/utils/delayedEvents.ts | 12 +- src/app/utils/keyboard.ts | 2 +- src/app/utils/matrix-crypto.ts | 2 +- src/app/utils/matrix-uia.ts | 5 +- src/app/utils/matrix.ts | 49 +- src/app/utils/notifications.ts | 3 +- src/app/utils/pronouns.ts | 10 +- src/app/utils/room.ts | 54 +- src/app/utils/sanitize.ts | 14 +- src/app/utils/sendFeedbackToUser.ts | 5 +- src/app/utils/settingsSync.test.ts | 5 +- src/app/utils/settingsSync.ts | 2 +- src/app/utils/sort.test.ts | 3 + src/app/utils/sort.ts | 2 +- src/app/utils/timeline.ts | 3 +- src/client/initMatrix.ts | 30 +- src/client/slidingSync.test.ts | 3 + src/client/slidingSync.ts | 48 +- src/index.tsx | 9 +- src/instrument.ts | 30 +- src/sw.ts | 64 +- src/sw/pushNotification.ts | 16 +- src/types/matrix/common.ts | 4 +- src/types/matrix/room.ts | 2 +- tsconfig.json | 26 +- vite.config.ts | 4 +- 563 files changed, 3401 insertions(+), 3677 deletions(-) create mode 100644 .oxfmtrc.json create mode 100644 .oxlintrc.json delete mode 100644 .prettierignore delete mode 100644 .prettierrc.json delete mode 100644 eslint.config.js create mode 100644 fix_sort.py delete mode 100644 src/app/plugins/text-area/TextUtils.ts diff --git a/.oxfmtrc.json b/.oxfmtrc.json new file mode 100644 index 000000000..3277b90f4 --- /dev/null +++ b/.oxfmtrc.json @@ -0,0 +1,17 @@ +{ + "$schema": "./node_modules/oxfmt/configuration_schema.json", + "printWidth": 100, + "tabWidth": 2, + "singleQuote": true, + "trailingComma": "es5", + "ignorePatterns": [ + "dist", + "node_modules", + "package.json", + "pnpm-lock.yaml", + "LICENSE", + "README.md", + "CHANGELOG.md", + "./changeset" + ] +} diff --git a/.oxlintrc.json b/.oxlintrc.json new file mode 100644 index 000000000..8ac1e233a --- /dev/null +++ b/.oxlintrc.json @@ -0,0 +1,45 @@ +{ + "$schema": "./node_modules/oxlint/configuration_schema.json", + "plugins": ["react", "jsx-a11y", "typescript", "import"], + "categories": { + "correctness": "error", + "suspicious": "warn", + "perf": "warn", + "style": "off" + }, + "env": { + "browser": true, + "builtin": true + }, + "rules": { + "import/no-unassigned-import": "off", + "import/no-named-as-default": "off", + "import/no-named-as-default-member": "off", + "react/react-in-jsx-scope": "off", + "react/jsx-filename-extension": ["error", { "extensions": [".tsx", ".jsx"] }], + "react/rules-of-hooks": "error", + "react/exhaustive-deps": "error", + "react/iframe-missing-sandbox": "off", + "jsx-a11y/no-autofocus": "off", + "jsx-a11y/prefer-tag-over-role": "off", + "typescript/no-explicit-any": "error", + "typescript/consistent-type-imports": "error", + "typescript/only-throw-error": "error" + }, + "overrides": [ + { + "files": ["**/*.ts", "**/*.tsx", "**/*.cts", "**/*.mts"], + "rules": { + "typescript/no-unused-vars": [ + "error", + { + "args": "after-used", + "ignoreRestSiblings": true, + "vars": "all" + } + ], + "typescript/no-shadow": "error" + } + } + ] +} diff --git a/.prettierignore b/.prettierignore deleted file mode 100644 index af963ef93..000000000 --- a/.prettierignore +++ /dev/null @@ -1,8 +0,0 @@ -dist -node_modules -package.json -pnpm-lock.yaml -LICENSE -README.md -CHANGELOG.md -./changeset \ No newline at end of file diff --git a/.prettierrc.json b/.prettierrc.json deleted file mode 100644 index 789ac2e5d..000000000 --- a/.prettierrc.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "printWidth": 100, - "singleQuote": true, - "trailingComma": "es5" -} diff --git a/.vscode/extensions.json b/.vscode/extensions.json index a3854a859..434432fea 100644 --- a/.vscode/extensions.json +++ b/.vscode/extensions.json @@ -1,3 +1,3 @@ { - "recommendations": ["dbaeumer.vscode-eslint", "esbenp.prettier-vscode", "webpro.vscode-knip"] + "recommendations": ["webpro.vscode-knip", "oxc.oxc-vscode"] } diff --git a/.vscode/settings.json b/.vscode/settings.json index 29e56e92a..d0bb58b84 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,11 +1,11 @@ { "editor.formatOnSave": true, - "editor.defaultFormatter": "esbenp.prettier-vscode", + "editor.defaultFormatter": "oxc.oxc-vscode", "typescript.tsdk": "node_modules/typescript/lib", "[jsonc]": { - "editor.defaultFormatter": "esbenp.prettier-vscode" + "editor.defaultFormatter": "oxc.oxc-vscode" }, "[json]": { - "editor.defaultFormatter": "esbenp.prettier-vscode" + "editor.defaultFormatter": "oxc.oxc-vscode" } } diff --git a/eslint.config.js b/eslint.config.js deleted file mode 100644 index 9fa0c87bb..000000000 --- a/eslint.config.js +++ /dev/null @@ -1,143 +0,0 @@ -import path from 'node:path'; - -import { includeIgnoreFile } from '@eslint/compat'; -import js from '@eslint/js'; -import { defineConfig } from 'eslint/config'; -import { configs, helpers, plugins } from 'eslint-config-airbnb-extended'; -import { rules as prettierConfigRules } from 'eslint-config-prettier'; -import prettierPlugin from 'eslint-plugin-prettier'; -import reactPlugin from 'eslint-plugin-react'; -import globals from 'globals'; - -const gitignorePath = path.resolve('.', '.gitignore'); -const { jsFiles, tsFiles } = helpers.extensions; - -const jsConfig = defineConfig([ - // ESLint recommended config - { - name: 'js/config', - ...js.configs.recommended, - }, - // Stylistic plugin - plugins.stylistic, - // Import X plugin - plugins.importX, - // Airbnb base recommended config - ...configs.base.recommended, -]); - -const reactConfig = defineConfig([ - // React plugin - plugins.react, - // React hooks plugin - plugins.reactHooks, - // React JSX A11y plugin - plugins.reactA11y, - // Airbnb React recommended config - ...configs.react.recommended, - // React 17+ automatic JSX runtime - reactPlugin.configs.flat['jsx-runtime'], -]); - -const typescriptConfig = defineConfig([ - // TypeScript ESLint plugin - plugins.typescriptEslint, - // Airbnb base TypeScript config - ...configs.base.typescript, - // Airbnb React TypeScript config - ...configs.react.typescript, -]); - -const prettierConfig = defineConfig([ - // Prettier plugin - { - name: 'prettier/plugin/config', - plugins: { - prettier: prettierPlugin, - }, - }, - // Prettier config - { - name: 'prettier/config', - rules: { - ...prettierConfigRules, - 'prettier/prettier': 'error', - }, - }, -]); - -const projectOverrides = defineConfig([ - { - name: 'project/rule-overrides', - files: [...jsFiles, ...tsFiles], - languageOptions: { - globals: { - JSX: 'readonly', - ...globals.browser, - }, - }, - rules: { - 'linebreak-style': 'off', - 'no-underscore-dangle': 'off', - 'no-shadow': 'off', - 'import-x/prefer-default-export': 'off', - 'import-x/extensions': 'off', - 'import-x/no-unresolved': 'off', - 'import-x/no-extraneous-dependencies': [ - 'error', - { - devDependencies: true, - optionalDependencies: false, - peerDependencies: true, - bundledDependencies: true, - }, - ], - 'react/no-unstable-nested-components': ['error', { allowAsProps: true }], - 'react/jsx-filename-extension': [ - 'error', - { - extensions: ['.tsx', '.jsx'], - }, - ], - // obsolete in a React 19 - 'react/prop-types': 'off', - 'react/require-default-props': 'off', - 'react/jsx-props-no-spreading': 'off', - 'react-hooks/rules-of-hooks': 'error', - 'react-hooks/exhaustive-deps': 'error', - }, - }, - { - name: 'project/typescript-rule-overrides', - files: tsFiles, - rules: { - // disabled for now to get eslint to pass - '@typescript-eslint/consistent-type-definitions': 'off', - '@typescript-eslint/no-unsafe-enum-comparison': 'off', - '@typescript-eslint/only-throw-error': 'off', - '@typescript-eslint/array-type': 'off', - '@typescript-eslint/no-unused-vars': [ - 'error', - { - args: 'after-used', - enableAutofixRemoval: { - imports: true, - }, - ignoreRestSiblings: true, - vars: 'all', - }, - ], - '@typescript-eslint/no-shadow': 'error', - 'no-undef': 'off', - }, - }, -]); - -export default defineConfig([ - includeIgnoreFile(gitignorePath), - ...jsConfig, - ...reactConfig, - ...typescriptConfig, - ...prettierConfig, - ...projectOverrides, -]); diff --git a/fix_sort.py b/fix_sort.py new file mode 100644 index 000000000..99a09c41e --- /dev/null +++ b/fix_sort.py @@ -0,0 +1,19 @@ +import re + +df = open('src/app/utils/sort.test.ts', 'r', encoding='utf-8') + content = df.read() + +df.schlose() + +content = content.replace( + 'import type { MatrixClient } from '$types/matrix-sdd';' + ''import type { MatrixClient, Room } from '$types/matrix-sdd' +', + ''import type { MatrixClient, Room } from '$types/matrix-sdd' +', +).replace( + '== asy', + '== unknown as Room' +) +with open('src/app/utils/sort.test.ts', 'w', encoding='utf-8') as df: + df.write(content) diff --git a/knip.json b/knip.json index c6cca1d75..01762503c 100644 --- a/knip.json +++ b/knip.json @@ -8,8 +8,7 @@ "ignoreDependencies": [ "buffer", "@sableclient/sable-call-embedded", - "@matrix-org/matrix-sdk-crypto-wasm", - "@testing-library/user-event" + "@matrix-org/matrix-sdk-crypto-wasm" ], "ignoreBinaries": ["knope"], "rules": { diff --git a/knope.toml b/knope.toml index 4b3d2fb87..fc533824c 100644 --- a/knope.toml +++ b/knope.toml @@ -2,8 +2,12 @@ versioned_files = ["package.json"] changelog = "CHANGELOG.md" extra_changelog_sections = [ - { name = "Documentation", types = ["docs"] }, - { name = "Notes", types = ["note"] }, + { name = "Documentation", types = [ + "docs", + ] }, + { name = "Notes", types = [ + "note", + ] }, ] # assets = "marker" // TODO: add this later once we have assets @@ -64,6 +68,6 @@ repo = "Sable" [release_notes] # The marker is used by prepare-release.yml change_templates = [ - "### $summary \n\n$details", - "* $summary ", + "### $summary \n\n$details", + "* $summary ", ] diff --git a/package.json b/package.json index 980aa4b64..47bfe902f 100644 --- a/package.json +++ b/package.json @@ -12,10 +12,10 @@ "dev": "vite dev", "build": "vite build", "preview": "vite preview", - "lint": "eslint .", - "lint:fix": "eslint . --fix", - "fmt": "prettier --write .", - "fmt:check": "prettier --check .", + "lint": "oxlint .", + "lint:fix": "oxlint . --fix && oxfmt .", + "fmt": "oxfmt .", + "fmt:check": "oxfmt --check .", "typecheck": "tsc", "test": "vitest", "test:ui": "vitest --ui", @@ -57,7 +57,6 @@ "dompurify": "^3.3.3", "emojibase": "^15.3.1", "emojibase-data": "^15.3.2", - "eslint-plugin-react": "7.37.5", "eventemitter3": "^5.0.4", "file-saver": "^2.0.5", "focus-trap-react": "^10.3.1", @@ -96,8 +95,6 @@ "devDependencies": { "@cloudflare/vite-plugin": "^1.26.0", "@esbuild-plugins/node-globals-polyfill": "^0.2.3", - "@eslint/compat": "2.0.2", - "@eslint/js": "9.39.3", "@rollup/plugin-inject": "^5.0.5", "@rollup/plugin-wasm": "^6.2.2", "@sableclient/sable-call-embedded": "v1.1.4", @@ -118,14 +115,11 @@ "@vitest/ui": "^4.1.0", "buffer": "^6.0.3", "cloudflared": "^0.7.1", - "eslint": "9.39.3", - "eslint-config-airbnb-extended": "3.0.1", - "eslint-config-prettier": "10.1.8", - "eslint-plugin-prettier": "5.5.5", - "globals": "17.3.0", "jsdom": "^29.0.0", "knip": "5.85.0", - "prettier": "3.8.1", + "oxfmt": "^0.45.0", + "oxlint": "^1.60.0", + "oxlint-tsgolint": "^0.21.0", "typescript": "^5.9.3", "vite": "^7.3.1", "vite-plugin-compression2": "2.5.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 1a5589d58..02f7aba34 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -96,9 +96,6 @@ importers: emojibase-data: specifier: ^15.3.2 version: 15.3.2(emojibase@15.3.1) - eslint-plugin-react: - specifier: 7.37.5 - version: 7.37.5(eslint@9.39.3(jiti@2.6.1)) eventemitter3: specifier: ^5.0.4 version: 5.0.4 @@ -208,12 +205,6 @@ importers: '@esbuild-plugins/node-globals-polyfill': specifier: ^0.2.3 version: 0.2.3(esbuild@0.27.3) - '@eslint/compat': - specifier: 2.0.2 - version: 2.0.2(eslint@9.39.3(jiti@2.6.1)) - '@eslint/js': - specifier: 9.39.3 - version: 9.39.3 '@rollup/plugin-inject': specifier: ^5.0.5 version: 5.0.5(rollup@4.59.0) @@ -274,30 +265,21 @@ importers: cloudflared: specifier: ^0.7.1 version: 0.7.1 - eslint: - specifier: 9.39.3 - version: 9.39.3(jiti@2.6.1) - eslint-config-airbnb-extended: - specifier: 3.0.1 - version: 3.0.1(@typescript-eslint/parser@8.57.0(eslint@9.39.3(jiti@2.6.1))(typescript@5.9.3))(@typescript-eslint/utils@8.57.0(eslint@9.39.3(jiti@2.6.1))(typescript@5.9.3))(eslint-import-resolver-node@0.3.9)(eslint@9.39.3(jiti@2.6.1))(typescript@5.9.3) - eslint-config-prettier: - specifier: 10.1.8 - version: 10.1.8(eslint@9.39.3(jiti@2.6.1)) - eslint-plugin-prettier: - specifier: 5.5.5 - version: 5.5.5(eslint-config-prettier@10.1.8(eslint@9.39.3(jiti@2.6.1)))(eslint@9.39.3(jiti@2.6.1))(prettier@3.8.1) - globals: - specifier: 17.3.0 - version: 17.3.0 jsdom: specifier: ^29.0.0 version: 29.0.0 knip: specifier: 5.85.0 version: 5.85.0(@types/node@24.10.13)(typescript@5.9.3) - prettier: - specifier: 3.8.1 - version: 3.8.1 + oxfmt: + specifier: ^0.45.0 + version: 0.45.0 + oxlint: + specifier: ^1.60.0 + version: 1.60.0(oxlint-tsgolint@0.21.0) + oxlint-tsgolint: + specifier: ^0.21.0 + version: 0.21.0 typescript: specifier: ^5.9.3 version: 5.9.3 @@ -1147,57 +1129,6 @@ packages: cpu: [x64] os: [win32] - '@eslint-community/eslint-utils@4.9.1': - resolution: {integrity: sha512-phrYmNiYppR7znFEdqgfWHXR6NCkZEK7hwWDHZUjit/2/U0r6XvkDl0SYnoM51Hq7FhCGdLDT6zxCCOY1hexsQ==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - peerDependencies: - eslint: ^6.0.0 || ^7.0.0 || >=8.0.0 - - '@eslint-community/regexpp@4.12.2': - resolution: {integrity: sha512-EriSTlt5OC9/7SXkRSCAhfSxxoSUgBm33OH+IkwbdpgoqsSsUg7y3uh+IICI/Qg4BBWr3U2i39RpmycbxMq4ew==} - engines: {node: ^12.0.0 || ^14.0.0 || >=16.0.0} - - '@eslint/compat@2.0.2': - resolution: {integrity: sha512-pR1DoD0h3HfF675QZx0xsyrsU8q70Z/plx7880NOhS02NuWLgBCOMDL787nUeQ7EWLkxv3bPQJaarjcPQb2Dwg==} - engines: {node: ^20.19.0 || ^22.13.0 || >=24} - peerDependencies: - eslint: ^8.40 || 9 || 10 - peerDependenciesMeta: - eslint: - optional: true - - '@eslint/config-array@0.21.2': - resolution: {integrity: sha512-nJl2KGTlrf9GjLimgIru+V/mzgSK0ABCDQRvxw5BjURL7WfH5uoWmizbH7QB6MmnMBd8cIC9uceWnezL1VZWWw==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - - '@eslint/config-helpers@0.4.2': - resolution: {integrity: sha512-gBrxN88gOIf3R7ja5K9slwNayVcZgK6SOUORm2uBzTeIEfeVaIhOpCtTox3P6R7o2jLFwLFTLnC7kU/RGcYEgw==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - - '@eslint/core@0.17.0': - resolution: {integrity: sha512-yL/sLrpmtDaFEiUj1osRP4TI2MDz1AddJL+jZ7KSqvBuliN4xqYY54IfdN8qD8Toa6g1iloph1fxQNkjOxrrpQ==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - - '@eslint/core@1.1.1': - resolution: {integrity: sha512-QUPblTtE51/7/Zhfv8BDwO0qkkzQL7P/aWWbqcf4xWLEYn1oKjdO0gglQBB4GAsu7u6wjijbCmzsUTy6mnk6oQ==} - engines: {node: ^20.19.0 || ^22.13.0 || >=24} - - '@eslint/eslintrc@3.3.5': - resolution: {integrity: sha512-4IlJx0X0qftVsN5E+/vGujTRIFtwuLbNsVUe7TO6zYPDR1O6nFwvwhIKEKSrl6dZchmYBITazxKoUYOjdtjlRg==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - - '@eslint/js@9.39.3': - resolution: {integrity: sha512-1B1VkCq6FuUNlQvlBYb+1jDu/gV297TIs/OeiaSR9l1H27SVW55ONE1e1Vp16NqP683+xEGzxYtv4XCiDPaQiw==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - - '@eslint/object-schema@2.1.7': - resolution: {integrity: sha512-VtAOaymWVfZcmZbp6E2mympDIHvyjXs/12LqWYjVw6qjrfF+VK+fyG33kChz3nnK+SU5/NeHOqrTEHS8sXO3OA==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - - '@eslint/plugin-kit@0.4.1': - resolution: {integrity: sha512-43/qtrDUokr7LJqoF2c3+RInu/t4zfrpYdoSDfYyhg52rwLV6TnOvdG4fXm7IkSB3wErkcmJS9iEhjVtOSEjjA==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@exodus/bytes@1.15.0': resolution: {integrity: sha512-UY0nlA+feH81UGSHv92sLEPLCeZFjXOuHhrIo0HQydScuQc8s0A7kL/UdgwgDq8g8ilksmuoF35YVTNphV2aBQ==} engines: {node: ^20.19.0 || ^22.12.0 || >=24.0.0} @@ -1228,22 +1159,6 @@ packages: '@formatjs/intl-localematcher@0.6.2': resolution: {integrity: sha512-XOMO2Hupl0wdd172Y06h6kLpBz6Dv+J4okPLl4LPtzbr8f66WbIoy4ev98EBuZ6ZK4h5ydTN6XneT4QVpD7cdA==} - '@humanfs/core@0.19.1': - resolution: {integrity: sha512-5DyQ4+1JEUzejeK1JGICcideyfUbGixgS9jNgex5nqkW+cY7WZhxBigmieN5Qnw9ZosSNVC9KQKyb+GUaGyKUA==} - engines: {node: '>=18.18.0'} - - '@humanfs/node@0.16.7': - resolution: {integrity: sha512-/zUx+yOsIrG4Y43Eh2peDeKCxlRt/gET6aHfaKpuq267qXdYDFViVHfMaLyygZOnl0kGWxFIgsBy8QFuTLUXEQ==} - engines: {node: '>=18.18.0'} - - '@humanwhocodes/module-importer@1.0.1': - resolution: {integrity: sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==} - engines: {node: '>=12.22'} - - '@humanwhocodes/retry@0.4.3': - resolution: {integrity: sha512-bV0Tgo9K4hfPCek+aMAn81RppFKv2ySDQeMoSZuvTASywNTnVJCArCZE2FWqpvIatKu7VMRLWlR1EazvVhDyhQ==} - engines: {node: '>=18.18'} - '@img/colour@1.1.0': resolution: {integrity: sha512-Td76q7j57o/tLVdgS746cYARfSyxk8iEfRxewL9h4OMzYhbW4TAcppl0mT4eyqXddh6L/jwoM75mo7ixa/pCeQ==} engines: {node: '>=18'} @@ -1517,15 +1432,9 @@ packages: resolution: {integrity: sha512-6NNmNxvoJKeucVjxaaRUt3La2i5jShgiAbaY3G/72s1Vp3U06XPrAIxkAjBxpDcamEn/t+WJ4OOlGmvILo4/Ew==} engines: {node: '>= 10'} - '@napi-rs/wasm-runtime@0.2.12': - resolution: {integrity: sha512-ZVWUcfwY4E/yPitQJl481FjFo3K22D6qF0DuFH6Y/nbnE11GY5uguDxZMGXPQ8WQ0128MXQD7TnfHyK4oWoIJQ==} - '@napi-rs/wasm-runtime@1.1.1': resolution: {integrity: sha512-p64ah1M1ld8xjWv3qbvFwHiFVWrq1yFvV4f7w+mzaqiR4IlSgkqhcRdHwsGgomwzBH51sRY4NEowLxnaBjcW/A==} - '@next/eslint-plugin-next@16.1.6': - resolution: {integrity: sha512-/Qq3PTagA6+nYVfryAtQ7/9FEr/6YVyvOtl6rZnGsbReGLf0jZU6gkpr1FuChAQpvV46a78p4cmHOVP8mbfSMQ==} - '@nodelib/fs.scandir@2.1.5': resolution: {integrity: sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==} engines: {node: '>= 8'} @@ -1646,6 +1555,280 @@ packages: cpu: [x64] os: [win32] + '@oxfmt/binding-android-arm-eabi@0.45.0': + resolution: {integrity: sha512-A/UMxFob1fefCuMeGxQBulGfFE38g2Gm23ynr3u6b+b7fY7/ajGbNsa3ikMIkGMLJW/TRoQaMoP1kME7S+815w==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm] + os: [android] + + '@oxfmt/binding-android-arm64@0.45.0': + resolution: {integrity: sha512-L63z4uZmHjgvvqvMJD7mwff8aSBkM0+X4uFr6l6U5t6+Qc9DCLVZWIunJ7Gm4fn4zHPdSq6FFQnhu9yqqobxIg==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [android] + + '@oxfmt/binding-darwin-arm64@0.45.0': + resolution: {integrity: sha512-UV34dd623FzqT+outIGndsCA/RBB+qgB3XVQhgmmJ9PJwa37NzPC9qzgKeOhPKxVk2HW+JKldQrVL54zs4Noww==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [darwin] + + '@oxfmt/binding-darwin-x64@0.45.0': + resolution: {integrity: sha512-pMNJv0CMa1pDefVPeNbuQxibh8ITpWDFEhMC/IBB9Zlu76EbgzYwrzI4Cb11mqX2+rIYN70UTrh3z06TM59ptQ==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [darwin] + + '@oxfmt/binding-freebsd-x64@0.45.0': + resolution: {integrity: sha512-xTcRoxbbo61sW2+ZRPeH+vp/o9G8gkdhiVumFU+TpneiPm14c79l6GFlxPXlCE9bNWikigbsrvJw46zCVAQFfg==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [freebsd] + + '@oxfmt/binding-linux-arm-gnueabihf@0.45.0': + resolution: {integrity: sha512-hWL8Hdni+3U1mPFx1UtWeGp3tNb6EhBAUHRMbKUxVkOp3WwoJbpVO2bfUVbS4PfpledviXXNHSTl1veTa6FhkQ==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm] + os: [linux] + + '@oxfmt/binding-linux-arm-musleabihf@0.45.0': + resolution: {integrity: sha512-6Blt/0OBT7vvfQpqYuYbpbFLPqSiaYpEJzUUWhinPEuADypDbtV1+LdjM0vYBNGPvnj85ex7lTerEX6JGcPt9w==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm] + os: [linux] + + '@oxfmt/binding-linux-arm64-gnu@0.45.0': + resolution: {integrity: sha512-jLjoLfe+hGfjhA8hNBSdw85yCA8ePKq7ME4T+g6P9caQXvmt6IhE2X7iVjnVdkmYUWEzZrxlh4p6RkDmAMJY/A==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [linux] + libc: [glibc] + + '@oxfmt/binding-linux-arm64-musl@0.45.0': + resolution: {integrity: sha512-XQKXZIKYJC3GQJ8FnD3iMntpw69Wd9kDDK/Xt79p6xnFYlGGxSNv2vIBvRTDg5CKByWFWWZLCRDOXoP/m6YN4g==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [linux] + libc: [musl] + + '@oxfmt/binding-linux-ppc64-gnu@0.45.0': + resolution: {integrity: sha512-+g5RiG+xOkdrCWkKodv407nTvMq4vYM18Uox2MhZBm/YoqFxxJpWKsloskFFG5NU13HGPw1wzYjjOVcyd9moCA==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [ppc64] + os: [linux] + libc: [glibc] + + '@oxfmt/binding-linux-riscv64-gnu@0.45.0': + resolution: {integrity: sha512-V7dXKoSyEbWAkkSF4JJNtF+NJZDmJoSarSoP30WCsB3X636Rehd3CvxBj49FIJxEBFWhvcUjGSHVeU8Erck1bQ==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [riscv64] + os: [linux] + libc: [glibc] + + '@oxfmt/binding-linux-riscv64-musl@0.45.0': + resolution: {integrity: sha512-Vdelft1sAEYojVGgcODEFXSWYQYlIvoyIGWebKCuUibd1tvS1TjTx413xG2ZLuHpYj45CkN/ztMLMX6jrgqpgg==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [riscv64] + os: [linux] + libc: [musl] + + '@oxfmt/binding-linux-s390x-gnu@0.45.0': + resolution: {integrity: sha512-RR7xKgNpqwENnK0aYCGYg0JycY2n93J0reNjHyes+I9Gq52dH95x+CBlnlAQHCPfz6FGnKA9HirgUl14WO6o7w==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [s390x] + os: [linux] + libc: [glibc] + + '@oxfmt/binding-linux-x64-gnu@0.45.0': + resolution: {integrity: sha512-U/QQ0+BQNSHxjuXR/utvXnQ50Vu5kUuqEomZvQ1/3mhgbBiMc2WU9q5kZ5WwLp3gnFIx9ibkveoRSe2EZubkqg==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [linux] + libc: [glibc] + + '@oxfmt/binding-linux-x64-musl@0.45.0': + resolution: {integrity: sha512-o5TLOUCF0RWQjsIS06yVC+kFgp092/yLe6qBGSUvtnmTVw9gxjpdQSXc3VN5Cnive4K11HNstEZF8ROKHfDFSw==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [linux] + libc: [musl] + + '@oxfmt/binding-openharmony-arm64@0.45.0': + resolution: {integrity: sha512-RnGcV3HgPuOjsGx/k9oyRNKmOp+NBLGzZTdPDYbc19r7NGeYPplnUU/BfU35bX2Y/O4ejvHxcfkvW2WoYL/gsg==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [openharmony] + + '@oxfmt/binding-win32-arm64-msvc@0.45.0': + resolution: {integrity: sha512-v3Vj7iKKsUFwt9w5hsqIIoErKVoENC6LoqfDlteOQ5QMDCXihlqLoxpmviUhXnNncg4zV6U9BPwlBbwa+qm4wg==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [win32] + + '@oxfmt/binding-win32-ia32-msvc@0.45.0': + resolution: {integrity: sha512-N8yotPBX6ph0H3toF4AEpdCeVPrdcSetj+8eGiZGsrLsng3bs/Q5HPu4bbSxip5GBPx5hGbGHrZwH4+rcrjhHA==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [ia32] + os: [win32] + + '@oxfmt/binding-win32-x64-msvc@0.45.0': + resolution: {integrity: sha512-w5MMTRCK1dpQeRA+HHqXQXyN33DlG/N2LOYxJmaT4fJjcmZrbNnqw7SmIk7I2/a2493PPLZ+2E/Ar6t2iKVMug==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [win32] + + '@oxlint-tsgolint/darwin-arm64@0.21.0': + resolution: {integrity: sha512-P20j3MLqfwIT+94qGU3htC7dWp4pXGZW1p1p7FRUzu1aopq7c9nPCgf0W/WjktqQ57+iuTq9mbSlwWinl6+H1A==} + cpu: [arm64] + os: [darwin] + + '@oxlint-tsgolint/darwin-x64@0.21.0': + resolution: {integrity: sha512-81TmmuBcPedEA0MwRmObuQuXnCprS1UiHQWGe7pseqNAJzUWXeAPrayqKTACX92VpruJI+yvY0XJrFp11PpcTA==} + cpu: [x64] + os: [darwin] + + '@oxlint-tsgolint/linux-arm64@0.21.0': + resolution: {integrity: sha512-sbjBr6zDduX8rNO0PTjhf7VYLCPWqdijWiMPp8e10qu6Tam1GdaVLaLlX8QrNupTgglO1GvqqgY/jcacWL8a6g==} + cpu: [arm64] + os: [linux] + + '@oxlint-tsgolint/linux-x64@0.21.0': + resolution: {integrity: sha512-jNrOcy53R5TJQfrK444Cm60bW9437xDoxPbm3AdvFSo/fhdFMllawc7uZC2Wzr+EAjTkW13K8R4QHzsUdBG9fQ==} + cpu: [x64] + os: [linux] + + '@oxlint-tsgolint/win32-arm64@0.21.0': + resolution: {integrity: sha512-xWeRxJJILDE4b9UqHEWGBxcBc1TUS6zWHhxcyxTZMwf4q3wdKeu0OHYAcwLGJzoSjEIf6FTjyfPiRNil2oqsdg==} + cpu: [arm64] + os: [win32] + + '@oxlint-tsgolint/win32-x64@0.21.0': + resolution: {integrity: sha512-Ob9AA9teI8ckPo1whV1smLr5NrqwgBv/8boDbK0YZG+fKgNGRwr1hBj1ORgFWOQaUBv+5njp5A0RAfJJjQ95QQ==} + cpu: [x64] + os: [win32] + + '@oxlint/binding-android-arm-eabi@1.60.0': + resolution: {integrity: sha512-YdeJKaZckDQL1qa62a1aKq/goyq48aX3yOxaaWqWb4sau4Ee4IiLbamftNLU3zbePky6QsDj6thnSSzHRBjDfA==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm] + os: [android] + + '@oxlint/binding-android-arm64@1.60.0': + resolution: {integrity: sha512-7ANS7PpXCfq84xZQ8E5WPs14gwcuPcl+/8TFNXfpSu0CQBXz3cUo2fDpHT8v8HJN+Ut02eacvMAzTnc9s6X4tw==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [android] + + '@oxlint/binding-darwin-arm64@1.60.0': + resolution: {integrity: sha512-pJsgd9AfplLGBm1fIr25V6V14vMrayhx4uIQvlfH7jWs2SZwSrvi3TfgfJySB8T+hvyEH8K2zXljQiUnkgUnfQ==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [darwin] + + '@oxlint/binding-darwin-x64@1.60.0': + resolution: {integrity: sha512-Ue1aXHX49ivwflKqGJc7zcd/LeLgbhaTcDCQStgx5x06AXgjEAZmvrlMuIkWd4AL4FHQe6QJ9f33z04Cg448VQ==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [darwin] + + '@oxlint/binding-freebsd-x64@1.60.0': + resolution: {integrity: sha512-YCyQzsQtusQw+gNRW9rRTifSO+Dt/+dtCl2NHoDMZqJlRTEZ/Oht9YnuporI9yiTx7+cB+eqzX3MtHHVHGIWhg==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [freebsd] + + '@oxlint/binding-linux-arm-gnueabihf@1.60.0': + resolution: {integrity: sha512-c7dxM2Zksa45Qw16i2iGY3Fti2NirJ38FrsBsKw+qcJ0OtqTsBgKJLF0xV+yLG56UH01Z8WRPgsw31e0MoRoGQ==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm] + os: [linux] + + '@oxlint/binding-linux-arm-musleabihf@1.60.0': + resolution: {integrity: sha512-ZWALoA42UYqBEP1Tbw9OWURgFGS1nWj2AAvLdY6ZcGx/Gj93qVCBKjcvwXMupZibYwFbi9s/rzqkZseb/6gVtQ==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm] + os: [linux] + + '@oxlint/binding-linux-arm64-gnu@1.60.0': + resolution: {integrity: sha512-tpy+1w4p9hN5CicMCxqNy6ymfRtV5ayE573vFNjp1k1TN/qhLFgflveZoE/0++RlkHikBz2vY545NWm/hp7big==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [linux] + libc: [glibc] + + '@oxlint/binding-linux-arm64-musl@1.60.0': + resolution: {integrity: sha512-eDYDXZGhQAXyn6GwtwiX/qcLS0HlOLPJ/+iiIY8RYr+3P8oKBmgKxADLlniL6FtWfE7pPk7IGN9/xvDEvDvFeg==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [linux] + libc: [musl] + + '@oxlint/binding-linux-ppc64-gnu@1.60.0': + resolution: {integrity: sha512-nxehly5XYBHUWI9VJX1bqCf9j/B43DaK/aS/T1fcxCpX3PA4Rm9BB54nPD1CKayT8xg6REN1ao+01hSRNgy8OA==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [ppc64] + os: [linux] + libc: [glibc] + + '@oxlint/binding-linux-riscv64-gnu@1.60.0': + resolution: {integrity: sha512-j1qf/NaUfOWQutjeoooNG1Q0zsK0XGmSu1uDLq3cctquRF3j7t9Hxqf/76ehCc5GEUAanth2W4Fa+XT1RFg/nw==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [riscv64] + os: [linux] + libc: [glibc] + + '@oxlint/binding-linux-riscv64-musl@1.60.0': + resolution: {integrity: sha512-YELKPRefQ/q/h3RUmeRfPCUhh2wBvgV1RyZ/F9M9u8cDyXsQW2ojv1DeWQTt466yczDITjZnIOg/s05pk7Ve2A==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [riscv64] + os: [linux] + libc: [musl] + + '@oxlint/binding-linux-s390x-gnu@1.60.0': + resolution: {integrity: sha512-JkO3C6Gki7Y6h/MiIkFKvHFOz98/YWvQ4WYbK9DLXACMP2rjULzkeGyAzorJE5S1dzLQGFgeqvN779kSFwoV1g==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [s390x] + os: [linux] + libc: [glibc] + + '@oxlint/binding-linux-x64-gnu@1.60.0': + resolution: {integrity: sha512-XjKHdFVCpZZZSWBCKyyqCq65s2AKXykMXkjLoKYODrD+f5toLhlwsMESscu8FbgnJQ4Y/dpR/zdazsahmgBJIA==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [linux] + libc: [glibc] + + '@oxlint/binding-linux-x64-musl@1.60.0': + resolution: {integrity: sha512-js29ZWIuPhNWzY8NC7KoffEMEeWG105vbmm+8EOJsC+T/jHBiKIJEUF78+F/IrgEWMMP9N0kRND4Pp75+xAhKg==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [linux] + libc: [musl] + + '@oxlint/binding-openharmony-arm64@1.60.0': + resolution: {integrity: sha512-H+PUITKHk04stFpWj3x3Kg08Afp/bcXSBi0EhasR5a0Vw7StXHTzdl655PUI0fB4qdh2Wsu6Dsi+3ACxPoyQnA==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [openharmony] + + '@oxlint/binding-win32-arm64-msvc@1.60.0': + resolution: {integrity: sha512-WA/yc7f7ZfCefBXVzNHn1Ztulb1EFwNBb4jMZ6pjML0zz6pHujlF3Q3jySluz3XHl/GNeMTntG1seUBWVMlMag==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [win32] + + '@oxlint/binding-win32-ia32-msvc@1.60.0': + resolution: {integrity: sha512-33YxL1sqwYNZXtn3MD/4dno6s0xeedXOJlT1WohkVD565WvohClZUr7vwKdAk954n4xiEWJkewiCr+zLeq7AeA==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [ia32] + os: [win32] + + '@oxlint/binding-win32-x64-msvc@1.60.0': + resolution: {integrity: sha512-JOro4ZcfBLamJCyfURQmOQByoorgOdx3ZjAkSqnb/CyG/i+lN3KoV5LAgk5ZAW6DPq7/Cx7n23f8DuTWXTWgyQ==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [win32] + '@phosphor-icons/react@2.1.10': resolution: {integrity: sha512-vt8Tvq8GLjheAZZYa+YG/pW7HDbov8El/MANW8pOAz4eGxrwhnbfrQZq0Cp4q8zBEu8NIhHdnr+r8thnfRSNYA==} engines: {node: '>=10'} @@ -1653,10 +1836,6 @@ packages: react: '>= 16.8' react-dom: '>= 16.8' - '@pkgr/core@0.2.9': - resolution: {integrity: sha512-QNqXyfVS2wm9hweSYD2O7F0G06uurj9kZ96TRQE5Y9hU7+tgdZwIkbAKc5Ocy1HxEY2kuDQa6cQ1WRs/O5LFKA==} - engines: {node: ^12.20.0 || ^14.18.0 || >=16.0.0} - '@polka/url@1.0.0-next.29': resolution: {integrity: sha512-wwQAWhWSuHaag8c4q/KN/vCoeOJYshAIvMQwD4GpSb3OiZklFfvAgmj0VCBBImRpuF/aFgIRzllXlVX93Jevww==} @@ -2426,9 +2605,6 @@ packages: cpu: [x64] os: [win32] - '@rtsao/scc@1.1.0': - resolution: {integrity: sha512-zt6OdqaDoOnJ1ZYsCYGt9YmWzDXl4vQdKTyJev62gFhRGKdx7mcT54V9KIjg+d2wi9EXsPvAPKe7i7WjfVWB8g==} - '@sableclient/sable-call-embedded@1.1.4': resolution: {integrity: sha512-XLRcbUPcn7i3QKZAPjIfUkUEXP0E4DOr0dyRoVCWMjHWj28kq+T7jeB2fRr5lB77olBwNHMjIuoTwrv02xiepQ==} @@ -2542,12 +2718,6 @@ packages: '@standard-schema/spec@1.1.0': resolution: {integrity: sha512-l2aFy5jALhniG5HgqrD6jXLi/rUWrKvqN/qJx6yoJsgKhblVd+iqqU4RCXavm/jPityDo5TCvKMnpjKnOriy0w==} - '@stylistic/eslint-plugin@5.10.0': - resolution: {integrity: sha512-nPK52ZHvot8Ju/0A4ucSX1dcPV2/1clx0kLcH5wDmrE4naKso7TUC/voUyU1O9OTKTrR6MYip6LP0ogEMQ9jPQ==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - peerDependencies: - eslint: ^9.0.0 || ^10.0.0 - '@surma/rollup-plugin-off-main-thread@2.2.3': resolution: {integrity: sha512-lR8q/9W7hZpMWweNiAKU7NQerBnzQQLvi8qnTDU/fxItPhtZVMbPV3lbCwjhIlNBe9Bbr5V+KHshvWmVSG9cxQ==} @@ -2801,12 +2971,6 @@ packages: '@types/is-hotkey@0.1.10': resolution: {integrity: sha512-RvC8KMw5BCac1NvRRyaHgMMEtBaZ6wh0pyPTBu7izn4Sj/AX9Y4aXU5c7rX8PnM/knsuUpC1IeoBkANtxBypsQ==} - '@types/json-schema@7.0.15': - resolution: {integrity: sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==} - - '@types/json5@0.0.29': - resolution: {integrity: sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==} - '@types/node@24.10.13': resolution: {integrity: sha512-oH72nZRfDv9lADUBSo104Aq7gPHpQZc4BTx38r9xf9pg5LfP6EzSyH2n7qFmmxRQXh7YlUXODcYsg6PuTDSxGg==} @@ -2833,168 +2997,6 @@ packages: '@types/ua-parser-js@0.7.39': resolution: {integrity: sha512-P/oDfpofrdtF5xw433SPALpdSchtJmY7nsJItf8h3KXqOslkbySh8zq4dSWXH2oTjRvJ5PczVEoCZPow6GicLg==} - '@typescript-eslint/eslint-plugin@8.57.0': - resolution: {integrity: sha512-qeu4rTHR3/IaFORbD16gmjq9+rEs9fGKdX0kF6BKSfi+gCuG3RCKLlSBYzn/bGsY9Tj7KE/DAQStbp8AHJGHEQ==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - peerDependencies: - '@typescript-eslint/parser': ^8.57.0 - eslint: ^8.57.0 || ^9.0.0 || ^10.0.0 - typescript: '>=4.8.4 <6.0.0' - - '@typescript-eslint/parser@8.57.0': - resolution: {integrity: sha512-XZzOmihLIr8AD1b9hL9ccNMzEMWt/dE2u7NyTY9jJG6YNiNthaD5XtUHVF2uCXZ15ng+z2hT3MVuxnUYhq6k1g==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - peerDependencies: - eslint: ^8.57.0 || ^9.0.0 || ^10.0.0 - typescript: '>=4.8.4 <6.0.0' - - '@typescript-eslint/project-service@8.57.0': - resolution: {integrity: sha512-pR+dK0BlxCLxtWfaKQWtYr7MhKmzqZxuii+ZjuFlZlIGRZm22HnXFqa2eY+90MUz8/i80YJmzFGDUsi8dMOV5w==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - peerDependencies: - typescript: '>=4.8.4 <6.0.0' - - '@typescript-eslint/scope-manager@8.57.0': - resolution: {integrity: sha512-nvExQqAHF01lUM66MskSaZulpPL5pgy5hI5RfrxviLgzZVffB5yYzw27uK/ft8QnKXI2X0LBrHJFr1TaZtAibw==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - - '@typescript-eslint/tsconfig-utils@8.57.0': - resolution: {integrity: sha512-LtXRihc5ytjJIQEH+xqjB0+YgsV4/tW35XKX3GTZHpWtcC8SPkT/d4tqdf1cKtesryHm2bgp6l555NYcT2NLvA==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - peerDependencies: - typescript: '>=4.8.4 <6.0.0' - - '@typescript-eslint/type-utils@8.57.0': - resolution: {integrity: sha512-yjgh7gmDcJ1+TcEg8x3uWQmn8ifvSupnPfjP21twPKrDP/pTHlEQgmKcitzF/rzPSmv7QjJ90vRpN4U+zoUjwQ==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - peerDependencies: - eslint: ^8.57.0 || ^9.0.0 || ^10.0.0 - typescript: '>=4.8.4 <6.0.0' - - '@typescript-eslint/types@8.57.0': - resolution: {integrity: sha512-dTLI8PEXhjUC7B9Kre+u0XznO696BhXcTlOn0/6kf1fHaQW8+VjJAVHJ3eTI14ZapTxdkOmc80HblPQLaEeJdg==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - - '@typescript-eslint/typescript-estree@8.57.0': - resolution: {integrity: sha512-m7faHcyVg0BT3VdYTlX8GdJEM7COexXxS6KqGopxdtkQRvBanK377QDHr4W/vIPAR+ah9+B/RclSW5ldVniO1Q==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - peerDependencies: - typescript: '>=4.8.4 <6.0.0' - - '@typescript-eslint/utils@8.57.0': - resolution: {integrity: sha512-5iIHvpD3CZe06riAsbNxxreP+MuYgVUsV0n4bwLH//VJmgtt54sQeY2GszntJ4BjYCpMzrfVh2SBnUQTtys2lQ==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - peerDependencies: - eslint: ^8.57.0 || ^9.0.0 || ^10.0.0 - typescript: '>=4.8.4 <6.0.0' - - '@typescript-eslint/visitor-keys@8.57.0': - resolution: {integrity: sha512-zm6xx8UT/Xy2oSr2ZXD0pZo7Jx2XsCoID2IUh9YSTFRu7z+WdwYTRk6LhUftm1crwqbuoF6I8zAFeCMw0YjwDg==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - - '@unrs/resolver-binding-android-arm-eabi@1.11.1': - resolution: {integrity: sha512-ppLRUgHVaGRWUx0R0Ut06Mjo9gBaBkg3v/8AxusGLhsIotbBLuRk51rAzqLC8gq6NyyAojEXglNjzf6R948DNw==} - cpu: [arm] - os: [android] - - '@unrs/resolver-binding-android-arm64@1.11.1': - resolution: {integrity: sha512-lCxkVtb4wp1v+EoN+HjIG9cIIzPkX5OtM03pQYkG+U5O/wL53LC4QbIeazgiKqluGeVEeBlZahHalCaBvU1a2g==} - cpu: [arm64] - os: [android] - - '@unrs/resolver-binding-darwin-arm64@1.11.1': - resolution: {integrity: sha512-gPVA1UjRu1Y/IsB/dQEsp2V1pm44Of6+LWvbLc9SDk1c2KhhDRDBUkQCYVWe6f26uJb3fOK8saWMgtX8IrMk3g==} - cpu: [arm64] - os: [darwin] - - '@unrs/resolver-binding-darwin-x64@1.11.1': - resolution: {integrity: sha512-cFzP7rWKd3lZaCsDze07QX1SC24lO8mPty9vdP+YVa3MGdVgPmFc59317b2ioXtgCMKGiCLxJ4HQs62oz6GfRQ==} - cpu: [x64] - os: [darwin] - - '@unrs/resolver-binding-freebsd-x64@1.11.1': - resolution: {integrity: sha512-fqtGgak3zX4DCB6PFpsH5+Kmt/8CIi4Bry4rb1ho6Av2QHTREM+47y282Uqiu3ZRF5IQioJQ5qWRV6jduA+iGw==} - cpu: [x64] - os: [freebsd] - - '@unrs/resolver-binding-linux-arm-gnueabihf@1.11.1': - resolution: {integrity: sha512-u92mvlcYtp9MRKmP+ZvMmtPN34+/3lMHlyMj7wXJDeXxuM0Vgzz0+PPJNsro1m3IZPYChIkn944wW8TYgGKFHw==} - cpu: [arm] - os: [linux] - - '@unrs/resolver-binding-linux-arm-musleabihf@1.11.1': - resolution: {integrity: sha512-cINaoY2z7LVCrfHkIcmvj7osTOtm6VVT16b5oQdS4beibX2SYBwgYLmqhBjA1t51CarSaBuX5YNsWLjsqfW5Cw==} - cpu: [arm] - os: [linux] - - '@unrs/resolver-binding-linux-arm64-gnu@1.11.1': - resolution: {integrity: sha512-34gw7PjDGB9JgePJEmhEqBhWvCiiWCuXsL9hYphDF7crW7UgI05gyBAi6MF58uGcMOiOqSJ2ybEeCvHcq0BCmQ==} - cpu: [arm64] - os: [linux] - libc: [glibc] - - '@unrs/resolver-binding-linux-arm64-musl@1.11.1': - resolution: {integrity: sha512-RyMIx6Uf53hhOtJDIamSbTskA99sPHS96wxVE/bJtePJJtpdKGXO1wY90oRdXuYOGOTuqjT8ACccMc4K6QmT3w==} - cpu: [arm64] - os: [linux] - libc: [musl] - - '@unrs/resolver-binding-linux-ppc64-gnu@1.11.1': - resolution: {integrity: sha512-D8Vae74A4/a+mZH0FbOkFJL9DSK2R6TFPC9M+jCWYia/q2einCubX10pecpDiTmkJVUH+y8K3BZClycD8nCShA==} - cpu: [ppc64] - os: [linux] - libc: [glibc] - - '@unrs/resolver-binding-linux-riscv64-gnu@1.11.1': - resolution: {integrity: sha512-frxL4OrzOWVVsOc96+V3aqTIQl1O2TjgExV4EKgRY09AJ9leZpEg8Ak9phadbuX0BA4k8U5qtvMSQQGGmaJqcQ==} - cpu: [riscv64] - os: [linux] - libc: [glibc] - - '@unrs/resolver-binding-linux-riscv64-musl@1.11.1': - resolution: {integrity: sha512-mJ5vuDaIZ+l/acv01sHoXfpnyrNKOk/3aDoEdLO/Xtn9HuZlDD6jKxHlkN8ZhWyLJsRBxfv9GYM2utQ1SChKew==} - cpu: [riscv64] - os: [linux] - libc: [musl] - - '@unrs/resolver-binding-linux-s390x-gnu@1.11.1': - resolution: {integrity: sha512-kELo8ebBVtb9sA7rMe1Cph4QHreByhaZ2QEADd9NzIQsYNQpt9UkM9iqr2lhGr5afh885d/cB5QeTXSbZHTYPg==} - cpu: [s390x] - os: [linux] - libc: [glibc] - - '@unrs/resolver-binding-linux-x64-gnu@1.11.1': - resolution: {integrity: sha512-C3ZAHugKgovV5YvAMsxhq0gtXuwESUKc5MhEtjBpLoHPLYM+iuwSj3lflFwK3DPm68660rZ7G8BMcwSro7hD5w==} - cpu: [x64] - os: [linux] - libc: [glibc] - - '@unrs/resolver-binding-linux-x64-musl@1.11.1': - resolution: {integrity: sha512-rV0YSoyhK2nZ4vEswT/QwqzqQXw5I6CjoaYMOX0TqBlWhojUf8P94mvI7nuJTeaCkkds3QE4+zS8Ko+GdXuZtA==} - cpu: [x64] - os: [linux] - libc: [musl] - - '@unrs/resolver-binding-wasm32-wasi@1.11.1': - resolution: {integrity: sha512-5u4RkfxJm+Ng7IWgkzi3qrFOvLvQYnPBmjmZQ8+szTK/b31fQCnleNl1GgEt7nIsZRIf5PLhPwT0WM+q45x/UQ==} - engines: {node: '>=14.0.0'} - cpu: [wasm32] - - '@unrs/resolver-binding-win32-arm64-msvc@1.11.1': - resolution: {integrity: sha512-nRcz5Il4ln0kMhfL8S3hLkxI85BXs3o8EYoattsJNdsX4YUU89iOkVn7g0VHSRxFuVMdM4Q1jEpIId1Ihim/Uw==} - cpu: [arm64] - os: [win32] - - '@unrs/resolver-binding-win32-ia32-msvc@1.11.1': - resolution: {integrity: sha512-DCEI6t5i1NmAZp6pFonpD5m7i6aFrpofcp4LA2i8IIq60Jyo28hamKBxNrZcyOwVOZkgsRp9O2sXWBWP8MnvIQ==} - cpu: [ia32] - os: [win32] - - '@unrs/resolver-binding-win32-x64-msvc@1.11.1': - resolution: {integrity: sha512-lrW200hZdbfRtztbygyaq/6jP6AKE8qQN2KvPcJ+x7wiD038YtnYtZ82IMNJ69GJibV7bwL3y9FgK+5w/pYt6g==} - cpu: [x64] - os: [win32] - '@use-gesture/core@10.3.1': resolution: {integrity: sha512-WcINiDt8WjqBdUXye25anHiNxPc0VOrlT8F6LLkU6cycrOGUDyY/yyFmsg3k8i5OLvv25llc0QC45GhR/C8llw==} @@ -3077,11 +3079,6 @@ packages: '@vitest/utils@4.1.0': resolution: {integrity: sha512-XfPXT6a8TZY3dcGY8EdwsBulFCIw+BeeX0RZn2x/BtiY/75YGh8FeWGG8QISN/WhaqSrE2OrlDgtF8q5uhOTmw==} - acorn-jsx@5.3.2: - resolution: {integrity: sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==} - peerDependencies: - acorn: ^6.0.0 || ^7.0.0 || ^8.0.0 - acorn@8.16.0: resolution: {integrity: sha512-UVJyE9MttOsBQIDKw1skb9nAwQuR5wuGD3+82K6JgJlm/Y+KI92oNsMNGZCYdDsVtRHSak0pcV5Dno5+4jh9sw==} engines: {node: '>=0.4.0'} @@ -3091,9 +3088,6 @@ packages: resolution: {integrity: sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==} engines: {node: '>= 6.0.0'} - ajv@6.14.0: - resolution: {integrity: sha512-IWrosm/yrn43eiKqkfkHis7QioDleaXQHdDVPKg0FSwwd/DuvyX79TZnFOnYpB7dcsFAMmtFztZuXPDvSePkFw==} - ajv@8.18.0: resolution: {integrity: sha512-PlXPeEWMXMZ7sPYOHqmDyCJzcfNrUr3fGNKtezX14ykXOEIvyK81d+qydx89KY5O71FKMPaQ2vBfBFI5NHR63A==} @@ -3104,10 +3098,6 @@ packages: resolution: {integrity: sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==} engines: {node: '>=8'} - ansi-styles@4.3.0: - resolution: {integrity: sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==} - engines: {node: '>=8'} - ansi-styles@5.2.0: resolution: {integrity: sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==} engines: {node: '>=10'} @@ -3130,30 +3120,6 @@ packages: resolution: {integrity: sha512-LHE+8BuR7RYGDKvnrmcuSq3tDcKv9OFEXQt/HpbZhY7V6h0zlUXutnAD82GiFx9rdieCMjkvtcsPqBwgUl1Iiw==} engines: {node: '>= 0.4'} - array-includes@3.1.9: - resolution: {integrity: sha512-FmeCCAenzH0KH381SPT5FZmiA/TmpndpcaShhfgEN9eCVjnFBqq3l1xrI42y8+PPLI6hypzou4GXw00WHmPBLQ==} - engines: {node: '>= 0.4'} - - array.prototype.findlast@1.2.5: - resolution: {integrity: sha512-CVvd6FHg1Z3POpBLxO6E6zr+rSKEQ9L6rZHAaY7lLfhKsWYUBBOuMs0e9o24oopj6H+geRCX0YJ+TJLBK2eHyQ==} - engines: {node: '>= 0.4'} - - array.prototype.findlastindex@1.2.6: - resolution: {integrity: sha512-F/TKATkzseUExPlfvmwQKGITM3DGTK+vkAsCZoDc5daVygbJBnjEUCbgkAvVFsgfXfX4YIqZ/27G3k3tdXrTxQ==} - engines: {node: '>= 0.4'} - - array.prototype.flat@1.3.3: - resolution: {integrity: sha512-rwG/ja1neyLqCuGZ5YYrznA62D4mZXg0i1cIskIUKSiqF3Cje9/wXAls9B9s1Wa2fomMsIv8czB8jZcPmxCXFg==} - engines: {node: '>= 0.4'} - - array.prototype.flatmap@1.3.3: - resolution: {integrity: sha512-Y7Wt51eKJSyi80hFrJCePGGNo5ktJCslFuboqJsbf57CCPcm5zztluPlc4/aD8sWsKvlwatezpV4U1efk8kpjg==} - engines: {node: '>= 0.4'} - - array.prototype.tosorted@1.1.4: - resolution: {integrity: sha512-p6Fx8B7b7ZhL/gmUsAy0D15WhvDccw3mnGNbZpi3pmeJdxtWsj2jEaI4Y6oo3XiHfzuSgPwKc04MYt6KgvC/wA==} - engines: {node: '>= 0.4'} - arraybuffer.prototype.slice@1.0.4: resolution: {integrity: sha512-BNoCY6SXXPQ7gF2opIP4GBE+Xw7U+pHMYKuzjgCN3GwiaIR09UUeKfheyIry77QtrCBlC0KK0q5/TER/tYh3PQ==} engines: {node: '>= 0.4'} @@ -3162,9 +3128,6 @@ packages: resolution: {integrity: sha512-Izi8RQcffqCeNVgFigKli1ssklIbpHnCYc6AknXGYoB6grJqyeby7jv12JUQgmTAnIDnbck1uxksT4dzN3PWBA==} engines: {node: '>=12'} - ast-types-flow@0.0.8: - resolution: {integrity: sha512-OH/2E5Fg20h2aPrbe+QL8JZQFko0YZaF+j4mnQ7BGhfavO7OpSLa8a0y9sBwomHdSbkhTS8TQNayBfnW5DwbvQ==} - ast-v8-to-istanbul@1.0.0: resolution: {integrity: sha512-1fSfIwuDICFA4LKkCzRPO7F0hzFf0B7+Xqrl27ynQaa+Rh0e1Es0v6kWHPott3lU10AyAr7oKHa65OppjLn3Rg==} @@ -3187,14 +3150,6 @@ packages: resolution: {integrity: sha512-zJAaP9zxTcvTHRlejau3ZOY4V7SRpiByf3/dxx2uyKxxor19tpmpV2QRsTKikckwhaPmr2dVpxxMr7jOCYVp5g==} engines: {node: '>=6.0.0'} - axe-core@4.11.1: - resolution: {integrity: sha512-BASOg+YwO2C+346x3LZOeoovTIoTrRqEsqMa6fmfAV0P+U9mFr9NsyOEpiYvFjbc64NMrSswhV50WdXzdb/Z5A==} - engines: {node: '>=4'} - - axobject-query@4.1.0: - resolution: {integrity: sha512-qIj0G9wZbMGNLjLmg1PT6v2mE9AH2zlnADJD/2tC6E00hgmhUOfEB6greHPAfLRSufHqROIUTkw6E+M3lH0PTQ==} - engines: {node: '>= 0.4'} - babel-plugin-polyfill-corejs2@0.4.17: resolution: {integrity: sha512-aTyf30K/rqAsNwN76zYrdtx8obu0E4KoUME29B1xj+B3WxgvWkp943vYQ+z8Mv3lw9xHXMHpvSPOBxzAkIa94w==} peerDependencies: @@ -3300,10 +3255,6 @@ packages: resolution: {integrity: sha512-NUPRluOfOiTKBKvWPtSD4PhFvWCqOi0BGStNWs57X9js7XGTprSmFoz5F0tWhR4WPjNeR9jXqdC7/UpSJTnlRg==} engines: {node: '>=18'} - chalk@4.1.2: - resolution: {integrity: sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==} - engines: {node: '>=10'} - chokidar@3.6.0: resolution: {integrity: sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==} engines: {node: '>= 8.10.0'} @@ -3322,20 +3273,9 @@ packages: resolution: {integrity: sha512-eYm0QWBtUrBWZWG0d386OGAw16Z995PiOVo2B7bjWSbHedGl5e0ZWaq65kOGgUSNesEIDkB9ISbTg/JK9dhCZA==} engines: {node: '>=6'} - color-convert@2.0.1: - resolution: {integrity: sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==} - engines: {node: '>=7.0.0'} - - color-name@1.1.4: - resolution: {integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==} - commander@2.20.3: resolution: {integrity: sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==} - comment-parser@1.4.5: - resolution: {integrity: sha512-aRDkn3uyIlCFfk5NUA+VdwMmMsh8JGhc4hapfV4yxymHGQ3BVskMQfoXGpCo5IoBuQ9tS5iiVKhCpTcB4pW4qw==} - engines: {node: '>= 12.0.0'} - common-tags@1.8.2: resolution: {integrity: sha512-gk/Z852D2Wtb//0I+kRFNKKE9dIIVirjoqPoA1wJU+XePVXZfGeBpk45+A1rKO4Q43prqWBNY/MiIeRLbPWUaA==} engines: {node: '>=4.0.0'} @@ -3346,9 +3286,6 @@ packages: confbox@0.1.8: resolution: {integrity: sha512-RMtmw0iFkeR4YV+fUOSucriAQNb9g8zFR52MWCtl+cCZOFRNL6zeB395vPzFhEjjn4fMxXudmELnl/KF/WrK6w==} - confusing-browser-globals@1.0.11: - resolution: {integrity: sha512-JsPKdmh8ZkmnHxDk55FZ1TqVLvEQTvoByJZRN9jzI0UjxK/QgAmsphz7PGtqgPieQZ/CQcHWXCR7ATDNhGe+YA==} - content-type@1.0.5: resolution: {integrity: sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==} engines: {node: '>= 0.6'} @@ -3402,9 +3339,6 @@ packages: csstype@3.2.3: resolution: {integrity: sha512-z1HGKcYy2xA8AGQfwrn0PAy+PB7X/GSj3UVJW9qKyn43xWa+gl5nXmU4qqLMRzWVLFC8KusUX8T/0kCiOYpAIQ==} - damerau-levenshtein@1.0.8: - resolution: {integrity: sha512-sdQSFB7+llfUcQHUQO3+B8ERRj0Oa4w9POWMI/puGtuf7gFywGmkaLCElnudfTiKZV+NvHqL0ifzdrI8Ro7ESA==} - data-urls@7.0.0: resolution: {integrity: sha512-23XHcCF+coGYevirZceTVD7NdJOqVn+49IHyxgszm+JIiHLoB2TkmPtsYkNWT1pvRSGkc35L6NHs0yHkN2SumA==} engines: {node: ^20.19.0 || ^22.12.0 || >=24.0.0} @@ -3424,14 +3358,6 @@ packages: dayjs@1.11.19: resolution: {integrity: sha512-t5EcLVS6QPBNqM2z8fakk/NKel+Xzshgt8FFKAn+qwlD1pzZWxh0nVCrvFK7ZDb6XucZeF9z8C7CBWTRIVApAw==} - debug@3.2.7: - resolution: {integrity: sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==} - peerDependencies: - supports-color: '*' - peerDependenciesMeta: - supports-color: - optional: true - debug@4.4.3: resolution: {integrity: sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==} engines: {node: '>=6.0'} @@ -3452,9 +3378,6 @@ packages: babel-plugin-macros: optional: true - deep-is@0.1.4: - resolution: {integrity: sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==} - deep-object-diff@1.1.9: resolution: {integrity: sha512-Rn+RuwkmkDwCi2/oXOFS9Gsr5lJZu/yTGpK7wAaAIE75CC+LCGEZHpY6VQJa/RoJcrmaA/docWJZvYohlNkWPA==} @@ -3482,10 +3405,6 @@ packages: resolution: {integrity: sha512-GYqKi1aH7PJXxdhTeZBFrg8vUBeKXi+cNprXsC1kpJcbcVnV9wBsrOu1cQEdG0WeQwlfHiy3XvnKfIrJ2R0NzQ==} hasBin: true - doctrine@2.1.0: - resolution: {integrity: sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==} - engines: {node: '>=0.10.0'} - dom-accessibility-api@0.5.16: resolution: {integrity: sha512-X7BJ2yElsnOJ30pZF4uIIDfBEVgF4XEBxL9Bxhy6dnrm5hkzqmsWHGTiHqRiITNhMyFLyAiWndIJP7Z1NTteDg==} @@ -3527,9 +3446,6 @@ packages: electron-to-chromium@1.5.307: resolution: {integrity: sha512-5z3uFKBWjiNR44nFcYdkcXjKMbg5KXNdciu7mhTPo9tB7NbqSNP2sSnGR+fqknZSCwKkBN+oxiiajWs4dT6ORg==} - emoji-regex@9.2.2: - resolution: {integrity: sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==} - emojibase-data@15.3.2: resolution: {integrity: sha512-TpDyTDDTdqWIJixV5sTA6OQ0P0JfIIeK2tFRR3q56G9LK65ylAZ7z3KyBXokpvTTJ+mLUXQXbLNyVkjvnTLE+A==} peerDependencies: @@ -3538,10 +3454,6 @@ packages: emojibase@15.3.1: resolution: {integrity: sha512-GNsjHnG2J3Ktg684Fs/vZR/6XpOSkZPMAv85EHrr6br2RN2cJNwdS4am/3YSK3y+/gOv2kmoK3GGdahXdMxg2g==} - enhanced-resolve@5.20.0: - resolution: {integrity: sha512-/ce7+jQ1PQ6rVXwe+jKEg5hW5ciicHwIQUagZkp6IufBoY3YDgdTTY1azVs0qoRgVmvsNB+rbjLJxDAeHHtwsQ==} - engines: {node: '>=10.13.0'} - entities@4.5.0: resolution: {integrity: sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==} engines: {node: '>=0.12'} @@ -3572,10 +3484,6 @@ packages: resolution: {integrity: sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==} engines: {node: '>= 0.4'} - es-iterator-helpers@1.2.2: - resolution: {integrity: sha512-BrUQ0cPTB/IwXj23HtwHjS9n7O4h9FX94b4xc5zlTHxeLgTAdzYUDyy6KdExAl9lbN5rtfe44xpjpmj9grxs5w==} - engines: {node: '>= 0.4'} - es-module-lexer@1.7.0: resolution: {integrity: sha512-jEQoCwk8hyb2AZziIOLhDqpm5+2ww5uIE6lkO/6jcOCusfk6LhMHpXXfBLXTZ7Ydyt0j4VoUQv6uGNYbdW+kBA==} @@ -3590,10 +3498,6 @@ packages: resolution: {integrity: sha512-j6vWzfrGVfyXxge+O0x5sh6cvxAog0a/4Rdd2K36zCMV5eJ+/+tOAngRO8cODMNWbVRdVlmGZQL2YS3yR8bIUA==} engines: {node: '>= 0.4'} - es-shim-unscopables@1.1.0: - resolution: {integrity: sha512-d9T8ucsEhh8Bi1woXCf+TIKDIROLG5WCkxg8geBCbvk22kzwC5G2OnXVMO6FUsvQlgUUXQ2itephWDLqDzbeCw==} - engines: {node: '>= 0.4'} - es-to-primitive@1.3.0: resolution: {integrity: sha512-w+5mJ3GuFL+NjVtJlvydShqE1eN3h3PbI7/5LAsYJP/2qtuMXjfL2LpHSRqo4b4eSF5K/DH1JXKUAHSB2UW50g==} engines: {node: '>= 0.4'} @@ -3607,183 +3511,6 @@ packages: resolution: {integrity: sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==} engines: {node: '>=6'} - escape-string-regexp@4.0.0: - resolution: {integrity: sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==} - engines: {node: '>=10'} - - eslint-compat-utils@0.5.1: - resolution: {integrity: sha512-3z3vFexKIEnjHE3zCMRo6fn/e44U7T1khUjg+Hp0ZQMCigh28rALD0nPFBcGZuiLC5rLZa2ubQHDRln09JfU2Q==} - engines: {node: '>=12'} - peerDependencies: - eslint: '>=6.0.0' - - eslint-config-airbnb-extended@3.0.1: - resolution: {integrity: sha512-JUVAh/tqLx99AFPmjXl5nalD6wrv6AD2muilieUJZG/uCjc89O93upoIcdB9221fTrcBdZAQ6f1jbyda1vcJ+Q==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - peerDependencies: - eslint: ^9.0.0 - - eslint-config-prettier@10.1.8: - resolution: {integrity: sha512-82GZUjRS0p/jganf6q1rEO25VSoHH0hKPCTrgillPjdI/3bgBhAE1QzHrHTizjpRvy6pGAvKjDJtk2pF9NDq8w==} - hasBin: true - peerDependencies: - eslint: '>=7.0.0' - - eslint-import-context@0.1.9: - resolution: {integrity: sha512-K9Hb+yRaGAGUbwjhFNHvSmmkZs9+zbuoe3kFQ4V1wYjrepUFYM2dZAfNtjbbj3qsPfUfsA68Bx/ICWQMi+C8Eg==} - engines: {node: ^12.20.0 || ^14.18.0 || >=16.0.0} - peerDependencies: - unrs-resolver: ^1.0.0 - peerDependenciesMeta: - unrs-resolver: - optional: true - - eslint-import-resolver-node@0.3.9: - resolution: {integrity: sha512-WFj2isz22JahUv+B788TlO3N6zL3nNJGU8CcZbPZvVEkBPaJdCV4vy5wyghty5ROFbCRnm132v8BScu5/1BQ8g==} - - eslint-import-resolver-typescript@4.4.4: - resolution: {integrity: sha512-1iM2zeBvrYmUNTj2vSC/90JTHDth+dfOfiNKkxApWRsTJYNrc8rOdxxIf5vazX+BiAXTeOT0UvWpGI/7qIWQOw==} - engines: {node: ^16.17.0 || >=18.6.0} - peerDependencies: - eslint: '*' - eslint-plugin-import: '*' - eslint-plugin-import-x: '*' - peerDependenciesMeta: - eslint-plugin-import: - optional: true - eslint-plugin-import-x: - optional: true - - eslint-module-utils@2.12.1: - resolution: {integrity: sha512-L8jSWTze7K2mTg0vos/RuLRS5soomksDPoJLXIslC7c8Wmut3bx7CPpJijDcBZtxQ5lrbUdM+s0OlNbz0DCDNw==} - engines: {node: '>=4'} - peerDependencies: - '@typescript-eslint/parser': '*' - eslint: '*' - eslint-import-resolver-node: '*' - eslint-import-resolver-typescript: '*' - eslint-import-resolver-webpack: '*' - peerDependenciesMeta: - '@typescript-eslint/parser': - optional: true - eslint: - optional: true - eslint-import-resolver-node: - optional: true - eslint-import-resolver-typescript: - optional: true - eslint-import-resolver-webpack: - optional: true - - eslint-plugin-es-x@7.8.0: - resolution: {integrity: sha512-7Ds8+wAAoV3T+LAKeu39Y5BzXCrGKrcISfgKEqTS4BDN8SFEDQd0S43jiQ8vIa3wUKD07qitZdfzlenSi8/0qQ==} - engines: {node: ^14.18.0 || >=16.0.0} - peerDependencies: - eslint: '>=8' - - eslint-plugin-import-x@4.16.1: - resolution: {integrity: sha512-vPZZsiOKaBAIATpFE2uMI4w5IRwdv/FpQ+qZZMR4E+PeOcM4OeoEbqxRMnywdxP19TyB/3h6QBB0EWon7letSQ==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - peerDependencies: - '@typescript-eslint/utils': ^8.0.0 - eslint: ^8.57.0 || ^9.0.0 - eslint-import-resolver-node: '*' - peerDependenciesMeta: - '@typescript-eslint/utils': - optional: true - eslint-import-resolver-node: - optional: true - - eslint-plugin-import@2.32.0: - resolution: {integrity: sha512-whOE1HFo/qJDyX4SnXzP4N6zOWn79WhnCUY/iDR0mPfQZO8wcYE4JClzI2oZrhBnnMUCBCHZhO6VQyoBU95mZA==} - engines: {node: '>=4'} - peerDependencies: - '@typescript-eslint/parser': '*' - eslint: ^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0 || ^8 || ^9 - peerDependenciesMeta: - '@typescript-eslint/parser': - optional: true - - eslint-plugin-jsx-a11y@6.10.2: - resolution: {integrity: sha512-scB3nz4WmG75pV8+3eRUQOHZlNSUhFNq37xnpgRkCCELU3XMvXAxLk1eqWWyE22Ki4Q01Fnsw9BA3cJHDPgn2Q==} - engines: {node: '>=4.0'} - peerDependencies: - eslint: ^3 || ^4 || ^5 || ^6 || ^7 || ^8 || ^9 - - eslint-plugin-n@17.24.0: - resolution: {integrity: sha512-/gC7/KAYmfNnPNOb3eu8vw+TdVnV0zhdQwexsw6FLXbhzroVj20vRn2qL8lDWDGnAQ2J8DhdfvXxX9EoxvERvw==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - peerDependencies: - eslint: '>=8.23.0' - - eslint-plugin-prettier@5.5.5: - resolution: {integrity: sha512-hscXkbqUZ2sPithAuLm5MXL+Wph+U7wHngPBv9OMWwlP8iaflyxpjTYZkmdgB4/vPIhemRlBEoLrH7UC1n7aUw==} - engines: {node: ^14.18.0 || >=16.0.0} - peerDependencies: - '@types/eslint': '>=8.0.0' - eslint: '>=8.0.0' - eslint-config-prettier: '>= 7.0.0 <10.0.0 || >=10.1.0' - prettier: '>=3.0.0' - peerDependenciesMeta: - '@types/eslint': - optional: true - eslint-config-prettier: - optional: true - - eslint-plugin-react-hooks@7.0.1: - resolution: {integrity: sha512-O0d0m04evaNzEPoSW+59Mezf8Qt0InfgGIBJnpC0h3NH/WjUAR7BIKUfysC6todmtiZ/A0oUVS8Gce0WhBrHsA==} - engines: {node: '>=18'} - peerDependencies: - eslint: ^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0-0 || ^9.0.0 - - eslint-plugin-react@7.37.5: - resolution: {integrity: sha512-Qteup0SqU15kdocexFNAJMvCJEfa2xUKNV4CC1xsVMrIIqEy3SQ/rqyxCWNzfrd3/ldy6HMlD2e0JDVpDg2qIA==} - engines: {node: '>=4'} - peerDependencies: - eslint: ^3 || ^4 || ^5 || ^6 || ^7 || ^8 || ^9.7 - - eslint-scope@8.4.0: - resolution: {integrity: sha512-sNXOfKCn74rt8RICKMvJS7XKV/Xk9kA7DyJr8mJik3S7Cwgy3qlkkmyS2uQB3jiJg6VNdZd/pDBJu0nvG2NlTg==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - - eslint-visitor-keys@3.4.3: - resolution: {integrity: sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - - eslint-visitor-keys@4.2.1: - resolution: {integrity: sha512-Uhdk5sfqcee/9H/rCOJikYz67o0a2Tw2hGRPOG2Y1R2dg7brRe1uG0yaNQDHu+TO/uQPF/5eCapvYSmHUjt7JQ==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - - eslint-visitor-keys@5.0.1: - resolution: {integrity: sha512-tD40eHxA35h0PEIZNeIjkHoDR4YjjJp34biM0mDvplBe//mB+IHCqHDGV7pxF+7MklTvighcCPPZC7ynWyjdTA==} - engines: {node: ^20.19.0 || ^22.13.0 || >=24} - - eslint@9.39.3: - resolution: {integrity: sha512-VmQ+sifHUbI/IcSopBCF/HO3YiHQx/AVd3UVyYL6weuwW+HvON9VYn5l6Zl1WZzPWXPNZrSQpxwkkZ/VuvJZzg==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - hasBin: true - peerDependencies: - jiti: '*' - peerDependenciesMeta: - jiti: - optional: true - - espree@10.4.0: - resolution: {integrity: sha512-j6PAQ2uUr79PZhBjP5C5fhl8e39FmRnOjsD5lGnWrFU8i2G776tBK7+nP8KuQUTTyAZUwfQqXAgrVH5MbH9CYQ==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - - esquery@1.7.0: - resolution: {integrity: sha512-Ap6G0WQwcU/LHsvLwON1fAQX9Zp0A2Y6Y/cJBl9r/JbW90Zyg4/zbG6zzKa2OTALELarYHmKu0GhpM5EO+7T0g==} - engines: {node: '>=0.10'} - - esrecurse@4.3.0: - resolution: {integrity: sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==} - engines: {node: '>=4.0'} - - estraverse@5.3.0: - resolution: {integrity: sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==} - engines: {node: '>=4.0'} - estree-walker@1.0.1: resolution: {integrity: sha512-1fMXF3YP4pZZVozF8j/ZLfvnR8NSIljt56UhbZ5PeeDmmGHpgpdwQt7ITlGvYaQukCvuBRMLEiKiYC+oeIg4cg==} @@ -3815,13 +3542,6 @@ packages: fast-deep-equal@3.1.3: resolution: {integrity: sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==} - fast-diff@1.3.0: - resolution: {integrity: sha512-VxPP4NqbUjj6MaAOafWeUn2cXWLcCtljklUtZf0Ind4XQ+QPtmA0b18zZy0jIQx+ExRVCR/ZQpBmik5lXshNsw==} - - fast-glob@3.3.1: - resolution: {integrity: sha512-kNFPyjhh5cKjrUltxs+wFx+ZkbRaxxmZ+X0ZU31SOsxCEtP9VPgtq2teZw1DebupL5GmDaNQ6yKMMVcM41iqDg==} - engines: {node: '>=8.6.0'} - fast-glob@3.3.3: resolution: {integrity: sha512-7MptL8U0cqcFdzIzwOTHoilX9x5BrNqye7Z/LuC7kCMRio1EMSyqRK3BEAUD7sXRq4iT4AzTVuZdhgQ2TCvYLg==} engines: {node: '>=8.6.0'} @@ -3829,9 +3549,6 @@ packages: fast-json-stable-stringify@2.1.0: resolution: {integrity: sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==} - fast-levenshtein@2.0.6: - resolution: {integrity: sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==} - fast-uri@3.1.0: resolution: {integrity: sha512-iPeeDKJSWf4IEOasVVrknXpaBV0IApz/gp7S2bb7Z4Lljbl2MGJRqInZiUrQwV16cpzw/D3S5j5Julj/gT52AA==} @@ -3853,10 +3570,6 @@ packages: fflate@0.8.2: resolution: {integrity: sha512-cPJU47OaAoCbg0pBvzsgpTPhmhqI5eJjh/JIu8tPj5q+T7iLvW/JAYUqmE7KOB4R1ZyEhzBaIQpQpardBF5z8A==} - file-entry-cache@8.0.0: - resolution: {integrity: sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ==} - engines: {node: '>=16.0.0'} - file-saver@2.0.5: resolution: {integrity: sha512-P9bmyZ3h/PRG+Nzga+rbdI4OEpNDzAVyy74uVO9ATgzLK6VtAsYybF/+TOCvrc0MO793d6+42lLyZTw7/ArVzA==} @@ -3871,10 +3584,6 @@ packages: resolution: {integrity: sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==} engines: {node: '>=10'} - flat-cache@4.0.1: - resolution: {integrity: sha512-f7ccFPK3SXFHpx15UIGyRJ/FJQctuKZ0zVuN3frBo4HnK3cay9VEW0R6yPYFHC0AgqhukPzKjq22t5DmAyqGyw==} - engines: {node: '>=16'} - flatted@3.4.2: resolution: {integrity: sha512-PjDse7RzhcPkIJwy5t7KPWQSZ9cAbzQXcafsetQoD7sOJRQlGikNbx7yZp2OotDnJyrDcbyRq3Ttb18iYOqkxA==} @@ -3966,17 +3675,10 @@ packages: resolution: {integrity: sha512-w9UMqWwJxHNOvoNzSJ2oPF5wvYcvP7jUvYzhp67yEhTi17ZDBBC1z9pTdGuzjD+EFIqLSYRweZjqfiPzQ06Ebg==} engines: {node: '>= 0.4'} - get-tsconfig@4.13.6: - resolution: {integrity: sha512-shZT/QMiSHc/YBLxxOkMtgSid5HFoauqCE3/exfsEcwg1WkeqjG+V40yBbBrsD+jW2HDXcs28xOfcbm2jI8Ddw==} - glob-parent@5.1.2: resolution: {integrity: sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==} engines: {node: '>= 6'} - glob-parent@6.0.2: - resolution: {integrity: sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==} - engines: {node: '>=10.13.0'} - glob@11.1.0: resolution: {integrity: sha512-vuNwKSaKiqm7g0THUBu2x7ckSs3XJLXE+2ssL7/MfTGPLLcrJQ/4Uq1CjPTtO5cCIiRxqvN6Twy1qOwhL0Xjcw==} engines: {node: 20 || >=22} @@ -3987,25 +3689,10 @@ packages: resolution: {integrity: sha512-Wjlyrolmm8uDpm/ogGyXZXb1Z+Ca2B8NbJwqBVg0axK9GbBeoS7yGV6vjXnYdGm6X53iehEuxxbyiKp8QmN4Vw==} engines: {node: 18 || 20 || >=22} - globals@14.0.0: - resolution: {integrity: sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==} - engines: {node: '>=18'} - - globals@15.15.0: - resolution: {integrity: sha512-7ACyT3wmyp3I61S4fG682L0VA2RGD9otkqGJIwNUMF1SWUombIIk+af1unuDYgMm082aHYwD+mzJvv9Iu8dsgg==} - engines: {node: '>=18'} - - globals@17.3.0: - resolution: {integrity: sha512-yMqGUQVVCkD4tqjOJf3TnrvaaHDMYp4VlUSObbkIiuCPe/ofdMBFIAcBbCSRFWOnos6qRiTVStDwqPLUclaxIw==} - engines: {node: '>=18'} - globalthis@1.0.4: resolution: {integrity: sha512-DpLKbNU4WylpxJykQujfCcwYWiV/Jhm50Goo0wrVILAv5jOr9d+H+UR3PhSCD2rCCEIg0uc+G+muBTwD54JhDQ==} engines: {node: '>= 0.4'} - globrex@0.1.2: - resolution: {integrity: sha512-uHJgbwAMwNFf5mLst7IWLNg14x1CkeqglJb/K3doi4dw6q2IvAAmM/Y81kevy83wP+Sst+nutFTYOGg3d1lsxg==} - gopd@1.2.0: resolution: {integrity: sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==} engines: {node: '>= 0.4'} @@ -4040,12 +3727,6 @@ packages: resolution: {integrity: sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==} engines: {node: '>= 0.4'} - hermes-estree@0.25.1: - resolution: {integrity: sha512-0wUoCcLp+5Ev5pDW2OriHC2MJCbwLwuRx+gAqMTOkGKJJiBCLjtrvy4PWUGn6MIVefecRpzoOZ/UV6iGdOr+Cw==} - - hermes-parser@0.25.1: - resolution: {integrity: sha512-6pEjquH3rqaI6cYAXYPcz9MS4rY6R4ngRgrgfDshRptUZIc3lw0MCIJIGDj9++mfySOuPTHB4nrSW99BCvOPIA==} - hoist-non-react-statics@3.3.2: resolution: {integrity: sha512-/gGivxi8JPKWNm/W0jSmzcMPpfpPLc3dY/6GxhX2hQ9iGj3aDfklV4ET7NjKpSinLpJ5vafa9iiGIEZg10SfBw==} @@ -4100,14 +3781,6 @@ packages: ieee754@1.2.1: resolution: {integrity: sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==} - ignore@5.3.2: - resolution: {integrity: sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==} - engines: {node: '>= 4'} - - ignore@7.0.5: - resolution: {integrity: sha512-Hs59xBNfUIunMFgWAbGX5cq6893IbWg4KnrjbYwX3tx0ztorVgTDA6B2sxf8ejHJ4wz8BqGUMYlnzNBer5NvGg==} - engines: {node: '>= 4'} - immer@9.0.21: resolution: {integrity: sha512-bc4NBHqOqSfRW7POMkHd51LvClaeMXpm8dx0e8oE2GORbq5aRK7Bxl4FyzVLdGtLmvLKL7BTDBG5ACQm4HWjTA==} @@ -4115,10 +3788,6 @@ packages: resolution: {integrity: sha512-TR3KfrTZTYLPB6jUjfx6MF9WcWrHL9su5TObK4ZkYgBdWKPOFoSoQIdEuTuR82pmtxH2spWG9h6etwfr1pLBqQ==} engines: {node: '>=6'} - imurmurhash@0.1.4: - resolution: {integrity: sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==} - engines: {node: '>=0.8.19'} - indent-string@4.0.0: resolution: {integrity: sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==} engines: {node: '>=8'} @@ -4156,9 +3825,6 @@ packages: resolution: {integrity: sha512-wa56o2/ElJMYqjCjGkXri7it5FbebW5usLw/nPmCMs5DeZ7eziSYZhSmPRn0txqeW4LnAmQQU7FgqLpsEFKM4A==} engines: {node: '>= 0.4'} - is-bun-module@2.0.0: - resolution: {integrity: sha512-gNCGbnnnnFAUGKeZ9PdbyeGYJqewpmc2aKHUEMO5nQPWU9lOmv7jcmQIv+qHD8fXW6W7qfuCwX4rY9LNRjXrkQ==} - is-callable@1.2.7: resolution: {integrity: sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==} engines: {node: '>= 0.4'} @@ -4290,10 +3956,6 @@ packages: resolution: {integrity: sha512-HGYWWS/ehqTV3xN10i23tkPkpH46MLCIMFNCaaKNavAXTF1RkqxawEPtnjnGZ6XKSInBKkiOA5BKS+aZiY3AvA==} engines: {node: '>=8'} - iterator.prototype@1.1.5: - resolution: {integrity: sha512-H0dkQoCa3b2VEeKQBOxFph+JAbcrQdE7KC0UkqwpLmv2EC4P41QXP+rqo9wYodACiG5/WM5s9oDApTU8utwj9g==} - engines: {node: '>= 0.4'} - jackspeak@4.2.3: resolution: {integrity: sha512-ykkVRwrYvFm1nb2AJfKKYPr0emF6IiXDYUaFx4Zn9ZuIH7MrzEZ3sD5RlqGXNRpHtvUHJyOnCEFxOlNDtGo7wg==} engines: {node: 20 || >=22} @@ -4352,28 +4014,15 @@ packages: engines: {node: '>=6'} hasBin: true - json-buffer@3.0.1: - resolution: {integrity: sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==} - json-parse-even-better-errors@2.3.1: resolution: {integrity: sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==} - json-schema-traverse@0.4.1: - resolution: {integrity: sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==} - json-schema-traverse@1.0.0: resolution: {integrity: sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==} json-schema@0.4.0: resolution: {integrity: sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA==} - json-stable-stringify-without-jsonify@1.0.1: - resolution: {integrity: sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==} - - json5@1.0.2: - resolution: {integrity: sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA==} - hasBin: true - json5@2.2.3: resolution: {integrity: sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==} engines: {node: '>=6'} @@ -4386,17 +4035,10 @@ packages: resolution: {integrity: sha512-p/nXbhSEcu3pZRdkW1OfJhpsVtW1gd4Wa1fnQc9YLiTfAjn0312eMKimbdIQzuZl9aa9xUGaRlP9T/CJE/ditQ==} engines: {node: '>=0.10.0'} - jsx-ast-utils@3.3.5: - resolution: {integrity: sha512-ZZow9HBI5O6EPgSJLUb8n2NKgmVWTwCvHGwFuJlMjvLFqlGG6pjirPhtdsseaLZjSibD8eegzmYpUZwoIlj2cQ==} - engines: {node: '>=4.0'} - jwt-decode@4.0.0: resolution: {integrity: sha512-+KJGIyHgkGuIq3IEBNftfhW/LfWhXUIY6OmyVWjliu5KH1y0fw7VQ8YndE2O4qZdMSd9SqbnC8GOcZEy0Om7sA==} engines: {node: '>=18'} - keyv@4.5.4: - resolution: {integrity: sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==} - kleur@4.1.5: resolution: {integrity: sha512-o+NO+8WrRiQEE4/7nwRJhN1HWpVmJm511pBHUxPLtp0BUISzlBplORYSmTclCnJvQq2tKu/sgl3xVpkc7ZWuQQ==} engines: {node: '>=6'} @@ -4409,21 +4051,10 @@ packages: '@types/node': '>=18' typescript: '>=5.0.4 <7' - language-subtag-registry@0.3.23: - resolution: {integrity: sha512-0K65Lea881pHotoGEa5gDlMxt3pctLi2RplBb7Ezh4rRdLEOtgi7n4EwK9lamnUCkKBqaeKRVebTq6BAxSkpXQ==} - - language-tags@1.0.9: - resolution: {integrity: sha512-MbjN408fEndfiQXbFQ1vnd+1NoLDsnQW41410oQBXiyXDMYH5z505juWa4KUE1LqxRC7DgOgZDbKLxHIwm27hA==} - engines: {node: '>=0.10'} - leven@3.1.0: resolution: {integrity: sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A==} engines: {node: '>=6'} - levn@0.4.1: - resolution: {integrity: sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==} - engines: {node: '>= 0.8.0'} - lines-and-columns@1.2.4: resolution: {integrity: sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==} @@ -4443,9 +4074,6 @@ packages: lodash.debounce@4.0.8: resolution: {integrity: sha512-FT1yDzDYEoYWhnSGnpE/4Kj1fLZkDFyqRb7fNt6FdYOSxlUWAtp42Eh6Wb0rGIv/m9Bgo7x4GhQbm5Ys4SG5ow==} - lodash.merge@4.6.2: - resolution: {integrity: sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==} - lodash.sortby@4.7.0: resolution: {integrity: sha512-HDWXG8isMntAyRF5vZ7xKuEvOhT4AhlRt/3czTSjvGUxjYCBVRQY48ViDHyfYz9VIoBkW4TMGQNapx+l3RUwdA==} @@ -4566,21 +4194,9 @@ packages: engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} hasBin: true - napi-postinstall@0.3.4: - resolution: {integrity: sha512-PHI5f1O0EP5xJ9gQmFGMS6IZcrVvTjpXjz7Na41gTE7eE2hK11lg04CECCYEEjdc17EV4DO+fkGEtt7TpTaTiQ==} - engines: {node: ^12.20.0 || ^14.18.0 || >=16.0.0} - hasBin: true - - natural-compare@1.4.0: - resolution: {integrity: sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==} - no-case@3.0.4: resolution: {integrity: sha512-fgAN3jGAh+RoxUGZHTSOLJIqUc2wmoBwGR4tbpNAKmmovFoWq0OdRkb0VkldReO2a2iBT/OEulG9XSUc10r3zg==} - node-exports-info@1.6.0: - resolution: {integrity: sha512-pyFS63ptit/P5WqUkt+UUfe+4oevH+bFeIiPPdfb0pFeYEu/1ELnJu5l+5EcTKYL5M7zaAa7S8ddywgXypqKCw==} - engines: {node: '>= 0.4'} - node-fetch@2.7.0: resolution: {integrity: sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==} engines: {node: 4.x || >=6.0.0} @@ -4616,22 +4232,6 @@ packages: resolution: {integrity: sha512-nK28WOo+QIjBkDduTINE4JkF/UJJKyf2EJxvJKfblDpyg0Q+pkOHNTL0Qwy6NP6FhE/EnzV73BxxqcJaXY9anw==} engines: {node: '>= 0.4'} - object.entries@1.1.9: - resolution: {integrity: sha512-8u/hfXFRBD1O0hPUjioLhoWFHRmt6tKA4/vZPyckBr18l1KE9uHrFaFaUi8MDRTpi4uak2goyPTSNJLXX2k2Hw==} - engines: {node: '>= 0.4'} - - object.fromentries@2.0.8: - resolution: {integrity: sha512-k6E21FzySsSK5a21KRADBd/NGneRegFO5pLHfdQLpRDETUNJueLXs3WCzyQ3tFRDYgbq3KHGXfTbi2bs8WQ6rQ==} - engines: {node: '>= 0.4'} - - object.groupby@1.0.3: - resolution: {integrity: sha512-+Lhy3TQTuzXI5hevh8sBGqbmurHbbIjAi0Z4S63nthVLmLxfbj4T54a4CfZrXIrt9iP4mVAPYMo/v99taj3wjQ==} - engines: {node: '>= 0.4'} - - object.values@1.2.1: - resolution: {integrity: sha512-gXah6aZrcUxjWg2zR2MwouP2eHlCBzdV4pygudehaKXSGW4v2AsRQUK+lwwXhii6KFZcunEnmSUoYp5CXibxtA==} - engines: {node: '>= 0.4'} - obug@2.1.1: resolution: {integrity: sha512-uTqF9MuPraAQ+IsnPf366RG4cP9RtUi7MLO1N3KEc+wb0a6yKpeL0lmk2IB1jY5KHPAlTc6T/JRdC/YqxHNwkQ==} @@ -4639,10 +4239,6 @@ packages: resolution: {integrity: sha512-jNdst/U28Iasukx/L5MP6b274Vr7ftQs6qAhPBCvz6Wt5rPCA+Q/tUmCzfCHHWweWw5szeMy2Gfrm1rITwUKrw==} engines: {node: '>=18'} - optionator@0.9.4: - resolution: {integrity: sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==} - engines: {node: '>= 0.8.0'} - own-keys@1.0.1: resolution: {integrity: sha512-qFOyK5PjiWZd+QQIh+1jhdb9LpxTF0qs7Pm8o5QHYZ0M3vKqSqzsZaEB6oWlxZ+q2sJBMI/Ktgd2N5ZwQoRHfg==} engines: {node: '>= 0.4'} @@ -4650,6 +4246,25 @@ packages: oxc-resolver@11.19.1: resolution: {integrity: sha512-qE/CIg/spwrTBFt5aKmwe3ifeDdLfA2NESN30E42X/lII5ClF8V7Wt6WIJhcGZjp0/Q+nQ+9vgxGk//xZNX2hg==} + oxfmt@0.45.0: + resolution: {integrity: sha512-0o/COoN9fY50bjVeM7PQsNgbhndKurBIeTIcspW033OumksjJJmIVDKjAk5HMwU/GHTxSOdGDdhJ6BRzGPmsHg==} + engines: {node: ^20.19.0 || >=22.12.0} + hasBin: true + + oxlint-tsgolint@0.21.0: + resolution: {integrity: sha512-HiWPhANwRnN1pZJQ2SgNB3WRR+1etLJHmRzQ/MJhyINsEIaOUCjxhlXJKbEaVUwdnyXwRWqo/P9Fx21lz0/mSg==} + hasBin: true + + oxlint@1.60.0: + resolution: {integrity: sha512-tnRzTWiWJ9pg3ftRWnD0+Oqh78L6ZSwcEudvCZaER0PIqiAnNyXj5N1dPwjmNpDalkKS9m/WMLN1CTPUBPmsgw==} + engines: {node: ^20.19.0 || >=22.12.0} + hasBin: true + peerDependencies: + oxlint-tsgolint: '>=0.18.0' + peerDependenciesMeta: + oxlint-tsgolint: + optional: true + p-limit@3.1.0: resolution: {integrity: sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==} engines: {node: '>=10'} @@ -4735,19 +4350,6 @@ packages: resolution: {integrity: sha512-OW/rX8O/jXnm82Ey1k44pObPtdblfiuWnrd8X7GJ7emImCOstunGbXUpp7HdBrFQX6rJzn3sPT397Wp5aCwCHg==} engines: {node: ^10 || ^12 || >=14} - prelude-ls@1.2.1: - resolution: {integrity: sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==} - engines: {node: '>= 0.8.0'} - - prettier-linter-helpers@1.0.1: - resolution: {integrity: sha512-SxToR7P8Y2lWmv/kTzVLC1t/GDI2WGjMwNhLLE9qtH8Q13C+aEmuRlzDst4Up4s0Wc8sF2M+J57iB3cMLqftfg==} - engines: {node: '>=6.0.0'} - - prettier@3.8.1: - resolution: {integrity: sha512-UOnG6LftzbdaHZcKoPFtOcCKztrQ57WkHDeRD9t/PTQtmT0NHSeWWepj6pS0z/N7+08BHFDQVUrfmfMRcZwbMg==} - engines: {node: '>=14'} - hasBin: true - pretty-bytes@5.6.0: resolution: {integrity: sha512-FFw039TmrBqFK8ma/7OL3sDz/VytdtJr044/QUJtH0wK9lb9jLq9tJyIxUwtQJHwar2BqtiA4iCWSwo9JLkzFg==} engines: {node: '>=6'} @@ -4910,19 +4512,11 @@ packages: resolution: {integrity: sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==} engines: {node: '>=4'} - resolve-pkg-maps@1.0.0: - resolution: {integrity: sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw==} - resolve@1.22.11: resolution: {integrity: sha512-RfqAvLnMl313r7c9oclB1HhUEAezcpLjz95wFH4LVuhk9JF/r22qmVP9AMmOU4vMX7Q8pN8jwNg/CSpdFnMjTQ==} engines: {node: '>= 0.4'} hasBin: true - resolve@2.0.0-next.6: - resolution: {integrity: sha512-3JmVl5hMGtJ3kMmB3zi3DL25KfkCEyy3Tw7Gmw7z5w8M9WlwoPFnIvwChzu1+cF3iaK3sp18hhPz8ANeimdJfA==} - engines: {node: '>= 0.4'} - hasBin: true - reusify@1.1.0: resolution: {integrity: sha512-g6QUff04oZpHs0eG5p83rFLhHeV00ug/Yf9nZM6fLeUrPguBTkTQOdpAWWspMh55TZfVQDPaN3NQJfbVRAxdIw==} engines: {iojs: '>=1.0.0', node: '>=0.10.0'} @@ -5077,10 +4671,6 @@ packages: resolution: {integrity: sha512-9NykojV5Uih4lgo5So5dtw+f0JgJX30KCNI8gwhz2J9A15wD0Ml6tjHKwf6fTSa6fAdVBdZeNOs9eJ71qCk8vA==} deprecated: Please use @jridgewell/sourcemap-codec instead - stable-hash-x@0.2.0: - resolution: {integrity: sha512-o3yWv49B/o4QZk5ZcsALc6t0+eCelPc44zZsLtCQnZPDwFpDYSWcDnrv2TtMmMbQ7uKo3J0HTURCqckw23czNQ==} - engines: {node: '>=12.0.0'} - stackback@0.0.2: resolution: {integrity: sha512-1XMJE5fQo1jGH6Y/7ebnwPOBEkIEnT4QF32d5R1+VXdXveM0IBMJt8zfaxX1P3QhVwrYe+576+jkANtSS2mBbw==} @@ -5091,17 +4681,10 @@ packages: resolution: {integrity: sha512-eLoXW/DHyl62zxY4SCaIgnRhuMr6ri4juEYARS8E6sCEqzKpOiE521Ucofdx+KnDZl5xmvGYaaKCk5FEOxJCoQ==} engines: {node: '>= 0.4'} - string.prototype.includes@2.0.1: - resolution: {integrity: sha512-o7+c9bW6zpAdJHTtujeePODAhkuicdAryFsfVKwA+wGw89wJ4GTY484WTucM9hLtDEOpOvI+aHnzqnC5lHp4Rg==} - engines: {node: '>= 0.4'} - string.prototype.matchall@4.0.12: resolution: {integrity: sha512-6CC9uyBL+/48dYizRf7H7VAYCMCNTBeM78x/VTUe9bFEaxBepPJDa1Ow99LqI/1yF7kuy7Q3cQsYMrcjGUcskA==} engines: {node: '>= 0.4'} - string.prototype.repeat@1.0.0: - resolution: {integrity: sha512-0u/TldDbKD8bFCQ/4f5+mNRrXwZ8hg2w7ZR8wa16e8z9XpePWl3eGEcUD0OXpEH/VJH/2G3gjUtR3ZOiBe2S/w==} - string.prototype.trim@1.2.10: resolution: {integrity: sha512-Rs66F0P/1kedk5lyYyH9uBzuiI/kNRmwJAR9quK6VOtIpZ2G+hMZd+HQbbv25MgCA6gEffoMZYxlTod4WcdrKA==} engines: {node: '>= 0.4'} @@ -5118,10 +4701,6 @@ packages: resolution: {integrity: sha512-rHqiFh1elqCQ9WPLIC8I0Q/g/wj5J1eMkyoiD6eoQApWHP0FtlK7rqnhmabL5VUY9JQCcqwwvlOaSuutekgyrw==} engines: {node: '>=4'} - strip-bom@3.0.0: - resolution: {integrity: sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==} - engines: {node: '>=4'} - strip-comments@2.0.1: resolution: {integrity: sha512-ZprKx+bBLXv067WTCALv8SSz5l2+XhpYCsVtSqlMnkAXMWDq+/ekVbl1ghqP9rUHTzv6sm/DwCOiYutU/yp1fw==} engines: {node: '>=10'} @@ -5130,10 +4709,6 @@ packages: resolution: {integrity: sha512-laJTa3Jb+VQpaC6DseHhF7dXVqHTfJPCRDaEbid/drOhgitgYku/letMUqOXFoWV0zIIUbjpdH2t+tYj4bQMRQ==} engines: {node: '>=8'} - strip-json-comments@3.1.1: - resolution: {integrity: sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==} - engines: {node: '>=8'} - strip-json-comments@5.0.3: resolution: {integrity: sha512-1tB5mhVo7U+ETBKNf92xT4hrQa3pm0MZ0PQvuDnWgAAGHDsfp4lPSpiS6psrSiet87wyGPh9ft6wmhOMQ0hDiw==} engines: {node: '>=14.16'} @@ -5162,17 +4737,9 @@ packages: symbol-tree@3.2.4: resolution: {integrity: sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw==} - synckit@0.11.12: - resolution: {integrity: sha512-Bh7QjT8/SuKUIfObSXNHNSK6WHo6J1tHCqJsuaFDP7gP0fkzSfTxI8y85JrppZ0h8l0maIgc2tfuZQ6/t3GtnQ==} - engines: {node: ^14.18.0 || >=16.0.0} - tabbable@6.4.0: resolution: {integrity: sha512-05PUHKSNE8ou2dwIxTngl4EzcnsCDZGJ/iCLtDflR/SHB/ny14rXc+qU5P4mG9JkusiV7EivzY9Mhm55AzAvCg==} - tapable@2.3.0: - resolution: {integrity: sha512-g9ljZiwki/LfxmQADO3dEY1CbpmXT5Hm2fJ+QaGKwSXUylMybePR7/67YW7jOrrvjEgL1Fmz5kzyAjWVWLlucg==} - engines: {node: '>=6'} - tar-mini@0.2.0: resolution: {integrity: sha512-+qfUHz700DWnRutdUsxRRVZ38G1Qr27OetwaMYTdg8hcPxf46U0S1Zf76dQMWRBmusOt2ZCK5kbIaiLkoGO7WQ==} @@ -5203,6 +4770,10 @@ packages: resolution: {integrity: sha512-j2Zq4NyQYG5XMST4cbs02Ak8iJUdxRM0XI5QyxXuZOzKOINmWurp3smXu3y5wDcJrptwpSjgXHzIQxR0omXljQ==} engines: {node: '>=12.0.0'} + tinypool@2.1.0: + resolution: {integrity: sha512-Pugqs6M0m7Lv1I7FtxN4aoyToKg1C4tu+/381vH35y8oENM/Ai7f7C4StcoK4/+BSw9ebcS8jRiVrORFKCALLw==} + engines: {node: ^20.0.0 || >=22.0.0} + tinyrainbow@3.1.0: resolution: {integrity: sha512-Bf+ILmBgretUrdJxzXM0SgXLZ3XfiaUuOj/IKQHuTXip+05Xn+uyEYdVg0kYDipTBcLrCVyUzAPz7QmArb0mmw==} engines: {node: '>=14.0.0'} @@ -5236,27 +4807,9 @@ packages: resolution: {integrity: sha512-bLVMLPtstlZ4iMQHpFHTR7GAGj2jxi8Dg0s2h2MafAE4uSWF98FC/3MomU51iQAMf8/qDUbKWf5GxuvvVcXEhw==} engines: {node: '>=20'} - ts-api-utils@2.4.0: - resolution: {integrity: sha512-3TaVTaAv2gTiMB35i3FiGJaRfwb3Pyn/j3m/bfAvGe8FB7CF6u+LMYqYlDh7reQf7UNvoTvdfAqHGmPGOSsPmA==} - engines: {node: '>=18.12'} - peerDependencies: - typescript: '>=4.8.4' - - ts-declaration-location@1.0.7: - resolution: {integrity: sha512-EDyGAwH1gO0Ausm9gV6T2nUvBgXT5kGoCMJPllOaooZ+4VvJiKBdZE7wK18N1deEowhcUptS+5GXZK8U/fvpwA==} - peerDependencies: - typescript: '>=4.0.0' - - tsconfig-paths@3.15.0: - resolution: {integrity: sha512-2Ac2RgzDe/cn48GvOe3M+o82pEFewD3UPbyoUHHdKasHwJKjds4fLXWf/Ux5kATBKN20oaFGu+jbElp1pos0mg==} - tslib@2.8.1: resolution: {integrity: sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==} - type-check@0.4.0: - resolution: {integrity: sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==} - engines: {node: '>= 0.8.0'} - type-fest@0.16.0: resolution: {integrity: sha512-eaBzG6MxNzEn9kiwvtre90cXaNLkmadMWa1zQMs3XORCXNbsH/OewwbxC5ia9dCxIxnTAsSxXJaa/p5y8DlvJg==} engines: {node: '>=10'} @@ -5277,13 +4830,6 @@ packages: resolution: {integrity: sha512-3KS2b+kL7fsuk/eJZ7EQdnEmQoaho/r6KUef7hxvltNA5DR8NAUM+8wJMbJyZ4G9/7i3v5zPBIMN5aybAh2/Jg==} engines: {node: '>= 0.4'} - typescript-eslint@8.57.0: - resolution: {integrity: sha512-W8GcigEMEeB07xEZol8oJ26rigm3+bfPHxHvwbYUlu1fUDsGuQ7Hiskx5xGW/xM4USc9Ephe3jtv7ZYPQntHeA==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - peerDependencies: - eslint: ^8.57.0 || ^9.0.0 || ^10.0.0 - typescript: '>=4.8.4 <6.0.0' - typescript@5.9.3: resolution: {integrity: sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==} engines: {node: '>=14.17'} @@ -5337,9 +4883,6 @@ packages: resolution: {integrity: sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==} engines: {node: '>= 10.0.0'} - unrs-resolver@1.11.1: - resolution: {integrity: sha512-bSjt9pjaEBnNiGgc9rUiHGKv5l4/TGzDmYw3RhnkJGtLhbnnA/5qJj7x3dNDCRx/PJxu774LlH8lCOlB4hEfKg==} - upath@1.2.0: resolution: {integrity: sha512-aZwGpamFO61g3OlfT7OQCHqhGnW43ieH9WZeP7QxN/G/jS4jfqUkZxoryvJgVPEcrl5NL/ggHsSmLMHuH64Lhg==} engines: {node: '>=4'} @@ -5350,9 +4893,6 @@ packages: peerDependencies: browserslist: '>= 4.21.0' - uri-js@4.4.1: - resolution: {integrity: sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==} - use-sync-external-store@1.6.0: resolution: {integrity: sha512-Pp6GSwGP/NrPIrxVFAIkOQeyw8lFenOHijQWkUTrDvrF4ALqylP2C/KCkeS9dpUM3KvYRQhna5vt7IL95+ZQ9w==} peerDependencies: @@ -5559,10 +5099,6 @@ packages: engines: {node: '>=8'} hasBin: true - word-wrap@1.2.5: - resolution: {integrity: sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==} - engines: {node: '>=0.10.0'} - workbox-background-sync@7.4.0: resolution: {integrity: sha512-8CB9OxKAgKZKyNMwfGZ1XESx89GryWTfI+V5yEj8sHjFH8MFelUwYXEyldEK6M6oKMmn807GoJFUEA1sC4XS9w==} @@ -5664,12 +5200,6 @@ packages: youch@4.1.0-beta.10: resolution: {integrity: sha512-rLfVLB4FgQneDr0dv1oddCVZmKjcJ6yX6mS4pU82Mq/Dt9a3cLZQ62pDBL4AUO+uVrCvtWz3ZFUL2HFAFJ/BXQ==} - zod-validation-error@4.0.2: - resolution: {integrity: sha512-Q6/nZLe6jxuU80qb/4uJ4t5v2VEZ44lzQjPDhYJNztRQ4wyWc6VF3D3Kb/fAuPetZQnhS3hnajCf9CsWesghLQ==} - engines: {node: '>=18.0.0'} - peerDependencies: - zod: ^3.25.0 || ^4.0.0 - zod@4.3.6: resolution: {integrity: sha512-rftlrkhHZOcjDwkGlnUtZZkvaPHCsDATp4pGpuOOMDaTdDDXF91wuVDJoWoPsKX/3YPQ5fHuF3STjcYyKr+Qhg==} @@ -6561,62 +6091,6 @@ snapshots: '@esbuild/win32-x64@0.27.3': optional: true - '@eslint-community/eslint-utils@4.9.1(eslint@9.39.3(jiti@2.6.1))': - dependencies: - eslint: 9.39.3(jiti@2.6.1) - eslint-visitor-keys: 3.4.3 - - '@eslint-community/regexpp@4.12.2': {} - - '@eslint/compat@2.0.2(eslint@9.39.3(jiti@2.6.1))': - dependencies: - '@eslint/core': 1.1.1 - optionalDependencies: - eslint: 9.39.3(jiti@2.6.1) - - '@eslint/config-array@0.21.2': - dependencies: - '@eslint/object-schema': 2.1.7 - debug: 4.4.3 - minimatch: 10.2.4 - transitivePeerDependencies: - - supports-color - - '@eslint/config-helpers@0.4.2': - dependencies: - '@eslint/core': 0.17.0 - - '@eslint/core@0.17.0': - dependencies: - '@types/json-schema': 7.0.15 - - '@eslint/core@1.1.1': - dependencies: - '@types/json-schema': 7.0.15 - - '@eslint/eslintrc@3.3.5': - dependencies: - ajv: 6.14.0 - debug: 4.4.3 - espree: 10.4.0 - globals: 14.0.0 - ignore: 5.3.2 - import-fresh: 3.3.1 - js-yaml: 4.1.1 - minimatch: 10.2.4 - strip-json-comments: 3.1.1 - transitivePeerDependencies: - - supports-color - - '@eslint/js@9.39.3': {} - - '@eslint/object-schema@2.1.7': {} - - '@eslint/plugin-kit@0.4.1': - dependencies: - '@eslint/core': 0.17.0 - levn: 0.4.1 - '@exodus/bytes@1.15.0': {} '@fontsource-variable/nunito@5.2.7': {} @@ -6649,17 +6123,6 @@ snapshots: dependencies: tslib: 2.8.1 - '@humanfs/core@0.19.1': {} - - '@humanfs/node@0.16.7': - dependencies: - '@humanfs/core': 0.19.1 - '@humanwhocodes/retry': 0.4.3 - - '@humanwhocodes/module-importer@1.0.1': {} - - '@humanwhocodes/retry@0.4.3': {} - '@img/colour@1.1.0': {} '@img/sharp-darwin-arm64@0.34.5': @@ -6856,13 +6319,6 @@ snapshots: '@napi-rs/canvas-win32-x64-msvc': 0.1.96 optional: true - '@napi-rs/wasm-runtime@0.2.12': - dependencies: - '@emnapi/core': 1.8.1 - '@emnapi/runtime': 1.8.1 - '@tybys/wasm-util': 0.10.1 - optional: true - '@napi-rs/wasm-runtime@1.1.1': dependencies: '@emnapi/core': 1.8.1 @@ -6870,10 +6326,6 @@ snapshots: '@tybys/wasm-util': 0.10.1 optional: true - '@next/eslint-plugin-next@16.1.6': - dependencies: - fast-glob: 3.3.1 - '@nodelib/fs.scandir@2.1.5': dependencies: '@nodelib/fs.stat': 2.0.5 @@ -6948,13 +6400,143 @@ snapshots: '@oxc-resolver/binding-win32-x64-msvc@11.19.1': optional: true + '@oxfmt/binding-android-arm-eabi@0.45.0': + optional: true + + '@oxfmt/binding-android-arm64@0.45.0': + optional: true + + '@oxfmt/binding-darwin-arm64@0.45.0': + optional: true + + '@oxfmt/binding-darwin-x64@0.45.0': + optional: true + + '@oxfmt/binding-freebsd-x64@0.45.0': + optional: true + + '@oxfmt/binding-linux-arm-gnueabihf@0.45.0': + optional: true + + '@oxfmt/binding-linux-arm-musleabihf@0.45.0': + optional: true + + '@oxfmt/binding-linux-arm64-gnu@0.45.0': + optional: true + + '@oxfmt/binding-linux-arm64-musl@0.45.0': + optional: true + + '@oxfmt/binding-linux-ppc64-gnu@0.45.0': + optional: true + + '@oxfmt/binding-linux-riscv64-gnu@0.45.0': + optional: true + + '@oxfmt/binding-linux-riscv64-musl@0.45.0': + optional: true + + '@oxfmt/binding-linux-s390x-gnu@0.45.0': + optional: true + + '@oxfmt/binding-linux-x64-gnu@0.45.0': + optional: true + + '@oxfmt/binding-linux-x64-musl@0.45.0': + optional: true + + '@oxfmt/binding-openharmony-arm64@0.45.0': + optional: true + + '@oxfmt/binding-win32-arm64-msvc@0.45.0': + optional: true + + '@oxfmt/binding-win32-ia32-msvc@0.45.0': + optional: true + + '@oxfmt/binding-win32-x64-msvc@0.45.0': + optional: true + + '@oxlint-tsgolint/darwin-arm64@0.21.0': + optional: true + + '@oxlint-tsgolint/darwin-x64@0.21.0': + optional: true + + '@oxlint-tsgolint/linux-arm64@0.21.0': + optional: true + + '@oxlint-tsgolint/linux-x64@0.21.0': + optional: true + + '@oxlint-tsgolint/win32-arm64@0.21.0': + optional: true + + '@oxlint-tsgolint/win32-x64@0.21.0': + optional: true + + '@oxlint/binding-android-arm-eabi@1.60.0': + optional: true + + '@oxlint/binding-android-arm64@1.60.0': + optional: true + + '@oxlint/binding-darwin-arm64@1.60.0': + optional: true + + '@oxlint/binding-darwin-x64@1.60.0': + optional: true + + '@oxlint/binding-freebsd-x64@1.60.0': + optional: true + + '@oxlint/binding-linux-arm-gnueabihf@1.60.0': + optional: true + + '@oxlint/binding-linux-arm-musleabihf@1.60.0': + optional: true + + '@oxlint/binding-linux-arm64-gnu@1.60.0': + optional: true + + '@oxlint/binding-linux-arm64-musl@1.60.0': + optional: true + + '@oxlint/binding-linux-ppc64-gnu@1.60.0': + optional: true + + '@oxlint/binding-linux-riscv64-gnu@1.60.0': + optional: true + + '@oxlint/binding-linux-riscv64-musl@1.60.0': + optional: true + + '@oxlint/binding-linux-s390x-gnu@1.60.0': + optional: true + + '@oxlint/binding-linux-x64-gnu@1.60.0': + optional: true + + '@oxlint/binding-linux-x64-musl@1.60.0': + optional: true + + '@oxlint/binding-openharmony-arm64@1.60.0': + optional: true + + '@oxlint/binding-win32-arm64-msvc@1.60.0': + optional: true + + '@oxlint/binding-win32-ia32-msvc@1.60.0': + optional: true + + '@oxlint/binding-win32-x64-msvc@1.60.0': + optional: true + '@phosphor-icons/react@2.1.10(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': dependencies: react: 18.3.1 react-dom: 18.3.1(react@18.3.1) - '@pkgr/core@0.2.9': {} - '@polka/url@1.0.0-next.29': {} '@poppinss/colors@4.1.6': @@ -8077,8 +7659,6 @@ snapshots: '@rollup/rollup-win32-x64-msvc@4.59.0': optional: true - '@rtsao/scc@1.1.0': {} - '@sableclient/sable-call-embedded@1.1.4': {} '@sentry-internal/browser-utils@10.43.0': @@ -8198,16 +7778,6 @@ snapshots: '@standard-schema/spec@1.1.0': {} - '@stylistic/eslint-plugin@5.10.0(eslint@9.39.3(jiti@2.6.1))': - dependencies: - '@eslint-community/eslint-utils': 4.9.1(eslint@9.39.3(jiti@2.6.1)) - '@typescript-eslint/types': 8.57.0 - eslint: 9.39.3(jiti@2.6.1) - eslint-visitor-keys: 4.2.1 - espree: 10.4.0 - estraverse: 5.3.0 - picomatch: 4.0.3 - '@surma/rollup-plugin-off-main-thread@2.2.3': dependencies: ejs: 3.1.10 @@ -8448,10 +8018,6 @@ snapshots: '@types/is-hotkey@0.1.10': {} - '@types/json-schema@7.0.15': {} - - '@types/json5@0.0.29': {} - '@types/node@24.10.13': dependencies: undici-types: 7.16.0 @@ -8477,156 +8043,6 @@ snapshots: '@types/ua-parser-js@0.7.39': {} - '@typescript-eslint/eslint-plugin@8.57.0(@typescript-eslint/parser@8.57.0(eslint@9.39.3(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.3(jiti@2.6.1))(typescript@5.9.3)': - dependencies: - '@eslint-community/regexpp': 4.12.2 - '@typescript-eslint/parser': 8.57.0(eslint@9.39.3(jiti@2.6.1))(typescript@5.9.3) - '@typescript-eslint/scope-manager': 8.57.0 - '@typescript-eslint/type-utils': 8.57.0(eslint@9.39.3(jiti@2.6.1))(typescript@5.9.3) - '@typescript-eslint/utils': 8.57.0(eslint@9.39.3(jiti@2.6.1))(typescript@5.9.3) - '@typescript-eslint/visitor-keys': 8.57.0 - eslint: 9.39.3(jiti@2.6.1) - ignore: 7.0.5 - natural-compare: 1.4.0 - ts-api-utils: 2.4.0(typescript@5.9.3) - typescript: 5.9.3 - transitivePeerDependencies: - - supports-color - - '@typescript-eslint/parser@8.57.0(eslint@9.39.3(jiti@2.6.1))(typescript@5.9.3)': - dependencies: - '@typescript-eslint/scope-manager': 8.57.0 - '@typescript-eslint/types': 8.57.0 - '@typescript-eslint/typescript-estree': 8.57.0(typescript@5.9.3) - '@typescript-eslint/visitor-keys': 8.57.0 - debug: 4.4.3 - eslint: 9.39.3(jiti@2.6.1) - typescript: 5.9.3 - transitivePeerDependencies: - - supports-color - - '@typescript-eslint/project-service@8.57.0(typescript@5.9.3)': - dependencies: - '@typescript-eslint/tsconfig-utils': 8.57.0(typescript@5.9.3) - '@typescript-eslint/types': 8.57.0 - debug: 4.4.3 - typescript: 5.9.3 - transitivePeerDependencies: - - supports-color - - '@typescript-eslint/scope-manager@8.57.0': - dependencies: - '@typescript-eslint/types': 8.57.0 - '@typescript-eslint/visitor-keys': 8.57.0 - - '@typescript-eslint/tsconfig-utils@8.57.0(typescript@5.9.3)': - dependencies: - typescript: 5.9.3 - - '@typescript-eslint/type-utils@8.57.0(eslint@9.39.3(jiti@2.6.1))(typescript@5.9.3)': - dependencies: - '@typescript-eslint/types': 8.57.0 - '@typescript-eslint/typescript-estree': 8.57.0(typescript@5.9.3) - '@typescript-eslint/utils': 8.57.0(eslint@9.39.3(jiti@2.6.1))(typescript@5.9.3) - debug: 4.4.3 - eslint: 9.39.3(jiti@2.6.1) - ts-api-utils: 2.4.0(typescript@5.9.3) - typescript: 5.9.3 - transitivePeerDependencies: - - supports-color - - '@typescript-eslint/types@8.57.0': {} - - '@typescript-eslint/typescript-estree@8.57.0(typescript@5.9.3)': - dependencies: - '@typescript-eslint/project-service': 8.57.0(typescript@5.9.3) - '@typescript-eslint/tsconfig-utils': 8.57.0(typescript@5.9.3) - '@typescript-eslint/types': 8.57.0 - '@typescript-eslint/visitor-keys': 8.57.0 - debug: 4.4.3 - minimatch: 10.2.4 - semver: 7.7.4 - tinyglobby: 0.2.15 - ts-api-utils: 2.4.0(typescript@5.9.3) - typescript: 5.9.3 - transitivePeerDependencies: - - supports-color - - '@typescript-eslint/utils@8.57.0(eslint@9.39.3(jiti@2.6.1))(typescript@5.9.3)': - dependencies: - '@eslint-community/eslint-utils': 4.9.1(eslint@9.39.3(jiti@2.6.1)) - '@typescript-eslint/scope-manager': 8.57.0 - '@typescript-eslint/types': 8.57.0 - '@typescript-eslint/typescript-estree': 8.57.0(typescript@5.9.3) - eslint: 9.39.3(jiti@2.6.1) - typescript: 5.9.3 - transitivePeerDependencies: - - supports-color - - '@typescript-eslint/visitor-keys@8.57.0': - dependencies: - '@typescript-eslint/types': 8.57.0 - eslint-visitor-keys: 5.0.1 - - '@unrs/resolver-binding-android-arm-eabi@1.11.1': - optional: true - - '@unrs/resolver-binding-android-arm64@1.11.1': - optional: true - - '@unrs/resolver-binding-darwin-arm64@1.11.1': - optional: true - - '@unrs/resolver-binding-darwin-x64@1.11.1': - optional: true - - '@unrs/resolver-binding-freebsd-x64@1.11.1': - optional: true - - '@unrs/resolver-binding-linux-arm-gnueabihf@1.11.1': - optional: true - - '@unrs/resolver-binding-linux-arm-musleabihf@1.11.1': - optional: true - - '@unrs/resolver-binding-linux-arm64-gnu@1.11.1': - optional: true - - '@unrs/resolver-binding-linux-arm64-musl@1.11.1': - optional: true - - '@unrs/resolver-binding-linux-ppc64-gnu@1.11.1': - optional: true - - '@unrs/resolver-binding-linux-riscv64-gnu@1.11.1': - optional: true - - '@unrs/resolver-binding-linux-riscv64-musl@1.11.1': - optional: true - - '@unrs/resolver-binding-linux-s390x-gnu@1.11.1': - optional: true - - '@unrs/resolver-binding-linux-x64-gnu@1.11.1': - optional: true - - '@unrs/resolver-binding-linux-x64-musl@1.11.1': - optional: true - - '@unrs/resolver-binding-wasm32-wasi@1.11.1': - dependencies: - '@napi-rs/wasm-runtime': 0.2.12 - optional: true - - '@unrs/resolver-binding-win32-arm64-msvc@1.11.1': - optional: true - - '@unrs/resolver-binding-win32-ia32-msvc@1.11.1': - optional: true - - '@unrs/resolver-binding-win32-x64-msvc@1.11.1': - optional: true - '@use-gesture/core@10.3.1': {} '@use-gesture/react@10.3.1(react@18.3.1)': @@ -8798,10 +8214,6 @@ snapshots: convert-source-map: 2.0.0 tinyrainbow: 3.1.0 - acorn-jsx@5.3.2(acorn@8.16.0): - dependencies: - acorn: 8.16.0 - acorn@8.16.0: {} agent-base@6.0.2: @@ -8810,13 +8222,6 @@ snapshots: transitivePeerDependencies: - supports-color - ajv@6.14.0: - dependencies: - fast-deep-equal: 3.1.3 - fast-json-stable-stringify: 2.1.0 - json-schema-traverse: 0.4.1 - uri-js: 4.4.1 - ajv@8.18.0: dependencies: fast-deep-equal: 3.1.3 @@ -8828,10 +8233,6 @@ snapshots: ansi-regex@5.0.1: {} - ansi-styles@4.3.0: - dependencies: - color-convert: 2.0.1 - ansi-styles@5.2.0: {} anymatch@3.1.3: @@ -8852,58 +8253,6 @@ snapshots: call-bound: 1.0.4 is-array-buffer: 3.0.5 - array-includes@3.1.9: - dependencies: - call-bind: 1.0.8 - call-bound: 1.0.4 - define-properties: 1.2.1 - es-abstract: 1.24.1 - es-object-atoms: 1.1.1 - get-intrinsic: 1.3.0 - is-string: 1.1.1 - math-intrinsics: 1.1.0 - - array.prototype.findlast@1.2.5: - dependencies: - call-bind: 1.0.8 - define-properties: 1.2.1 - es-abstract: 1.24.1 - es-errors: 1.3.0 - es-object-atoms: 1.1.1 - es-shim-unscopables: 1.1.0 - - array.prototype.findlastindex@1.2.6: - dependencies: - call-bind: 1.0.8 - call-bound: 1.0.4 - define-properties: 1.2.1 - es-abstract: 1.24.1 - es-errors: 1.3.0 - es-object-atoms: 1.1.1 - es-shim-unscopables: 1.1.0 - - array.prototype.flat@1.3.3: - dependencies: - call-bind: 1.0.8 - define-properties: 1.2.1 - es-abstract: 1.24.1 - es-shim-unscopables: 1.1.0 - - array.prototype.flatmap@1.3.3: - dependencies: - call-bind: 1.0.8 - define-properties: 1.2.1 - es-abstract: 1.24.1 - es-shim-unscopables: 1.1.0 - - array.prototype.tosorted@1.1.4: - dependencies: - call-bind: 1.0.8 - define-properties: 1.2.1 - es-abstract: 1.24.1 - es-errors: 1.3.0 - es-shim-unscopables: 1.1.0 - arraybuffer.prototype.slice@1.0.4: dependencies: array-buffer-byte-length: 1.0.2 @@ -8916,8 +8265,6 @@ snapshots: assertion-error@2.0.1: {} - ast-types-flow@0.0.8: {} - ast-v8-to-istanbul@1.0.0: dependencies: '@jridgewell/trace-mapping': 0.3.31 @@ -8936,10 +8283,6 @@ snapshots: await-to-js@3.0.0: {} - axe-core@4.11.1: {} - - axobject-query@4.1.0: {} - babel-plugin-polyfill-corejs2@0.4.17(@babel/core@7.29.0): dependencies: '@babel/compat-data': 7.29.0 @@ -9042,11 +8385,6 @@ snapshots: chai@6.2.2: {} - chalk@4.1.2: - dependencies: - ansi-styles: 4.3.0 - supports-color: 7.2.0 - chokidar@3.6.0: dependencies: anymatch: 3.1.3 @@ -9067,24 +8405,14 @@ snapshots: clsx@2.1.1: {} - color-convert@2.0.1: - dependencies: - color-name: 1.1.4 - - color-name@1.1.4: {} - commander@2.20.3: {} - comment-parser@1.4.5: {} - common-tags@1.8.2: {} compute-scroll-into-view@3.1.1: {} confbox@0.1.8: {} - confusing-browser-globals@1.0.11: {} - content-type@1.0.5: {} convert-source-map@2.0.0: {} @@ -9131,8 +8459,6 @@ snapshots: csstype@3.2.3: {} - damerau-levenshtein@1.0.8: {} - data-urls@7.0.0: dependencies: whatwg-mimetype: 5.0.0 @@ -9160,10 +8486,6 @@ snapshots: dayjs@1.11.19: {} - debug@3.2.7: - dependencies: - ms: 2.1.3 - debug@4.4.3: dependencies: ms: 2.1.3 @@ -9172,8 +8494,6 @@ snapshots: dedent@1.7.2: {} - deep-is@0.1.4: {} - deep-object-diff@1.1.9: {} deepmerge@4.3.1: {} @@ -9196,10 +8516,6 @@ snapshots: direction@1.0.4: {} - doctrine@2.1.0: - dependencies: - esutils: 2.0.3 - dom-accessibility-api@0.5.16: {} dom-accessibility-api@0.6.3: {} @@ -9245,19 +8561,12 @@ snapshots: electron-to-chromium@1.5.307: {} - emoji-regex@9.2.2: {} - emojibase-data@15.3.2(emojibase@15.3.1): dependencies: emojibase: 15.3.1 emojibase@15.3.1: {} - enhanced-resolve@5.20.0: - dependencies: - graceful-fs: 4.2.11 - tapable: 2.3.0 - entities@4.5.0: {} entities@6.0.1: {} @@ -9331,25 +8640,6 @@ snapshots: es-errors@1.3.0: {} - es-iterator-helpers@1.2.2: - dependencies: - call-bind: 1.0.8 - call-bound: 1.0.4 - define-properties: 1.2.1 - es-abstract: 1.24.1 - es-errors: 1.3.0 - es-set-tostringtag: 2.1.0 - function-bind: 1.1.2 - get-intrinsic: 1.3.0 - globalthis: 1.0.4 - gopd: 1.2.0 - has-property-descriptors: 1.0.2 - has-proto: 1.2.0 - has-symbols: 1.1.0 - internal-slot: 1.1.0 - iterator.prototype: 1.1.5 - safe-array-concat: 1.1.3 - es-module-lexer@1.7.0: {} es-module-lexer@2.0.0: {} @@ -9365,10 +8655,6 @@ snapshots: has-tostringtag: 1.0.2 hasown: 2.0.2 - es-shim-unscopables@1.1.0: - dependencies: - hasown: 2.0.2 - es-to-primitive@1.3.0: dependencies: is-callable: 1.2.7 @@ -9406,280 +8692,6 @@ snapshots: escalade@3.2.0: {} - escape-string-regexp@4.0.0: {} - - eslint-compat-utils@0.5.1(eslint@9.39.3(jiti@2.6.1)): - dependencies: - eslint: 9.39.3(jiti@2.6.1) - semver: 7.7.4 - - eslint-config-airbnb-extended@3.0.1(@typescript-eslint/parser@8.57.0(eslint@9.39.3(jiti@2.6.1))(typescript@5.9.3))(@typescript-eslint/utils@8.57.0(eslint@9.39.3(jiti@2.6.1))(typescript@5.9.3))(eslint-import-resolver-node@0.3.9)(eslint@9.39.3(jiti@2.6.1))(typescript@5.9.3): - dependencies: - '@next/eslint-plugin-next': 16.1.6 - '@stylistic/eslint-plugin': 5.10.0(eslint@9.39.3(jiti@2.6.1)) - confusing-browser-globals: 1.0.11 - eslint: 9.39.3(jiti@2.6.1) - eslint-import-resolver-typescript: 4.4.4(eslint-plugin-import-x@4.16.1(@typescript-eslint/utils@8.57.0(eslint@9.39.3(jiti@2.6.1))(typescript@5.9.3))(eslint-import-resolver-node@0.3.9)(eslint@9.39.3(jiti@2.6.1)))(eslint-plugin-import@2.32.0)(eslint@9.39.3(jiti@2.6.1)) - eslint-plugin-import: 2.32.0(@typescript-eslint/parser@8.57.0(eslint@9.39.3(jiti@2.6.1))(typescript@5.9.3))(eslint-import-resolver-typescript@4.4.4)(eslint@9.39.3(jiti@2.6.1)) - eslint-plugin-import-x: 4.16.1(@typescript-eslint/utils@8.57.0(eslint@9.39.3(jiti@2.6.1))(typescript@5.9.3))(eslint-import-resolver-node@0.3.9)(eslint@9.39.3(jiti@2.6.1)) - eslint-plugin-jsx-a11y: 6.10.2(eslint@9.39.3(jiti@2.6.1)) - eslint-plugin-n: 17.24.0(eslint@9.39.3(jiti@2.6.1))(typescript@5.9.3) - eslint-plugin-react: 7.37.5(eslint@9.39.3(jiti@2.6.1)) - eslint-plugin-react-hooks: 7.0.1(eslint@9.39.3(jiti@2.6.1)) - globals: 17.3.0 - typescript-eslint: 8.57.0(eslint@9.39.3(jiti@2.6.1))(typescript@5.9.3) - transitivePeerDependencies: - - '@typescript-eslint/parser' - - '@typescript-eslint/utils' - - eslint-import-resolver-node - - eslint-import-resolver-webpack - - supports-color - - typescript - - eslint-config-prettier@10.1.8(eslint@9.39.3(jiti@2.6.1)): - dependencies: - eslint: 9.39.3(jiti@2.6.1) - - eslint-import-context@0.1.9(unrs-resolver@1.11.1): - dependencies: - get-tsconfig: 4.13.6 - stable-hash-x: 0.2.0 - optionalDependencies: - unrs-resolver: 1.11.1 - - eslint-import-resolver-node@0.3.9: - dependencies: - debug: 3.2.7 - is-core-module: 2.16.1 - resolve: 1.22.11 - transitivePeerDependencies: - - supports-color - - eslint-import-resolver-typescript@4.4.4(eslint-plugin-import-x@4.16.1(@typescript-eslint/utils@8.57.0(eslint@9.39.3(jiti@2.6.1))(typescript@5.9.3))(eslint-import-resolver-node@0.3.9)(eslint@9.39.3(jiti@2.6.1)))(eslint-plugin-import@2.32.0)(eslint@9.39.3(jiti@2.6.1)): - dependencies: - debug: 4.4.3 - eslint: 9.39.3(jiti@2.6.1) - eslint-import-context: 0.1.9(unrs-resolver@1.11.1) - get-tsconfig: 4.13.6 - is-bun-module: 2.0.0 - stable-hash-x: 0.2.0 - tinyglobby: 0.2.15 - unrs-resolver: 1.11.1 - optionalDependencies: - eslint-plugin-import: 2.32.0(@typescript-eslint/parser@8.57.0(eslint@9.39.3(jiti@2.6.1))(typescript@5.9.3))(eslint-import-resolver-typescript@4.4.4)(eslint@9.39.3(jiti@2.6.1)) - eslint-plugin-import-x: 4.16.1(@typescript-eslint/utils@8.57.0(eslint@9.39.3(jiti@2.6.1))(typescript@5.9.3))(eslint-import-resolver-node@0.3.9)(eslint@9.39.3(jiti@2.6.1)) - transitivePeerDependencies: - - supports-color - - eslint-module-utils@2.12.1(@typescript-eslint/parser@8.57.0(eslint@9.39.3(jiti@2.6.1))(typescript@5.9.3))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@4.4.4)(eslint@9.39.3(jiti@2.6.1)): - dependencies: - debug: 3.2.7 - optionalDependencies: - '@typescript-eslint/parser': 8.57.0(eslint@9.39.3(jiti@2.6.1))(typescript@5.9.3) - eslint: 9.39.3(jiti@2.6.1) - eslint-import-resolver-node: 0.3.9 - eslint-import-resolver-typescript: 4.4.4(eslint-plugin-import-x@4.16.1(@typescript-eslint/utils@8.57.0(eslint@9.39.3(jiti@2.6.1))(typescript@5.9.3))(eslint-import-resolver-node@0.3.9)(eslint@9.39.3(jiti@2.6.1)))(eslint-plugin-import@2.32.0)(eslint@9.39.3(jiti@2.6.1)) - transitivePeerDependencies: - - supports-color - - eslint-plugin-es-x@7.8.0(eslint@9.39.3(jiti@2.6.1)): - dependencies: - '@eslint-community/eslint-utils': 4.9.1(eslint@9.39.3(jiti@2.6.1)) - '@eslint-community/regexpp': 4.12.2 - eslint: 9.39.3(jiti@2.6.1) - eslint-compat-utils: 0.5.1(eslint@9.39.3(jiti@2.6.1)) - - eslint-plugin-import-x@4.16.1(@typescript-eslint/utils@8.57.0(eslint@9.39.3(jiti@2.6.1))(typescript@5.9.3))(eslint-import-resolver-node@0.3.9)(eslint@9.39.3(jiti@2.6.1)): - dependencies: - '@typescript-eslint/types': 8.57.0 - comment-parser: 1.4.5 - debug: 4.4.3 - eslint: 9.39.3(jiti@2.6.1) - eslint-import-context: 0.1.9(unrs-resolver@1.11.1) - is-glob: 4.0.3 - minimatch: 10.2.4 - semver: 7.7.4 - stable-hash-x: 0.2.0 - unrs-resolver: 1.11.1 - optionalDependencies: - '@typescript-eslint/utils': 8.57.0(eslint@9.39.3(jiti@2.6.1))(typescript@5.9.3) - eslint-import-resolver-node: 0.3.9 - transitivePeerDependencies: - - supports-color - - eslint-plugin-import@2.32.0(@typescript-eslint/parser@8.57.0(eslint@9.39.3(jiti@2.6.1))(typescript@5.9.3))(eslint-import-resolver-typescript@4.4.4)(eslint@9.39.3(jiti@2.6.1)): - dependencies: - '@rtsao/scc': 1.1.0 - array-includes: 3.1.9 - array.prototype.findlastindex: 1.2.6 - array.prototype.flat: 1.3.3 - array.prototype.flatmap: 1.3.3 - debug: 3.2.7 - doctrine: 2.1.0 - eslint: 9.39.3(jiti@2.6.1) - eslint-import-resolver-node: 0.3.9 - eslint-module-utils: 2.12.1(@typescript-eslint/parser@8.57.0(eslint@9.39.3(jiti@2.6.1))(typescript@5.9.3))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@4.4.4)(eslint@9.39.3(jiti@2.6.1)) - hasown: 2.0.2 - is-core-module: 2.16.1 - is-glob: 4.0.3 - minimatch: 10.2.4 - object.fromentries: 2.0.8 - object.groupby: 1.0.3 - object.values: 1.2.1 - semver: 6.3.1 - string.prototype.trimend: 1.0.9 - tsconfig-paths: 3.15.0 - optionalDependencies: - '@typescript-eslint/parser': 8.57.0(eslint@9.39.3(jiti@2.6.1))(typescript@5.9.3) - transitivePeerDependencies: - - eslint-import-resolver-typescript - - eslint-import-resolver-webpack - - supports-color - - eslint-plugin-jsx-a11y@6.10.2(eslint@9.39.3(jiti@2.6.1)): - dependencies: - aria-query: 5.3.2 - array-includes: 3.1.9 - array.prototype.flatmap: 1.3.3 - ast-types-flow: 0.0.8 - axe-core: 4.11.1 - axobject-query: 4.1.0 - damerau-levenshtein: 1.0.8 - emoji-regex: 9.2.2 - eslint: 9.39.3(jiti@2.6.1) - hasown: 2.0.2 - jsx-ast-utils: 3.3.5 - language-tags: 1.0.9 - minimatch: 10.2.4 - object.fromentries: 2.0.8 - safe-regex-test: 1.1.0 - string.prototype.includes: 2.0.1 - - eslint-plugin-n@17.24.0(eslint@9.39.3(jiti@2.6.1))(typescript@5.9.3): - dependencies: - '@eslint-community/eslint-utils': 4.9.1(eslint@9.39.3(jiti@2.6.1)) - enhanced-resolve: 5.20.0 - eslint: 9.39.3(jiti@2.6.1) - eslint-plugin-es-x: 7.8.0(eslint@9.39.3(jiti@2.6.1)) - get-tsconfig: 4.13.6 - globals: 15.15.0 - globrex: 0.1.2 - ignore: 5.3.2 - semver: 7.7.4 - ts-declaration-location: 1.0.7(typescript@5.9.3) - transitivePeerDependencies: - - typescript - - eslint-plugin-prettier@5.5.5(eslint-config-prettier@10.1.8(eslint@9.39.3(jiti@2.6.1)))(eslint@9.39.3(jiti@2.6.1))(prettier@3.8.1): - dependencies: - eslint: 9.39.3(jiti@2.6.1) - prettier: 3.8.1 - prettier-linter-helpers: 1.0.1 - synckit: 0.11.12 - optionalDependencies: - eslint-config-prettier: 10.1.8(eslint@9.39.3(jiti@2.6.1)) - - eslint-plugin-react-hooks@7.0.1(eslint@9.39.3(jiti@2.6.1)): - dependencies: - '@babel/core': 7.29.0 - '@babel/parser': 7.29.0 - eslint: 9.39.3(jiti@2.6.1) - hermes-parser: 0.25.1 - zod: 4.3.6 - zod-validation-error: 4.0.2(zod@4.3.6) - transitivePeerDependencies: - - supports-color - - eslint-plugin-react@7.37.5(eslint@9.39.3(jiti@2.6.1)): - dependencies: - array-includes: 3.1.9 - array.prototype.findlast: 1.2.5 - array.prototype.flatmap: 1.3.3 - array.prototype.tosorted: 1.1.4 - doctrine: 2.1.0 - es-iterator-helpers: 1.2.2 - eslint: 9.39.3(jiti@2.6.1) - estraverse: 5.3.0 - hasown: 2.0.2 - jsx-ast-utils: 3.3.5 - minimatch: 10.2.4 - object.entries: 1.1.9 - object.fromentries: 2.0.8 - object.values: 1.2.1 - prop-types: 15.8.1 - resolve: 2.0.0-next.6 - semver: 6.3.1 - string.prototype.matchall: 4.0.12 - string.prototype.repeat: 1.0.0 - - eslint-scope@8.4.0: - dependencies: - esrecurse: 4.3.0 - estraverse: 5.3.0 - - eslint-visitor-keys@3.4.3: {} - - eslint-visitor-keys@4.2.1: {} - - eslint-visitor-keys@5.0.1: {} - - eslint@9.39.3(jiti@2.6.1): - dependencies: - '@eslint-community/eslint-utils': 4.9.1(eslint@9.39.3(jiti@2.6.1)) - '@eslint-community/regexpp': 4.12.2 - '@eslint/config-array': 0.21.2 - '@eslint/config-helpers': 0.4.2 - '@eslint/core': 0.17.0 - '@eslint/eslintrc': 3.3.5 - '@eslint/js': 9.39.3 - '@eslint/plugin-kit': 0.4.1 - '@humanfs/node': 0.16.7 - '@humanwhocodes/module-importer': 1.0.1 - '@humanwhocodes/retry': 0.4.3 - '@types/estree': 1.0.8 - ajv: 6.14.0 - chalk: 4.1.2 - cross-spawn: 7.0.6 - debug: 4.4.3 - escape-string-regexp: 4.0.0 - eslint-scope: 8.4.0 - eslint-visitor-keys: 4.2.1 - espree: 10.4.0 - esquery: 1.7.0 - esutils: 2.0.3 - fast-deep-equal: 3.1.3 - file-entry-cache: 8.0.0 - find-up: 5.0.0 - glob-parent: 6.0.2 - ignore: 5.3.2 - imurmurhash: 0.1.4 - is-glob: 4.0.3 - json-stable-stringify-without-jsonify: 1.0.1 - lodash.merge: 4.6.2 - minimatch: 10.2.4 - natural-compare: 1.4.0 - optionator: 0.9.4 - optionalDependencies: - jiti: 2.6.1 - transitivePeerDependencies: - - supports-color - - espree@10.4.0: - dependencies: - acorn: 8.16.0 - acorn-jsx: 5.3.2(acorn@8.16.0) - eslint-visitor-keys: 4.2.1 - - esquery@1.7.0: - dependencies: - estraverse: 5.3.0 - - esrecurse@4.3.0: - dependencies: - estraverse: 5.3.0 - - estraverse@5.3.0: {} - estree-walker@1.0.1: {} estree-walker@2.0.2: {} @@ -9703,16 +8715,6 @@ snapshots: fast-deep-equal@3.1.3: {} - fast-diff@1.3.0: {} - - fast-glob@3.3.1: - dependencies: - '@nodelib/fs.stat': 2.0.5 - '@nodelib/fs.walk': 1.2.8 - glob-parent: 5.1.2 - merge2: 1.4.1 - micromatch: 4.0.8 - fast-glob@3.3.3: dependencies: '@nodelib/fs.stat': 2.0.5 @@ -9723,8 +8725,6 @@ snapshots: fast-json-stable-stringify@2.1.0: {} - fast-levenshtein@2.0.6: {} - fast-uri@3.1.0: {} fastq@1.20.1: @@ -9741,10 +8741,6 @@ snapshots: fflate@0.8.2: {} - file-entry-cache@8.0.0: - dependencies: - flat-cache: 4.0.1 - file-saver@2.0.5: {} filelist@1.0.6: @@ -9760,11 +8756,6 @@ snapshots: locate-path: 6.0.0 path-exists: 4.0.0 - flat-cache@4.0.1: - dependencies: - flatted: 3.4.2 - keyv: 4.5.4 - flatted@3.4.2: {} focus-trap-react@10.3.1(prop-types@15.8.1)(react-dom@18.3.1(react@18.3.1))(react@18.3.1): @@ -9862,18 +8853,10 @@ snapshots: es-errors: 1.3.0 get-intrinsic: 1.3.0 - get-tsconfig@4.13.6: - dependencies: - resolve-pkg-maps: 1.0.0 - glob-parent@5.1.2: dependencies: is-glob: 4.0.3 - glob-parent@6.0.2: - dependencies: - is-glob: 4.0.3 - glob@11.1.0: dependencies: foreground-child: 3.3.1 @@ -9889,19 +8872,11 @@ snapshots: minipass: 7.1.3 path-scurry: 2.0.2 - globals@14.0.0: {} - - globals@15.15.0: {} - - globals@17.3.0: {} - globalthis@1.0.4: dependencies: define-properties: 1.2.1 gopd: 1.2.0 - globrex@0.1.2: {} - gopd@1.2.0: {} graceful-fs@4.2.11: {} @@ -9928,12 +8903,6 @@ snapshots: dependencies: function-bind: 1.1.2 - hermes-estree@0.25.1: {} - - hermes-parser@0.25.1: - dependencies: - hermes-estree: 0.25.1 - hoist-non-react-statics@3.3.2: dependencies: react-is: 16.13.1 @@ -10009,10 +8978,6 @@ snapshots: ieee754@1.2.1: {} - ignore@5.3.2: {} - - ignore@7.0.5: {} - immer@9.0.21: {} import-fresh@3.3.1: @@ -10020,8 +8985,6 @@ snapshots: parent-module: 1.0.1 resolve-from: 4.0.0 - imurmurhash@0.1.4: {} - indent-string@4.0.0: {} inline-style-parser@0.2.2: {} @@ -10068,10 +9031,6 @@ snapshots: call-bound: 1.0.4 has-tostringtag: 1.0.2 - is-bun-module@2.0.0: - dependencies: - semver: 7.7.4 - is-callable@1.2.7: {} is-core-module@2.16.1: @@ -10190,15 +9149,6 @@ snapshots: html-escaper: 2.0.2 istanbul-lib-report: 3.0.1 - iterator.prototype@1.1.5: - dependencies: - define-data-property: 1.1.4 - es-object-atoms: 1.1.1 - get-intrinsic: 1.3.0 - get-proto: 1.0.1 - has-symbols: 1.1.0 - set-function-name: 2.0.2 - jackspeak@4.2.3: dependencies: '@isaacs/cliui': 9.0.0 @@ -10256,22 +9206,12 @@ snapshots: jsesc@3.1.0: {} - json-buffer@3.0.1: {} - json-parse-even-better-errors@2.3.1: {} - json-schema-traverse@0.4.1: {} - json-schema-traverse@1.0.0: {} json-schema@0.4.0: {} - json-stable-stringify-without-jsonify@1.0.1: {} - - json5@1.0.2: - dependencies: - minimist: 1.2.8 - json5@2.2.3: {} jsonfile@6.2.0: @@ -10282,19 +9222,8 @@ snapshots: jsonpointer@5.0.1: {} - jsx-ast-utils@3.3.5: - dependencies: - array-includes: 3.1.9 - array.prototype.flat: 1.3.3 - object.assign: 4.1.7 - object.values: 1.2.1 - jwt-decode@4.0.0: {} - keyv@4.5.4: - dependencies: - json-buffer: 3.0.1 - kleur@4.1.5: {} knip@5.85.0(@types/node@24.10.13)(typescript@5.9.3): @@ -10314,19 +9243,8 @@ snapshots: typescript: 5.9.3 zod: 4.3.6 - language-subtag-registry@0.3.23: {} - - language-tags@1.0.9: - dependencies: - language-subtag-registry: 0.3.23 - leven@3.1.0: {} - levn@0.4.1: - dependencies: - prelude-ls: 1.2.1 - type-check: 0.4.0 - lines-and-columns@1.2.4: {} linkify-react@4.3.2(linkifyjs@4.3.2)(react@18.3.1): @@ -10342,8 +9260,6 @@ snapshots: lodash.debounce@4.0.8: {} - lodash.merge@4.6.2: {} - lodash.sortby@4.7.0: {} lodash@4.17.23: {} @@ -10470,22 +9386,11 @@ snapshots: nanoid@3.3.11: {} - napi-postinstall@0.3.4: {} - - natural-compare@1.4.0: {} - no-case@3.0.4: dependencies: lower-case: 2.0.2 tslib: 2.8.1 - node-exports-info@1.6.0: - dependencies: - array.prototype.flatmap: 1.3.3 - es-errors: 1.3.0 - object.entries: 1.1.9 - semver: 6.3.1 - node-fetch@2.7.0: dependencies: whatwg-url: 5.0.0 @@ -10512,48 +9417,12 @@ snapshots: has-symbols: 1.1.0 object-keys: 1.1.1 - object.entries@1.1.9: - dependencies: - call-bind: 1.0.8 - call-bound: 1.0.4 - define-properties: 1.2.1 - es-object-atoms: 1.1.1 - - object.fromentries@2.0.8: - dependencies: - call-bind: 1.0.8 - define-properties: 1.2.1 - es-abstract: 1.24.1 - es-object-atoms: 1.1.1 - - object.groupby@1.0.3: - dependencies: - call-bind: 1.0.8 - define-properties: 1.2.1 - es-abstract: 1.24.1 - - object.values@1.2.1: - dependencies: - call-bind: 1.0.8 - call-bound: 1.0.4 - define-properties: 1.2.1 - es-object-atoms: 1.1.1 - obug@2.1.1: {} oidc-client-ts@3.4.1: dependencies: jwt-decode: 4.0.0 - optionator@0.9.4: - dependencies: - deep-is: 0.1.4 - fast-levenshtein: 2.0.6 - levn: 0.4.1 - prelude-ls: 1.2.1 - type-check: 0.4.0 - word-wrap: 1.2.5 - own-keys@1.0.1: dependencies: get-intrinsic: 1.3.0 @@ -10583,6 +9452,62 @@ snapshots: '@oxc-resolver/binding-win32-ia32-msvc': 11.19.1 '@oxc-resolver/binding-win32-x64-msvc': 11.19.1 + oxfmt@0.45.0: + dependencies: + tinypool: 2.1.0 + optionalDependencies: + '@oxfmt/binding-android-arm-eabi': 0.45.0 + '@oxfmt/binding-android-arm64': 0.45.0 + '@oxfmt/binding-darwin-arm64': 0.45.0 + '@oxfmt/binding-darwin-x64': 0.45.0 + '@oxfmt/binding-freebsd-x64': 0.45.0 + '@oxfmt/binding-linux-arm-gnueabihf': 0.45.0 + '@oxfmt/binding-linux-arm-musleabihf': 0.45.0 + '@oxfmt/binding-linux-arm64-gnu': 0.45.0 + '@oxfmt/binding-linux-arm64-musl': 0.45.0 + '@oxfmt/binding-linux-ppc64-gnu': 0.45.0 + '@oxfmt/binding-linux-riscv64-gnu': 0.45.0 + '@oxfmt/binding-linux-riscv64-musl': 0.45.0 + '@oxfmt/binding-linux-s390x-gnu': 0.45.0 + '@oxfmt/binding-linux-x64-gnu': 0.45.0 + '@oxfmt/binding-linux-x64-musl': 0.45.0 + '@oxfmt/binding-openharmony-arm64': 0.45.0 + '@oxfmt/binding-win32-arm64-msvc': 0.45.0 + '@oxfmt/binding-win32-ia32-msvc': 0.45.0 + '@oxfmt/binding-win32-x64-msvc': 0.45.0 + + oxlint-tsgolint@0.21.0: + optionalDependencies: + '@oxlint-tsgolint/darwin-arm64': 0.21.0 + '@oxlint-tsgolint/darwin-x64': 0.21.0 + '@oxlint-tsgolint/linux-arm64': 0.21.0 + '@oxlint-tsgolint/linux-x64': 0.21.0 + '@oxlint-tsgolint/win32-arm64': 0.21.0 + '@oxlint-tsgolint/win32-x64': 0.21.0 + + oxlint@1.60.0(oxlint-tsgolint@0.21.0): + optionalDependencies: + '@oxlint/binding-android-arm-eabi': 1.60.0 + '@oxlint/binding-android-arm64': 1.60.0 + '@oxlint/binding-darwin-arm64': 1.60.0 + '@oxlint/binding-darwin-x64': 1.60.0 + '@oxlint/binding-freebsd-x64': 1.60.0 + '@oxlint/binding-linux-arm-gnueabihf': 1.60.0 + '@oxlint/binding-linux-arm-musleabihf': 1.60.0 + '@oxlint/binding-linux-arm64-gnu': 1.60.0 + '@oxlint/binding-linux-arm64-musl': 1.60.0 + '@oxlint/binding-linux-ppc64-gnu': 1.60.0 + '@oxlint/binding-linux-riscv64-gnu': 1.60.0 + '@oxlint/binding-linux-riscv64-musl': 1.60.0 + '@oxlint/binding-linux-s390x-gnu': 1.60.0 + '@oxlint/binding-linux-x64-gnu': 1.60.0 + '@oxlint/binding-linux-x64-musl': 1.60.0 + '@oxlint/binding-openharmony-arm64': 1.60.0 + '@oxlint/binding-win32-arm64-msvc': 1.60.0 + '@oxlint/binding-win32-ia32-msvc': 1.60.0 + '@oxlint/binding-win32-x64-msvc': 1.60.0 + oxlint-tsgolint: 0.21.0 + p-limit@3.1.0: dependencies: yocto-queue: 0.1.0 @@ -10658,14 +9583,6 @@ snapshots: picocolors: 1.1.1 source-map-js: 1.2.1 - prelude-ls@1.2.1: {} - - prettier-linter-helpers@1.0.1: - dependencies: - fast-diff: 1.3.0 - - prettier@3.8.1: {} - pretty-bytes@5.6.0: {} pretty-bytes@6.1.1: {} @@ -10863,23 +9780,12 @@ snapshots: resolve-from@4.0.0: {} - resolve-pkg-maps@1.0.0: {} - resolve@1.22.11: dependencies: is-core-module: 2.16.1 path-parse: 1.0.7 supports-preserve-symlinks-flag: 1.0.0 - resolve@2.0.0-next.6: - dependencies: - es-errors: 1.3.0 - is-core-module: 2.16.1 - node-exports-info: 1.6.0 - object-keys: 1.1.1 - path-parse: 1.0.7 - supports-preserve-symlinks-flag: 1.0.0 - reusify@1.1.0: {} rollup@4.59.0: @@ -11108,8 +10014,6 @@ snapshots: sourcemap-codec@1.4.8: {} - stable-hash-x@0.2.0: {} - stackback@0.0.2: {} std-env@4.0.0: {} @@ -11119,12 +10023,6 @@ snapshots: es-errors: 1.3.0 internal-slot: 1.1.0 - string.prototype.includes@2.0.1: - dependencies: - call-bind: 1.0.8 - define-properties: 1.2.1 - es-abstract: 1.24.1 - string.prototype.matchall@4.0.12: dependencies: call-bind: 1.0.8 @@ -11141,11 +10039,6 @@ snapshots: set-function-name: 2.0.2 side-channel: 1.1.0 - string.prototype.repeat@1.0.0: - dependencies: - define-properties: 1.2.1 - es-abstract: 1.24.1 - string.prototype.trim@1.2.10: dependencies: call-bind: 1.0.8 @@ -11175,16 +10068,12 @@ snapshots: is-obj: 1.0.1 is-regexp: 1.0.0 - strip-bom@3.0.0: {} - strip-comments@2.0.1: {} strip-indent@3.0.0: dependencies: min-indent: 1.0.1 - strip-json-comments@3.1.1: {} - strip-json-comments@5.0.3: {} style-to-js@1.1.8: @@ -11207,14 +10096,8 @@ snapshots: symbol-tree@3.2.4: {} - synckit@0.11.12: - dependencies: - '@pkgr/core': 0.2.9 - tabbable@6.4.0: {} - tapable@2.3.0: {} - tar-mini@0.2.0: {} temp-dir@2.0.0: {} @@ -11244,6 +10127,8 @@ snapshots: fdir: 6.5.0(picomatch@4.0.3) picomatch: 4.0.3 + tinypool@2.1.0: {} + tinyrainbow@3.1.0: {} tldts-core@7.0.25: {} @@ -11272,28 +10157,8 @@ snapshots: dependencies: punycode: 2.3.1 - ts-api-utils@2.4.0(typescript@5.9.3): - dependencies: - typescript: 5.9.3 - - ts-declaration-location@1.0.7(typescript@5.9.3): - dependencies: - picomatch: 4.0.3 - typescript: 5.9.3 - - tsconfig-paths@3.15.0: - dependencies: - '@types/json5': 0.0.29 - json5: 1.0.2 - minimist: 1.2.8 - strip-bom: 3.0.0 - tslib@2.8.1: {} - type-check@0.4.0: - dependencies: - prelude-ls: 1.2.1 - type-fest@0.16.0: {} typed-array-buffer@1.0.3: @@ -11329,17 +10194,6 @@ snapshots: possible-typed-array-names: 1.1.0 reflect.getprototypeof: 1.0.10 - typescript-eslint@8.57.0(eslint@9.39.3(jiti@2.6.1))(typescript@5.9.3): - dependencies: - '@typescript-eslint/eslint-plugin': 8.57.0(@typescript-eslint/parser@8.57.0(eslint@9.39.3(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.3(jiti@2.6.1))(typescript@5.9.3) - '@typescript-eslint/parser': 8.57.0(eslint@9.39.3(jiti@2.6.1))(typescript@5.9.3) - '@typescript-eslint/typescript-estree': 8.57.0(typescript@5.9.3) - '@typescript-eslint/utils': 8.57.0(eslint@9.39.3(jiti@2.6.1))(typescript@5.9.3) - eslint: 9.39.3(jiti@2.6.1) - typescript: 5.9.3 - transitivePeerDependencies: - - supports-color - typescript@5.9.3: {} ua-parser-js@1.0.41: {} @@ -11380,30 +10234,6 @@ snapshots: universalify@2.0.1: {} - unrs-resolver@1.11.1: - dependencies: - napi-postinstall: 0.3.4 - optionalDependencies: - '@unrs/resolver-binding-android-arm-eabi': 1.11.1 - '@unrs/resolver-binding-android-arm64': 1.11.1 - '@unrs/resolver-binding-darwin-arm64': 1.11.1 - '@unrs/resolver-binding-darwin-x64': 1.11.1 - '@unrs/resolver-binding-freebsd-x64': 1.11.1 - '@unrs/resolver-binding-linux-arm-gnueabihf': 1.11.1 - '@unrs/resolver-binding-linux-arm-musleabihf': 1.11.1 - '@unrs/resolver-binding-linux-arm64-gnu': 1.11.1 - '@unrs/resolver-binding-linux-arm64-musl': 1.11.1 - '@unrs/resolver-binding-linux-ppc64-gnu': 1.11.1 - '@unrs/resolver-binding-linux-riscv64-gnu': 1.11.1 - '@unrs/resolver-binding-linux-riscv64-musl': 1.11.1 - '@unrs/resolver-binding-linux-s390x-gnu': 1.11.1 - '@unrs/resolver-binding-linux-x64-gnu': 1.11.1 - '@unrs/resolver-binding-linux-x64-musl': 1.11.1 - '@unrs/resolver-binding-wasm32-wasi': 1.11.1 - '@unrs/resolver-binding-win32-arm64-msvc': 1.11.1 - '@unrs/resolver-binding-win32-ia32-msvc': 1.11.1 - '@unrs/resolver-binding-win32-x64-msvc': 1.11.1 - upath@1.2.0: {} update-browserslist-db@1.2.3(browserslist@4.28.1): @@ -11412,10 +10242,6 @@ snapshots: escalade: 3.2.0 picocolors: 1.1.1 - uri-js@4.4.1: - dependencies: - punycode: 2.3.1 - use-sync-external-store@1.6.0(react@18.3.1): dependencies: react: 18.3.1 @@ -11627,8 +10453,6 @@ snapshots: siginfo: 2.0.0 stackback: 0.0.2 - word-wrap@1.2.5: {} - workbox-background-sync@7.4.0: dependencies: idb: 7.1.1 @@ -11792,8 +10616,4 @@ snapshots: cookie: 1.1.1 youch-core: 0.3.3 - zod-validation-error@4.0.2(zod@4.3.6): - dependencies: - zod: 4.3.6 - zod@4.3.6: {} diff --git a/scripts/normalize-imports.js b/scripts/normalize-imports.js index 74f9c4a91..77af442c3 100644 --- a/scripts/normalize-imports.js +++ b/scripts/normalize-imports.js @@ -1,5 +1,5 @@ #!/usr/bin/env node -/* eslint-disable no-console */ +/* oxlint-disable no-console */ import fs from 'node:fs/promises'; import path from 'node:path'; @@ -212,7 +212,7 @@ function rewriteFileImports(filePath, sourceCode, aliases, projectRoot) { const uniqueReplacements = Array.from( new Map(replacements.map((r) => [`${r.start}:${r.end}`, r])).values() - ).sort((a, b) => b.start - a.start); + ).toSorted((a, b) => b.start - a.start); const updatedCode = uniqueReplacements.reduce( (code, replacement) => diff --git a/scripts/utils/console-style.js b/scripts/utils/console-style.js index 96ed5bf3e..ae7e29b79 100644 --- a/scripts/utils/console-style.js +++ b/scripts/utils/console-style.js @@ -1,4 +1,4 @@ -/* eslint-disable no-console */ +/* oxlint-disable no-console */ import process from 'node:process'; export const ANSI = { diff --git a/src/app/components/AccountDataEditor.tsx b/src/app/components/AccountDataEditor.tsx index f8fd8445f..7649edd9e 100644 --- a/src/app/components/AccountDataEditor.tsx +++ b/src/app/components/AccountDataEditor.tsx @@ -1,4 +1,5 @@ -import { FormEventHandler, useCallback, useEffect, useMemo, useRef, useState } from 'react'; +import type { FormEventHandler} from 'react'; +import { useCallback, useEffect, useMemo, useRef, useState } from 'react'; import { Box, Text, @@ -14,7 +15,7 @@ import { Scroll, config, } from 'folds'; -import { MatrixError } from '$types/matrix-sdk'; +import type { MatrixError } from '$types/matrix-sdk'; import { Cursor } from '$plugins/text-area'; import { syntaxErrorPosition } from '$utils/dom'; import { AsyncStatus, useAsyncCallback } from '$hooks/useAsyncCallback'; diff --git a/src/app/components/ActionUIA.tsx b/src/app/components/ActionUIA.tsx index caffb0329..7511dd0e6 100644 --- a/src/app/components/ActionUIA.tsx +++ b/src/app/components/ActionUIA.tsx @@ -1,5 +1,6 @@ -import { ReactNode } from 'react'; -import { AuthDict, AuthType, IAuthData, UIAFlow } from '$types/matrix-sdk'; +import type { ReactNode } from 'react'; +import type { AuthDict, IAuthData, UIAFlow } from '$types/matrix-sdk'; +import { AuthType } from '$types/matrix-sdk'; import { getUIAFlowForStages } from '$utils/matrix-uia'; import { useSupportedUIAFlows, useUIACompleted, useUIAFlow } from '$hooks/useUIAFlows'; import { useMatrixClient } from '$hooks/useMatrixClient'; diff --git a/src/app/components/AuthFlowsLoader.tsx b/src/app/components/AuthFlowsLoader.tsx index 4ea21b92c..9f6c10441 100644 --- a/src/app/components/AuthFlowsLoader.tsx +++ b/src/app/components/AuthFlowsLoader.tsx @@ -1,12 +1,15 @@ -import { ReactNode, useCallback, useEffect, useMemo } from 'react'; -import { MatrixError, createClient } from '$types/matrix-sdk'; +import type { ReactNode} from 'react'; +import { useCallback, useEffect, useMemo } from 'react'; +import type { MatrixError} from '$types/matrix-sdk'; +import { createClient } from '$types/matrix-sdk'; import { AsyncStatus, useAsyncCallback } from '$hooks/useAsyncCallback'; import { useAutoDiscoveryInfo } from '$hooks/useAutoDiscoveryInfo'; import { promiseFulfilledResult, promiseRejectedResult } from '$utils/common'; -import { +import type { AuthFlows, + RegisterFlowsResponse} from '$hooks/useAuthFlows'; +import { RegisterFlowStatus, - RegisterFlowsResponse, parseRegisterErrResp, } from '$hooks/useAuthFlows'; @@ -26,7 +29,9 @@ export function AuthFlowsLoader({ fallback, error, children }: AuthFlowsLoaderPr const result = await Promise.allSettled([mx.loginFlows(), mx.registerRequest({})]); const loginFlows = promiseFulfilledResult(result[0]); const registerResp = promiseRejectedResult(result[1]) as MatrixError | undefined; - let registerFlows: RegisterFlowsResponse = { status: RegisterFlowStatus.InvalidRequest }; + let registerFlows: RegisterFlowsResponse = { + status: RegisterFlowStatus.InvalidRequest, + }; if (typeof registerResp === 'object' && registerResp.httpStatus) { registerFlows = parseRegisterErrResp(registerResp); diff --git a/src/app/components/BackRouteHandler.tsx b/src/app/components/BackRouteHandler.tsx index a6e91bcd1..f49cedc66 100644 --- a/src/app/components/BackRouteHandler.tsx +++ b/src/app/components/BackRouteHandler.tsx @@ -1,4 +1,5 @@ -import { ReactNode, useCallback } from 'react'; +import type { ReactNode} from 'react'; +import { useCallback } from 'react'; import { useSetAtom } from 'jotai'; import { matchPath, useLocation, useNavigate } from 'react-router-dom'; import { diff --git a/src/app/components/BackupRestore.tsx b/src/app/components/BackupRestore.tsx index 78d65dff4..cf4b5d80e 100644 --- a/src/app/components/BackupRestore.tsx +++ b/src/app/components/BackupRestore.tsx @@ -1,6 +1,9 @@ -import { MouseEventHandler, useCallback, useState } from 'react'; +import type { MouseEventHandler} from 'react'; +import { useCallback, useState } from 'react'; import { useAtom } from 'jotai'; -import { CryptoApi, KeyBackupInfo } from '$types/matrix-sdk'; +import type { CryptoApi, KeyBackupInfo } from '$types/matrix-sdk'; +import type { + RectCords} from 'folds'; import { Badge, Box, @@ -14,7 +17,6 @@ import { percent, PopOut, ProgressBar, - RectCords, Spinner, Text, } from 'folds'; diff --git a/src/app/components/CallEmbedProvider.tsx b/src/app/components/CallEmbedProvider.tsx index fe2f84468..0679c9352 100644 --- a/src/app/components/CallEmbedProvider.tsx +++ b/src/app/components/CallEmbedProvider.tsx @@ -1,4 +1,5 @@ -import { ReactNode, useCallback, useRef } from 'react'; +import type { ReactNode} from 'react'; +import { useCallback, useRef } from 'react'; import { useAtomValue, useSetAtom } from 'jotai'; import { useAutoJoinCall } from '$hooks/useAutoJoinCall'; import { @@ -9,7 +10,8 @@ import { useCallThemeSync, useCallMemberSoundSync, } from '$hooks/useCallEmbed'; -import { CallEmbed, useClientWidgetApiEvent, ElementWidgetActions } from '$plugins/call'; +import type { CallEmbed} from '$plugins/call'; +import { useClientWidgetApiEvent, ElementWidgetActions } from '$plugins/call'; import { callChatAtom, callEmbedAtom } from '$state/callEmbed'; import { useSelectedRoom } from '$hooks/router/useSelectedRoom'; import { ScreenSize, useScreenSizeContext } from '$hooks/useScreenSize'; diff --git a/src/app/components/ClientConfigLoader.tsx b/src/app/components/ClientConfigLoader.tsx index 92af0c149..92cff5709 100644 --- a/src/app/components/ClientConfigLoader.tsx +++ b/src/app/components/ClientConfigLoader.tsx @@ -1,6 +1,7 @@ -import { ReactNode, useCallback, useEffect, useState } from 'react'; +import type { ReactNode} from 'react'; +import { useCallback, useEffect, useState } from 'react'; import { AsyncStatus, useAsyncCallback } from '$hooks/useAsyncCallback'; -import { ClientConfig } from '$hooks/useClientConfig'; +import type { ClientConfig } from '$hooks/useClientConfig'; import { trimTrailingSlash } from '$utils/common'; const getClientConfig = async (): Promise => { diff --git a/src/app/components/ConfirmPasswordMatch.tsx b/src/app/components/ConfirmPasswordMatch.tsx index dea228924..8df636914 100644 --- a/src/app/components/ConfirmPasswordMatch.tsx +++ b/src/app/components/ConfirmPasswordMatch.tsx @@ -1,4 +1,5 @@ -import { ReactNode, RefObject, useCallback, useRef, useState } from 'react'; +import type { ReactNode, RefObject} from 'react'; +import { useCallback, useRef, useState } from 'react'; import { useDebounce } from '$hooks/useDebounce'; type ConfirmPasswordMatchProps = { diff --git a/src/app/components/DeviceVerification.tsx b/src/app/components/DeviceVerification.tsx index fa29ae11e..9a68bee7a 100644 --- a/src/app/components/DeviceVerification.tsx +++ b/src/app/components/DeviceVerification.tsx @@ -1,11 +1,13 @@ -import { +import type { ShowSasCallbacks, - VerificationPhase, VerificationRequest, - Verifier, + Verifier} from '$types/matrix-sdk'; +import { + VerificationPhase, VerificationMethod, } from '$types/matrix-sdk'; -import { CSSProperties, useCallback, useEffect, useState } from 'react'; +import type { CSSProperties} from 'react'; +import { useCallback, useEffect, useState } from 'react'; import { Box, Button, @@ -138,7 +140,7 @@ function CompareEmoji({ sasData }: { sasData: ShowSasCallbacks }) { > {sasData.sas.emoji?.map(([emoji, name], index) => ( ( authData: IAuthData, performAction: PerformAction, resolve: (data: T) => void, - reject: (error?: any) => void + reject: (error?: unknown) => void ): UIAAction { const action: UIAAction = { authData, diff --git a/src/app/components/DeviceVerificationStatus.ts b/src/app/components/DeviceVerificationStatus.ts index f69c64ac9..35c3da92d 100644 --- a/src/app/components/DeviceVerificationStatus.ts +++ b/src/app/components/DeviceVerificationStatus.ts @@ -1,8 +1,9 @@ -import { ReactNode } from 'react'; -import { CryptoApi } from '$types/matrix-sdk'; +import type { ReactNode } from 'react'; +import type { CryptoApi } from '$types/matrix-sdk'; +import type { + VerificationStatus} from '$hooks/useDeviceVerificationStatus'; import { - useDeviceVerificationStatus, - VerificationStatus, + useDeviceVerificationStatus } from '$hooks/useDeviceVerificationStatus'; type DeviceVerificationStatusProps = { diff --git a/src/app/components/GlobalKeyboardShortcuts.tsx b/src/app/components/GlobalKeyboardShortcuts.tsx index 0571e54a4..7e09762ae 100644 --- a/src/app/components/GlobalKeyboardShortcuts.tsx +++ b/src/app/components/GlobalKeyboardShortcuts.tsx @@ -21,7 +21,7 @@ import { HOME_ROOM_PATH, DIRECT_ROOM_PATH, SPACE_ROOM_PATH } from '$pages/paths' import { getCanonicalAliasOrRoomId } from '$utils/matrix'; import { announce } from '$utils/announce'; import { roomIdToReplyDraftAtomFamily } from '$state/room/roomInputDrafts'; -import { Room } from 'matrix-js-sdk'; +import type { Room } from 'matrix-js-sdk'; export function GlobalKeyboardShortcuts() { const navigate = useNavigate(); @@ -82,7 +82,7 @@ export function GlobalKeyboardShortcuts() { if (!isKeyHotkey('alt+n', evt)) return; const unreadEntries = Array.from(roomToUnread.entries()) .filter(([id, u]) => u.total > 0 && id !== currentRoom?.roomId) - .sort((a, b) => b[1].highlight - a[1].highlight || b[1].total - a[1].total); + .toSorted((a, b) => b[1].highlight - a[1].highlight || b[1].total - a[1].total); if (unreadEntries.length === 0) return; evt.preventDefault(); unreadIndexRef.current = 0; @@ -100,7 +100,7 @@ export function GlobalKeyboardShortcuts() { if (!isDown && !isUp) return; const unreadEntries = Array.from(roomToUnread.entries()) .filter(([, u]) => u.total > 0) - .sort((a, b) => b[1].highlight - a[1].highlight || b[1].total - a[1].total); + .toSorted((a, b) => b[1].highlight - a[1].highlight || b[1].total - a[1].total); if (unreadEntries.length === 0) return; evt.preventDefault(); if (isDown) { diff --git a/src/app/components/HexColorPickerPopOut.tsx b/src/app/components/HexColorPickerPopOut.tsx index 25c5d661b..8473a56ac 100644 --- a/src/app/components/HexColorPickerPopOut.tsx +++ b/src/app/components/HexColorPickerPopOut.tsx @@ -1,6 +1,8 @@ import FocusTrap from 'focus-trap-react'; -import { Box, Button, config, Menu, PopOut, RectCords, Text } from 'folds'; -import { MouseEventHandler, ReactNode, useState } from 'react'; +import type { RectCords} from 'folds'; +import { Box, Button, config, Menu, PopOut, Text } from 'folds'; +import type { MouseEventHandler, ReactNode} from 'react'; +import { useState } from 'react'; import { stopPropagation } from '$utils/keyboard'; type HexColorPickerPopOutProps = { diff --git a/src/app/components/IncomingCallModal.tsx b/src/app/components/IncomingCallModal.tsx index 3ab4e8457..3ef349b8d 100644 --- a/src/app/components/IncomingCallModal.tsx +++ b/src/app/components/IncomingCallModal.tsx @@ -13,6 +13,7 @@ import { OverlayCenter, OverlayBackdrop, } from 'folds'; +import type { Room } from 'matrix-js-sdk'; import { useMatrixClient } from '$hooks/useMatrixClient'; import { useRoomName } from '$hooks/useRoomMeta'; import { getRoomAvatarUrl } from '$utils/room'; @@ -32,7 +33,7 @@ import { RoomAvatar } from './room-avatar'; const debugLog = createDebugLogger('IncomingCall'); type IncomingCallInternalProps = { - room: any; + room: Room; onClose: () => void; }; diff --git a/src/app/components/JoinRulesSwitcher.tsx b/src/app/components/JoinRulesSwitcher.tsx index 5b33b397d..8d5526137 100644 --- a/src/app/components/JoinRulesSwitcher.tsx +++ b/src/app/components/JoinRulesSwitcher.tsx @@ -1,4 +1,8 @@ -import { MouseEventHandler, useCallback, useMemo, useState } from 'react'; +import type { MouseEventHandler} from 'react'; +import { useCallback, useMemo, useState } from 'react'; +import type { + IconSrc, + RectCords} from 'folds'; import { config, Box, @@ -6,8 +10,6 @@ import { Text, Icon, Icons, - IconSrc, - RectCords, PopOut, Menu, Button, diff --git a/src/app/components/ManualVerification.tsx b/src/app/components/ManualVerification.tsx index 31903f957..6e60824d3 100644 --- a/src/app/components/ManualVerification.tsx +++ b/src/app/components/ManualVerification.tsx @@ -1,11 +1,13 @@ -import { MouseEventHandler, ReactNode, useCallback, useState } from 'react'; +import type { MouseEventHandler, ReactNode} from 'react'; +import { useCallback, useState } from 'react'; +import type { + RectCords} from 'folds'; import { Box, Text, Chip, Icon, Icons, - RectCords, PopOut, Menu, config, @@ -13,7 +15,7 @@ import { color, } from 'folds'; import FocusTrap from 'focus-trap-react'; -import { SecretStorageKeyContent } from '$types/matrix/accountData'; +import type { SecretStorageKeyContent } from '$types/matrix/accountData'; import { storePrivateKey } from '$client/secretStorageKeys'; import { stopPropagation } from '$utils/keyboard'; import { useMatrixClient } from '$hooks/useMatrixClient'; diff --git a/src/app/components/Modal500.tsx b/src/app/components/Modal500.tsx index fc75b8a13..959ff1a01 100644 --- a/src/app/components/Modal500.tsx +++ b/src/app/components/Modal500.tsx @@ -1,4 +1,5 @@ -import { ReactNode, useRef } from 'react'; +import type { ReactNode} from 'react'; +import { useRef } from 'react'; import FocusTrap from 'focus-trap-react'; import { Modal, Overlay, OverlayBackdrop, OverlayCenter } from 'folds'; import { stopPropagation } from '$utils/keyboard'; diff --git a/src/app/components/Pdf-viewer/PdfViewer.tsx b/src/app/components/Pdf-viewer/PdfViewer.tsx index 1bd90c8c2..20e296c24 100644 --- a/src/app/components/Pdf-viewer/PdfViewer.tsx +++ b/src/app/components/Pdf-viewer/PdfViewer.tsx @@ -1,7 +1,10 @@ -/* eslint-disable no-param-reassign */ +/* oxlint-disable no-param-reassign */ -import { FormEventHandler, MouseEventHandler, useEffect, useRef, useState } from 'react'; +import type { FormEventHandler, MouseEventHandler} from 'react'; +import { useEffect, useRef, useState } from 'react'; import classNames from 'classnames'; +import type { + RectCords} from 'folds'; import { Box, Button, @@ -13,7 +16,6 @@ import { Input, Menu, PopOut, - RectCords, Scroll, Spinner, Text, diff --git a/src/app/components/RenderMessageContent.tsx b/src/app/components/RenderMessageContent.tsx index cfc95b2cd..98c5860ca 100644 --- a/src/app/components/RenderMessageContent.tsx +++ b/src/app/components/RenderMessageContent.tsx @@ -1,12 +1,13 @@ import { memo, useMemo, useCallback } from 'react'; -import { IPreviewUrlResponse, MsgType } from '$types/matrix-sdk'; +import type { IPreviewUrlResponse} from '$types/matrix-sdk'; +import { MsgType } from '$types/matrix-sdk'; import { parseSettingsLink } from '$features/settings/settingsLink'; import { useSettingsLinkBaseUrl } from '$features/settings/useSettingsLinkBaseUrl'; import { testMatrixTo } from '$plugins/matrix-to'; import { useSetting } from '$state/hooks/settings'; import { settingsAtom, CaptionPosition } from '$state/settings'; -import { HTMLReactParserOptions } from 'html-react-parser'; -import { Opts } from 'linkifyjs'; +import type { HTMLReactParserOptions } from 'html-react-parser'; +import type { Opts } from 'linkifyjs'; import { Box, config } from 'folds'; import { AudioContent, @@ -80,7 +81,7 @@ function RenderMessageContentInternal({ outlineAttachment, hideCaption, }: RenderMessageContentProps) { - const content = useMemo(() => getContent(), [getContent]); + const content = useMemo(() => getContent>(), [getContent]); const [autoplayGifs] = useSetting(settingsAtom, 'autoplayGifs'); const [captionPosition] = useSetting(settingsAtom, 'captionPosition'); @@ -94,7 +95,7 @@ function RenderMessageContentInternal({ const attachmentDirection = captionPositionMap[captionPosition]; const renderBody = useCallback( - (props: any) => ( + (props: Record) => ( ; } if (clientUrlPreview && youtubeUrl(url)) { - return ; + return ; } if (urlPreview) { return ; diff --git a/src/app/components/RoomNotificationSwitcher.test.tsx b/src/app/components/RoomNotificationSwitcher.test.tsx index ef4938210..6d96809aa 100644 --- a/src/app/components/RoomNotificationSwitcher.test.tsx +++ b/src/app/components/RoomNotificationSwitcher.test.tsx @@ -1,6 +1,8 @@ import { fireEvent, render, screen } from '@testing-library/react'; import { afterEach, describe, expect, it, vi } from 'vitest'; +/* eslint-disable @typescript-eslint/no-explicit-any, @typescript-eslint/consistent-type-imports */ + import { RoomNotificationMode } from '$hooks/useRoomsNotificationPreferences'; import { RoomNotificationModeSwitcher } from './RoomNotificationSwitcher'; diff --git a/src/app/components/RoomNotificationSwitcher.tsx b/src/app/components/RoomNotificationSwitcher.tsx index 2bab6de16..ca2a0cc04 100644 --- a/src/app/components/RoomNotificationSwitcher.tsx +++ b/src/app/components/RoomNotificationSwitcher.tsx @@ -1,5 +1,6 @@ import { Box, Icon, Text } from 'folds'; -import { type MouseEventHandler, ReactNode } from 'react'; +import type { ReactNode } from 'react'; +import { type MouseEventHandler } from 'react'; import { SettingMenuSelector, type SettingMenuOption } from '$components/setting-menu-selector'; import { getRoomNotificationModeIcon, diff --git a/src/app/components/RoomSummaryLoader.tsx b/src/app/components/RoomSummaryLoader.tsx index 93baa5721..378f6cc03 100644 --- a/src/app/components/RoomSummaryLoader.tsx +++ b/src/app/components/RoomSummaryLoader.tsx @@ -1,9 +1,12 @@ -import { ReactNode, useCallback, useState } from 'react'; -import { MatrixClient, Room, IHierarchyRoom } from '$types/matrix-sdk'; +import type { ReactNode} from 'react'; +import { useCallback, useState } from 'react'; +import type { MatrixClient, Room, IHierarchyRoom } from '$types/matrix-sdk'; import { useQuery } from '@tanstack/react-query'; import { useMatrixClient } from '$hooks/useMatrixClient'; -import { LocalRoomSummary, useLocalRoomSummary } from '$hooks/useLocalRoomSummary'; -import { AsyncState, AsyncStatus } from '$hooks/useAsyncCallback'; +import type { LocalRoomSummary} from '$hooks/useLocalRoomSummary'; +import { useLocalRoomSummary } from '$hooks/useLocalRoomSummary'; +import type { AsyncState} from '$hooks/useAsyncCallback'; +import { AsyncStatus } from '$hooks/useAsyncCallback'; export type IRoomSummary = Awaited>; diff --git a/src/app/components/RoomUnreadProvider.tsx b/src/app/components/RoomUnreadProvider.tsx index 5a1fc13a6..5715cc5f1 100644 --- a/src/app/components/RoomUnreadProvider.tsx +++ b/src/app/components/RoomUnreadProvider.tsx @@ -1,5 +1,5 @@ -import { ReactElement } from 'react'; -import { Unread } from '$types/matrix/room'; +import type { ReactElement } from 'react'; +import type { Unread } from '$types/matrix/room'; import { useRoomUnread, useRoomsUnread } from '$state/hooks/unread'; import { roomToUnreadAtom } from '$state/room/roomToUnread'; diff --git a/src/app/components/SecretStorage.tsx b/src/app/components/SecretStorage.tsx index 07b2e15d5..508b9ff21 100644 --- a/src/app/components/SecretStorage.tsx +++ b/src/app/components/SecretStorage.tsx @@ -1,7 +1,8 @@ -import { FormEventHandler, useCallback } from 'react'; +import type { FormEventHandler} from 'react'; +import { useCallback } from 'react'; import { Box, Text, Button, Spinner, color } from 'folds'; import { decodeRecoveryKey, deriveRecoveryKeyFromPassphrase } from '$types/matrix-sdk'; -import { SecretStorageKeyContent, SecretStoragePassphraseContent } from '$types/matrix/accountData'; +import type { SecretStorageKeyContent, SecretStoragePassphraseContent } from '$types/matrix/accountData'; import { AsyncStatus, useAsyncCallback } from '$hooks/useAsyncCallback'; import { useMatrixClient } from '$hooks/useMatrixClient'; import { useAlive } from '$hooks/useAlive'; @@ -36,7 +37,7 @@ export function SecretStorageRecoveryPassphrase({ bits ); - const match = await mx.secretStorage.checkKey(decodedRecoveryKey, keyContent as any); + const match = await mx.secretStorage.checkKey(decodedRecoveryKey, keyContent); if (!match) { throw new Error('Invalid recovery passphrase.'); @@ -128,7 +129,7 @@ export function SecretStorageRecoveryKey({ async (recoveryKey) => { const decodedRecoveryKey = decodeRecoveryKey(recoveryKey); - const match = await mx.secretStorage.checkKey(decodedRecoveryKey, keyContent as any); + const match = await mx.secretStorage.checkKey(decodedRecoveryKey, keyContent); if (!match) { throw new Error('Invalid recovery key.'); diff --git a/src/app/components/ServerConfigsLoader.tsx b/src/app/components/ServerConfigsLoader.tsx index 3f7b395e5..ee5095957 100644 --- a/src/app/components/ServerConfigsLoader.tsx +++ b/src/app/components/ServerConfigsLoader.tsx @@ -1,8 +1,10 @@ -import { ReactNode, useCallback, useMemo } from 'react'; -import { Capabilities, validateAuthMetadata, ValidatedAuthMetadata } from '$types/matrix-sdk'; +import type { ReactNode} from 'react'; +import { useCallback, useMemo } from 'react'; +import type { Capabilities, ValidatedAuthMetadata } from '$types/matrix-sdk'; +import { validateAuthMetadata } from '$types/matrix-sdk'; import { AsyncStatus, useAsyncCallbackValue } from '$hooks/useAsyncCallback'; import { useMatrixClient } from '$hooks/useMatrixClient'; -import { MediaConfig } from '$hooks/useMediaConfig'; +import type { MediaConfig } from '$hooks/useMediaConfig'; import { promiseFulfilledResult } from '$utils/common'; import { createLogger } from '$utils/debug'; diff --git a/src/app/components/SpecVersionsLoader.tsx b/src/app/components/SpecVersionsLoader.tsx index 2bbbff272..466978386 100644 --- a/src/app/components/SpecVersionsLoader.tsx +++ b/src/app/components/SpecVersionsLoader.tsx @@ -1,6 +1,8 @@ -import { ReactNode, useCallback, useEffect, useState } from 'react'; +import type { ReactNode} from 'react'; +import { useCallback, useEffect, useState } from 'react'; import { AsyncStatus, useAsyncCallback } from '$hooks/useAsyncCallback'; -import { SpecVersions, specVersions } from '../cs-api'; +import type { SpecVersions} from '../cs-api'; +import { specVersions } from '../cs-api'; type SpecVersionsLoaderProps = { baseUrl: string; diff --git a/src/app/components/SupportedUIAFlowsLoader.tsx b/src/app/components/SupportedUIAFlowsLoader.tsx index cd3f81499..cbfa7eaef 100644 --- a/src/app/components/SupportedUIAFlowsLoader.tsx +++ b/src/app/components/SupportedUIAFlowsLoader.tsx @@ -1,5 +1,5 @@ -import { ReactNode } from 'react'; -import { UIAFlow } from '$types/matrix-sdk'; +import type { ReactNode } from 'react'; +import type { UIAFlow } from '$types/matrix-sdk'; import { useSupportedUIAFlows } from '$hooks/useUIAFlows'; export function SupportedUIAFlowsLoader({ diff --git a/src/app/components/SwipeableChatWrapper.tsx b/src/app/components/SwipeableChatWrapper.tsx index 2eba0d011..d4a547298 100644 --- a/src/app/components/SwipeableChatWrapper.tsx +++ b/src/app/components/SwipeableChatWrapper.tsx @@ -1,4 +1,4 @@ -import { ReactNode } from 'react'; +import type { ReactNode } from 'react'; import { motion, useMotionValue, useSpring } from 'framer-motion'; import { useDrag } from '@use-gesture/react'; import { useAtomValue } from 'jotai'; diff --git a/src/app/components/SwipeableMessageWrapper.tsx b/src/app/components/SwipeableMessageWrapper.tsx index 4b219355c..0a18e8c6e 100644 --- a/src/app/components/SwipeableMessageWrapper.tsx +++ b/src/app/components/SwipeableMessageWrapper.tsx @@ -1,6 +1,7 @@ import { useMotionValue, useSpring, useTransform, motion } from 'framer-motion'; import { useDrag } from '@use-gesture/react'; -import { ReactNode, useMemo, useState } from 'react'; +import type { ReactNode} from 'react'; +import { useMemo, useState } from 'react'; import { useAtomValue } from 'jotai'; import { config, Icon, Icons } from 'folds'; import { mobileOrTablet } from '$utils/user-agent'; diff --git a/src/app/components/SwipeableOverlayWrapper.tsx b/src/app/components/SwipeableOverlayWrapper.tsx index 15521bb12..a77b802f5 100644 --- a/src/app/components/SwipeableOverlayWrapper.tsx +++ b/src/app/components/SwipeableOverlayWrapper.tsx @@ -1,4 +1,4 @@ -import { ReactNode } from 'react'; +import type { ReactNode } from 'react'; import { motion, useMotionValue, useSpring } from 'framer-motion'; import { useDrag } from '@use-gesture/react'; import { useAtomValue } from 'jotai'; diff --git a/src/app/components/UIAFlowOverlay.tsx b/src/app/components/UIAFlowOverlay.tsx index 85211a0f0..7ad14a7c5 100644 --- a/src/app/components/UIAFlowOverlay.tsx +++ b/src/app/components/UIAFlowOverlay.tsx @@ -1,4 +1,4 @@ -import { ReactNode } from 'react'; +import type { ReactNode } from 'react'; import { Overlay, OverlayBackdrop, diff --git a/src/app/components/UseStateProvider.tsx b/src/app/components/UseStateProvider.tsx index 21e5b3cad..f3f53380b 100644 --- a/src/app/components/UseStateProvider.tsx +++ b/src/app/components/UseStateProvider.tsx @@ -1,4 +1,5 @@ -import { Dispatch, ReactElement, SetStateAction, useState } from 'react'; +import type { Dispatch, ReactElement, SetStateAction} from 'react'; +import { useState } from 'react'; type UseStateProviderProps = { initial: T | (() => T); diff --git a/src/app/components/UserRoomProfileRenderer.tsx b/src/app/components/UserRoomProfileRenderer.tsx index 97489d277..c1b094587 100644 --- a/src/app/components/UserRoomProfileRenderer.tsx +++ b/src/app/components/UserRoomProfileRenderer.tsx @@ -1,7 +1,7 @@ import { Menu, PopOut, toRem } from 'folds'; import FocusTrap from 'focus-trap-react'; import { useCloseUserRoomProfile, useUserRoomProfileState } from '$state/hooks/userRoomProfile'; -import { UserRoomProfileState } from '$state/userRoomProfile'; +import type { UserRoomProfileState } from '$state/userRoomProfile'; import { useAllJoinedRoomsSet, useGetRoom } from '$hooks/useGetRoom'; import { stopPropagation } from '$utils/keyboard'; import { SpaceProvider } from '$hooks/useSpace'; diff --git a/src/app/components/code-highlight/CodeHighlightRenderer.tsx b/src/app/components/code-highlight/CodeHighlightRenderer.tsx index 3e66e74c5..20b5c14e4 100644 --- a/src/app/components/code-highlight/CodeHighlightRenderer.tsx +++ b/src/app/components/code-highlight/CodeHighlightRenderer.tsx @@ -74,7 +74,7 @@ export function CodeHighlightRenderer({ } return ( - // eslint-disable-next-line react/no-danger + // oxlint-disable-next-line react/no-danger ); } diff --git a/src/app/components/create-room/AdditionalCreatorInput.tsx b/src/app/components/create-room/AdditionalCreatorInput.tsx index f362122a0..c7229c62e 100644 --- a/src/app/components/create-room/AdditionalCreatorInput.tsx +++ b/src/app/components/create-room/AdditionalCreatorInput.tsx @@ -1,3 +1,5 @@ +import type { + RectCords} from 'folds'; import { Box, Button, @@ -10,17 +12,17 @@ import { Menu, MenuItem, PopOut, - RectCords, Scroll, Text, toRem, } from 'folds'; import { isKeyHotkey } from 'is-hotkey'; import FocusTrap from 'focus-trap-react'; -import { +import type { ChangeEventHandler, KeyboardEventHandler, - MouseEventHandler, + MouseEventHandler} from 'react'; +import { useMemo, useState, } from 'react'; @@ -28,7 +30,8 @@ import { getMxIdLocalPart, getMxIdServer, isUserId } from '$utils/matrix'; import { useDirectUsers } from '$hooks/useDirectUsers'; import { useMatrixClient } from '$hooks/useMatrixClient'; import { stopPropagation } from '$utils/keyboard'; -import { useAsyncSearch, UseAsyncSearchOptions } from '$hooks/useAsyncSearch'; +import type { UseAsyncSearchOptions } from '$hooks/useAsyncSearch'; +import { useAsyncSearch } from '$hooks/useAsyncSearch'; import { highlightText, makeHighlightRegex } from '$plugins/react-custom-html-parser'; import { SettingTile } from '$components/setting-tile'; @@ -101,7 +104,7 @@ export function AdditionalCreatorInput({ const suggestionUsers = result ? result.items - : filteredUsers.sort((a, b) => (a.toLocaleLowerCase() >= b.toLocaleLowerCase() ? 1 : -1)); + : filteredUsers.toSorted((a, b) => (a.toLocaleLowerCase() >= b.toLocaleLowerCase() ? 1 : -1)); const handleOpenMenu: MouseEventHandler = (evt) => { setMenuCords(evt.currentTarget.getBoundingClientRect()); @@ -224,7 +227,10 @@ export function AdditionalCreatorInput({ grow="Yes" direction="Column" gap="100" - style={{ padding: config.space.S200, paddingRight: 0 }} + style={{ + padding: config.space.S200, + paddingRight: 0, + }} > {suggestionUsers.map((userId) => ( { - const content: Record = {}; + const content: Record = {}; if (typeof type === 'string') { content.type = type; } @@ -152,7 +153,7 @@ export const createRoom = async (mx: MatrixClient, data: CreateRoomData): Promis if (data.parent) { await mx.sendStateEvent( data.parent.roomId, - StateEvent.SpaceChild as any, + StateEvent.SpaceChild as string, { auto_join: false, suggested: false, diff --git a/src/app/components/cutout-card/CutoutCard.tsx b/src/app/components/cutout-card/CutoutCard.tsx index 5a6c2ae3d..d59ef7307 100644 --- a/src/app/components/cutout-card/CutoutCard.tsx +++ b/src/app/components/cutout-card/CutoutCard.tsx @@ -1,4 +1,5 @@ -import { as, ContainerColor as TContainerColor } from 'folds'; +import type { ContainerColor as TContainerColor } from 'folds'; +import { as } from 'folds'; import classNames from 'classnames'; import { ContainerColor } from '$styles/ContainerColor.css'; import * as css from './CutoutCard.css'; diff --git a/src/app/components/editor/Editor.tsx b/src/app/components/editor/Editor.tsx index 7595fd46d..42875589a 100644 --- a/src/app/components/editor/Editor.tsx +++ b/src/app/components/editor/Editor.tsx @@ -1,8 +1,9 @@ -/* eslint-disable no-param-reassign */ -import { +/* oxlint-disable no-param-reassign */ +import type { ClipboardEventHandler, KeyboardEventHandler, - ReactNode, + ReactNode} from 'react'; +import { forwardRef, useCallback, useEffect, @@ -11,21 +12,23 @@ import { useState, } from 'react'; import { Box, Scroll, Text } from 'folds'; -import { Descendant, Editor, Node, createEditor } from 'slate'; +import type { Descendant, Editor} from 'slate'; +import { Node, createEditor } from 'slate'; +import type { + RenderLeafProps, + RenderElementProps, + RenderPlaceholderProps} from 'slate-react'; import { Slate, Editable, withReact, - RenderLeafProps, - RenderElementProps, - RenderPlaceholderProps, ReactEditor, } from 'slate-react'; import { withHistory } from 'slate-history'; import { mobileOrTablet } from '$utils/user-agent'; import { BlockType } from './types'; import { RenderElement, RenderLeaf } from './Elements'; -import { CustomElement } from './slate'; +import type { CustomElement } from './slate'; import * as css from './Editor.css'; import { toggleKeyboardShortcut } from './keyboard'; @@ -436,7 +439,9 @@ export const CustomEditor = forwardRef( ReactEditor.focus(editor), [editor, isActive]); - function handleInput(evt: any) { + function handleInput(evt: KeyboardEvent) { if (!evt) return; if ( isKeyHotkey('arrowdown', evt) || diff --git a/src/app/components/editor/autocomplete/AutocompleteNotice.tsx b/src/app/components/editor/autocomplete/AutocompleteNotice.tsx index a9b21e8cf..c0625a8a3 100644 --- a/src/app/components/editor/autocomplete/AutocompleteNotice.tsx +++ b/src/app/components/editor/autocomplete/AutocompleteNotice.tsx @@ -1,4 +1,4 @@ -import { ReactNode } from 'react'; +import type { ReactNode } from 'react'; import { Header, Menu } from 'folds'; import { BaseAutocompleteMenu } from './BaseAutocompleteMenu'; import * as css from './AutocompleteMenu.css'; diff --git a/src/app/components/editor/autocomplete/BaseAutocompleteMenu.tsx b/src/app/components/editor/autocomplete/BaseAutocompleteMenu.tsx index 9f1bf316f..c25381067 100644 --- a/src/app/components/editor/autocomplete/BaseAutocompleteMenu.tsx +++ b/src/app/components/editor/autocomplete/BaseAutocompleteMenu.tsx @@ -1,4 +1,4 @@ -import { ReactNode } from 'react'; +import type { ReactNode } from 'react'; import * as css from './AutocompleteMenu.css'; type BaseAutocompleteMenuProps = { diff --git a/src/app/components/editor/autocomplete/EmoticonAutocomplete.tsx b/src/app/components/editor/autocomplete/EmoticonAutocomplete.tsx index b4c8e8f46..5e4a5b21e 100644 --- a/src/app/components/editor/autocomplete/EmoticonAutocomplete.tsx +++ b/src/app/components/editor/autocomplete/EmoticonAutocomplete.tsx @@ -1,25 +1,29 @@ -import { KeyboardEvent as ReactKeyboardEvent, useEffect, useMemo } from 'react'; -import { Editor } from 'slate'; +import type { KeyboardEvent as ReactKeyboardEvent} from 'react'; +import { useEffect, useMemo } from 'react'; +import type { Editor } from 'slate'; import { ReactEditor } from 'slate-react'; import { Box, MenuItem, Text, toRem } from 'folds'; -import { Room } from '$types/matrix-sdk'; +import type { Room } from '$types/matrix-sdk'; import { useMatrixClient } from '$hooks/useMatrixClient'; -import { UseAsyncSearchOptions, useAsyncSearch } from '$hooks/useAsyncSearch'; +import type { UseAsyncSearchOptions} from '$hooks/useAsyncSearch'; +import { useAsyncSearch } from '$hooks/useAsyncSearch'; import { onTabPress } from '$utils/keyboard'; import { useRecentEmoji } from '$hooks/useRecentEmoji'; import { useRelevantImagePacks } from '$hooks/useImagePacks'; -import { IEmoji, emojis } from '$plugins/emoji'; +import type { IEmoji} from '$plugins/emoji'; +import { emojis } from '$plugins/emoji'; import { useKeyDown } from '$hooks/useKeyDown'; import { mxcUrlToHttp } from '$utils/matrix'; import { useMediaAuthentication } from '$hooks/useMediaAuthentication'; -import { ImageUsage, PackImageReader } from '$plugins/custom-emoji'; +import type { PackImageReader } from '$plugins/custom-emoji'; +import { ImageUsage } from '$plugins/custom-emoji'; import { getEmoticonSearchStr } from '$plugins/utils'; import { useSetting } from '$state/hooks/settings'; import { settingsAtom } from '$state/settings'; import { createEmoticonElement, moveCursor, replaceWithElement } from '$components/editor/utils'; import { AutocompleteMenu } from './AutocompleteMenu'; -import { AutocompleteQuery } from './autocompleteQuery'; +import type { AutocompleteQuery } from './autocompleteQuery'; type EmoticonCompleteHandler = (key: string, shortcode: string) => void; @@ -129,7 +133,11 @@ export function EmoticonAutocomplete({ as="img" src={customEmojiUrl} alt={emoticon.shortcode} - style={{ width: toRem(24), height: toRem(24), objectFit: 'contain' }} + style={{ + width: toRem(24), + height: toRem(24), + objectFit: 'contain', + }} /> ) : ( void; @@ -80,7 +83,7 @@ export function RoomMentionAutocomplete({ const mx = useMatrixClient(); const mDirects = useAtomValue(mDirectAtom); - const allRooms = useAtomValue(allRoomsAtom).sort(factoryRoomIdByActivity(mx)); + const allRooms = useAtomValue(allRoomsAtom).toSorted(factoryRoomIdByActivity(mx)); const [result, search, resetSearch] = useAsyncSearch( allRooms, diff --git a/src/app/components/editor/autocomplete/UserMentionAutocomplete.tsx b/src/app/components/editor/autocomplete/UserMentionAutocomplete.tsx index e38838070..a7e31888b 100644 --- a/src/app/components/editor/autocomplete/UserMentionAutocomplete.tsx +++ b/src/app/components/editor/autocomplete/UserMentionAutocomplete.tsx @@ -1,12 +1,14 @@ -import { useEffect, KeyboardEvent as ReactKeyboardEvent } from 'react'; -import { Editor } from 'slate'; +import type { KeyboardEvent as ReactKeyboardEvent } from 'react'; +import { useEffect } from 'react'; +import type { Editor } from 'slate'; import { ReactEditor } from 'slate-react'; import { Avatar, Icon, Icons, MenuItem, Text } from 'folds'; -import { MatrixClient, Room, RoomMember } from '$types/matrix-sdk'; +import type { MatrixClient, Room, RoomMember } from '$types/matrix-sdk'; import { useRoomMembers } from '$hooks/useRoomMembers'; import { useMatrixClient } from '$hooks/useMatrixClient'; -import { SearchItemStrGetter, UseAsyncSearchOptions, useAsyncSearch } from '$hooks/useAsyncSearch'; +import type { SearchItemStrGetter, UseAsyncSearchOptions} from '$hooks/useAsyncSearch'; +import { useAsyncSearch } from '$hooks/useAsyncSearch'; import { onTabPress } from '$utils/keyboard'; import { useKeyDown } from '$hooks/useKeyDown'; import { getMxIdLocalPart, getMxIdServer, isUserId } from '$utils/matrix'; @@ -18,7 +20,7 @@ import { useAtomValue } from 'jotai'; import { nicknamesAtom } from '$state/nicknames'; import { createMentionElement, moveCursor, replaceWithElement } from '$components/editor/utils'; import { AutocompleteMenu } from './AutocompleteMenu'; -import { AutocompleteQuery } from './autocompleteQuery'; +import type { AutocompleteQuery } from './autocompleteQuery'; type MentionAutoCompleteHandler = (userId: string, name: string) => void; diff --git a/src/app/components/editor/autocomplete/autocompleteQuery.ts b/src/app/components/editor/autocomplete/autocompleteQuery.ts index 5b8294afb..85008a24e 100644 --- a/src/app/components/editor/autocomplete/autocompleteQuery.ts +++ b/src/app/components/editor/autocomplete/autocompleteQuery.ts @@ -1,4 +1,5 @@ -import { BaseRange, Editor } from 'slate'; +import type { BaseRange} from 'slate'; +import { Editor } from 'slate'; export enum AutocompletePrefix { RoomMention = '#', diff --git a/src/app/components/editor/input.ts b/src/app/components/editor/input.ts index 27a6b68fc..3d3c9a8cf 100644 --- a/src/app/components/editor/input.ts +++ b/src/app/components/editor/input.ts @@ -1,6 +1,8 @@ -import { Descendant, Text } from 'slate'; +import type { Descendant} from 'slate'; +import { Text } from 'slate'; import parse from 'html-dom-parser'; -import { ChildNode, Element, isText, isTag } from 'domhandler'; +import type { ChildNode, Element} from 'domhandler'; +import { isText, isTag } from 'domhandler'; import { sanitizeCustomHtml } from '$utils/sanitize'; import { @@ -11,7 +13,7 @@ import { } from '$plugins/matrix-to'; import { escapeMarkdownInlineSequences, escapeMarkdownBlockSequences } from '$plugins/markdown'; import { BlockType, MarkType } from './types'; -import { +import type { BlockQuoteElement, CodeBlockElement, CodeLineElement, diff --git a/src/app/components/editor/keyboard.ts b/src/app/components/editor/keyboard.ts index a920a9050..5061b735b 100644 --- a/src/app/components/editor/keyboard.ts +++ b/src/app/components/editor/keyboard.ts @@ -1,5 +1,5 @@ import { isKeyHotkey } from 'is-hotkey'; -import { KeyboardEvent } from 'react'; +import type { KeyboardEvent } from 'react'; import { Editor, Element as SlateElement, Range, Transforms } from 'slate'; import { isAnyMarkActive, isBlockActive, removeAllMark, toggleBlock, toggleMark } from './utils'; import { BlockType, MarkType } from './types'; diff --git a/src/app/components/editor/output.ts b/src/app/components/editor/output.ts index 383678e1a..ea4c2c57b 100644 --- a/src/app/components/editor/output.ts +++ b/src/app/components/editor/output.ts @@ -1,5 +1,6 @@ -import { Descendant, Editor, Text } from 'slate'; -import { MatrixClient } from '$types/matrix-sdk'; +import type { Descendant, Editor} from 'slate'; +import { Text } from 'slate'; +import type { MatrixClient } from '$types/matrix-sdk'; import { sanitizeText } from '$utils/sanitize'; import { parseBlockMD, @@ -10,7 +11,7 @@ import { import { findAndReplace } from '$utils/findAndReplace'; import { sanitizeForRegex } from '$utils/regex'; import { isUserId } from '$utils/matrix'; -import { CustomElement } from './slate'; +import type { CustomElement } from './slate'; import { BlockType } from './types'; export type OutputOptions = { diff --git a/src/app/components/editor/slate.d.ts b/src/app/components/editor/slate.d.ts index 81d690fbc..05c8b5aec 100644 --- a/src/app/components/editor/slate.d.ts +++ b/src/app/components/editor/slate.d.ts @@ -1,7 +1,7 @@ -import { BaseEditor } from 'slate'; -import { ReactEditor } from 'slate-react'; -import { HistoryEditor } from 'slate-history'; -import { BlockType } from './types'; +import type { BaseEditor } from 'slate'; +import type { ReactEditor } from 'slate-react'; +import type { HistoryEditor } from 'slate-history'; +import type { BlockType } from './types'; export type HeadingLevel = 1 | 2 | 3; diff --git a/src/app/components/editor/utils.ts b/src/app/components/editor/utils.ts index 85ff437a1..13ce336e4 100644 --- a/src/app/components/editor/utils.ts +++ b/src/app/components/editor/utils.ts @@ -1,6 +1,7 @@ -import { BasePoint, BaseRange, Editor, Element, Point, Range, Text, Transforms } from 'slate'; +import type { BasePoint, BaseRange} from 'slate'; +import { Editor, Element, Point, Range, Text, Transforms } from 'slate'; import { BlockType, MarkType } from './types'; -import { +import type { CommandElement, EmoticonElement, FormattedText, @@ -63,12 +64,12 @@ export const headingLevel = (editor: Editor): HeadingLevel | undefined => { }; type BlockOption = { level: HeadingLevel }; -const NESTED_BLOCK = [ +const NESTED_BLOCK = new Set([ BlockType.OrderedList, BlockType.UnorderedList, BlockType.BlockQuote, BlockType.CodeBlock, -]; +]); export const toggleBlock = (editor: Editor, format: BlockType, option?: BlockOption) => { Transforms.collapse(editor, { @@ -77,7 +78,7 @@ export const toggleBlock = (editor: Editor, format: BlockType, option?: BlockOpt const isActive = isBlockActive(editor, format); Transforms.unwrapNodes(editor, { - match: (node) => Element.isElement(node) && NESTED_BLOCK.includes(node.type), + match: (node) => Element.isElement(node) && NESTED_BLOCK.has(node.type), split: true, }); @@ -161,7 +162,7 @@ export const resetEditor = (editor: Editor) => { }; export const resetEditorHistory = (editor: Editor) => { - // eslint-disable-next-line no-param-reassign + // oxlint-disable-next-line no-param-reassign editor.history = { undos: [], redos: [], @@ -242,7 +243,6 @@ export const getPointUntilChar = ( reverse: options.reverse, }); - // eslint-disable-next-line no-restricted-syntax for (const point of pointItr) { if (!Point.equals(point, cursorPoint) && prevPoint) { char = Editor.string(editor, { anchor: point, focus: prevPoint }); diff --git a/src/app/components/emoji-board/EmojiBoard.tsx b/src/app/components/emoji-board/EmojiBoard.tsx index 193caf71d..6ab770f08 100644 --- a/src/app/components/emoji-board/EmojiBoard.tsx +++ b/src/app/components/emoji-board/EmojiBoard.tsx @@ -1,9 +1,10 @@ -import { +import type { ChangeEventHandler, FocusEventHandler, MouseEventHandler, ReactNode, - RefObject, + RefObject} from 'react'; +import { useCallback, useEffect, useMemo, @@ -12,28 +13,34 @@ import { import { Box, config, Icons, Scroll } from 'folds'; import FocusTrap from 'focus-trap-react'; import { isKeyHotkey } from 'is-hotkey'; -import { Room } from '$types/matrix-sdk'; -import { atom, PrimitiveAtom, useAtom, useSetAtom } from 'jotai'; +import type { Room } from '$types/matrix-sdk'; +import type { PrimitiveAtom} from 'jotai'; +import { atom, useAtom, useSetAtom } from 'jotai'; import { useVirtualizer } from '@tanstack/react-virtual'; -import { IEmoji, emojiGroups, emojis } from '$plugins/emoji'; +import type { IEmoji} from '$plugins/emoji'; +import { emojiGroups, emojis } from '$plugins/emoji'; import { preventScrollWithArrowKey, stopPropagation } from '$utils/keyboard'; import { useRelevantImagePacks } from '$hooks/useImagePacks'; import { useMatrixClient } from '$hooks/useMatrixClient'; import { useRecentEmoji } from '$hooks/useRecentEmoji'; import { isUserId, mxcUrlToHttp } from '$utils/matrix'; import { editableActiveElement, targetFromEvent } from '$utils/dom'; -import { useAsyncSearch, UseAsyncSearchOptions } from '$hooks/useAsyncSearch'; +import type { UseAsyncSearchOptions } from '$hooks/useAsyncSearch'; +import { useAsyncSearch } from '$hooks/useAsyncSearch'; import { useDebounce } from '$hooks/useDebounce'; import { useThrottle } from '$hooks/useThrottle'; import { addRecentEmoji } from '$plugins/recent-emoji'; import { useMediaAuthentication } from '$hooks/useMediaAuthentication'; -import { ImagePack, ImageUsage, PackImageReader } from '$plugins/custom-emoji'; +import type { ImagePack, PackImageReader } from '$plugins/custom-emoji'; +import { ImageUsage } from '$plugins/custom-emoji'; import { getEmoticonSearchStr } from '$plugins/utils'; import { VirtualTile } from '$components/virtualizer'; import { useSetting } from '$state/hooks/settings'; import { settingsAtom } from '$state/settings'; import { useEmojiGroupIcons } from './useEmojiGroupIcons'; import { useEmojiGroupLabels } from './useEmojiGroupLabels'; +import type { + PreviewData} from './components'; import { SearchInput, EmojiBoardTabs, @@ -43,7 +50,6 @@ import { NoStickerPacks, createPreviewDataAtom, Preview, - PreviewData, EmojiItem, StickerItem, CustomEmojiItem, @@ -97,7 +103,7 @@ const useGroups = ( name: label ?? 'Unknown', items: pack .getImages(ImageUsage.Emoticon) - .sort((a, b) => a.shortcode.localeCompare(b.shortcode)), + .toSorted((a, b) => a.shortcode.localeCompare(b.shortcode)), }); }); @@ -125,7 +131,7 @@ const useGroups = ( name: label ?? 'Unknown', items: pack .getImages(ImageUsage.Sticker) - .sort((a, b) => a.shortcode.localeCompare(b.shortcode)), + .toSorted((a, b) => a.shortcode.localeCompare(b.shortcode)), }); }); diff --git a/src/app/components/emoji-board/components/Group.tsx b/src/app/components/emoji-board/components/Group.tsx index 293ac6145..f3cfa0799 100644 --- a/src/app/components/emoji-board/components/Group.tsx +++ b/src/app/components/emoji-board/components/Group.tsx @@ -1,5 +1,5 @@ import { as, Box, Text } from 'folds'; -import { ReactNode } from 'react'; +import type { ReactNode } from 'react'; import classNames from 'classnames'; import * as css from './styles.css'; diff --git a/src/app/components/emoji-board/components/Item.tsx b/src/app/components/emoji-board/components/Item.tsx index c593b5db0..40f1ef1a1 100644 --- a/src/app/components/emoji-board/components/Item.tsx +++ b/src/app/components/emoji-board/components/Item.tsx @@ -1,9 +1,10 @@ import { Box } from 'folds'; -import { MatrixClient } from '$types/matrix-sdk'; -import { PackImageReader } from '$plugins/custom-emoji'; -import { IEmoji } from '$plugins/emoji'; +import type { MatrixClient } from '$types/matrix-sdk'; +import type { PackImageReader } from '$plugins/custom-emoji'; +import type { IEmoji } from '$plugins/emoji'; import { mxcUrlToHttp } from '$utils/matrix'; -import { EmojiItemInfo, EmojiType } from '$components/emoji-board/types'; +import type { EmojiItemInfo} from '$components/emoji-board/types'; +import { EmojiType } from '$components/emoji-board/types'; import * as css from './styles.css'; const ANIMATED_MIME_TYPES = new Set(['image/gif', 'image/apng']); diff --git a/src/app/components/emoji-board/components/Layout.tsx b/src/app/components/emoji-board/components/Layout.tsx index 286006896..ca7197d77 100644 --- a/src/app/components/emoji-board/components/Layout.tsx +++ b/src/app/components/emoji-board/components/Layout.tsx @@ -1,5 +1,5 @@ import { as, Box, Line } from 'folds'; -import { ReactNode } from 'react'; +import type { ReactNode } from 'react'; import classNames from 'classnames'; import * as css from './styles.css'; diff --git a/src/app/components/emoji-board/components/Preview.tsx b/src/app/components/emoji-board/components/Preview.tsx index 1f7cef289..8ebf48859 100644 --- a/src/app/components/emoji-board/components/Preview.tsx +++ b/src/app/components/emoji-board/components/Preview.tsx @@ -1,5 +1,6 @@ import { Box, Text } from 'folds'; -import { Atom, atom, useAtomValue } from 'jotai'; +import type { Atom} from 'jotai'; +import { atom, useAtomValue } from 'jotai'; import { useMatrixClient } from '$hooks/useMatrixClient'; import { useMediaAuthentication } from '$hooks/useMediaAuthentication'; import { mxcUrlToHttp } from '$utils/matrix'; diff --git a/src/app/components/emoji-board/components/SearchInput.tsx b/src/app/components/emoji-board/components/SearchInput.tsx index c3c80e939..e0a39964f 100644 --- a/src/app/components/emoji-board/components/SearchInput.tsx +++ b/src/app/components/emoji-board/components/SearchInput.tsx @@ -1,4 +1,5 @@ -import { ChangeEventHandler, useRef } from 'react'; +import type { ChangeEventHandler} from 'react'; +import { useRef } from 'react'; import { Input, Chip, Icon, Icons, Text } from 'folds'; import { mobileOrTablet } from '$utils/user-agent'; diff --git a/src/app/components/emoji-board/components/Sidebar.tsx b/src/app/components/emoji-board/components/Sidebar.tsx index 70bf87902..702ded91b 100644 --- a/src/app/components/emoji-board/components/Sidebar.tsx +++ b/src/app/components/emoji-board/components/Sidebar.tsx @@ -1,4 +1,6 @@ -import { ReactNode } from 'react'; +import type { ReactNode } from 'react'; +import type { + IconSrc} from 'folds'; import { Box, Scroll, @@ -9,7 +11,6 @@ import { Text, IconButton, Icon, - IconSrc, Icons, } from 'folds'; import classNames from 'classnames'; diff --git a/src/app/components/emoji-board/components/Tabs.tsx b/src/app/components/emoji-board/components/Tabs.tsx index bef95c145..ea308c1b0 100644 --- a/src/app/components/emoji-board/components/Tabs.tsx +++ b/src/app/components/emoji-board/components/Tabs.tsx @@ -1,4 +1,4 @@ -import { CSSProperties } from 'react'; +import type { CSSProperties } from 'react'; import { Badge, Box, Text } from 'folds'; import { EmojiBoardTab } from '$components/emoji-board/types'; diff --git a/src/app/components/emoji-board/useEmojiGroupIcons.ts b/src/app/components/emoji-board/useEmojiGroupIcons.ts index 0b59fbcd9..8a7bc13ec 100644 --- a/src/app/components/emoji-board/useEmojiGroupIcons.ts +++ b/src/app/components/emoji-board/useEmojiGroupIcons.ts @@ -1,5 +1,6 @@ import { useMemo } from 'react'; -import { IconSrc, Icons } from 'folds'; +import type { IconSrc} from 'folds'; +import { Icons } from 'folds'; import { EmojiGroupId } from '$plugins/emoji'; diff --git a/src/app/components/event-history/EventHistory.tsx b/src/app/components/event-history/EventHistory.tsx index f08fd6c0e..7b29f4f53 100644 --- a/src/app/components/event-history/EventHistory.tsx +++ b/src/app/components/event-history/EventHistory.tsx @@ -14,7 +14,7 @@ import { color, config, } from 'folds'; -import { IContent, MatrixEvent, Room } from '$types/matrix-sdk'; +import type { IContent, MatrixEvent, Room } from '$types/matrix-sdk'; import { getMemberDisplayName } from '$utils/room'; import { getMxIdLocalPart } from '$utils/matrix'; import { useMatrixClient } from '$hooks/useMatrixClient'; @@ -30,8 +30,8 @@ import { useSetting } from '$state/hooks/settings'; import { settingsAtom } from '$state/settings'; import { useCallback, useMemo, useState } from 'react'; import { getReactCustomHtmlParser, LINKIFY_OPTS } from '$plugins/react-custom-html-parser'; -import { Opts as LinkifyOpts } from 'linkifyjs'; -import { HTMLReactParserOptions } from 'html-react-parser'; +import type { Opts as LinkifyOpts } from 'linkifyjs'; +import type { HTMLReactParserOptions } from 'html-react-parser'; import { useSpoilerClickHandler } from '$hooks/useSpoilerClickHandler'; import { modalAtom, ModalType } from '$state/modal'; import { roomIdToReplyDraftAtomFamily } from '$state/room/roomInputDrafts'; @@ -269,11 +269,16 @@ export const EventHistory = as<'div', EventHistoryProps>( {mEvents.map((mEvent) => { - if (!mEvent.event.sender) return
; + if (!mEvent.event.sender) return
; const EventContent = mEvent.getOriginalContent(); return ( <> -
+
); diff --git a/src/app/components/event-readers/EventReaders.tsx b/src/app/components/event-readers/EventReaders.tsx index 6bb1737b4..b1c2b9d2b 100644 --- a/src/app/components/event-readers/EventReaders.tsx +++ b/src/app/components/event-readers/EventReaders.tsx @@ -12,7 +12,7 @@ import { as, config, } from 'folds'; -import { Room } from '$types/matrix-sdk'; +import type { Room } from '$types/matrix-sdk'; import { useRoomEventReaders } from '$hooks/useRoomEventReaders'; import { getMemberDisplayName } from '$utils/room'; import { getMxIdLocalPart } from '$utils/matrix'; diff --git a/src/app/components/image-pack-view/ImagePackContent.tsx b/src/app/components/image-pack-view/ImagePackContent.tsx index 6f56d70f3..43de468e1 100644 --- a/src/app/components/image-pack-view/ImagePackContent.tsx +++ b/src/app/components/image-pack-view/ImagePackContent.tsx @@ -1,18 +1,20 @@ import { useCallback, useEffect, useMemo, useState } from 'react'; import { as, Box, Text, config, Button, Menu, Spinner } from 'folds'; -import { +import type { ImagePack, ImageUsage, PackContent, - PackImage, + PackImage} from '$plugins/custom-emoji'; +import { PackImageReader, packMetaEqual, PackMetaReader, } from '$plugins/custom-emoji'; import { useMediaAuthentication } from '$hooks/useMediaAuthentication'; import { useFilePicker } from '$hooks/useFilePicker'; -import { UploadSuccess } from '$state/upload'; -import { getImageInfo, TUploadContent } from '$utils/matrix'; +import type { UploadSuccess } from '$state/upload'; +import type { TUploadContent } from '$utils/matrix'; +import { getImageInfo } from '$utils/matrix'; import { getImageFileUrl, loadImageElement, renameFile } from '$utils/dom'; import { replaceSpaceWithDash, suffixRename } from '$utils/common'; import { getFileNameWithoutExt } from '$utils/mimeTypes'; diff --git a/src/app/components/image-pack-view/ImagePackView.tsx b/src/app/components/image-pack-view/ImagePackView.tsx index 304275e54..4f4c51519 100644 --- a/src/app/components/image-pack-view/ImagePackView.tsx +++ b/src/app/components/image-pack-view/ImagePackView.tsx @@ -1,5 +1,5 @@ import { Box, IconButton, Text, Icon, Icons, Scroll, Chip } from 'folds'; -import { PackAddress } from '$plugins/custom-emoji'; +import type { PackAddress } from '$plugins/custom-emoji'; import { useMatrixClient } from '$hooks/useMatrixClient'; import { Page, PageHeader, PageContent } from '$components/page'; import { RoomImagePack } from './RoomImagePack'; diff --git a/src/app/components/image-pack-view/ImageTile.tsx b/src/app/components/image-pack-view/ImageTile.tsx index 2070f00e4..468c09fd0 100644 --- a/src/app/components/image-pack-view/ImageTile.tsx +++ b/src/app/components/image-pack-view/ImageTile.tsx @@ -1,10 +1,13 @@ -import { FormEventHandler, ReactNode, useMemo, useState } from 'react'; +import type { FormEventHandler, ReactNode} from 'react'; +import { useMemo, useState } from 'react'; import { Badge, Box, Button, Chip, Icon, Icons, Input, Text } from 'folds'; import { mxcUrlToHttp } from '$utils/matrix'; -import { ImageUsage, imageUsageEqual, PackImageReader } from '$plugins/custom-emoji'; +import type { ImageUsage} from '$plugins/custom-emoji'; +import { imageUsageEqual, PackImageReader } from '$plugins/custom-emoji'; import { useMatrixClient } from '$hooks/useMatrixClient'; import { useObjectURL } from '$hooks/useObjectURL'; -import { createUploadAtom, TUploadAtom } from '$state/upload'; +import type { TUploadAtom } from '$state/upload'; +import { createUploadAtom } from '$state/upload'; import { replaceSpaceWithDash } from '$utils/common'; import { SettingTile } from '$components/setting-tile'; import * as css from './style.css'; diff --git a/src/app/components/image-pack-view/PackMeta.tsx b/src/app/components/image-pack-view/PackMeta.tsx index 77e8a42f5..82bafb4f9 100644 --- a/src/app/components/image-pack-view/PackMeta.tsx +++ b/src/app/components/image-pack-view/PackMeta.tsx @@ -1,4 +1,5 @@ -import { FormEventHandler, useCallback, useMemo, useState } from 'react'; +import type { FormEventHandler} from 'react'; +import { useCallback, useMemo, useState } from 'react'; import { Box, Text, @@ -21,7 +22,8 @@ import { LINKIFY_OPTS } from '$plugins/react-custom-html-parser'; import { ContainerColor } from '$styles/ContainerColor.css'; import { useFilePicker } from '$hooks/useFilePicker'; import { useObjectURL } from '$hooks/useObjectURL'; -import { createUploadAtom, UploadSuccess } from '$state/upload'; +import type { UploadSuccess } from '$state/upload'; +import { createUploadAtom } from '$state/upload'; import { useMediaAuthentication } from '$hooks/useMediaAuthentication'; import { PackMetaReader } from '$plugins/custom-emoji'; import { CompactUploadCardRenderer } from '$components/upload-card'; diff --git a/src/app/components/image-pack-view/RoomImagePack.tsx b/src/app/components/image-pack-view/RoomImagePack.tsx index 01f0f7dd7..5503e1cf9 100644 --- a/src/app/components/image-pack-view/RoomImagePack.tsx +++ b/src/app/components/image-pack-view/RoomImagePack.tsx @@ -1,8 +1,9 @@ import { useCallback, useMemo } from 'react'; -import { Room } from '$types/matrix-sdk'; +import type { Room } from '$types/matrix-sdk'; import { usePowerLevels } from '$hooks/usePowerLevels'; import { useMatrixClient } from '$hooks/useMatrixClient'; -import { ImagePack, PackContent } from '$plugins/custom-emoji'; +import type { PackContent } from '$plugins/custom-emoji'; +import { ImagePack } from '$plugins/custom-emoji'; import { StateEvent } from '$types/matrix/room'; import { useRoomImagePack } from '$hooks/useImagePacks'; import { randomStr } from '$utils/common'; diff --git a/src/app/components/image-pack-view/UsageSwitcher.tsx b/src/app/components/image-pack-view/UsageSwitcher.tsx index 201a40aaa..57997c25b 100644 --- a/src/app/components/image-pack-view/UsageSwitcher.tsx +++ b/src/app/components/image-pack-view/UsageSwitcher.tsx @@ -1,5 +1,7 @@ -import { MouseEventHandler, useMemo, useState } from 'react'; -import { Box, Button, config, Icon, Icons, Menu, MenuItem, PopOut, RectCords, Text } from 'folds'; +import type { MouseEventHandler} from 'react'; +import { useMemo, useState } from 'react'; +import type { RectCords} from 'folds'; +import { Box, Button, config, Icon, Icons, Menu, MenuItem, PopOut, Text } from 'folds'; import FocusTrap from 'focus-trap-react'; import { ImageUsage } from '$plugins/custom-emoji'; import { stopPropagation } from '$utils/keyboard'; diff --git a/src/app/components/image-pack-view/UserImagePack.tsx b/src/app/components/image-pack-view/UserImagePack.tsx index a723b83ab..7b6feb077 100644 --- a/src/app/components/image-pack-view/UserImagePack.tsx +++ b/src/app/components/image-pack-view/UserImagePack.tsx @@ -1,5 +1,6 @@ import { useCallback, useMemo } from 'react'; -import { ImagePack, PackContent } from '$plugins/custom-emoji'; +import type { PackContent } from '$plugins/custom-emoji'; +import { ImagePack } from '$plugins/custom-emoji'; import { useMatrixClient } from '$hooks/useMatrixClient'; import { AccountDataEvent } from '$types/matrix/accountData'; import { useUserImagePack } from '$hooks/useImagePacks'; diff --git a/src/app/components/info-card/InfoCard.tsx b/src/app/components/info-card/InfoCard.tsx index 6070479ca..34a91c50e 100644 --- a/src/app/components/info-card/InfoCard.tsx +++ b/src/app/components/info-card/InfoCard.tsx @@ -1,5 +1,6 @@ -import { Box, ContainerColor, Text } from 'folds'; -import { ReactNode } from 'react'; +import type { ContainerColor} from 'folds'; +import { Box, Text } from 'folds'; +import type { ReactNode } from 'react'; import classNames from 'classnames'; import { BreakWord } from '$styles/Text.css'; import { ContainerColor as ContainerClr } from '$styles/ContainerColor.css'; diff --git a/src/app/components/invite-user-prompt/InviteUserPrompt.tsx b/src/app/components/invite-user-prompt/InviteUserPrompt.tsx index c8fbabef5..6d7ceeb70 100644 --- a/src/app/components/invite-user-prompt/InviteUserPrompt.tsx +++ b/src/app/components/invite-user-prompt/InviteUserPrompt.tsx @@ -1,7 +1,8 @@ -import { +import type { ChangeEventHandler, FormEventHandler, - KeyboardEventHandler, + KeyboardEventHandler} from 'react'; +import { useCallback, useMemo, useRef, @@ -29,14 +30,15 @@ import { Scroll, MenuItem, } from 'folds'; -import { Room } from '$types/matrix-sdk'; +import type { Room } from '$types/matrix-sdk'; import { isKeyHotkey } from 'is-hotkey'; import FocusTrap from 'focus-trap-react'; import { stopPropagation } from '$utils/keyboard'; import { useDirectUsers } from '$hooks/useDirectUsers'; import { getMxIdLocalPart, getMxIdServer, isUserId } from '$utils/matrix'; import { Membership } from '$types/matrix/room'; -import { useAsyncSearch, UseAsyncSearchOptions } from '$hooks/useAsyncSearch'; +import type { UseAsyncSearchOptions } from '$hooks/useAsyncSearch'; +import { useAsyncSearch } from '$hooks/useAsyncSearch'; import { highlightText, makeHighlightRegex } from '$plugins/react-custom-html-parser'; import { AsyncStatus, useAsyncCallback } from '$hooks/useAsyncCallback'; import { useMatrixClient } from '$hooks/useMatrixClient'; @@ -215,9 +217,20 @@ export function InviteUserPrompt({ room, requestClose }: InviteUserProps) { }} > - + -
+
{result.items.map((userId) => { const username = `${getMxIdLocalPart(userId)}`; const userServer = getMxIdServer(userId); diff --git a/src/app/components/join-address-prompt/JoinAddressPrompt.tsx b/src/app/components/join-address-prompt/JoinAddressPrompt.tsx index d6a6478d2..219b9a009 100644 --- a/src/app/components/join-address-prompt/JoinAddressPrompt.tsx +++ b/src/app/components/join-address-prompt/JoinAddressPrompt.tsx @@ -1,4 +1,5 @@ -import { FormEventHandler, useState } from 'react'; +import type { FormEventHandler} from 'react'; +import { useState } from 'react'; import FocusTrap from 'focus-trap-react'; import { Dialog, diff --git a/src/app/components/knock-room-prompt/KnockRoomPrompt.tsx b/src/app/components/knock-room-prompt/KnockRoomPrompt.tsx index a7948e9ab..5974cb0f6 100644 --- a/src/app/components/knock-room-prompt/KnockRoomPrompt.tsx +++ b/src/app/components/knock-room-prompt/KnockRoomPrompt.tsx @@ -1,4 +1,5 @@ -import { useCallback, useEffect, FormEventHandler } from 'react'; +import type { FormEventHandler } from 'react'; +import { useCallback, useEffect } from 'react'; import FocusTrap from 'focus-trap-react'; import { Dialog, @@ -17,7 +18,7 @@ import { Button, Spinner, } from 'folds'; -import { MatrixError } from '$types/matrix-sdk'; +import type { MatrixError } from '$types/matrix-sdk'; import { useMatrixClient } from '$hooks/useMatrixClient'; import { AsyncStatus, useAsyncCallback } from '$hooks/useAsyncCallback'; diff --git a/src/app/components/leave-room-prompt/LeaveRoomPrompt.tsx b/src/app/components/leave-room-prompt/LeaveRoomPrompt.tsx index 36cdd89de..d9b97f0fc 100644 --- a/src/app/components/leave-room-prompt/LeaveRoomPrompt.tsx +++ b/src/app/components/leave-room-prompt/LeaveRoomPrompt.tsx @@ -16,7 +16,7 @@ import { Button, Spinner, } from 'folds'; -import { MatrixError } from '$types/matrix-sdk'; +import type { MatrixError } from '$types/matrix-sdk'; import { useMatrixClient } from '$hooks/useMatrixClient'; import { AsyncStatus, useAsyncCallback } from '$hooks/useAsyncCallback'; import { stopPropagation } from '$utils/keyboard'; diff --git a/src/app/components/leave-space-prompt/LeaveSpacePrompt.tsx b/src/app/components/leave-space-prompt/LeaveSpacePrompt.tsx index 5bee7af26..c6aef838d 100644 --- a/src/app/components/leave-space-prompt/LeaveSpacePrompt.tsx +++ b/src/app/components/leave-space-prompt/LeaveSpacePrompt.tsx @@ -16,7 +16,7 @@ import { Button, Spinner, } from 'folds'; -import { MatrixError } from '$types/matrix-sdk'; +import type { MatrixError } from '$types/matrix-sdk'; import { useMatrixClient } from '$hooks/useMatrixClient'; import { AsyncStatus, useAsyncCallback } from '$hooks/useAsyncCallback'; import { stopPropagation } from '$utils/keyboard'; diff --git a/src/app/components/media/Image.tsx b/src/app/components/media/Image.tsx index 29990e99e..bac5bf107 100644 --- a/src/app/components/media/Image.tsx +++ b/src/app/components/media/Image.tsx @@ -1,4 +1,5 @@ -import { ImgHTMLAttributes, forwardRef } from 'react'; +import type { ImgHTMLAttributes} from 'react'; +import { forwardRef } from 'react'; import classNames from 'classnames'; import * as css from './media.css'; diff --git a/src/app/components/media/MediaControls.tsx b/src/app/components/media/MediaControls.tsx index 2360b9f96..313f138e3 100644 --- a/src/app/components/media/MediaControls.tsx +++ b/src/app/components/media/MediaControls.tsx @@ -1,4 +1,4 @@ -import { ReactNode } from 'react'; +import type { ReactNode } from 'react'; import { Box, as } from 'folds'; export type MediaControlProps = { diff --git a/src/app/components/media/Video.tsx b/src/app/components/media/Video.tsx index c28efcaa3..a48e2dd52 100644 --- a/src/app/components/media/Video.tsx +++ b/src/app/components/media/Video.tsx @@ -1,10 +1,11 @@ -import { VideoHTMLAttributes, forwardRef, useEffect, useRef } from 'react'; +import type { VideoHTMLAttributes} from 'react'; +import { forwardRef, useEffect, useRef } from 'react'; import classNames from 'classnames'; import * as css from './media.css'; export const Video = forwardRef>( ({ className, ...props }, ref) => ( - // eslint-disable-next-line jsx-a11y/media-has-caption + // oxlint-disable-next-line jsx-a11y/media-has-caption