diff --git a/package.json b/package.json index 2cf05609..cacd969b 100644 --- a/package.json +++ b/package.json @@ -125,6 +125,7 @@ "vitest-axe": "^1.0.0-pre.3" }, "resolutions": { - "@livekit/components-core/rxjs": "^7.8.1" + "@livekit/components-core/rxjs": "^7.8.1", + "matrix-widget-api": "1.11.0" } } diff --git a/renovate.json b/renovate.json index 23ed1be2..31709cf0 100644 --- a/renovate.json +++ b/renovate.json @@ -24,6 +24,11 @@ "matchDepNames": ["matrix-js-sdk"], "enabled": false }, + { + "groupName": "matrix-widget-api", + "matchDepNames": ["matrix-widget-api"], + "extends": ["schedule:weekly"] + }, { "groupName": "Compound", "matchPackageNames": ["@vector-im/compound-{/,}**"], diff --git a/src/@types/global.d.ts b/src/@types/global.d.ts index 2922ca06..ac5ed913 100644 --- a/src/@types/global.d.ts +++ b/src/@types/global.d.ts @@ -5,7 +5,6 @@ SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial Please see LICENSE in the repository root for full details. */ -import "matrix-js-sdk/lib/types"; import { type setLogLevel as setLKLogLevel } from "livekit-client"; import type { DurationFormat as PolyfillDurationFormat } from "@formatjs/intl-durationformat"; diff --git a/src/home/CallList.tsx b/src/home/CallList.tsx index b80ff8da..2e3d1db3 100644 --- a/src/home/CallList.tsx +++ b/src/home/CallList.tsx @@ -6,15 +6,13 @@ Please see LICENSE in the repository root for full details. */ import { Link } from "react-router-dom"; -import { type MatrixClient } from "matrix-js-sdk"; -import { type RoomMember } from "matrix-js-sdk"; -import { type Room } from "matrix-js-sdk"; import { type FC, useCallback, type MouseEvent, useState } from "react"; import { useTranslation } from "react-i18next"; import { IconButton, Text } from "@vector-im/compound-web"; import { CloseIcon } from "@vector-im/compound-design-tokens/assets/web/icons"; import classNames from "classnames"; +import type { RoomMember, Room, MatrixClient } from "matrix-js-sdk"; import { Avatar, Size } from "../Avatar"; import styles from "./CallList.module.css"; import { getRelativeRoomUrl } from "../utils/matrix"; diff --git a/src/profile/useProfile.ts b/src/profile/useProfile.ts index 8f68747f..b588f053 100644 --- a/src/profile/useProfile.ts +++ b/src/profile/useProfile.ts @@ -5,10 +5,10 @@ SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial Please see LICENSE in the repository root for full details. */ -import { type MatrixClient } from "matrix-js-sdk"; import { type MatrixEvent, type User, + type MatrixClient, UserEvent, type FileType, } from "matrix-js-sdk"; diff --git a/src/room/GroupCallView.test.tsx b/src/room/GroupCallView.test.tsx index 0283bef1..655096f1 100644 --- a/src/room/GroupCallView.test.tsx +++ b/src/room/GroupCallView.test.tsx @@ -7,10 +7,9 @@ Please see LICENSE in the repository root for full details. import { beforeEach, expect, type MockedFunction, test, vitest } from "vitest"; import { render, waitFor, screen } from "@testing-library/react"; -import { type MatrixClient } from "matrix-js-sdk"; +import { type MatrixClient, JoinRule, type RoomState } from "matrix-js-sdk"; import { type MatrixRTCSession } from "matrix-js-sdk/lib/matrixrtc"; import { of } from "rxjs"; -import { JoinRule, type RoomState } from "matrix-js-sdk"; import { BrowserRouter } from "react-router-dom"; import userEvent from "@testing-library/user-event"; import { type RelationsContainer } from "matrix-js-sdk/lib/models/relations-container"; diff --git a/src/room/GroupCallView.tsx b/src/room/GroupCallView.tsx index 06fcfa4e..d5cd27e8 100644 --- a/src/room/GroupCallView.tsx +++ b/src/room/GroupCallView.tsx @@ -13,7 +13,7 @@ import { useMemo, useState, } from "react"; -import { type MatrixClient } from "matrix-js-sdk"; +import { type MatrixClient, JoinRule, type Room } from "matrix-js-sdk"; import { Room as LivekitRoom, isE2EESupported as isE2EESupportedBrowser, @@ -23,7 +23,6 @@ import { MatrixRTCSessionEvent, type MatrixRTCSession, } from "matrix-js-sdk/lib/matrixrtc"; -import { JoinRule, type Room } from "matrix-js-sdk"; import { useNavigate } from "react-router-dom"; import type { IWidgetApiRequest } from "matrix-widget-api"; diff --git a/src/room/useJoinRule.ts b/src/room/useJoinRule.ts index d2a7143f..ae17e162 100644 --- a/src/room/useJoinRule.ts +++ b/src/room/useJoinRule.ts @@ -6,9 +6,8 @@ Please see LICENSE in the repository root for full details. */ import { useCallback } from "react"; -import { type JoinRule } from "matrix-js-sdk"; -import type { Room } from "matrix-js-sdk"; +import type { JoinRule, Room } from "matrix-js-sdk"; import { useRoomState } from "./useRoomState"; export function useJoinRule(room: Room): JoinRule { diff --git a/src/utils/matrix.ts b/src/utils/matrix.ts index acc7fa11..963ca962 100644 --- a/src/utils/matrix.ts +++ b/src/utils/matrix.ts @@ -5,20 +5,19 @@ SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial Please see LICENSE in the repository root for full details. */ -import { IndexedDBStore } from "matrix-js-sdk"; -import { MemoryStore } from "matrix-js-sdk"; import { + ClientEvent, createClient, - type ICreateClientOpts, + IndexedDBStore, + MemoryStore, Preset, Visibility, } from "matrix-js-sdk"; -import { ClientEvent } from "matrix-js-sdk"; import { type ISyncStateData, type SyncState } from "matrix-js-sdk/lib/sync"; import { logger } from "matrix-js-sdk/lib/logger"; import { secureRandomBase64Url } from "matrix-js-sdk/lib/randomstring"; -import type { MatrixClient, Room } from "matrix-js-sdk"; +import type { ICreateClientOpts, MatrixClient, Room } from "matrix-js-sdk"; import IndexedDBWorker from "../IndexedDBWorker?worker"; import { generateUrlSearchParams, getUrlParams } from "../UrlParams"; import { Config } from "../config/Config"; diff --git a/src/utils/test-viewmodel.ts b/src/utils/test-viewmodel.ts index ca358c2c..c8a93c73 100644 --- a/src/utils/test-viewmodel.ts +++ b/src/utils/test-viewmodel.ts @@ -6,8 +6,6 @@ Please see LICENSE in the repository root for full details. */ import { ConnectionState } from "livekit-client"; -import { type MatrixClient } from "matrix-js-sdk"; -import { type RoomMember } from "matrix-js-sdk"; import { type CallMembership, type MatrixRTCSession, @@ -17,6 +15,7 @@ import { vitest } from "vitest"; import { type RelationsContainer } from "matrix-js-sdk/lib/models/relations-container"; import EventEmitter from "events"; +import type { RoomMember, MatrixClient } from "matrix-js-sdk"; import { E2eeType } from "../e2ee/e2eeType"; import { CallViewModel } from "../state/CallViewModel"; import { mockLivekitRoom, mockMatrixRoom, MockRTCSession } from "./test"; diff --git a/src/widget.ts b/src/widget.ts index d3124dc9..e04ed657 100644 --- a/src/widget.ts +++ b/src/widget.ts @@ -6,8 +6,7 @@ Please see LICENSE in the repository root for full details. */ import { logger } from "matrix-js-sdk/lib/logger"; -import { EventType } from "matrix-js-sdk"; -import { createRoomWidgetClient } from "matrix-js-sdk"; +import { EventType, createRoomWidgetClient } from "matrix-js-sdk"; import { WidgetApi, MatrixCapabilities,