Merge pull request #3093 from element-hq/toger5/src-to-lib-import

Transition from consuming js-sdk source to `lib` (build output)
This commit is contained in:
Robin
2025-03-27 16:13:05 -04:00
committed by GitHub
103 changed files with 209 additions and 225 deletions

View File

@@ -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. Please see LICENSE in the repository root for full details.
*/ */
import "matrix-js-sdk/src/@types/global";
import { type setLogLevel as setLKLogLevel } from "livekit-client"; import { type setLogLevel as setLKLogLevel } from "livekit-client";
import type { DurationFormat as PolyfillDurationFormat } from "@formatjs/intl-durationformat"; import type { DurationFormat as PolyfillDurationFormat } from "@formatjs/intl-durationformat";

View File

@@ -11,7 +11,7 @@ import {
} from "../reactions"; } from "../reactions";
// Extend Matrix JS SDK types via Typescript declaration merging to support unspecced event fields and types // Extend Matrix JS SDK types via Typescript declaration merging to support unspecced event fields and types
declare module "matrix-js-sdk/src/types" { declare module "matrix-js-sdk/lib/types" {
export interface TimelineEvents { export interface TimelineEvents {
[ElementCallReactionEventType]: ECallReactionEventContent; [ElementCallReactionEventType]: ECallReactionEventContent;
} }

View File

@@ -9,7 +9,7 @@ import { type FC, type JSX, Suspense, useEffect, useState } from "react";
import { BrowserRouter, Route, useLocation, Routes } from "react-router-dom"; import { BrowserRouter, Route, useLocation, Routes } from "react-router-dom";
import * as Sentry from "@sentry/react"; import * as Sentry from "@sentry/react";
import { TooltipProvider } from "@vector-im/compound-web"; import { TooltipProvider } from "@vector-im/compound-web";
import { logger } from "matrix-js-sdk/src/logger"; import { logger } from "matrix-js-sdk/lib/logger";
import { HomePage } from "./home/HomePage"; import { HomePage } from "./home/HomePage";
import { LoginPage } from "./auth/LoginPage"; import { LoginPage } from "./auth/LoginPage";

View File

@@ -7,7 +7,7 @@ Please see LICENSE in the repository root for full details.
import { afterEach, expect, test, vi } from "vitest"; import { afterEach, expect, test, vi } from "vitest";
import { render, screen } from "@testing-library/react"; import { render, screen } from "@testing-library/react";
import { type MatrixClient } from "matrix-js-sdk/src/client"; import { type MatrixClient } from "matrix-js-sdk";
import { type FC, type PropsWithChildren } from "react"; import { type FC, type PropsWithChildren } from "react";
import { ClientContextProvider } from "./ClientContext"; import { ClientContextProvider } from "./ClientContext";

View File

@@ -13,7 +13,7 @@ import {
useEffect, useEffect,
} from "react"; } from "react";
import { Avatar as CompoundAvatar } from "@vector-im/compound-web"; import { Avatar as CompoundAvatar } from "@vector-im/compound-web";
import { type MatrixClient } from "matrix-js-sdk/src/client"; import { type MatrixClient } from "matrix-js-sdk";
import { useClientState } from "./ClientContext"; import { useClientState } from "./ClientContext";

View File

@@ -17,9 +17,9 @@ import {
type JSX, type JSX,
} from "react"; } from "react";
import { useNavigate } from "react-router-dom"; import { useNavigate } from "react-router-dom";
import { logger } from "matrix-js-sdk/src/logger"; import { logger } from "matrix-js-sdk/lib/logger";
import { type ISyncStateData, type SyncState } from "matrix-js-sdk/src/sync"; import { type ISyncStateData, type SyncState } from "matrix-js-sdk/lib/sync";
import { ClientEvent, type MatrixClient } from "matrix-js-sdk/src/client"; import { ClientEvent, type MatrixClient } from "matrix-js-sdk";
import type { WidgetApi } from "matrix-widget-api"; import type { WidgetApi } from "matrix-widget-api";
import { ErrorPage } from "./FullScreenView"; import { ErrorPage } from "./FullScreenView";

View File

@@ -15,7 +15,7 @@ import {
type ReactElement, type ReactElement,
} from "react"; } from "react";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
import { logger } from "matrix-js-sdk/src/logger"; import { logger } from "matrix-js-sdk/lib/logger";
import { RageshakeButton } from "./settings/RageshakeButton"; import { RageshakeButton } from "./settings/RageshakeButton";
import styles from "./ErrorView.module.css"; import styles from "./ErrorView.module.css";

View File

@@ -9,7 +9,7 @@ import { type FC, type ReactElement, type ReactNode, useEffect } from "react";
import classNames from "classnames"; import classNames from "classnames";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
import * as Sentry from "@sentry/react"; import * as Sentry from "@sentry/react";
import { logger } from "matrix-js-sdk/src/logger"; import { logger } from "matrix-js-sdk/lib/logger";
import { ErrorIcon } from "@vector-im/compound-design-tokens/assets/web/icons"; import { ErrorIcon } from "@vector-im/compound-design-tokens/assets/web/icons";
import { Header, HeaderLogo, LeftNav, RightNav } from "./Header"; import { Header, HeaderLogo, LeftNav, RightNav } from "./Header";

View File

@@ -5,7 +5,7 @@ SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial
Please see LICENSE in the repository root for full details. Please see LICENSE in the repository root for full details.
*/ */
import { IndexedDBStoreWorker } from "matrix-js-sdk/src/indexeddb-worker"; import { IndexedDBStoreWorker } from "matrix-js-sdk/lib/indexeddb-worker";
// eslint-disable-next-line @typescript-eslint/no-explicit-any // eslint-disable-next-line @typescript-eslint/no-explicit-any
const remoteWorker = new IndexedDBStoreWorker((self as any).postMessage); const remoteWorker = new IndexedDBStoreWorker((self as any).postMessage);

View File

@@ -7,7 +7,7 @@ Please see LICENSE in the repository root for full details.
import { useMemo } from "react"; import { useMemo } from "react";
import { useLocation } from "react-router-dom"; import { useLocation } from "react-router-dom";
import { logger } from "matrix-js-sdk/src/logger"; import { logger } from "matrix-js-sdk/lib/logger";
import { Config } from "./config/Config"; import { Config } from "./config/Config";
import { type EncryptionSystem } from "./e2ee/sharedKeyManagement"; import { type EncryptionSystem } from "./e2ee/sharedKeyManagement";

View File

@@ -7,7 +7,7 @@ Please see LICENSE in the repository root for full details.
import { type FC, useCallback, useState } from "react"; import { type FC, useCallback, useState } from "react";
import { useNavigate, useLocation } from "react-router-dom"; import { useNavigate, useLocation } from "react-router-dom";
import { logger } from "matrix-js-sdk/src/logger"; import { logger } from "matrix-js-sdk/lib/logger";
import { useClientLegacy } from "./ClientContext"; import { useClientLegacy } from "./ClientContext";
import { useProfile } from "./profile/useProfile"; import { useProfile } from "./profile/useProfile";

View File

@@ -10,8 +10,8 @@ import posthog, {
type PostHog, type PostHog,
type Properties, type Properties,
} from "posthog-js"; } from "posthog-js";
import { logger } from "matrix-js-sdk/src/logger"; import { logger } from "matrix-js-sdk/lib/logger";
import { type MatrixClient } from "matrix-js-sdk/src/matrix"; import { type MatrixClient } from "matrix-js-sdk";
import { type Subscription } from "rxjs"; import { type Subscription } from "rxjs";
import { widget } from "../widget"; import { widget } from "../widget";

View File

@@ -6,8 +6,8 @@ Please see LICENSE in the repository root for full details.
*/ */
import { type DisconnectReason } from "livekit-client"; import { type DisconnectReason } from "livekit-client";
import { logger } from "matrix-js-sdk/src/logger"; import { logger } from "matrix-js-sdk/lib/logger";
import { type MatrixRTCSession } from "matrix-js-sdk/src/matrixrtc"; import { type MatrixRTCSession } from "matrix-js-sdk/lib/matrixrtc";
import { import {
type IPosthogEvent, type IPosthogEvent,

View File

@@ -11,7 +11,7 @@ import {
type Span, type Span,
} from "@opentelemetry/sdk-trace-base"; } from "@opentelemetry/sdk-trace-base";
import { hrTimeToMilliseconds } from "@opentelemetry/core"; import { hrTimeToMilliseconds } from "@opentelemetry/core";
import { logger } from "matrix-js-sdk/src/logger"; import { logger } from "matrix-js-sdk/lib/logger";
import { PosthogAnalytics } from "./PosthogAnalytics"; import { PosthogAnalytics } from "./PosthogAnalytics";

View File

@@ -16,9 +16,9 @@ import {
} from "react"; } from "react";
import { useNavigate, useLocation } from "react-router-dom"; import { useNavigate, useLocation } from "react-router-dom";
import { captureException } from "@sentry/react"; import { captureException } from "@sentry/react";
import { sleep } from "matrix-js-sdk/src/utils"; import { sleep } from "matrix-js-sdk/lib/utils";
import { Trans, useTranslation } from "react-i18next"; import { Trans, useTranslation } from "react-i18next";
import { logger } from "matrix-js-sdk/src/logger"; import { logger } from "matrix-js-sdk/lib/logger";
import { Button, Text } from "@vector-im/compound-web"; import { Button, Text } from "@vector-im/compound-web";
import { FieldRow, InputField, ErrorMessage } from "../input/Input"; import { FieldRow, InputField, ErrorMessage } from "../input/Input";

View File

@@ -6,12 +6,12 @@ Please see LICENSE in the repository root for full details.
*/ */
import { useCallback } from "react"; import { useCallback } from "react";
import { InteractiveAuth } from "matrix-js-sdk/src/interactive-auth"; import { InteractiveAuth } from "matrix-js-sdk";
import { import {
createClient, createClient,
type LoginResponse, type LoginResponse,
type MatrixClient, type MatrixClient,
} from "matrix-js-sdk/src/matrix"; } from "matrix-js-sdk";
import { initClient } from "../utils/matrix"; import { initClient } from "../utils/matrix";
import { type Session } from "../ClientContext"; import { type Session } from "../ClientContext";

View File

@@ -6,13 +6,13 @@ Please see LICENSE in the repository root for full details.
*/ */
import { useState, useEffect, useCallback, useRef } from "react"; import { useState, useEffect, useCallback, useRef } from "react";
import { InteractiveAuth } from "matrix-js-sdk/src/interactive-auth"; import { InteractiveAuth } from "matrix-js-sdk";
import { import {
createClient, createClient,
type MatrixClient, type MatrixClient,
type RegisterResponse, type RegisterResponse,
} from "matrix-js-sdk/src/matrix"; } from "matrix-js-sdk";
import { logger } from "matrix-js-sdk/src/logger"; import { logger } from "matrix-js-sdk/lib/logger";
import { initClient } from "../utils/matrix"; import { initClient } from "../utils/matrix";
import { type Session } from "../ClientContext"; import { type Session } from "../ClientContext";

View File

@@ -6,9 +6,9 @@ Please see LICENSE in the repository root for full details.
*/ */
import { useEffect, useCallback, useRef, useState } from "react"; import { useEffect, useCallback, useRef, useState } from "react";
import { secureRandomString } from "matrix-js-sdk/src/randomstring"; import { secureRandomString } from "matrix-js-sdk/lib/randomstring";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
import { logger } from "matrix-js-sdk/src/logger"; import { logger } from "matrix-js-sdk/lib/logger";
import { translatedError } from "../TranslatedError"; import { translatedError } from "../TranslatedError";
declare global { declare global {

View File

@@ -6,7 +6,7 @@ Please see LICENSE in the repository root for full details.
*/ */
import { useCallback } from "react"; import { useCallback } from "react";
import { secureRandomString } from "matrix-js-sdk/src/randomstring"; import { secureRandomString } from "matrix-js-sdk/lib/randomstring";
import { useClient } from "../ClientContext"; import { useClient } from "../ClientContext";
import { useInteractiveRegistration } from "../auth/useInteractiveRegistration"; import { useInteractiveRegistration } from "../auth/useInteractiveRegistration";

View File

@@ -10,7 +10,7 @@ import { expect, test } from "vitest";
import { TooltipProvider } from "@vector-im/compound-web"; import { TooltipProvider } from "@vector-im/compound-web";
import { userEvent } from "@testing-library/user-event"; import { userEvent } from "@testing-library/user-event";
import { type ReactNode } from "react"; import { type ReactNode } from "react";
import { type MatrixRTCSession } from "matrix-js-sdk/src/matrixrtc/MatrixRTCSession"; import { type MatrixRTCSession } from "matrix-js-sdk/lib/matrixrtc";
import { ReactionToggleButton } from "./ReactionToggleButton"; import { ReactionToggleButton } from "./ReactionToggleButton";
import { ElementCallReactionEventType } from "../reactions"; import { ElementCallReactionEventType } from "../reactions";

View File

@@ -22,7 +22,7 @@ import {
useState, useState,
} from "react"; } from "react";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
import { logger } from "matrix-js-sdk/src/logger"; import { logger } from "matrix-js-sdk/lib/logger";
import classNames from "classnames"; import classNames from "classnames";
import { useObservableState } from "observable-hooks"; import { useObservableState } from "observable-hooks";
import { map } from "rxjs"; import { map } from "rxjs";

View File

@@ -9,7 +9,7 @@ import { describe, expect, test, vi } from "vitest";
import { import {
type MatrixRTCSession, type MatrixRTCSession,
MatrixRTCSessionEvent, MatrixRTCSessionEvent,
} from "matrix-js-sdk/src/matrixrtc"; } from "matrix-js-sdk/lib/matrixrtc";
import { KeyProviderEvent } from "livekit-client"; import { KeyProviderEvent } from "livekit-client";
import { MatrixKeyProvider } from "./matrixKeyProvider"; import { MatrixKeyProvider } from "./matrixKeyProvider";

View File

@@ -6,11 +6,11 @@ Please see LICENSE in the repository root for full details.
*/ */
import { BaseKeyProvider, createKeyMaterialFromBuffer } from "livekit-client"; import { BaseKeyProvider, createKeyMaterialFromBuffer } from "livekit-client";
import { logger } from "matrix-js-sdk/src/logger"; import { logger } from "matrix-js-sdk/lib/logger";
import { import {
type MatrixRTCSession, type MatrixRTCSession,
MatrixRTCSessionEvent, MatrixRTCSessionEvent,
} from "matrix-js-sdk/src/matrixrtc/MatrixRTCSession"; } from "matrix-js-sdk/lib/matrixrtc";
export class MatrixKeyProvider extends BaseKeyProvider { export class MatrixKeyProvider extends BaseKeyProvider {
private rtcSession?: MatrixRTCSession; private rtcSession?: MatrixRTCSession;

View File

@@ -32,7 +32,7 @@ import {
} from "react"; } from "react";
import useMeasure from "react-use-measure"; import useMeasure from "react-use-measure";
import classNames from "classnames"; import classNames from "classnames";
import { logger } from "matrix-js-sdk/src/logger"; import { logger } from "matrix-js-sdk/lib/logger";
import { useObservableEagerState } from "observable-hooks"; import { useObservableEagerState } from "observable-hooks";
import { fromEvent, map, startWith } from "rxjs"; import { fromEvent, map, startWith } from "rxjs";

View File

@@ -6,7 +6,7 @@ Please see LICENSE in the repository root for full details.
*/ */
import { render, type RenderResult } from "@testing-library/react"; import { render, type RenderResult } from "@testing-library/react";
import { type MatrixClient } from "matrix-js-sdk/src/matrix"; import { type MatrixClient } from "matrix-js-sdk";
import { MemoryRouter } from "react-router-dom"; import { MemoryRouter } from "react-router-dom";
import { describe, expect, it } from "vitest"; import { describe, expect, it } from "vitest";

View File

@@ -6,9 +6,7 @@ Please see LICENSE in the repository root for full details.
*/ */
import { Link } from "react-router-dom"; import { Link } from "react-router-dom";
import { type MatrixClient } from "matrix-js-sdk/src/client"; import { type RoomMember, type Room, type MatrixClient } from "matrix-js-sdk";
import { type RoomMember } from "matrix-js-sdk/src/models/room-member";
import { type Room } from "matrix-js-sdk/src/models/room";
import { type FC, useCallback, type MouseEvent, useState } from "react"; import { type FC, useCallback, type MouseEvent, useState } from "react";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
import { IconButton, Text } from "@vector-im/compound-web"; import { IconButton, Text } from "@vector-im/compound-web";

View File

@@ -12,10 +12,10 @@ import {
type FormEventHandler, type FormEventHandler,
type FC, type FC,
} from "react"; } from "react";
import { type MatrixClient } from "matrix-js-sdk/src/client"; import { type MatrixClient } from "matrix-js-sdk";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
import { Heading, Text } from "@vector-im/compound-web"; import { Heading, Text } from "@vector-im/compound-web";
import { logger } from "matrix-js-sdk/src/logger"; import { logger } from "matrix-js-sdk/lib/logger";
import { Button } from "@vector-im/compound-web"; import { Button } from "@vector-im/compound-web";
import { useNavigate } from "react-router-dom"; import { useNavigate } from "react-router-dom";

View File

@@ -6,10 +6,10 @@ Please see LICENSE in the repository root for full details.
*/ */
import { type FC, useCallback, useState, type FormEventHandler } from "react"; import { type FC, useCallback, useState, type FormEventHandler } from "react";
import { secureRandomString } from "matrix-js-sdk/src/randomstring"; import { secureRandomString } from "matrix-js-sdk/lib/randomstring";
import { Trans, useTranslation } from "react-i18next"; import { Trans, useTranslation } from "react-i18next";
import { Button, Heading, Text } from "@vector-im/compound-web"; import { Button, Heading, Text } from "@vector-im/compound-web";
import { logger } from "matrix-js-sdk/src/logger"; import { logger } from "matrix-js-sdk/lib/logger";
import { useNavigate } from "react-router-dom"; import { useNavigate } from "react-router-dom";
import { useClient } from "../ClientContext"; import { useClient } from "../ClientContext";

View File

@@ -5,14 +5,21 @@ SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial
Please see LICENSE in the repository root for full details. Please see LICENSE in the repository root for full details.
*/ */
import { type MatrixClient } from "matrix-js-sdk/src/client"; import {
import { type Room, RoomEvent } from "matrix-js-sdk/src/models/room"; type MatrixClient,
import { type RoomMember } from "matrix-js-sdk/src/models/room-member"; type RoomMember,
type Room,
RoomEvent,
EventTimeline,
EventType,
JoinRule,
KnownMembership,
} from "matrix-js-sdk";
import { useState, useEffect } from "react"; import { useState, useEffect } from "react";
import { EventTimeline, EventType, JoinRule } from "matrix-js-sdk/src/matrix"; import {
import { type MatrixRTCSession } from "matrix-js-sdk/src/matrixrtc/MatrixRTCSession"; MatrixRTCSessionManagerEvents,
import { MatrixRTCSessionManagerEvents } from "matrix-js-sdk/src/matrixrtc/MatrixRTCSessionManager"; type MatrixRTCSession,
import { KnownMembership } from "matrix-js-sdk/src/types"; } from "matrix-js-sdk/lib/matrixrtc";
import { getKeyForRoom } from "../e2ee/sharedKeyManagement"; import { getKeyForRoom } from "../e2ee/sharedKeyManagement";

View File

@@ -14,7 +14,7 @@ import i18n, {
import { initReactI18next } from "react-i18next"; import { initReactI18next } from "react-i18next";
import LanguageDetector from "i18next-browser-languagedetector"; import LanguageDetector from "i18next-browser-languagedetector";
import * as Sentry from "@sentry/react"; import * as Sentry from "@sentry/react";
import { logger } from "matrix-js-sdk/src/logger"; import { logger } from "matrix-js-sdk/lib/logger";
import { shouldPolyfill as shouldPolyfillSegmenter } from "@formatjs/intl-segmenter/should-polyfill"; import { shouldPolyfill as shouldPolyfillSegmenter } from "@formatjs/intl-segmenter/should-polyfill";
import { shouldPolyfill as shouldPolyfillDurationFormat } from "@formatjs/intl-durationformat/should-polyfill"; import { shouldPolyfill as shouldPolyfillDurationFormat } from "@formatjs/intl-durationformat/should-polyfill";
import { import {

View File

@@ -19,7 +19,7 @@ import {
import { createMediaDeviceObserver } from "@livekit/components-core"; import { createMediaDeviceObserver } from "@livekit/components-core";
import { map, startWith } from "rxjs"; import { map, startWith } from "rxjs";
import { useObservableEagerState } from "observable-hooks"; import { useObservableEagerState } from "observable-hooks";
import { logger } from "matrix-js-sdk/src/logger"; import { logger } from "matrix-js-sdk/lib/logger";
import { import {
useSetting, useSetting,

View File

@@ -5,11 +5,11 @@ SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial
Please see LICENSE in the repository root for full details. Please see LICENSE in the repository root for full details.
*/ */
import { type IOpenIDToken, type MatrixClient } from "matrix-js-sdk/src/matrix"; import { type IOpenIDToken, type MatrixClient } from "matrix-js-sdk";
import { logger } from "matrix-js-sdk/src/logger"; import { logger } from "matrix-js-sdk/lib/logger";
import { type MatrixRTCSession } from "matrix-js-sdk/src/matrixrtc/MatrixRTCSession"; import { type MatrixRTCSession } from "matrix-js-sdk/lib/matrixrtc";
import { useEffect, useState } from "react"; import { useEffect, useState } from "react";
import { type LivekitFocus } from "matrix-js-sdk/src/matrixrtc/LivekitFocus"; import { type LivekitFocus } from "matrix-js-sdk/lib/matrixrtc";
import { useActiveLivekitFocus } from "../room/useActiveFocus"; import { useActiveLivekitFocus } from "../room/useActiveFocus";
import { useErrorBoundary } from "../useErrorBoundary"; import { useErrorBoundary } from "../useErrorBoundary";

View File

@@ -15,7 +15,7 @@ import {
Track, Track,
} from "livekit-client"; } from "livekit-client";
import { useCallback, useEffect, useRef, useState } from "react"; import { useCallback, useEffect, useRef, useState } from "react";
import { logger } from "matrix-js-sdk/src/logger"; import { logger } from "matrix-js-sdk/lib/logger";
import * as Sentry from "@sentry/react"; import * as Sentry from "@sentry/react";
import { type SFUConfig, sfuConfigEquals } from "./openIDSFU"; import { type SFUConfig, sfuConfigEquals } from "./openIDSFU";

View File

@@ -15,8 +15,8 @@ import {
} from "livekit-client"; } from "livekit-client";
import { useEffect, useMemo, useRef } from "react"; import { useEffect, useMemo, useRef } from "react";
import E2EEWorker from "livekit-client/e2ee-worker?worker"; import E2EEWorker from "livekit-client/e2ee-worker?worker";
import { logger } from "matrix-js-sdk/src/logger"; import { logger } from "matrix-js-sdk/lib/logger";
import { type MatrixRTCSession } from "matrix-js-sdk/src/matrixrtc/MatrixRTCSession"; import { type MatrixRTCSession } from "matrix-js-sdk/lib/matrixrtc";
import { defaultLiveKitOptions } from "./options"; import { defaultLiveKitOptions } from "./options";
import { type SFUConfig } from "./openIDSFU"; import { type SFUConfig } from "./openIDSFU";

View File

@@ -9,12 +9,12 @@ Please see LICENSE in the repository root for full details.
// function gets set. It needs to be not in the same file as we use // function gets set. It needs to be not in the same file as we use
// createClient, or the typescript transpiler gets confused about // createClient, or the typescript transpiler gets confused about
// dependency references. // dependency references.
import "matrix-js-sdk/src/browser-index"; import "matrix-js-sdk/lib/browser-index";
import { StrictMode } from "react"; import { StrictMode } from "react";
import { createRoot } from "react-dom/client"; import { createRoot } from "react-dom/client";
import "./index.css"; import "./index.css";
import { logger } from "matrix-js-sdk/src/logger"; import { logger } from "matrix-js-sdk/lib/logger";
import { import {
setLogExtension as setLKLogExtension, setLogExtension as setLKLogExtension,
setLogLevel as setLKLogLevel, setLogLevel as setLKLogLevel,

View File

@@ -6,12 +6,12 @@ Please see LICENSE in the repository root for full details.
*/ */
import { type Span } from "@opentelemetry/api"; import { type Span } from "@opentelemetry/api";
import { type MatrixCall } from "matrix-js-sdk/src/matrix"; import { type MatrixCall } from "matrix-js-sdk";
import { CallEvent } from "matrix-js-sdk/src/webrtc/call"; import { CallEvent } from "matrix-js-sdk/lib/webrtc/call";
import { import {
type TransceiverStats, type TransceiverStats,
type CallFeedStats, type CallFeedStats,
} from "matrix-js-sdk/src/webrtc/stats/statsReport"; } from "matrix-js-sdk/lib/webrtc/stats/statsReport";
import { ObjectFlattener } from "./ObjectFlattener"; import { ObjectFlattener } from "./ObjectFlattener";
import { ElementCallOpenTelemetry } from "./otel"; import { ElementCallOpenTelemetry } from "./otel";

View File

@@ -6,7 +6,7 @@ Please see LICENSE in the repository root for full details.
*/ */
import opentelemetry, { type Span } from "@opentelemetry/api"; import opentelemetry, { type Span } from "@opentelemetry/api";
import { type TrackStats } from "matrix-js-sdk/src/webrtc/stats/statsReport"; import { type TrackStats } from "matrix-js-sdk/lib/webrtc/stats/statsReport";
import { type ElementCallOpenTelemetry } from "./otel"; import { type ElementCallOpenTelemetry } from "./otel";
import { OTelCallMediaStreamTrackSpan } from "./OTelCallMediaStreamTrackSpan"; import { OTelCallMediaStreamTrackSpan } from "./OTelCallMediaStreamTrackSpan";

View File

@@ -9,7 +9,7 @@ import { type Span } from "@opentelemetry/api";
import { import {
type CallFeedStats, type CallFeedStats,
type TrackStats, type TrackStats,
} from "matrix-js-sdk/src/webrtc/stats/statsReport"; } from "matrix-js-sdk/lib/webrtc/stats/statsReport";
import { type ElementCallOpenTelemetry } from "./otel"; import { type ElementCallOpenTelemetry } from "./otel";
import { OTelCallAbstractMediaStreamSpan } from "./OTelCallAbstractMediaStreamSpan"; import { OTelCallAbstractMediaStreamSpan } from "./OTelCallAbstractMediaStreamSpan";

View File

@@ -5,7 +5,7 @@ SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial
Please see LICENSE in the repository root for full details. Please see LICENSE in the repository root for full details.
*/ */
import { type TrackStats } from "matrix-js-sdk/src/webrtc/stats/statsReport"; import { type TrackStats } from "matrix-js-sdk/lib/webrtc/stats/statsReport";
import opentelemetry, { type Span } from "@opentelemetry/api"; import opentelemetry, { type Span } from "@opentelemetry/api";
import { type ElementCallOpenTelemetry } from "./otel"; import { type ElementCallOpenTelemetry } from "./otel";

View File

@@ -9,7 +9,7 @@ import { type Span } from "@opentelemetry/api";
import { import {
type TrackStats, type TrackStats,
type TransceiverStats, type TransceiverStats,
} from "matrix-js-sdk/src/webrtc/stats/statsReport"; } from "matrix-js-sdk/lib/webrtc/stats/statsReport";
import { type ElementCallOpenTelemetry } from "./otel"; import { type ElementCallOpenTelemetry } from "./otel";
import { OTelCallAbstractMediaStreamSpan } from "./OTelCallAbstractMediaStreamSpan"; import { OTelCallAbstractMediaStreamSpan } from "./OTelCallAbstractMediaStreamSpan";

View File

@@ -15,26 +15,26 @@ import {
type MatrixClient, type MatrixClient,
type MatrixEvent, type MatrixEvent,
type RoomMember, type RoomMember,
} from "matrix-js-sdk/src/matrix"; } from "matrix-js-sdk";
import { logger } from "matrix-js-sdk/src/logger"; import { logger } from "matrix-js-sdk/lib/logger";
import { import {
type CallError, type CallError,
type CallState, type CallState,
type MatrixCall, type MatrixCall,
type VoipEvent, type VoipEvent,
} from "matrix-js-sdk/src/webrtc/call"; } from "matrix-js-sdk/lib/webrtc/call";
import { import {
type CallsByUserAndDevice, type CallsByUserAndDevice,
type GroupCallError, type GroupCallError,
GroupCallEvent, GroupCallEvent,
type GroupCallStatsReport, type GroupCallStatsReport,
} from "matrix-js-sdk/src/webrtc/groupCall"; } from "matrix-js-sdk/lib/webrtc/groupCall";
import { import {
type ConnectionStatsReport, type ConnectionStatsReport,
type ByteSentStatsReport, type ByteSentStatsReport,
type SummaryStatsReport, type SummaryStatsReport,
type CallFeedReport, type CallFeedReport,
} from "matrix-js-sdk/src/webrtc/stats/statsReport"; } from "matrix-js-sdk/lib/webrtc/stats/statsReport";
import { ElementCallOpenTelemetry } from "./otel"; import { ElementCallOpenTelemetry } from "./otel";
import { ObjectFlattener } from "./ObjectFlattener"; import { ObjectFlattener } from "./ObjectFlattener";

View File

@@ -5,12 +5,12 @@ SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial
Please see LICENSE in the repository root for full details. Please see LICENSE in the repository root for full details.
*/ */
import { type GroupCallStatsReport } from "matrix-js-sdk/src/webrtc/groupCall"; import { type GroupCallStatsReport } from "matrix-js-sdk/lib/webrtc/groupCall";
import { import {
type AudioConcealment, type AudioConcealment,
type ByteSentStatsReport, type ByteSentStatsReport,
type ConnectionStatsReport, type ConnectionStatsReport,
} from "matrix-js-sdk/src/webrtc/stats/statsReport"; } from "matrix-js-sdk/lib/webrtc/stats/statsReport";
import { describe, expect, it } from "vitest"; import { describe, expect, it } from "vitest";
import { ObjectFlattener } from "../../src/otel/ObjectFlattener"; import { ObjectFlattener } from "../../src/otel/ObjectFlattener";

View File

@@ -5,13 +5,13 @@ SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial
Please see LICENSE in the repository root for full details. Please see LICENSE in the repository root for full details.
*/ */
import { type Attributes } from "@opentelemetry/api"; import { type Attributes } from "@opentelemetry/api";
import { type VoipEvent } from "matrix-js-sdk/src/webrtc/call"; import { type VoipEvent } from "matrix-js-sdk/lib/webrtc/call";
import { type GroupCallStatsReport } from "matrix-js-sdk/src/webrtc/groupCall"; import { type GroupCallStatsReport } from "matrix-js-sdk/lib/webrtc/groupCall";
import { import {
type ByteSentStatsReport, type ByteSentStatsReport,
type ConnectionStatsReport, type ConnectionStatsReport,
type SummaryStatsReport, type SummaryStatsReport,
} from "matrix-js-sdk/src/webrtc/stats/statsReport"; } from "matrix-js-sdk/lib/webrtc/stats/statsReport";
export class ObjectFlattener { export class ObjectFlattener {
public static flattenReportObject( public static flattenReportObject(

View File

@@ -11,7 +11,7 @@ import { WebTracerProvider } from "@opentelemetry/sdk-trace-web";
import opentelemetry, { type Tracer } from "@opentelemetry/api"; import opentelemetry, { type Tracer } from "@opentelemetry/api";
import { Resource } from "@opentelemetry/resources"; import { Resource } from "@opentelemetry/resources";
import { SemanticResourceAttributes } from "@opentelemetry/semantic-conventions"; import { SemanticResourceAttributes } from "@opentelemetry/semantic-conventions";
import { logger } from "matrix-js-sdk/src/logger"; import { logger } from "matrix-js-sdk/lib/logger";
import { PosthogSpanProcessor } from "../analytics/PosthogSpanProcessor"; import { PosthogSpanProcessor } from "../analytics/PosthogSpanProcessor";
import { Config } from "../config/Config"; import { Config } from "../config/Config";

View File

@@ -5,12 +5,15 @@ SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial
Please see LICENSE in the repository root for full details. Please see LICENSE in the repository root for full details.
*/ */
import { type MatrixClient } from "matrix-js-sdk/src/client"; import {
import { type MatrixEvent } from "matrix-js-sdk/src/models/event"; type MatrixEvent,
import { type User, UserEvent } from "matrix-js-sdk/src/models/user"; type User,
import { type FileType } from "matrix-js-sdk/src/http-api"; type MatrixClient,
UserEvent,
type FileType,
} from "matrix-js-sdk";
import { useState, useCallback, useEffect } from "react"; import { useState, useCallback, useEffect } from "react";
import { logger } from "matrix-js-sdk/src/logger"; import { logger } from "matrix-js-sdk/lib/logger";
interface ProfileLoadState { interface ProfileLoadState {
success: boolean; success: boolean;

View File

@@ -7,14 +7,14 @@ Please see LICENSE in the repository root for full details.
import { renderHook } from "@testing-library/react"; import { renderHook } from "@testing-library/react";
import { afterEach, test, vitest } from "vitest"; import { afterEach, test, vitest } from "vitest";
import { type MatrixRTCSession } from "matrix-js-sdk/src/matrixrtc"; import { type MatrixRTCSession } from "matrix-js-sdk/lib/matrixrtc";
import { import {
RoomEvent as MatrixRoomEvent, RoomEvent as MatrixRoomEvent,
MatrixEvent, MatrixEvent,
type IRoomTimelineData, type IRoomTimelineData,
EventType, EventType,
MatrixEventEvent, MatrixEventEvent,
} from "matrix-js-sdk/src/matrix"; } from "matrix-js-sdk";
import { ReactionsReader, REACTION_ACTIVE_TIME_MS } from "./ReactionsReader"; import { ReactionsReader, REACTION_ACTIVE_TIME_MS } from "./ReactionsReader";
import { import {

View File

@@ -9,15 +9,15 @@ import {
type CallMembership, type CallMembership,
MatrixRTCSessionEvent, MatrixRTCSessionEvent,
type MatrixRTCSession, type MatrixRTCSession,
} from "matrix-js-sdk/src/matrixrtc"; } from "matrix-js-sdk/lib/matrixrtc";
import { logger } from "matrix-js-sdk/src/logger"; import { logger } from "matrix-js-sdk/lib/logger";
import { type MatrixEvent, MatrixEventEvent } from "matrix-js-sdk/src/matrix"; import { type MatrixEvent, MatrixEventEvent } from "matrix-js-sdk";
import { type ReactionEventContent } from "matrix-js-sdk/src/types"; import { type ReactionEventContent } from "matrix-js-sdk/lib/types";
import { import {
RelationType, RelationType,
EventType, EventType,
RoomEvent as MatrixRoomEvent, RoomEvent as MatrixRoomEvent,
} from "matrix-js-sdk/src/matrix"; } from "matrix-js-sdk";
import { BehaviorSubject, delay, type Subscription } from "rxjs"; import { BehaviorSubject, delay, type Subscription } from "rxjs";
import { import {

View File

@@ -5,7 +5,7 @@ SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial
Please see LICENSE in the repository root for full details. Please see LICENSE in the repository root for full details.
*/ */
import { type RelationType } from "matrix-js-sdk/src/types"; import { type RelationType } from "matrix-js-sdk";
import catSoundOgg from "../sound/reactions/cat.ogg?url"; import catSoundOgg from "../sound/reactions/cat.ogg?url";
import catSoundMp3 from "../sound/reactions/cat.mp3?url"; import catSoundMp3 from "../sound/reactions/cat.mp3?url";

View File

@@ -5,7 +5,7 @@ SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial
Please see LICENSE in the repository root for full details. Please see LICENSE in the repository root for full details.
*/ */
import { EventType, RelationType } from "matrix-js-sdk/src/matrix"; import { EventType, RelationType } from "matrix-js-sdk";
import { import {
createContext, createContext,
useContext, useContext,
@@ -14,8 +14,8 @@ import {
useMemo, useMemo,
type JSX, type JSX,
} from "react"; } from "react";
import { type MatrixRTCSession } from "matrix-js-sdk/src/matrixrtc/MatrixRTCSession"; import { type MatrixRTCSession } from "matrix-js-sdk/lib/matrixrtc";
import { logger } from "matrix-js-sdk/src/logger"; import { logger } from "matrix-js-sdk/lib/logger";
import { useObservableEagerState } from "observable-hooks"; import { useObservableEagerState } from "observable-hooks";
import { useMatrixRTCSessionMemberships } from "../useMatrixRTCSessionMemberships"; import { useMatrixRTCSessionMemberships } from "../useMatrixRTCSessionMemberships";

View File

@@ -15,7 +15,7 @@ import {
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
import { Button, Text } from "@vector-im/compound-web"; import { Button, Text } from "@vector-im/compound-web";
import { PopOutIcon } from "@vector-im/compound-design-tokens/assets/web/icons"; import { PopOutIcon } from "@vector-im/compound-design-tokens/assets/web/icons";
import { logger } from "matrix-js-sdk/src/logger"; import { logger } from "matrix-js-sdk/lib/logger";
import { Modal } from "../Modal"; import { Modal } from "../Modal";
import { useRoomEncryptionSystem } from "../e2ee/sharedKeyManagement"; import { useRoomEncryptionSystem } from "../e2ee/sharedKeyManagement";

View File

@@ -6,11 +6,11 @@ Please see LICENSE in the repository root for full details.
*/ */
import { type FC, type FormEventHandler, useCallback, useState } from "react"; import { type FC, type FormEventHandler, useCallback, useState } from "react";
import { type MatrixClient } from "matrix-js-sdk/src/client"; import { type MatrixClient } from "matrix-js-sdk";
import { Trans, useTranslation } from "react-i18next"; import { Trans, useTranslation } from "react-i18next";
import { Button, Heading, Text } from "@vector-im/compound-web"; import { Button, Heading, Text } from "@vector-im/compound-web";
import { useNavigate } from "react-router-dom"; import { useNavigate } from "react-router-dom";
import { logger } from "matrix-js-sdk/src/logger"; import { logger } from "matrix-js-sdk/lib/logger";
import styles from "./CallEndedView.module.css"; import styles from "./CallEndedView.module.css";
import feedbackStyle from "../input/FeedbackInput.module.css"; import feedbackStyle from "../input/FeedbackInput.module.css";

View File

@@ -16,7 +16,7 @@ import {
afterEach, afterEach,
} from "vitest"; } from "vitest";
import { act } from "react"; import { act } from "react";
import { type CallMembership } from "matrix-js-sdk/src/matrixrtc"; import { type CallMembership } from "matrix-js-sdk/lib/matrixrtc";
import { mockRtcMembership } from "../utils/test"; import { mockRtcMembership } from "../utils/test";
import { import {

View File

@@ -14,13 +14,12 @@ import {
vi, vi,
} from "vitest"; } from "vitest";
import { render, waitFor, screen } from "@testing-library/react"; import { render, waitFor, screen } from "@testing-library/react";
import { type MatrixClient } from "matrix-js-sdk/src/client"; import { type MatrixClient, JoinRule, type RoomState } from "matrix-js-sdk";
import { type MatrixRTCSession } from "matrix-js-sdk/src/matrixrtc"; import { type MatrixRTCSession } from "matrix-js-sdk/lib/matrixrtc";
import { of } from "rxjs"; import { of } from "rxjs";
import { JoinRule, type RoomState } from "matrix-js-sdk/src/matrix";
import { BrowserRouter } from "react-router-dom"; import { BrowserRouter } from "react-router-dom";
import userEvent from "@testing-library/user-event"; import userEvent from "@testing-library/user-event";
import { type RelationsContainer } from "matrix-js-sdk/src/models/relations-container"; import { type RelationsContainer } from "matrix-js-sdk/lib/models/relations-container";
import { useState } from "react"; import { useState } from "react";
import { TooltipProvider } from "@vector-im/compound-web"; import { TooltipProvider } from "@vector-im/compound-web";

View File

@@ -13,17 +13,16 @@ import {
useMemo, useMemo,
useState, useState,
} from "react"; } from "react";
import { type MatrixClient } from "matrix-js-sdk/src/client"; import { type MatrixClient, JoinRule, type Room } from "matrix-js-sdk";
import { import {
Room as LivekitRoom, Room as LivekitRoom,
isE2EESupported as isE2EESupportedBrowser, isE2EESupported as isE2EESupportedBrowser,
} from "livekit-client"; } from "livekit-client";
import { logger } from "matrix-js-sdk/src/logger"; import { logger } from "matrix-js-sdk/lib/logger";
import { import {
MatrixRTCSessionEvent, MatrixRTCSessionEvent,
type MatrixRTCSession, type MatrixRTCSession,
} from "matrix-js-sdk/src/matrixrtc/MatrixRTCSession"; } from "matrix-js-sdk/lib/matrixrtc";
import { JoinRule, type Room } from "matrix-js-sdk/src/matrix";
import { useNavigate } from "react-router-dom"; import { useNavigate } from "react-router-dom";
import type { IWidgetApiRequest } from "matrix-widget-api"; import type { IWidgetApiRequest } from "matrix-widget-api";

View File

@@ -11,7 +11,7 @@ import {
useLocalParticipant, useLocalParticipant,
} from "@livekit/components-react"; } from "@livekit/components-react";
import { ConnectionState, type Room } from "livekit-client"; import { ConnectionState, type Room } from "livekit-client";
import { type MatrixClient } from "matrix-js-sdk/src/client"; import { type MatrixClient } from "matrix-js-sdk";
import { import {
type FC, type FC,
type PointerEvent, type PointerEvent,
@@ -26,11 +26,11 @@ import {
type JSX, type JSX,
} from "react"; } from "react";
import useMeasure from "react-use-measure"; import useMeasure from "react-use-measure";
import { type MatrixRTCSession } from "matrix-js-sdk/src/matrixrtc/MatrixRTCSession"; import { type MatrixRTCSession } from "matrix-js-sdk/lib/matrixrtc";
import classNames from "classnames"; import classNames from "classnames";
import { BehaviorSubject, map } from "rxjs"; import { BehaviorSubject, map } from "rxjs";
import { useObservable, useObservableEagerState } from "observable-hooks"; import { useObservable, useObservableEagerState } from "observable-hooks";
import { logger } from "matrix-js-sdk/src/logger"; import { logger } from "matrix-js-sdk/lib/logger";
import LogoMark from "../icons/LogoMark.svg?react"; import LogoMark from "../icons/LogoMark.svg?react";
import LogoType from "../icons/LogoType.svg?react"; import LogoType from "../icons/LogoType.svg?react";

View File

@@ -7,7 +7,7 @@ Please see LICENSE in the repository root for full details.
import { render, screen } from "@testing-library/react"; import { render, screen } from "@testing-library/react";
import { expect, test, vi } from "vitest"; import { expect, test, vi } from "vitest";
import { type Room } from "matrix-js-sdk/src/matrix"; import { type Room } from "matrix-js-sdk";
import { axe } from "vitest-axe"; import { axe } from "vitest-axe";
import { BrowserRouter } from "react-router-dom"; import { BrowserRouter } from "react-router-dom";
import userEvent from "@testing-library/user-event"; import userEvent from "@testing-library/user-event";

View File

@@ -13,7 +13,7 @@ import {
useState, useState,
} from "react"; } from "react";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
import { type Room } from "matrix-js-sdk/src/matrix"; import { type Room } from "matrix-js-sdk";
import { Button, Text } from "@vector-im/compound-web"; import { Button, Text } from "@vector-im/compound-web";
import { import {
LinkIcon, LinkIcon,

View File

@@ -7,10 +7,10 @@ Please see LICENSE in the repository root for full details.
import { type FC, useCallback, useMemo, useState, type JSX } from "react"; import { type FC, useCallback, useMemo, useState, type JSX } from "react";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
import { type MatrixClient } from "matrix-js-sdk/src/matrix"; import { type MatrixClient } from "matrix-js-sdk";
import { Button } from "@vector-im/compound-web"; import { Button } from "@vector-im/compound-web";
import classNames from "classnames"; import classNames from "classnames";
import { logger } from "matrix-js-sdk/src/logger"; import { logger } from "matrix-js-sdk/lib/logger";
import { usePreviewTracks } from "@livekit/components-react"; import { usePreviewTracks } from "@livekit/components-react";
import { type LocalVideoTrack, Track } from "livekit-client"; import { type LocalVideoTrack, Track } from "livekit-client";
import { useObservable } from "observable-hooks"; import { useObservable } from "observable-hooks";

View File

@@ -13,7 +13,7 @@ import {
useMemo, useMemo,
} from "react"; } from "react";
import { type IWidgetApiRequest } from "matrix-widget-api"; import { type IWidgetApiRequest } from "matrix-widget-api";
import { logger } from "matrix-js-sdk/src/logger"; import { logger } from "matrix-js-sdk/lib/logger";
import { import {
type MediaDevice, type MediaDevice,

View File

@@ -8,7 +8,7 @@ Please see LICENSE in the repository root for full details.
import { type FC, useCallback, useState } from "react"; import { type FC, useCallback, useState } from "react";
import { useLocation } from "react-router-dom"; import { useLocation } from "react-router-dom";
import { Trans, useTranslation } from "react-i18next"; import { Trans, useTranslation } from "react-i18next";
import { logger } from "matrix-js-sdk/src/logger"; import { logger } from "matrix-js-sdk/lib/logger";
import { Button, Heading, Text } from "@vector-im/compound-web"; import { Button, Heading, Text } from "@vector-im/compound-web";
import styles from "./RoomAuthView.module.css"; import styles from "./RoomAuthView.module.css";

View File

@@ -13,13 +13,13 @@ import {
useRef, useRef,
type JSX, type JSX,
} from "react"; } from "react";
import { logger } from "matrix-js-sdk/src/logger"; import { type MatrixError } from "matrix-js-sdk";
import { logger } from "matrix-js-sdk/lib/logger";
import { Trans, useTranslation } from "react-i18next"; import { Trans, useTranslation } from "react-i18next";
import { import {
CheckIcon, CheckIcon,
UnknownSolidIcon, UnknownSolidIcon,
} from "@vector-im/compound-design-tokens/assets/web/icons"; } from "@vector-im/compound-design-tokens/assets/web/icons";
import { type MatrixError } from "matrix-js-sdk/src/http-api";
import { useClientLegacy } from "../ClientContext"; import { useClientLegacy } from "../ClientContext";
import { ErrorPage, FullScreenView, LoadingPage } from "../FullScreenView"; import { ErrorPage, FullScreenView, LoadingPage } from "../FullScreenView";

View File

@@ -6,7 +6,7 @@ Please see LICENSE in the repository root for full details.
*/ */
import { vi, type Mocked, test, expect } from "vitest"; import { vi, type Mocked, test, expect } from "vitest";
import { type RoomState } from "matrix-js-sdk/src/models/room-state"; import { type RoomState } from "matrix-js-sdk";
import { PosthogAnalytics } from "../../src/analytics/PosthogAnalytics"; import { PosthogAnalytics } from "../../src/analytics/PosthogAnalytics";
import { checkForParallelCalls } from "../../src/room/checkForParallelCalls"; import { checkForParallelCalls } from "../../src/room/checkForParallelCalls";

View File

@@ -5,8 +5,7 @@ SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial
Please see LICENSE in the repository root for full details. Please see LICENSE in the repository root for full details.
*/ */
import { EventType } from "matrix-js-sdk/src/@types/event"; import { EventType, type RoomState } from "matrix-js-sdk";
import { type RoomState } from "matrix-js-sdk/src/models/room-state";
import { PosthogAnalytics } from "../analytics/PosthogAnalytics"; import { PosthogAnalytics } from "../analytics/PosthogAnalytics";

View File

@@ -8,14 +8,11 @@ Please see LICENSE in the repository root for full details.
import { import {
type MatrixRTCSession, type MatrixRTCSession,
MatrixRTCSessionEvent, MatrixRTCSessionEvent,
} from "matrix-js-sdk/src/matrixrtc/MatrixRTCSession"; } from "matrix-js-sdk/lib/matrixrtc";
import { useCallback, useEffect, useState } from "react"; import { useCallback, useEffect, useState } from "react";
import { deepCompare } from "matrix-js-sdk/src/utils"; import { deepCompare } from "matrix-js-sdk/lib/utils";
import { logger } from "matrix-js-sdk/src/logger"; import { logger } from "matrix-js-sdk/lib/logger";
import { import { type LivekitFocus, isLivekitFocus } from "matrix-js-sdk/lib/matrixrtc";
type LivekitFocus,
isLivekitFocus,
} from "matrix-js-sdk/src/matrixrtc/LivekitFocus";
/** /**
* Gets the currently active (livekit) focus for a MatrixRTC session * Gets the currently active (livekit) focus for a MatrixRTC session

View File

@@ -6,9 +6,8 @@ Please see LICENSE in the repository root for full details.
*/ */
import { useCallback } from "react"; import { useCallback } from "react";
import { type JoinRule } from "matrix-js-sdk/src/matrix";
import type { Room } from "matrix-js-sdk/src/models/room"; import type { JoinRule, Room } from "matrix-js-sdk";
import { useRoomState } from "./useRoomState"; import { useRoomState } from "./useRoomState";
export function useJoinRule(room: Room): JoinRule { export function useJoinRule(room: Room): JoinRule {

View File

@@ -13,18 +13,20 @@ import {
type ComponentType, type ComponentType,
type SVGAttributes, type SVGAttributes,
} from "react"; } from "react";
import { logger } from "matrix-js-sdk/src/logger";
import { EventType } from "matrix-js-sdk/src/@types/event";
import { import {
JoinRule,
EventType,
SyncState,
MatrixError,
KnownMembership,
ClientEvent, ClientEvent,
type MatrixClient, type MatrixClient,
type RoomSummary, type RoomSummary,
} from "matrix-js-sdk/src/client"; RoomEvent,
import { SyncState } from "matrix-js-sdk/src/sync"; type Room,
import { type MatrixRTCSession } from "matrix-js-sdk/src/matrixrtc/MatrixRTCSession"; } from "matrix-js-sdk";
import { RoomEvent, type Room } from "matrix-js-sdk/src/models/room"; import { logger } from "matrix-js-sdk/lib/logger";
import { KnownMembership } from "matrix-js-sdk/src/types"; import { type MatrixRTCSession } from "matrix-js-sdk/lib/matrixrtc";
import { JoinRule, MatrixError } from "matrix-js-sdk/src/matrix";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
import { import {
AdminIcon, AdminIcon,

View File

@@ -6,7 +6,7 @@ Please see LICENSE in the repository root for full details.
*/ */
import { useCallback } from "react"; import { useCallback } from "react";
import { type Room } from "matrix-js-sdk/src/models/room"; import { type Room } from "matrix-js-sdk";
import { useRoomState } from "./useRoomState"; import { useRoomState } from "./useRoomState";

View File

@@ -5,7 +5,7 @@ SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial
Please see LICENSE in the repository root for full details. Please see LICENSE in the repository root for full details.
*/ */
import { type Room, RoomEvent } from "matrix-js-sdk/src/matrix"; import { type Room, RoomEvent } from "matrix-js-sdk";
import { useState } from "react"; import { useState } from "react";
import { useTypedEventEmitter } from "../useEvents"; import { useTypedEventEmitter } from "../useEvents";

View File

@@ -5,13 +5,9 @@ SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial
Please see LICENSE in the repository root for full details. Please see LICENSE in the repository root for full details.
*/ */
import {
type RoomState,
RoomStateEvent,
} from "matrix-js-sdk/src/models/room-state";
import { useCallback, useMemo, useState } from "react"; import { useCallback, useMemo, useState } from "react";
import { type RoomState, RoomStateEvent, type Room } from "matrix-js-sdk";
import type { Room } from "matrix-js-sdk/src/models/room";
import { useTypedEventEmitter } from "../useEvents"; import { useTypedEventEmitter } from "../useEvents";
/** /**

View File

@@ -20,7 +20,7 @@ import {
TrackEvent, TrackEvent,
} from "livekit-client"; } from "livekit-client";
import { useObservable, useObservableEagerState } from "observable-hooks"; import { useObservable, useObservableEagerState } from "observable-hooks";
import { logger } from "matrix-js-sdk/src/logger"; import { logger } from "matrix-js-sdk/lib/logger";
import { useMediaDevices } from "../livekit/MediaDevicesContext"; import { useMediaDevices } from "../livekit/MediaDevicesContext";
import { platform } from "../Platform"; import { platform } from "../Platform";

View File

@@ -5,9 +5,9 @@ SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial
Please see LICENSE in the repository root for full details. Please see LICENSE in the repository root for full details.
*/ */
import { type MatrixRTCSession } from "matrix-js-sdk/src/matrixrtc/MatrixRTCSession"; import { type MatrixRTCSession } from "matrix-js-sdk/lib/matrixrtc";
import { expect, onTestFinished, test, vi } from "vitest"; import { expect, onTestFinished, test, vi } from "vitest";
import { AutoDiscovery } from "matrix-js-sdk/src/autodiscovery"; import { AutoDiscovery } from "matrix-js-sdk/lib/autodiscovery";
import EventEmitter from "events"; import EventEmitter from "events";
import { enterRTCSession, leaveRTCSession } from "../src/rtcSessionHelpers"; import { enterRTCSession, leaveRTCSession } from "../src/rtcSessionHelpers";

View File

@@ -5,15 +5,15 @@ SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial
Please see LICENSE in the repository root for full details. Please see LICENSE in the repository root for full details.
*/ */
import { type MatrixRTCSession } from "matrix-js-sdk/src/matrixrtc/MatrixRTCSession"; import { type MatrixRTCSession } from "matrix-js-sdk/lib/matrixrtc";
import { logger } from "matrix-js-sdk/src/logger"; import { logger } from "matrix-js-sdk/lib/logger";
import { import {
isLivekitFocus, isLivekitFocus,
isLivekitFocusConfig, isLivekitFocusConfig,
type LivekitFocus, type LivekitFocus,
type LivekitFocusActive, type LivekitFocusActive,
} from "matrix-js-sdk/src/matrixrtc/LivekitFocus"; } from "matrix-js-sdk/lib/matrixrtc";
import { AutoDiscovery } from "matrix-js-sdk/src/autodiscovery"; import { AutoDiscovery } from "matrix-js-sdk/lib/autodiscovery";
import { PosthogAnalytics } from "./analytics/PosthogAnalytics"; import { PosthogAnalytics } from "./analytics/PosthogAnalytics";
import { Config } from "./config/Config"; import { Config } from "./config/Config";

View File

@@ -17,7 +17,7 @@ import {
showConnectionStats as showConnectionStatsSetting, showConnectionStats as showConnectionStatsSetting,
useNewMembershipManagerSetting, useNewMembershipManagerSetting,
} from "./settings"; } from "./settings";
import type { MatrixClient } from "matrix-js-sdk/src/client"; import type { MatrixClient } from "matrix-js-sdk";
import type { Room as LivekitRoom } from "livekit-client"; import type { Room as LivekitRoom } from "livekit-client";
import styles from "./DeveloperSettingsTab.module.css"; import styles from "./DeveloperSettingsTab.module.css";
interface Props { interface Props {

View File

@@ -6,10 +6,10 @@ Please see LICENSE in the repository root for full details.
*/ */
import { type ChangeEvent, type FC, useCallback } from "react"; import { type ChangeEvent, type FC, useCallback } from "react";
import { secureRandomString } from "matrix-js-sdk/src/randomstring"; import { secureRandomString } from "matrix-js-sdk/lib/randomstring";
import { Trans, useTranslation } from "react-i18next"; import { Trans, useTranslation } from "react-i18next";
import { Button, Text } from "@vector-im/compound-web"; import { Button, Text } from "@vector-im/compound-web";
import { logger } from "matrix-js-sdk/src/logger"; import { logger } from "matrix-js-sdk/lib/logger";
import { FieldRow, InputField, ErrorMessage } from "../input/Input"; import { FieldRow, InputField, ErrorMessage } from "../input/Input";
import { useSubmitRageshake, useRageshakeRequest } from "./submit-rageshake"; import { useSubmitRageshake, useRageshakeRequest } from "./submit-rageshake";

View File

@@ -6,9 +6,9 @@ Please see LICENSE in the repository root for full details.
*/ */
import { type FC, useCallback, useEffect, useMemo, useRef } from "react"; import { type FC, useCallback, useEffect, useMemo, useRef } from "react";
import { type MatrixClient } from "matrix-js-sdk/src/client"; import { type MatrixClient } from "matrix-js-sdk";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
import { logger } from "matrix-js-sdk/src/logger"; import { logger } from "matrix-js-sdk/lib/logger";
import { useProfile } from "../profile/useProfile"; import { useProfile } from "../profile/useProfile";
import { FieldRow, InputField, ErrorMessage } from "../input/Input"; import { FieldRow, InputField, ErrorMessage } from "../input/Input";

View File

@@ -8,7 +8,7 @@ Please see LICENSE in the repository root for full details.
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
import { type FC, useCallback, type JSX } from "react"; import { type FC, useCallback, type JSX } from "react";
import { Button } from "@vector-im/compound-web"; import { Button } from "@vector-im/compound-web";
import { logger } from "matrix-js-sdk/src/logger"; import { logger } from "matrix-js-sdk/lib/logger";
import { Config } from "../config/Config"; import { Config } from "../config/Config";
import styles from "./RageshakeButton.module.css"; import styles from "./RageshakeButton.module.css";

View File

@@ -7,7 +7,7 @@ Please see LICENSE in the repository root for full details.
import { type FC, useState } from "react"; import { type FC, useState } from "react";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
import { type MatrixClient } from "matrix-js-sdk/src/matrix"; import { type MatrixClient } from "matrix-js-sdk";
import { Root as Form } from "@vector-im/compound-web"; import { Root as Form } from "@vector-im/compound-web";
import { type Room as LivekitRoom } from "livekit-client"; import { type Room as LivekitRoom } from "livekit-client";

View File

@@ -29,8 +29,8 @@ Please see LICENSE in the repository root for full details.
import EventEmitter from "events"; import EventEmitter from "events";
import { throttle } from "lodash-es"; import { throttle } from "lodash-es";
import { type Logger, logger } from "matrix-js-sdk/src/logger"; import { type Logger, logger } from "matrix-js-sdk/lib/logger";
import { secureRandomString } from "matrix-js-sdk/src/randomstring"; import { secureRandomString } from "matrix-js-sdk/lib/randomstring";
import { type LoggingMethod } from "loglevel"; import { type LoggingMethod } from "loglevel";
import type loglevel from "loglevel"; import type loglevel from "loglevel";

View File

@@ -5,7 +5,7 @@ SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial
Please see LICENSE in the repository root for full details. Please see LICENSE in the repository root for full details.
*/ */
import { logger } from "matrix-js-sdk/src/logger"; import { logger } from "matrix-js-sdk/lib/logger";
import { BehaviorSubject, type Observable } from "rxjs"; import { BehaviorSubject, type Observable } from "rxjs";
import { useObservableEagerState } from "observable-hooks"; import { useObservableEagerState } from "observable-hooks";

View File

@@ -6,13 +6,13 @@ Please see LICENSE in the repository root for full details.
*/ */
import { type ComponentProps, useCallback, useEffect, useState } from "react"; import { type ComponentProps, useCallback, useEffect, useState } from "react";
import { logger } from "matrix-js-sdk/src/logger"; import { logger } from "matrix-js-sdk/lib/logger";
import { import {
ClientEvent, ClientEvent,
type MatrixClient, type MatrixClient,
type MatrixEvent, type MatrixEvent,
} from "matrix-js-sdk/src/matrix"; } from "matrix-js-sdk";
import { type CryptoApi } from "matrix-js-sdk/src/crypto-api"; import { type CryptoApi } from "matrix-js-sdk/lib/crypto-api";
import { getLogsForReport } from "./rageshake"; import { getLogsForReport } from "./rageshake";
import { useClient } from "../ClientContext"; import { useClient } from "../ClientContext";

View File

@@ -5,7 +5,7 @@ SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial
Please see LICENSE in the repository root for full details. Please see LICENSE in the repository root for full details.
*/ */
import { logger } from "matrix-js-sdk/src/logger"; import { logger } from "matrix-js-sdk/lib/logger";
import { isFailure } from "./utils/fetch"; import { isFailure } from "./utils/fetch";

View File

@@ -17,7 +17,7 @@ import {
skip, skip,
switchMap, switchMap,
} from "rxjs"; } from "rxjs";
import { type MatrixClient } from "matrix-js-sdk/src/matrix"; import { type MatrixClient } from "matrix-js-sdk";
import { import {
ConnectionState, ConnectionState,
type LocalParticipant, type LocalParticipant,
@@ -30,7 +30,7 @@ import { isEqual } from "lodash-es";
import { import {
type CallMembership, type CallMembership,
type MatrixRTCSession, type MatrixRTCSession,
} from "matrix-js-sdk/src/matrixrtc"; } from "matrix-js-sdk/lib/matrixrtc";
import { CallViewModel, type Layout } from "./CallViewModel"; import { CallViewModel, type Layout } from "./CallViewModel";
import { import {

View File

@@ -18,11 +18,7 @@ import {
type RemoteParticipant, type RemoteParticipant,
Track, Track,
} from "livekit-client"; } from "livekit-client";
import { import { RoomStateEvent, type Room, type RoomMember } from "matrix-js-sdk";
RoomStateEvent,
type Room,
type RoomMember,
} from "matrix-js-sdk/src/matrix";
import { import {
BehaviorSubject, BehaviorSubject,
EMPTY, EMPTY,
@@ -49,12 +45,12 @@ import {
timer, timer,
withLatestFrom, withLatestFrom,
} from "rxjs"; } from "rxjs";
import { logger } from "matrix-js-sdk/src/logger"; import { logger } from "matrix-js-sdk/lib/logger";
import { import {
type CallMembership, type CallMembership,
type MatrixRTCSession, type MatrixRTCSession,
MatrixRTCSessionEvent, MatrixRTCSessionEvent,
} from "matrix-js-sdk/src/matrixrtc"; } from "matrix-js-sdk/lib/matrixrtc";
import { ViewModel } from "./ViewModel"; import { ViewModel } from "./ViewModel";
import { import {

View File

@@ -26,7 +26,7 @@ import {
RoomEvent as LivekitRoomEvent, RoomEvent as LivekitRoomEvent,
RemoteTrack, RemoteTrack,
} from "livekit-client"; } from "livekit-client";
import { type RoomMember } from "matrix-js-sdk/src/matrix"; import { type RoomMember } from "matrix-js-sdk";
import { import {
BehaviorSubject, BehaviorSubject,
type Observable, type Observable,

View File

@@ -6,7 +6,7 @@ Please see LICENSE in the repository root for full details.
*/ */
import { BehaviorSubject } from "rxjs"; import { BehaviorSubject } from "rxjs";
import { logger } from "matrix-js-sdk/src/logger"; import { logger } from "matrix-js-sdk/lib/logger";
import { type MediaViewModel, type UserMediaViewModel } from "./MediaViewModel"; import { type MediaViewModel, type UserMediaViewModel } from "./MediaViewModel";
import { GridTileViewModel, SpotlightTileViewModel } from "./TileViewModel"; import { GridTileViewModel, SpotlightTileViewModel } from "./TileViewModel";

View File

@@ -10,7 +10,7 @@ import { test, expect } from "vitest";
import { render, screen } from "@testing-library/react"; import { render, screen } from "@testing-library/react";
import { axe } from "vitest-axe"; import { axe } from "vitest-axe";
import { of } from "rxjs"; import { of } from "rxjs";
import { type MatrixRTCSession } from "matrix-js-sdk/src/matrixrtc/MatrixRTCSession"; import { type MatrixRTCSession } from "matrix-js-sdk/lib/matrixrtc";
import { GridTile } from "./GridTile"; import { GridTile } from "./GridTile";
import { mockRtcMembership, withRemoteMedia } from "../utils/test"; import { mockRtcMembership, withRemoteMedia } from "../utils/test";

View File

@@ -7,7 +7,7 @@ Please see LICENSE in the repository root for full details.
import { type TrackReferenceOrPlaceholder } from "@livekit/components-core"; import { type TrackReferenceOrPlaceholder } from "@livekit/components-core";
import { animated } from "@react-spring/web"; import { animated } from "@react-spring/web";
import { type RoomMember } from "matrix-js-sdk/src/matrix"; import { type RoomMember } from "matrix-js-sdk";
import { type ComponentProps, type ReactNode, forwardRef } from "react"; import { type ComponentProps, type ReactNode, forwardRef } from "react";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
import classNames from "classnames"; import classNames from "classnames";

View File

@@ -26,7 +26,7 @@ import { useObservableEagerState, useObservableRef } from "observable-hooks";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
import classNames from "classnames"; import classNames from "classnames";
import { type TrackReferenceOrPlaceholder } from "@livekit/components-core"; import { type TrackReferenceOrPlaceholder } from "@livekit/components-core";
import { type RoomMember } from "matrix-js-sdk/src/matrix"; import { type RoomMember } from "matrix-js-sdk";
import { MediaView } from "./MediaView"; import { MediaView } from "./MediaView";
import styles from "./SpotlightTile.module.css"; import styles from "./SpotlightTile.module.css";

View File

@@ -5,7 +5,7 @@ SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial
Please see LICENSE in the repository root for full details. Please see LICENSE in the repository root for full details.
*/ */
import { logger } from "matrix-js-sdk/src/logger"; import { logger } from "matrix-js-sdk/lib/logger";
import { useState, useEffect } from "react"; import { useState, useEffect } from "react";
import { import {

View File

@@ -11,7 +11,7 @@ import type {
Listener, Listener,
ListenerMap, ListenerMap,
TypedEventEmitter, TypedEventEmitter,
} from "matrix-js-sdk/src/models/typed-event-emitter"; } from "matrix-js-sdk/lib/models/typed-event-emitter";
// Shortcut for registering a listener on an EventTarget // Shortcut for registering a listener on an EventTarget
export function useEventTarget<T extends Event>( export function useEventTarget<T extends Event>(

View File

@@ -5,11 +5,11 @@ SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial
Please see LICENSE in the repository root for full details. Please see LICENSE in the repository root for full details.
*/ */
import { logger } from "matrix-js-sdk/src/logger"; import { logger } from "matrix-js-sdk/lib/logger";
import { import {
type MatrixRTCSession, type MatrixRTCSession,
MatrixRTCSessionEvent, MatrixRTCSessionEvent,
} from "matrix-js-sdk/src/matrixrtc/MatrixRTCSession"; } from "matrix-js-sdk/lib/matrixrtc";
import { useEffect, useState } from "react"; import { useEffect, useState } from "react";
export function useMatrixRTCSessionJoinState( export function useMatrixRTCSessionJoinState(

View File

@@ -5,12 +5,12 @@ SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial
Please see LICENSE in the repository root for full details. Please see LICENSE in the repository root for full details.
*/ */
import { logger } from "matrix-js-sdk/src/logger"; import { logger } from "matrix-js-sdk/lib/logger";
import { type CallMembership } from "matrix-js-sdk/src/matrixrtc/CallMembership";
import { import {
type CallMembership,
type MatrixRTCSession, type MatrixRTCSession,
MatrixRTCSessionEvent, MatrixRTCSessionEvent,
} from "matrix-js-sdk/src/matrixrtc/MatrixRTCSession"; } from "matrix-js-sdk/lib/matrixrtc";
import { useCallback, useEffect, useState } from "react"; import { useCallback, useEffect, useState } from "react";
export function useMatrixRTCSessionMemberships( export function useMatrixRTCSessionMemberships(

View File

@@ -7,7 +7,7 @@ Please see LICENSE in the repository root for full details.
import { useEffect, useLayoutEffect, useRef, useState } from "react"; import { useEffect, useLayoutEffect, useRef, useState } from "react";
import { WidgetApiToWidgetAction } from "matrix-widget-api"; import { WidgetApiToWidgetAction } from "matrix-widget-api";
import { type IThemeChangeActionRequest } from "matrix-widget-api/lib/interfaces/ThemeChangeAction"; import { type IThemeChangeActionRequest } from "matrix-widget-api";
import { getUrlParams } from "./UrlParams"; import { getUrlParams } from "./UrlParams";
import { widget } from "./widget"; import { widget } from "./widget";

View File

@@ -5,7 +5,7 @@ SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial
Please see LICENSE in the repository root for full details. Please see LICENSE in the repository root for full details.
*/ */
import { logger } from "matrix-js-sdk/src/logger"; import { logger } from "matrix-js-sdk/lib/logger";
import { useEffect } from "react"; import { useEffect } from "react";
/** /**

View File

@@ -14,14 +14,14 @@ import { mockMatrixRoom } from "./test";
// Ideally these tests would be in ./displayname.test.ts but I can't figure out how to // Ideally these tests would be in ./displayname.test.ts but I can't figure out how to
// just spy on the removeHiddenChars() function without impacting the other tests. // just spy on the removeHiddenChars() function without impacting the other tests.
// So, these tests are in this separate test file. // So, these tests are in this separate test file.
vi.mock("matrix-js-sdk/src/utils"); vi.mock("matrix-js-sdk/lib/utils");
describe("shouldDisambiguate", () => { describe("shouldDisambiguate", () => {
// eslint-disable-next-line @typescript-eslint/consistent-type-imports // eslint-disable-next-line @typescript-eslint/consistent-type-imports
let jsUtils: typeof import("matrix-js-sdk/src/utils"); let jsUtils: typeof import("matrix-js-sdk/lib/utils");
beforeAll(async () => { beforeAll(async () => {
jsUtils = await import("matrix-js-sdk/src/utils"); jsUtils = await import("matrix-js-sdk/lib/utils");
vi.spyOn(jsUtils, "removeHiddenChars").mockImplementation((str) => str); vi.spyOn(jsUtils, "removeHiddenChars").mockImplementation((str) => str);
}); });
afterEach(() => { afterEach(() => {

View File

@@ -8,10 +8,10 @@ Please see LICENSE in the repository root for full details.
import { import {
removeDirectionOverrideChars, removeDirectionOverrideChars,
removeHiddenChars as removeHiddenCharsUncached, removeHiddenChars as removeHiddenCharsUncached,
} from "matrix-js-sdk/src/utils"; } from "matrix-js-sdk/lib/utils";
import type { Room } from "matrix-js-sdk/src/matrix"; import type { Room } from "matrix-js-sdk";
import type { CallMembership } from "matrix-js-sdk/src/matrixrtc"; import type { CallMembership } from "matrix-js-sdk/lib/matrixrtc";
// Calling removeHiddenChars() can be slow on Safari, so we cache the results. // Calling removeHiddenChars() can be slow on Safari, so we cache the results.
// To illustrate a simple benchmark: // To illustrate a simple benchmark:

View File

@@ -5,23 +5,21 @@ SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial
Please see LICENSE in the repository root for full details. Please see LICENSE in the repository root for full details.
*/ */
import { IndexedDBStore } from "matrix-js-sdk/src/store/indexeddb";
import { MemoryStore } from "matrix-js-sdk/src/store/memory";
import { import {
ClientEvent,
calculateRetryBackoff, calculateRetryBackoff,
createClient, createClient,
type ICreateClientOpts, IndexedDBStore,
MemoryStore,
Preset, Preset,
Visibility, Visibility,
} from "matrix-js-sdk/src/matrix"; } from "matrix-js-sdk";
import { ClientEvent } from "matrix-js-sdk/src/client"; import { type ISyncStateData, type SyncState } from "matrix-js-sdk/lib/sync";
import { type ISyncStateData, type SyncState } from "matrix-js-sdk/src/sync"; import { logger } from "matrix-js-sdk/lib/logger";
import { logger } from "matrix-js-sdk/src/logger"; import { secureRandomBase64Url } from "matrix-js-sdk/lib/randomstring";
import { secureRandomBase64Url } from "matrix-js-sdk/src/randomstring"; import { sleep } from "matrix-js-sdk/lib/utils";
import { sleep } from "matrix-js-sdk/src/utils";
import type { MatrixClient } from "matrix-js-sdk/src/client"; import type { ICreateClientOpts, MatrixClient, Room } from "matrix-js-sdk";
import type { Room } from "matrix-js-sdk/src/models/room";
import IndexedDBWorker from "../IndexedDBWorker?worker"; import IndexedDBWorker from "../IndexedDBWorker?worker";
import { generateUrlSearchParams, getUrlParams } from "../UrlParams"; import { generateUrlSearchParams, getUrlParams } from "../UrlParams";
import { Config } from "../config/Config"; import { Config } from "../config/Config";

View File

@@ -5,9 +5,8 @@ SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial
Please see LICENSE in the repository root for full details. Please see LICENSE in the repository root for full details.
*/ */
import { type ICreateClientOpts } from "matrix-js-sdk/src/client"; import { type ICreateClientOpts, MatrixError } from "matrix-js-sdk";
import { MatrixError } from "matrix-js-sdk/src/http-api"; import { logger } from "matrix-js-sdk/lib/logger";
import { logger } from "matrix-js-sdk/src/logger";
import { Config } from "../config/Config"; import { Config } from "../config/Config";
import { fallbackICEServerAllowed, initClient } from "./matrix"; import { fallbackICEServerAllowed, initClient } from "./matrix";

View File

@@ -6,17 +6,16 @@ Please see LICENSE in the repository root for full details.
*/ */
import { ConnectionState } from "livekit-client"; import { ConnectionState } from "livekit-client";
import { type MatrixClient } from "matrix-js-sdk/src/client";
import { type RoomMember } from "matrix-js-sdk/src/matrix";
import { import {
type CallMembership, type CallMembership,
type MatrixRTCSession, type MatrixRTCSession,
} from "matrix-js-sdk/src/matrixrtc"; } from "matrix-js-sdk/lib/matrixrtc";
import { BehaviorSubject, of } from "rxjs"; import { BehaviorSubject, of } from "rxjs";
import { vitest } from "vitest"; import { vitest } from "vitest";
import { type RelationsContainer } from "matrix-js-sdk/src/models/relations-container"; import { type RelationsContainer } from "matrix-js-sdk/lib/models/relations-container";
import EventEmitter from "events"; import EventEmitter from "events";
import type { RoomMember, MatrixClient } from "matrix-js-sdk";
import { E2eeType } from "../e2ee/e2eeType"; import { E2eeType } from "../e2ee/e2eeType";
import { CallViewModel } from "../state/CallViewModel"; import { CallViewModel } from "../state/CallViewModel";
import { mockLivekitRoom, mockMatrixRoom, MockRTCSession } from "./test"; import { mockLivekitRoom, mockMatrixRoom, MockRTCSession } from "./test";

View File

@@ -13,14 +13,14 @@ import {
MatrixEvent, MatrixEvent,
type Room, type Room,
TypedEventEmitter, TypedEventEmitter,
} from "matrix-js-sdk/src/matrix"; } from "matrix-js-sdk";
import { import {
CallMembership, CallMembership,
type Focus, type Focus,
MatrixRTCSessionEvent, MatrixRTCSessionEvent,
type MatrixRTCSessionEventHandlerMap, type MatrixRTCSessionEventHandlerMap,
type SessionMembershipData, type SessionMembershipData,
} from "matrix-js-sdk/src/matrixrtc"; } from "matrix-js-sdk/lib/matrixrtc";
import { import {
type LocalParticipant, type LocalParticipant,
type LocalTrackPublication, type LocalTrackPublication,

Some files were not shown because too many files have changed in this diff Show More