From a7624806b29b70115f0cc34b1151ebb2801d15d7 Mon Sep 17 00:00:00 2001 From: Robin Date: Fri, 22 Sep 2023 18:05:13 -0400 Subject: [PATCH 01/48] Upgrade eslint-plugin-matrix-org to 1.2.1 This upgrade came with a number of new lints that needed to be fixed across the code base. Primarily: explicit return types on functions, and explicit visibility modifiers on class members. --- .eslintrc.cjs | 44 +++++----- package.json | 5 +- src/App.tsx | 8 +- src/Banner.tsx | 4 +- src/ClientContext.tsx | 10 ++- src/DisconnectedBanner.tsx | 10 +-- src/E2EEBanner.tsx | 3 +- src/Facepile.tsx | 8 +- src/FullScreenView.tsx | 21 +++-- src/Header.tsx | 20 ++--- src/ListBox.tsx | 12 ++- src/Menu.tsx | 11 ++- src/Modal.tsx | 10 +-- src/SequenceDiagramViewerPage.tsx | 6 +- src/TranslatedError.ts | 6 +- src/UrlParams.ts | 8 +- src/UserMenu.tsx | 12 +-- src/UserMenuContainer.tsx | 6 +- src/analytics/AnalyticsNotice.tsx | 16 ++++ src/analytics/PosthogAnalytics.ts | 22 +++-- src/analytics/PosthogEvents.ts | 32 +++---- src/analytics/PosthogSpanProcessor.ts | 8 +- src/analytics/RageshakeSpanProcessor.ts | 42 ++++++++-- src/auth/RegisterPage.tsx | 6 +- src/auth/useInteractiveLogin.ts | 14 ++-- src/auth/useInteractiveRegistration.ts | 4 +- src/auth/useRecaptcha.ts | 14 ++-- src/button/Button.tsx | 58 +++++-------- src/button/CopyButton.tsx | 8 +- src/button/LinkButton.tsx | 8 +- src/home/CallList.tsx | 11 ++- src/home/HomePage.tsx | 5 +- src/home/JoinExistingCallModal.tsx | 9 +- src/home/RegisteredView.tsx | 8 +- src/home/UnauthenticatedView.tsx | 2 +- src/home/useGroupCallRooms.ts | 4 +- src/initializer.tsx | 14 ++-- src/input/AvatarInputField.tsx | 4 +- src/input/StarRatingInput.tsx | 6 +- src/livekit/MediaDevicesContext.tsx | 10 ++- src/livekit/openIDSFU.ts | 4 +- src/livekit/options.ts | 16 ++++ src/livekit/useECConnectionState.ts | 2 +- src/livekit/useLiveKit.ts | 2 +- src/main.tsx | 2 +- src/matrix-utils.ts | 12 +-- src/otel/OTelCall.ts | 4 +- src/otel/OTelCallAbstractMediaStreamSpan.ts | 22 ++++- src/otel/OTelCallFeedMediaStreamSpan.ts | 22 ++++- src/otel/OTelCallMediaStreamTrackSpan.ts | 20 ++++- .../OTelCallTransceiverMediaStreamSpan.ts | 22 ++++- src/otel/OTelGroupCallMembership.ts | 52 +++++++----- src/otel/ObjectFlattener.ts | 4 +- src/otel/otel.ts | 6 +- src/profile/useProfile.ts | 8 +- src/room/CallEndedView.tsx | 4 +- src/room/GroupCallInspector.tsx | 55 ++++++------ src/room/GroupCallView.tsx | 20 +++-- src/room/InCallView.tsx | 31 ++++--- src/room/RageshakeRequestModal.tsx | 6 +- src/room/RoomAuthView.tsx | 6 +- src/room/useFullscreen.ts | 8 +- src/room/useJoinRule.ts | 6 +- src/room/useLoadGroupCall.ts | 4 +- src/room/usePageUnload.ts | 4 +- src/room/useRoomAvatar.ts | 5 +- src/rtcSessionHelpers.ts | 4 +- src/settings/FeedbackSettingsTab.tsx | 6 +- src/settings/ProfileSettingsTab.tsx | 6 +- src/settings/RageshakeButton.tsx | 4 +- src/settings/SettingsModal.tsx | 21 +++-- src/settings/rageshake.ts | 30 +++---- src/settings/submit-rageshake.ts | 2 +- src/settings/useSetting.ts | 19 +++-- src/useCallViewKeyboardShortcuts.ts | 2 +- src/useEvents.ts | 18 ++-- src/useMediaQuery.ts | 4 +- src/usePrefersReducedMotion.ts | 2 +- src/useWakeLock.ts | 6 +- src/video-grid/BigGrid.tsx | 22 +++-- src/video-grid/Layout.tsx | 27 ++++-- src/video-grid/NewVideoGrid.tsx | 12 +-- src/video-grid/VideoGrid.tsx | 19 +++-- src/video-grid/VideoTile.tsx | 4 +- src/video-grid/VideoTileSettingsModal.tsx | 12 ++- src/widget.ts | 4 +- tsconfig.json | 4 +- yarn.lock | 84 +++++++++++++++++-- 88 files changed, 735 insertions(+), 433 deletions(-) diff --git a/.eslintrc.cjs b/.eslintrc.cjs index 173d8dca..064a20db 100644 --- a/.eslintrc.cjs +++ b/.eslintrc.cjs @@ -1,13 +1,31 @@ +const COPYRIGHT_HEADER = `/* +Copyright %%CURRENT_YEAR%% New Vector Ltd + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +`; + module.exports = { plugins: ["matrix-org"], extends: [ - "prettier", "plugin:matrix-org/react", "plugin:matrix-org/a11y", "plugin:matrix-org/typescript", + "prettier", ], parserOptions: { - ecmaVersion: 2018, + ecmaVersion: "latest", sourceType: "module", project: ["./tsconfig.json"], }, @@ -15,27 +33,11 @@ module.exports = { browser: true, node: true, }, - parserOptions: { - ecmaVersion: "latest", - sourceType: "module", - }, rules: { - "jsx-a11y/media-has-caption": ["off"], + "matrix-org/require-copyright-header": ["error", COPYRIGHT_HEADER], + "jsx-a11y/media-has-caption": "off", + "deprecate/import": "off", // Disabled because it crashes the linter }, - overrides: [ - { - files: ["src/**/*.{ts,tsx}", "test/**/*.{ts,tsx}"], - extends: [ - "plugin:matrix-org/typescript", - "plugin:matrix-org/react", - "prettier", - ], - rules: { - // We're aiming to convert this code to strict mode - "@typescript-eslint/no-non-null-assertion": "off", - }, - }, - ], settings: { react: { version: "detect", diff --git a/package.json b/package.json index 007bd32f..957464c4 100644 --- a/package.json +++ b/package.json @@ -104,11 +104,13 @@ "eslint": "^8.14.0", "eslint-config-google": "^0.14.0", "eslint-config-prettier": "^9.0.0", + "eslint-plugin-deprecate": "^0.8.2", "eslint-plugin-import": "^2.26.0", "eslint-plugin-jsx-a11y": "^6.5.1", - "eslint-plugin-matrix-org": "^0.4.0", + "eslint-plugin-matrix-org": "^1.2.1", "eslint-plugin-react": "^7.29.4", "eslint-plugin-react-hooks": "^4.5.0", + "eslint-plugin-unicorn": "^48.0.1", "i18next-parser": "^6.6.0", "identity-obj-proxy": "^3.0.0", "jest": "^29.2.2", @@ -118,6 +120,7 @@ "sass": "^1.42.1", "storybook-builder-vite": "^0.1.12", "typescript": "^5.1.6", + "typescript-eslint-language-service": "^5.0.5", "vite": "^4.2.0", "vite-plugin-html-template": "^1.1.0", "vite-plugin-svgr": "^3.2.0" diff --git a/src/App.tsx b/src/App.tsx index 00890f31..6708beb1 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -import { Suspense, useEffect, useState } from "react"; +import { FC, Suspense, useEffect, useState } from "react"; import { BrowserRouter as Router, Switch, @@ -43,7 +43,7 @@ interface BackgroundProviderProps { children: JSX.Element; } -const BackgroundProvider = ({ children }: BackgroundProviderProps) => { +const BackgroundProvider: FC = ({ children }) => { const { pathname } = useLocation(); useEffect(() => { @@ -63,7 +63,7 @@ interface AppProps { history: History; } -export default function App({ history }: AppProps) { +export const App: FC = ({ history }) => { const [loaded, setLoaded] = useState(false); useEffect(() => { @@ -116,4 +116,4 @@ export default function App({ history }: AppProps) { ); -} +}; diff --git a/src/Banner.tsx b/src/Banner.tsx index fcc68a3b..87ce8a96 100644 --- a/src/Banner.tsx +++ b/src/Banner.tsx @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -import { ReactNode } from "react"; +import { FC, ReactNode } from "react"; import styles from "./Banner.module.css"; @@ -22,6 +22,6 @@ interface Props { children: ReactNode; } -export const Banner = ({ children }: Props) => { +export const Banner: FC = ({ children }) => { return
{children}
; }; diff --git a/src/ClientContext.tsx b/src/ClientContext.tsx index f7ceea9f..c1ee6338 100644 --- a/src/ClientContext.tsx +++ b/src/ClientContext.tsx @@ -82,7 +82,8 @@ export type SetClientParams = { const ClientContext = createContext(undefined); -export const useClientState = () => useContext(ClientContext); +export const useClientState = (): ClientState | undefined => + useContext(ClientContext); export function useClient(): { client?: MatrixClient; @@ -408,8 +409,8 @@ export interface Session { tempPassword?: string; } -const clearSession = () => localStorage.removeItem("matrix-auth-store"); -const saveSession = (s: Session) => +const clearSession = (): void => localStorage.removeItem("matrix-auth-store"); +const saveSession = (s: Session): void => localStorage.setItem("matrix-auth-store", JSON.stringify(s)); const loadSession = (): Session | undefined => { const data = localStorage.getItem("matrix-auth-store"); @@ -423,4 +424,5 @@ const loadSession = (): Session | undefined => { const clientIsDisconnected = ( syncState: SyncState, syncData?: ISyncStateData -) => syncState === "ERROR" && syncData?.error?.name === "ConnectionError"; +): boolean => + syncState === "ERROR" && syncData?.error?.name === "ConnectionError"; diff --git a/src/DisconnectedBanner.tsx b/src/DisconnectedBanner.tsx index 6ec5d5ac..06369cc5 100644 --- a/src/DisconnectedBanner.tsx +++ b/src/DisconnectedBanner.tsx @@ -15,22 +15,22 @@ limitations under the License. */ import classNames from "classnames"; -import { HTMLAttributes, ReactNode } from "react"; +import { FC, HTMLAttributes, ReactNode } from "react"; import { useTranslation } from "react-i18next"; import styles from "./DisconnectedBanner.module.css"; import { ValidClientState, useClientState } from "./ClientContext"; -interface DisconnectedBannerProps extends HTMLAttributes { +interface Props extends HTMLAttributes { children?: ReactNode; className?: string; } -export function DisconnectedBanner({ +export const DisconnectedBanner: FC = ({ children, className, ...rest -}: DisconnectedBannerProps) { +}) => { const { t } = useTranslation(); const clientState = useClientState(); let shouldShowBanner = false; @@ -50,4 +50,4 @@ export function DisconnectedBanner({ )} ); -} +}; diff --git a/src/E2EEBanner.tsx b/src/E2EEBanner.tsx index 774f3582..7b173605 100644 --- a/src/E2EEBanner.tsx +++ b/src/E2EEBanner.tsx @@ -15,13 +15,14 @@ limitations under the License. */ import { Trans } from "react-i18next"; +import { FC } from "react"; import { Banner } from "./Banner"; import styles from "./E2EEBanner.module.css"; import { ReactComponent as LockOffIcon } from "./icons/LockOff.svg"; import { useEnableE2EE } from "./settings/useSetting"; -export const E2EEBanner = () => { +export const E2EEBanner: FC = () => { const [e2eeEnabled] = useEnableE2EE(); if (e2eeEnabled) return null; diff --git a/src/Facepile.tsx b/src/Facepile.tsx index 7ed995ce..08b460a9 100644 --- a/src/Facepile.tsx +++ b/src/Facepile.tsx @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -import { HTMLAttributes } from "react"; +import { FC, HTMLAttributes } from "react"; import { MatrixClient } from "matrix-js-sdk/src/client"; import { RoomMember } from "matrix-js-sdk/src/models/room-member"; import { useTranslation } from "react-i18next"; @@ -30,14 +30,14 @@ interface Props extends HTMLAttributes { size?: Size | number; } -export function Facepile({ +export const Facepile: FC = ({ className, client, members, max = 3, size = Size.XS, ...rest -}: Props) { +}) => { const { t } = useTranslation(); const displayedMembers = members.slice(0, max); @@ -63,4 +63,4 @@ export function Facepile({ })} ); -} +}; diff --git a/src/FullScreenView.tsx b/src/FullScreenView.tsx index 6ac134b8..10fe01f4 100644 --- a/src/FullScreenView.tsx +++ b/src/FullScreenView.tsx @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -import { ReactNode, useCallback, useEffect } from "react"; +import { FC, ReactNode, useCallback, useEffect } from "react"; import { useLocation } from "react-router-dom"; import classNames from "classnames"; import { Trans, useTranslation } from "react-i18next"; @@ -32,7 +32,10 @@ interface FullScreenViewProps { children: ReactNode; } -export function FullScreenView({ className, children }: FullScreenViewProps) { +export const FullScreenView: FC = ({ + className, + children, +}) => { return (
@@ -46,13 +49,13 @@ export function FullScreenView({ className, children }: FullScreenViewProps) {
); -} +}; interface ErrorViewProps { error: Error; } -export function ErrorView({ error }: ErrorViewProps) { +export const ErrorView: FC = ({ error }) => { const location = useLocation(); const { t } = useTranslation(); @@ -95,9 +98,9 @@ export function ErrorView({ error }: ErrorViewProps) { )} ); -} +}; -export function CrashView() { +export const CrashView: FC = () => { const { t } = useTranslation(); const onReload = useCallback(() => { @@ -126,9 +129,9 @@ export function CrashView() { ); -} +}; -export function LoadingView() { +export const LoadingView: FC = () => { const { t } = useTranslation(); return ( @@ -136,4 +139,4 @@ export function LoadingView() {

{t("Loading…")}

); -} +}; diff --git a/src/Header.tsx b/src/Header.tsx index aea3da71..b080bec0 100644 --- a/src/Header.tsx +++ b/src/Header.tsx @@ -33,13 +33,13 @@ interface HeaderProps extends HTMLAttributes { className?: string; } -export function Header({ children, className, ...rest }: HeaderProps) { +export const Header: FC = ({ children, className, ...rest }) => { return (
{children}
); -} +}; interface LeftNavProps extends HTMLAttributes { children: ReactNode; @@ -47,12 +47,12 @@ interface LeftNavProps extends HTMLAttributes { hideMobile?: boolean; } -export function LeftNav({ +export const LeftNav: FC = ({ children, className, hideMobile, ...rest -}: LeftNavProps) { +}) => { return (
); -} +}; interface RightNavProps extends HTMLAttributes { children?: ReactNode; @@ -74,12 +74,12 @@ interface RightNavProps extends HTMLAttributes { hideMobile?: boolean; } -export function RightNav({ +export const RightNav: FC = ({ children, className, hideMobile, ...rest -}: RightNavProps) { +}) => { return (
); -} +}; interface HeaderLogoProps { className?: string; } -export function HeaderLogo({ className }: HeaderLogoProps) { +export const HeaderLogo: FC = ({ className }) => { const { t } = useTranslation(); return ( @@ -111,7 +111,7 @@ export function HeaderLogo({ className }: HeaderLogoProps) { ); -} +}; interface RoomHeaderInfoProps { id: string; diff --git a/src/ListBox.tsx b/src/ListBox.tsx index b7ec7c72..b025f483 100644 --- a/src/ListBox.tsx +++ b/src/ListBox.tsx @@ -14,7 +14,13 @@ See the License for the specific language governing permissions and limitations under the License. */ -import { MutableRefObject, PointerEvent, useCallback, useRef } from "react"; +import { + MutableRefObject, + PointerEvent, + ReactNode, + useCallback, + useRef, +} from "react"; import { useListBox, useOption, AriaListBoxOptions } from "@react-aria/listbox"; import { ListState } from "@react-stately/list"; import { Node } from "@react-types/shared"; @@ -35,7 +41,7 @@ export function ListBox({ className, listBoxRef, ...rest -}: ListBoxProps) { +}: ListBoxProps): ReactNode { const ref = useRef(null); const listRef = listBoxRef ?? ref; @@ -66,7 +72,7 @@ interface OptionProps { item: Node; } -function Option({ item, state, className }: OptionProps) { +function Option({ item, state, className }: OptionProps): ReactNode { const ref = useRef(null); const { optionProps, isSelected, isFocused, isDisabled } = useOption( { key: item.key }, diff --git a/src/Menu.tsx b/src/Menu.tsx index c1e8e40b..932c19d4 100644 --- a/src/Menu.tsx +++ b/src/Menu.tsx @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -import { Key, useRef, useState } from "react"; +import { Key, ReactNode, useRef, useState } from "react"; import { AriaMenuOptions, useMenu, useMenuItem } from "@react-aria/menu"; import { TreeState, useTreeState } from "@react-stately/tree"; import { mergeProps } from "@react-aria/utils"; @@ -37,7 +37,7 @@ export function Menu({ onClose, label, ...rest -}: MenuProps) { +}: MenuProps): ReactNode { const state = useTreeState({ ...rest, selectionMode: "none" }); const menuRef = useRef(null); const { menuProps } = useMenu(rest, state, menuRef); @@ -68,7 +68,12 @@ interface MenuItemProps { onClose: () => void; } -function MenuItem({ item, state, onAction, onClose }: MenuItemProps) { +function MenuItem({ + item, + state, + onAction, + onClose, +}: MenuItemProps): ReactNode { const ref = useRef(null); const { menuItemProps } = useMenuItem( { diff --git a/src/Modal.tsx b/src/Modal.tsx index b644abe4..9fdd53b9 100644 --- a/src/Modal.tsx +++ b/src/Modal.tsx @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -import { ReactNode, useCallback } from "react"; +import { FC, ReactNode, useCallback } from "react"; import { AriaDialogProps } from "@react-types/dialog"; import { useTranslation } from "react-i18next"; import { @@ -36,7 +36,7 @@ import { useMediaQuery } from "./useMediaQuery"; import { Glass } from "./Glass"; // TODO: Support tabs -export interface ModalProps extends AriaDialogProps { +export interface Props extends AriaDialogProps { title: string; children: ReactNode; className?: string; @@ -58,14 +58,14 @@ export interface ModalProps extends AriaDialogProps { * A modal, taking the form of a drawer / bottom sheet on touchscreen devices, * and a dialog box on desktop. */ -export function Modal({ +export const Modal: FC = ({ title, children, className, open, onDismiss, ...rest -}: ModalProps) { +}) => { const { t } = useTranslation(); // Empirically, Chrome on Android can end up not matching (hover: none), but // still matching (pointer: coarse) :/ @@ -140,4 +140,4 @@ export function Modal({ ); } -} +}; diff --git a/src/SequenceDiagramViewerPage.tsx b/src/SequenceDiagramViewerPage.tsx index 9fb66f94..defa1809 100644 --- a/src/SequenceDiagramViewerPage.tsx +++ b/src/SequenceDiagramViewerPage.tsx @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -import { useCallback, useState } from "react"; +import { FC, useCallback, useState } from "react"; import { useTranslation } from "react-i18next"; import { @@ -30,7 +30,7 @@ interface DebugLog { remoteUserIds: string[]; } -export function SequenceDiagramViewerPage() { +export const SequenceDiagramViewerPage: FC = () => { const { t } = useTranslation(); usePageTitle(t("Inspector")); @@ -69,4 +69,4 @@ export function SequenceDiagramViewerPage() { )}
); -} +}; diff --git a/src/TranslatedError.ts b/src/TranslatedError.ts index 62960f04..595672cc 100644 --- a/src/TranslatedError.ts +++ b/src/TranslatedError.ts @@ -37,5 +37,7 @@ class TranslatedErrorImpl extends TranslatedError {} // i18next-parser can't detect calls to a constructor, so we expose a bare // function instead -export const translatedError = (messageKey: string, t: typeof i18n.t) => - new TranslatedErrorImpl(messageKey, t); +export const translatedError = ( + messageKey: string, + t: typeof i18n.t +): TranslatedError => new TranslatedErrorImpl(messageKey, t); diff --git a/src/UrlParams.ts b/src/UrlParams.ts index 90713c3b..0b230ae8 100644 --- a/src/UrlParams.ts +++ b/src/UrlParams.ts @@ -134,7 +134,7 @@ class ParamParser { private fragmentParams: URLSearchParams; private queryParams: URLSearchParams; - constructor(search: string, hash: string) { + public constructor(search: string, hash: string) { this.queryParams = new URLSearchParams(search); const fragmentQueryStart = hash.indexOf("?"); @@ -146,18 +146,18 @@ class ParamParser { // Normally, URL params should be encoded in the fragment so as to avoid // leaking them to the server. However, we also check the normal query // string for backwards compatibility with versions that only used that. - getParam(name: string): string | null { + public getParam(name: string): string | null { return this.fragmentParams.get(name) ?? this.queryParams.get(name); } - getAllParams(name: string): string[] { + public getAllParams(name: string): string[] { return [ ...this.fragmentParams.getAll(name), ...this.queryParams.getAll(name), ]; } - getFlagParam(name: string, defaultValue = false): boolean { + public getFlagParam(name: string, defaultValue = false): boolean { const param = this.getParam(name); return param === null ? defaultValue : param !== "false"; } diff --git a/src/UserMenu.tsx b/src/UserMenu.tsx index 515e71f0..44427287 100644 --- a/src/UserMenu.tsx +++ b/src/UserMenu.tsx @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -import { useCallback, useMemo } from "react"; +import { FC, ReactNode, useCallback, useMemo } from "react"; import { Item } from "@react-stately/collections"; import { useLocation } from "react-router-dom"; import { useTranslation } from "react-i18next"; @@ -31,7 +31,7 @@ import { ReactComponent as LogoutIcon } from "./icons/Logout.svg"; import { Body } from "./typography/Typography"; import styles from "./UserMenu.module.css"; -interface UserMenuProps { +interface Props { preventNavigation: boolean; isAuthenticated: boolean; isPasswordlessUser: boolean; @@ -41,7 +41,7 @@ interface UserMenuProps { onAction: (value: string) => void; } -export function UserMenu({ +export const UserMenu: FC = ({ preventNavigation, isAuthenticated, isPasswordlessUser, @@ -49,7 +49,7 @@ export function UserMenu({ displayName, avatarUrl, onAction, -}: UserMenuProps) { +}) => { const { t } = useTranslation(); const location = useLocation(); @@ -123,7 +123,7 @@ export function UserMenu({ { // eslint-disable-next-line @typescript-eslint/no-explicit-any - (props: any) => ( + (props: any): ReactNode => ( {items.map(({ key, icon: Icon, label, dataTestid }) => ( @@ -141,4 +141,4 @@ export function UserMenu({ } ); -} +}; diff --git a/src/UserMenuContainer.tsx b/src/UserMenuContainer.tsx index 359f75f6..c629ecea 100644 --- a/src/UserMenuContainer.tsx +++ b/src/UserMenuContainer.tsx @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -import { useCallback, useState } from "react"; +import { FC, useCallback, useState } from "react"; import { useHistory, useLocation } from "react-router-dom"; import { useClientLegacy } from "./ClientContext"; @@ -26,7 +26,7 @@ interface Props { preventNavigation?: boolean; } -export function UserMenuContainer({ preventNavigation = false }: Props) { +export const UserMenuContainer: FC = ({ preventNavigation = false }) => { const location = useLocation(); const history = useHistory(); const { client, logout, authenticated, passwordlessUser } = useClientLegacy(); @@ -83,4 +83,4 @@ export function UserMenuContainer({ preventNavigation = false }: Props) { )} ); -} +}; diff --git a/src/analytics/AnalyticsNotice.tsx b/src/analytics/AnalyticsNotice.tsx index 544de61a..7b1d3fb5 100644 --- a/src/analytics/AnalyticsNotice.tsx +++ b/src/analytics/AnalyticsNotice.tsx @@ -1,3 +1,19 @@ +/* +Copyright 2023 New Vector Ltd + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + import { FC } from "react"; import { Trans } from "react-i18next"; diff --git a/src/analytics/PosthogAnalytics.ts b/src/analytics/PosthogAnalytics.ts index 9d4f3f5c..a0316736 100644 --- a/src/analytics/PosthogAnalytics.ts +++ b/src/analytics/PosthogAnalytics.ts @@ -117,7 +117,7 @@ export class PosthogAnalytics { return this.internalInstance; } - constructor(private readonly posthog: PostHog) { + private constructor(private readonly posthog: PostHog) { const posthogConfig: PosthogSettings = { project_api_key: Config.get().posthog?.api_key, api_host: Config.get().posthog?.api_host, @@ -183,7 +183,7 @@ export class PosthogAnalytics { return properties; }; - private registerSuperProperties(properties: Properties) { + private registerSuperProperties(properties: Properties): void { if (this.enabled) { this.posthog.register(properties); } @@ -202,7 +202,7 @@ export class PosthogAnalytics { eventName: string, properties: Properties, options?: CaptureOptions - ) { + ): void { if (!this.enabled) { return; } @@ -213,7 +213,7 @@ export class PosthogAnalytics { return this.enabled; } - setAnonymity(anonymity: Anonymity): void { + private setAnonymity(anonymity: Anonymity): void { // Update this.anonymity. // To update the anonymity typically you want to call updateAnonymityFromSettings // to ensure this value is in step with the user's settings. @@ -236,7 +236,9 @@ export class PosthogAnalytics { .join(""); } - private async identifyUser(analyticsIdGenerator: () => string) { + private async identifyUser( + analyticsIdGenerator: () => string + ): Promise { if (this.anonymity == Anonymity.Pseudonymous && this.enabled) { // Check the user's account_data for an analytics ID to use. Storing the ID in account_data allows // different devices to send the same ID. @@ -271,7 +273,7 @@ export class PosthogAnalytics { } } - async getAnalyticsId() { + private async getAnalyticsId(): Promise { const client: MatrixClient = window.matrixclient; let accountAnalyticsId; if (widget) { @@ -291,7 +293,9 @@ export class PosthogAnalytics { return null; } - async hashedEcAnalyticsId(accountAnalyticsId: string): Promise { + private async hashedEcAnalyticsId( + accountAnalyticsId: string + ): Promise { const client: MatrixClient = window.matrixclient; const posthogIdMaterial = "ec" + accountAnalyticsId + client.getUserId(); const bufferForPosthogId = await crypto.subtle.digest( @@ -304,7 +308,7 @@ export class PosthogAnalytics { .join(""); } - async setAccountAnalyticsId(analyticsID: string) { + private async setAccountAnalyticsId(analyticsID: string): Promise { if (!widget) { const client = window.matrixclient; @@ -335,7 +339,7 @@ export class PosthogAnalytics { this.updateAnonymityAndIdentifyUser(optInAnalytics); } - private updateSuperProperties() { + private updateSuperProperties(): void { // Update super properties in posthog with our platform (app version, platform). // These properties will be subsequently passed in every event. // diff --git a/src/analytics/PosthogEvents.ts b/src/analytics/PosthogEvents.ts index 97e25b6f..89c1ee50 100644 --- a/src/analytics/PosthogEvents.ts +++ b/src/analytics/PosthogEvents.ts @@ -36,18 +36,22 @@ export class CallEndedTracker { maxParticipantsCount: 0, }; - cacheStartCall(time: Date) { + public cacheStartCall(time: Date): void { this.cache.startTime = time; } - cacheParticipantCountChanged(count: number) { + public cacheParticipantCountChanged(count: number): void { this.cache.maxParticipantsCount = Math.max( count, this.cache.maxParticipantsCount ); } - track(callId: string, callParticipantsNow: number, sendInstantly: boolean) { + public track( + callId: string, + callParticipantsNow: number, + sendInstantly: boolean + ): void { PosthogAnalytics.instance.trackEvent( { eventName: "CallEnded", @@ -67,7 +71,7 @@ interface CallStarted extends IPosthogEvent { } export class CallStartedTracker { - track(callId: string) { + public track(callId: string): void { PosthogAnalytics.instance.trackEvent({ eventName: "CallStarted", callId: callId, @@ -86,19 +90,19 @@ export class SignupTracker { signupEnd: new Date(0), }; - cacheSignupStart(time: Date) { + public cacheSignupStart(time: Date): void { this.cache.signupStart = time; } - getSignupEndTime() { + public getSignupEndTime(): Date { return this.cache.signupEnd; } - cacheSignupEnd(time: Date) { + public cacheSignupEnd(time: Date): void { this.cache.signupEnd = time; } - track() { + public track(): void { PosthogAnalytics.instance.trackEvent({ eventName: "Signup", signupDuration: Date.now() - this.cache.signupStart.getTime(), @@ -112,7 +116,7 @@ interface Login extends IPosthogEvent { } export class LoginTracker { - track() { + public track(): void { PosthogAnalytics.instance.trackEvent({ eventName: "Login", }); @@ -127,7 +131,7 @@ interface MuteMicrophone { } export class MuteMicrophoneTracker { - track(targetIsMute: boolean, callId: string) { + public track(targetIsMute: boolean, callId: string): void { PosthogAnalytics.instance.trackEvent({ eventName: "MuteMicrophone", targetMuteState: targetIsMute ? "mute" : "unmute", @@ -143,7 +147,7 @@ interface MuteCamera { } export class MuteCameraTracker { - track(targetIsMute: boolean, callId: string) { + public track(targetIsMute: boolean, callId: string): void { PosthogAnalytics.instance.trackEvent({ eventName: "MuteCamera", targetMuteState: targetIsMute ? "mute" : "unmute", @@ -158,7 +162,7 @@ interface UndecryptableToDeviceEvent { } export class UndecryptableToDeviceEventTracker { - track(callId: string) { + public track(callId: string): void { PosthogAnalytics.instance.trackEvent({ eventName: "UndecryptableToDeviceEvent", callId, @@ -174,7 +178,7 @@ interface QualitySurveyEvent { } export class QualitySurveyEventTracker { - track(callId: string, feedbackText: string, stars: number) { + public track(callId: string, feedbackText: string, stars: number): void { PosthogAnalytics.instance.trackEvent({ eventName: "QualitySurvey", callId, @@ -190,7 +194,7 @@ interface CallDisconnectedEvent { } export class CallDisconnectedEventTracker { - track(reason?: DisconnectReason) { + public track(reason?: DisconnectReason): void { PosthogAnalytics.instance.trackEvent({ eventName: "CallDisconnected", reason, diff --git a/src/analytics/PosthogSpanProcessor.ts b/src/analytics/PosthogSpanProcessor.ts index effa6436..98a6dbbc 100644 --- a/src/analytics/PosthogSpanProcessor.ts +++ b/src/analytics/PosthogSpanProcessor.ts @@ -39,9 +39,9 @@ const maxRejoinMs = 2 * 60 * 1000; // 2 minutes * Span processor that extracts certain metrics from spans to send to PostHog */ export class PosthogSpanProcessor implements SpanProcessor { - async forceFlush(): Promise {} + public async forceFlush(): Promise {} - onStart(span: Span): void { + public onStart(span: Span): void { // Hack: Yield to allow attributes to be set before processing Promise.resolve().then(() => { switch (span.name) { @@ -55,7 +55,7 @@ export class PosthogSpanProcessor implements SpanProcessor { }); } - onEnd(span: ReadableSpan): void { + public onEnd(span: ReadableSpan): void { switch (span.name) { case "matrix.groupCallMembership": this.onGroupCallMembershipEnd(span); @@ -157,7 +157,7 @@ export class PosthogSpanProcessor implements SpanProcessor { /** * Shutdown the processor. */ - shutdown(): Promise { + public shutdown(): Promise { return Promise.resolve(); } } diff --git a/src/analytics/RageshakeSpanProcessor.ts b/src/analytics/RageshakeSpanProcessor.ts index b5b055f2..670a77c3 100644 --- a/src/analytics/RageshakeSpanProcessor.ts +++ b/src/analytics/RageshakeSpanProcessor.ts @@ -1,4 +1,20 @@ -import { Attributes } from "@opentelemetry/api"; +/* +Copyright 2023 New Vector Ltd + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +import { AttributeValue, Attributes } from "@opentelemetry/api"; import { hrTimeToMicroseconds } from "@opentelemetry/core"; import { SpanProcessor, @@ -6,7 +22,21 @@ import { Span, } from "@opentelemetry/sdk-trace-base"; -const dumpAttributes = (attr: Attributes) => +const dumpAttributes = ( + attr: Attributes +): { + key: string; + type: + | "string" + | "number" + | "bigint" + | "boolean" + | "symbol" + | "undefined" + | "object" + | "function"; + value: AttributeValue | undefined; +}[] => Object.entries(attr).map(([key, value]) => ({ key, type: typeof value, @@ -20,13 +50,13 @@ const dumpAttributes = (attr: Attributes) => export class RageshakeSpanProcessor implements SpanProcessor { private readonly spans: ReadableSpan[] = []; - async forceFlush(): Promise {} + public async forceFlush(): Promise {} - onStart(span: Span): void { + public onStart(span: Span): void { this.spans.push(span); } - onEnd(): void {} + public onEnd(): void {} /** * Dumps the spans collected so far as Jaeger-compatible JSON. @@ -110,5 +140,5 @@ export class RageshakeSpanProcessor implements SpanProcessor { }); } - async shutdown(): Promise {} + public async shutdown(): Promise {} } diff --git a/src/auth/RegisterPage.tsx b/src/auth/RegisterPage.tsx index c49d9b43..807fdbdd 100644 --- a/src/auth/RegisterPage.tsx +++ b/src/auth/RegisterPage.tsx @@ -68,7 +68,7 @@ export const RegisterPage: FC = () => { if (password !== passwordConfirmation) return; - const submit = async () => { + const submit = async (): Promise => { setRegistering(true); const recaptchaResponse = await execute(); @@ -183,7 +183,7 @@ export const RegisterPage: FC = () => { required name="password" type="password" - onChange={(e: ChangeEvent) => + onChange={(e: ChangeEvent): void => setPassword(e.target.value) } value={password} @@ -197,7 +197,7 @@ export const RegisterPage: FC = () => { required type="password" name="passwordConfirmation" - onChange={(e: ChangeEvent) => + onChange={(e: ChangeEvent): void => setPasswordConfirmation(e.target.value) } value={passwordConfirmation} diff --git a/src/auth/useInteractiveLogin.ts b/src/auth/useInteractiveLogin.ts index 07dec12d..28288fee 100644 --- a/src/auth/useInteractiveLogin.ts +++ b/src/auth/useInteractiveLogin.ts @@ -21,8 +21,12 @@ import { createClient, MatrixClient } from "matrix-js-sdk/src/matrix"; import { initClient } from "../matrix-utils"; import { Session } from "../ClientContext"; -export const useInteractiveLogin = () => - useCallback< +export function useInteractiveLogin(): ( + homeserver: string, + username: string, + password: string +) => Promise<[MatrixClient, Session]> { + return useCallback< ( homeserver: string, username: string, @@ -41,8 +45,8 @@ export const useInteractiveLogin = () => }, password, }), - stateUpdated: (...args) => {}, - requestEmailToken: (...args): Promise<{ sid: string }> => { + stateUpdated: (): void => {}, + requestEmailToken: (): Promise<{ sid: string }> => { return Promise.resolve({ sid: "" }); }, }); @@ -69,6 +73,6 @@ export const useInteractiveLogin = () => false ); /* eslint-enable camelcase */ - return [client, session]; }, []); +} diff --git a/src/auth/useInteractiveRegistration.ts b/src/auth/useInteractiveRegistration.ts index a4863671..70ce0c2f 100644 --- a/src/auth/useInteractiveRegistration.ts +++ b/src/auth/useInteractiveRegistration.ts @@ -72,7 +72,7 @@ export const useInteractiveRegistration = (): { password, auth: auth || undefined, }), - stateUpdated: (nextStage, status) => { + stateUpdated: (nextStage, status): void => { if (status.error) { throw new Error(status.error); } @@ -88,7 +88,7 @@ export const useInteractiveRegistration = (): { }); } }, - requestEmailToken: (...args) => { + requestEmailToken: (): Promise<{ sid: string }> => { return Promise.resolve({ sid: "dummy" }); }, }); diff --git a/src/auth/useRecaptcha.ts b/src/auth/useRecaptcha.ts index 647370da..a77d41ee 100644 --- a/src/auth/useRecaptcha.ts +++ b/src/auth/useRecaptcha.ts @@ -34,7 +34,11 @@ interface RecaptchaPromiseRef { reject: (error: Error) => void; } -export const useRecaptcha = (sitekey?: string) => { +export function useRecaptcha(sitekey?: string): { + execute: () => Promise; + reset: () => void; + recaptchaId: string; +} { const { t } = useTranslation(); const [recaptchaId] = useState(() => randomString(16)); const promiseRef = useRef(); @@ -42,7 +46,7 @@ export const useRecaptcha = (sitekey?: string) => { useEffect(() => { if (!sitekey) return; - const onRecaptchaLoaded = () => { + const onRecaptchaLoaded = (): void => { if (!document.getElementById(recaptchaId)) return; window.grecaptcha.render(recaptchaId, { @@ -90,11 +94,11 @@ export const useRecaptcha = (sitekey?: string) => { }); promiseRef.current = { - resolve: (value) => { + resolve: (value): void => { resolve(value); observer.disconnect(); }, - reject: (error) => { + reject: (error): void => { reject(error); observer.disconnect(); }, @@ -119,4 +123,4 @@ export const useRecaptcha = (sitekey?: string) => { }, []); return { execute, reset, recaptchaId }; -}; +} diff --git a/src/button/Button.tsx b/src/button/Button.tsx index 3d269dc2..d1476dbf 100644 --- a/src/button/Button.tsx +++ b/src/button/Button.tsx @@ -13,7 +13,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ -import { forwardRef } from "react"; +import { FC, forwardRef } from "react"; import { PressEvent } from "@react-types/shared"; import classNames from "classnames"; import { useButton } from "@react-aria/button"; @@ -135,14 +135,11 @@ export const Button = forwardRef( } ); -export function MicButton({ - muted, - ...rest -}: { +export const MicButton: FC<{ muted: boolean; // TODO: add all props for ); -} +}; -export function VideoButton({ - muted, - ...rest -}: { +export const VideoButton: FC<{ muted: boolean; // TODO: add all props for ); -} +}; -export function ScreenshareButton({ - enabled, - className, - ...rest -}: { +export const ScreenshareButton: FC<{ enabled: boolean; className?: string; // TODO: add all props for ); -} +}; -export function HangupButton({ - className, - ...rest -}: { +export const HangupButton: FC<{ className?: string; // TODO: add all props for ); -} +}; -export function SettingsButton({ - className, - ...rest -}: { +export const SettingsButton: FC<{ className?: string; // TODO: add all props for ); -} +}; interface AudioButtonProps extends Omit { /** @@ -248,7 +232,7 @@ interface AudioButtonProps extends Omit { volume: number; } -export function AudioButton({ volume, ...rest }: AudioButtonProps) { +export const AudioButton: FC = ({ volume, ...rest }) => { const { t } = useTranslation(); return ( @@ -258,16 +242,16 @@ export function AudioButton({ volume, ...rest }: AudioButtonProps) { ); -} +}; interface FullscreenButtonProps extends Omit { fullscreen?: boolean; } -export function FullscreenButton({ +export const FullscreenButton: FC = ({ fullscreen, ...rest -}: FullscreenButtonProps) { +}) => { const { t } = useTranslation(); const Icon = fullscreen ? FullscreenExit : Fullscreen; const label = fullscreen ? t("Exit full screen") : t("Full screen"); @@ -279,4 +263,4 @@ export function FullscreenButton({ ); -} +}; diff --git a/src/button/CopyButton.tsx b/src/button/CopyButton.tsx index 91c8e750..b44b919d 100644 --- a/src/button/CopyButton.tsx +++ b/src/button/CopyButton.tsx @@ -16,6 +16,7 @@ limitations under the License. import { useTranslation } from "react-i18next"; import useClipboard from "react-use-clipboard"; +import { FC } from "react"; import { ReactComponent as CheckIcon } from "../icons/Check.svg"; import { ReactComponent as CopyIcon } from "../icons/Copy.svg"; @@ -28,14 +29,15 @@ interface Props { variant?: ButtonVariant; copiedMessage?: string; } -export function CopyButton({ + +export const CopyButton: FC = ({ value, children, className, variant, copiedMessage, ...rest -}: Props) { +}) => { const { t } = useTranslation(); const [isCopied, setCopied] = useClipboard(value, { successDuration: 3000 }); @@ -62,4 +64,4 @@ export function CopyButton({ )} ); -} +}; diff --git a/src/button/LinkButton.tsx b/src/button/LinkButton.tsx index 3392935d..2a94b150 100644 --- a/src/button/LinkButton.tsx +++ b/src/button/LinkButton.tsx @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -import { HTMLAttributes } from "react"; +import { FC, HTMLAttributes } from "react"; import { Link } from "react-router-dom"; import classNames from "classnames"; import * as H from "history"; @@ -34,14 +34,14 @@ interface Props extends HTMLAttributes { className?: string; } -export function LinkButton({ +export const LinkButton: FC = ({ children, to, size, variant, className, ...rest -}: Props) { +}) => { return ( ); -} +}; diff --git a/src/home/CallList.tsx b/src/home/CallList.tsx index ac501e41..ef1722ca 100644 --- a/src/home/CallList.tsx +++ b/src/home/CallList.tsx @@ -18,6 +18,7 @@ import { Link } from "react-router-dom"; import { MatrixClient } from "matrix-js-sdk/src/client"; import { RoomMember } from "matrix-js-sdk/src/models/room-member"; import { Room } from "matrix-js-sdk/src/models/room"; +import { FC } from "react"; import { CopyButton } from "../button"; import { Avatar, Size } from "../Avatar"; @@ -31,7 +32,8 @@ interface CallListProps { rooms: GroupCallRoom[]; client: MatrixClient; } -export function CallList({ rooms, client }: CallListProps) { + +export const CallList: FC = ({ rooms, client }) => { return ( <>
@@ -54,7 +56,7 @@ export function CallList({ rooms, client }: CallListProps) {
); -} +}; interface CallTileProps { name: string; avatarUrl: string; @@ -62,7 +64,8 @@ interface CallTileProps { participants: RoomMember[]; client: MatrixClient; } -function CallTile({ name, avatarUrl, room }: CallTileProps) { + +const CallTile: FC = ({ name, avatarUrl, room }) => { const roomSharedKey = useRoomSharedKey(room.roomId); return ( @@ -92,4 +95,4 @@ function CallTile({ name, avatarUrl, room }: CallTileProps) { />
); -} +}; diff --git a/src/home/HomePage.tsx b/src/home/HomePage.tsx index a78cb8bd..779a7168 100644 --- a/src/home/HomePage.tsx +++ b/src/home/HomePage.tsx @@ -15,6 +15,7 @@ limitations under the License. */ import { useTranslation } from "react-i18next"; +import { FC } from "react"; import { useClientState } from "../ClientContext"; import { ErrorView, LoadingView } from "../FullScreenView"; @@ -22,7 +23,7 @@ import { UnauthenticatedView } from "./UnauthenticatedView"; import { RegisteredView } from "./RegisteredView"; import { usePageTitle } from "../usePageTitle"; -export function HomePage() { +export const HomePage: FC = () => { const { t } = useTranslation(); usePageTitle(t("Home")); @@ -39,4 +40,4 @@ export function HomePage() { ); } -} +}; diff --git a/src/home/JoinExistingCallModal.tsx b/src/home/JoinExistingCallModal.tsx index 35672295..d8ed9fce 100644 --- a/src/home/JoinExistingCallModal.tsx +++ b/src/home/JoinExistingCallModal.tsx @@ -16,6 +16,7 @@ limitations under the License. import { PressEvent } from "@react-types/shared"; import { useTranslation } from "react-i18next"; +import { FC } from "react"; import { Modal } from "../Modal"; import { Button } from "../button"; @@ -28,7 +29,11 @@ interface Props { onJoin: (e: PressEvent) => void; } -export function JoinExistingCallModal({ onJoin, open, onDismiss }: Props) { +export const JoinExistingCallModal: FC = ({ + onJoin, + open, + onDismiss, +}) => { const { t } = useTranslation(); return ( @@ -42,4 +47,4 @@ export function JoinExistingCallModal({ onJoin, open, onDismiss }: Props) { ); -} +}; diff --git a/src/home/RegisteredView.tsx b/src/home/RegisteredView.tsx index 5552eda3..219060e3 100644 --- a/src/home/RegisteredView.tsx +++ b/src/home/RegisteredView.tsx @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -import { useState, useCallback, FormEvent, FormEventHandler } from "react"; +import { useState, useCallback, FormEvent, FormEventHandler, FC } from "react"; import { useHistory } from "react-router-dom"; import { MatrixClient } from "matrix-js-sdk/src/client"; import { randomString } from "matrix-js-sdk/src/randomstring"; @@ -48,7 +48,7 @@ interface Props { client: MatrixClient; } -export function RegisteredView({ client }: Props) { +export const RegisteredView: FC = ({ client }) => { const [loading, setLoading] = useState(false); const [error, setError] = useState(); const [optInAnalytics] = useOptInAnalytics(); @@ -72,7 +72,7 @@ export function RegisteredView({ client }: Props) { ? sanitiseRoomNameInput(roomNameData) : ""; - async function submit() { + async function submit(): Promise { setError(undefined); setLoading(true); @@ -176,4 +176,4 @@ export function RegisteredView({ client }: Props) { /> ); -} +}; diff --git a/src/home/UnauthenticatedView.tsx b/src/home/UnauthenticatedView.tsx index 8cd64c14..8f78e26a 100644 --- a/src/home/UnauthenticatedView.tsx +++ b/src/home/UnauthenticatedView.tsx @@ -73,7 +73,7 @@ export const UnauthenticatedView: FC = () => { const roomName = sanitiseRoomNameInput(data.get("callName") as string); const displayName = data.get("displayName") as string; - async function submit() { + async function submit(): Promise { setError(undefined); setLoading(true); const recaptchaResponse = await execute(); diff --git a/src/home/useGroupCallRooms.ts b/src/home/useGroupCallRooms.ts index 51633d8e..6e50dda0 100644 --- a/src/home/useGroupCallRooms.ts +++ b/src/home/useGroupCallRooms.ts @@ -31,7 +31,7 @@ export interface GroupCallRoom { } const tsCache: { [index: string]: number } = {}; -function getLastTs(client: MatrixClient, r: Room) { +function getLastTs(client: MatrixClient, r: Room): number { if (tsCache[r.roomId]) { return tsCache[r.roomId]; } @@ -82,7 +82,7 @@ export function useGroupCallRooms(client: MatrixClient): GroupCallRoom[] { const [rooms, setRooms] = useState([]); useEffect(() => { - function updateRooms() { + function updateRooms(): void { if (!client.groupCallEventHandler) { return; } diff --git a/src/initializer.tsx b/src/initializer.tsx index 9a8152dd..d2bbb076 100644 --- a/src/initializer.tsx +++ b/src/initializer.tsx @@ -35,11 +35,11 @@ enum LoadState { class DependencyLoadStates { // TODO: decide where olm should be initialized (see TODO comment below) // olm: LoadState = LoadState.None; - config: LoadState = LoadState.None; - sentry: LoadState = LoadState.None; - openTelemetry: LoadState = LoadState.None; + public config: LoadState = LoadState.None; + public sentry: LoadState = LoadState.None; + public openTelemetry: LoadState = LoadState.None; - allDepsAreLoaded() { + public allDepsAreLoaded(): boolean { return !Object.values(this).some((s) => s !== LoadState.Loaded); } } @@ -52,7 +52,7 @@ export class Initializer { return Initializer.internalInstance?.isInitialized; } - public static initBeforeReact() { + public static initBeforeReact(): void { // this maybe also needs to return a promise in the future, // if we have to do async inits before showing the loading screen // but this should be avioded if possible @@ -126,9 +126,9 @@ export class Initializer { return Initializer.internalInstance.initPromise; } - loadStates = new DependencyLoadStates(); + private loadStates = new DependencyLoadStates(); - initStep(resolve: (value: void | PromiseLike) => void) { + private initStep(resolve: (value: void | PromiseLike) => void): void { // TODO: Olm is initialized with the client currently (see `initClient()` and `olm.ts`) // we need to decide if we want to init it here or keep it in initClient // if (this.loadStates.olm === LoadState.None) { diff --git a/src/input/AvatarInputField.tsx b/src/input/AvatarInputField.tsx index 8a069718..4a561f6d 100644 --- a/src/input/AvatarInputField.tsx +++ b/src/input/AvatarInputField.tsx @@ -64,7 +64,7 @@ export const AvatarInputField = forwardRef( useEffect(() => { const currentInput = fileInputRef.current; - const onChange = (e: Event) => { + const onChange = (e: Event): void => { const inputEvent = e as unknown as ChangeEvent; if (inputEvent.target.files && inputEvent.target.files.length > 0) { setObjUrl(URL.createObjectURL(inputEvent.target.files[0])); @@ -76,7 +76,7 @@ export const AvatarInputField = forwardRef( currentInput.addEventListener("change", onChange); - return () => { + return (): void => { currentInput?.removeEventListener("change", onChange); }; }); diff --git a/src/input/StarRatingInput.tsx b/src/input/StarRatingInput.tsx index 3017a117..14000859 100644 --- a/src/input/StarRatingInput.tsx +++ b/src/input/StarRatingInput.tsx @@ -41,8 +41,8 @@ export function StarRatingInput({ return (
setHover(index)} - onMouseLeave={() => setHover(rating)} + onMouseEnter={(): void => setHover(index)} + onMouseLeave={(): void => setHover(rating)} key={index} > { + onChange={(_ev): void => { setRating(index); onChange(index); }} diff --git a/src/livekit/MediaDevicesContext.tsx b/src/livekit/MediaDevicesContext.tsx index 1605edf3..ddd23b9d 100644 --- a/src/livekit/MediaDevicesContext.tsx +++ b/src/livekit/MediaDevicesContext.tsx @@ -52,7 +52,7 @@ export interface MediaDevices { function useObservableState( observable: Observable | undefined, startWith: T -) { +): T { const [state, setState] = useState(startWith); useEffect(() => { // observable state doesn't run in SSR @@ -207,7 +207,8 @@ export const MediaDevicesProvider: FC = ({ children }) => { ); }; -export const useMediaDevices = () => useContext(MediaDevicesContext); +export const useMediaDevices = (): MediaDevices => + useContext(MediaDevicesContext); /** * React hook that requests for the media devices context to be populated with @@ -215,7 +216,10 @@ export const useMediaDevices = () => useContext(MediaDevicesContext); * default because it may involve requesting additional permissions from the * user. */ -export const useMediaDeviceNames = (context: MediaDevices, enabled = true) => +export const useMediaDeviceNames = ( + context: MediaDevices, + enabled = true +): void => useEffect(() => { if (enabled) { context.startUsingDeviceNames(); diff --git a/src/livekit/openIDSFU.ts b/src/livekit/openIDSFU.ts index d10f56fb..3e6779f5 100644 --- a/src/livekit/openIDSFU.ts +++ b/src/livekit/openIDSFU.ts @@ -43,13 +43,13 @@ export type OpenIDClientParts = Pick< export function useOpenIDSFU( client: OpenIDClientParts, rtcSession: MatrixRTCSession -) { +): SFUConfig | undefined { const [sfuConfig, setSFUConfig] = useState(undefined); const activeFocus = useActiveFocus(rtcSession); useEffect(() => { - (async () => { + (async (): Promise => { const sfuConfig = activeFocus ? await getSFUConfigWithOpenID(client, activeFocus) : undefined; diff --git a/src/livekit/options.ts b/src/livekit/options.ts index 7f9695f1..00f19b12 100644 --- a/src/livekit/options.ts +++ b/src/livekit/options.ts @@ -1,3 +1,19 @@ +/* +Copyright 2023 New Vector Ltd + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + import { AudioPresets, DefaultReconnectPolicy, diff --git a/src/livekit/useECConnectionState.ts b/src/livekit/useECConnectionState.ts index e9298eb7..8e0d44ac 100644 --- a/src/livekit/useECConnectionState.ts +++ b/src/livekit/useECConnectionState.ts @@ -119,7 +119,7 @@ export function useECConnectionState( `SFU config changed! URL was ${currentSFUConfig.current?.url} now ${sfuConfig?.url}` ); - (async () => { + (async (): Promise => { setSwitchingFocus(true); await livekitRoom?.disconnect(); setIsInDoConnect(true); diff --git a/src/livekit/useLiveKit.ts b/src/livekit/useLiveKit.ts index d6d8394b..361f08c2 100644 --- a/src/livekit/useLiveKit.ts +++ b/src/livekit/useLiveKit.ts @@ -156,7 +156,7 @@ export function useLiveKit( useEffect(() => { // Sync the requested devices with LiveKit's devices if (room !== undefined && connectionState === ConnectionState.Connected) { - const syncDevice = (kind: MediaDeviceKind, device: MediaDevice) => { + const syncDevice = (kind: MediaDeviceKind, device: MediaDevice): void => { const id = device.selectedId; if (id !== undefined && room.getActiveDevice(kind) !== id) { room diff --git a/src/main.tsx b/src/main.tsx index 0ec2bfae..452935c1 100644 --- a/src/main.tsx +++ b/src/main.tsx @@ -26,7 +26,7 @@ import { createBrowserHistory } from "history"; import "./index.css"; import { setLogLevel as setLKLogLevel } from "livekit-client"; -import App from "./App"; +import { App } from "./App"; import { init as initRageshake } from "./settings/rageshake"; import { Initializer } from "./initializer"; diff --git a/src/matrix-utils.ts b/src/matrix-utils.ts index a03b4bc4..2bb1734a 100644 --- a/src/matrix-utils.ts +++ b/src/matrix-utils.ts @@ -40,7 +40,7 @@ export const fallbackICEServerAllowed = import.meta.env.VITE_FALLBACK_STUN_ALLOWED === "true"; export class CryptoStoreIntegrityError extends Error { - constructor() { + public constructor() { super("Crypto store data was expected, but none was found"); } } @@ -52,13 +52,13 @@ const SYNC_STORE_NAME = "element-call-sync"; // (It's a good opportunity to make the database names consistent.) const CRYPTO_STORE_NAME = "element-call-crypto"; -function waitForSync(client: MatrixClient) { +function waitForSync(client: MatrixClient): Promise { return new Promise((resolve, reject) => { const onSync = ( state: SyncState, _old: SyncState | null, data?: ISyncStateData - ) => { + ): void => { if (state === "PREPARED") { client.removeListener(ClientEvent.Sync, onSync); resolve(); @@ -108,7 +108,7 @@ export async function initClient( // Chrome supports it. (It bundles them fine in production mode.) workerFactory: import.meta.env.DEV ? undefined - : () => new IndexedDBWorker(), + : (): Worker => new IndexedDBWorker(), }); } else if (localStorage) { baseOpts.store = new MemoryStore({ localStorage }); @@ -307,7 +307,7 @@ export async function createRoom( // Wait for the room to arrive await new Promise((resolve, reject) => { - const onRoom = async (room: Room) => { + const onRoom = async (room: Room): Promise => { if (room.roomId === (await createPromise).room_id) { resolve(); cleanUp(); @@ -318,7 +318,7 @@ export async function createRoom( cleanUp(); }); - const cleanUp = () => { + const cleanUp = (): void => { client.off(ClientEvent.Room, onRoom); }; client.on(ClientEvent.Room, onRoom); diff --git a/src/otel/OTelCall.ts b/src/otel/OTelCall.ts index c7a7fb1a..c050116e 100644 --- a/src/otel/OTelCall.ts +++ b/src/otel/OTelCall.ts @@ -44,7 +44,7 @@ export class OTelCall { OTelCallAbstractMediaStreamSpan >(); - constructor( + public constructor( public userId: string, public deviceId: string, public call: MatrixCall, @@ -60,7 +60,7 @@ export class OTelCall { } } - public dispose() { + public dispose(): void { this.call.peerConn?.removeEventListener( "connectionstatechange", this.onCallConnectionStateChanged diff --git a/src/otel/OTelCallAbstractMediaStreamSpan.ts b/src/otel/OTelCallAbstractMediaStreamSpan.ts index aa77051d..66d9d7af 100644 --- a/src/otel/OTelCallAbstractMediaStreamSpan.ts +++ b/src/otel/OTelCallAbstractMediaStreamSpan.ts @@ -1,3 +1,19 @@ +/* +Copyright 2023 New Vector Ltd + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + import opentelemetry, { Span } from "@opentelemetry/api"; import { TrackStats } from "matrix-js-sdk/src/webrtc/stats/statsReport"; @@ -14,8 +30,8 @@ export abstract class OTelCallAbstractMediaStreamSpan { public readonly span; public constructor( - readonly oTel: ElementCallOpenTelemetry, - readonly callSpan: Span, + protected readonly oTel: ElementCallOpenTelemetry, + protected readonly callSpan: Span, protected readonly type: string ) { const ctx = opentelemetry.trace.setSpan( @@ -32,7 +48,7 @@ export abstract class OTelCallAbstractMediaStreamSpan { this.span = oTel.tracer.startSpan(this.type, options, ctx); } - protected upsertTrackSpans(tracks: TrackStats[]) { + protected upsertTrackSpans(tracks: TrackStats[]): void { let prvTracks: TrackId[] = [...this.trackSpans.keys()]; tracks.forEach((t) => { if (!this.trackSpans.has(t.id)) { diff --git a/src/otel/OTelCallFeedMediaStreamSpan.ts b/src/otel/OTelCallFeedMediaStreamSpan.ts index 6023fa65..e3f0a2f7 100644 --- a/src/otel/OTelCallFeedMediaStreamSpan.ts +++ b/src/otel/OTelCallFeedMediaStreamSpan.ts @@ -1,3 +1,19 @@ +/* +Copyright 2023 New Vector Ltd + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + import { Span } from "@opentelemetry/api"; import { CallFeedStats, @@ -10,9 +26,9 @@ import { OTelCallAbstractMediaStreamSpan } from "./OTelCallAbstractMediaStreamSp export class OTelCallFeedMediaStreamSpan extends OTelCallAbstractMediaStreamSpan { private readonly prev: { isAudioMuted: boolean; isVideoMuted: boolean }; - constructor( - readonly oTel: ElementCallOpenTelemetry, - readonly callSpan: Span, + public constructor( + protected readonly oTel: ElementCallOpenTelemetry, + protected readonly callSpan: Span, callFeed: CallFeedStats ) { const postFix = diff --git a/src/otel/OTelCallMediaStreamTrackSpan.ts b/src/otel/OTelCallMediaStreamTrackSpan.ts index 935e22fc..9351f723 100644 --- a/src/otel/OTelCallMediaStreamTrackSpan.ts +++ b/src/otel/OTelCallMediaStreamTrackSpan.ts @@ -1,3 +1,19 @@ +/* +Copyright 2023 New Vector Ltd + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + import { TrackStats } from "matrix-js-sdk/src/webrtc/stats/statsReport"; import opentelemetry, { Span } from "@opentelemetry/api"; @@ -8,8 +24,8 @@ export class OTelCallMediaStreamTrackSpan { private prev: TrackStats; public constructor( - readonly oTel: ElementCallOpenTelemetry, - readonly streamSpan: Span, + protected readonly oTel: ElementCallOpenTelemetry, + protected readonly streamSpan: Span, data: TrackStats ) { const ctx = opentelemetry.trace.setSpan( diff --git a/src/otel/OTelCallTransceiverMediaStreamSpan.ts b/src/otel/OTelCallTransceiverMediaStreamSpan.ts index 97006cd8..7aeb3d6e 100644 --- a/src/otel/OTelCallTransceiverMediaStreamSpan.ts +++ b/src/otel/OTelCallTransceiverMediaStreamSpan.ts @@ -1,3 +1,19 @@ +/* +Copyright 2023 New Vector Ltd + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + import { Span } from "@opentelemetry/api"; import { TrackStats, @@ -13,9 +29,9 @@ export class OTelCallTransceiverMediaStreamSpan extends OTelCallAbstractMediaStr currentDirection: string; }; - constructor( - readonly oTel: ElementCallOpenTelemetry, - readonly callSpan: Span, + public constructor( + protected readonly oTel: ElementCallOpenTelemetry, + protected readonly callSpan: Span, stats: TransceiverStats ) { super(oTel, callSpan, `matrix.call.transceiver.${stats.mid}`); diff --git a/src/otel/OTelGroupCallMembership.ts b/src/otel/OTelGroupCallMembership.ts index b60d5aa9..777aa5f6 100644 --- a/src/otel/OTelGroupCallMembership.ts +++ b/src/otel/OTelGroupCallMembership.ts @@ -62,7 +62,7 @@ export class OTelGroupCallMembership { }; private readonly speakingSpans = new Map>(); - constructor(private groupCall: GroupCall, client: MatrixClient) { + public constructor(private groupCall: GroupCall, client: MatrixClient) { const clientId = client.getUserId(); if (clientId) { this.myUserId = clientId; @@ -76,14 +76,14 @@ export class OTelGroupCallMembership { this.groupCall.on(GroupCallEvent.CallsChanged, this.onCallsChanged); } - dispose() { + public dispose(): void { this.groupCall.removeListener( GroupCallEvent.CallsChanged, this.onCallsChanged ); } - public onJoinCall() { + public onJoinCall(): void { if (!ElementCallOpenTelemetry.instance) return; if (this.callMembershipSpan !== undefined) { logger.warn("Call membership span is already started"); @@ -114,7 +114,7 @@ export class OTelGroupCallMembership { this.callMembershipSpan?.addEvent("matrix.joinCall"); } - public onLeaveCall() { + public onLeaveCall(): void { if (this.callMembershipSpan === undefined) { logger.warn("Call membership span is already ended"); return; @@ -127,7 +127,7 @@ export class OTelGroupCallMembership { this.groupCallContext = undefined; } - public onUpdateRoomState(event: MatrixEvent) { + public onUpdateRoomState(event: MatrixEvent): void { if ( !event || (!event.getType().startsWith("m.call") && @@ -142,7 +142,7 @@ export class OTelGroupCallMembership { ); } - public onCallsChanged = (calls: CallsByUserAndDevice) => { + public onCallsChanged(calls: CallsByUserAndDevice): void { for (const [userId, userCalls] of calls.entries()) { for (const [deviceId, call] of userCalls.entries()) { if (!this.callsByCallId.has(call.callId)) { @@ -179,9 +179,9 @@ export class OTelGroupCallMembership { this.callsByCallId.delete(callTrackingInfo.call.callId); } } - }; + } - public onCallStateChange(call: MatrixCall, newState: CallState) { + public onCallStateChange(call: MatrixCall, newState: CallState): void { const callTrackingInfo = this.callsByCallId.get(call.callId); if (!callTrackingInfo) { logger.error(`Got call state change for unknown call ID ${call.callId}`); @@ -193,7 +193,7 @@ export class OTelGroupCallMembership { }); } - public onSendEvent(call: MatrixCall, event: VoipEvent) { + public onSendEvent(call: MatrixCall, event: VoipEvent): void { const eventType = event.eventType as string; if ( !eventType.startsWith("m.call") && @@ -220,7 +220,7 @@ export class OTelGroupCallMembership { } } - public onReceivedVoipEvent(event: MatrixEvent) { + public onReceivedVoipEvent(event: MatrixEvent): void { // These come straight from CallEventHandler so don't have // a call already associated (in principle we could receive // events for calls we don't know about). @@ -251,37 +251,41 @@ export class OTelGroupCallMembership { }); } - public onToggleMicrophoneMuted(newValue: boolean) { + public onToggleMicrophoneMuted(newValue: boolean): void { this.callMembershipSpan?.addEvent("matrix.toggleMicMuted", { "matrix.microphone.muted": newValue, }); } - public onSetMicrophoneMuted(setMuted: boolean) { + public onSetMicrophoneMuted(setMuted: boolean): void { this.callMembershipSpan?.addEvent("matrix.setMicMuted", { "matrix.microphone.muted": setMuted, }); } - public onToggleLocalVideoMuted(newValue: boolean) { + public onToggleLocalVideoMuted(newValue: boolean): void { this.callMembershipSpan?.addEvent("matrix.toggleVidMuted", { "matrix.video.muted": newValue, }); } - public onSetLocalVideoMuted(setMuted: boolean) { + public onSetLocalVideoMuted(setMuted: boolean): void { this.callMembershipSpan?.addEvent("matrix.setVidMuted", { "matrix.video.muted": setMuted, }); } - public onToggleScreensharing(newValue: boolean) { + public onToggleScreensharing(newValue: boolean): void { this.callMembershipSpan?.addEvent("matrix.setVidMuted", { "matrix.screensharing.enabled": newValue, }); } - public onSpeaking(member: RoomMember, deviceId: string, speaking: boolean) { + public onSpeaking( + member: RoomMember, + deviceId: string, + speaking: boolean + ): void { if (speaking) { // Ensure that there's an audio activity span for this speaker let deviceMap = this.speakingSpans.get(member); @@ -311,7 +315,7 @@ export class OTelGroupCallMembership { } } - public onCallError(error: CallError, call: MatrixCall) { + public onCallError(error: CallError, call: MatrixCall): void { const callTrackingInfo = this.callsByCallId.get(call.callId); if (!callTrackingInfo) { logger.error(`Got error for unknown call ID ${call.callId}`); @@ -321,17 +325,19 @@ export class OTelGroupCallMembership { callTrackingInfo.span.recordException(error); } - public onGroupCallError(error: GroupCallError) { + public onGroupCallError(error: GroupCallError): void { this.callMembershipSpan?.recordException(error); } - public onUndecryptableToDevice(event: MatrixEvent) { + public onUndecryptableToDevice(event: MatrixEvent): void { this.callMembershipSpan?.addEvent("matrix.toDevice.undecryptable", { "sender.userId": event.getSender(), }); } - public onCallFeedStatsReport(report: GroupCallStatsReport) { + public onCallFeedStatsReport( + report: GroupCallStatsReport + ): void { if (!ElementCallOpenTelemetry.instance) return; let call: OTelCall | undefined; const callId = report.report?.callId; @@ -362,7 +368,7 @@ export class OTelGroupCallMembership { public onConnectionStatsReport( statsReport: GroupCallStatsReport - ) { + ): void { this.buildCallStatsSpan( OTelStatsReportType.ConnectionReport, statsReport.report @@ -371,7 +377,7 @@ export class OTelGroupCallMembership { public onByteSentStatsReport( statsReport: GroupCallStatsReport - ) { + ): void { this.buildCallStatsSpan( OTelStatsReportType.ByteSentReport, statsReport.report @@ -431,7 +437,7 @@ export class OTelGroupCallMembership { public onSummaryStatsReport( statsReport: GroupCallStatsReport - ) { + ): void { if (!ElementCallOpenTelemetry.instance) return; const type = OTelStatsReportType.SummaryReport; diff --git a/src/otel/ObjectFlattener.ts b/src/otel/ObjectFlattener.ts index 652f9056..715517d2 100644 --- a/src/otel/ObjectFlattener.ts +++ b/src/otel/ObjectFlattener.ts @@ -45,9 +45,9 @@ export class ObjectFlattener { return flatObject; } - static flattenSummaryStatsReportObject( + public static flattenSummaryStatsReportObject( statsReport: GroupCallStatsReport - ) { + ): Attributes { const flatObject = {}; ObjectFlattener.flattenObjectRecursive( statsReport.report, diff --git a/src/otel/otel.ts b/src/otel/otel.ts index d4629591..c6a1b971 100644 --- a/src/otel/otel.ts +++ b/src/otel/otel.ts @@ -36,7 +36,7 @@ export class ElementCallOpenTelemetry { private otlpExporter?: OTLPTraceExporter; public readonly rageshakeProcessor?: RageshakeSpanProcessor; - static globalInit(): void { + public static globalInit(): void { const config = Config.get(); // we always enable opentelemetry in general. We only enable the OTLP // collector if a URL is defined (and in future if another setting is defined) @@ -55,11 +55,11 @@ export class ElementCallOpenTelemetry { } } - static get instance(): ElementCallOpenTelemetry { + public static get instance(): ElementCallOpenTelemetry { return sharedInstance; } - constructor( + private constructor( collectorUrl: string | undefined, rageshakeUrl: string | undefined ) { diff --git a/src/profile/useProfile.ts b/src/profile/useProfile.ts index 2281bb1e..571c3835 100644 --- a/src/profile/useProfile.ts +++ b/src/profile/useProfile.ts @@ -38,7 +38,11 @@ type ProfileSaveCallback = ({ removeAvatar: boolean; }) => Promise; -export function useProfile(client: MatrixClient | undefined) { +interface UseProfile extends ProfileLoadState { + saveProfile: ProfileSaveCallback; +} + +export function useProfile(client: MatrixClient | undefined): UseProfile { const [{ success, loading, displayName, avatarUrl, error }, setState] = useState(() => { let user: User | undefined = undefined; @@ -59,7 +63,7 @@ export function useProfile(client: MatrixClient | undefined) { const onChangeUser = ( _event: MatrixEvent | undefined, { displayName, avatarUrl }: User - ) => { + ): void => { setState({ success: false, loading: false, diff --git a/src/room/CallEndedView.tsx b/src/room/CallEndedView.tsx index 6050b9e9..72567618 100644 --- a/src/room/CallEndedView.tsx +++ b/src/room/CallEndedView.tsx @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -import { FC, FormEventHandler, useCallback, useState } from "react"; +import { FC, FormEventHandler, ReactNode, useCallback, useState } from "react"; import { MatrixClient } from "matrix-js-sdk/src/client"; import { Trans, useTranslation } from "react-i18next"; import { useHistory } from "react-router-dom"; @@ -148,7 +148,7 @@ export const CallEndedView: FC = ({
); - const renderBody = () => { + const renderBody = (): ReactNode => { if (leaveError) { return ( <> diff --git a/src/room/GroupCallInspector.tsx b/src/room/GroupCallInspector.tsx index d3df2c5b..68f27add 100644 --- a/src/room/GroupCallInspector.tsx +++ b/src/room/GroupCallInspector.tsx @@ -28,7 +28,8 @@ import { useContext, Dispatch, SetStateAction, - ReactNode, + FC, + PropsWithChildren, } from "react"; import ReactJson, { CollapsedFieldProps } from "react-json-view"; import mermaid from "mermaid"; @@ -72,11 +73,11 @@ const defaultCollapsedFields = [ "content", ]; -function shouldCollapse({ name }: CollapsedFieldProps) { +function shouldCollapse({ name }: CollapsedFieldProps): boolean { return name ? defaultCollapsedFields.includes(name) : false; } -function getUserName(userId: string) { +function getUserName(userId: string): string { const match = userId.match(/@([^:]+):/); return match && match.length > 0 @@ -84,7 +85,7 @@ function getUserName(userId: string) { : userId.replace(/\W/g, ""); } -function formatContent(type: string, content: CallEventContent) { +function formatContent(type: string, content: CallEventContent): string { if (type === "m.call.hangup") { return `callId: ${content.call_id.slice(-4)} reason: ${ content.reason @@ -123,7 +124,7 @@ const dateFormatter = new Intl.DateTimeFormat([], { fractionalSecondDigits: 3, }); -function formatTimestamp(timestamp: number | Date) { +function formatTimestamp(timestamp: number | Date): string { return dateFormatter.format(timestamp); } @@ -145,11 +146,9 @@ export const InspectorContext = [InspectorContextState, Dispatch>] >(undefined); -export function InspectorContextProvider({ +export const InspectorContextProvider: FC> = ({ children, -}: { - children: ReactNode; -}) { +}) => { // We take the tuple of [currentState, setter] and stick // it straight into the context for other things to call // the setState method... this feels like a fairly severe @@ -161,7 +160,7 @@ export function InspectorContextProvider({ {children} ); -} +}; type CallEventContent = { ["m.calls"]: { @@ -192,13 +191,13 @@ interface SequenceDiagramViewerProps { events: SequenceDiagramMatrixEvent[]; } -export function SequenceDiagramViewer({ +export const SequenceDiagramViewer: FC = ({ localUserId, remoteUserIds, selectedUserId, onSelectUserId, events, -}: SequenceDiagramViewerProps) { +}) => { const mermaidElRef = useRef(null); useEffect(() => { @@ -232,7 +231,7 @@ export function SequenceDiagramViewer({ className={styles.selectInput} label="Remote User" selectedKey={selectedUserId} - onSelectionChange={(key) => onSelectUserId(key.toString())} + onSelectionChange={(key): void => onSelectUserId(key.toString())} > {remoteUserIds.map((userId) => ( {userId} @@ -243,7 +242,7 @@ export function SequenceDiagramViewer({ ); -} +}; function reducer( state: InspectorContextState, @@ -254,7 +253,7 @@ function reducer( callStateEvent?: MatrixEvent; memberStateEvents?: MatrixEvent[]; } -) { +): InspectorContextState { switch (action.type) { case RoomStateEvent.Events: { const { event, callStateEvent, memberStateEvents } = action; @@ -380,7 +379,7 @@ function useGroupCallState( }); useEffect(() => { - function onUpdateRoomState(event?: MatrixEvent) { + function onUpdateRoomState(event?: MatrixEvent): void { const callStateEvent = groupCall.room.currentState.getStateEvents( "org.matrix.msc3401.call", groupCall.groupCallId @@ -400,13 +399,13 @@ function useGroupCallState( otelGroupCallMembership?.onUpdateRoomState(event); } - function onReceivedVoipEvent(event: MatrixEvent) { + function onReceivedVoipEvent(event: MatrixEvent): void { dispatch({ type: ClientEvent.ReceivedVoipEvent, event }); otelGroupCallMembership?.onReceivedVoipEvent(event); } - function onSendVoipEvent(event: VoipEvent, call: MatrixCall) { + function onSendVoipEvent(event: VoipEvent, call: MatrixCall): void { dispatch({ type: CallEvent.SendVoipEvent, rawEvent: event }); otelGroupCallMembership?.onSendEvent(call, event); @@ -416,19 +415,19 @@ function useGroupCallState( newState: CallState, _: CallState, call: MatrixCall - ) { + ): void { otelGroupCallMembership?.onCallStateChange(call, newState); } - function onCallError(error: CallError, call: MatrixCall) { + function onCallError(error: CallError, call: MatrixCall): void { otelGroupCallMembership.onCallError(error, call); } - function onGroupCallError(error: GroupCallError) { + function onGroupCallError(error: GroupCallError): void { otelGroupCallMembership.onGroupCallError(error); } - function onUndecryptableToDevice(event: MatrixEvent) { + function onUndecryptableToDevice(event: MatrixEvent): void { dispatch({ type: ClientEvent.ReceivedVoipEvent, event }); Sentry.captureMessage("Undecryptable to-device Event"); @@ -478,12 +477,12 @@ interface GroupCallInspectorProps { show: boolean; } -export function GroupCallInspector({ +export const GroupCallInspector: FC = ({ client, groupCall, otelGroupCallMembership, show, -}: GroupCallInspectorProps) { +}) => { const [currentTab, setCurrentTab] = useState("sequence-diagrams"); const [selectedUserId, setSelectedUserId] = useState(); const state = useGroupCallState(client, groupCall, otelGroupCallMembership); @@ -506,10 +505,12 @@ export function GroupCallInspector({ className={styles.inspector} >
- - +
{currentTab === "sequence-diagrams" && state.localUserId && @@ -539,4 +540,4 @@ export function GroupCallInspector({ )} ); -} +}; diff --git a/src/room/GroupCallView.tsx b/src/room/GroupCallView.tsx index ab96926a..2c409e5f 100644 --- a/src/room/GroupCallView.tsx +++ b/src/room/GroupCallView.tsx @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -import { useCallback, useEffect, useMemo, useRef, useState } from "react"; +import { FC, useCallback, useEffect, useMemo, useRef, useState } from "react"; import { useHistory } from "react-router-dom"; import { MatrixClient } from "matrix-js-sdk/src/client"; import { Room, isE2EESupported } from "livekit-client"; @@ -64,14 +64,14 @@ interface Props { rtcSession: MatrixRTCSession; } -export function GroupCallView({ +export const GroupCallView: FC = ({ client, isPasswordlessUser, confineToRoom, preload, hideHeader, rtcSession, -}: Props) { +}) => { const memberships = useMatrixRTCSessionMemberships(rtcSession); const isJoined = useMatrixRTCSessionJoinState(rtcSession); @@ -135,7 +135,9 @@ export function GroupCallView({ useEffect(() => { if (widget && preload) { // In preload mode, wait for a join action before entering - const onJoin = async (ev: CustomEvent) => { + const onJoin = async ( + ev: CustomEvent + ): Promise => { // XXX: I think this is broken currently - LiveKit *won't* request // permissions and give you device names unless you specify a kind, but // here we want all kinds of devices. This needs a fix in livekit-client @@ -247,9 +249,11 @@ export function GroupCallView({ useEffect(() => { if (widget && isJoined) { - const onHangup = async (ev: CustomEvent) => { + const onHangup = async ( + ev: CustomEvent + ): Promise => { leaveRTCSession(rtcSession); - await widget!.api.transport.reply(ev.detail, {}); + widget!.api.transport.reply(ev.detail, {}); widget!.api.setAlwaysOnScreen(false); }; widget.lazyActions.once(ElementWidgetActions.HangupCall, onHangup); @@ -388,7 +392,7 @@ export function GroupCallView({ client={client} matrixInfo={matrixInfo} muteStates={muteStates} - onEnter={() => enterRTCSession(rtcSession)} + onEnter={(): void => enterRTCSession(rtcSession)} confineToRoom={confineToRoom} hideHeader={hideHeader} participatingMembers={participatingMembers} @@ -397,4 +401,4 @@ export function GroupCallView({ ); } -} +}; diff --git a/src/room/InCallView.tsx b/src/room/InCallView.tsx index 707eb5d8..979aa2e6 100644 --- a/src/room/InCallView.tsx +++ b/src/room/InCallView.tsx @@ -27,7 +27,16 @@ import { ConnectionState, Room, Track } from "livekit-client"; import { MatrixClient } from "matrix-js-sdk/src/client"; import { RoomMember } from "matrix-js-sdk/src/models/room-member"; import { Room as MatrixRoom } from "matrix-js-sdk/src/models/room"; -import { Ref, useCallback, useEffect, useMemo, useRef, useState } from "react"; +import { + FC, + ReactNode, + Ref, + useCallback, + useEffect, + useMemo, + useRef, + useState, +} from "react"; import { useTranslation } from "react-i18next"; import useMeasure from "react-use-measure"; import { logger } from "matrix-js-sdk/src/logger"; @@ -91,7 +100,7 @@ export interface ActiveCallProps e2eeConfig?: E2EEConfig; } -export function ActiveCall(props: ActiveCallProps) { +export const ActiveCall: FC = (props) => { const sfuConfig = useOpenIDSFU(props.client, props.rtcSession); const { livekitRoom, connState } = useLiveKit( props.muteStates, @@ -112,7 +121,7 @@ export function ActiveCall(props: ActiveCallProps) { ); -} +}; export interface InCallViewProps { client: MatrixClient; @@ -128,7 +137,7 @@ export interface InCallViewProps { onShareClick: (() => void) | null; } -export function InCallView({ +export const InCallView: FC = ({ client, matrixInfo, rtcSession, @@ -140,7 +149,7 @@ export function InCallView({ otelGroupCallMembership, connState, onShareClick, -}: InCallViewProps) { +}) => { const { t } = useTranslation(); usePreventScroll(); useWakeLock(); @@ -211,13 +220,13 @@ export function InCallView({ useEffect(() => { if (widget) { - const onTileLayout = async (ev: CustomEvent) => { + const onTileLayout = (ev: CustomEvent): void => { setLayout("grid"); - await widget!.api.transport.reply(ev.detail, {}); + widget!.api.transport.reply(ev.detail, {}); }; - const onSpotlightLayout = async (ev: CustomEvent) => { + const onSpotlightLayout = (ev: CustomEvent): void => { setLayout("spotlight"); - await widget!.api.transport.reply(ev.detail, {}); + widget!.api.transport.reply(ev.detail, {}); }; widget.lazyActions.on(ElementWidgetActions.TileLayout, onTileLayout); @@ -296,7 +305,7 @@ export function InCallView({ disableAnimations={prefersReducedMotion || isSafari} layoutStates={layoutStates} > - {(props) => ( + {(props): ReactNode => ( ); -} +}; function findMatrixMember( room: MatrixRoom, diff --git a/src/room/RageshakeRequestModal.tsx b/src/room/RageshakeRequestModal.tsx index ed9acbcb..74debd34 100644 --- a/src/room/RageshakeRequestModal.tsx +++ b/src/room/RageshakeRequestModal.tsx @@ -17,7 +17,7 @@ limitations under the License. import { FC, useEffect } from "react"; import { useTranslation } from "react-i18next"; -import { Modal, ModalProps } from "../Modal"; +import { Modal, Props as ModalProps } from "../Modal"; import { Button } from "../button"; import { FieldRow, ErrorMessage } from "../input/Input"; import { useSubmitRageshake } from "../settings/submit-rageshake"; @@ -52,8 +52,8 @@ export const RageshakeRequestModal: FC = ({ ); - } + }, ); export const MicButton: FC<{ diff --git a/src/button/LinkButton.tsx b/src/button/LinkButton.tsx index 2a94b150..eb30441c 100644 --- a/src/button/LinkButton.tsx +++ b/src/button/LinkButton.tsx @@ -47,7 +47,7 @@ export const LinkButton: FC = ({ className={classNames( variantToClassName[variant || "secondary"], size ? sizeToClassName[size] : [], - className + className, )} to={to} {...rest} diff --git a/src/config/Config.ts b/src/config/Config.ts index f414c58b..0930af49 100644 --- a/src/config/Config.ts +++ b/src/config/Config.ts @@ -57,7 +57,7 @@ export class Config { } async function downloadConfig( - configJsonFilename: string + configJsonFilename: string, ): Promise { const url = new URL(configJsonFilename, window.location.href); url.searchParams.set("cachebuster", Date.now().toString()); diff --git a/src/e2ee/sharedKeyManagement.ts b/src/e2ee/sharedKeyManagement.ts index 06183878..21c54481 100644 --- a/src/e2ee/sharedKeyManagement.ts +++ b/src/e2ee/sharedKeyManagement.ts @@ -26,7 +26,7 @@ export const getRoomSharedKeyLocalStorageKey = (roomId: string): string => `room-shared-key-${roomId}`; const useInternalRoomSharedKey = ( - roomId: string + roomId: string, ): [string | null, (value: string) => void] => { const key = useMemo(() => getRoomSharedKeyLocalStorageKey(roomId), [roomId]); const [e2eeEnabled] = useEnableE2EE(); @@ -68,6 +68,6 @@ export const useIsRoomE2EE = (roomId: string): boolean | null => { // should inspect the e2eEnabled URL parameter here? return useMemo( () => widget === null && (room === null || !room.getCanonicalAlias()), - [room] + [room], ); }; diff --git a/src/form/Form.tsx b/src/form/Form.tsx index 54961791..1f66ac1a 100644 --- a/src/form/Form.tsx +++ b/src/form/Form.tsx @@ -36,5 +36,5 @@ export const Form = forwardRef( {children} ); - } + }, ); diff --git a/src/home/CallList.tsx b/src/home/CallList.tsx index 227ea535..187228b9 100644 --- a/src/home/CallList.tsx +++ b/src/home/CallList.tsx @@ -74,7 +74,7 @@ const CallTile: FC = ({ name, avatarUrl, room }) => { to={getRelativeRoomUrl( room.roomId, room.name, - roomSharedKey ?? undefined + roomSharedKey ?? undefined, )} className={styles.callTileLink} > @@ -92,7 +92,7 @@ const CallTile: FC = ({ name, avatarUrl, room }) => { value={getAbsoluteRoomUrl( room.roomId, room.name, - roomSharedKey ?? undefined + roomSharedKey ?? undefined, )} /> diff --git a/src/home/RegisteredView.tsx b/src/home/RegisteredView.tsx index d4ada1e4..4a130899 100644 --- a/src/home/RegisteredView.tsx +++ b/src/home/RegisteredView.tsx @@ -56,7 +56,7 @@ export const RegisteredView: FC = ({ client }) => { useState(false); const onDismissJoinExistingCallModal = useCallback( () => setJoinExistingCallModalOpen(false), - [setJoinExistingCallModalOpen] + [setJoinExistingCallModalOpen], ); const [e2eeEnabled] = useEnableE2EE(); @@ -77,15 +77,15 @@ export const RegisteredView: FC = ({ client }) => { const createRoomResult = await createRoom( client, roomName, - e2eeEnabled ?? false + e2eeEnabled ?? false, ); history.push( getRelativeRoomUrl( createRoomResult.roomId, roomName, - createRoomResult.password - ) + createRoomResult.password, + ), ); } @@ -102,7 +102,7 @@ export const RegisteredView: FC = ({ client }) => { } }); }, - [client, history, setJoinExistingCallModalOpen, e2eeEnabled] + [client, history, setJoinExistingCallModalOpen, e2eeEnabled], ); const recentRooms = useGroupCallRooms(client); diff --git a/src/home/UnauthenticatedView.tsx b/src/home/UnauthenticatedView.tsx index a0914ca7..beb419db 100644 --- a/src/home/UnauthenticatedView.tsx +++ b/src/home/UnauthenticatedView.tsx @@ -57,7 +57,7 @@ export const UnauthenticatedView: FC = () => { useState(false); const onDismissJoinExistingCallModal = useCallback( () => setJoinExistingCallModalOpen(false), - [setJoinExistingCallModalOpen] + [setJoinExistingCallModalOpen], ); const [onFinished, setOnFinished] = useState<() => void>(); const history = useHistory(); @@ -82,7 +82,7 @@ export const UnauthenticatedView: FC = () => { randomString(16), displayName, recaptchaResponse, - true + true, ); let createRoomResult; @@ -90,7 +90,7 @@ export const UnauthenticatedView: FC = () => { createRoomResult = await createRoom( client, roomName, - e2eeEnabled ?? false + e2eeEnabled ?? false, ); } catch (error) { if (!setClient) { @@ -124,8 +124,8 @@ export const UnauthenticatedView: FC = () => { getRelativeRoomUrl( createRoomResult.roomId, roomName, - createRoomResult.password - ) + createRoomResult.password, + ), ); } @@ -144,7 +144,7 @@ export const UnauthenticatedView: FC = () => { setJoinExistingCallModalOpen, setClient, e2eeEnabled, - ] + ], ); return ( diff --git a/src/home/useGroupCallRooms.ts b/src/home/useGroupCallRooms.ts index 6e50dda0..77572ad6 100644 --- a/src/home/useGroupCallRooms.ts +++ b/src/home/useGroupCallRooms.ts @@ -47,7 +47,7 @@ function getLastTs(client: MatrixClient, r: Room): number { if (r.getMyMembership() !== "join") { const membershipEvent = r.currentState.getStateEvents( "m.room.member", - myUserId + myUserId, ); if (membershipEvent && !Array.isArray(membershipEvent)) { @@ -115,7 +115,7 @@ export function useGroupCallRooms(client: MatrixClient): GroupCallRoom[] { client.removeListener(GroupCallEventHandlerEvent.Incoming, updateRooms); client.removeListener( GroupCallEventHandlerEvent.Participants, - updateRooms + updateRooms, ); }; }, [client]); diff --git a/src/index.css b/src/index.css index d9f7d052..f647e87c 100644 --- a/src/index.css +++ b/src/index.css @@ -68,7 +68,8 @@ limitations under the License. font-weight: 400; font-display: swap; unicode-range: var(--inter-unicode-range); - src: url("/fonts/Inter/Inter-Regular.woff2") format("woff2"), + src: + url("/fonts/Inter/Inter-Regular.woff2") format("woff2"), url("/fonts/Inter/Inter-Regular.woff") format("woff"); } @@ -78,7 +79,8 @@ limitations under the License. font-weight: 400; font-display: swap; unicode-range: var(--inter-unicode-range); - src: url("/fonts/Inter/Inter-Italic.woff2") format("woff2"), + src: + url("/fonts/Inter/Inter-Italic.woff2") format("woff2"), url("/fonts/Inter/Inter-Italic.woff") format("woff"); } @@ -88,7 +90,8 @@ limitations under the License. font-weight: 500; font-display: swap; unicode-range: var(--inter-unicode-range); - src: url("/fonts/Inter/Inter-Medium.woff2") format("woff2"), + src: + url("/fonts/Inter/Inter-Medium.woff2") format("woff2"), url("/fonts/Inter/Inter-Medium.woff") format("woff"); } @@ -98,7 +101,8 @@ limitations under the License. font-weight: 500; font-display: swap; unicode-range: var(--inter-unicode-range); - src: url("/fonts/Inter/Inter-MediumItalic.woff2") format("woff2"), + src: + url("/fonts/Inter/Inter-MediumItalic.woff2") format("woff2"), url("/fonts/Inter/Inter-MediumItalic.woff") format("woff"); } @@ -108,7 +112,8 @@ limitations under the License. font-weight: 600; font-display: swap; unicode-range: var(--inter-unicode-range); - src: url("/fonts/Inter/Inter-SemiBold.woff2") format("woff2"), + src: + url("/fonts/Inter/Inter-SemiBold.woff2") format("woff2"), url("/fonts/Inter/Inter-SemiBold.woff") format("woff"); } @@ -118,7 +123,8 @@ limitations under the License. font-weight: 600; font-display: swap; unicode-range: var(--inter-unicode-range); - src: url("/fonts/Inter/Inter-SemiBoldItalic.woff2") format("woff2"), + src: + url("/fonts/Inter/Inter-SemiBoldItalic.woff2") format("woff2"), url("/fonts/Inter/Inter-SemiBoldItalic.woff") format("woff"); } @@ -128,7 +134,8 @@ limitations under the License. font-weight: 700; font-display: swap; unicode-range: var(--inter-unicode-range); - src: url("/fonts/Inter/Inter-Bold.woff2") format("woff2"), + src: + url("/fonts/Inter/Inter-Bold.woff2") format("woff2"), url("/fonts/Inter/Inter-Bold.woff") format("woff"); } @@ -138,7 +145,8 @@ limitations under the License. font-weight: 700; font-display: swap; unicode-range: var(--inter-unicode-range); - src: url("/fonts/Inter/Inter-BoldItalic.woff2") format("woff2"), + src: + url("/fonts/Inter/Inter-BoldItalic.woff2") format("woff2"), url("/fonts/Inter/Inter-BoldItalic.woff") format("woff"); } diff --git a/src/initializer.tsx b/src/initializer.tsx index d2bbb076..57000936 100644 --- a/src/initializer.tsx +++ b/src/initializer.tsx @@ -99,13 +99,13 @@ export class Initializer { if (fontScale !== null) { document.documentElement.style.setProperty( "--font-scale", - fontScale.toString() + fontScale.toString(), ); } if (fonts.length > 0) { document.documentElement.style.setProperty( "--font-family", - fonts.map((f) => `"${f}"`).join(", ") + fonts.map((f) => `"${f}"`).join(", "), ); } diff --git a/src/input/AvatarInputField.tsx b/src/input/AvatarInputField.tsx index 5e6198d4..266f2717 100644 --- a/src/input/AvatarInputField.tsx +++ b/src/input/AvatarInputField.tsx @@ -52,7 +52,7 @@ export const AvatarInputField = forwardRef( onRemoveAvatar, ...rest }, - ref + ref, ) => { const { t } = useTranslation(); @@ -120,5 +120,5 @@ export const AvatarInputField = forwardRef( )} ); - } + }, ); diff --git a/src/input/Input.module.css b/src/input/Input.module.css index dc1bde19..b81a903f 100644 --- a/src/input/Input.module.css +++ b/src/input/Input.module.css @@ -85,8 +85,11 @@ limitations under the License. } .inputField label { - transition: font-size 0.25s ease-out 0.1s, color 0.25s ease-out 0.1s, - top 0.25s ease-out 0.1s, background-color 0.25s ease-out 0.1s; + transition: + font-size 0.25s ease-out 0.1s, + color 0.25s ease-out 0.1s, + top 0.25s ease-out 0.1s, + background-color 0.25s ease-out 0.1s; color: var(--cpd-color-text-secondary); background-color: transparent; font-size: var(--font-size-body); @@ -118,8 +121,11 @@ limitations under the License. .inputField textarea:not(:placeholder-shown) + label, .inputField.prefix textarea + label { background-color: var(--cpd-color-bg-canvas-default); - transition: font-size 0.25s ease-out 0s, color 0.25s ease-out 0s, - top 0.25s ease-out 0s, background-color 0.25s ease-out 0s; + transition: + font-size 0.25s ease-out 0s, + color 0.25s ease-out 0s, + top 0.25s ease-out 0s, + background-color 0.25s ease-out 0s; font-size: var(--font-size-micro); top: -13px; padding: 0 2px; diff --git a/src/input/Input.tsx b/src/input/Input.tsx index b6826681..24bea83f 100644 --- a/src/input/Input.tsx +++ b/src/input/Input.tsx @@ -44,7 +44,7 @@ export function FieldRow({ className={classNames( styles.fieldRow, { [styles.rightAlign]: rightAlign }, - className + className, )} > {children} @@ -102,7 +102,7 @@ export const InputField = forwardRef< disabled, ...rest }, - ref + ref, ) => { const descriptionId = useId(); @@ -114,7 +114,7 @@ export const InputField = forwardRef< [styles.prefix]: !!prefix, [styles.disabled]: disabled, }, - className + className, )} > {prefix && {prefix}} @@ -163,7 +163,7 @@ export const InputField = forwardRef< )} ); - } + }, ); interface ErrorMessageProps { diff --git a/src/input/SelectInput.tsx b/src/input/SelectInput.tsx index 0feb346e..f0817582 100644 --- a/src/input/SelectInput.tsx +++ b/src/input/SelectInput.tsx @@ -38,7 +38,7 @@ export function SelectInput(props: Props): JSX.Element { const { labelProps, triggerProps, valueProps, menuProps } = useSelect( props, state, - ref + ref, ); const { buttonProps } = useButton(triggerProps, ref); diff --git a/src/livekit/MediaDevicesContext.tsx b/src/livekit/MediaDevicesContext.tsx index ddd23b9d..df5b3fd9 100644 --- a/src/livekit/MediaDevicesContext.tsx +++ b/src/livekit/MediaDevicesContext.tsx @@ -51,7 +51,7 @@ export interface MediaDevices { // Cargo-culted from @livekit/components-react function useObservableState( observable: Observable | undefined, - startWith: T + startWith: T, ): T { const [state, setState] = useState(startWith); useEffect(() => { @@ -67,7 +67,7 @@ function useMediaDevice( kind: MediaDeviceKind, fallbackDevice: string | undefined, usingNames: boolean, - alwaysDefault: boolean = false + alwaysDefault: boolean = false, ): MediaDevice { // Make sure we don't needlessly reset to a device observer without names, // once permissions are already given @@ -83,7 +83,7 @@ function useMediaDevice( // kind, which then results in multiple permissions requests. const deviceObserver = useMemo( () => createMediaDeviceObserver(kind, requestPermissions), - [kind, requestPermissions] + [kind, requestPermissions], ); const available = useObservableState(deviceObserver, []); const [selectedId, select] = useState(fallbackDevice); @@ -143,18 +143,18 @@ export const MediaDevicesProvider: FC = ({ children }) => { const audioInput = useMediaDevice( "audioinput", audioInputSetting, - usingNames + usingNames, ); const audioOutput = useMediaDevice( "audiooutput", audioOutputSetting, useOutputNames, - alwaysUseDefaultAudio + alwaysUseDefaultAudio, ); const videoInput = useMediaDevice( "videoinput", videoInputSetting, - usingNames + usingNames, ); useEffect(() => { @@ -176,11 +176,11 @@ export const MediaDevicesProvider: FC = ({ children }) => { const startUsingDeviceNames = useCallback( () => setNumCallersUsingNames((n) => n + 1), - [setNumCallersUsingNames] + [setNumCallersUsingNames], ); const stopUsingDeviceNames = useCallback( () => setNumCallersUsingNames((n) => n - 1), - [setNumCallersUsingNames] + [setNumCallersUsingNames], ); const context: MediaDevices = useMemo( @@ -197,7 +197,7 @@ export const MediaDevicesProvider: FC = ({ children }) => { videoInput, startUsingDeviceNames, stopUsingDeviceNames, - ] + ], ); return ( @@ -218,7 +218,7 @@ export const useMediaDevices = (): MediaDevices => */ export const useMediaDeviceNames = ( context: MediaDevices, - enabled = true + enabled = true, ): void => useEffect(() => { if (enabled) { diff --git a/src/livekit/openIDSFU.ts b/src/livekit/openIDSFU.ts index 3e6779f5..8b447485 100644 --- a/src/livekit/openIDSFU.ts +++ b/src/livekit/openIDSFU.ts @@ -42,7 +42,7 @@ export type OpenIDClientParts = Pick< export function useOpenIDSFU( client: OpenIDClientParts, - rtcSession: MatrixRTCSession + rtcSession: MatrixRTCSession, ): SFUConfig | undefined { const [sfuConfig, setSFUConfig] = useState(undefined); @@ -62,20 +62,20 @@ export function useOpenIDSFU( export async function getSFUConfigWithOpenID( client: OpenIDClientParts, - activeFocus: LivekitFocus + activeFocus: LivekitFocus, ): Promise { const openIdToken = await client.getOpenIdToken(); logger.debug("Got openID token", openIdToken); try { logger.info( - `Trying to get JWT from call's active focus URL of ${activeFocus.livekit_service_url}...` + `Trying to get JWT from call's active focus URL of ${activeFocus.livekit_service_url}...`, ); const sfuConfig = await getLiveKitJWT( client, activeFocus.livekit_service_url, activeFocus.livekit_alias, - openIdToken + openIdToken, ); logger.info(`Got JWT from call's active focus URL.`); @@ -83,7 +83,7 @@ export async function getSFUConfigWithOpenID( } catch (e) { logger.warn( `Failed to get JWT from RTC session's active focus URL of ${activeFocus.livekit_service_url}.`, - e + e, ); return undefined; } @@ -93,7 +93,7 @@ async function getLiveKitJWT( client: OpenIDClientParts, livekitServiceURL: string, roomName: string, - openIDToken: IOpenIDToken + openIDToken: IOpenIDToken, ): Promise { try { const res = await fetch(livekitServiceURL + "/sfu/get", { diff --git a/src/livekit/useECConnectionState.ts b/src/livekit/useECConnectionState.ts index 8e0d44ac..0b18cd10 100644 --- a/src/livekit/useECConnectionState.ts +++ b/src/livekit/useECConnectionState.ts @@ -51,7 +51,7 @@ async function doConnect( livekitRoom: Room, sfuConfig: SFUConfig, audioEnabled: boolean, - audioOptions: AudioCaptureOptions + audioOptions: AudioCaptureOptions, ): Promise { await livekitRoom!.connect(sfuConfig!.url, sfuConfig!.jwt); @@ -76,12 +76,12 @@ export function useECConnectionState( initialAudioOptions: AudioCaptureOptions, initialAudioEnabled: boolean, livekitRoom?: Room, - sfuConfig?: SFUConfig + sfuConfig?: SFUConfig, ): ECConnectionState { const [connState, setConnState] = useState( sfuConfig && livekitRoom ? livekitRoom.state - : ECAddonConnectionState.ECWaiting + : ECAddonConnectionState.ECWaiting, ); const [isSwitchingFocus, setSwitchingFocus] = useState(false); @@ -116,7 +116,7 @@ export function useECConnectionState( !sfuConfigEquals(currentSFUConfig.current, sfuConfig) ) { logger.info( - `SFU config changed! URL was ${currentSFUConfig.current?.url} now ${sfuConfig?.url}` + `SFU config changed! URL was ${currentSFUConfig.current?.url} now ${sfuConfig?.url}`, ); (async (): Promise => { @@ -128,7 +128,7 @@ export function useECConnectionState( livekitRoom!, sfuConfig!, initialAudioEnabled, - initialAudioOptions + initialAudioOptions, ); } finally { setIsInDoConnect(false); @@ -149,7 +149,7 @@ export function useECConnectionState( livekitRoom!, sfuConfig!, initialAudioEnabled, - initialAudioOptions + initialAudioOptions, ).finally(() => setIsInDoConnect(false)); } diff --git a/src/livekit/useLiveKit.ts b/src/livekit/useLiveKit.ts index 7c2812d8..c8a5e401 100644 --- a/src/livekit/useLiveKit.ts +++ b/src/livekit/useLiveKit.ts @@ -52,7 +52,7 @@ interface UseLivekitResult { export function useLiveKit( muteStates: MuteStates, sfuConfig?: SFUConfig, - e2eeConfig?: E2EEConfig + e2eeConfig?: E2EEConfig, ): UseLivekitResult { const e2eeOptions = useMemo(() => { if (!e2eeConfig?.sharedKey) return undefined; @@ -67,7 +67,7 @@ export function useLiveKit( if (!e2eeConfig?.sharedKey || !e2eeOptions) return; (e2eeOptions.keyProvider as ExternalE2EEKeyProvider).setKey( - e2eeConfig?.sharedKey + e2eeConfig?.sharedKey, ); }, [e2eeOptions, e2eeConfig?.sharedKey]); @@ -93,7 +93,7 @@ export function useLiveKit( }, e2ee: e2eeOptions, }), - [e2eeOptions] + [e2eeOptions], ); // useECConnectionState creates and publishes an audio track by hand. To keep @@ -131,7 +131,7 @@ export function useLiveKit( }, initialMuteStates.current.audio.enabled, room, - sfuConfig + sfuConfig, ); // Unblock audio once the connection is finished @@ -215,11 +215,11 @@ export function useLiveKit( room.options.audioCaptureDefaults?.deviceId === "default" ) { const activeMicTrack = Array.from( - room.localParticipant.audioTracks.values() + room.localParticipant.audioTracks.values(), ).find((d) => d.source === Track.Source.Microphone)?.track; const defaultDevice = device.available.find( - (d) => d.deviceId === "default" + (d) => d.deviceId === "default", ); if ( defaultDevice && @@ -245,7 +245,7 @@ export function useLiveKit( room .switchActiveDevice(kind, id) .catch((e) => - logger.error(`Failed to sync ${kind} device with LiveKit`, e) + logger.error(`Failed to sync ${kind} device with LiveKit`, e), ); } } diff --git a/src/main.tsx b/src/main.tsx index e7ef9776..ed64a09c 100644 --- a/src/main.tsx +++ b/src/main.tsx @@ -48,7 +48,7 @@ if (!window.isSecureContext) { fatalError = new Error( "This app cannot run in an insecure context. To fix this, access the app " + "via a local loopback address, or serve it over HTTPS.\n" + - "https://developer.mozilla.org/en-US/docs/Web/Security/Secure_Contexts" + "https://developer.mozilla.org/en-US/docs/Web/Security/Secure_Contexts", ); } else if (!navigator.mediaDevices) { fatalError = new Error("Your browser does not support WebRTC."); @@ -66,5 +66,5 @@ const history = createBrowserHistory(); root.render( - + , ); diff --git a/src/matrix-utils.ts b/src/matrix-utils.ts index 48aa8b7a..52c55959 100644 --- a/src/matrix-utils.ts +++ b/src/matrix-utils.ts @@ -59,7 +59,7 @@ function waitForSync(client: MatrixClient): Promise { const onSync = ( state: SyncState, _old: SyncState | null, - data?: ISyncStateData + data?: ISyncStateData, ): void => { if (state === "PREPARED") { client.removeListener(ClientEvent.Sync, onSync); @@ -83,7 +83,7 @@ function secureRandomString(entropyBytes: number): string { // yet) so just use the built-in one and convert, replace the chars and strip the // padding from the end (otherwise we'd need to pull in another dependency). return btoa( - key.reduce((acc, current) => acc + String.fromCharCode(current), "") + key.reduce((acc, current) => acc + String.fromCharCode(current), ""), ) .replace("+", "-") .replace("/", "_") @@ -101,7 +101,7 @@ function secureRandomString(entropyBytes: number): string { */ export async function initClient( clientOptions: ICreateClientOpts, - restore: boolean + restore: boolean, ): Promise { await loadOlm(); @@ -148,7 +148,7 @@ export async function initClient( if (indexedDB) { const cryptoStoreExists = await IndexedDBCryptoStore.exists( indexedDB, - CRYPTO_STORE_NAME + CRYPTO_STORE_NAME, ); if (!cryptoStoreExists) throw new CryptoStoreIntegrityError(); } else if (localStorage) { @@ -164,7 +164,7 @@ export async function initClient( if (indexedDB) { baseOpts.cryptoStore = new IndexedDBCryptoStore( indexedDB, - CRYPTO_STORE_NAME + CRYPTO_STORE_NAME, ); } else if (localStorage) { baseOpts.cryptoStore = new LocalStorageCryptoStore(localStorage); @@ -198,7 +198,7 @@ export async function initClient( } catch (error) { logger.error( "Error starting matrix client store. Falling back to memory store.", - error + error, ); client.store = new MemoryStore({ localStorage }); await client.store.startup(); @@ -268,7 +268,7 @@ export function roomNameFromRoomId(roomId: string): string { .substring(1) .split("-") .map((part) => - part.length > 0 ? part.charAt(0).toUpperCase() + part.slice(1) : part + part.length > 0 ? part.charAt(0).toUpperCase() + part.slice(1) : part, ) .join(" ") .toLowerCase(); @@ -297,7 +297,7 @@ interface CreateRoomResult { export async function createRoom( client: MatrixClient, name: string, - e2ee: boolean + e2ee: boolean, ): Promise { logger.log(`Creating room for group call`); const createPromise = client.createRoom({ @@ -358,7 +358,7 @@ export async function createRoom( GroupCallType.Video, false, GroupCallIntent.Room, - true + true, ); let password; @@ -366,7 +366,7 @@ export async function createRoom( password = secureRandomString(16); setLocalStorageItem( getRoomSharedKeyLocalStorageKey(result.room_id), - password + password, ); } @@ -386,7 +386,7 @@ export async function createRoom( export function getAbsoluteRoomUrl( roomId: string, roomName?: string, - password?: string + password?: string, ): string { return `${window.location.protocol}//${ window.location.host @@ -402,7 +402,7 @@ export function getAbsoluteRoomUrl( export function getRelativeRoomUrl( roomId: string, roomName?: string, - password?: string + password?: string, ): string { // The password shouldn't need URL encoding here (we generate URL-safe ones) but encode // it in case it came from another client that generated a non url-safe one @@ -419,7 +419,7 @@ export function getRelativeRoomUrl( export function getAvatarUrl( client: MatrixClient, mxcUrl: string, - avatarSize = 96 + avatarSize = 96, ): string { const width = Math.floor(avatarSize * window.devicePixelRatio); const height = Math.floor(avatarSize * window.devicePixelRatio); diff --git a/src/media-utils.ts b/src/media-utils.ts index ec829c76..74e5ca33 100644 --- a/src/media-utils.ts +++ b/src/media-utils.ts @@ -23,10 +23,10 @@ limitations under the License. export async function findDeviceByName( deviceName: string, kind: MediaDeviceKind, - devices: MediaDeviceInfo[] + devices: MediaDeviceInfo[], ): Promise { const deviceInfo = devices.find( - (d) => d.kind === kind && d.label === deviceName + (d) => d.kind === kind && d.label === deviceName, ); return deviceInfo?.deviceId; } diff --git a/src/otel/OTelCall.ts b/src/otel/OTelCall.ts index c050116e..13157763 100644 --- a/src/otel/OTelCall.ts +++ b/src/otel/OTelCall.ts @@ -48,14 +48,14 @@ export class OTelCall { public userId: string, public deviceId: string, public call: MatrixCall, - public span: Span + public span: Span, ) { if (call.peerConn) { this.addCallPeerConnListeners(); } else { this.call.once( CallEvent.PeerConnectionCreated, - this.addCallPeerConnListeners + this.addCallPeerConnListeners, ); } } @@ -63,46 +63,46 @@ export class OTelCall { public dispose(): void { this.call.peerConn?.removeEventListener( "connectionstatechange", - this.onCallConnectionStateChanged + this.onCallConnectionStateChanged, ); this.call.peerConn?.removeEventListener( "signalingstatechange", - this.onCallSignalingStateChanged + this.onCallSignalingStateChanged, ); this.call.peerConn?.removeEventListener( "iceconnectionstatechange", - this.onIceConnectionStateChanged + this.onIceConnectionStateChanged, ); this.call.peerConn?.removeEventListener( "icegatheringstatechange", - this.onIceGatheringStateChanged + this.onIceGatheringStateChanged, ); this.call.peerConn?.removeEventListener( "icecandidateerror", - this.onIceCandidateError + this.onIceCandidateError, ); } private addCallPeerConnListeners = (): void => { this.call.peerConn?.addEventListener( "connectionstatechange", - this.onCallConnectionStateChanged + this.onCallConnectionStateChanged, ); this.call.peerConn?.addEventListener( "signalingstatechange", - this.onCallSignalingStateChanged + this.onCallSignalingStateChanged, ); this.call.peerConn?.addEventListener( "iceconnectionstatechange", - this.onIceConnectionStateChanged + this.onIceConnectionStateChanged, ); this.call.peerConn?.addEventListener( "icegatheringstatechange", - this.onIceGatheringStateChanged + this.onIceGatheringStateChanged, ); this.call.peerConn?.addEventListener( "icecandidateerror", - this.onIceCandidateError + this.onIceCandidateError, ); }; @@ -147,8 +147,8 @@ export class OTelCall { new OTelCallFeedMediaStreamSpan( ElementCallOpenTelemetry.instance, this.span, - feed - ) + feed, + ), ); } this.trackFeedSpan.get(feed.stream)?.update(feed); @@ -171,13 +171,13 @@ export class OTelCall { new OTelCallTransceiverMediaStreamSpan( ElementCallOpenTelemetry.instance, this.span, - transStats - ) + transStats, + ), ); } this.trackTransceiverSpan.get(transStats.mid)?.update(transStats); prvTransSpan = prvTransSpan.filter( - (prvStreamId) => prvStreamId !== transStats.mid + (prvStreamId) => prvStreamId !== transStats.mid, ); }); @@ -190,7 +190,7 @@ export class OTelCall { public end(): void { this.trackFeedSpan.forEach((feedSpan) => feedSpan.end()); this.trackTransceiverSpan.forEach((transceiverSpan) => - transceiverSpan.end() + transceiverSpan.end(), ); this.span.end(); } diff --git a/src/otel/OTelCallAbstractMediaStreamSpan.ts b/src/otel/OTelCallAbstractMediaStreamSpan.ts index 66d9d7af..c34f963c 100644 --- a/src/otel/OTelCallAbstractMediaStreamSpan.ts +++ b/src/otel/OTelCallAbstractMediaStreamSpan.ts @@ -32,11 +32,11 @@ export abstract class OTelCallAbstractMediaStreamSpan { public constructor( protected readonly oTel: ElementCallOpenTelemetry, protected readonly callSpan: Span, - protected readonly type: string + protected readonly type: string, ) { const ctx = opentelemetry.trace.setSpan( opentelemetry.context.active(), - callSpan + callSpan, ); const options = { links: [ @@ -54,7 +54,7 @@ export abstract class OTelCallAbstractMediaStreamSpan { if (!this.trackSpans.has(t.id)) { this.trackSpans.set( t.id, - new OTelCallMediaStreamTrackSpan(this.oTel, this.span, t) + new OTelCallMediaStreamTrackSpan(this.oTel, this.span, t), ); } this.trackSpans.get(t.id)?.update(t); diff --git a/src/otel/OTelCallFeedMediaStreamSpan.ts b/src/otel/OTelCallFeedMediaStreamSpan.ts index e3f0a2f7..02dd2f86 100644 --- a/src/otel/OTelCallFeedMediaStreamSpan.ts +++ b/src/otel/OTelCallFeedMediaStreamSpan.ts @@ -29,7 +29,7 @@ export class OTelCallFeedMediaStreamSpan extends OTelCallAbstractMediaStreamSpan public constructor( protected readonly oTel: ElementCallOpenTelemetry, protected readonly callSpan: Span, - callFeed: CallFeedStats + callFeed: CallFeedStats, ) { const postFix = callFeed.type === "local" && callFeed.prefix === "from-call-feed" diff --git a/src/otel/OTelCallMediaStreamTrackSpan.ts b/src/otel/OTelCallMediaStreamTrackSpan.ts index 9351f723..72fee9b4 100644 --- a/src/otel/OTelCallMediaStreamTrackSpan.ts +++ b/src/otel/OTelCallMediaStreamTrackSpan.ts @@ -26,11 +26,11 @@ export class OTelCallMediaStreamTrackSpan { public constructor( protected readonly oTel: ElementCallOpenTelemetry, protected readonly streamSpan: Span, - data: TrackStats + data: TrackStats, ) { const ctx = opentelemetry.trace.setSpan( opentelemetry.context.active(), - streamSpan + streamSpan, ); const options = { links: [ diff --git a/src/otel/OTelCallTransceiverMediaStreamSpan.ts b/src/otel/OTelCallTransceiverMediaStreamSpan.ts index 7aeb3d6e..2be5dbe6 100644 --- a/src/otel/OTelCallTransceiverMediaStreamSpan.ts +++ b/src/otel/OTelCallTransceiverMediaStreamSpan.ts @@ -32,7 +32,7 @@ export class OTelCallTransceiverMediaStreamSpan extends OTelCallAbstractMediaStr public constructor( protected readonly oTel: ElementCallOpenTelemetry, protected readonly callSpan: Span, - stats: TransceiverStats + stats: TransceiverStats, ) { super(oTel, callSpan, `matrix.call.transceiver.${stats.mid}`); this.span.setAttribute("transceiver.mid", stats.mid); diff --git a/src/otel/OTelGroupCallMembership.ts b/src/otel/OTelGroupCallMembership.ts index 777aa5f6..b700e2bc 100644 --- a/src/otel/OTelGroupCallMembership.ts +++ b/src/otel/OTelGroupCallMembership.ts @@ -62,7 +62,10 @@ export class OTelGroupCallMembership { }; private readonly speakingSpans = new Map>(); - public constructor(private groupCall: GroupCall, client: MatrixClient) { + public constructor( + private groupCall: GroupCall, + client: MatrixClient, + ) { const clientId = client.getUserId(); if (clientId) { this.myUserId = clientId; @@ -79,7 +82,7 @@ export class OTelGroupCallMembership { public dispose(): void { this.groupCall.removeListener( GroupCallEvent.CallsChanged, - this.onCallsChanged + this.onCallsChanged, ); } @@ -93,22 +96,22 @@ export class OTelGroupCallMembership { // Create the main span that tracks the time we intend to be in the call this.callMembershipSpan = ElementCallOpenTelemetry.instance.tracer.startSpan( - "matrix.groupCallMembership" + "matrix.groupCallMembership", ); this.callMembershipSpan.setAttribute( "matrix.confId", - this.groupCall.groupCallId + this.groupCall.groupCallId, ); this.callMembershipSpan.setAttribute("matrix.userId", this.myUserId); this.callMembershipSpan.setAttribute("matrix.deviceId", this.myDeviceId); this.callMembershipSpan.setAttribute( "matrix.displayName", - this.myMember ? this.myMember.name : "unknown-name" + this.myMember ? this.myMember.name : "unknown-name", ); this.groupCallContext = opentelemetry.trace.setSpan( opentelemetry.context.active(), - this.callMembershipSpan + this.callMembershipSpan, ); this.callMembershipSpan?.addEvent("matrix.joinCall"); @@ -138,7 +141,7 @@ export class OTelGroupCallMembership { this.callMembershipSpan?.addEvent( `matrix.roomStateEvent_${event.getType()}`, - ObjectFlattener.flattenVoipEvent(event.getContent()) + ObjectFlattener.flattenVoipEvent(event.getContent()), ); } @@ -150,7 +153,7 @@ export class OTelGroupCallMembership { const span = ElementCallOpenTelemetry.instance.tracer.startSpan( `matrix.call`, undefined, - this.groupCallContext + this.groupCallContext, ); // XXX: anonymity span.setAttribute("matrix.call.target.userId", userId); @@ -160,7 +163,7 @@ export class OTelGroupCallMembership { span.setAttribute("matrix.call.target.displayName", displayName); this.callsByCallId.set( call.callId, - new OTelCall(userId, deviceId, call, span) + new OTelCall(userId, deviceId, call, span), ); } } @@ -210,12 +213,12 @@ export class OTelGroupCallMembership { if (event.type === "toDevice") { callTrackingInfo.span.addEvent( `matrix.sendToDeviceEvent_${event.eventType}`, - ObjectFlattener.flattenVoipEvent(event) + ObjectFlattener.flattenVoipEvent(event), ); } else if (event.type === "sendEvent") { callTrackingInfo.span.addEvent( `matrix.sendToRoomEvent_${event.eventType}`, - ObjectFlattener.flattenVoipEvent(event) + ObjectFlattener.flattenVoipEvent(event), ); } } @@ -239,7 +242,7 @@ export class OTelGroupCallMembership { "matrix.receive_voip_event_unknown_callid", { "sender.userId": event.getSender(), - } + }, ); logger.error("Received call event for unknown call ID " + callId); return; @@ -284,7 +287,7 @@ export class OTelGroupCallMembership { public onSpeaking( member: RoomMember, deviceId: string, - speaking: boolean + speaking: boolean, ): void { if (speaking) { // Ensure that there's an audio activity span for this speaker @@ -298,7 +301,7 @@ export class OTelGroupCallMembership { const span = ElementCallOpenTelemetry.instance.tracer.startSpan( "matrix.audioActivity", undefined, - this.groupCallContext + this.groupCallContext, ); span.setAttribute("matrix.userId", member.userId); span.setAttribute("matrix.displayName", member.rawDisplayName); @@ -336,7 +339,7 @@ export class OTelGroupCallMembership { } public onCallFeedStatsReport( - report: GroupCallStatsReport + report: GroupCallStatsReport, ): void { if (!ElementCallOpenTelemetry.instance) return; let call: OTelCall | undefined; @@ -354,10 +357,10 @@ export class OTelGroupCallMembership { "call.opponentMemberId": report.report?.opponentMemberId ? report.report?.opponentMemberId : "unknown", - } + }, ); logger.error( - `Received ${OTelStatsReportType.CallFeedReport} with unknown call ID: ${callId}` + `Received ${OTelStatsReportType.CallFeedReport} with unknown call ID: ${callId}`, ); return; } else { @@ -367,26 +370,26 @@ export class OTelGroupCallMembership { } public onConnectionStatsReport( - statsReport: GroupCallStatsReport + statsReport: GroupCallStatsReport, ): void { this.buildCallStatsSpan( OTelStatsReportType.ConnectionReport, - statsReport.report + statsReport.report, ); } public onByteSentStatsReport( - statsReport: GroupCallStatsReport + statsReport: GroupCallStatsReport, ): void { this.buildCallStatsSpan( OTelStatsReportType.ByteSentReport, - statsReport.report + statsReport.report, ); } public buildCallStatsSpan( type: OTelStatsReportType, - report: ByteSentStatsReport | ConnectionStatsReport + report: ByteSentStatsReport | ConnectionStatsReport, ): void { if (!ElementCallOpenTelemetry.instance) return; let call: OTelCall | undefined; @@ -409,7 +412,7 @@ export class OTelGroupCallMembership { const data = ObjectFlattener.flattenReportObject(type, report); const ctx = opentelemetry.trace.setSpan( opentelemetry.context.active(), - call.span + call.span, ); const options = { @@ -423,20 +426,20 @@ export class OTelGroupCallMembership { const span = ElementCallOpenTelemetry.instance.tracer.startSpan( type, options, - ctx + ctx, ); span.setAttribute("matrix.callId", callId ?? "unknown"); span.setAttribute( "matrix.opponentMemberId", - report.opponentMemberId ? report.opponentMemberId : "unknown" + report.opponentMemberId ? report.opponentMemberId : "unknown", ); span.addEvent("matrix.call.connection_stats_event", data); span.end(); } public onSummaryStatsReport( - statsReport: GroupCallStatsReport + statsReport: GroupCallStatsReport, ): void { if (!ElementCallOpenTelemetry.instance) return; @@ -445,12 +448,12 @@ export class OTelGroupCallMembership { if (this.statsReportSpan.span === undefined && this.callMembershipSpan) { const ctx = setSpan( opentelemetry.context.active(), - this.callMembershipSpan + this.callMembershipSpan, ); const span = ElementCallOpenTelemetry.instance?.tracer.startSpan( "matrix.groupCallMembership.summaryReport", undefined, - ctx + ctx, ); if (span === undefined) { return; @@ -459,7 +462,7 @@ export class OTelGroupCallMembership { span.setAttribute("matrix.userId", this.myUserId); span.setAttribute( "matrix.displayName", - this.myMember ? this.myMember.name : "unknown-name" + this.myMember ? this.myMember.name : "unknown-name", ); span.addEvent(type, data); span.end(); diff --git a/src/otel/ObjectFlattener.ts b/src/otel/ObjectFlattener.ts index 715517d2..76de9e3a 100644 --- a/src/otel/ObjectFlattener.ts +++ b/src/otel/ObjectFlattener.ts @@ -25,7 +25,7 @@ import { export class ObjectFlattener { public static flattenReportObject( prefix: string, - report: ConnectionStatsReport | ByteSentStatsReport + report: ConnectionStatsReport | ByteSentStatsReport, ): Attributes { const flatObject = {}; ObjectFlattener.flattenObjectRecursive(report, flatObject, `${prefix}.`, 0); @@ -33,27 +33,27 @@ export class ObjectFlattener { } public static flattenByteSentStatsReportObject( - statsReport: GroupCallStatsReport + statsReport: GroupCallStatsReport, ): Attributes { const flatObject = {}; ObjectFlattener.flattenObjectRecursive( statsReport.report, flatObject, "matrix.stats.bytesSent.", - 0 + 0, ); return flatObject; } public static flattenSummaryStatsReportObject( - statsReport: GroupCallStatsReport + statsReport: GroupCallStatsReport, ): Attributes { const flatObject = {}; ObjectFlattener.flattenObjectRecursive( statsReport.report, flatObject, "matrix.stats.summary.", - 0 + 0, ); return flatObject; } @@ -67,7 +67,7 @@ export class ObjectFlattener { event as unknown as Record, // XXX Types flatObject, "matrix.event.", - 0 + 0, ); return flatObject; @@ -77,12 +77,12 @@ export class ObjectFlattener { obj: Object, flatObject: Attributes, prefix: string, - depth: number + depth: number, ): void { if (depth > 10) throw new Error( "Depth limit exceeded: aborting VoipEvent recursion. Prefix is " + - prefix + prefix, ); let entries; if (obj instanceof Map) { @@ -101,7 +101,7 @@ export class ObjectFlattener { v, flatObject, prefix + k + ".", - depth + 1 + depth + 1, ); } } diff --git a/src/otel/otel.ts b/src/otel/otel.ts index c6a1b971..14c22cb6 100644 --- a/src/otel/otel.ts +++ b/src/otel/otel.ts @@ -50,7 +50,7 @@ export class ElementCallOpenTelemetry { sharedInstance = new ElementCallOpenTelemetry( config.opentelemetry?.collector_url, - config.rageshake?.submit_url + config.rageshake?.submit_url, ); } } @@ -61,7 +61,7 @@ export class ElementCallOpenTelemetry { private constructor( collectorUrl: string | undefined, - rageshakeUrl: string | undefined + rageshakeUrl: string | undefined, ) { // This is how we can make Jaeger show a reasonable service in the dropdown on the left. const providerConfig = { @@ -77,7 +77,7 @@ export class ElementCallOpenTelemetry { url: collectorUrl, }); this._provider.addSpanProcessor( - new SimpleSpanProcessor(this.otlpExporter) + new SimpleSpanProcessor(this.otlpExporter), ); } else { logger.info("OTLP collector disabled"); @@ -93,7 +93,7 @@ export class ElementCallOpenTelemetry { this._tracer = opentelemetry.trace.getTracer( // This is not the serviceName shown in jaeger - "my-element-call-otl-tracer" + "my-element-call-otl-tracer", ); } diff --git a/src/popover/Popover.tsx b/src/popover/Popover.tsx index 02662eb5..36a4ac4a 100644 --- a/src/popover/Popover.tsx +++ b/src/popover/Popover.tsx @@ -40,7 +40,7 @@ export const Popover = forwardRef( shouldCloseOnBlur: true, isDismissable: true, }, - popoverRef + popoverRef, ); return ( @@ -56,5 +56,5 @@ export const Popover = forwardRef( ); - } + }, ); diff --git a/src/popover/PopoverMenu.tsx b/src/popover/PopoverMenu.tsx index faf7fd71..dc38c6d0 100644 --- a/src/popover/PopoverMenu.tsx +++ b/src/popover/PopoverMenu.tsx @@ -43,7 +43,7 @@ export const PopoverMenuTrigger = forwardRef< const { menuTriggerProps, menuProps } = useMenuTrigger( {}, popoverMenuState, - buttonRef + buttonRef, ); const popoverRef = useRef(null); @@ -62,7 +62,7 @@ export const PopoverMenuTrigger = forwardRef< typeof children[1] !== "function" ) { throw new Error( - "PopoverMenu must have two props. The first being a button and the second being a render prop." + "PopoverMenu must have two props. The first being a button and the second being a render prop.", ); } diff --git a/src/profile/useProfile.ts b/src/profile/useProfile.ts index c88547fa..eba0420f 100644 --- a/src/profile/useProfile.ts +++ b/src/profile/useProfile.ts @@ -63,7 +63,7 @@ export function useProfile(client: MatrixClient | undefined): UseProfile { useEffect(() => { const onChangeUser = ( _event: MatrixEvent | undefined, - { displayName, avatarUrl }: User + { displayName, avatarUrl }: User, ): void => { setState({ success: false, @@ -108,9 +108,8 @@ export function useProfile(client: MatrixClient | undefined): UseProfile { if (removeAvatar) { await client.setAvatarUrl(""); } else if (avatar) { - ({ content_uri: mxcAvatarUrl } = await client.uploadContent( - avatar - )); + ({ content_uri: mxcAvatarUrl } = + await client.uploadContent(avatar)); await client.setAvatarUrl(mxcAvatarUrl); } @@ -135,7 +134,7 @@ export function useProfile(client: MatrixClient | undefined): UseProfile { logger.error("Client not initialized before calling saveProfile"); } }, - [client] + [client], ); return { diff --git a/src/room/AppSelectionModal.tsx b/src/room/AppSelectionModal.tsx index 8220ffbc..8affa12e 100644 --- a/src/room/AppSelectionModal.tsx +++ b/src/room/AppSelectionModal.tsx @@ -40,14 +40,14 @@ export const AppSelectionModal: FC = ({ roomId }) => { e.stopPropagation(); setOpen(false); }, - [setOpen] + [setOpen], ); const roomSharedKey = useRoomSharedKey(roomId ?? ""); const roomIsEncrypted = useIsRoomE2EE(roomId ?? ""); if (roomIsEncrypted && roomSharedKey === undefined) { logger.error( - "Generating app redirect URL for encrypted room but don't have key available!" + "Generating app redirect URL for encrypted room but don't have key available!", ); } @@ -60,7 +60,7 @@ export const AppSelectionModal: FC = ({ roomId }) => { const url = new URL( roomId === null ? window.location.href - : getAbsoluteRoomUrl(roomId, undefined, roomSharedKey ?? undefined) + : getAbsoluteRoomUrl(roomId, undefined, roomSharedKey ?? undefined), ); // Edit the URL to prevent the app selection prompt from appearing a second // time within the app, and to keep the user confined to the current room diff --git a/src/room/CallEndedView.tsx b/src/room/CallEndedView.tsx index 72567618..32b27568 100644 --- a/src/room/CallEndedView.tsx +++ b/src/room/CallEndedView.tsx @@ -64,7 +64,7 @@ export const CallEndedView: FC = ({ PosthogAnalytics.instance.eventQualitySurvey.track( endedCallId, feedbackText, - starRating + starRating, ); setSubmitting(true); @@ -83,7 +83,7 @@ export const CallEndedView: FC = ({ }, 1000); }, 1000); }, - [endedCallId, history, isPasswordlessUser, confineToRoom, starRating] + [endedCallId, history, isPasswordlessUser, confineToRoom, starRating], ); const createAccountDialog = isPasswordlessUser && ( diff --git a/src/room/GroupCallLoader.tsx b/src/room/GroupCallLoader.tsx index c61f4ca4..720b6487 100644 --- a/src/room/GroupCallLoader.tsx +++ b/src/room/GroupCallLoader.tsx @@ -47,7 +47,7 @@ export function GroupCallLoader({ ev.preventDefault(); history.push("/"); }, - [history] + [history], ); switch (groupCallState.kind) { @@ -66,7 +66,7 @@ export function GroupCallLoader({ {t("Call not found")} {t( - "Calls are now end-to-end encrypted and need to be created from the home page. This helps make sure everyone's using the same encryption key." + "Calls are now end-to-end encrypted and need to be created from the home page. This helps make sure everyone's using the same encryption key.", )} {/* XXX: A 'create it for me' button would be the obvious UX here. Two screens already have diff --git a/src/room/GroupCallView.tsx b/src/room/GroupCallView.tsx index 90dfff31..c629a5dc 100644 --- a/src/room/GroupCallView.tsx +++ b/src/room/GroupCallView.tsx @@ -111,7 +111,7 @@ export const GroupCallView: FC = ({ // Count each member only once, regardless of how many devices they use const participantCount = useMemo( () => new Set(memberships.map((m) => m.sender!)).size, - [memberships] + [memberships], ); const deviceContext = useMediaDevices(); @@ -126,7 +126,7 @@ export const GroupCallView: FC = ({ if (widget && preload) { // In preload mode, wait for a join action before entering const onJoin = async ( - ev: CustomEvent + ev: CustomEvent, ): Promise => { // XXX: I think this is broken currently - LiveKit *won't* request // permissions and give you device names unless you specify a kind, but @@ -143,14 +143,14 @@ export const GroupCallView: FC = ({ const deviceId = await findDeviceByName( audioInput, "audioinput", - devices + devices, ); if (!deviceId) { logger.warn("Unknown audio input: " + audioInput); latestMuteStates.current!.audio.setEnabled?.(false); } else { logger.debug( - `Found audio input ID ${deviceId} for name ${audioInput}` + `Found audio input ID ${deviceId} for name ${audioInput}`, ); latestDevices.current!.audioInput.select(deviceId); latestMuteStates.current!.audio.setEnabled?.(true); @@ -163,14 +163,14 @@ export const GroupCallView: FC = ({ const deviceId = await findDeviceByName( videoInput, "videoinput", - devices + devices, ); if (!deviceId) { logger.warn("Unknown video input: " + videoInput); latestMuteStates.current!.video.setEnabled?.(false); } else { logger.debug( - `Found video input ID ${deviceId} for name ${videoInput}` + `Found video input ID ${deviceId} for name ${videoInput}`, ); latestDevices.current!.videoInput.select(deviceId); latestMuteStates.current!.video.setEnabled?.(true); @@ -182,7 +182,7 @@ export const GroupCallView: FC = ({ PosthogAnalytics.instance.eventCallEnded.cacheStartCall(new Date()); // we only have room sessions right now, so call ID is the emprty string - we use the room ID PosthogAnalytics.instance.eventCallStarted.track( - rtcSession.room.roomId + rtcSession.room.roomId, ); await Promise.all([ @@ -213,7 +213,7 @@ export const GroupCallView: FC = ({ PosthogAnalytics.instance.eventCallEnded.track( rtcSession.room.roomId, rtcSession.memberships.length, - sendInstantly + sendInstantly, ); await leaveRTCSession(rtcSession); @@ -237,13 +237,13 @@ export const GroupCallView: FC = ({ history.push("/"); } }, - [rtcSession, isPasswordlessUser, confineToRoom, history] + [rtcSession, isPasswordlessUser, confineToRoom, history], ); useEffect(() => { if (widget && isJoined) { const onHangup = async ( - ev: CustomEvent + ev: CustomEvent, ): Promise => { leaveRTCSession(rtcSession); widget!.api.transport.reply(ev.detail, {}); @@ -260,7 +260,7 @@ export const GroupCallView: FC = ({ const e2eeConfig = useMemo( () => (e2eeSharedKey ? { sharedKey: e2eeSharedKey } : undefined), - [e2eeSharedKey] + [e2eeSharedKey], ); const onReconnect = useCallback(() => { @@ -274,12 +274,12 @@ export const GroupCallView: FC = ({ const [shareModalOpen, setInviteModalOpen] = useState(false); const onDismissInviteModal = useCallback( () => setInviteModalOpen(false), - [setInviteModalOpen] + [setInviteModalOpen], ); const onShareClickFn = useCallback( () => setInviteModalOpen(true), - [setInviteModalOpen] + [setInviteModalOpen], ); const onShareClick = joinRule === JoinRule.Public ? onShareClickFn : null; @@ -288,7 +288,7 @@ export const GroupCallView: FC = ({ ev.preventDefault(); history.push("/"); }, - [history] + [history], ); const { t } = useTranslation(); @@ -298,7 +298,7 @@ export const GroupCallView: FC = ({ @@ -309,7 +309,7 @@ export const GroupCallView: FC = ({ Incompatible Browser {t( - "Your web browser does not support media end-to-end encryption. Supported Browsers are Chrome, Safari, Firefox >=117" + "Your web browser does not support media end-to-end encryption. Supported Browsers are Chrome, Safari, Firefox >=117", )} diff --git a/src/room/InCallView.tsx b/src/room/InCallView.tsx index d0b54f8d..9dc124f9 100644 --- a/src/room/InCallView.tsx +++ b/src/room/InCallView.tsx @@ -105,7 +105,7 @@ export const ActiveCall: FC = (props) => { const { livekitRoom, connState } = useLiveKit( props.muteStates, sfuConfig, - props.e2eeConfig + props.e2eeConfig, ); if (!livekitRoom) { @@ -172,10 +172,10 @@ export const InCallView: FC = ({ [{ source: Track.Source.ScreenShare, withPlaceholder: false }], { room: livekitRoom, - } + }, ); const { layout, setLayout } = useVideoGridLayout( - screenSharingTracks.length > 0 + screenSharingTracks.length > 0, ); const [showConnectionStats] = useShowConnectionStats(); @@ -188,11 +188,11 @@ export const InCallView: FC = ({ const toggleMicrophone = useCallback( () => muteStates.audio.setEnabled?.((e) => !e), - [muteStates] + [muteStates], ); const toggleCamera = useCallback( () => muteStates.video.setEnabled?.((e) => !e), - [muteStates] + [muteStates], ); // This function incorrectly assumes that there is a camera and microphone, which is not always the case. @@ -201,7 +201,7 @@ export const InCallView: FC = ({ containerRef1, toggleMicrophone, toggleCamera, - (muted) => muteStates.audio.setEnabled?.(!muted) + (muted) => muteStates.audio.setEnabled?.(!muted), ); const onLeavePress = useCallback(() => { @@ -213,7 +213,7 @@ export const InCallView: FC = ({ layout === "grid" ? ElementWidgetActions.TileLayout : ElementWidgetActions.SpotlightLayout, - {} + {}, ); }, [layout]); @@ -231,14 +231,14 @@ export const InCallView: FC = ({ widget.lazyActions.on(ElementWidgetActions.TileLayout, onTileLayout); widget.lazyActions.on( ElementWidgetActions.SpotlightLayout, - onSpotlightLayout + onSpotlightLayout, ); return () => { widget!.lazyActions.off(ElementWidgetActions.TileLayout, onTileLayout); widget!.lazyActions.off( ElementWidgetActions.SpotlightLayout, - onSpotlightLayout + onSpotlightLayout, ); }; } @@ -261,7 +261,7 @@ export const InCallView: FC = ({ (noControls ? items.find((item) => item.isSpeaker) ?? items.at(0) ?? null : null), - [fullscreenItem, noControls, items] + [fullscreenItem, noControls, items], ); const Grid = @@ -320,18 +320,18 @@ export const InCallView: FC = ({ }; const rageshakeRequestModalProps = useRageshakeRequestModal( - rtcSession.room.roomId + rtcSession.room.roomId, ); const [settingsModalOpen, setSettingsModalOpen] = useState(false); const openSettings = useCallback( () => setSettingsModalOpen(true), - [setSettingsModalOpen] + [setSettingsModalOpen], ); const closeSettings = useCallback( () => setSettingsModalOpen(false), - [setSettingsModalOpen] + [setSettingsModalOpen], ); const toggleScreensharing = useCallback(async () => { @@ -365,7 +365,7 @@ export const InCallView: FC = ({ onPress={toggleCamera} disabled={muteStates.video.setEnabled === null} data-testid="incall_videomute" - /> + />, ); if (!reducedControls) { @@ -376,14 +376,18 @@ export const InCallView: FC = ({ enabled={isScreenShareEnabled} onPress={toggleScreensharing} data-testid="incall_screenshare" - /> + />, ); } buttons.push(); } buttons.push( - + , ); footer = (
@@ -447,7 +451,7 @@ export const InCallView: FC = ({ function findMatrixMember( room: MatrixRoom, - id: string + id: string, ): RoomMember | undefined { if (!id) return undefined; @@ -455,7 +459,7 @@ function findMatrixMember( // must be at least 3 parts because we know the first part is a userId which must necessarily contain a colon if (parts.length < 3) { logger.warn( - "Livekit participants ID doesn't look like a userId:deviceId combination" + "Livekit participants ID doesn't look like a userId:deviceId combination", ); return undefined; } @@ -469,7 +473,7 @@ function findMatrixMember( function useParticipantTiles( livekitRoom: Room, matrixRoom: MatrixRoom, - connState: ECConnectionState + connState: ECConnectionState, ): TileDescriptor[] { const previousTiles = useRef[]>([]); @@ -498,7 +502,7 @@ function useParticipantTiles( // connected, this is fine and we'll be in "all ghosts" mode. if (id !== "" && member === undefined) { logger.warn( - `Ruh, roh! No matrix member found for SFU participant '${id}': creating g-g-g-ghost!` + `Ruh, roh! No matrix member found for SFU participant '${id}': creating g-g-g-ghost!`, ); } allGhosts &&= member === undefined; @@ -542,11 +546,11 @@ function useParticipantTiles( return screenShareTile ? [userMediaTile, screenShareTile] : [userMediaTile]; - } + }, ); PosthogAnalytics.instance.eventCallEnded.cacheParticipantCountChanged( - tiles.length + tiles.length, ); // If every item is a ghost, that probably means we're still connecting and diff --git a/src/room/InviteModal.tsx b/src/room/InviteModal.tsx index 33d6ef97..f9d02f2b 100644 --- a/src/room/InviteModal.tsx +++ b/src/room/InviteModal.tsx @@ -40,7 +40,7 @@ export const InviteModal: FC = ({ room, open, onDismiss }) => { const url = useMemo( () => getAbsoluteRoomUrl(room.roomId, room.name, roomSharedKey ?? undefined), - [room, roomSharedKey] + [room, roomSharedKey], ); const [, setCopied] = useClipboard(url); const [toastOpen, setToastOpen] = useState(false); @@ -53,7 +53,7 @@ export const InviteModal: FC = ({ room, open, onDismiss }) => { onDismiss(); setToastOpen(true); }, - [setCopied, onDismiss] + [setCopied, onDismiss], ); return ( diff --git a/src/room/LayoutToggle.tsx b/src/room/LayoutToggle.tsx index 88d9aef7..01738f73 100644 --- a/src/room/LayoutToggle.tsx +++ b/src/room/LayoutToggle.tsx @@ -36,7 +36,7 @@ export const LayoutToggle: FC = ({ layout, setLayout, className }) => { const onChange = useCallback( (e: ChangeEvent) => setLayout(e.target.value as Layout), - [setLayout] + [setLayout], ); const spotlightId = useId(); diff --git a/src/room/LobbyView.tsx b/src/room/LobbyView.tsx index e49b70cf..7116e74c 100644 --- a/src/room/LobbyView.tsx +++ b/src/room/LobbyView.tsx @@ -63,22 +63,22 @@ export const LobbyView: FC = ({ const onAudioPress = useCallback( () => muteStates.audio.setEnabled?.((e) => !e), - [muteStates] + [muteStates], ); const onVideoPress = useCallback( () => muteStates.video.setEnabled?.((e) => !e), - [muteStates] + [muteStates], ); const [settingsModalOpen, setSettingsModalOpen] = useState(false); const openSettings = useCallback( () => setSettingsModalOpen(true), - [setSettingsModalOpen] + [setSettingsModalOpen], ); const closeSettings = useCallback( () => setSettingsModalOpen(false), - [setSettingsModalOpen] + [setSettingsModalOpen], ); const history = useHistory(); diff --git a/src/room/MuteStates.ts b/src/room/MuteStates.ts index 8bdc6420..db1fb22a 100644 --- a/src/room/MuteStates.ts +++ b/src/room/MuteStates.ts @@ -49,18 +49,18 @@ export interface MuteStates { function useMuteState( device: MediaDevice, - enabledByDefault: () => boolean + enabledByDefault: () => boolean, ): MuteState { const [enabled, setEnabled] = useReactiveState( (prev) => device.available.length > 0 && (prev ?? enabledByDefault()), - [device] + [device], ); return useMemo( () => device.available.length === 0 ? deviceUnavailable : { enabled, setEnabled }, - [device, enabled, setEnabled] + [device, enabled, setEnabled], ); } @@ -69,7 +69,7 @@ export function useMuteStates(participantCount: number): MuteStates { const audio = useMuteState( devices.audioInput, - () => participantCount <= MUTE_PARTICIPANT_COUNT + () => participantCount <= MUTE_PARTICIPANT_COUNT, ); const video = useMuteState(devices.videoInput, () => true); diff --git a/src/room/RageshakeRequestModal.tsx b/src/room/RageshakeRequestModal.tsx index 74debd34..9bc60cdb 100644 --- a/src/room/RageshakeRequestModal.tsx +++ b/src/room/RageshakeRequestModal.tsx @@ -47,7 +47,7 @@ export const RageshakeRequestModal: FC = ({ {t( - "Another user on this call is having an issue. In order to better diagnose these issues we'd like to collect a debug log." + "Another user on this call is having an issue. In order to better diagnose these issues we'd like to collect a debug log.", )} diff --git a/src/room/RoomAuthView.tsx b/src/room/RoomAuthView.tsx index ab988d3b..a52a0e8e 100644 --- a/src/room/RoomAuthView.tsx +++ b/src/room/RoomAuthView.tsx @@ -52,7 +52,7 @@ export const RoomAuthView: FC = () => { setError(error); }); }, - [registerPasswordlessUser] + [registerPasswordlessUser], ); const { t } = useTranslation(); diff --git a/src/room/RoomPage.tsx b/src/room/RoomPage.tsx index ffc9562a..9bcb8a81 100644 --- a/src/room/RoomPage.tsx +++ b/src/room/RoomPage.tsx @@ -81,7 +81,7 @@ export const RoomPage: FC = () => { hideHeader={hideHeader} /> ), - [client, passwordlessUser, confineToRoom, preload, hideHeader] + [client, passwordlessUser, confineToRoom, preload, hideHeader], ); let content: ReactNode; diff --git a/src/room/VideoPreview.tsx b/src/room/VideoPreview.tsx index 36323ba9..df4d1480 100644 --- a/src/room/VideoPreview.tsx +++ b/src/room/VideoPreview.tsx @@ -82,14 +82,14 @@ export const VideoPreview: FC = ({ }, (error) => { logger.error("Error while creating preview Tracks:", error); - } + }, ); const videoTrack = useMemo( () => tracks?.find((t) => t.kind === Track.Kind.Video) as | LocalVideoTrack | undefined, - [tracks] + [tracks], ); const videoEl = useRef(null); diff --git a/src/room/useActiveFocus.ts b/src/room/useActiveFocus.ts index a62ffafd..022b25ac 100644 --- a/src/room/useActiveFocus.ts +++ b/src/room/useActiveFocus.ts @@ -24,7 +24,7 @@ import { deepCompare } from "matrix-js-sdk/src/utils"; import { LivekitFocus } from "../livekit/LivekitFocus"; function getActiveFocus( - rtcSession: MatrixRTCSession + rtcSession: MatrixRTCSession, ): LivekitFocus | undefined { const oldestMembership = rtcSession.getOldestMembership(); return oldestMembership?.getActiveFoci()[0] as LivekitFocus; @@ -36,10 +36,10 @@ function getActiveFocus( * and the same focus. */ export function useActiveFocus( - rtcSession: MatrixRTCSession + rtcSession: MatrixRTCSession, ): LivekitFocus | undefined { const [activeFocus, setActiveFocus] = useState(() => - getActiveFocus(rtcSession) + getActiveFocus(rtcSession), ); const onMembershipsChanged = useCallback(() => { @@ -53,13 +53,13 @@ export function useActiveFocus( useEffect(() => { rtcSession.on( MatrixRTCSessionEvent.MembershipsChanged, - onMembershipsChanged + onMembershipsChanged, ); return () => { rtcSession.off( MatrixRTCSessionEvent.MembershipsChanged, - onMembershipsChanged + onMembershipsChanged, ); }; }); diff --git a/src/room/useFullscreen.ts b/src/room/useFullscreen.ts index 684ee9bc..38469808 100644 --- a/src/room/useFullscreen.ts +++ b/src/room/useFullscreen.ts @@ -66,7 +66,7 @@ export function useFullscreen(items: TileDescriptor[]): { prevItem == null ? null : items.find((i) => i.id === prevItem.id) ?? null, - [items] + [items], ); const latestItems = useRef[]>(items); @@ -80,15 +80,15 @@ export function useFullscreen(items: TileDescriptor[]): { setFullscreenItem( latestFullscreenItem.current === null ? latestItems.current.find((i) => i.id === itemId) ?? null - : null + : null, ); }, - [setFullscreenItem] + [setFullscreenItem], ); const exitFullscreenCallback = useCallback( () => setFullscreenItem(null), - [setFullscreenItem] + [setFullscreenItem], ); useLayoutEffect(() => { @@ -103,7 +103,7 @@ export function useFullscreen(items: TileDescriptor[]): { useFullscreenChange( useCallback(() => { if (!isFullscreen()) setFullscreenItem(null); - }, [setFullscreenItem]) + }, [setFullscreenItem]), ); return { diff --git a/src/room/useJoinRule.ts b/src/room/useJoinRule.ts index 2fb854e7..798999e4 100644 --- a/src/room/useJoinRule.ts +++ b/src/room/useJoinRule.ts @@ -23,6 +23,6 @@ import { useRoomState } from "./useRoomState"; export function useJoinRule(room: Room): JoinRule { return useRoomState( room, - useCallback((state) => state.getJoinRule(), []) + useCallback((state) => state.getJoinRule(), []), ); } diff --git a/src/room/useLoadGroupCall.ts b/src/room/useLoadGroupCall.ts index ec9e1d94..423706ec 100644 --- a/src/room/useLoadGroupCall.ts +++ b/src/room/useLoadGroupCall.ts @@ -52,7 +52,7 @@ export interface GroupCallLoadState { export const useLoadGroupCall = ( client: MatrixClient, roomIdOrAlias: string, - viaServers: string[] + viaServers: string[], ): GroupCallStatus => { const { t } = useTranslation(); const [state, setState] = useState({ kind: "loading" }); @@ -70,7 +70,7 @@ export const useLoadGroupCall = ( // join anyway but the js-sdk recreates the room if you pass the alias for a // room you're already joined to (which it probably ought not to). const lookupResult = await client.getRoomIdForAlias( - roomIdOrAlias.toLowerCase() + roomIdOrAlias.toLowerCase(), ); logger.info(`${roomIdOrAlias} resolved to ${lookupResult.room_id}`); room = client.getRoom(lookupResult.room_id); @@ -81,7 +81,7 @@ export const useLoadGroupCall = ( }); } else { logger.info( - `Already in room ${lookupResult.room_id}, not rejoining.` + `Already in room ${lookupResult.room_id}, not rejoining.`, ); } } else { @@ -92,7 +92,7 @@ export const useLoadGroupCall = ( } logger.info( - `Joined ${roomIdOrAlias}, waiting room to be ready for group calls` + `Joined ${roomIdOrAlias}, waiting room to be ready for group calls`, ); await client.waitUntilRoomReadyForGroupCalls(room.roomId); logger.info(`${roomIdOrAlias}, is ready for group calls`); @@ -110,7 +110,7 @@ export const useLoadGroupCall = ( const waitForClientSyncing = async (): Promise => { if (client.getSyncState() !== SyncState.Syncing) { logger.debug( - "useLoadGroupCall: waiting for client to start syncing..." + "useLoadGroupCall: waiting for client to start syncing...", ); await new Promise((resolve) => { const onSync = (): void => { diff --git a/src/room/useRoomAvatar.ts b/src/room/useRoomAvatar.ts index 8eb31b20..b00597e7 100644 --- a/src/room/useRoomAvatar.ts +++ b/src/room/useRoomAvatar.ts @@ -22,6 +22,6 @@ import { useRoomState } from "./useRoomState"; export function useRoomAvatar(room: Room): string | null { return useRoomState( room, - useCallback(() => room.getMxcAvatarUrl(), [room]) + useCallback(() => room.getMxcAvatarUrl(), [room]), ); } diff --git a/src/room/useRoomState.ts b/src/room/useRoomState.ts index 2fa4d0b7..6e069b67 100644 --- a/src/room/useRoomState.ts +++ b/src/room/useRoomState.ts @@ -31,7 +31,7 @@ export const useRoomState = (room: Room, f: (state: RoomState) => T): T => { useTypedEventEmitter( room, RoomStateEvent.Update, - useCallback(() => setNumUpdates((n) => n + 1), [setNumUpdates]) + useCallback(() => setNumUpdates((n) => n + 1), [setNumUpdates]), ); // We want any change to the update counter to trigger an update here // eslint-disable-next-line react-hooks/exhaustive-deps diff --git a/src/rtcSessionHelpers.ts b/src/rtcSessionHelpers.ts index 8d8053fd..1ea00160 100644 --- a/src/rtcSessionHelpers.ts +++ b/src/rtcSessionHelpers.ts @@ -48,7 +48,7 @@ export function enterRTCSession(rtcSession: MatrixRTCSession): void { } export async function leaveRTCSession( - rtcSession: MatrixRTCSession + rtcSession: MatrixRTCSession, ): Promise { //groupCallOTelMembership?.onLeaveCall(); await rtcSession.leaveRoomSession(); diff --git a/src/settings/FeedbackSettingsTab.tsx b/src/settings/FeedbackSettingsTab.tsx index 6fda0194..af45b42c 100644 --- a/src/settings/FeedbackSettingsTab.tsx +++ b/src/settings/FeedbackSettingsTab.tsx @@ -57,7 +57,7 @@ export const FeedbackSettingsTab: FC = ({ roomId }) => { sendRageshakeRequest(roomId, rageshakeRequestId); } }, - [submitRageshake, roomId, sendRageshakeRequest] + [submitRageshake, roomId, sendRageshakeRequest], ); return ( @@ -65,7 +65,7 @@ export const FeedbackSettingsTab: FC = ({ roomId }) => {

{t("Submit feedback")}

{t( - "If you are experiencing issues or simply would like to provide some feedback, please send us a short description below." + "If you are experiencing issues or simply would like to provide some feedback, please send us a short description below.", )}
diff --git a/src/settings/SettingsModal.tsx b/src/settings/SettingsModal.tsx index 62dee06a..fe183d59 100644 --- a/src/settings/SettingsModal.tsx +++ b/src/settings/SettingsModal.tsx @@ -69,7 +69,7 @@ export const SettingsModal: FC = (props) => { // Generate a `SelectInput` with a list of devices for a given device kind. const generateDeviceSelection = ( devices: MediaDevice, - caption: string + caption: string, ): ReactNode => { if (devices.available.length == 0) return null; @@ -100,7 +100,7 @@ export const SettingsModal: FC = (props) => { (tab: Key) => { setSelectedTab(tab.toString()); }, - [setSelectedTab] + [setSelectedTab], ); const optInDescription = ( diff --git a/src/settings/rageshake.ts b/src/settings/rageshake.ts index 699ac07c..0b0365a7 100644 --- a/src/settings/rageshake.ts +++ b/src/settings/rageshake.ts @@ -133,7 +133,7 @@ class IndexedDBLogStore { public constructor( private indexedDB: IDBFactory, - private loggerInstance: ConsoleLogger + private loggerInstance: ConsoleLogger, ) { this.id = "instance-" + randomString(16); @@ -177,7 +177,7 @@ class IndexedDBLogStore { logObjStore.createIndex("id", "id", { unique: false }); logObjStore.add( - this.generateLogEntry(new Date() + " ::: Log database was created.") + this.generateLogEntry(new Date() + " ::: Log database was created."), ); // This records the last time each instance ID generated a log message, such @@ -208,7 +208,7 @@ class IndexedDBLogStore { { leading: false, trailing: true, - } + }, ); /** @@ -366,8 +366,8 @@ class IndexedDBLogStore { txn.onerror = (): void => { reject( new Error( - "Failed to delete logs for " + `'${id}' : ${txn?.error?.message}` - ) + "Failed to delete logs for " + `'${id}' : ${txn?.error?.message}`, + ), ); }; // delete last modified entries @@ -410,7 +410,7 @@ class IndexedDBLogStore { }, (err) => { logger.error(err); - } + }, ); } return logs; @@ -445,7 +445,7 @@ class IndexedDBLogStore { function selectQuery( store: IDBObjectStore, keyRange: IDBKeyRange | undefined, - resultMapper: (cursor: IDBCursorWithValue) => T + resultMapper: (cursor: IDBCursorWithValue) => T, ): Promise { const query = store.openCursor(keyRange); return new Promise((resolve, reject) => { @@ -510,7 +510,7 @@ function tryInitStorage(): Promise { if (indexedDB) { global.mx_rage_store = new IndexedDBLogStore( indexedDB, - global.mx_rage_logger + global.mx_rage_logger, ); global.mx_rage_initStoragePromise = global.mx_rage_store.connect(); return global.mx_rage_initStoragePromise; @@ -547,7 +547,7 @@ export async function getLogsForReport(): Promise { type StringifyReplacer = ( this: unknown, key: string, - value: unknown + value: unknown, ) => unknown; // From https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Errors/Cyclic_object_value#circular_references @@ -600,7 +600,7 @@ export function setLogExtension(extension: LogExtensionFunc): void { logger.methodFactory = function ( methodName, configLevel, - loggerName + loggerName, ): LoggingMethod { const rawMethod = originalFactory(methodName, configLevel, loggerName); diff --git a/src/settings/submit-rageshake.ts b/src/settings/submit-rageshake.ts index 33d53ce5..16c036e2 100644 --- a/src/settings/submit-rageshake.ts +++ b/src/settings/submit-rageshake.ts @@ -95,12 +95,12 @@ export function useSubmitRageshake(): { const body = new FormData(); body.append( "text", - description ?? "User did not supply any additional text." + description ?? "User did not supply any additional text.", ); body.append("app", "matrix-video-chat"); body.append( "version", - (import.meta.env.VITE_APP_VERSION as string) || "dev" + (import.meta.env.VITE_APP_VERSION as string) || "dev", ); body.append("user_agent", userAgent); body.append("installed_pwa", "false"); @@ -132,22 +132,22 @@ export function useSubmitRageshake(): { body.append( "cross_signing_ready", - String(await client.isCrossSigningReady()) + String(await client.isCrossSigningReady()), ); body.append( "cross_signing_supported_by_hs", String( await client.doesServerSupportUnstableFeature( - "org.matrix.e2e_cross_signing" - ) - ) + "org.matrix.e2e_cross_signing", + ), + ), ); body.append("cross_signing_key", crossSigning.getId()!); body.append( "cross_signing_privkey_in_secret_storage", String( - !!(await crossSigning.isStoredInSecretStorage(secretStorage)) - ) + !!(await crossSigning.isStoredInSecretStorage(secretStorage)), + ), ); const pkCache = client.getCrossSigningCacheCallbacks(); @@ -157,8 +157,8 @@ export function useSubmitRageshake(): { !!( pkCache?.getCrossSigningKeyCache && (await pkCache.getCrossSigningKeyCache("master")) - ) - ) + ), + ), ); body.append( "cross_signing_self_signing_privkey_cached", @@ -166,8 +166,8 @@ export function useSubmitRageshake(): { !!( pkCache?.getCrossSigningKeyCache && (await pkCache.getCrossSigningKeyCache("self_signing")) - ) - ) + ), + ), ); body.append( "cross_signing_user_signing_privkey_cached", @@ -175,32 +175,32 @@ export function useSubmitRageshake(): { !!( pkCache?.getCrossSigningKeyCache && (await pkCache.getCrossSigningKeyCache("user_signing")) - ) - ) + ), + ), ); body.append( "secret_storage_ready", - String(await client.isSecretStorageReady()) + String(await client.isSecretStorageReady()), ); body.append( "secret_storage_key_in_account", - String(!!(await secretStorage.hasKey())) + String(!!(await secretStorage.hasKey())), ); body.append( "session_backup_key_in_secret_storage", - String(!!(await client.isKeyBackupKeyStored())) + String(!!(await client.isKeyBackupKeyStored())), ); const sessionBackupKeyFromCache = await client.crypto!.getSessionBackupPrivateKey(); body.append( "session_backup_key_cached", - String(!!sessionBackupKeyFromCache) + String(!!sessionBackupKeyFromCache), ); body.append( "session_backup_key_well_formed", - String(sessionBackupKeyFromCache instanceof Uint8Array) + String(sessionBackupKeyFromCache instanceof Uint8Array), ); } } @@ -214,7 +214,7 @@ export function useSubmitRageshake(): { try { body.append( "storageManager_persisted", - String(await navigator.storage.persisted()) + String(await navigator.storage.persisted()), ); } catch (e) {} } else if (document.hasStorageAccess) { @@ -222,7 +222,7 @@ export function useSubmitRageshake(): { try { body.append( "storageManager_persisted", - String(await document.hasStorageAccess()) + String(await document.hasStorageAccess()), ); } catch (e) {} } @@ -240,7 +240,7 @@ export function useSubmitRageshake(): { Object.keys(estimate.usageDetails).forEach((k) => { body.append( `storageManager_usage_${k}`, - String(estimate.usageDetails![k]) + String(estimate.usageDetails![k]), ); }); } @@ -257,14 +257,14 @@ export function useSubmitRageshake(): { body.append( "file", gzip(ElementCallOpenTelemetry.instance.rageshakeProcessor!.dump()), - "traces.json.gz" + "traces.json.gz", ); } if (opts.rageshakeRequestId) { body.append( "group_call_rageshake_request_id", - opts.rageshakeRequestId + opts.rageshakeRequestId, ); } @@ -279,7 +279,7 @@ export function useSubmitRageshake(): { logger.error(error); } }, - [client, sending] + [client, sending], ); return { @@ -292,7 +292,7 @@ export function useSubmitRageshake(): { export function useRageshakeRequest(): ( roomId: string, - rageshakeRequestId: string + rageshakeRequestId: string, ) => void { const { client } = useClient(); @@ -302,14 +302,14 @@ export function useRageshakeRequest(): ( request_id: rageshakeRequestId, }); }, - [client] + [client], ); return sendRageshakeRequest; } export function useRageshakeRequestModal( - roomId: string + roomId: string, ): ComponentProps { const [open, setOpen] = useState(false); const onDismiss = useCallback(() => setOpen(false), [setOpen]); diff --git a/src/settings/useSetting.ts b/src/settings/useSetting.ts index 86b1183d..399ed356 100644 --- a/src/settings/useSetting.ts +++ b/src/settings/useSetting.ts @@ -38,13 +38,13 @@ export const useSetting = (name: string, defaultValue: T): Setting => { const value = useMemo( () => (item == null ? defaultValue : JSON.parse(item)), - [item, defaultValue] + [item, defaultValue], ); const setValue = useCallback( (value: T) => { setItem(JSON.stringify(value)); }, - [setItem] + [setItem], ); return [value, setValue]; @@ -94,7 +94,7 @@ export const useOptInAnalytics = (): DisableableSetting => { export const useEnableE2EE = (): DisableableSetting => { const settingVal = useSetting( "enable-end-to-end-encryption", - true + true, ); if (isE2EESupported()) return settingVal; diff --git a/src/tabs/Tabs.tsx b/src/tabs/Tabs.tsx index 5ed75a05..953edd15 100644 --- a/src/tabs/Tabs.tsx +++ b/src/tabs/Tabs.tsx @@ -29,7 +29,7 @@ interface TabContainerProps extends TabListProps { } export function TabContainer( - props: TabContainerProps + props: TabContainerProps, ): JSX.Element { const state = useTabListState(props); const ref = useRef(null); diff --git a/src/typography/Typography.tsx b/src/typography/Typography.tsx index 2c3687ae..ce55fc96 100644 --- a/src/typography/Typography.tsx +++ b/src/typography/Typography.tsx @@ -39,7 +39,7 @@ export const Headline = forwardRef( overflowEllipsis, ...rest }, - ref + ref, ) => { return createElement( Component, @@ -48,13 +48,13 @@ export const Headline = forwardRef( className: classNames( styles[fontWeight ?? ""], { [styles.overflowEllipsis]: overflowEllipsis }, - className + className, ), ref, }, - children + children, ); - } + }, ); export const Title = forwardRef( @@ -67,7 +67,7 @@ export const Title = forwardRef( overflowEllipsis, ...rest }, - ref + ref, ) => { return createElement( Component, @@ -76,13 +76,13 @@ export const Title = forwardRef( className: classNames( styles[fontWeight ?? ""], { [styles.overflowEllipsis]: overflowEllipsis }, - className + className, ), ref, }, - children + children, ); - } + }, ); export const Subtitle = forwardRef( @@ -95,7 +95,7 @@ export const Subtitle = forwardRef( overflowEllipsis, ...rest }, - ref + ref, ) => { return createElement( Component, @@ -104,13 +104,13 @@ export const Subtitle = forwardRef( className: classNames( styles[fontWeight ?? ""], { [styles.overflowEllipsis]: overflowEllipsis }, - className + className, ), ref, }, - children + children, ); - } + }, ); export const Body = forwardRef( @@ -123,7 +123,7 @@ export const Body = forwardRef( overflowEllipsis, ...rest }, - ref + ref, ) => { return createElement( Component, @@ -132,13 +132,13 @@ export const Body = forwardRef( className: classNames( styles[fontWeight ?? ""], { [styles.overflowEllipsis]: overflowEllipsis }, - className + className, ), ref, }, - children + children, ); - } + }, ); export const Caption = forwardRef( @@ -151,7 +151,7 @@ export const Caption = forwardRef( overflowEllipsis, ...rest }, - ref + ref, ) => { return createElement( Component, @@ -161,13 +161,13 @@ export const Caption = forwardRef( styles.caption, styles[fontWeight ?? ""], { [styles.overflowEllipsis]: overflowEllipsis }, - className + className, ), ref, }, - children + children, ); - } + }, ); export const Micro = forwardRef( @@ -180,7 +180,7 @@ export const Micro = forwardRef( overflowEllipsis, ...rest }, - ref + ref, ) => { return createElement( Component, @@ -190,13 +190,13 @@ export const Micro = forwardRef( styles.micro, styles[fontWeight ?? ""], { [styles.overflowEllipsis]: overflowEllipsis }, - className + className, ), ref, }, - children + children, ); - } + }, ); interface LinkProps extends TypographyProps { @@ -217,7 +217,7 @@ export const Link = forwardRef( overflowEllipsis, ...rest }, - ref + ref, ) => { // eslint-disable-next-line @typescript-eslint/ban-ts-comment // @ts-ignore @@ -246,11 +246,11 @@ export const Link = forwardRef( styles[color], styles[fontWeight ?? ""], { [styles.overflowEllipsis]: overflowEllipsis }, - className + className, ), ref: ref, }, - children + children, ); - } + }, ); diff --git a/src/useCallViewKeyboardShortcuts.ts b/src/useCallViewKeyboardShortcuts.ts index c2cc17ad..9f4ba558 100644 --- a/src/useCallViewKeyboardShortcuts.ts +++ b/src/useCallViewKeyboardShortcuts.ts @@ -34,7 +34,7 @@ export function useCallViewKeyboardShortcuts( focusElement: RefObject, toggleMicrophoneMuted: () => void, toggleLocalVideoMuted: () => void, - setMicrophoneMuted: (muted: boolean) => void + setMicrophoneMuted: (muted: boolean) => void, ): void { const spacebarHeld = useRef(false); @@ -63,8 +63,8 @@ export function useCallViewKeyboardShortcuts( toggleLocalVideoMuted, toggleMicrophoneMuted, setMicrophoneMuted, - ] - ) + ], + ), ); useEventTarget( @@ -80,8 +80,8 @@ export function useCallViewKeyboardShortcuts( setMicrophoneMuted(true); } }, - [focusElement, setMicrophoneMuted] - ) + [focusElement, setMicrophoneMuted], + ), ); useEventTarget( @@ -92,6 +92,6 @@ export function useCallViewKeyboardShortcuts( spacebarHeld.current = false; setMicrophoneMuted(true); } - }, [setMicrophoneMuted, spacebarHeld]) + }, [setMicrophoneMuted, spacebarHeld]), ); } diff --git a/src/useEvents.ts b/src/useEvents.ts index b35d6fac..a116a050 100644 --- a/src/useEvents.ts +++ b/src/useEvents.ts @@ -28,7 +28,7 @@ export function useEventTarget( target: EventTarget | null | undefined, eventType: string, listener: (event: T) => void, - options?: AddEventListenerOptions + options?: AddEventListenerOptions, ): void { useEffect(() => { if (target) { @@ -37,7 +37,7 @@ export function useEventTarget( target.removeEventListener( eventType, listener as EventListener, - options + options, ); } }, [target, eventType, listener, options]); @@ -47,11 +47,11 @@ export function useEventTarget( export function useTypedEventEmitter< Events extends string, Arguments extends ListenerMap, - T extends Events + T extends Events, >( emitter: TypedEventEmitter, eventType: T, - listener: Listener + listener: Listener, ): void { useEffect(() => { emitter.on(eventType, listener); @@ -64,11 +64,11 @@ export function useTypedEventEmitter< // Shortcut for registering a listener on an eventemitter3 EventEmitter (ie. what the LiveKit SDK uses) export function useEventEmitterThree< EventType extends keyof T, - T extends EventMap + T extends EventMap, >( emitter: EventEmitter, eventType: EventType, - listener: T[EventType] + listener: T[EventType], ): void { useEffect(() => { emitter.on(eventType, listener); diff --git a/src/useLocalStorage.ts b/src/useLocalStorage.ts index e7fe51ef..07d487ea 100644 --- a/src/useLocalStorage.ts +++ b/src/useLocalStorage.ts @@ -24,10 +24,10 @@ export const localStorageBus = new EventEmitter(); // Like useState, but reads from and persists the value to localStorage export const useLocalStorage = ( - key: string + key: string, ): [LocalStorageItem, (value: string) => void] => { const [value, setValue] = useState(() => - localStorage.getItem(key) + localStorage.getItem(key), ); useEffect(() => { @@ -45,7 +45,7 @@ export const useLocalStorage = ( localStorage.setItem(key, newValue); localStorageBus.emit(key, newValue); }, - [key, setValue] + [key, setValue], ), ]; }; diff --git a/src/useMatrixRTCSessionJoinState.ts b/src/useMatrixRTCSessionJoinState.ts index c7c54563..7aac4e83 100644 --- a/src/useMatrixRTCSessionJoinState.ts +++ b/src/useMatrixRTCSessionJoinState.ts @@ -22,7 +22,7 @@ import { import { useCallback, useEffect, useState } from "react"; export function useMatrixRTCSessionJoinState( - rtcSession: MatrixRTCSession + rtcSession: MatrixRTCSession, ): boolean { const [isJoined, setJoined] = useState(rtcSession.isJoined()); @@ -30,7 +30,7 @@ export function useMatrixRTCSessionJoinState( logger.info( `Session in room ${rtcSession.room.roomId} changed to ${ rtcSession.isJoined() ? "joined" : "left" - }` + }`, ); setJoined(rtcSession.isJoined()); }, [rtcSession]); @@ -41,7 +41,7 @@ export function useMatrixRTCSessionJoinState( return () => { rtcSession.off( MatrixRTCSessionEvent.JoinStateChanged, - onJoinStateChanged + onJoinStateChanged, ); }; }, [rtcSession, onJoinStateChanged]); diff --git a/src/useMatrixRTCSessionMemberships.ts b/src/useMatrixRTCSessionMemberships.ts index a0d5a513..3873b7a2 100644 --- a/src/useMatrixRTCSessionMemberships.ts +++ b/src/useMatrixRTCSessionMemberships.ts @@ -23,13 +23,13 @@ import { import { useCallback, useEffect, useState } from "react"; export function useMatrixRTCSessionMemberships( - rtcSession: MatrixRTCSession + rtcSession: MatrixRTCSession, ): CallMembership[] { const [memberships, setMemberships] = useState(rtcSession.memberships); const onMembershipsChanged = useCallback(() => { logger.info( - `Memberships changed for call in room ${rtcSession.room.roomId} (${rtcSession.memberships.length} members)` + `Memberships changed for call in room ${rtcSession.room.roomId} (${rtcSession.memberships.length} members)`, ); setMemberships(rtcSession.memberships); }, [rtcSession]); @@ -37,13 +37,13 @@ export function useMatrixRTCSessionMemberships( useEffect(() => { rtcSession.on( MatrixRTCSessionEvent.MembershipsChanged, - onMembershipsChanged + onMembershipsChanged, ); return () => { rtcSession.off( MatrixRTCSessionEvent.MembershipsChanged, - onMembershipsChanged + onMembershipsChanged, ); }; }, [rtcSession, onMembershipsChanged]); diff --git a/src/useMediaQuery.ts b/src/useMediaQuery.ts index ab80f4c3..3927a64a 100644 --- a/src/useMediaQuery.ts +++ b/src/useMediaQuery.ts @@ -28,7 +28,7 @@ export function useMediaQuery(query: string): boolean { useEventTarget( mediaQuery, "change", - useCallback(() => setNumChanges((n) => n + 1), [setNumChanges]) + useCallback(() => setNumChanges((n) => n + 1), [setNumChanges]), ); // We want any change to the update counter to trigger an update here diff --git a/src/useMergedRefs.ts b/src/useMergedRefs.ts index 8139c154..5adfdf72 100644 --- a/src/useMergedRefs.ts +++ b/src/useMergedRefs.ts @@ -35,5 +35,5 @@ export const useMergedRefs = ( // Since this isn't an array literal, we can't use the static dependency // checker, but that's okay // eslint-disable-next-line react-hooks/exhaustive-deps - refs + refs, ); diff --git a/src/useReactiveState.ts b/src/useReactiveState.ts index 5693be54..f5daa1fe 100644 --- a/src/useReactiveState.ts +++ b/src/useReactiveState.ts @@ -30,7 +30,7 @@ import { */ export const useReactiveState = ( updateFn: (prevState?: T) => T, - deps: DependencyList + deps: DependencyList, ): [T, Dispatch>] => { const state = useRef(); if (state.current === undefined) state.current = updateFn(); @@ -61,7 +61,7 @@ export const useReactiveState = ( } setNumUpdates((n) => n + 1); // Force an update }, - [setNumUpdates] + [setNumUpdates], ), ]; }; diff --git a/src/video-grid/BigGrid.tsx b/src/video-grid/BigGrid.tsx index 9d75bc4d..39b6d82d 100644 --- a/src/video-grid/BigGrid.tsx +++ b/src/video-grid/BigGrid.tsx @@ -78,7 +78,7 @@ export interface SparseGrid { export function getPaths( g: SparseGrid, dest: number, - avoid: (cell: number) => boolean = (): boolean => false + avoid: (cell: number) => boolean = (): boolean => false, ): (number | null)[] { const destRow = row(dest, g); const destColumn = column(dest, g); @@ -145,7 +145,7 @@ function inArea( index: number, start: number, end: number, - g: SparseGrid + g: SparseGrid, ): boolean { const indexColumn = column(index, g); const indexRow = row(index, g); @@ -160,7 +160,7 @@ function inArea( function* cellsInArea( start: number, end: number, - g: SparseGrid + g: SparseGrid, ): Generator { const startColumn = column(start, g); const endColumn = column(end, g); @@ -179,7 +179,7 @@ export function forEachCellInArea( start: number, end: number, g: G, - fn: (c: G["cells"][0], i: number) => void + fn: (c: G["cells"][0], i: number) => void, ): void { for (const i of cellsInArea(start, end, g)) fn(g.cells[i], i); } @@ -188,7 +188,7 @@ function allCellsInArea( start: number, end: number, g: G, - fn: (c: G["cells"][0], i: number) => boolean + fn: (c: G["cells"][0], i: number) => boolean, ): boolean { for (const i of cellsInArea(start, end, g)) { if (!fn(g.cells[i], i)) return false; @@ -204,7 +204,7 @@ function countCellsInArea( start: number, end: number, g: G, - predicate: (c: G["cells"][0], i: number) => boolean + predicate: (c: G["cells"][0], i: number) => boolean, ): number { let count = 0; for (const i of cellsInArea(start, end, g)) { @@ -217,7 +217,7 @@ const areaEnd = ( start: number, columns: number, rows: number, - g: SparseGrid + g: SparseGrid, ): number => start + columns - 1 + g.columns * (rows - 1); const cloneGrid = (g: G): G => ({ @@ -231,7 +231,7 @@ const cloneGrid = (g: G): G => ({ */ function getNextGap( g: SparseGrid, - ignoreGap: (cell: number) => boolean + ignoreGap: (cell: number) => boolean, ): number | null { const last1By1Index = findLast1By1Index(g); if (last1By1Index === null) return null; @@ -278,13 +278,13 @@ function moveTileUnchecked(g: SparseGrid, from: number, to: number): void { to, toEnd, g, - (_c, i) => (g.cells[i] = movingCells.shift()) + (_c, i) => (g.cells[i] = movingCells.shift()), ); forEachCellInArea( from, fromEnd, g, - (_c, i) => (g.cells[i] ??= displacedTiles.shift()) + (_c, i) => (g.cells[i] ??= displacedTiles.shift()), ); } @@ -294,7 +294,7 @@ function moveTileUnchecked(g: SparseGrid, from: number, to: number): void { export function moveTile( g: G, from: number, - to: number + to: number, ): G { const tile = g.cells[from]!; @@ -333,7 +333,7 @@ function pushTileUp( g: SparseGrid, from: number, rows: number, - avoid: (cell: number) => boolean = (): boolean => false + avoid: (cell: number) => boolean = (): boolean => false, ): number { const tile = g.cells[from]!; @@ -347,7 +347,7 @@ function pushTileUp( to, Math.min(from - g.columns + tile.columns - 1, toEnd), g, - (c, i) => (c === undefined || is1By1(c)) && !avoid(i) + (c, i) => (c === undefined || is1By1(c)) && !avoid(i), ); if (cellsAboveAreDisplacable) { @@ -376,7 +376,7 @@ function canVacateArea(g: SparseGrid, start: number, end: number): boolean { start, end - newFullRows * g.columns, g, - (c) => c === undefined || is1By1(c) + (c) => c === undefined || is1By1(c), ); } @@ -391,7 +391,7 @@ function vacateArea(g: SparseGrid, start: number, end: number): SparseGrid { start, end, g, - (c, i) => c !== undefined || i >= g.cells.length + (c, i) => c !== undefined || i >= g.cells.length, ); const newFullRows = Math.floor(newCellCount / g.columns); const endRow = row(end, g); @@ -452,7 +452,7 @@ function vacateArea(g: SparseGrid, start: number, end: number): SparseGrid { const inputStructure = fillGaps( outputStructure, false, - (i) => inArea(i, start, end, g) && g.cells[i] === undefined + (i) => inArea(i, start, end, g) && g.cells[i] === undefined, ); // We exploit the fact that g and inputStructure have the same structure to @@ -464,7 +464,7 @@ function vacateArea(g: SparseGrid, start: number, end: number): SparseGrid { return { columns: g.columns, cells: outputStructure.cells.map((placeholder) => - structureMapping.get(placeholder) + structureMapping.get(placeholder), ), }; } @@ -475,21 +475,21 @@ function vacateArea(g: SparseGrid, start: number, end: number): SparseGrid { export function fillGaps( g: SparseGrid, packLargeTiles?: true, - ignoreGap?: () => false + ignoreGap?: () => false, ): Grid; export function fillGaps( g: SparseGrid, packLargeTiles?: boolean, - ignoreGap?: (cell: number) => boolean + ignoreGap?: (cell: number) => boolean, ): SparseGrid; export function fillGaps( g: SparseGrid, packLargeTiles = true, - ignoreGap: (cell: number) => boolean = (): boolean => false + ignoreGap: (cell: number) => boolean = (): boolean => false, ): SparseGrid { const lastGap = findLastIndex( g.cells, - (c, i) => c === undefined && !ignoreGap(i) + (c, i) => c === undefined && !ignoreGap(i), ); if (lastGap === null) return g; // There are no gaps to fill const lastGapRow = row(lastGap, g); @@ -500,10 +500,10 @@ export function fillGaps( // allowed to pack the large tiles into the rest of the grid as necessary) let idealLength = count( result.cells, - (c, i) => c !== undefined || ignoreGap(i) + (c, i) => c !== undefined || ignoreGap(i), ); const fullRowsRemoved = Math.floor( - (g.cells.length - idealLength) / g.columns + (g.cells.length - idealLength) / g.columns, ); // Step 1: Push all large tiles below the last gap upwards, so that they move @@ -620,7 +620,7 @@ function createRows(g: SparseGrid, count: number, atRow: number): SparseGrid { g, (c, i) => { result.cells[i + offset] = c; - } + }, ); } }); @@ -633,7 +633,7 @@ function createRows(g: SparseGrid, count: number, atRow: number): SparseGrid { */ export function addItems( items: TileDescriptor[], - g: SparseGrid + g: SparseGrid, ): SparseGrid { let result: SparseGrid = cloneGrid(g); @@ -655,7 +655,7 @@ export function addItems( // This item wants to be placed near another; let's put it on a row // directly below the related tile const placeNear = result.cells.findIndex( - (c) => c?.item.id === item.placeNear + (c) => c?.item.id === item.placeNear, ); if (placeNear === -1) { // Can't find the related tile, so let's give up and place it at the end @@ -666,7 +666,7 @@ export function addItems( placeNear, placeNearCell.columns, placeNearCell.rows, - result + result, ); result = createRows(result, 1, row(placeNearEnd, result) + 1); @@ -699,7 +699,7 @@ const extraLargeTileDimensions = (g: SparseGrid): [number, number] => export function cycleTileSize( g: G, - tile: TileDescriptor + tile: TileDescriptor, ): G { const from = g.cells.findIndex((c) => c?.item === tile); if (from === -1) return g; // Tile removed, no change @@ -727,7 +727,7 @@ function findNearestCell( g: G, nearestTo: number, shouldScan: (index: number) => boolean, - predicate: (cell: G["cells"][0], index: number) => boolean + predicate: (cell: G["cells"][0], index: number) => boolean, ): number | null { const scanLocations = new Set([nearestTo]); @@ -758,7 +758,7 @@ export function setTileSize( g: G, from: number, toWidth: number, - toHeight: number + toHeight: number, ): G { const fromCell = g.cells[from]!; const fromWidth = fromCell.columns; @@ -771,12 +771,12 @@ export function setTileSize( 0, Math.min( g.columns - toWidth, - column(from, g) + Math.trunc((fromWidth - toWidth) / 2) - ) + column(from, g) + Math.trunc((fromWidth - toWidth) / 2), + ), ); const toRow = Math.max( 0, - row(from, g) + Math.trunc((fromHeight - toHeight) / 2) + row(from, g) + Math.trunc((fromHeight - toHeight) / 2), ); const targetDest = toColumn + toRow * g.columns; @@ -788,7 +788,7 @@ export function setTileSize( const placeTile = ( to: number, toEnd: number, - grid: Grid | SparseGrid + grid: Grid | SparseGrid, ): void => { forEachCellInArea(to, toEnd, grid, (_c, i) => { grid.cells[i] = { @@ -824,7 +824,7 @@ export function setTileSize( (_c, i) => { const end = areaEnd(i, toWidth, toHeight, g); return end < newGridSize && canVacateArea(gridWithoutTile, i, end); - } + }, ); if (to !== null) { @@ -848,7 +848,7 @@ export function setTileSize( (_c, i) => { const end = areaEnd(i, toWidth, toHeight, g); return end < newGridSize && canVacateArea(packedGridWithoutTile, i, end); - } + }, ); if (to === null) return g; // There's no space anywhere; give up @@ -949,7 +949,7 @@ function updateTiles(g: Grid, tiles: TileDescriptor[]): Grid { // Step 2: Add new tiles const existingItemIds = new Set( - grid1.cells.filter((c) => c !== undefined).map((c) => c!.item.id) + grid1.cells.filter((c) => c !== undefined).map((c) => c!.item.id), ); const newItems = tiles.filter((i) => !existingItemIds.has(i.id)); const grid2 = addItems(newItems, grid1); @@ -967,7 +967,7 @@ function updateBounds(g: Grid, bounds: RectReadOnly): Grid { const Slots: FC<{ s: Grid }> = memo(({ s: g }) => { const areas = new Array<(number | null)[]>( - Math.ceil(g.cells.length / g.columns) + Math.ceil(g.cells.length / g.columns), ); for (let i = 0; i < areas.length; i++) areas[i] = new Array(g.columns).fill(null); @@ -981,7 +981,7 @@ const Slots: FC<{ s: Grid }> = memo(({ s: g }) => { i, slotEnd, g, - (_c, j) => (areas[row(j, g)][column(j, g)] = slotCount) + (_c, j) => (areas[row(j, g)][column(j, g)] = slotCount), ); slotCount++; } @@ -993,7 +993,7 @@ const Slots: FC<{ s: Grid }> = memo(({ s: g }) => { (row) => `'${row .map((slotId) => (slotId === null ? "." : `s${slotId}`)) - .join(" ")}'` + .join(" ")}'`, ) .join(" "), gridTemplateColumns: `repeat(${g.columns}, 1fr)`, @@ -1019,7 +1019,7 @@ function positionOnTileToCell( g: SparseGrid, tileOriginIndex: number, xPositionOnTile: number, - yPositionOnTile: number + yPositionOnTile: number, ): number { const tileOrigin = g.cells[tileOriginIndex]!; const columnOnTile = Math.floor(xPositionOnTile * tileOrigin.columns); @@ -1034,7 +1034,7 @@ function dragTile( xPositionOnFrom: number, yPositionOnFrom: number, xPositionOnTo: number, - yPositionOnTo: number + yPositionOnTo: number, ): Grid { const fromOrigin = g.cells.findIndex((c) => c.item === from); const toOrigin = g.cells.findIndex((c) => c.item === to); @@ -1042,13 +1042,13 @@ function dragTile( g, fromOrigin, xPositionOnFrom, - yPositionOnFrom + yPositionOnFrom, ); const toCell = positionOnTileToCell( g, toOrigin, xPositionOnTo, - yPositionOnTo + yPositionOnTo, ); return moveTile(g, fromOrigin, fromOrigin + toCell - fromCell); diff --git a/src/video-grid/Layout.tsx b/src/video-grid/Layout.tsx index 5294aeb6..fe8f2ec7 100644 --- a/src/video-grid/Layout.tsx +++ b/src/video-grid/Layout.tsx @@ -61,7 +61,7 @@ export interface Layout { xPositionOnFrom: number, yPositionOnFrom: number, xPositionOnTo: number, - yPositionOnTo: number + yPositionOnTo: number, ) => State; /** * Toggles the focus of the given tile (if this layout has the concept of @@ -109,7 +109,7 @@ interface UseLayout { xPositionOnFrom: number, yPositionOnFrom: number, xPositionOnTo: number, - yPositionOnTo: number + yPositionOnTo: number, ) => void; toggleFocus: ((tile: TileDescriptor) => void) | undefined; slots: ReactNode; @@ -123,7 +123,7 @@ export function useLayout( layout: Layout, items: TileDescriptor[], bounds: RectReadOnly, - layoutStates: LayoutStatesMap + layoutStates: LayoutStatesMap, ): UseLayout { const prevLayout = useRef>(); const prevState = layoutStates.get(layout); @@ -159,7 +159,7 @@ export function useLayout( generation: generation.current, canDragTile: useCallback( (tile: TileDescriptor) => layout.canDragTile(state, tile), - [layout, state] + [layout, state], ), dragTile: useCallback( ( @@ -168,7 +168,7 @@ export function useLayout( xPositionOnFrom: number, yPositionOnFrom: number, xPositionOnTo: number, - yPositionOnTo: number + yPositionOnTo: number, ) => setState((s) => layout.dragTile( @@ -178,17 +178,17 @@ export function useLayout( xPositionOnFrom, yPositionOnFrom, xPositionOnTo, - yPositionOnTo - ) + yPositionOnTo, + ), ), - [layout, setState] + [layout, setState], ), toggleFocus: useMemo( () => layout.toggleFocus && ((tile: TileDescriptor): void => setState((s) => layout.toggleFocus!(s, tile))), - [layout, setState] + [layout, setState], ), slots: , }; diff --git a/src/video-grid/NewVideoGrid.tsx b/src/video-grid/NewVideoGrid.tsx index 905a8a0c..8b32045c 100644 --- a/src/video-grid/NewVideoGrid.tsx +++ b/src/video-grid/NewVideoGrid.tsx @@ -98,13 +98,13 @@ export function NewVideoGrid({ useEffect(() => { if (slotsRoot !== null) { setRenderedGeneration( - parseInt(slotsRoot.getAttribute("data-generation")!) + parseInt(slotsRoot.getAttribute("data-generation")!), ); const observer = new MutationObserver((mutations) => { if (mutations.some((m) => m.type === "attributes")) { setRenderedGeneration( - parseInt(slotsRoot.getAttribute("data-generation")!) + parseInt(slotsRoot.getAttribute("data-generation")!), ); } }); @@ -158,13 +158,13 @@ export function NewVideoGrid({ if (renderedGeneration !== generation) return prevTiles ?? []; const tileRects = new Map( - zip(orderedItems, slotRects) as [TileDescriptor, Rect][] + zip(orderedItems, slotRects) as [TileDescriptor, Rect][], ); // In order to not break drag gestures, it's critical that we render tiles // in a stable order (that of 'items') return items.map((item) => ({ ...tileRects.get(item)!, item })); }, - [slotRects, grid, renderedGeneration] + [slotRects, grid, renderedGeneration], ); // Drag state is stored in a ref rather than component state, because we use @@ -200,7 +200,7 @@ export function NewVideoGrid({ }, leave: { opacity: 0, scale: 0, immediate: disableAnimations }, config: { mass: 0.7, tension: 252, friction: 25 }, - }) + }), // react-spring's types are bugged and can't infer the spring type ) as unknown as [TransitionFn, TileSpring>, SpringRef]; @@ -242,7 +242,7 @@ export function NewVideoGrid({ disableAnimations || ((key): boolean => key === "zIndex" || key === "x" || key === "y"), - } + }, ); const overTile = tiles.find( @@ -250,7 +250,7 @@ export function NewVideoGrid({ cursorX >= t.x && cursorX < t.x + t.width && cursorY >= t.y && - cursorY < t.y + t.height + cursorY < t.y + t.height, ); if (overTile !== undefined) @@ -260,7 +260,7 @@ export function NewVideoGrid({ (cursorX - tileX) / tile.width, (cursorY - tileY) / tile.height, (cursorX - overTile.x) / overTile.width, - (cursorY - overTile.y) / overTile.height + (cursorY - overTile.y) / overTile.height, ); }; @@ -287,7 +287,7 @@ export function NewVideoGrid({ // eslint-disable-next-line @typescript-eslint/ban-ts-comment // @ts-ignore last, - }: Parameters>[0] + }: Parameters>[0], ): void => { if (tap) { const now = Date.now(); @@ -303,7 +303,7 @@ export function NewVideoGrid({ } } else { const tileController = springRef.current.find( - (c) => (c.item as Tile).item.id === tileId + (c) => (c.item as Tile).item.id === tileId, )!; if (canDragTile((tileController.item as Tile).item)) { @@ -347,7 +347,7 @@ export function NewVideoGrid({ animateDraggedTile(false); } }, - { target: gridRef2 } + { target: gridRef2 }, ); // Render nothing if the grid has yet to be generated diff --git a/src/video-grid/TileWrapper.tsx b/src/video-grid/TileWrapper.tsx index d1712ce5..2d37a3cd 100644 --- a/src/video-grid/TileWrapper.tsx +++ b/src/video-grid/TileWrapper.tsx @@ -25,7 +25,7 @@ interface Props { onDragRef: RefObject< ( tileId: string, - state: Parameters>[0] + state: Parameters>[0], ) => void >; targetWidth: number; @@ -87,7 +87,7 @@ export const TileWrapper = memo( height, boxShadow: to( [shadow, shadowSpread], - (s, ss) => `rgba(0, 0, 0, 0.5) 0px ${s}px ${2 * s}px ${ss}px` + (s, ss) => `rgba(0, 0, 0, 0.5) 0px ${s}px ${2 * s}px ${ss}px`, ), }, targetWidth, @@ -96,7 +96,7 @@ export const TileWrapper = memo( })} ); - } + }, // We pretend this component is a simple function rather than a // NamedExoticComponent, because that's the only way we can fit in a type // parameter diff --git a/src/video-grid/VideoGrid.tsx b/src/video-grid/VideoGrid.tsx index c65350c2..59cf78a7 100644 --- a/src/video-grid/VideoGrid.tsx +++ b/src/video-grid/VideoGrid.tsx @@ -151,7 +151,7 @@ function getTilePositions( gridHeight: number, pipXRatio: number, pipYRatio: number, - layout: Layout + layout: Layout, ): TilePosition[] { if (layout === "grid") { if (tileCount === 2 && focusedTileCount === 0) { @@ -159,7 +159,7 @@ function getTilePositions( gridWidth, gridHeight, pipXRatio, - pipYRatio + pipYRatio, ); } @@ -167,7 +167,7 @@ function getTilePositions( tileCount, focusedTileCount, gridWidth, - gridHeight + gridHeight, ); } else { return getSpotlightLayoutTilePositions(tileCount, gridWidth, gridHeight); @@ -178,13 +178,13 @@ function getOneOnOneLayoutTilePositions( gridWidth: number, gridHeight: number, pipXRatio: number, - pipYRatio: number + pipYRatio: number, ): TilePosition[] { const [remotePosition] = getFreedomLayoutTilePositions( 1, 0, gridWidth, - gridHeight + gridHeight, ); const gridAspectRatio = gridWidth / gridHeight; @@ -196,7 +196,7 @@ function getOneOnOneLayoutTilePositions( const pipScaleFactor = Math.min( 1, remotePosition.width / 3 / maxPipWidth, - remotePosition.height / 3 / maxPipHeight + remotePosition.height / 3 / maxPipHeight, ); const pipWidth = maxPipWidth * pipScaleFactor; const pipHeight = maxPipHeight * pipScaleFactor; @@ -223,7 +223,7 @@ function getOneOnOneLayoutTilePositions( function getSpotlightLayoutTilePositions( tileCount: number, gridWidth: number, - gridHeight: number + gridHeight: number, ): TilePosition[] { const tilePositions: TilePosition[] = []; @@ -293,7 +293,7 @@ function getFreedomLayoutTilePositions( tileCount: number, focusedTileCount: number, gridWidth: number, - gridHeight: number + gridHeight: number, ): TilePosition[] { if (tileCount === 0) { return []; @@ -307,7 +307,7 @@ function getFreedomLayoutTilePositions( tileCount, focusedTileCount, gridWidth, - gridHeight + gridHeight, ); let itemGridWidth; @@ -335,7 +335,7 @@ function getFreedomLayoutTilePositions( itemRowCount, itemTileAspectRatio, itemGridWidth, - itemGridHeight + itemGridHeight, ); const itemGridBounds = getSubGridBoundingBox(itemGridPositions); @@ -367,7 +367,7 @@ function getFreedomLayoutTilePositions( focusedRowCount, focusedTileAspectRatio, focusedGridWidth, - focusedGridHeight + focusedGridHeight, ); const tilePositions = [...focusedGridPositions, ...itemGridPositions]; @@ -380,7 +380,7 @@ function getFreedomLayoutTilePositions( gridWidth, gridHeight - focusedGridHeight, 0, - focusedGridHeight + focusedGridHeight, ); } else { centerTiles( @@ -388,7 +388,7 @@ function getFreedomLayoutTilePositions( gridWidth - focusedGridWidth, gridHeight, focusedGridWidth, - 0 + 0, ); } @@ -454,7 +454,7 @@ function getGridLayout( tileCount: number, focusedTileCount: number, gridWidth: number, - gridHeight: number + gridHeight: number, ): { itemGridRatio: number; layoutDirection: LayoutDirection } { let layoutDirection: LayoutDirection = "horizontal"; let itemGridRatio = 1; @@ -479,7 +479,7 @@ function centerTiles( gridWidth: number, gridHeight: number, offsetLeft: number, - offsetTop: number + offsetTop: number, ): TilePosition[] { const bounds = getSubGridBoundingBox(positions); @@ -494,7 +494,7 @@ function centerTiles( function applyTileOffsets( positions: TilePosition[], leftOffset: number, - topOffset: number + topOffset: number, ): TilePosition[] { for (const position of positions) { position.x += leftOffset; @@ -507,7 +507,7 @@ function applyTileOffsets( function getSubGridLayout( tileCount: number, gridWidth: number, - gridHeight: number + gridHeight: number, ): { columnCount: number; rowCount: number; tileAspectRatio: number } { const gridAspectRatio = gridWidth / gridHeight; @@ -624,7 +624,7 @@ function getSubGridPositions( rowCount: number, tileAspectRatio: number, gridWidth: number, - gridHeight: number + gridHeight: number, ): TilePosition[] { if (tileCount === 0) { return []; @@ -633,7 +633,7 @@ function getSubGridPositions( const newTilePositions: TilePosition[] = []; const boxWidth = Math.round( - (gridWidth - GAP * (columnCount + 1)) / columnCount + (gridWidth - GAP * (columnCount + 1)) / columnCount, ); const boxHeight = Math.round((gridHeight - GAP * (rowCount + 1)) / rowCount); @@ -675,7 +675,7 @@ function getSubGridPositions( const subgridWidth = tileWidth * columnCount + (GAP * columnCount - 1); centeringPadding = Math.round( (subgridWidth - (tileWidth * rowItemCount + (GAP * rowItemCount - 1))) / - 2 + 2, ); } @@ -699,7 +699,7 @@ function displayedTileCount( layout: Layout, tileCount: number, gridWidth: number, - gridHeight: number + gridHeight: number, ): number { let displayedTile = -1; if (layout === "grid") { @@ -731,7 +731,7 @@ function displayedTileCount( function reorderTiles( tiles: Tile[], layout: Layout, - displayedTile = -1 + displayedTile = -1, ): void { // We use a special layout for 1:1 to always put the local tile first. // We only do this if there are two tiles (obviously) and exactly one @@ -919,7 +919,7 @@ export function VideoGrid({ for (const item of items) { const existingTileIndex = newTiles.findIndex( - ({ key }) => item.id === key + ({ key }) => item.id === key, ); const existingTile = newTiles[existingTileIndex]; @@ -956,7 +956,7 @@ export function VideoGrid({ layout, newTiles.length, gridBounds.width, - gridBounds.height + gridBounds.height, ); } @@ -976,7 +976,7 @@ export function VideoGrid({ const focusedTileCount = newTiles.reduce( (count, tile) => count + (tile.focused ? 1 : 0), - 0 + 0, ); return { @@ -989,7 +989,7 @@ export function VideoGrid({ gridBounds.height, pipXRatio, pipYRatio, - layout + layout, ), }; }); @@ -998,7 +998,7 @@ export function VideoGrid({ const focusedTileCount = newTiles.reduce( (count, tile) => count + (tile.focused ? 1 : 0), - 0 + 0, ); lastLayoutRef.current = layout; @@ -1013,7 +1013,7 @@ export function VideoGrid({ gridBounds.height, pipXRatio, pipYRatio, - layout + layout, ), }; }); @@ -1066,7 +1066,7 @@ export function VideoGrid({ } else { const isMobile = isMobileBreakpoint( gridBounds.width, - gridBounds.height + gridBounds.height, ); const x = @@ -1127,7 +1127,7 @@ export function VideoGrid({ } }; }, - [tilePositions, disableAnimations, scrollPosition, layout, gridBounds] + [tilePositions, disableAnimations, scrollPosition, layout, gridBounds], ); const [springs, api] = useSprings(tiles.length, animate(tiles), [ @@ -1179,12 +1179,12 @@ export function VideoGrid({ gridBounds.height, pipXRatio, pipYRatio, - layout + layout, ), }; }); }, - [tiles, layout, gridBounds.width, gridBounds.height, pipXRatio, pipYRatio] + [tiles, layout, gridBounds.width, gridBounds.height, pipXRatio, pipYRatio], ); // Callback for useDrag. We could call useDrag here, but the default @@ -1213,7 +1213,7 @@ export function VideoGrid({ // eslint-disable-next-line @typescript-eslint/ban-ts-comment // @ts-ignore event, - }: Parameters>[0] + }: Parameters>[0], ): void => { event.preventDefault(); @@ -1243,7 +1243,7 @@ export function VideoGrid({ const pipGap = getPipGap( gridBounds.width / gridBounds.height, - gridBounds.width + gridBounds.width, ); const pipMinX = remotePosition.x + pipGap; const pipMinY = remotePosition.y + pipGap; @@ -1270,7 +1270,7 @@ export function VideoGrid({ const hoverTile = tiles.find( (tile) => tile.key !== tileId && - isInside(cursorPosition, tilePositions[tile.order]) + isInside(cursorPosition, tilePositions[tile.order]), ); if (hoverTile) { @@ -1331,7 +1331,7 @@ export function VideoGrid({ e: | Omit, "event"> | Omit, "event">, - isWheel: boolean + isWheel: boolean, ) => { if (layout !== "spotlight") { return; @@ -1355,10 +1355,10 @@ export function VideoGrid({ } setScrollPosition((scrollPosition) => - Math.min(Math.max(movement + scrollPosition, min), 0) + Math.min(Math.max(movement + scrollPosition, min), 0), ); }, - [layout, gridBounds, tilePositions] + [layout, gridBounds, tilePositions], ); const bindGrid = useGesture( @@ -1370,7 +1370,7 @@ export function VideoGrid({ // @ts-ignore onDrag: (e) => onGridGesture(e, false), }, - {} + {}, ); return ( diff --git a/src/video-grid/VideoTile.module.css b/src/video-grid/VideoTile.module.css index 3b0238d8..cfd699c6 100644 --- a/src/video-grid/VideoTile.module.css +++ b/src/video-grid/VideoTile.module.css @@ -24,7 +24,9 @@ limitations under the License. overflow: hidden; cursor: pointer; outline: 2px solid rgba(0, 0, 0, 0); - transition: outline-radius ease 0.15s, outline-color ease 0.15s; + transition: + outline-radius ease 0.15s, + outline-color ease 0.15s; } .videoTile * { diff --git a/src/video-grid/VideoTile.tsx b/src/video-grid/VideoTile.tsx index 01101b0e..6192baab 100644 --- a/src/video-grid/VideoTile.tsx +++ b/src/video-grid/VideoTile.tsx @@ -84,7 +84,7 @@ export const VideoTile = forwardRef( showSpeakingIndicator, showConnectionStats, }, - tileRef + tileRef, ) => { const { t } = useTranslation(); @@ -93,7 +93,7 @@ export const VideoTile = forwardRef( // Handle display name changes. const [displayName, setDisplayName] = useReactiveState( () => member?.rawDisplayName ?? "[👻]", - [member] + [member], ); useEffect(() => { if (member) { @@ -113,7 +113,7 @@ export const VideoTile = forwardRef( content === TileContent.UserMedia ? Track.Source.Microphone : Track.Source.ScreenShareAudio, - sfuParticipant + sfuParticipant, ).isMuted !== false; const MicIcon = muted ? MicOffSolidIcon : MicOnSolidIcon; @@ -126,11 +126,11 @@ export const VideoTile = forwardRef( useState(false); const openVideoTileSettingsModal = useCallback( () => setVideoTileSettingsModalOpen(true), - [setVideoTileSettingsModalOpen] + [setVideoTileSettingsModalOpen], ); const closeVideoTileSettingsModal = useCallback( () => setVideoTileSettingsModalOpen(false), - [setVideoTileSettingsModalOpen] + [setVideoTileSettingsModalOpen], ); const toolbarButtons: JSX.Element[] = []; @@ -141,7 +141,7 @@ export const VideoTile = forwardRef( className={styles.button} volume={(sfuParticipant as RemoteParticipant).getVolume() ?? 0} onPress={openVideoTileSettingsModal} - /> + />, ); if (content === TileContent.ScreenShare) { @@ -151,7 +151,7 @@ export const VideoTile = forwardRef( className={styles.button} fullscreen={fullscreen} onPress={onFullscreen} - /> + />, ); } } @@ -228,5 +228,5 @@ export const VideoTile = forwardRef( )} ); - } + }, ); diff --git a/src/video-grid/VideoTileSettingsModal.tsx b/src/video-grid/VideoTileSettingsModal.tsx index d3abaea6..2d69b220 100644 --- a/src/video-grid/VideoTileSettingsModal.tsx +++ b/src/video-grid/VideoTileSettingsModal.tsx @@ -39,7 +39,7 @@ const LocalVolume: FC = ({ : Track.Source.ScreenShareAudio; const [localVolume, setLocalVolume] = useState( - participant.getVolume(source) ?? 0 + participant.getVolume(source) ?? 0, ); const onLocalVolumeChanged = (event: ChangeEvent): void => { diff --git a/src/widget.ts b/src/widget.ts index 62576755..e0a0d340 100644 --- a/src/widget.ts +++ b/src/widget.ts @@ -155,7 +155,7 @@ export const widget = ((): WidgetHelpers | null => { timelineSupport: true, useE2eForGroupCall: e2eEnabled, fallbackICEServerAllowed: allowIceFallback, - } + }, ); const clientPromise = new Promise((resolve) => { diff --git a/test/Toast-test.tsx b/test/Toast-test.tsx index 605feaea..88cfbf4b 100644 --- a/test/Toast-test.tsx +++ b/test/Toast-test.tsx @@ -23,13 +23,13 @@ test("Toast renders", () => { render( {}}> Hello world! - + , ); expect(screen.queryByRole("dialog")).toBe(null); render( {}}> Hello world! - + , ); expect(screen.getByRole("dialog")).toMatchSnapshot(); }); @@ -39,7 +39,7 @@ test("Toast dismisses when clicked", async () => { render( Hello world! - + , ); await userEvent.click(screen.getByRole("dialog")); expect(onDismiss).toHaveBeenCalled(); @@ -51,7 +51,7 @@ test("Toast dismisses itself after the specified timeout", async () => { render( Hello world! - + , ); jest.advanceTimersByTime(2000); expect(onDismiss).toHaveBeenCalled(); diff --git a/test/UrlParams-test.ts b/test/UrlParams-test.ts index 8580868e..e0eb7c29 100644 --- a/test/UrlParams-test.ts +++ b/test/UrlParams-test.ts @@ -34,28 +34,28 @@ describe("UrlParams", () => { describe("handles URL with /room/", () => { it("and nothing else", () => { expect( - getRoomIdentifierFromUrl(`/room/${ROOM_NAME}`, "", "").roomAlias + getRoomIdentifierFromUrl(`/room/${ROOM_NAME}`, "", "").roomAlias, ).toBe(`#${ROOM_NAME}:${HOMESERVER}`); }); it("and #", () => { expect( getRoomIdentifierFromUrl("", `${ORIGIN}/room/`, `#${ROOM_NAME}`) - .roomAlias + .roomAlias, ).toBe(`#${ROOM_NAME}:${HOMESERVER}`); }); it("and # and server part", () => { expect( getRoomIdentifierFromUrl("", `/room/`, `#${ROOM_NAME}:${HOMESERVER}`) - .roomAlias + .roomAlias, ).toBe(`#${ROOM_NAME}:${HOMESERVER}`); }); it("and server part", () => { expect( getRoomIdentifierFromUrl(`/room/${ROOM_NAME}:${HOMESERVER}`, "", "") - .roomAlias + .roomAlias, ).toBe(`#${ROOM_NAME}:${HOMESERVER}`); }); }); @@ -63,27 +63,27 @@ describe("UrlParams", () => { describe("handles URL without /room/", () => { it("and nothing else", () => { expect(getRoomIdentifierFromUrl(`/${ROOM_NAME}`, "", "").roomAlias).toBe( - `#${ROOM_NAME}:${HOMESERVER}` + `#${ROOM_NAME}:${HOMESERVER}`, ); }); it("and with #", () => { expect(getRoomIdentifierFromUrl("", "", `#${ROOM_NAME}`).roomAlias).toBe( - `#${ROOM_NAME}:${HOMESERVER}` + `#${ROOM_NAME}:${HOMESERVER}`, ); }); it("and with # and server part", () => { expect( getRoomIdentifierFromUrl("", "", `#${ROOM_NAME}:${HOMESERVER}`) - .roomAlias + .roomAlias, ).toBe(`#${ROOM_NAME}:${HOMESERVER}`); }); it("and with server part", () => { expect( getRoomIdentifierFromUrl(`/${ROOM_NAME}:${HOMESERVER}`, "", "") - .roomAlias + .roomAlias, ).toBe(`#${ROOM_NAME}:${HOMESERVER}`); }); }); @@ -91,7 +91,7 @@ describe("UrlParams", () => { describe("handles search params", () => { it("(roomId)", () => { expect( - getRoomIdentifierFromUrl("", `?roomId=${ROOM_ID}`, "").roomId + getRoomIdentifierFromUrl("", `?roomId=${ROOM_ID}`, "").roomId, ).toBe(ROOM_ID); }); }); @@ -99,7 +99,7 @@ describe("UrlParams", () => { it("ignores room alias", () => { expect( getRoomIdentifierFromUrl("", `/room/${ROOM_NAME}:${HOMESERVER}`, "") - .roomAlias + .roomAlias, ).toBeFalsy(); }); }); diff --git a/test/home/CallList-test.tsx b/test/home/CallList-test.tsx index b2a1e5ec..3920be89 100644 --- a/test/home/CallList-test.tsx +++ b/test/home/CallList-test.tsx @@ -28,7 +28,7 @@ describe("CallList", () => { - + , ); }; diff --git a/test/initializer-test.ts b/test/initializer-test.ts index b31f6a87..33cb6854 100644 --- a/test/initializer-test.ts +++ b/test/initializer-test.ts @@ -20,7 +20,9 @@ test("initBeforeReact sets font family from URL param", () => { window.location.hash = "#?font=DejaVu Sans"; Initializer.initBeforeReact(); expect( - getComputedStyle(document.documentElement).getPropertyValue("--font-family") + getComputedStyle(document.documentElement).getPropertyValue( + "--font-family", + ), ).toBe('"DejaVu Sans"'); }); @@ -28,6 +30,6 @@ test("initBeforeReact sets font scale from URL param", () => { window.location.hash = "#?fontScale=1.2"; Initializer.initBeforeReact(); expect( - getComputedStyle(document.documentElement).getPropertyValue("--font-scale") + getComputedStyle(document.documentElement).getPropertyValue("--font-scale"), ).toBe("1.2"); }); diff --git a/test/otel/ObjectFlattener-test.ts b/test/otel/ObjectFlattener-test.ts index bbaf1146..bee81a6e 100644 --- a/test/otel/ObjectFlattener-test.ts +++ b/test/otel/ObjectFlattener-test.ts @@ -120,7 +120,7 @@ describe("ObjectFlattener", () => { statsReport.report.resolution, flatObject, "matrix.call.stats.connection.resolution.", - 0 + 0, ); expect(flatObject).toEqual({ "matrix.call.stats.connection.resolution.local.LOCAL_AUDIO_TRACK_ID.height": @@ -146,7 +146,7 @@ describe("ObjectFlattener", () => { statsReport.report.transport, flatObject, "matrix.call.stats.connection.transport.", - 0 + 0, ); expect(flatObject).toEqual({ "matrix.call.stats.connection.transport.0.ip": @@ -177,8 +177,8 @@ describe("ObjectFlattener", () => { expect( ObjectFlattener.flattenReportObject( "matrix.call.stats.connection", - statsReport.report - ) + statsReport.report, + ), ).toEqual({ "matrix.call.stats.connection.callId": "callId", "matrix.call.stats.connection.opponentMemberId": "opponentMemberId", @@ -259,8 +259,8 @@ describe("ObjectFlattener", () => { expect( ObjectFlattener.flattenReportObject( "matrix.call.stats.bytesSend", - byteSentStatsReport - ) + byteSentStatsReport, + ), ).toEqual({ "matrix.call.stats.bytesSend.4aa92608-04c6-428e-8312-93e17602a959": 132093, "matrix.call.stats.bytesSend.a08e4237-ee30-4015-a932-b676aec894b1": 913448, diff --git a/test/room/checkForParallelCalls-test.ts b/test/room/checkForParallelCalls-test.ts index 0a1344df..49f5753d 100644 --- a/test/room/checkForParallelCalls-test.ts +++ b/test/room/checkForParallelCalls-test.ts @@ -21,7 +21,7 @@ import { checkForParallelCalls } from "../../src/room/checkForParallelCalls"; import { withFakeTimers } from "../utils"; const withMockedPosthog = ( - continuation: (posthog: Mocked) => void + continuation: (posthog: Mocked) => void, ) => { const posthog = mocked({ trackEvent: jest.fn(), @@ -37,7 +37,7 @@ const withMockedPosthog = ( }; const mockRoomState = ( - groupCallMemberContents: Record[] + groupCallMemberContents: Record[], ): RoomState => { const stateEvents = groupCallMemberContents.map((content) => ({ getContent: () => content, diff --git a/test/video-grid/BigGrid-test.ts b/test/video-grid/BigGrid-test.ts index 7bc20a95..06e73dac 100644 --- a/test/video-grid/BigGrid-test.ts +++ b/test/video-grid/BigGrid-test.ts @@ -81,7 +81,7 @@ testFillGaps( ` `, ` -` +`, ); testFillGaps( @@ -93,7 +93,7 @@ ef`, ` ab cd -ef` +ef`, ); testFillGaps( @@ -104,7 +104,7 @@ cde f`, ` cab -fde` +fde`, ); testFillGaps( @@ -117,7 +117,7 @@ mno`, ` aebch difgl -mjnok` +mjnok`, ); testFillGaps( @@ -130,7 +130,7 @@ ijkl`, ` abcd ehkf -glji` +glji`, ); testFillGaps( @@ -141,7 +141,7 @@ aa bc`, ` aa -cb` +cb`, ); testFillGaps( @@ -156,7 +156,7 @@ k`, abce dddf dddj -kghi` +kghi`, ); testFillGaps( @@ -169,7 +169,7 @@ i`, ` afbc dddd -iegh` +iegh`, ); testFillGaps( @@ -183,7 +183,7 @@ ii`, ` abcd iigh -iief` +iief`, ); testFillGaps( @@ -198,7 +198,7 @@ hh ` abcd hhfg -hhie` +hhie`, ); testFillGaps( @@ -213,14 +213,14 @@ ghij`, aadf aaji bcch -eccg` +eccg`, ); function testCycleTileSize( title: string, tileId: string, input: string, - output: string + output: string, ): void { test(`cycleTileSize ${title}`, () => { const grid = mkGrid(input); @@ -240,7 +240,7 @@ ghi`, acc dcc gbe -ifh` +ifh`, ); testCycleTileSize( @@ -253,7 +253,7 @@ efgh`, acdh bggg fggg -e` +e`, ); testCycleTileSize( @@ -267,7 +267,7 @@ jk`, ` abhc djge -fik` +fik`, ); testCycleTileSize( @@ -287,7 +287,7 @@ dde ddf ccm cch -lik` +lik`, ); testCycleTileSize( @@ -302,7 +302,7 @@ ddf`, abb cbb dde -ddf` +ddf`, ); test("cycleTileSize is its own inverse", () => { @@ -337,18 +337,18 @@ function testAddItems( title: string, items: TileDescriptor[], input: string, - output: string + output: string, ): void { test(`addItems ${title}`, () => { expect(showGrid(addItems(items, mkGrid(input) as SparseGrid) as Grid)).toBe( - output + output, ); }); } testAddItems( "appends 1×1 tiles", - ["e", "f"].map((i) => ({ id: i } as unknown as TileDescriptor)), + ["e", "f"].map((i) => ({ id: i }) as unknown as TileDescriptor), ` aab aac @@ -356,7 +356,7 @@ d`, ` aab aac -def` +def`, ); testAddItems( @@ -368,7 +368,7 @@ def`, ` abc g -def` +def`, ); testAddItems( @@ -381,7 +381,7 @@ def`, abc ggf gge -d` +d`, ); function testMoveTile( @@ -389,7 +389,7 @@ function testMoveTile( from: number, to: number, input: string, - output: string + output: string, ): void { test(`moveTile ${title}`, () => { expect(showGrid(moveTile(mkGrid(input), from, to))).toBe(output); @@ -403,7 +403,7 @@ testMoveTile( ` abc`, ` -abc` +abc`, ); testMoveTile( @@ -413,7 +413,7 @@ testMoveTile( ` abc`, ` -abc` +abc`, ); testMoveTile( @@ -427,7 +427,7 @@ cce`, ` acc bcc -d e` +d e`, ); testMoveTile( @@ -441,14 +441,14 @@ cce`, ` abb ccd -cce` +cce`, ); function testResize( title: string, columns: number, input: string, - output: string + output: string, ): void { test(`resize ${title}`, () => { expect(showGrid(resize(mkGrid(input), columns))).toBe(output); @@ -471,7 +471,7 @@ bb dd dd ch -eg` +eg`, ); testResize( @@ -489,5 +489,5 @@ eg`, afcd bbbg bbbe -h` +h`, ); diff --git a/vite.config.js b/vite.config.js index 634d34b4..46a00d72 100644 --- a/vite.config.js +++ b/vite.config.js @@ -52,7 +52,7 @@ export default defineConfig(({ mode }) => { sentryVitePlugin({ include: "./dist", release: process.env.VITE_APP_VERSION, - }) + }), ); } From bc109a417d2f6f12ab59abbf82afaa802b8fb2c1 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 11 Oct 2023 14:45:49 +0000 Subject: [PATCH 16/48] Update dependency postcss-preset-env to v9.2.0 --- yarn.lock | 298 ++++++++++++++++++++++++++---------------------------- 1 file changed, 144 insertions(+), 154 deletions(-) diff --git a/yarn.lock b/yarn.lock index 167628da..abeca2a9 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1116,7 +1116,7 @@ resolved "https://registry.yarnpkg.com/@bufbuild/protobuf/-/protobuf-1.3.1.tgz#c4de66bacbe7ac97fe054e68314aeba6f45177f9" integrity sha512-BUyJWutgP2S8K/1NphOJokuwDckXS4qI2T1pGZAlkFdZchWae3jm6fCdkcGbLlM1QLOcNFFePd+7Feo4BYGrJQ== -"@csstools/cascade-layer-name-parser@^1.0.4", "@csstools/cascade-layer-name-parser@^1.0.5": +"@csstools/cascade-layer-name-parser@^1.0.5": version "1.0.5" resolved "https://registry.yarnpkg.com/@csstools/cascade-layer-name-parser/-/cascade-layer-name-parser-1.0.5.tgz#c4d276e32787651df0007af22c9fa70d9c9ca3c2" integrity sha512-v/5ODKNBMfBl0us/WQjlfsvSlYxfZLhNMVIsuCPib2ulTwGKYbKJbwqw671+qH9Y4wvWVnu7LBChvml/wBKjFg== @@ -1131,25 +1131,25 @@ resolved "https://registry.yarnpkg.com/@csstools/css-calc/-/css-calc-1.1.4.tgz#70bf4c5b379cdc256d3936bf4a21e3a3454a3d68" integrity sha512-ZV1TSmToiNcQL1P3hfzlzZzA02mmVkVmXGaUDUqpYUG84PmLhVSZpKX+KfxAuOcK7de04UXSQPBrAvaya6iiGg== -"@csstools/css-color-parser@^1.3.2": - version "1.3.2" - resolved "https://registry.yarnpkg.com/@csstools/css-color-parser/-/css-color-parser-1.3.2.tgz#ec6ac35e24a34e1f37eb3d366a2ea637bcc7c7e5" - integrity sha512-YLCWI+nm18qr5nj7QhRMGuIi4ddFe0SKEtPQliLf1+pmyHFxoHYd0+Hg+bRnbnVbdyCTTlCqBiUvCeNJfd903g== +"@csstools/css-color-parser@^1.4.0": + version "1.4.0" + resolved "https://registry.yarnpkg.com/@csstools/css-color-parser/-/css-color-parser-1.4.0.tgz#c8517457dcb6ad080848b1583aa029ab61221ce8" + integrity sha512-SlGd8E6ron24JYQPQAIzu5tvmWi1H4sDKTdA7UDnwF45oJv7AVESbOlOO1YjfBhrQFuvLWUgKiOY9DwGoAxwTA== dependencies: "@csstools/color-helpers" "^3.0.2" "@csstools/css-calc" "^1.1.4" -"@csstools/css-parser-algorithms@^2.3.1", "@csstools/css-parser-algorithms@^2.3.2": +"@csstools/css-parser-algorithms@2.3.2", "@csstools/css-parser-algorithms@^2.3.2": version "2.3.2" resolved "https://registry.yarnpkg.com/@csstools/css-parser-algorithms/-/css-parser-algorithms-2.3.2.tgz#1e0d581dbf4518cb3e939c3b863cb7180c8cedad" integrity sha512-sLYGdAdEY2x7TSw9FtmdaTrh2wFtRJO5VMbBrA8tEqEod7GEggFmxTSK9XqExib3yMuYNcvcTdCZIP6ukdjAIA== -"@csstools/css-tokenizer@^2.2.0", "@csstools/css-tokenizer@^2.2.1": +"@csstools/css-tokenizer@^2.2.1": version "2.2.1" resolved "https://registry.yarnpkg.com/@csstools/css-tokenizer/-/css-tokenizer-2.2.1.tgz#9dc431c9a5f61087af626e41ac2a79cce7bb253d" integrity sha512-Zmsf2f/CaEPWEVgw29odOj+WEVoiJy9s9NOv5GgNY9mZ1CZ7394By6wONrONrTsnNDv6F9hR02nvFihrGVGHBg== -"@csstools/media-query-list-parser@^2.1.4", "@csstools/media-query-list-parser@^2.1.5": +"@csstools/media-query-list-parser@^2.1.5": version "2.1.5" resolved "https://registry.yarnpkg.com/@csstools/media-query-list-parser/-/media-query-list-parser-2.1.5.tgz#94bc8b3c3fd7112a40b7bf0b483e91eba0654a0f" integrity sha512-IxVBdYzR8pYe89JiyXQuYk4aVVoCPhMJkz6ElRwlVysjwURTsTk/bmY/z4FfeRE+CRBMlykPwXEVUg8lThv7AQ== @@ -1162,27 +1162,27 @@ "@csstools/selector-specificity" "^3.0.0" postcss-selector-parser "^6.0.13" -"@csstools/postcss-color-function@^3.0.4": - version "3.0.5" - resolved "https://registry.yarnpkg.com/@csstools/postcss-color-function/-/postcss-color-function-3.0.5.tgz#4f50b7e71869fcd4499d4235e23127b579da73b1" - integrity sha512-q9E7oJwf1Z8nJqQbob9DmFxrte3RQc+pwV+5WlWw6Ei9XaObaNJlPAQ1HfOpcEg/fxrRf/Yf6fgO8Q01r7u17A== +"@csstools/postcss-color-function@^3.0.7": + version "3.0.7" + resolved "https://registry.yarnpkg.com/@csstools/postcss-color-function/-/postcss-color-function-3.0.7.tgz#646b0c3e3805e4bb9c1e240bce807f1cc6ccdfea" + integrity sha512-/PIB20G1TPCXmQlaJLWIYzTZRZpj6csT4ijgnshIj/kcmniIRroAfDa0xSWnfuO1eNo0NptIaPU7jzUukWn55Q== dependencies: - "@csstools/css-color-parser" "^1.3.2" + "@csstools/css-color-parser" "^1.4.0" "@csstools/css-parser-algorithms" "^2.3.2" "@csstools/css-tokenizer" "^2.2.1" - "@csstools/postcss-progressive-custom-properties" "^3.0.1" + "@csstools/postcss-progressive-custom-properties" "^3.0.2" -"@csstools/postcss-color-mix-function@^2.0.4": - version "2.0.5" - resolved "https://registry.yarnpkg.com/@csstools/postcss-color-mix-function/-/postcss-color-mix-function-2.0.5.tgz#589fea3346fc985cdfa49a1fdc12c28125def985" - integrity sha512-0MDBTG0FPDjNlAYMImNjnQ9lrldiFRCmsBx4dZB1ikbFwt6aYJRWDjgXoZY+1CmQ6m1qPeBJO762i6AKwQDlQQ== +"@csstools/postcss-color-mix-function@^2.0.7": + version "2.0.7" + resolved "https://registry.yarnpkg.com/@csstools/postcss-color-mix-function/-/postcss-color-mix-function-2.0.7.tgz#0fc9b638bd6b9578a52a50e3af66109ae52dc2b6" + integrity sha512-57/g8aGo5eKFjEeJMiRKh8Qq43K2rCyk5ZZTvJ34TNl4zUtYU5DvLkIkOnhCtL8/a4z9oMA42aOnFPddRrScUQ== dependencies: - "@csstools/css-color-parser" "^1.3.2" + "@csstools/css-color-parser" "^1.4.0" "@csstools/css-parser-algorithms" "^2.3.2" "@csstools/css-tokenizer" "^2.2.1" - "@csstools/postcss-progressive-custom-properties" "^3.0.1" + "@csstools/postcss-progressive-custom-properties" "^3.0.2" -"@csstools/postcss-exponential-functions@^1.0.0": +"@csstools/postcss-exponential-functions@^1.0.1": version "1.0.1" resolved "https://registry.yarnpkg.com/@csstools/postcss-exponential-functions/-/postcss-exponential-functions-1.0.1.tgz#0d938f58ba5ac5c362e09ad22b5768b04ee82650" integrity sha512-ZLK2iSK4DUxeypGce2PnQSdYugUqDTwxnhNiq1o6OyKMNYgYs4eKbvEhFG8JKr1sJWbeqBi5jRr0017l2EWVvg== @@ -1198,31 +1198,40 @@ dependencies: postcss-value-parser "^4.2.0" -"@csstools/postcss-gradients-interpolation-method@^4.0.4": - version "4.0.5" - resolved "https://registry.yarnpkg.com/@csstools/postcss-gradients-interpolation-method/-/postcss-gradients-interpolation-method-4.0.5.tgz#aeb9cb87df28247aeda706ac7d650335e24294b2" - integrity sha512-ABDOADpKrTvNb+cUBj9ciocCgFvE832eENKVuONca1u2bkFL4jM9430XFmi/GOgzt0agg5Q8FFJHXgYyKbgOFQ== +"@csstools/postcss-gamut-mapping@^1.0.0": + version "1.0.0" + resolved "https://registry.yarnpkg.com/@csstools/postcss-gamut-mapping/-/postcss-gamut-mapping-1.0.0.tgz#a23d2c4bd2bd89b2ed3c5d2e062c069ad18745e0" + integrity sha512-6UQyK8l9YaG5Ao5rBDcCnKHrLsHiQ1E0zeFQuqDJqEtinVzAPb/MwSw3TenZXL1Rnd7th3tb+4CBFHBXdW5tbQ== dependencies: - "@csstools/css-color-parser" "^1.3.2" + "@csstools/css-color-parser" "^1.4.0" + "@csstools/css-parser-algorithms" "2.3.2" + "@csstools/css-tokenizer" "^2.2.1" + +"@csstools/postcss-gradients-interpolation-method@^4.0.7": + version "4.0.7" + resolved "https://registry.yarnpkg.com/@csstools/postcss-gradients-interpolation-method/-/postcss-gradients-interpolation-method-4.0.7.tgz#e5c2628157fb9dea9aa8cd9c84fdcc2a842af91b" + integrity sha512-GT1CzE/Tyr/ei4j5BwKESkHAgg+Gzys/0mAY7W+UiR+XrcYk5hDbOrE/YJIx1rflfO/7La1bDoZtA0YnLl4qNA== + dependencies: + "@csstools/css-color-parser" "^1.4.0" "@csstools/css-parser-algorithms" "^2.3.2" "@csstools/css-tokenizer" "^2.2.1" - "@csstools/postcss-progressive-custom-properties" "^3.0.1" + "@csstools/postcss-progressive-custom-properties" "^3.0.2" -"@csstools/postcss-hwb-function@^3.0.3": - version "3.0.4" - resolved "https://registry.yarnpkg.com/@csstools/postcss-hwb-function/-/postcss-hwb-function-3.0.4.tgz#431d2fe3af0956a5f0f52b71126a872e04bb39df" - integrity sha512-HxyOVYowL0wsz7BjlAyGu3ydPGliXHgVnXP4pOWFktkAaBvjks8S51NqMbR6AkBQHB9W4nt9KW2qB6Qt2PJ80A== +"@csstools/postcss-hwb-function@^3.0.6": + version "3.0.6" + resolved "https://registry.yarnpkg.com/@csstools/postcss-hwb-function/-/postcss-hwb-function-3.0.6.tgz#7d56583c6c8607352718a802f87e51edf4f9365e" + integrity sha512-uQgWt2Ho2yy2S6qthWY7mD5v57NKxi6dD1NB8nAybU5bJSsm+hLXRGm3/zbOH4xNrqO3Cl60DFSNlSrUME3Xjg== dependencies: - "@csstools/css-color-parser" "^1.3.2" + "@csstools/css-color-parser" "^1.4.0" "@csstools/css-parser-algorithms" "^2.3.2" "@csstools/css-tokenizer" "^2.2.1" -"@csstools/postcss-ic-unit@^3.0.1": - version "3.0.1" - resolved "https://registry.yarnpkg.com/@csstools/postcss-ic-unit/-/postcss-ic-unit-3.0.1.tgz#9d4964fe9da11f51463e0a141b3184ee3a23acb8" - integrity sha512-OkKZV0XZQixChA6r68O9UfGNFv06cPVcuT+MjpzfEuoCfbNWCj+b0dhsmdz776giQ+DymPmFDlTD+QJEFPI7rw== +"@csstools/postcss-ic-unit@^3.0.2": + version "3.0.2" + resolved "https://registry.yarnpkg.com/@csstools/postcss-ic-unit/-/postcss-ic-unit-3.0.2.tgz#08b62de51a3636ba40ba8e77cef4619a6e636aac" + integrity sha512-n28Er7W9qc48zNjJnvTKuVHY26/+6YlA9WzJRksIHiAWOMxSH5IksXkw7FpkIOd+jLi59BMrX/BWrZMgjkLBHg== dependencies: - "@csstools/postcss-progressive-custom-properties" "^3.0.1" + "@csstools/postcss-progressive-custom-properties" "^3.0.2" postcss-value-parser "^4.2.0" "@csstools/postcss-initial@^1.0.0": @@ -1230,10 +1239,10 @@ resolved "https://registry.yarnpkg.com/@csstools/postcss-initial/-/postcss-initial-1.0.0.tgz#e35ec12143a654b384fb81623970deeacedb0769" integrity sha512-1l7iHHjIl5qmVeGItugr4ZOlCREDP71mNKqoEyxlosIoiu3Os1nPWMHpuCvDLCLiWI/ONTOg3nzJh7gwHOrqUA== -"@csstools/postcss-is-pseudo-class@^4.0.2": - version "4.0.2" - resolved "https://registry.yarnpkg.com/@csstools/postcss-is-pseudo-class/-/postcss-is-pseudo-class-4.0.2.tgz#c896e25baf0a5249eb5c5e8cce78dfc0cc11380e" - integrity sha512-LeAJozyZTY3c1SaHMbwF4p8Ego/2HHprYusmmdmUH7wP6lRF1w3s7IO2iNwQ6fHBrSOfkPUFaUtRUGZLBE23Eg== +"@csstools/postcss-is-pseudo-class@^4.0.3": + version "4.0.3" + resolved "https://registry.yarnpkg.com/@csstools/postcss-is-pseudo-class/-/postcss-is-pseudo-class-4.0.3.tgz#d8b04ff5eefb1a9bc8f1ab99b8f3b6b04b704480" + integrity sha512-/dt5M9Ty/x3Yiq0Nm/5PJJzwkVFchJgdjKVnryBPtoMCb9ohb/nDIJOwr/Wr3hK3FDs1EA1GE6PyRYsUmQPS8Q== dependencies: "@csstools/selector-specificity" "^3.0.0" postcss-selector-parser "^6.0.13" @@ -1250,14 +1259,14 @@ dependencies: postcss-value-parser "^4.2.0" -"@csstools/postcss-logical-viewport-units@^2.0.2": +"@csstools/postcss-logical-viewport-units@^2.0.3": version "2.0.3" resolved "https://registry.yarnpkg.com/@csstools/postcss-logical-viewport-units/-/postcss-logical-viewport-units-2.0.3.tgz#95e7195660bb8b05cd46f13d0495fe427e2db988" integrity sha512-xeVxqND5rlQyqLGdH7rX34sIm/JbbQKxpKQP8oD1YQqUHHCLQR9NUS57WqJKajxKN6AcNAMWJhb5LUH5RfPcyA== dependencies: "@csstools/css-tokenizer" "^2.2.1" -"@csstools/postcss-media-minmax@^1.0.7": +"@csstools/postcss-media-minmax@^1.1.0": version "1.1.0" resolved "https://registry.yarnpkg.com/@csstools/postcss-media-minmax/-/postcss-media-minmax-1.1.0.tgz#8d46317b6686cd49e05870ae3c8993e49a54149c" integrity sha512-t5Li/DPC5QmW/6VFLfUvsw/4dNYYseWR0tOXDeJg/9EKUodBgNawz5tuk5vYKtNvoj+Q08odMuXcpS5YJj0AFA== @@ -1267,7 +1276,7 @@ "@csstools/css-tokenizer" "^2.2.1" "@csstools/media-query-list-parser" "^2.1.5" -"@csstools/postcss-media-queries-aspect-ratio-number-values@^2.0.2": +"@csstools/postcss-media-queries-aspect-ratio-number-values@^2.0.3": version "2.0.3" resolved "https://registry.yarnpkg.com/@csstools/postcss-media-queries-aspect-ratio-number-values/-/postcss-media-queries-aspect-ratio-number-values-2.0.3.tgz#a74355c828a13ede8e8390bcf2701a34a60696b3" integrity sha512-IPL8AvnwMYW+cWtp+j8cW3MFN0RyXNT4hLOvs6Rf2N+NcbvXhSyKxZuE3W9Cv4KjaNoNoGx1d0UhT6tktq6tUw== @@ -1290,32 +1299,32 @@ dependencies: postcss-value-parser "^4.2.0" -"@csstools/postcss-oklab-function@^3.0.4": - version "3.0.5" - resolved "https://registry.yarnpkg.com/@csstools/postcss-oklab-function/-/postcss-oklab-function-3.0.5.tgz#8a299198a2c3b6698677b1b9b19cde4f85b95e0e" - integrity sha512-tFjYaBbAvoks5yvE9uA3b3xsqVKkZJ2sXwPMw1bxlv2ydrmdiojuoRAskRfvMbZQkzp47DzBP1V9GhDLOyFVYA== +"@csstools/postcss-oklab-function@^3.0.7": + version "3.0.7" + resolved "https://registry.yarnpkg.com/@csstools/postcss-oklab-function/-/postcss-oklab-function-3.0.7.tgz#4daff9e85b7f68ea744f2898f73e81d6fe47c0d7" + integrity sha512-vBFTQD3CARB3u/XIGO44wWbcO7xG/4GsYqJlcPuUGRSK8mtxes6n4vvNFlIByyAZy2k4d4RY63nyvTbMpeNTaQ== dependencies: - "@csstools/css-color-parser" "^1.3.2" + "@csstools/css-color-parser" "^1.4.0" "@csstools/css-parser-algorithms" "^2.3.2" "@csstools/css-tokenizer" "^2.2.1" - "@csstools/postcss-progressive-custom-properties" "^3.0.1" + "@csstools/postcss-progressive-custom-properties" "^3.0.2" -"@csstools/postcss-progressive-custom-properties@^3.0.1": - version "3.0.1" - resolved "https://registry.yarnpkg.com/@csstools/postcss-progressive-custom-properties/-/postcss-progressive-custom-properties-3.0.1.tgz#15251d880d60850df42deeb7702aab6c50ab74e7" - integrity sha512-yfdEk8o3CWPTusoInmGpOVCcMg1FikcKZyYB5ApULg9mES4FTGNuHK3MESscmm64yladcLNkPlz26O7tk3LMbA== +"@csstools/postcss-progressive-custom-properties@^3.0.2": + version "3.0.2" + resolved "https://registry.yarnpkg.com/@csstools/postcss-progressive-custom-properties/-/postcss-progressive-custom-properties-3.0.2.tgz#0c18152160a425950cb69a12a9add55af4f688e7" + integrity sha512-YEvTozk1SxnV/PGL5DllBVDuLQ+jiQhyCSQiZJ6CwBMU5JQ9hFde3i1qqzZHuclZfptjrU0JjlX4ePsOhxNzHw== dependencies: postcss-value-parser "^4.2.0" -"@csstools/postcss-relative-color-syntax@^2.0.4": - version "2.0.5" - resolved "https://registry.yarnpkg.com/@csstools/postcss-relative-color-syntax/-/postcss-relative-color-syntax-2.0.5.tgz#6ab9f87e6a748ac66e7e6adea179486222c685d5" - integrity sha512-wK8IX6X2+kLKxTTTq5yd7mH2U+GPcTMTpP2rM8ig0/rgxuid7vgTOxup6heZUk1IUA409eak3bYGOtDDYCpxbQ== +"@csstools/postcss-relative-color-syntax@^2.0.7": + version "2.0.7" + resolved "https://registry.yarnpkg.com/@csstools/postcss-relative-color-syntax/-/postcss-relative-color-syntax-2.0.7.tgz#1d017aa25e3cda513cf00401a91899e9d3b83659" + integrity sha512-2AiFbJSVF4EyymLxme4JzSrbXykHolx8DdZECHjYKMhoulhKLltx5ccYgtrK3BmXGd3v3nJrWFCc8JM8bjuiOg== dependencies: - "@csstools/css-color-parser" "^1.3.2" + "@csstools/css-color-parser" "^1.4.0" "@csstools/css-parser-algorithms" "^2.3.2" "@csstools/css-tokenizer" "^2.2.1" - "@csstools/postcss-progressive-custom-properties" "^3.0.1" + "@csstools/postcss-progressive-custom-properties" "^3.0.2" "@csstools/postcss-scope-pseudo-class@^3.0.0": version "3.0.0" @@ -1324,7 +1333,7 @@ dependencies: postcss-selector-parser "^6.0.13" -"@csstools/postcss-stepped-value-functions@^3.0.1": +"@csstools/postcss-stepped-value-functions@^3.0.2": version "3.0.2" resolved "https://registry.yarnpkg.com/@csstools/postcss-stepped-value-functions/-/postcss-stepped-value-functions-3.0.2.tgz#a902395efbf9c5c30a6d902a7c65549fb3f49309" integrity sha512-I3wX44MZVv+tDuWfrd3BTvRB/YRIM2F5v1MBtTI89sxpFn47mNpTwpPYUOGPVCgKlRDfZSlxIUYhUQmqRQZZFQ== @@ -1341,7 +1350,7 @@ "@csstools/color-helpers" "^3.0.2" postcss-value-parser "^4.2.0" -"@csstools/postcss-trigonometric-functions@^3.0.1": +"@csstools/postcss-trigonometric-functions@^3.0.2": version "3.0.2" resolved "https://registry.yarnpkg.com/@csstools/postcss-trigonometric-functions/-/postcss-trigonometric-functions-3.0.2.tgz#b03d045015fc6e16d81e36e5783c545b5590a2f2" integrity sha512-AwzNhF4QOKaLOKvMljwwFkeYXwufhRO15G+kKohHkyoNOL75xWkN+W2Y9ik9tSeAyDv+cYNlYaF+o/a79WjVjg== @@ -4072,7 +4081,7 @@ asynckit@^0.4.0: resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" integrity sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q== -autoprefixer@^10.4.15: +autoprefixer@^10.4.16: version "10.4.16" resolved "https://registry.yarnpkg.com/autoprefixer/-/autoprefixer-10.4.16.tgz#fad1411024d8670880bdece3970aa72e3572feb8" integrity sha512-7vd3UC6xKp0HLfua5IjZlcXvGAGy7cBAXTg2lyQ/8WpNhd6SiZ8Be+xm3FyBSYJx5GKcpRCzBh7RH4/0dnY+uQ== @@ -4280,17 +4289,7 @@ broccoli-plugin@^4.0.7: rimraf "^3.0.2" symlink-or-copy "^1.3.1" -browserslist@^4.21.10: - version "4.21.10" - resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.21.10.tgz#dbbac576628c13d3b2231332cb2ec5a46e015bb0" - integrity sha512-bipEBdZfVH5/pwrvqc+Ub0kUPVfGUhlKxbvfD+z1BDnPEO/X98ruXGA1WP5ASpAFKan7Qr6j736IacbZQuAlKQ== - dependencies: - caniuse-lite "^1.0.30001517" - electron-to-chromium "^1.4.477" - node-releases "^2.0.13" - update-browserslist-db "^1.0.11" - -browserslist@^4.21.9: +browserslist@^4.21.10, browserslist@^4.21.9, browserslist@^4.22.1: version "4.22.1" resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.22.1.tgz#ba91958d1a59b87dab6fed8dfbcb3da5e2e9c619" integrity sha512-FEVc202+2iuClEhZhrWy6ZiAcRLvNMyYcxZ8raemul1DYVOVdFsbqckWLdsixQZCpJlwe77Z3UTalE7jsjnKfQ== @@ -4370,15 +4369,10 @@ camelcase@^6.2.0: resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-6.3.0.tgz#5685b95eb209ac9c0c177467778c9c84df58ba9a" integrity sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA== -caniuse-lite@^1.0.30001517: - version "1.0.30001539" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001539.tgz#325a387ab1ed236df2c12dc6cd43a4fff9903a44" - integrity sha512-hfS5tE8bnNiNvEOEkm8HElUHroYwlqMMENEzELymy77+tJ6m+gA2krtHl5hxJaj71OlpC2cHZbdSMX1/YEqEkA== - caniuse-lite@^1.0.30001538, caniuse-lite@^1.0.30001541: - version "1.0.30001541" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001541.tgz#b1aef0fadd87fb72db4dcb55d220eae17b81cdb1" - integrity sha512-bLOsqxDgTqUBkzxbNlSBt8annkDpQB9NdzdTbO2ooJ+eC/IQcvDspDc058g84ejCelF7vHUx57KIOjEecOHXaw== + version "1.0.30001547" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001547.tgz#d4f92efc488aab3c7f92c738d3977c2a3180472b" + integrity sha512-W7CrtIModMAxobGhz8iXmDfuJiiKg1WADMO/9x7/CLNin5cpSbuBjooyoIUVB5eyCc36QuTVlkVa1iB2S5+/eA== chalk@^2.4.1, chalk@^2.4.2: version "2.4.2" @@ -4734,10 +4728,10 @@ css.escape@^1.5.1: resolved "https://registry.yarnpkg.com/css.escape/-/css.escape-1.5.1.tgz#42e27d4fa04ae32f931a4b4d4191fa9cddee97cb" integrity sha512-YUifsXXuknHlUsmlgyY0PKzgPOr7/FjCePfHNt0jxm83wHZi44VDMQ7/fGNkjY3/jV1MC+1CmZbaHzugyeRtpg== -cssdb@^7.7.2: - version "7.7.2" - resolved "https://registry.yarnpkg.com/cssdb/-/cssdb-7.7.2.tgz#fbebd90edfc6af129fda4fd986f9dd604a209094" - integrity sha512-pQPYP7/kch4QlkTcLuUNiNL2v/E+O+VIdotT+ug62/+2B2/jkzs5fMM6RHCzGCZ9C82pODEMSIzRRUzJOrl78g== +cssdb@^7.8.0: + version "7.8.0" + resolved "https://registry.yarnpkg.com/cssdb/-/cssdb-7.8.0.tgz#ac41fa025371b74eb2ccfe3d41f5c4dbd444fbe3" + integrity sha512-SkeezZOQr5AHt9MgJgSFNyiuJwg1p8AwoVln6JwaQJsyxduRW9QJ+HP/gAQzbsz8SIqINtYvpJKjxTRI67zxLg== cssesc@^3.0.0: version "3.0.0" @@ -5029,15 +5023,10 @@ duplexify@^3.6.0: readable-stream "^2.0.0" stream-shift "^1.0.0" -electron-to-chromium@^1.4.477: - version "1.4.529" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.529.tgz#8c3377a05e5737f899770d14524dd8e2e4cb2351" - integrity sha512-6uyPyXTo8lkv8SWAmjKFbG42U073TXlzD4R8rW3EzuznhFS2olCIAfjjQtV2dV2ar/vRF55KUd3zQYnCB0dd3A== - electron-to-chromium@^1.4.535: - version "1.4.537" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.537.tgz#aac4101db53066be1e49baedd000a26bc754adc9" - integrity sha512-W1+g9qs9hviII0HAwOdehGYkr+zt7KKdmCcJcjH0mYg6oL8+ioT3Skjmt7BLoAQqXhjf40AXd+HlR4oAWMlXjA== + version "1.4.549" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.549.tgz#ab223f5d85c55a9def358db163bc8cacba72df69" + integrity sha512-gpXfJslSi4hYDkA0mTLEpYKRv9siAgSUgZ+UWyk+J5Cttpd1ThCVwdclzIwQSclz3hYn049+M2fgrP1WpvF8xg== email-regex@^5.0.0: version "5.0.0" @@ -7903,12 +7892,12 @@ postcss-clamp@^4.1.0: dependencies: postcss-value-parser "^4.2.0" -postcss-color-functional-notation@^6.0.1: - version "6.0.1" - resolved "https://registry.yarnpkg.com/postcss-color-functional-notation/-/postcss-color-functional-notation-6.0.1.tgz#b67d7c71fa1c82b09c130e02a37f0b6ceacbef63" - integrity sha512-IouVx77fASIjOChWxkvOjYGnYNKq286cSiKFJwWNICV9NP2xZWVOS9WOriR/8uIB2zt/44bzQyw4GteCLpP2SA== +postcss-color-functional-notation@^6.0.2: + version "6.0.2" + resolved "https://registry.yarnpkg.com/postcss-color-functional-notation/-/postcss-color-functional-notation-6.0.2.tgz#5fa38d36cd0e2ea9db7fd6f2f2a1ffb2c0796a8d" + integrity sha512-FsjSmlSufuiFBsIqQ++VxFmvX7zKndZpBkHmfXr4wqhvzM92FTEkAh703iqWTl1U3faTgqioIqCbfqdWiFVwtw== dependencies: - "@csstools/postcss-progressive-custom-properties" "^3.0.1" + "@csstools/postcss-progressive-custom-properties" "^3.0.2" postcss-value-parser "^4.2.0" postcss-color-hex-alpha@^9.0.2: @@ -7925,17 +7914,17 @@ postcss-color-rebeccapurple@^9.0.1: dependencies: postcss-value-parser "^4.2.0" -postcss-custom-media@^10.0.1: - version "10.0.1" - resolved "https://registry.yarnpkg.com/postcss-custom-media/-/postcss-custom-media-10.0.1.tgz#48a4597451a69b1098e6eb11eb1166202171f9ed" - integrity sha512-fil7cosvzlIAYmZJPtNFcTH0Er7a3GveEK4q5Y/L24eWQHmiw8Fv/E5DMkVpdbNjkGzJxrvowOSt/Il9HZ06VQ== +postcss-custom-media@^10.0.2: + version "10.0.2" + resolved "https://registry.yarnpkg.com/postcss-custom-media/-/postcss-custom-media-10.0.2.tgz#70a244bbc59fc953ab6573e4e2c9624639aef08a" + integrity sha512-zcEFNRmDm2fZvTPdI1pIW3W//UruMcLosmMiCdpQnrCsTRzWlKQPYMa1ud9auL0BmrryKK1+JjIGn19K0UjO/w== dependencies: - "@csstools/cascade-layer-name-parser" "^1.0.4" - "@csstools/css-parser-algorithms" "^2.3.1" - "@csstools/css-tokenizer" "^2.2.0" - "@csstools/media-query-list-parser" "^2.1.4" + "@csstools/cascade-layer-name-parser" "^1.0.5" + "@csstools/css-parser-algorithms" "^2.3.2" + "@csstools/css-tokenizer" "^2.2.1" + "@csstools/media-query-list-parser" "^2.1.5" -postcss-custom-properties@^13.3.1: +postcss-custom-properties@^13.3.2: version "13.3.2" resolved "https://registry.yarnpkg.com/postcss-custom-properties/-/postcss-custom-properties-13.3.2.tgz#88952f883003d897ade5c836e1e005b09a12f02b" integrity sha512-2Coszybpo8lpLY24vy2CYv9AasiZ39/bs8Imv0pWMq55Gl8NWzfc24OAo3zIX7rc6uUJAqESnVOMZ6V6lpMjJA== @@ -7945,14 +7934,14 @@ postcss-custom-properties@^13.3.1: "@csstools/css-tokenizer" "^2.2.1" postcss-value-parser "^4.2.0" -postcss-custom-selectors@^7.1.5: - version "7.1.5" - resolved "https://registry.yarnpkg.com/postcss-custom-selectors/-/postcss-custom-selectors-7.1.5.tgz#74e99ef5d7a3f84aaab246ba086975e8279b686e" - integrity sha512-0UYtz7GG10bZrRiUdZ/2Flt+hp5p/WP0T7JgAPZ/Xhgb0wFjW/p7QOjE+M58S9Z3x11P9YaNPcrsoOGewWYkcw== +postcss-custom-selectors@^7.1.6: + version "7.1.6" + resolved "https://registry.yarnpkg.com/postcss-custom-selectors/-/postcss-custom-selectors-7.1.6.tgz#6d28812998dcd48f61a6a538141fc16cf2c42123" + integrity sha512-svsjWRaxqL3vAzv71dV0/65P24/FB8TbPX+lWyyf9SZ7aZm4S4NhCn7N3Bg+Z5sZunG3FS8xQ80LrCU9hb37cw== dependencies: - "@csstools/cascade-layer-name-parser" "^1.0.4" - "@csstools/css-parser-algorithms" "^2.3.1" - "@csstools/css-tokenizer" "^2.2.0" + "@csstools/cascade-layer-name-parser" "^1.0.5" + "@csstools/css-parser-algorithms" "^2.3.2" + "@csstools/css-tokenizer" "^2.2.1" postcss-selector-parser "^6.0.13" postcss-dir-pseudo-class@^8.0.0: @@ -7962,12 +7951,12 @@ postcss-dir-pseudo-class@^8.0.0: dependencies: postcss-selector-parser "^6.0.13" -postcss-double-position-gradients@^5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/postcss-double-position-gradients/-/postcss-double-position-gradients-5.0.1.tgz#5f28489f5b33ce5e1e97bf1ea6b62cd7a5f9c0c2" - integrity sha512-ogcHzfC5q4nfySyZyNF7crvK3/MRDTh+akzE+l7bgJUjVkhgfahBuI+ZAm/5EeaVSVKnCOgqtC6wTyUFgLVLTw== +postcss-double-position-gradients@^5.0.2: + version "5.0.2" + resolved "https://registry.yarnpkg.com/postcss-double-position-gradients/-/postcss-double-position-gradients-5.0.2.tgz#a55ed4d6a395f324aa5535ea8c42c74e8ace2651" + integrity sha512-KTbvdOOy8z8zb0BTkEg4/1vqlRlApdvjw8/pFoehgQl0WVO+fezDGlvo0B8xRA+XccA7ohkQCULKNsiNOx70Cw== dependencies: - "@csstools/postcss-progressive-custom-properties" "^3.0.1" + "@csstools/postcss-progressive-custom-properties" "^3.0.2" postcss-value-parser "^4.2.0" postcss-focus-visible@^9.0.0: @@ -8001,15 +7990,15 @@ postcss-image-set-function@^6.0.1: dependencies: postcss-value-parser "^4.2.0" -postcss-lab-function@^6.0.4: - version "6.0.5" - resolved "https://registry.yarnpkg.com/postcss-lab-function/-/postcss-lab-function-6.0.5.tgz#de6b12fb29b591193d53bccf09eba304952224db" - integrity sha512-v1NG08v7tN9n76rA5j5HQ4sRu/kqXBuOFNAYhfHqbyDQ1WbsGKfPNN9VnJSSI3V0KIlShodYQPf3ORjMSo1w9g== +postcss-lab-function@^6.0.7: + version "6.0.7" + resolved "https://registry.yarnpkg.com/postcss-lab-function/-/postcss-lab-function-6.0.7.tgz#b1dd0ad5a4c993b7695614239754b9be48f3b24b" + integrity sha512-4d1lhDVPukHFqkMv4G5vVcK+tgY52vwb5uR1SWKOaO5389r2q8fMxBWuXSW+YtbCOEGP0/X9KERi9E9le2pJuw== dependencies: - "@csstools/css-color-parser" "^1.3.2" + "@csstools/css-color-parser" "^1.4.0" "@csstools/css-parser-algorithms" "^2.3.2" "@csstools/css-tokenizer" "^2.2.1" - "@csstools/postcss-progressive-custom-properties" "^3.0.1" + "@csstools/postcss-progressive-custom-properties" "^3.0.2" postcss-logical@^7.0.0: version "7.0.0" @@ -8051,57 +8040,58 @@ postcss-place@^9.0.0: postcss-value-parser "^4.2.0" postcss-preset-env@^9.0.0: - version "9.1.4" - resolved "https://registry.yarnpkg.com/postcss-preset-env/-/postcss-preset-env-9.1.4.tgz#9a4b0b7ac2b2eb2b319fc76fd4ede0dd3e61a524" - integrity sha512-k2scWtmYBZhjAzMJw8Fgc4hnfkZa4KpPjK0z6+tTAJ4/3ZAmaJJ1VBQ9T7OS0qvper8AyD+kqN2UB2tYFQ4eeA== + version "9.2.0" + resolved "https://registry.yarnpkg.com/postcss-preset-env/-/postcss-preset-env-9.2.0.tgz#9106ed870811a6da44a5607860f8a2afffccec30" + integrity sha512-Lnr4C5gb7t5Cc8akQMJzNdJkqw7s7s7BHUaQSgsuf+CTY9Lsz5lqQTft5yNZr59JyCLz0aFNSAqSLm/xRtcTpg== dependencies: "@csstools/postcss-cascade-layers" "^4.0.0" - "@csstools/postcss-color-function" "^3.0.4" - "@csstools/postcss-color-mix-function" "^2.0.4" - "@csstools/postcss-exponential-functions" "^1.0.0" + "@csstools/postcss-color-function" "^3.0.7" + "@csstools/postcss-color-mix-function" "^2.0.7" + "@csstools/postcss-exponential-functions" "^1.0.1" "@csstools/postcss-font-format-keywords" "^3.0.0" - "@csstools/postcss-gradients-interpolation-method" "^4.0.4" - "@csstools/postcss-hwb-function" "^3.0.3" - "@csstools/postcss-ic-unit" "^3.0.1" + "@csstools/postcss-gamut-mapping" "^1.0.0" + "@csstools/postcss-gradients-interpolation-method" "^4.0.7" + "@csstools/postcss-hwb-function" "^3.0.6" + "@csstools/postcss-ic-unit" "^3.0.2" "@csstools/postcss-initial" "^1.0.0" - "@csstools/postcss-is-pseudo-class" "^4.0.2" + "@csstools/postcss-is-pseudo-class" "^4.0.3" "@csstools/postcss-logical-float-and-clear" "^2.0.0" "@csstools/postcss-logical-resize" "^2.0.0" - "@csstools/postcss-logical-viewport-units" "^2.0.2" - "@csstools/postcss-media-minmax" "^1.0.7" - "@csstools/postcss-media-queries-aspect-ratio-number-values" "^2.0.2" + "@csstools/postcss-logical-viewport-units" "^2.0.3" + "@csstools/postcss-media-minmax" "^1.1.0" + "@csstools/postcss-media-queries-aspect-ratio-number-values" "^2.0.3" "@csstools/postcss-nested-calc" "^3.0.0" "@csstools/postcss-normalize-display-values" "^3.0.1" - "@csstools/postcss-oklab-function" "^3.0.4" - "@csstools/postcss-progressive-custom-properties" "^3.0.1" - "@csstools/postcss-relative-color-syntax" "^2.0.4" + "@csstools/postcss-oklab-function" "^3.0.7" + "@csstools/postcss-progressive-custom-properties" "^3.0.2" + "@csstools/postcss-relative-color-syntax" "^2.0.7" "@csstools/postcss-scope-pseudo-class" "^3.0.0" - "@csstools/postcss-stepped-value-functions" "^3.0.1" + "@csstools/postcss-stepped-value-functions" "^3.0.2" "@csstools/postcss-text-decoration-shorthand" "^3.0.3" - "@csstools/postcss-trigonometric-functions" "^3.0.1" + "@csstools/postcss-trigonometric-functions" "^3.0.2" "@csstools/postcss-unset-value" "^3.0.0" - autoprefixer "^10.4.15" - browserslist "^4.21.10" + autoprefixer "^10.4.16" + browserslist "^4.22.1" css-blank-pseudo "^6.0.0" css-has-pseudo "^6.0.0" css-prefers-color-scheme "^9.0.0" - cssdb "^7.7.2" + cssdb "^7.8.0" postcss-attribute-case-insensitive "^6.0.2" postcss-clamp "^4.1.0" - postcss-color-functional-notation "^6.0.1" + postcss-color-functional-notation "^6.0.2" postcss-color-hex-alpha "^9.0.2" postcss-color-rebeccapurple "^9.0.1" - postcss-custom-media "^10.0.1" - postcss-custom-properties "^13.3.1" - postcss-custom-selectors "^7.1.5" + postcss-custom-media "^10.0.2" + postcss-custom-properties "^13.3.2" + postcss-custom-selectors "^7.1.6" postcss-dir-pseudo-class "^8.0.0" - postcss-double-position-gradients "^5.0.1" + postcss-double-position-gradients "^5.0.2" postcss-focus-visible "^9.0.0" postcss-focus-within "^8.0.0" postcss-font-variant "^5.0.0" postcss-gap-properties "^5.0.0" postcss-image-set-function "^6.0.1" - postcss-lab-function "^6.0.4" + postcss-lab-function "^6.0.7" postcss-logical "^7.0.0" postcss-nesting "^12.0.1" postcss-opacity-percentage "^2.0.0" @@ -9502,7 +9492,7 @@ unplugin@1.0.1: webpack-sources "^3.2.3" webpack-virtual-modules "^0.5.0" -update-browserslist-db@^1.0.11, update-browserslist-db@^1.0.13: +update-browserslist-db@^1.0.13: version "1.0.13" resolved "https://registry.yarnpkg.com/update-browserslist-db/-/update-browserslist-db-1.0.13.tgz#3c5e4f5c083661bd38ef64b6328c26ed6c8248c4" integrity sha512-xebP81SNcPuNpPP3uzeW1NYXxI3rxyJzF3pD6sH4jE7o/IX+WtSpwnVU+qIsDPyk0d3hmFQ7mjqc6AtV604hbg== From 227d4339784169a6836ac974b5472f91eb58a385 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 11 Oct 2023 14:47:59 +0000 Subject: [PATCH 17/48] Update dependency @opentelemetry/instrumentation-user-interaction to v0.33.2 --- yarn.lock | 36 ++++++++---------------------------- 1 file changed, 8 insertions(+), 28 deletions(-) diff --git a/yarn.lock b/yarn.lock index 4886fffc..94843ed4 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2092,25 +2092,14 @@ "@opentelemetry/semantic-conventions" "^1.0.0" "@opentelemetry/instrumentation-user-interaction@^0.33.0": - version "0.33.1" - resolved "https://registry.yarnpkg.com/@opentelemetry/instrumentation-user-interaction/-/instrumentation-user-interaction-0.33.1.tgz#0528056df612177e0b5a379e3e5b07d6e91bc126" - integrity sha512-2oun4gwWpqtCW+qydC51jqSSUZSOuNCBXOWinTuTmO6w/sd4DJaQ6kEboSx5gENT/56qnCM9jQZlHI+zKbL63w== + version "0.33.2" + resolved "https://registry.yarnpkg.com/@opentelemetry/instrumentation-user-interaction/-/instrumentation-user-interaction-0.33.2.tgz#a4ac68d51fccc93ef3157f7f58747d7fe90a605e" + integrity sha512-+9fxN9zlO2YKX5rajw8W9O4aCl9keyjI6VSGnnFiB5+zYDxzE55B7aTa8LAW6unz+kOYalHSwizkDa1mduGLCg== dependencies: "@opentelemetry/core" "^1.8.0" - "@opentelemetry/instrumentation" "^0.41.2" + "@opentelemetry/instrumentation" "^0.44.0" "@opentelemetry/sdk-trace-web" "^1.8.0" -"@opentelemetry/instrumentation@^0.41.2": - version "0.41.2" - resolved "https://registry.yarnpkg.com/@opentelemetry/instrumentation/-/instrumentation-0.41.2.tgz#cae11fa64485dcf03dae331f35b315b64bc6189f" - integrity sha512-rxU72E0pKNH6ae2w5+xgVYZLzc5mlxAbGzF4shxMVK8YC2QQsfN38B2GPbj0jvrKWWNUElfclQ+YTykkNg/grw== - dependencies: - "@types/shimmer" "^1.0.2" - import-in-the-middle "1.4.2" - require-in-the-middle "^7.1.1" - semver "^7.5.1" - shimmer "^1.2.1" - "@opentelemetry/instrumentation@^0.44.0": version "0.44.0" resolved "https://registry.yarnpkg.com/@opentelemetry/instrumentation/-/instrumentation-0.44.0.tgz#194f16fc96671575b6bd73d3fadffb5aa4497e67" @@ -2192,7 +2181,7 @@ "@opentelemetry/resources" "1.17.1" "@opentelemetry/semantic-conventions" "1.17.1" -"@opentelemetry/sdk-trace-web@^1.15.0": +"@opentelemetry/sdk-trace-web@^1.15.0", "@opentelemetry/sdk-trace-web@^1.8.0": version "1.17.1" resolved "https://registry.yarnpkg.com/@opentelemetry/sdk-trace-web/-/sdk-trace-web-1.17.1.tgz#1c13e6d8427a33b5e97ac85cb745a084b976c470" integrity sha512-Nle48xE1eaR6lRqyOvUlIwW/C2Bz6pptHzlHqrd+a6tGSLWEP1ZhPfuJbNeq/tWX5PX2RgeOsLlvPLEEBKeKxg== @@ -2201,7 +2190,7 @@ "@opentelemetry/sdk-trace-base" "1.17.1" "@opentelemetry/semantic-conventions" "1.17.1" -"@opentelemetry/sdk-trace-web@^1.8.0", "@opentelemetry/sdk-trace-web@^1.9.1": +"@opentelemetry/sdk-trace-web@^1.9.1": version "1.15.2" resolved "https://registry.yarnpkg.com/@opentelemetry/sdk-trace-web/-/sdk-trace-web-1.15.2.tgz#1db22d0afbd07b1287e8a331e30862eb19b24e20" integrity sha512-OjCrwtu4b+cAt540wyIr7d0lCA/cY9y42lmYDFUfJ8Ixj2bByIUJ4yyd9M7mXHpQHdiR/Kq2vzsgS14Uj+RU0Q== @@ -8667,16 +8656,7 @@ resolve@^1.1.6, resolve@^1.14.2, resolve@^1.20.0, resolve@^1.22.4: path-parse "^1.0.7" supports-preserve-symlinks-flag "^1.0.0" -resolve@^1.10.0: - version "1.22.8" - resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.8.tgz#b6c87a9f2aa06dfab52e3d70ac8cde321fa5a48d" - integrity sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw== - dependencies: - is-core-module "^2.13.0" - path-parse "^1.0.7" - supports-preserve-symlinks-flag "^1.0.0" - -resolve@^1.22.1: +resolve@^1.10.0, resolve@^1.22.1: version "1.22.8" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.8.tgz#b6c87a9f2aa06dfab52e3d70ac8cde321fa5a48d" integrity sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw== @@ -8836,7 +8816,7 @@ semver@^6.3.0, semver@^6.3.1: resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.1.tgz#556d2ef8689146e46dcea4bfdd095f3434dffcb4" integrity sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA== -semver@^7.5.1, semver@^7.5.2, semver@^7.5.3, semver@^7.5.4: +semver@^7.5.2, semver@^7.5.3, semver@^7.5.4: version "7.5.4" resolved "https://registry.yarnpkg.com/semver/-/semver-7.5.4.tgz#483986ec4ed38e1c6c48c34894a9182dbff68a6e" integrity sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA== From a9c74172a5cb5d35f25067cefb7e2ad3d8a67e97 Mon Sep 17 00:00:00 2001 From: David Baker Date: Wed, 11 Oct 2023 16:07:46 +0100 Subject: [PATCH 18/48] Add logging & guards for mic pre-creation & focus Logs & guard for pre-recating the mic track as well as logging what we select as the active focus (JWT URL + livekit alias). --- src/livekit/useECConnectionState.ts | 17 +++++++++++++++++ src/room/useActiveFocus.ts | 12 +++++++++++- 2 files changed, 28 insertions(+), 1 deletion(-) diff --git a/src/livekit/useECConnectionState.ts b/src/livekit/useECConnectionState.ts index 0b18cd10..f74525b4 100644 --- a/src/livekit/useECConnectionState.ts +++ b/src/livekit/useECConnectionState.ts @@ -19,6 +19,7 @@ import { ConnectionState, Room, RoomEvent, + Track, } from "livekit-client"; import { useCallback, useEffect, useRef, useState } from "react"; import { logger } from "matrix-js-sdk/src/logger"; @@ -60,6 +61,14 @@ async function doConnect( // doesn't publish it until you unmute. We want to publish it from the start so we're // always capturing audio: it helps keep bluetooth headsets in the right mode and // mobile browsers to know we're doing a call. + if (livekitRoom!.localParticipant.getTrack(Track.Source.Microphone)) { + logger.warn( + "Pre-creating audio track but participant already appears to have an microphone track: this shouldn't happen!" + ); + return; + } + + logger.info("Pre-creating microphone track"); const audioTracks = await livekitRoom!.localParticipant.createTracks({ audio: audioOptions, }); @@ -69,6 +78,14 @@ async function doConnect( } if (!audioEnabled) await audioTracks[0].mute(); + // check again having awaited for the track to create + if (livekitRoom!.localParticipant.getTrack(Track.Source.Microphone)) { + logger.warn( + "Publishing pre-created audio track but participant already appears to have an microphone track: this shouldn't happen!" + ); + return; + } + logger.info("Publishing pre-created mic track"); await livekitRoom?.localParticipant.publishTrack(audioTracks[0]); } diff --git a/src/room/useActiveFocus.ts b/src/room/useActiveFocus.ts index 022b25ac..8b520417 100644 --- a/src/room/useActiveFocus.ts +++ b/src/room/useActiveFocus.ts @@ -20,6 +20,7 @@ import { } from "matrix-js-sdk/src/matrixrtc/MatrixRTCSession"; import { useCallback, useEffect, useState } from "react"; import { deepCompare } from "matrix-js-sdk/src/utils"; +import { logger } from "matrix-js-sdk/src/logger"; import { LivekitFocus } from "../livekit/LivekitFocus"; @@ -27,7 +28,16 @@ function getActiveFocus( rtcSession: MatrixRTCSession, ): LivekitFocus | undefined { const oldestMembership = rtcSession.getOldestMembership(); - return oldestMembership?.getActiveFoci()[0] as LivekitFocus; + const focus = oldestMembership?.getActiveFoci()[0] as LivekitFocus; + + if (focus) { + logger.info( + `Got active focus for call from ${oldestMembership?.sender}/${oldestMembership?.deviceId}`, + focus + ); + } + + return focus; } /** From 9d4ade97b0bc65cfe01297dccc70b846ac1a76a8 Mon Sep 17 00:00:00 2001 From: David Baker Date: Wed, 11 Oct 2023 16:10:03 +0100 Subject: [PATCH 19/48] Remove redundant check Co-authored-by: Timo <16718859+toger5@users.noreply.github.com> --- src/e2ee/sharedKeyManagement.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/e2ee/sharedKeyManagement.ts b/src/e2ee/sharedKeyManagement.ts index 1e06dffc..e8e75b55 100644 --- a/src/e2ee/sharedKeyManagement.ts +++ b/src/e2ee/sharedKeyManagement.ts @@ -43,8 +43,7 @@ const useKeyFromUrl = (): [string, string] | [undefined, undefined] => { const urlParams = useUrlParams(); useEffect(() => { - if (!urlParams.password) return; - if (urlParams.password === "") return; + if (!urlParams.password || !urlParams.roomId) return; if (!urlParams.roomId) return; setLocalStorageItem( From d058f08c4795462689112c47e0518ea2c095a1bc Mon Sep 17 00:00:00 2001 From: David Baker Date: Wed, 11 Oct 2023 16:25:47 +0100 Subject: [PATCH 20/48] Prettier --- src/e2ee/sharedKeyManagement.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/e2ee/sharedKeyManagement.ts b/src/e2ee/sharedKeyManagement.ts index e8e75b55..8d4dc83e 100644 --- a/src/e2ee/sharedKeyManagement.ts +++ b/src/e2ee/sharedKeyManagement.ts @@ -51,7 +51,7 @@ const useKeyFromUrl = (): [string, string] | [undefined, undefined] => { // make sure, we always have matching pairs in the LocalStorage, // as they occur in the call links. getRoomSharedKeyLocalStorageKey(urlParams.roomId), - urlParams.password + urlParams.password, ); }, [urlParams]); @@ -82,6 +82,6 @@ export const useIsRoomE2EE = (roomId: string): boolean | null => { // should inspect the e2eEnabled URL parameter here? return useMemo( () => widget === null && (room === null || !room.getCanonicalAlias()), - [room] + [room], ); }; From 11664a5bf66f216588cd2523d2c18f696952ec11 Mon Sep 17 00:00:00 2001 From: David Baker Date: Wed, 11 Oct 2023 16:27:17 +0100 Subject: [PATCH 21/48] Prettier --- src/livekit/useECConnectionState.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/livekit/useECConnectionState.ts b/src/livekit/useECConnectionState.ts index f74525b4..32fe7415 100644 --- a/src/livekit/useECConnectionState.ts +++ b/src/livekit/useECConnectionState.ts @@ -63,7 +63,7 @@ async function doConnect( // mobile browsers to know we're doing a call. if (livekitRoom!.localParticipant.getTrack(Track.Source.Microphone)) { logger.warn( - "Pre-creating audio track but participant already appears to have an microphone track: this shouldn't happen!" + "Pre-creating audio track but participant already appears to have an microphone track: this shouldn't happen!", ); return; } @@ -81,7 +81,7 @@ async function doConnect( // check again having awaited for the track to create if (livekitRoom!.localParticipant.getTrack(Track.Source.Microphone)) { logger.warn( - "Publishing pre-created audio track but participant already appears to have an microphone track: this shouldn't happen!" + "Publishing pre-created audio track but participant already appears to have an microphone track: this shouldn't happen!", ); return; } From d579acd21fb15467149d480f9d3fac9673b8f8c7 Mon Sep 17 00:00:00 2001 From: David Baker Date: Wed, 11 Oct 2023 16:29:08 +0100 Subject: [PATCH 22/48] Even prettier --- src/room/useActiveFocus.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/room/useActiveFocus.ts b/src/room/useActiveFocus.ts index 8b520417..b1813091 100644 --- a/src/room/useActiveFocus.ts +++ b/src/room/useActiveFocus.ts @@ -33,7 +33,7 @@ function getActiveFocus( if (focus) { logger.info( `Got active focus for call from ${oldestMembership?.sender}/${oldestMembership?.deviceId}`, - focus + focus, ); } From 8c048f0c082821153d050327f19a888e65f7c2cd Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 12 Oct 2023 02:00:50 +0000 Subject: [PATCH 23/48] Update babel monorepo to v7.23.2 --- yarn.lock | 176 +++++++++++++++++++++++++++--------------------------- 1 file changed, 87 insertions(+), 89 deletions(-) diff --git a/yarn.lock b/yarn.lock index 7995b16d..65f87497 100644 --- a/yarn.lock +++ b/yarn.lock @@ -28,25 +28,25 @@ "@babel/highlight" "^7.22.13" chalk "^2.4.2" -"@babel/compat-data@^7.22.20", "@babel/compat-data@^7.22.6", "@babel/compat-data@^7.22.9": - version "7.22.20" - resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.22.20.tgz#8df6e96661209623f1975d66c35ffca66f3306d0" - integrity sha512-BQYjKbpXjoXwFW5jGqiizJQQT/aC7pFm9Ok1OWssonuguICi264lbgMzRp2ZMmRSlfkX6DsWDDcsrctK8Rwfiw== +"@babel/compat-data@^7.22.6", "@babel/compat-data@^7.22.9", "@babel/compat-data@^7.23.2": + version "7.23.2" + resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.23.2.tgz#6a12ced93455827037bfb5ed8492820d60fc32cc" + integrity sha512-0S9TQMmDHlqAZ2ITT95irXKfxN9bncq8ZCoJhun3nHL/lLUxd2NKBJYoNGWH7S0hz6fRQwWlAWn/ILM0C70KZQ== "@babel/core@^7.11.6", "@babel/core@^7.12.3", "@babel/core@^7.16.5", "@babel/core@^7.21.3", "@babel/core@^7.22.20": - version "7.23.0" - resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.23.0.tgz#f8259ae0e52a123eb40f552551e647b506a94d83" - integrity sha512-97z/ju/Jy1rZmDxybphrBuI+jtJjFVoz7Mr9yUQVVVi+DNZE333uFQeMOqcCIy1x3WYBIbWftUSLmbNXNT7qFQ== + version "7.23.2" + resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.23.2.tgz#ed10df0d580fff67c5f3ee70fd22e2e4c90a9f94" + integrity sha512-n7s51eWdaWZ3vGT2tD4T7J6eJs3QoBXydv7vkUM06Bf1cbVD2Kc2UrkzhiQwobfV7NwOnQXYL7UBJ5VPU+RGoQ== dependencies: "@ampproject/remapping" "^2.2.0" "@babel/code-frame" "^7.22.13" "@babel/generator" "^7.23.0" "@babel/helper-compilation-targets" "^7.22.15" "@babel/helper-module-transforms" "^7.23.0" - "@babel/helpers" "^7.23.0" + "@babel/helpers" "^7.23.2" "@babel/parser" "^7.23.0" "@babel/template" "^7.22.15" - "@babel/traverse" "^7.23.0" + "@babel/traverse" "^7.23.2" "@babel/types" "^7.23.0" convert-source-map "^2.0.0" debug "^4.1.0" @@ -123,10 +123,10 @@ regexpu-core "^5.3.1" semver "^6.3.1" -"@babel/helper-define-polyfill-provider@^0.4.2": - version "0.4.2" - resolved "https://registry.yarnpkg.com/@babel/helper-define-polyfill-provider/-/helper-define-polyfill-provider-0.4.2.tgz#82c825cadeeeee7aad237618ebbe8fa1710015d7" - integrity sha512-k0qnnOqHn5dK9pZpfD5XXZ9SojAITdCKRn2Lp6rnDGzIbaP0rHyMPk/4wsSxVBVz4RfN0q6VpXWP2pDGIoQ7hw== +"@babel/helper-define-polyfill-provider@^0.4.3": + version "0.4.3" + resolved "https://registry.yarnpkg.com/@babel/helper-define-polyfill-provider/-/helper-define-polyfill-provider-0.4.3.tgz#a71c10f7146d809f4a256c373f462d9bba8cf6ba" + integrity sha512-WBrLmuPP47n7PNwsZ57pqam6G/RGo1vw/87b0Blc53tZNGZ4x7YvZ6HgQe2vo1W/FR20OgjeZuGXzudPiXHFug== dependencies: "@babel/helper-compilation-targets" "^7.22.6" "@babel/helper-plugin-utils" "^7.22.5" @@ -191,7 +191,7 @@ resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.22.5.tgz#dd7ee3735e8a313b9f7b05a773d892e88e6d7295" integrity sha512-uLls06UVKgFG9QD4OeFYLEGteMIAa5kpTPcFL28yuCIIzsf6ZyKZMllKVOCZFhiZ5ptnwX4mtKdWCBE/uT4amg== -"@babel/helper-remap-async-to-generator@^7.22.5", "@babel/helper-remap-async-to-generator@^7.22.9": +"@babel/helper-remap-async-to-generator@^7.22.20", "@babel/helper-remap-async-to-generator@^7.22.5": version "7.22.20" resolved "https://registry.yarnpkg.com/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.22.20.tgz#7b68e1cb4fa964d2996fd063723fb48eca8498e0" integrity sha512-pBGyV4uBqOns+0UvhsTO8qgl8hO89PmiDYv+/COyp1aeMcmfrfruz+/nCMFiYyFF/Knn0yfrC85ZzNFjembFTw== @@ -254,13 +254,13 @@ "@babel/template" "^7.22.15" "@babel/types" "^7.22.19" -"@babel/helpers@^7.23.0": - version "7.23.1" - resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.23.1.tgz#44e981e8ce2b9e99f8f0b703f3326a4636c16d15" - integrity sha512-chNpneuK18yW5Oxsr+t553UZzzAs3aZnFm4bxhebsNTeshrC95yA7l5yl7GBAG+JG1rF0F7zzD2EixK9mWSDoA== +"@babel/helpers@^7.23.2": + version "7.23.2" + resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.23.2.tgz#2832549a6e37d484286e15ba36a5330483cac767" + integrity sha512-lzchcp8SjTSVe/fPmLwtWVBFC7+Tbn8LGHDVfDp9JGxpAY5opSaEFgt8UQvrnECWOTdji2mOWMz1rOhkHscmGQ== dependencies: "@babel/template" "^7.22.15" - "@babel/traverse" "^7.23.0" + "@babel/traverse" "^7.23.2" "@babel/types" "^7.23.0" "@babel/highlight@^7.22.13": @@ -458,14 +458,14 @@ dependencies: "@babel/helper-plugin-utils" "^7.22.5" -"@babel/plugin-transform-async-generator-functions@^7.22.15": - version "7.22.15" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-async-generator-functions/-/plugin-transform-async-generator-functions-7.22.15.tgz#3b153af4a6b779f340d5b80d3f634f55820aefa3" - integrity sha512-jBm1Es25Y+tVoTi5rfd5t1KLmL8ogLKpXszboWOTTtGFGz2RKnQe2yn7HbZ+kb/B8N0FVSGQo874NSlOU1T4+w== +"@babel/plugin-transform-async-generator-functions@^7.23.2": + version "7.23.2" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-async-generator-functions/-/plugin-transform-async-generator-functions-7.23.2.tgz#054afe290d64c6f576f371ccc321772c8ea87ebb" + integrity sha512-BBYVGxbDVHfoeXbOwcagAkOQAm9NxoTdMGfTqghu1GrvadSaw6iW3Je6IcL5PNOw8VwjxqBECXy50/iCQSY/lQ== dependencies: - "@babel/helper-environment-visitor" "^7.22.5" + "@babel/helper-environment-visitor" "^7.22.20" "@babel/helper-plugin-utils" "^7.22.5" - "@babel/helper-remap-async-to-generator" "^7.22.9" + "@babel/helper-remap-async-to-generator" "^7.22.20" "@babel/plugin-syntax-async-generators" "^7.8.4" "@babel/plugin-transform-async-to-generator@^7.22.5": @@ -484,7 +484,7 @@ dependencies: "@babel/helper-plugin-utils" "^7.22.5" -"@babel/plugin-transform-block-scoping@^7.22.15": +"@babel/plugin-transform-block-scoping@^7.23.0": version "7.23.0" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.23.0.tgz#8744d02c6c264d82e1a4bc5d2d501fd8aff6f022" integrity sha512-cOsrbmIOXmf+5YbL99/S49Y3j46k/T16b9ml8bm9lP6N9US5iQ2yBK7gpui1pg0V/WMcXdkfKbTb7HXq9u+v4g== @@ -531,7 +531,7 @@ "@babel/helper-plugin-utils" "^7.22.5" "@babel/template" "^7.22.5" -"@babel/plugin-transform-destructuring@^7.22.15": +"@babel/plugin-transform-destructuring@^7.23.0": version "7.23.0" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.23.0.tgz#6447aa686be48b32eaf65a73e0e2c0bd010a266c" integrity sha512-vaMdgNXFkYrB+8lbgniSYWHsgqK5gjaMNcc84bMIOMRLH0L9AqYq3hwMdvnyqj1OPqea8UtjPEuS/DCenah1wg== @@ -623,7 +623,7 @@ dependencies: "@babel/helper-plugin-utils" "^7.22.5" -"@babel/plugin-transform-modules-amd@^7.22.5": +"@babel/plugin-transform-modules-amd@^7.23.0": version "7.23.0" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.23.0.tgz#05b2bc43373faa6d30ca89214731f76f966f3b88" integrity sha512-xWT5gefv2HGSm4QHtgc1sYPbseOyf+FFDo2JbpE25GWl5BqTGO9IMwTYJRoIdjsF85GE+VegHxSCUt5EvoYTAw== @@ -631,7 +631,7 @@ "@babel/helper-module-transforms" "^7.23.0" "@babel/helper-plugin-utils" "^7.22.5" -"@babel/plugin-transform-modules-commonjs@^7.22.15", "@babel/plugin-transform-modules-commonjs@^7.23.0": +"@babel/plugin-transform-modules-commonjs@^7.23.0": version "7.23.0" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.23.0.tgz#b3dba4757133b2762c00f4f94590cf6d52602481" integrity sha512-32Xzss14/UVc7k9g775yMIvkVK8xwKE0DPdP5JTapr3+Z9w4tzeOuLNY6BXDQR6BdnzIlXnCGAzsk/ICHBLVWQ== @@ -640,7 +640,7 @@ "@babel/helper-plugin-utils" "^7.22.5" "@babel/helper-simple-access" "^7.22.5" -"@babel/plugin-transform-modules-systemjs@^7.22.11": +"@babel/plugin-transform-modules-systemjs@^7.23.0": version "7.23.0" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.23.0.tgz#77591e126f3ff4132a40595a6cccd00a6b60d160" integrity sha512-qBej6ctXZD2f+DhlOC9yO47yEYgUh5CZNz/aBoH4j/3NOlRfJXJbY7xDQCqQVf9KbrqGzIWER1f23doHGrIHFg== @@ -716,7 +716,7 @@ "@babel/helper-plugin-utils" "^7.22.5" "@babel/plugin-syntax-optional-catch-binding" "^7.8.3" -"@babel/plugin-transform-optional-chaining@^7.22.15": +"@babel/plugin-transform-optional-chaining@^7.22.15", "@babel/plugin-transform-optional-chaining@^7.23.0": version "7.23.0" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-optional-chaining/-/plugin-transform-optional-chaining-7.23.0.tgz#73ff5fc1cf98f542f09f29c0631647d8ad0be158" integrity sha512-sBBGXbLJjxTzLBF5rFWaikMnOGOk/BmK6vVByIdEggZ7Vn6CvWXZyRkkLFK6WE0IF8jSliyOkUN6SScFgzCM0g== @@ -897,11 +897,11 @@ "@babel/helper-plugin-utils" "^7.22.5" "@babel/preset-env@^7.22.20": - version "7.22.20" - resolved "https://registry.yarnpkg.com/@babel/preset-env/-/preset-env-7.22.20.tgz#de9e9b57e1127ce0a2f580831717f7fb677ceedb" - integrity sha512-11MY04gGC4kSzlPHRfvVkNAZhUxOvm7DCJ37hPDnUENwe06npjIRAfInEMTGSb4LZK5ZgDFkv5hw0lGebHeTyg== + version "7.23.2" + resolved "https://registry.yarnpkg.com/@babel/preset-env/-/preset-env-7.23.2.tgz#1f22be0ff0e121113260337dbc3e58fafce8d059" + integrity sha512-BW3gsuDD+rvHL2VO2SjAUNTBe5YrjsTiDyqamPDWY723na3/yPQ65X5oQkFVJZ0o50/2d+svm1rkPoJeR1KxVQ== dependencies: - "@babel/compat-data" "^7.22.20" + "@babel/compat-data" "^7.23.2" "@babel/helper-compilation-targets" "^7.22.15" "@babel/helper-plugin-utils" "^7.22.5" "@babel/helper-validator-option" "^7.22.15" @@ -927,15 +927,15 @@ "@babel/plugin-syntax-top-level-await" "^7.14.5" "@babel/plugin-syntax-unicode-sets-regex" "^7.18.6" "@babel/plugin-transform-arrow-functions" "^7.22.5" - "@babel/plugin-transform-async-generator-functions" "^7.22.15" + "@babel/plugin-transform-async-generator-functions" "^7.23.2" "@babel/plugin-transform-async-to-generator" "^7.22.5" "@babel/plugin-transform-block-scoped-functions" "^7.22.5" - "@babel/plugin-transform-block-scoping" "^7.22.15" + "@babel/plugin-transform-block-scoping" "^7.23.0" "@babel/plugin-transform-class-properties" "^7.22.5" "@babel/plugin-transform-class-static-block" "^7.22.11" "@babel/plugin-transform-classes" "^7.22.15" "@babel/plugin-transform-computed-properties" "^7.22.5" - "@babel/plugin-transform-destructuring" "^7.22.15" + "@babel/plugin-transform-destructuring" "^7.23.0" "@babel/plugin-transform-dotall-regex" "^7.22.5" "@babel/plugin-transform-duplicate-keys" "^7.22.5" "@babel/plugin-transform-dynamic-import" "^7.22.11" @@ -947,9 +947,9 @@ "@babel/plugin-transform-literals" "^7.22.5" "@babel/plugin-transform-logical-assignment-operators" "^7.22.11" "@babel/plugin-transform-member-expression-literals" "^7.22.5" - "@babel/plugin-transform-modules-amd" "^7.22.5" - "@babel/plugin-transform-modules-commonjs" "^7.22.15" - "@babel/plugin-transform-modules-systemjs" "^7.22.11" + "@babel/plugin-transform-modules-amd" "^7.23.0" + "@babel/plugin-transform-modules-commonjs" "^7.23.0" + "@babel/plugin-transform-modules-systemjs" "^7.23.0" "@babel/plugin-transform-modules-umd" "^7.22.5" "@babel/plugin-transform-named-capturing-groups-regex" "^7.22.5" "@babel/plugin-transform-new-target" "^7.22.5" @@ -958,7 +958,7 @@ "@babel/plugin-transform-object-rest-spread" "^7.22.15" "@babel/plugin-transform-object-super" "^7.22.5" "@babel/plugin-transform-optional-catch-binding" "^7.22.11" - "@babel/plugin-transform-optional-chaining" "^7.22.15" + "@babel/plugin-transform-optional-chaining" "^7.23.0" "@babel/plugin-transform-parameters" "^7.22.15" "@babel/plugin-transform-private-methods" "^7.22.5" "@babel/plugin-transform-private-property-in-object" "^7.22.11" @@ -975,10 +975,10 @@ "@babel/plugin-transform-unicode-regex" "^7.22.5" "@babel/plugin-transform-unicode-sets-regex" "^7.22.5" "@babel/preset-modules" "0.1.6-no-external-plugins" - "@babel/types" "^7.22.19" - babel-plugin-polyfill-corejs2 "^0.4.5" - babel-plugin-polyfill-corejs3 "^0.8.3" - babel-plugin-polyfill-regenerator "^0.5.2" + "@babel/types" "^7.23.0" + babel-plugin-polyfill-corejs2 "^0.4.6" + babel-plugin-polyfill-corejs3 "^0.8.5" + babel-plugin-polyfill-regenerator "^0.5.3" core-js-compat "^3.31.0" semver "^6.3.1" @@ -1004,9 +1004,9 @@ "@babel/plugin-transform-react-pure-annotations" "^7.22.5" "@babel/preset-typescript@^7.23.0": - version "7.23.0" - resolved "https://registry.yarnpkg.com/@babel/preset-typescript/-/preset-typescript-7.23.0.tgz#cc6602d13e7e5b2087c811912b87cf937a9129d9" - integrity sha512-6P6VVa/NM/VlAYj5s2Aq/gdVg8FSENCg3wlZ6Qau9AcPaoF5LbN1nyGlR9DTRIw9PpxI94e+ReydsJHcjwAweg== + version "7.23.2" + resolved "https://registry.yarnpkg.com/@babel/preset-typescript/-/preset-typescript-7.23.2.tgz#c8de488130b7081f7e1482936ad3de5b018beef4" + integrity sha512-u4UJc1XsS1GhIGteM8rnGiIvf9rJpiVgMEeCnwlLA7WJPC+jcXWJAGxYmeqs5hOZD8BbAfnV5ezBOxQbb4OUxA== dependencies: "@babel/helper-plugin-utils" "^7.22.5" "@babel/helper-validator-option" "^7.22.15" @@ -1026,7 +1026,7 @@ dependencies: regenerator-runtime "^0.14.0" -"@babel/runtime@^7.13.10", "@babel/runtime@^7.20.6", "@babel/runtime@^7.22.5", "@babel/runtime@^7.8.4": +"@babel/runtime@^7.13.10", "@babel/runtime@^7.20.6", "@babel/runtime@^7.22.5": version "7.23.1" resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.23.1.tgz#72741dc4d413338a91dcb044a86f3c0bc402646d" integrity sha512-hC2v6p8ZSI/W0HUzh3V8C5g+NwSKzKPtJwSpTjwl0o297GP9+ZLQSkdvHz46CM3LqyoXxq+5G9komY+eSqSO0g== @@ -1054,6 +1054,13 @@ dependencies: regenerator-runtime "^0.13.4" +"@babel/runtime@^7.8.4": + version "7.23.2" + resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.23.2.tgz#062b0ac103261d68a966c4c7baf2ae3e62ec3885" + integrity sha512-mM8eg4yl5D6i3lu2QKPuPH4FArvJ8KhTofbE7jwMUv9KX5mBvwPAqnV3MlyBNqdp9RyRKP6Yck8TrfYrPvX3bg== + dependencies: + regenerator-runtime "^0.14.0" + "@babel/template@^7.22.15", "@babel/template@^7.22.5", "@babel/template@^7.3.3": version "7.22.15" resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.22.15.tgz#09576efc3830f0430f4548ef971dde1350ef2f38" @@ -1063,10 +1070,10 @@ "@babel/parser" "^7.22.15" "@babel/types" "^7.22.15" -"@babel/traverse@^7.23.0": - version "7.23.0" - resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.23.0.tgz#18196ddfbcf4ccea324b7f6d3ada00d8c5a99c53" - integrity sha512-t/QaEvyIoIkwzpiZ7aoSKK8kObQYeF7T2v+dazAYCb8SXtp58zEVkWW7zAnju8FNKNdr4ScAOEDmMItbyOmEYw== +"@babel/traverse@^7.23.2": + version "7.23.2" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.23.2.tgz#329c7a06735e144a506bdb2cad0268b7f46f4ad8" + integrity sha512-azpe59SQ48qG6nu2CzcMLbxUudtN+dOM9kDbUqGq3HXUJRlo7i8fvPoxQUzYgLZ4cMVmuZgm8vvBpNeRhd6XSw== dependencies: "@babel/code-frame" "^7.22.13" "@babel/generator" "^7.23.0" @@ -1079,7 +1086,7 @@ debug "^4.1.0" globals "^11.1.0" -"@babel/types@^7.0.0", "@babel/types@^7.20.7", "@babel/types@^7.21.3", "@babel/types@^7.22.15", "@babel/types@^7.22.5", "@babel/types@^7.23.0": +"@babel/types@^7.0.0", "@babel/types@^7.20.7", "@babel/types@^7.21.3", "@babel/types@^7.22.15", "@babel/types@^7.22.19", "@babel/types@^7.22.5", "@babel/types@^7.23.0", "@babel/types@^7.4.4": version "7.23.0" resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.23.0.tgz#8c1f020c9df0e737e4e247c0619f58c68458aaeb" integrity sha512-0oIyUfKoI3mSqMvsxBdclDwxXKXAUA8v/apZbc+iSyARYou1o8ZGDxbUYyLFoW2arqS2jDGqJuZvv1d/io1axg== @@ -1088,7 +1095,7 @@ "@babel/helper-validator-identifier" "^7.22.20" to-fast-properties "^2.0.0" -"@babel/types@^7.22.19", "@babel/types@^7.3.3": +"@babel/types@^7.3.3": version "7.22.19" resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.22.19.tgz#7425343253556916e440e662bb221a93ddb75684" integrity sha512-P7LAw/LbojPzkgp5oznjE6tQEIWbp4PkkfrZDINTro9zgBRtI324/EYsiSI7lhPbpIQ+DCeR2NNmMWANGGfZsg== @@ -1097,15 +1104,6 @@ "@babel/helper-validator-identifier" "^7.22.19" to-fast-properties "^2.0.0" -"@babel/types@^7.4.4": - version "7.22.11" - resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.22.11.tgz#0e65a6a1d4d9cbaa892b2213f6159485fe632ea2" - integrity sha512-siazHiGuZRz9aB9NpHy9GOs9xiQPKnMzgdr493iI1M67vRXpnEq8ZOOKzezC5q7zwuQ6sDhdSp4SD9ixKSqKZg== - dependencies: - "@babel/helper-string-parser" "^7.22.5" - "@babel/helper-validator-identifier" "^7.22.5" - to-fast-properties "^2.0.0" - "@bcoe/v8-coverage@^0.2.3": version "0.2.3" resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39" @@ -4156,29 +4154,29 @@ babel-plugin-jest-hoist@^29.6.3: "@types/babel__core" "^7.1.14" "@types/babel__traverse" "^7.0.6" -babel-plugin-polyfill-corejs2@^0.4.5: - version "0.4.5" - resolved "https://registry.yarnpkg.com/babel-plugin-polyfill-corejs2/-/babel-plugin-polyfill-corejs2-0.4.5.tgz#8097b4cb4af5b64a1d11332b6fb72ef5e64a054c" - integrity sha512-19hwUH5FKl49JEsvyTcoHakh6BE0wgXLLptIyKZ3PijHc/Ci521wygORCUCCred+E/twuqRyAkE02BAWPmsHOg== +babel-plugin-polyfill-corejs2@^0.4.6: + version "0.4.6" + resolved "https://registry.yarnpkg.com/babel-plugin-polyfill-corejs2/-/babel-plugin-polyfill-corejs2-0.4.6.tgz#b2df0251d8e99f229a8e60fc4efa9a68b41c8313" + integrity sha512-jhHiWVZIlnPbEUKSSNb9YoWcQGdlTLq7z1GHL4AjFxaoOUMuuEVJ+Y4pAaQUGOGk93YsVCKPbqbfw3m0SM6H8Q== dependencies: "@babel/compat-data" "^7.22.6" - "@babel/helper-define-polyfill-provider" "^0.4.2" + "@babel/helper-define-polyfill-provider" "^0.4.3" semver "^6.3.1" -babel-plugin-polyfill-corejs3@^0.8.3: - version "0.8.4" - resolved "https://registry.yarnpkg.com/babel-plugin-polyfill-corejs3/-/babel-plugin-polyfill-corejs3-0.8.4.tgz#1fac2b1dcef6274e72b3c72977ed8325cb330591" - integrity sha512-9l//BZZsPR+5XjyJMPtZSK4jv0BsTO1zDac2GC6ygx9WLGlcsnRd1Co0B2zT5fF5Ic6BZy+9m3HNZ3QcOeDKfg== +babel-plugin-polyfill-corejs3@^0.8.5: + version "0.8.5" + resolved "https://registry.yarnpkg.com/babel-plugin-polyfill-corejs3/-/babel-plugin-polyfill-corejs3-0.8.5.tgz#a75fa1b0c3fc5bd6837f9ec465c0f48031b8cab1" + integrity sha512-Q6CdATeAvbScWPNLB8lzSO7fgUVBkQt6zLgNlfyeCr/EQaEQR+bWiBYYPYAFyE528BMjRhL+1QBMOI4jc/c5TA== dependencies: - "@babel/helper-define-polyfill-provider" "^0.4.2" + "@babel/helper-define-polyfill-provider" "^0.4.3" core-js-compat "^3.32.2" -babel-plugin-polyfill-regenerator@^0.5.2: - version "0.5.2" - resolved "https://registry.yarnpkg.com/babel-plugin-polyfill-regenerator/-/babel-plugin-polyfill-regenerator-0.5.2.tgz#80d0f3e1098c080c8b5a65f41e9427af692dc326" - integrity sha512-tAlOptU0Xj34V1Y2PNTL4Y0FOJMDB6bZmoW39FeCQIhigGLkqu3Fj6uiXpxIf6Ij274ENdYx64y6Au+ZKlb1IA== +babel-plugin-polyfill-regenerator@^0.5.3: + version "0.5.3" + resolved "https://registry.yarnpkg.com/babel-plugin-polyfill-regenerator/-/babel-plugin-polyfill-regenerator-0.5.3.tgz#d4c49e4b44614607c13fb769bcd85c72bb26a4a5" + integrity sha512-8sHeDOmXC8csczMrYEOf0UTNa4yE2SxV5JGeT/LP1n0OYVDUUFPxG9vdk2AlDlIit4t+Kf0xCtpgXPBwnn/9pw== dependencies: - "@babel/helper-define-polyfill-provider" "^0.4.2" + "@babel/helper-define-polyfill-provider" "^0.4.3" babel-plugin-transform-vite-meta-env@^1.0.3: version "1.0.3" @@ -4616,11 +4614,11 @@ copy-to-clipboard@^3.3.1: toggle-selection "^1.0.6" core-js-compat@^3.31.0, core-js-compat@^3.32.2: - version "3.32.2" - resolved "https://registry.yarnpkg.com/core-js-compat/-/core-js-compat-3.32.2.tgz#8047d1a8b3ac4e639f0d4f66d4431aa3b16e004c" - integrity sha512-+GjlguTDINOijtVRUxrQOv3kfu9rl+qPNdX2LTbJ/ZyVTuxK+ksVSAGX1nHstu4hrv1En/uPTtWgq2gI5wt4AQ== + version "3.33.0" + resolved "https://registry.yarnpkg.com/core-js-compat/-/core-js-compat-3.33.0.tgz#24aa230b228406450b2277b7c8bfebae932df966" + integrity sha512-0w4LcLXsVEuNkIqwjjf9rjCoPhK8uqA4tMRh4Ge26vfLtUutshn+aRJU21I9LCJlh2QQHfisNToLjw1XEJLTWw== dependencies: - browserslist "^4.21.10" + browserslist "^4.22.1" core-util-is@~1.0.0: version "1.0.3" @@ -5028,9 +5026,9 @@ duplexify@^3.6.0: stream-shift "^1.0.0" electron-to-chromium@^1.4.535: - version "1.4.549" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.549.tgz#ab223f5d85c55a9def358db163bc8cacba72df69" - integrity sha512-gpXfJslSi4hYDkA0mTLEpYKRv9siAgSUgZ+UWyk+J5Cttpd1ThCVwdclzIwQSclz3hYn049+M2fgrP1WpvF8xg== + version "1.4.551" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.551.tgz#14db6660a88f66ce095ea2657abe5653bc7f42ed" + integrity sha512-/Ng/W/kFv7wdEHYzxdK7Cv0BHEGSkSB3M0Ssl8Ndr1eMiYeas/+Mv4cNaDqamqWx6nd2uQZfPz6g25z25M/sdw== email-regex@^5.0.0: version "5.0.0" @@ -8632,7 +8630,7 @@ resolve.exports@^2.0.0: resolved "https://registry.yarnpkg.com/resolve.exports/-/resolve.exports-2.0.2.tgz#f8c934b8e6a13f539e38b7098e2e36134f01e800" integrity sha512-X2UW6Nw3n/aMgDVy+0rSqgHlv39WZAlZrXCdnbyEiKm17DSqHX4MmQMaST3FbeWR5FTuRcUwYAziZajji0Y7mg== -resolve@^1.1.6, resolve@^1.14.2, resolve@^1.20.0, resolve@^1.22.4: +resolve@^1.1.6, resolve@^1.20.0, resolve@^1.22.4: version "1.22.6" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.6.tgz#dd209739eca3aef739c626fea1b4f3c506195362" integrity sha512-njhxM7mV12JfufShqGy3Rz8j11RPdLy4xi15UurGJeoHLfJpVXKdh3ueuOqbYUcDZnffr6X739JBo5LzyahEsw== @@ -8641,7 +8639,7 @@ resolve@^1.1.6, resolve@^1.14.2, resolve@^1.20.0, resolve@^1.22.4: path-parse "^1.0.7" supports-preserve-symlinks-flag "^1.0.0" -resolve@^1.10.0, resolve@^1.22.1: +resolve@^1.10.0, resolve@^1.14.2, resolve@^1.22.1: version "1.22.8" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.8.tgz#b6c87a9f2aa06dfab52e3d70ac8cde321fa5a48d" integrity sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw== From 4ab4873c35c29bdbbf794f46b043a08b37783892 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 12 Oct 2023 02:01:03 +0000 Subject: [PATCH 24/48] Update dependency sass to v1.69.3 --- yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index 7995b16d..946c14e8 100644 --- a/yarn.lock +++ b/yarn.lock @@ -8749,9 +8749,9 @@ safe-regex-test@^1.0.0: integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg== sass@^1.42.1: - version "1.69.2" - resolved "https://registry.yarnpkg.com/sass/-/sass-1.69.2.tgz#8aeaeb6c1dcdbeaa26bbfeddece67c9fcd4b1d93" - integrity sha512-48lDtG/9OuSQZ9oNmJMUXI2QdCakAWrAGjpX/Fy6j4Og8dEAyE598x5GqCqnHkwV7+I5w8DJpqjm581q5HNh3w== + version "1.69.3" + resolved "https://registry.yarnpkg.com/sass/-/sass-1.69.3.tgz#f8a0c488697e6419519834a13335e7b65a609c11" + integrity sha512-X99+a2iGdXkdWn1akFPs0ZmelUzyAQfvqYc2P/MPTrJRuIRoTffGzT9W9nFqG00S+c8hXzVmgxhUuHFdrwxkhQ== dependencies: chokidar ">=3.0.0 <4.0.0" immutable "^4.0.0" From 5262af700066b5fd314e2a0833f628d70c0677ec Mon Sep 17 00:00:00 2001 From: Timo <16718859+toger5@users.noreply.github.com> Date: Thu, 12 Oct 2023 10:51:37 +0200 Subject: [PATCH 25/48] Fix sync loop by adding a 20ms break for the next mute sync (#1742) * fix sync loop by adding a 20ms break for the next mute sync --------- Signed-off-by: Timo K --- src/livekit/useLiveKit.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/livekit/useLiveKit.ts b/src/livekit/useLiveKit.ts index c8a5e401..a4330c79 100644 --- a/src/livekit/useLiveKit.ts +++ b/src/livekit/useLiveKit.ts @@ -166,6 +166,12 @@ export function useLiveKit( logger.error("Failed to sync audio mute state with LiveKit", e); } audioMuteUpdating.current = false; + // await participant.setMicrophoneEnabled can return immediately in some instances, + // so that participant.isMicrophoneEnabled !== buttonEnabled.current.audio still holds true. + // This happens if the device is still in a pending state + // "sleeping" here makes sure we let react do its thing so that participant.isMicrophoneEnabled is updated, + // so we do not end up in a recursion loop. + await new Promise((r) => setTimeout(r, 20)); // Run the check again after the change is done. Because the user // can update the state (presses mute button) while the device is enabling // itself we need might need to update the mute state right away. @@ -187,6 +193,8 @@ export function useLiveKit( } videoMuteUpdating.current = false; // see above + await new Promise((r) => setTimeout(r, 20)); + // see above syncMuteStateVideo(); } }; From 2985e06a41ae43c921d38e414d92196df09b7da8 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 12 Oct 2023 08:52:06 +0000 Subject: [PATCH 26/48] Update dependency eslint-plugin-deprecate to v0.8.4 --- yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index 7995b16d..097d31bb 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5320,9 +5320,9 @@ eslint-module-utils@^2.8.0: debug "^3.2.7" eslint-plugin-deprecate@^0.8.2: - version "0.8.3" - resolved "https://registry.yarnpkg.com/eslint-plugin-deprecate/-/eslint-plugin-deprecate-0.8.3.tgz#99e583c1facc99e99d97a9f795bdfd400232af0f" - integrity sha512-OCbDN5xNIdGt/Y1T5u44SJXbo/dmYebiMcBgxda7w8CDRNjat4cyBSbPQC3y9BYbJjM9JWkYgX5xlfMA+H95TA== + version "0.8.4" + resolved "https://registry.yarnpkg.com/eslint-plugin-deprecate/-/eslint-plugin-deprecate-0.8.4.tgz#1bbedca80f763cadf228c66a4cf639eb16aeca68" + integrity sha512-bzpQTyXNWXbMWRH77XiuzfAthOhQhizEZrTf7krRiMYrq6ENUsWfbCe8A3SeRNa4eW8T2QrHsg/lXmxLq9xXXA== eslint-plugin-import@^2.26.0: version "2.28.1" From 61db6418759c0fb7d48633efdfd886a322944253 Mon Sep 17 00:00:00 2001 From: LinAGKar Date: Wed, 11 Oct 2023 17:55:03 +0000 Subject: [PATCH 27/48] Translated using Weblate (Swedish) Currently translated at 4.9% (6 of 121 strings) Translation: Element Call/element-call Translate-URL: https://translate.element.io/projects/element-call/element-call/sv/ --- public/locales/sv/app.json | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/public/locales/sv/app.json b/public/locales/sv/app.json index 0967ef42..4e7031ba 100644 --- a/public/locales/sv/app.json +++ b/public/locales/sv/app.json @@ -1 +1,8 @@ -{} +{ + "{{count}} stars|one": "{{count}} stjärna", + "{{count}} stars|other": "{{count}} stjärnor", + "{{count, number}}|one": "{{count, number}}", + "{{count, number}}|other": "{{count, number}}", + "{{displayName}} is presenting": "{{displayName}} presenterar", + "{{displayName}}, your call has ended.": "{{displayName}}, ditt samtal har avslutats." +} From 8d07d2ec48d26f459963488c68bb126e8ad753ae Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 12 Oct 2023 13:27:12 +0000 Subject: [PATCH 28/48] Update docker/build-push-action digest to 8d2cf95 --- .github/workflows/publish.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index 87550425..a776dc40 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -75,7 +75,7 @@ jobs: uses: docker/setup-buildx-action@dedd61cf5d839122591f5027c89bf3ad27691d18 - name: Build and push Docker image - uses: docker/build-push-action@0f847266c302569530c95bfa228489494c43b002 + uses: docker/build-push-action@8d2cf95286e3dd3d016d478187b93b57af29fd2d with: context: . platforms: linux/amd64,linux/arm64 From ecb49ea9e60b8211b241a1de69e01e80fd2381f3 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 12 Oct 2023 15:54:04 +0000 Subject: [PATCH 29/48] Update dependency @testing-library/jest-dom to v6.1.4 --- yarn.lock | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/yarn.lock b/yarn.lock index 65f87497..b98ca389 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7,7 +7,7 @@ resolved "https://registry.yarnpkg.com/@aashutoshrathi/word-wrap/-/word-wrap-1.2.6.tgz#bd9154aec9983f77b3a034ecaa015c2e4201f6cf" integrity sha512-1Yjs2SvM8TflER/OD3cOjhWWOZb58A2t7wpE2S9XfBYTiIl+XFhQG2bjy4Pu1I+EAlCNUzRDYDdFwFYUKvXcIA== -"@adobe/css-tools@^4.3.0": +"@adobe/css-tools@^4.3.1": version "4.3.1" resolved "https://registry.yarnpkg.com/@adobe/css-tools/-/css-tools-4.3.1.tgz#abfccb8ca78075a2b6187345c26243c1a0842f28" integrity sha512-/62yikz7NLScCGAAST5SHdnjaDJQBDq0M2muyRTpf2VQhw6StBg2ALiu73zSJQ4fMVLA+0uBhBHAle7Wg+2kSg== @@ -1040,7 +1040,7 @@ dependencies: regenerator-runtime "^0.13.4" -"@babel/runtime@^7.19.4", "@babel/runtime@^7.20.7", "@babel/runtime@^7.9.2": +"@babel/runtime@^7.19.4", "@babel/runtime@^7.20.7": version "7.22.15" resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.22.15.tgz#38f46494ccf6cf020bd4eed7124b425e83e523b8" integrity sha512-T0O+aa+4w0u06iNmapipJXMV4HoUir03hpx3/YqXXhu9xim3w+dVphjFWl1OH8NbZHw5Lbm9k45drDkgq2VNNA== @@ -1054,7 +1054,7 @@ dependencies: regenerator-runtime "^0.13.4" -"@babel/runtime@^7.8.4": +"@babel/runtime@^7.8.4", "@babel/runtime@^7.9.2": version "7.23.2" resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.23.2.tgz#062b0ac103261d68a966c4c7baf2ae3e62ec3885" integrity sha512-mM8eg4yl5D6i3lu2QKPuPH4FArvJ8KhTofbE7jwMUv9KX5mBvwPAqnV3MlyBNqdp9RyRKP6Yck8TrfYrPvX3bg== @@ -3151,11 +3151,11 @@ pretty-format "^27.0.2" "@testing-library/jest-dom@^6.0.0": - version "6.1.3" - resolved "https://registry.yarnpkg.com/@testing-library/jest-dom/-/jest-dom-6.1.3.tgz#443118c9e4043f96396f120de2c7122504a079c5" - integrity sha512-YzpjRHoCBWPzpPNtg6gnhasqtE/5O4qz8WCwDEaxtfnPO6gkaLrnuXusrGSPyhIGPezr1HM7ZH0CFaUTY9PJEQ== + version "6.1.4" + resolved "https://registry.yarnpkg.com/@testing-library/jest-dom/-/jest-dom-6.1.4.tgz#cf0835c33bc5ef00befb9e672b1e3e6a710e30e3" + integrity sha512-wpoYrCYwSZ5/AxcrjLxJmCU6I5QAJXslEeSiMQqaWmP2Kzpd1LvF/qxmAIW2qposULGWq2gw30GgVNFLSc2Jnw== dependencies: - "@adobe/css-tools" "^4.3.0" + "@adobe/css-tools" "^4.3.1" "@babel/runtime" "^7.9.2" aria-query "^5.0.0" chalk "^3.0.0" From b09d8ce8c297b68fc5cd9f9903f6acce84ab9bb8 Mon Sep 17 00:00:00 2001 From: Robin Date: Thu, 12 Oct 2023 11:56:01 -0400 Subject: [PATCH 30/48] Remove workaround for linter crash --- .eslintrc.cjs | 1 - 1 file changed, 1 deletion(-) diff --git a/.eslintrc.cjs b/.eslintrc.cjs index 7f0dd576..29a4a4e4 100644 --- a/.eslintrc.cjs +++ b/.eslintrc.cjs @@ -36,7 +36,6 @@ module.exports = { rules: { "matrix-org/require-copyright-header": ["error", COPYRIGHT_HEADER], "jsx-a11y/media-has-caption": "off", - "deprecate/import": "off", // Disabled because it crashes the linter // We should use the js-sdk logger, never console directly. "no-console": ["error"], }, From f84747e83b60c6cd70a12c1489a4913cf3c2e122 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 12 Oct 2023 15:56:47 +0000 Subject: [PATCH 31/48] Update dependency @vector-im/compound-web to v0.5.3 --- yarn.lock | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/yarn.lock b/yarn.lock index c49708ed..c6233dcc 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1026,10 +1026,10 @@ dependencies: regenerator-runtime "^0.14.0" -"@babel/runtime@^7.13.10", "@babel/runtime@^7.20.6", "@babel/runtime@^7.22.5": - version "7.23.1" - resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.23.1.tgz#72741dc4d413338a91dcb044a86f3c0bc402646d" - integrity sha512-hC2v6p8ZSI/W0HUzh3V8C5g+NwSKzKPtJwSpTjwl0o297GP9+ZLQSkdvHz46CM3LqyoXxq+5G9komY+eSqSO0g== +"@babel/runtime@^7.13.10", "@babel/runtime@^7.8.4", "@babel/runtime@^7.9.2": + version "7.23.2" + resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.23.2.tgz#062b0ac103261d68a966c4c7baf2ae3e62ec3885" + integrity sha512-mM8eg4yl5D6i3lu2QKPuPH4FArvJ8KhTofbE7jwMUv9KX5mBvwPAqnV3MlyBNqdp9RyRKP6Yck8TrfYrPvX3bg== dependencies: regenerator-runtime "^0.14.0" @@ -1047,6 +1047,13 @@ dependencies: regenerator-runtime "^0.14.0" +"@babel/runtime@^7.20.6", "@babel/runtime@^7.22.5": + version "7.23.1" + resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.23.1.tgz#72741dc4d413338a91dcb044a86f3c0bc402646d" + integrity sha512-hC2v6p8ZSI/W0HUzh3V8C5g+NwSKzKPtJwSpTjwl0o297GP9+ZLQSkdvHz46CM3LqyoXxq+5G9komY+eSqSO0g== + dependencies: + regenerator-runtime "^0.14.0" + "@babel/runtime@^7.5.5", "@babel/runtime@^7.6.2", "@babel/runtime@^7.8.7": version "7.18.6" resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.18.6.tgz#6a1ef59f838debd670421f8c7f2cbb8da9751580" @@ -1054,13 +1061,6 @@ dependencies: regenerator-runtime "^0.13.4" -"@babel/runtime@^7.8.4", "@babel/runtime@^7.9.2": - version "7.23.2" - resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.23.2.tgz#062b0ac103261d68a966c4c7baf2ae3e62ec3885" - integrity sha512-mM8eg4yl5D6i3lu2QKPuPH4FArvJ8KhTofbE7jwMUv9KX5mBvwPAqnV3MlyBNqdp9RyRKP6Yck8TrfYrPvX3bg== - dependencies: - regenerator-runtime "^0.14.0" - "@babel/template@^7.22.15", "@babel/template@^7.22.5", "@babel/template@^7.3.3": version "7.22.15" resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.22.15.tgz#09576efc3830f0430f4548ef971dde1350ef2f38" @@ -3794,9 +3794,9 @@ svg2vectordrawable "^2.9.1" "@vector-im/compound-web@^0.5.0": - version "0.5.2" - resolved "https://registry.yarnpkg.com/@vector-im/compound-web/-/compound-web-0.5.2.tgz#5f3dd9b688e34a43dc179330b84c1f34ee41fb20" - integrity sha512-g9KxWS88Ov2X4NkdZvCgtWTu6uVpr9OCe2c2kOlwnaAjZfex3ysRKmX1/3aAOPIl7gsmMrJ2xEh1hHsuxlE9uA== + version "0.5.3" + resolved "https://registry.yarnpkg.com/@vector-im/compound-web/-/compound-web-0.5.3.tgz#5d0e22c6cf277a605151099d3850ddc74290078c" + integrity sha512-h8xIrMHTQklan2W7ImoFUnvMvcNcNaromcS0QffkttwLZmOjX2EXmPhlq5JhTm+ZRr4+WN7Hjok1F1vF08RStA== dependencies: "@radix-ui/react-form" "^0.0.3" "@radix-ui/react-tooltip" "^1.0.6" From 18ce30ca0f78644c8e0793f949c6673ea332c601 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 12 Oct 2023 22:56:38 +0000 Subject: [PATCH 32/48] Update dependency @types/node to v18.18.5 --- yarn.lock | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/yarn.lock b/yarn.lock index c6233dcc..c6c924dd 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3565,9 +3565,9 @@ undici-types "~5.25.1" "@types/node@^18.13.0": - version "18.18.4" - resolved "https://registry.yarnpkg.com/@types/node/-/node-18.18.4.tgz#519fef47a13cf869be290c20fc6ae9b7fe887aa7" - integrity sha512-t3rNFBgJRugIhackit2mVcLfF6IRc0JE4oeizPQL8Zrm8n2WY/0wOdpOPhdtG0V9Q2TlW/axbF1MJ6z+Yj/kKQ== + version "18.18.5" + resolved "https://registry.yarnpkg.com/@types/node/-/node-18.18.5.tgz#afc0fd975df946d6e1add5bbf98264225b212244" + integrity sha512-4slmbtwV59ZxitY4ixUZdy1uRLf9eSIvBWPQxNjhHYWEtn0FryfKpyS2cvADYXTayWdKEIsJengncrVvkI4I6A== "@types/normalize-package-data@^2.4.0": version "2.4.2" @@ -3585,9 +3585,9 @@ integrity sha512-IKjZ8RjTSwD4/YG+2gtj7BPFRB/lNbWKTiSj3M7U/TD2B7HfYCxvp2Zz6xA2WIY7pAuL1QOUPw8gQRbUrrq4fQ== "@types/react-dom@^18.0.0": - version "18.2.11" - resolved "https://registry.yarnpkg.com/@types/react-dom/-/react-dom-18.2.11.tgz#4332c315544698a0875dfdb6e320dda59e1b3d58" - integrity sha512-zq6Dy0EiCuF9pWFW6I6k6W2LdpUixLE4P6XjXU1QHLfak3GPACQfLwEuHzY5pOYa4hzj1d0GxX/P141aFjZsyg== + version "18.2.13" + resolved "https://registry.yarnpkg.com/@types/react-dom/-/react-dom-18.2.13.tgz#89cd7f9ec8b28c8b6f0392b9591671fb4a9e96b7" + integrity sha512-eJIUv7rPP+EC45uNYp/ThhSpE16k22VJUknt5OLoH9tbXoi8bMhwLf5xRuWMywamNbWzhrSmU7IBJfPup1+3fw== dependencies: "@types/react" "*" From f7773c1eb940c4829eb4835ba3c20a26d64d7adb Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 13 Oct 2023 03:23:43 +0000 Subject: [PATCH 33/48] Update dependency livekit-client to v1.14.0 --- yarn.lock | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/yarn.lock b/yarn.lock index c6233dcc..21d9cf4f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1110,9 +1110,9 @@ integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw== "@bufbuild/protobuf@^1.3.0": - version "1.3.1" - resolved "https://registry.yarnpkg.com/@bufbuild/protobuf/-/protobuf-1.3.1.tgz#c4de66bacbe7ac97fe054e68314aeba6f45177f9" - integrity sha512-BUyJWutgP2S8K/1NphOJokuwDckXS4qI2T1pGZAlkFdZchWae3jm6fCdkcGbLlM1QLOcNFFePd+7Feo4BYGrJQ== + version "1.3.3" + resolved "https://registry.yarnpkg.com/@bufbuild/protobuf/-/protobuf-1.3.3.tgz#814562a5db0233a1ececda97b930c2dde5897de8" + integrity sha512-AoHSiIpTFF97SQgmQni4c+Tyr0CDhkaRaR2qGEJTEbauqQwLRpLrd9yVv//wVHOSxr/b4FJcL54VchhY6710xA== "@csstools/cascade-layer-name-parser@^1.0.5": version "1.0.5" @@ -7202,9 +7202,9 @@ lines-and-columns@^1.1.6: integrity sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg== livekit-client@^1.12.3: - version "1.13.4" - resolved "https://registry.yarnpkg.com/livekit-client/-/livekit-client-1.13.4.tgz#af20a338334d6c9e3c81e7c9641222d95a532b75" - integrity sha512-7Ef80q7aWkgkFWfWBd+gv2AcUrubpt+oXYk+tXSWVkTXoPpm6xqrMPu3TNYKIzXQWt8IEbyPQLLVsCZpR7RBTg== + version "1.14.0" + resolved "https://registry.yarnpkg.com/livekit-client/-/livekit-client-1.14.0.tgz#3852138e01022227b24201f2625881c4e4c9d3a4" + integrity sha512-jQmIaPze4hTJCDLskMHDnvvz9RpHvWURgf/ZL8/m3DBUY3ERE2KkwcEX0cGom3FZgiiywolJFM3uKMC28Ad+nw== dependencies: "@bufbuild/protobuf" "^1.3.0" events "^3.3.0" From 32657084aa8706086df84a4a0b30cc4572533399 Mon Sep 17 00:00:00 2001 From: David Baker Date: Fri, 13 Oct 2023 10:03:05 +0100 Subject: [PATCH 34/48] Remove E2EEBanner We have e2ee now --- src/E2EEBanner.module.css | 23 ------------------ src/E2EEBanner.tsx | 40 -------------------------------- src/home/RegisteredView.tsx | 2 -- src/home/UnauthenticatedView.tsx | 2 -- 4 files changed, 67 deletions(-) delete mode 100644 src/E2EEBanner.module.css delete mode 100644 src/E2EEBanner.tsx diff --git a/src/E2EEBanner.module.css b/src/E2EEBanner.module.css deleted file mode 100644 index dd777493..00000000 --- a/src/E2EEBanner.module.css +++ /dev/null @@ -1,23 +0,0 @@ -/* -Copyright 2023 New Vector Ltd - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -.e2eeBanner { - display: flex; - flex-direction: row; - align-items: center; - gap: 12px; - font-size: var(--font-size-caption); -} diff --git a/src/E2EEBanner.tsx b/src/E2EEBanner.tsx deleted file mode 100644 index 8ce30482..00000000 --- a/src/E2EEBanner.tsx +++ /dev/null @@ -1,40 +0,0 @@ -/* -Copyright 2023 New Vector Ltd - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -import { Trans } from "react-i18next"; -import { FC } from "react"; - -import { Banner } from "./Banner"; -import styles from "./E2EEBanner.module.css"; -import LockOffIcon from "./icons/LockOff.svg?react"; -import { useEnableE2EE } from "./settings/useSetting"; - -export const E2EEBanner: FC = () => { - const [e2eeEnabled] = useEnableE2EE(); - if (e2eeEnabled) return null; - - return ( - -
- - - Element Call is temporarily not end-to-end encrypted while we test - scalability. - -
-
- ); -}; diff --git a/src/home/RegisteredView.tsx b/src/home/RegisteredView.tsx index 4a130899..691ba18b 100644 --- a/src/home/RegisteredView.tsx +++ b/src/home/RegisteredView.tsx @@ -40,7 +40,6 @@ import { Caption } from "../typography/Typography"; import { Form } from "../form/Form"; import { useEnableE2EE, useOptInAnalytics } from "../settings/useSetting"; import { AnalyticsNotice } from "../analytics/AnalyticsNotice"; -import { E2EEBanner } from "../E2EEBanner"; interface Props { client: MatrixClient; @@ -156,7 +155,6 @@ export const RegisteredView: FC = ({ client }) => { )} - {error && ( diff --git a/src/home/UnauthenticatedView.tsx b/src/home/UnauthenticatedView.tsx index beb419db..18fc47cf 100644 --- a/src/home/UnauthenticatedView.tsx +++ b/src/home/UnauthenticatedView.tsx @@ -43,7 +43,6 @@ import { generateRandomName } from "../auth/generateRandomName"; import { AnalyticsNotice } from "../analytics/AnalyticsNotice"; import { useEnableE2EE, useOptInAnalytics } from "../settings/useSetting"; import { Config } from "../config/Config"; -import { E2EEBanner } from "../E2EEBanner"; export const UnauthenticatedView: FC = () => { const { setClient } = useClient(); @@ -201,7 +200,6 @@ export const UnauthenticatedView: FC = () => { - {error && ( From 515a73ce30ce49ec40dbca9e896b44b042ef3d75 Mon Sep 17 00:00:00 2001 From: David Baker Date: Fri, 13 Oct 2023 10:06:36 +0100 Subject: [PATCH 35/48] i18n --- public/locales/en-GB/app.json | 1 - 1 file changed, 1 deletion(-) diff --git a/public/locales/en-GB/app.json b/public/locales/en-GB/app.json index 7c04a318..625761f4 100644 --- a/public/locales/en-GB/app.json +++ b/public/locales/en-GB/app.json @@ -36,7 +36,6 @@ "Developer Settings": "Developer Settings", "Display name": "Display name", "Element Call Home": "Element Call Home", - "Element Call is temporarily not end-to-end encrypted while we test scalability.": "Element Call is temporarily not end-to-end encrypted while we test scalability.", "Enable end-to-end encryption (password protected calls)": "Enable end-to-end encryption (password protected calls)", "Encrypted": "Encrypted", "End call": "End call", From 5ef208e78910bd613452da23f6fd35b1e3e89384 Mon Sep 17 00:00:00 2001 From: David Baker Date: Fri, 13 Oct 2023 10:30:06 +0100 Subject: [PATCH 36/48] Remove E2EE setting Since e2ee is enabled by default now --- public/locales/en-GB/app.json | 2 -- src/e2ee/sharedKeyManagement.ts | 4 +--- src/home/RegisteredView.tsx | 11 +++-------- src/home/UnauthenticatedView.tsx | 11 ++--------- src/room/GroupCallView.tsx | 7 +------ src/room/useLoadGroupCall.ts | 5 +---- src/settings/SettingsModal.tsx | 19 ------------------- src/settings/useSetting.ts | 11 ----------- 8 files changed, 8 insertions(+), 62 deletions(-) diff --git a/public/locales/en-GB/app.json b/public/locales/en-GB/app.json index 625761f4..b09179e1 100644 --- a/public/locales/en-GB/app.json +++ b/public/locales/en-GB/app.json @@ -36,10 +36,8 @@ "Developer Settings": "Developer Settings", "Display name": "Display name", "Element Call Home": "Element Call Home", - "Enable end-to-end encryption (password protected calls)": "Enable end-to-end encryption (password protected calls)", "Encrypted": "Encrypted", "End call": "End call", - "End-to-end encryption isn't supported on your browser.": "End-to-end encryption isn't supported on your browser.", "Exit full screen": "Exit full screen", "Expose developer settings in the settings window.": "Expose developer settings in the settings window.", "Feedback": "Feedback", diff --git a/src/e2ee/sharedKeyManagement.ts b/src/e2ee/sharedKeyManagement.ts index 21c54481..8190aed8 100644 --- a/src/e2ee/sharedKeyManagement.ts +++ b/src/e2ee/sharedKeyManagement.ts @@ -16,7 +16,6 @@ limitations under the License. import { useEffect, useMemo } from "react"; -import { useEnableE2EE } from "../settings/useSetting"; import { useLocalStorage } from "../useLocalStorage"; import { useClient } from "../ClientContext"; import { useUrlParams } from "../UrlParams"; @@ -29,10 +28,9 @@ const useInternalRoomSharedKey = ( roomId: string, ): [string | null, (value: string) => void] => { const key = useMemo(() => getRoomSharedKeyLocalStorageKey(roomId), [roomId]); - const [e2eeEnabled] = useEnableE2EE(); const [roomSharedKey, setRoomSharedKey] = useLocalStorage(key); - return [e2eeEnabled ? roomSharedKey : null, setRoomSharedKey]; + return [roomSharedKey, setRoomSharedKey]; }; const useKeyFromUrl = (roomId: string): string | null => { diff --git a/src/home/RegisteredView.tsx b/src/home/RegisteredView.tsx index 691ba18b..c5ff8cfa 100644 --- a/src/home/RegisteredView.tsx +++ b/src/home/RegisteredView.tsx @@ -38,7 +38,7 @@ import { UserMenuContainer } from "../UserMenuContainer"; import { JoinExistingCallModal } from "./JoinExistingCallModal"; import { Caption } from "../typography/Typography"; import { Form } from "../form/Form"; -import { useEnableE2EE, useOptInAnalytics } from "../settings/useSetting"; +import { useOptInAnalytics } from "../settings/useSetting"; import { AnalyticsNotice } from "../analytics/AnalyticsNotice"; interface Props { @@ -57,7 +57,6 @@ export const RegisteredView: FC = ({ client }) => { () => setJoinExistingCallModalOpen(false), [setJoinExistingCallModalOpen], ); - const [e2eeEnabled] = useEnableE2EE(); const onSubmit: FormEventHandler = useCallback( (e: FormEvent) => { @@ -73,11 +72,7 @@ export const RegisteredView: FC = ({ client }) => { setError(undefined); setLoading(true); - const createRoomResult = await createRoom( - client, - roomName, - e2eeEnabled ?? false, - ); + const createRoomResult = await createRoom(client, roomName, true); history.push( getRelativeRoomUrl( @@ -101,7 +96,7 @@ export const RegisteredView: FC = ({ client }) => { } }); }, - [client, history, setJoinExistingCallModalOpen, e2eeEnabled], + [client, history, setJoinExistingCallModalOpen], ); const recentRooms = useGroupCallRooms(client); diff --git a/src/home/UnauthenticatedView.tsx b/src/home/UnauthenticatedView.tsx index 18fc47cf..91e8b56e 100644 --- a/src/home/UnauthenticatedView.tsx +++ b/src/home/UnauthenticatedView.tsx @@ -41,7 +41,7 @@ import styles from "./UnauthenticatedView.module.css"; import commonStyles from "./common.module.css"; import { generateRandomName } from "../auth/generateRandomName"; import { AnalyticsNotice } from "../analytics/AnalyticsNotice"; -import { useEnableE2EE, useOptInAnalytics } from "../settings/useSetting"; +import { useOptInAnalytics } from "../settings/useSetting"; import { Config } from "../config/Config"; export const UnauthenticatedView: FC = () => { @@ -62,8 +62,6 @@ export const UnauthenticatedView: FC = () => { const history = useHistory(); const { t } = useTranslation(); - const [e2eeEnabled] = useEnableE2EE(); - const onSubmit: FormEventHandler = useCallback( (e) => { e.preventDefault(); @@ -86,11 +84,7 @@ export const UnauthenticatedView: FC = () => { let createRoomResult; try { - createRoomResult = await createRoom( - client, - roomName, - e2eeEnabled ?? false, - ); + createRoomResult = await createRoom(client, roomName, true); } catch (error) { if (!setClient) { throw error; @@ -142,7 +136,6 @@ export const UnauthenticatedView: FC = () => { history, setJoinExistingCallModalOpen, setClient, - e2eeEnabled, ], ); diff --git a/src/room/GroupCallView.tsx b/src/room/GroupCallView.tsx index c629a5dc..4b2f4cfa 100644 --- a/src/room/GroupCallView.tsx +++ b/src/room/GroupCallView.tsx @@ -40,7 +40,6 @@ import { useMatrixRTCSessionMemberships } from "../useMatrixRTCSessionMembership import { enterRTCSession, leaveRTCSession } from "../rtcSessionHelpers"; import { useMatrixRTCSessionJoinState } from "../useMatrixRTCSessionJoinState"; import { useIsRoomE2EE, useRoomSharedKey } from "../e2ee/sharedKeyManagement"; -import { useEnableE2EE } from "../settings/useSetting"; import { useRoomAvatar } from "./useRoomAvatar"; import { useRoomName } from "./useRoomName"; import { useJoinRule } from "./useJoinRule"; @@ -256,8 +255,6 @@ export const GroupCallView: FC = ({ } }, [isJoined, rtcSession]); - const [e2eeEnabled] = useEnableE2EE(); - const e2eeConfig = useMemo( () => (e2eeSharedKey ? { sharedKey: e2eeSharedKey } : undefined), [e2eeSharedKey], @@ -293,7 +290,7 @@ export const GroupCallView: FC = ({ const { t } = useTranslation(); - if (e2eeEnabled && isRoomE2EE && !e2eeSharedKey) { + if (isRoomE2EE && !e2eeSharedKey) { return ( = ({ ); - } else if (!e2eeEnabled && isRoomE2EE) { - return ; } const shareModal = ( diff --git a/src/room/useLoadGroupCall.ts b/src/room/useLoadGroupCall.ts index 423706ec..9b300d36 100644 --- a/src/room/useLoadGroupCall.ts +++ b/src/room/useLoadGroupCall.ts @@ -23,7 +23,6 @@ import { MatrixRTCSession } from "matrix-js-sdk/src/matrixrtc/MatrixRTCSession"; import type { Room } from "matrix-js-sdk/src/models/room"; import type { GroupCall } from "matrix-js-sdk/src/webrtc/groupCall"; -import { useEnableE2EE } from "../settings/useSetting"; export type GroupCallLoaded = { kind: "loaded"; @@ -57,8 +56,6 @@ export const useLoadGroupCall = ( const { t } = useTranslation(); const [state, setState] = useState({ kind: "loading" }); - const [e2eeEnabled] = useEnableE2EE(); - useEffect(() => { const fetchOrCreateRoom = async (): Promise => { let room: Room | null = null; @@ -129,7 +126,7 @@ export const useLoadGroupCall = ( .then(fetchOrCreateGroupCall) .then((rtcSession) => setState({ kind: "loaded", rtcSession })) .catch((error) => setState({ kind: "failed", error })); - }, [client, roomIdOrAlias, viaServers, t, e2eeEnabled]); + }, [client, roomIdOrAlias, viaServers, t]); return state; }; diff --git a/src/settings/SettingsModal.tsx b/src/settings/SettingsModal.tsx index fe183d59..9c90bc10 100644 --- a/src/settings/SettingsModal.tsx +++ b/src/settings/SettingsModal.tsx @@ -33,7 +33,6 @@ import { useOptInAnalytics, useDeveloperSettingsTab, useShowConnectionStats, - useEnableE2EE, isFirefox, } from "./useSetting"; import { FieldRow, InputField } from "../input/Input"; @@ -64,7 +63,6 @@ export const SettingsModal: FC = (props) => { useDeveloperSettingsTab(); const [showConnectionStats, setShowConnectionStats] = useShowConnectionStats(); - const [enableE2EE, setEnableE2EE] = useEnableE2EE(); // Generate a `SelectInput` with a list of devices for a given device kind. const generateDeviceSelection = ( @@ -243,23 +241,6 @@ export const SettingsModal: FC = (props) => { } /> - - ): void => - setEnableE2EE?.(e.target.checked) - } - /> - ); diff --git a/src/settings/useSetting.ts b/src/settings/useSetting.ts index 399ed356..a2733b98 100644 --- a/src/settings/useSetting.ts +++ b/src/settings/useSetting.ts @@ -15,7 +15,6 @@ limitations under the License. */ import { useCallback, useMemo } from "react"; -import { isE2EESupported } from "livekit-client"; import { PosthogAnalytics } from "../analytics/PosthogAnalytics"; import { @@ -91,16 +90,6 @@ export const useOptInAnalytics = (): DisableableSetting => { return [false, null]; }; -export const useEnableE2EE = (): DisableableSetting => { - const settingVal = useSetting( - "enable-end-to-end-encryption", - true, - ); - if (isE2EESupported()) return settingVal; - - return [false, null]; -}; - export const useDeveloperSettingsTab = (): Setting => useSetting("developer-settings-tab", false); From aac92c18b3075ef233e68990188f860f37a6b370 Mon Sep 17 00:00:00 2001 From: David Baker Date: Fri, 13 Oct 2023 11:02:20 +0100 Subject: [PATCH 37/48] Re-enable screen sharing on Safari Appears to work fine now, and no reason to think it shouldn't on Livekit. --- src/room/InCallView.tsx | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/room/InCallView.tsx b/src/room/InCallView.tsx index 9dc124f9..bd0fd1a7 100644 --- a/src/room/InCallView.tsx +++ b/src/room/InCallView.tsx @@ -87,9 +87,6 @@ import { import { useOpenIDSFU } from "../livekit/openIDSFU"; const canScreenshare = "getDisplayMedia" in (navigator.mediaDevices ?? {}); -// There is currently a bug in Safari our our code with cloning and sending MediaStreams -// or with getUsermedia and getDisplaymedia being used within the same session. -// For now we can disable screensharing in Safari. const isSafari = /^((?!chrome|android).)*safari/i.test(navigator.userAgent); // How long we wait after a focus switch before showing the real participant list again @@ -369,7 +366,7 @@ export const InCallView: FC = ({ ); if (!reducedControls) { - if (canScreenshare && !hideScreensharing && !isSafari) { + if (canScreenshare && !hideScreensharing) { buttons.push( Date: Fri, 13 Oct 2023 12:12:38 +0000 Subject: [PATCH 38/48] Update dependency react-i18next to v13.3.0 --- yarn.lock | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/yarn.lock b/yarn.lock index 2262168b..eecf75af 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1026,7 +1026,7 @@ dependencies: regenerator-runtime "^0.14.0" -"@babel/runtime@^7.13.10", "@babel/runtime@^7.8.4", "@babel/runtime@^7.9.2": +"@babel/runtime@^7.13.10", "@babel/runtime@^7.22.5", "@babel/runtime@^7.8.4", "@babel/runtime@^7.9.2": version "7.23.2" resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.23.2.tgz#062b0ac103261d68a966c4c7baf2ae3e62ec3885" integrity sha512-mM8eg4yl5D6i3lu2QKPuPH4FArvJ8KhTofbE7jwMUv9KX5mBvwPAqnV3MlyBNqdp9RyRKP6Yck8TrfYrPvX3bg== @@ -1047,7 +1047,7 @@ dependencies: regenerator-runtime "^0.14.0" -"@babel/runtime@^7.20.6", "@babel/runtime@^7.22.5": +"@babel/runtime@^7.20.6": version "7.23.1" resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.23.1.tgz#72741dc4d413338a91dcb044a86f3c0bc402646d" integrity sha512-hC2v6p8ZSI/W0HUzh3V8C5g+NwSKzKPtJwSpTjwl0o297GP9+ZLQSkdvHz46CM3LqyoXxq+5G9komY+eSqSO0g== @@ -8291,9 +8291,9 @@ react-dom@18: scheduler "^0.23.0" react-i18next@^13.0.0: - version "13.2.2" - resolved "https://registry.yarnpkg.com/react-i18next/-/react-i18next-13.2.2.tgz#b1e78ed66a54f4bc819616f68b98221e1b1a1936" - integrity sha512-+nFUkbRByFwnrfDcYqvzBuaeZb+nACHx+fAWN/pZMddWOCJH5hoc21+Sa/N/Lqi6ne6/9wC/qRGOoQhJa6IkEQ== + version "13.3.0" + resolved "https://registry.yarnpkg.com/react-i18next/-/react-i18next-13.3.0.tgz#8e39c0101f654db7eb971f159bb55067a78925c3" + integrity sha512-FlR9xjYHSPIJfQspEmkN0yOlxgRyNuiJKJ8gCaZH08UJ7SZHG+VrptEPcpEMEchjNoCOZdKcvJ3PnmHEZhkeXg== dependencies: "@babel/runtime" "^7.22.5" html-parse-stringify "^3.0.1" From 8b61cc49c9a09ce13fef1020373eff147638b7ed Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 13 Oct 2023 12:12:53 +0000 Subject: [PATCH 39/48] Update sentry-javascript monorepo to v7.74.0 --- yarn.lock | 84 ++++++++++++++++++++++++++++++++++++++----------------- 1 file changed, 58 insertions(+), 26 deletions(-) diff --git a/yarn.lock b/yarn.lock index 2262168b..ada0d69e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2919,16 +2919,26 @@ "@sentry/utils" "7.73.0" tslib "^2.4.1 || ^1.9.3" -"@sentry/browser@7.73.0": - version "7.73.0" - resolved "https://registry.yarnpkg.com/@sentry/browser/-/browser-7.73.0.tgz#a8eaeb50cf16ca32f0039a81719c503d7045495f" - integrity sha512-e301hUixcJ5+HNKCJwajFF5smF4opXEFSclyWsJuFNufv5J/1C1SDhbwG2JjBt5zzdSoKWJKT1ewR6vpICyoDw== +"@sentry-internal/tracing@7.74.0": + version "7.74.0" + resolved "https://registry.yarnpkg.com/@sentry-internal/tracing/-/tracing-7.74.0.tgz#11b0762d0b18b01cc18dfb1e40bbaa41c6f97452" + integrity sha512-JK6IRGgdtZjswGfaGIHNWIThffhOHzVIIaGmglui+VFIzOsOqePjoxaDV0MEvzafxXZD7eWqGE5RGuZ0n6HFVg== dependencies: - "@sentry-internal/tracing" "7.73.0" - "@sentry/core" "7.73.0" - "@sentry/replay" "7.73.0" - "@sentry/types" "7.73.0" - "@sentry/utils" "7.73.0" + "@sentry/core" "7.74.0" + "@sentry/types" "7.74.0" + "@sentry/utils" "7.74.0" + tslib "^2.4.1 || ^1.9.3" + +"@sentry/browser@7.74.0": + version "7.74.0" + resolved "https://registry.yarnpkg.com/@sentry/browser/-/browser-7.74.0.tgz#4a01bccb34059894007b9a22a89892f2c4dff130" + integrity sha512-Njr8216Z1dFUcl6NqBOk20dssK9SjoVddY74Xq+Q4p3NfXBG3lkMcACXor7SFoJRZXq8CZWGS13Cc5KwViRw4g== + dependencies: + "@sentry-internal/tracing" "7.74.0" + "@sentry/core" "7.74.0" + "@sentry/replay" "7.74.0" + "@sentry/types" "7.74.0" + "@sentry/utils" "7.74.0" tslib "^2.4.1 || ^1.9.3" "@sentry/bundler-plugin-core@2.8.0": @@ -2965,6 +2975,15 @@ "@sentry/utils" "7.73.0" tslib "^2.4.1 || ^1.9.3" +"@sentry/core@7.74.0": + version "7.74.0" + resolved "https://registry.yarnpkg.com/@sentry/core/-/core-7.74.0.tgz#2cfcb5133a4a3f82fbac09d3573ea9f508fb7c67" + integrity sha512-83NRuqn7nDZkSVBN5yJQqcpXDG4yMYiB7TkYUKrGTzBpRy6KUOrkCdybuKk0oraTIGiGSe5WEwCFySiNgR9FzA== + dependencies: + "@sentry/types" "7.74.0" + "@sentry/utils" "7.74.0" + tslib "^2.4.1 || ^1.9.3" + "@sentry/node@^7.60.0": version "7.73.0" resolved "https://registry.yarnpkg.com/@sentry/node/-/node-7.73.0.tgz#7eecf06689cd8f9d21587ca5cbfdc74543cc8c09" @@ -2980,37 +2999,42 @@ tslib "^2.4.1 || ^1.9.3" "@sentry/react@^7.0.0": - version "7.73.0" - resolved "https://registry.yarnpkg.com/@sentry/react/-/react-7.73.0.tgz#8591bb70ac683b43fbe41736c2c321a4661ce22d" - integrity sha512-RCGlxW0Xp5vsC38LGxUO0Xf11LBzfg75VN+KS3D2FS5GXl0R0JwgUyPNVlod7YMCfwytsKGhfP+YpQvHGQAVwg== + version "7.74.0" + resolved "https://registry.yarnpkg.com/@sentry/react/-/react-7.74.0.tgz#11e63e7f99cc60fa8c2846d929aa7dc0f0769e77" + integrity sha512-w5VODhLM8Kva2ZscGzgwLgkAi0TY+/Ht9SxdKlGFBJU9r7LllqzuGQ5HUcw9CPsQJnrL8VNdq8ngJPE1YbAUqw== dependencies: - "@sentry/browser" "7.73.0" - "@sentry/types" "7.73.0" - "@sentry/utils" "7.73.0" + "@sentry/browser" "7.74.0" + "@sentry/types" "7.74.0" + "@sentry/utils" "7.74.0" hoist-non-react-statics "^3.3.2" tslib "^2.4.1 || ^1.9.3" -"@sentry/replay@7.73.0": - version "7.73.0" - resolved "https://registry.yarnpkg.com/@sentry/replay/-/replay-7.73.0.tgz#4e6c522bac5c12f596ef76afe15ecb3807407669" - integrity sha512-a8IC9SowBisLYD2IdLkXzx7gN4iVwHDJhQvLp2B8ARs1PyPjJ7gCxSMHeGrYp94V0gOXtorNYkrxvuX8ayPROA== +"@sentry/replay@7.74.0": + version "7.74.0" + resolved "https://registry.yarnpkg.com/@sentry/replay/-/replay-7.74.0.tgz#618d40f7c9ecc7589dd14df0c560b20a24839d3f" + integrity sha512-GoYa3cHTTFVI/J1cnZ0i4X128mf/JljaswO3PWNTe2k3lSHq/LM5aV0keClRvwM0W8hlix8oOTT06nnenOUmmw== dependencies: - "@sentry/core" "7.73.0" - "@sentry/types" "7.73.0" - "@sentry/utils" "7.73.0" + "@sentry/core" "7.74.0" + "@sentry/types" "7.74.0" + "@sentry/utils" "7.74.0" "@sentry/tracing@^7.0.0": - version "7.73.0" - resolved "https://registry.yarnpkg.com/@sentry/tracing/-/tracing-7.73.0.tgz#0998aab726a7af18744fd694c6d199f5d1dd1a3d" - integrity sha512-LOQR6Hkc8ZoflCXWtMlxTbCBEwv0MSOr3vesnRsmlFG8TW1YUIneU+wKnVxToWAZ8fq+6ubclnuIUKHfqTk/Tg== + version "7.74.0" + resolved "https://registry.yarnpkg.com/@sentry/tracing/-/tracing-7.74.0.tgz#8d9aee19f448d3635abddd5fe86248bc0b89c8ac" + integrity sha512-rSFJADhh3J3zmkzJ1EXCOwS3h7F6o/lSKu7CWZSZ6k5kBvbCJ5AXvGQadhPdWPJMMcPFzCJaOyTKEPcwL4tbCw== dependencies: - "@sentry-internal/tracing" "7.73.0" + "@sentry-internal/tracing" "7.74.0" "@sentry/types@7.73.0": version "7.73.0" resolved "https://registry.yarnpkg.com/@sentry/types/-/types-7.73.0.tgz#6d811bbe413d319df0a592a672d6d72a94a8e716" integrity sha512-/v8++bly8jW7r4cP2wswYiiVpn7eLLcqwnfPUMeCQze4zj3F3nTRIKc9BGHzU0V+fhHa3RwRC2ksqTGq1oJMDg== +"@sentry/types@7.74.0": + version "7.74.0" + resolved "https://registry.yarnpkg.com/@sentry/types/-/types-7.74.0.tgz#810a62cd28db21c5f15f131da6525d7ddf7a29db" + integrity sha512-rI5eIRbUycWjn6s6o3yAjjWtIvYSxZDdnKv5je2EZINfLKcMPj1dkl6wQd2F4y7gLfD/N6Y0wZYIXC3DUdJQQg== + "@sentry/utils@7.73.0", "@sentry/utils@^7.60.0": version "7.73.0" resolved "https://registry.yarnpkg.com/@sentry/utils/-/utils-7.73.0.tgz#530cf023f7c395aa7708cd3824e5a45948449c10" @@ -3019,6 +3043,14 @@ "@sentry/types" "7.73.0" tslib "^2.4.1 || ^1.9.3" +"@sentry/utils@7.74.0": + version "7.74.0" + resolved "https://registry.yarnpkg.com/@sentry/utils/-/utils-7.74.0.tgz#e0a16d345b2af6f8b09d157c8c8a3145d7a2070a" + integrity sha512-k3np8nuTPtx5KDODPtULfFln4UXdE56MZCcF19Jv6Ljxf+YN/Ady1+0Oi3e0XoSvFpWNyWnglauT7M65qCE6kg== + dependencies: + "@sentry/types" "7.74.0" + tslib "^2.4.1 || ^1.9.3" + "@sentry/vite-plugin@^2.0.0": version "2.8.0" resolved "https://registry.yarnpkg.com/@sentry/vite-plugin/-/vite-plugin-2.8.0.tgz#d19d2ebf07fcbf09bb585033d803b9967717e5a6" From 2faf9527a086605231315d684e7004de36d9a82a Mon Sep 17 00:00:00 2001 From: David Baker Date: Fri, 13 Oct 2023 13:34:25 +0100 Subject: [PATCH 40/48] Fix using a non-default audio device We were passing the output option when we wanted the input, so the mic track pre-creation would just always use the system default. --- src/livekit/useLiveKit.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/livekit/useLiveKit.ts b/src/livekit/useLiveKit.ts index a4330c79..814eb096 100644 --- a/src/livekit/useLiveKit.ts +++ b/src/livekit/useLiveKit.ts @@ -127,7 +127,7 @@ export function useLiveKit( const connectionState = useECConnectionState( { - deviceId: initialDevices.current.audioOutput.selectedId, + deviceId: initialDevices.current.audioInput.selectedId, }, initialMuteStates.current.audio.enabled, room, From 4f426808cf439a41759155fe6eb208d30a6447e7 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 13 Oct 2023 14:08:55 +0000 Subject: [PATCH 41/48] Update docker/build-push-action digest to fdf7f43 --- .github/workflows/publish.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index a776dc40..1d2adfb7 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -75,7 +75,7 @@ jobs: uses: docker/setup-buildx-action@dedd61cf5d839122591f5027c89bf3ad27691d18 - name: Build and push Docker image - uses: docker/build-push-action@8d2cf95286e3dd3d016d478187b93b57af29fd2d + uses: docker/build-push-action@fdf7f43ecf7c1a5c7afe936410233728a8c2d9c2 with: context: . platforms: linux/amd64,linux/arm64 From d12d7cf28dd4213ef3f6b47d456ac3bee74918ba Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 13 Oct 2023 14:09:00 +0000 Subject: [PATCH 42/48] Update docker/setup-buildx-action digest to 5d98624 --- .github/workflows/publish.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index a776dc40..85b21603 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -72,7 +72,7 @@ jobs: type=raw,value=latest-ci_${{steps.current-time.outputs.unix_time}},enable={{is_default_branch}} - name: Set up Docker Buildx - uses: docker/setup-buildx-action@dedd61cf5d839122591f5027c89bf3ad27691d18 + uses: docker/setup-buildx-action@5d9862498505fcac67b9f455d6e94ec0339f7b90 - name: Build and push Docker image uses: docker/build-push-action@8d2cf95286e3dd3d016d478187b93b57af29fd2d From 8d97f69b2e63b7e4d31512264cdc3c27a6f0c6af Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 13 Oct 2023 16:55:51 +0000 Subject: [PATCH 43/48] Update dependency @vector-im/compound-web to v0.5.4 --- yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index 91916c60..5ff99758 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3826,9 +3826,9 @@ svg2vectordrawable "^2.9.1" "@vector-im/compound-web@^0.5.0": - version "0.5.3" - resolved "https://registry.yarnpkg.com/@vector-im/compound-web/-/compound-web-0.5.3.tgz#5d0e22c6cf277a605151099d3850ddc74290078c" - integrity sha512-h8xIrMHTQklan2W7ImoFUnvMvcNcNaromcS0QffkttwLZmOjX2EXmPhlq5JhTm+ZRr4+WN7Hjok1F1vF08RStA== + version "0.5.4" + resolved "https://registry.yarnpkg.com/@vector-im/compound-web/-/compound-web-0.5.4.tgz#a99b346fe8de34a6f8bcbf9e1040ce1d79615dbc" + integrity sha512-w4Nwzid5Y89Dt9GaxKO+kWPTjSitLpkmoAjMYHVUajNMCfUxluzu4eOgjPRCpubPH5lZUB6/95y43wOI+pEC1Q== dependencies: "@radix-ui/react-form" "^0.0.3" "@radix-ui/react-tooltip" "^1.0.6" From a9cd50114cfb9b7f2b328aed1f6a86cf6d4db8e9 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 13 Oct 2023 16:56:07 +0000 Subject: [PATCH 44/48] Update dependency i18next-parser to v8.9.0 --- yarn.lock | 480 ++++++++++++++++-------------------------------------- 1 file changed, 143 insertions(+), 337 deletions(-) diff --git a/yarn.lock b/yarn.lock index 91916c60..a752b3a6 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1047,13 +1047,6 @@ dependencies: regenerator-runtime "^0.14.0" -"@babel/runtime@^7.20.6": - version "7.23.1" - resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.23.1.tgz#72741dc4d413338a91dcb044a86f3c0bc402646d" - integrity sha512-hC2v6p8ZSI/W0HUzh3V8C5g+NwSKzKPtJwSpTjwl0o297GP9+ZLQSkdvHz46CM3LqyoXxq+5G9komY+eSqSO0g== - dependencies: - regenerator-runtime "^0.14.0" - "@babel/runtime@^7.5.5", "@babel/runtime@^7.6.2", "@babel/runtime@^7.8.7": version "7.18.6" resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.18.6.tgz#6a1ef59f838debd670421f8c7f2cbb8da9751580" @@ -1685,6 +1678,13 @@ dependencies: tslib "^2.1.0" +"@gulpjs/to-absolute-glob@^4.0.0": + version "4.0.0" + resolved "https://registry.yarnpkg.com/@gulpjs/to-absolute-glob/-/to-absolute-glob-4.0.0.tgz#1fc2460d3953e1d9b9f2dfdb4bcc99da4710c021" + integrity sha512-kjotm7XJrJ6v+7knhPaRgaT6q8F8K2jiafwYdNHLzmV0uGLuZY43FK6smNSHUPrhq5kX2slCUy+RGG/xGqmIKA== + dependencies: + is-negated-glob "^1.0.0" + "@humanwhocodes/config-array@^0.11.11": version "0.11.11" resolved "https://registry.yarnpkg.com/@humanwhocodes/config-array/-/config-array-0.11.11.tgz#88a04c570dbbc7dd943e4712429c3df09bc32844" @@ -3971,7 +3971,7 @@ ansi-styles@^5.0.0: resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-5.2.0.tgz#07449690ad45777d1924ac2abb2fc8895dba836b" integrity sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA== -anymatch@^3.0.3, anymatch@~3.1.2: +anymatch@^3.0.3, anymatch@^3.1.3, anymatch@~3.1.2: version "3.1.3" resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-3.1.3.tgz#790c58b19ba1720a84205b57c618d5ad8524973e" integrity sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw== @@ -3979,13 +3979,6 @@ anymatch@^3.0.3, anymatch@~3.1.2: normalize-path "^3.0.0" picomatch "^2.0.4" -append-buffer@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/append-buffer/-/append-buffer-1.0.2.tgz#d8220cf466081525efea50614f3de6514dfa58f1" - integrity sha512-WLbYiXzD3y/ATLZFufV/rZvWdZOs+Z/+5v1rBZ463Jn398pa6kcde27cvozYnBoxXblGZTFfoPpsaEw0orU5BA== - dependencies: - buffer-equal "^1.0.0" - argparse@^1.0.7: version "1.0.10" resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.10.tgz#bcd6791ea5ae09725e17e5ad988134cd40b3d911" @@ -4264,6 +4257,15 @@ binary-extensions@^2.0.0: resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-2.2.0.tgz#75f502eeaf9ffde42fc98829645be4ea76bd9e2d" integrity sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA== +bl@^5.0.0: + version "5.1.0" + resolved "https://registry.yarnpkg.com/bl/-/bl-5.1.0.tgz#183715f678c7188ecef9fe475d90209400624273" + integrity sha512-tv1ZJHLfTDnXE6tMHv73YgSJaWR2AFuPwMntBe7XL/GBFHnT0CLnsHMogfk5+GzCDC5ZWarSCYaIGATZt9dNsQ== + dependencies: + buffer "^6.0.3" + inherits "^2.0.4" + readable-stream "^3.4.0" + boolbase@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/boolbase/-/boolbase-1.0.0.tgz#68dff5fbe60c51eb37725ea9e3ed310dcc1e776e" @@ -4347,11 +4349,6 @@ bser@2.1.1: dependencies: node-int64 "^0.4.0" -buffer-equal@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/buffer-equal/-/buffer-equal-1.0.1.tgz#2f7651be5b1b3f057fcd6e7ee16cf34767077d90" - integrity sha512-QoV3ptgEaQpvVwbXdSO39iqPQTCxSF7A5U99AxbHYqUdCizL/lH2Z0A2y6nbZucxMEOtNyZfG2s6gsVugGpKkg== - buffer-from@^1.0.0: version "1.1.2" resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.2.tgz#2b146a6fd72e80b4f55d255f35ed59a3a9a41bd5" @@ -4509,30 +4506,16 @@ cliui@^8.0.1: strip-ansi "^6.0.1" wrap-ansi "^7.0.0" -clone-buffer@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/clone-buffer/-/clone-buffer-1.0.0.tgz#e3e25b207ac4e701af721e2cb5a16792cac3dc58" - integrity sha512-KLLTJWrvwIP+OPfMn0x2PheDEP20RPUcGXj/ERegTgdmPEZylALQldygiqrPPu8P45uNuPs7ckmReLY6v/iA5g== - clone-stats@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/clone-stats/-/clone-stats-1.0.0.tgz#b3782dff8bb5474e18b9b6bf0fdfe782f8777680" integrity sha512-au6ydSpg6nsrigcZ4m8Bc9hxjeW+GJ8xh5G3BJCMt4WXe1H10UNaVOamqQTmrx1kjVuxAHIQSNU6hY4Nsn9/ag== -clone@^2.1.1, clone@^2.1.2: +clone@^2.1.2: version "2.1.2" resolved "https://registry.yarnpkg.com/clone/-/clone-2.1.2.tgz#1b7f4b9f591f1e8f83670401600345a02887435f" integrity sha512-3Pe/CF1Nn94hyhIYpjtiLhdCoEoz0DqQ+988E9gmeEdQZlojxnOb74wctFyuwWQHzqyf9X7C7MG8juUpqBJT8w== -cloneable-readable@^1.0.0: - version "1.1.3" - resolved "https://registry.yarnpkg.com/cloneable-readable/-/cloneable-readable-1.1.3.tgz#120a00cb053bfb63a222e709f9683ea2e11d8cec" - integrity sha512-2EF8zTQOxYq70Y4XKtorQupqF0m49MBz2/yf5Bj+MHjvpG3Hy7sImifnqD6UA+TKYxeSV+u6qqQPawN5UvnpKQ== - dependencies: - inherits "^2.0.1" - process-nextick-args "^2.0.0" - readable-stream "^2.3.5" - clsx@^1.1.1: version "1.2.1" resolved "https://registry.yarnpkg.com/clsx/-/clsx-1.2.1.tgz#0ddc4a20a549b59c93a4116bb26f5294ca17dc12" @@ -4623,7 +4606,7 @@ content-type@^1.0.4: resolved "https://registry.yarnpkg.com/content-type/-/content-type-1.0.5.tgz#8b773162656d1d1086784c8f23a54ce6d73d7918" integrity sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA== -convert-source-map@^1.5.0, convert-source-map@^1.6.0: +convert-source-map@^1.6.0: version "1.9.0" resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.9.0.tgz#7faae62353fb4213366d0ca98358d22e8368b05f" integrity sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A== @@ -5047,16 +5030,6 @@ dotenv@^16.3.1: resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-16.3.1.tgz#369034de7d7e5b120972693352a3bf112172cc3e" integrity sha512-IPzF4w4/Rd94bA9imS68tZBaYyBWSCE47V1RGuMrB94iyTOIEwRmVL2x/4An+6mETpLrKJ5hQkB8W4kFAadeIQ== -duplexify@^3.6.0: - version "3.7.1" - resolved "https://registry.yarnpkg.com/duplexify/-/duplexify-3.7.1.tgz#2a4df5317f6ccfd91f86d6fd25d8d8a103b88309" - integrity sha512-07z8uv2wMyS51kKhD1KsdXJg5WQ6t93RneqRxUHnskXVtlYYkLqM0gqStQZ3pj073g687jPCHrqNfCzawLYh5g== - dependencies: - end-of-stream "^1.0.0" - inherits "^2.0.1" - readable-stream "^2.0.0" - stream-shift "^1.0.0" - electron-to-chromium@^1.4.535: version "1.4.551" resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.551.tgz#14db6660a88f66ce095ea2657abe5653bc7f42ed" @@ -5082,13 +5055,6 @@ emoji-regex@^9.2.2: resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-9.2.2.tgz#840c8803b0d8047f4ff0cf963176b32d4ef3ed72" integrity sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg== -end-of-stream@^1.0.0, end-of-stream@^1.1.0: - version "1.4.4" - resolved "https://registry.yarnpkg.com/end-of-stream/-/end-of-stream-1.4.4.tgz#5ae64a5f45057baf3626ec14da0ca5e4b2431eb0" - integrity sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q== - dependencies: - once "^1.4.0" - ensure-posix-path@^1.1.0: version "1.1.1" resolved "https://registry.yarnpkg.com/ensure-posix-path/-/ensure-posix-path-1.1.1.tgz#3c62bdb19fa4681544289edb2b382adc029179ce" @@ -5587,11 +5553,6 @@ expect@^29.0.0, expect@^29.7.0: jest-message-util "^29.7.0" jest-util "^29.7.0" -extend@^3.0.0: - version "3.0.2" - resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.2.tgz#f8b1136b4071fbd8eb140aff858b1019ec2915fa" - integrity sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g== - fast-deep-equal@^3.1.1, fast-deep-equal@^3.1.3: version "3.1.3" resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525" @@ -5623,7 +5584,7 @@ fast-levenshtein@^2.0.6: resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917" integrity sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw== -fastq@^1.6.0: +fastq@^1.13.0, fastq@^1.6.0: version "1.15.0" resolved "https://registry.yarnpkg.com/fastq/-/fastq-1.15.0.tgz#d04d07c6a2a68fe4599fea8d2e103a937fae6b3a" integrity sha512-wBrocU2LCXXa+lWBt8RoIRD89Fi8OdABODa/kEnyeyjS5aZO5/GNvI5sEINADqP/h8M29UHTHUb53sUu5Ihqdw== @@ -5702,14 +5663,6 @@ flatted@^3.2.9: resolved "https://registry.yarnpkg.com/flatted/-/flatted-3.2.9.tgz#7eb4c67ca1ba34232ca9d2d93e9886e611ad7daf" integrity sha512-36yxDn5H7OFZQla0/jFJmbIKTdZAQHngCedGxiMmpNfEZM0sdEeT+WczLQrjK6D7o2aiyLYDnkw0R3JK0Qv1RQ== -flush-write-stream@^1.0.2: - version "1.1.1" - resolved "https://registry.yarnpkg.com/flush-write-stream/-/flush-write-stream-1.1.1.tgz#8dd7d873a1babc207d94ead0c2e0e44276ebf2e8" - integrity sha512-3Z4XhFZ3992uIq0XOqb9AreonueSYphE6oYbpt5+3u06JWklbsPkNv3ZKkP9Bz/r+1MWCaMoSQ28P85+1Yc77w== - dependencies: - inherits "^2.0.3" - readable-stream "^2.3.6" - for-each@^0.3.3: version "0.3.3" resolved "https://registry.yarnpkg.com/for-each/-/for-each-0.3.3.tgz#69b447e88a0a5d32c3e7084f3f1710034b21376e" @@ -5769,13 +5722,13 @@ fs-merger@^3.2.1: fs-tree-diff "^2.0.1" walk-sync "^2.2.0" -fs-mkdirp-stream@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/fs-mkdirp-stream/-/fs-mkdirp-stream-1.0.0.tgz#0b7815fc3201c6a69e14db98ce098c16935259eb" - integrity sha512-+vSd9frUnapVC2RZYfL3FCB2p3g4TBhaUmrsWlSudsGdnxIuUvBB2QM1VZeBtc49QFwrp+wQLrDs3+xxDgI5gQ== +fs-mkdirp-stream@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/fs-mkdirp-stream/-/fs-mkdirp-stream-2.0.1.tgz#1e82575c4023929ad35cf69269f84f1a8c973aa7" + integrity sha512-UTOY+59K6IA94tec8Wjqm0FSh5OVudGNB0NL/P6fB3HiE3bYOY3VYBGijsnOHNkQSwC1FKkU77pmq7xp9CskLw== dependencies: - graceful-fs "^4.1.11" - through2 "^2.0.3" + graceful-fs "^4.2.8" + streamx "^2.12.0" fs-tree-diff@^2.0.1: version "2.0.1" @@ -5861,14 +5814,6 @@ get-symbol-description@^1.0.0: call-bind "^1.0.2" get-intrinsic "^1.1.1" -glob-parent@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-3.1.0.tgz#9e6af6299d8d3bd2bd40430832bd113df906c5ae" - integrity sha512-E8Ak/2+dZY6fnzlR7+ueWvhsH1SjHr4jjss4YS/h4py44jY9MhK/VFdaZJAWDz6BbL21KeteKxFSFpq8OS5gVA== - dependencies: - is-glob "^3.1.0" - path-dirname "^1.0.0" - glob-parent@^5.1.2, glob-parent@~5.1.2: version "5.1.2" resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.2.tgz#869832c58034fe68a4093c17dc15e8340d8401c4" @@ -5883,21 +5828,19 @@ glob-parent@^6.0.2: dependencies: is-glob "^4.0.3" -glob-stream@^6.1.0: - version "6.1.0" - resolved "https://registry.yarnpkg.com/glob-stream/-/glob-stream-6.1.0.tgz#7045c99413b3eb94888d83ab46d0b404cc7bdde4" - integrity sha512-uMbLGAP3S2aDOHUDfdoYcdIePUCfysbAd0IAoWVZbeGU/oNQ8asHVSshLDJUPWxfzj8zsCG7/XeHPHTtow0nsw== +glob-stream@^8.0.0: + version "8.0.0" + resolved "https://registry.yarnpkg.com/glob-stream/-/glob-stream-8.0.0.tgz#c4ed84de7fcc0b4c0f02e7f4cc0dc9c462c47236" + integrity sha512-CdIUuwOkYNv9ZadR3jJvap8CMooKziQZ/QCSPhEb7zqfsEI5YnPmvca7IvbaVE3z58ZdUYD2JsU6AUWjL8WZJA== dependencies: - extend "^3.0.0" - glob "^7.1.1" - glob-parent "^3.1.0" + "@gulpjs/to-absolute-glob" "^4.0.0" + anymatch "^3.1.3" + fastq "^1.13.0" + glob-parent "^6.0.2" + is-glob "^4.0.3" is-negated-glob "^1.0.0" - ordered-read-streams "^1.0.0" - pumpify "^1.3.5" - readable-stream "^2.1.5" - remove-trailing-separator "^1.0.1" - to-absolute-glob "^2.0.0" - unique-stream "^2.0.2" + normalize-path "^3.0.0" + streamx "^2.12.5" glob@9.3.2: version "9.3.2" @@ -5909,7 +5852,7 @@ glob@9.3.2: minipass "^4.2.4" path-scurry "^1.6.1" -glob@^7.0.0, glob@^7.1.1, glob@^7.1.3, glob@^7.1.4: +glob@^7.0.0, glob@^7.1.3, glob@^7.1.4: version "7.2.3" resolved "https://registry.yarnpkg.com/glob/-/glob-7.2.3.tgz#b8df0fb802bbfa8e89bd1d938b4e16578ed44f2b" integrity sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q== @@ -5964,7 +5907,7 @@ gopd@^1.0.1: dependencies: get-intrinsic "^1.1.3" -graceful-fs@^4.0.0, graceful-fs@^4.1.11, graceful-fs@^4.1.6, graceful-fs@^4.2.0, graceful-fs@^4.2.9: +graceful-fs@^4.1.6, graceful-fs@^4.2.0, graceful-fs@^4.2.10, graceful-fs@^4.2.11, graceful-fs@^4.2.8, graceful-fs@^4.2.9: version "4.2.11" resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.11.tgz#4183e4e8bf08bb6e05bbb2f7d2e0c8f712ca40e3" integrity sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ== @@ -6150,9 +6093,9 @@ i18next-http-backend@^2.0.0: cross-fetch "3.1.6" i18next-parser@^8.0.0: - version "8.8.0" - resolved "https://registry.yarnpkg.com/i18next-parser/-/i18next-parser-8.8.0.tgz#4aa63729c183927bd09662936d5aa660b651fdb0" - integrity sha512-4Eh213/7+cVg/HNR3q/rIeso/IwbUdKSuxz2iJNc3iIL7FFyRJBtgGF7s2UcJyPp+/EtIujo4wAnuSFkR6oO6Q== + version "8.9.0" + resolved "https://registry.yarnpkg.com/i18next-parser/-/i18next-parser-8.9.0.tgz#aab1f9afd174a6da74d4f3d96a66518e922fc4f5" + integrity sha512-8B+XTeBscPeswJbpBlGYxzUNXybDRltwTupJD+lLTGzBwfSfviAsSl2MEFpHc/fVlwjjd4Muw19nMpK2O+CB8A== dependencies: broccoli-plugin "^4.0.7" cheerio "^1.0.0-rc.2" @@ -6162,31 +6105,24 @@ i18next-parser@^8.0.0: esbuild "^0.19.0" fs-extra "^11.1.0" gulp-sort "^2.0.0" - i18next "^22.0.4" + i18next "^23.5.1" js-yaml "4.1.0" lilconfig "^2.0.6" rsvp "^4.8.2" sort-keys "^5.0.0" typescript "^5.0.4" vinyl "~3.0.0" - vinyl-fs "^3.0.2" + vinyl-fs "^4.0.0" vue-template-compiler "^2.6.11" -i18next@^22.0.4: - version "22.5.1" - resolved "https://registry.yarnpkg.com/i18next/-/i18next-22.5.1.tgz#99df0b318741a506000c243429a7352e5f44d424" - integrity sha512-8TGPgM3pAD+VRsMtUMNknRz3kzqwp/gPALrWMsDnmC1mKqJwpWyooQRLMcbTwq8z8YwSmuj+ZYvc+xCuEpkssA== - dependencies: - "@babel/runtime" "^7.20.6" - -i18next@^23.0.0: +i18next@^23.0.0, i18next@^23.5.1: version "23.5.1" resolved "https://registry.yarnpkg.com/i18next/-/i18next-23.5.1.tgz#7f7c35ffaa907618d9489f106d5006b09fbca3d3" integrity sha512-JelYzcaCoFDaa+Ysbfz2JsGAKkrHiMG6S61+HLBUEIPaF40WMwW9hCPymlQGrP+wWawKxKPuSuD71WZscCsWHg== dependencies: "@babel/runtime" "^7.22.5" -iconv-lite@0.6.3: +iconv-lite@0.6.3, iconv-lite@^0.6.3: version "0.6.3" resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.6.3.tgz#a52f80bf38da1952eb5c681790719871a1a72501" integrity sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw== @@ -6259,7 +6195,7 @@ inflight@^1.0.4: once "^1.3.0" wrappy "1" -inherits@2, inherits@^2.0.1, inherits@^2.0.3, inherits@~2.0.3: +inherits@2, inherits@^2.0.3, inherits@^2.0.4, inherits@~2.0.3: version "2.0.4" resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== @@ -6295,14 +6231,6 @@ invariant@^2.2.4: dependencies: loose-envify "^1.0.0" -is-absolute@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-absolute/-/is-absolute-1.0.0.tgz#395e1ae84b11f26ad1795e73c17378e48a301576" - integrity sha512-dOWoqflvcydARa360Gvv18DZ/gRuHKi2NU/wU5X1ZFzdYfH29nkiNZsF3mp4OJ3H4yo9Mx8A/uAGNzpzPN3yBA== - dependencies: - is-relative "^1.0.0" - is-windows "^1.0.1" - is-arguments@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/is-arguments/-/is-arguments-1.1.1.tgz#15b3f88fda01f2a97fec84ca761a560f123efa9b" @@ -6354,11 +6282,6 @@ is-boolean-object@^1.1.0: call-bind "^1.0.2" has-tostringtag "^1.0.0" -is-buffer@^1.1.5: - version "1.1.6" - resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-1.1.6.tgz#efaa2ea9daa0d7ab2ea13a97b2b8ad51fefbe8be" - integrity sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w== - is-builtin-module@^3.2.1: version "3.2.1" resolved "https://registry.yarnpkg.com/is-builtin-module/-/is-builtin-module-3.2.1.tgz#f03271717d8654cfcaf07ab0463faa3571581169" @@ -6385,7 +6308,7 @@ is-date-object@^1.0.1, is-date-object@^1.0.5: dependencies: has-tostringtag "^1.0.0" -is-extglob@^2.1.0, is-extglob@^2.1.1: +is-extglob@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2" integrity sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ== @@ -6414,13 +6337,6 @@ is-generator-function@^1.0.10: dependencies: has-tostringtag "^1.0.0" -is-glob@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-3.1.0.tgz#7ba5ae24217804ac70707b96922567486cc3e84a" - integrity sha512-UFpDDrPgM6qpnFNI+rh/p3bUaq9hKLZN8bMUWzxmcnZVS3omf4IPK+BrewlnWjO1WmUsMYuSjKh4UJuV4+Lqmw== - dependencies: - is-extglob "^2.1.0" - is-glob@^4.0.0, is-glob@^4.0.1, is-glob@^4.0.3, is-glob@~4.0.1: version "4.0.3" resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.3.tgz#64f61e42cbbb2eec2071a9dac0b28ba1e65d5084" @@ -6478,13 +6394,6 @@ is-regex@^1.1.4: call-bind "^1.0.2" has-tostringtag "^1.0.0" -is-relative@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-relative/-/is-relative-1.0.0.tgz#a1bb6935ce8c5dba1e8b9754b9b2dcc020e2260d" - integrity sha512-Kw/ReK0iqwKeu0MITLFuj0jbPAmEiOsIwyIXvvbfa6QfmN9pkD1M+8pdk7Rl/dTKbH34/XBFMbgD4iMJhLQbGA== - dependencies: - is-unc-path "^1.0.0" - is-set@^2.0.1, is-set@^2.0.2: version "2.0.2" resolved "https://registry.yarnpkg.com/is-set/-/is-set-2.0.2.tgz#90755fa4c2562dc1c5d4024760d6119b94ca18ec" @@ -6528,18 +6437,6 @@ is-typed-array@^1.1.10, is-typed-array@^1.1.12, is-typed-array@^1.1.9: dependencies: which-typed-array "^1.1.11" -is-unc-path@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-unc-path/-/is-unc-path-1.0.0.tgz#d731e8898ed090a12c352ad2eaed5095ad322c9d" - integrity sha512-mrGpVd0fs7WWLfVsStvgF6iEJnbjDFZh9/emhRDcGWTduTfNHd9CHeUwH3gYIjdbwo4On6hunkztwOaAw0yllQ== - dependencies: - unc-path-regex "^0.1.2" - -is-utf8@^0.2.1: - version "0.2.1" - resolved "https://registry.yarnpkg.com/is-utf8/-/is-utf8-0.2.1.tgz#4b0da1442104d1b336340e80797e865cf39f7d72" - integrity sha512-rMYPYvCzsXywIsldgLaSoPlw5PfoB/ssr7hY4pLfcodrA5M/eArza1a9VmTiNIBNMjOGr1Ow9mTyU2o69U6U9Q== - is-valid-glob@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/is-valid-glob/-/is-valid-glob-1.0.0.tgz#29bf3eff701be2d4d315dbacc39bc39fe8f601aa" @@ -6565,11 +6462,6 @@ is-weakset@^2.0.1: call-bind "^1.0.2" get-intrinsic "^1.1.1" -is-windows@^1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/is-windows/-/is-windows-1.0.2.tgz#d1850eb9791ecd18e6182ce12a30f396634bb19d" - integrity sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA== - isarray@0.0.1: version "0.0.1" resolved "https://registry.yarnpkg.com/isarray/-/isarray-0.0.1.tgz#8a18acfca9a8f4177e09abfc6038939b05d1eedf" @@ -7196,19 +7088,10 @@ language-tags@=1.0.5: dependencies: language-subtag-registry "~0.3.2" -lazystream@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/lazystream/-/lazystream-1.0.1.tgz#494c831062f1f9408251ec44db1cba29242a2638" - integrity sha512-b94GiNHQNy6JNTrt5w6zNyffMrNkXZb3KTkCZJb2V1xaEGCk093vkZ2jk3tpaeP33/OiXC+WvK9AxUebnf5nbw== - dependencies: - readable-stream "^2.0.5" - -lead@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/lead/-/lead-1.0.0.tgz#6f14f99a37be3a9dd784f5495690e5903466ee42" - integrity sha512-IpSVCk9AYvLHo5ctcIXxOBpMWUe+4TKN3VPWAKUbJikkmsGp0VrSM8IttVc32D6J4WUsiPE6aEFRNmIoF/gdow== - dependencies: - flush-write-stream "^1.0.2" +lead@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/lead/-/lead-4.0.0.tgz#5317a49effb0e7ec3a0c8fb9c1b24fb716aab939" + integrity sha512-DpMa59o5uGUWWjruMp71e6knmwKU3jRBBn1kjuLWN9EeIOxNeSAwvHf03WIl8g/ZMR2oSQC9ej3yeLBwdDc/pg== leven@^3.1.0: version "3.1.0" @@ -7545,14 +7428,7 @@ normalize-package-data@^2.5.0: semver "2 || 3 || 4 || 5" validate-npm-package-license "^3.0.1" -normalize-path@^2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-2.1.1.tgz#1ab28b556e198363a8c1a6f7e6fa20137fe6aed9" - integrity sha512-3pKJwH184Xo/lnH6oyP1q2pMd7HcypqqmRs91/6/i2CGtWwIKGCkOOMTm/zXbgTEWHw1uNpNi/igc3ePOYHb6w== - dependencies: - remove-trailing-separator "^1.0.1" - -normalize-path@^3.0.0, normalize-path@~3.0.0: +normalize-path@3.0.0, normalize-path@^3.0.0, normalize-path@~3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-3.0.0.tgz#0dcd69ff23a1c9b11fd0978316644a0388216a65" integrity sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA== @@ -7574,12 +7450,12 @@ normalize.css@^8.0.1: resolved "https://registry.yarnpkg.com/normalize.css/-/normalize.css-8.0.1.tgz#9b98a208738b9cc2634caacbc42d131c97487bf3" integrity sha512-qizSNPO93t1YUuUhP22btGOo3chcvDFqFaj2TRybP0DMxkHOCTYwp3n34fel4a31ORXy4m1Xq0Gyqpb5m33qIg== -now-and-later@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/now-and-later/-/now-and-later-2.0.1.tgz#8e579c8685764a7cc02cb680380e94f43ccb1f7c" - integrity sha512-KGvQ0cB70AQfg107Xvs/Fbu+dGmZoTRJp2TaPwcwQm3/7PteUyN2BCgk8KBMPGBUXZdVwyWS8fDCGFygBm19UQ== +now-and-later@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/now-and-later/-/now-and-later-3.0.0.tgz#cdc045dc5b894b35793cf276cc3206077bb7302d" + integrity sha512-pGO4pzSdaxhWTGkfSfHx3hVzJVslFPwBp2Myq9MYN/ChfJZF87ochMAXnvz6/58RJSf5ik2q9tXprBBrk2cpcg== dependencies: - once "^1.3.2" + once "^1.4.0" npm-run-path@^4.0.1: version "4.0.1" @@ -7623,7 +7499,7 @@ object-keys@^1.1.1: resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.1.1.tgz#1c47f272df277f3b1daf061677d9c82e2322c60e" integrity sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA== -object.assign@^4.0.4, object.assign@^4.1.4: +object.assign@^4.1.4: version "4.1.4" resolved "https://registry.yarnpkg.com/object.assign/-/object.assign-4.1.4.tgz#9673c7c7c351ab8c4d0b516f4343ebf4dfb7799f" integrity sha512-1mxKf0e58bvyjSCtKYY4sRe9itRk3PJpquJOjeIkz885CczcI4IvJJDLPS72oowuSh+pBxUFROpX+TU++hxhZQ== @@ -7686,7 +7562,7 @@ oidc-client-ts@^2.2.4: crypto-js "^4.1.1" jwt-decode "^3.1.2" -once@^1.3.0, once@^1.3.1, once@^1.3.2, once@^1.4.0: +once@^1.3.0, once@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" integrity sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w== @@ -7717,13 +7593,6 @@ optionator@^0.9.3: prelude-ls "^1.2.1" type-check "^0.4.0" -ordered-read-streams@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/ordered-read-streams/-/ordered-read-streams-1.0.1.tgz#77c0cb37c41525d64166d990ffad7ec6a0e1363e" - integrity sha512-Z87aSjx3r5c0ZB7bcJqIgIRX5bxR7A4aSzvIbaxd0oTkWBCOoKfuGHiKj60CHVUgg1Phm5yMZzBdt8XqRs73Mw== - dependencies: - readable-stream "^2.0.1" - p-limit@^2.2.0: version "2.3.0" resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-2.3.0.tgz#3dd33c647a214fdfffd835933eb086da0dc21db1" @@ -7821,11 +7690,6 @@ parse5@^7.0.0, parse5@^7.1.1: dependencies: entities "^4.4.0" -path-dirname@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/path-dirname/-/path-dirname-1.0.2.tgz#cc33d24d525e099a5388c0336c6e32b9160609e0" - integrity sha512-ALzNPpyNq9AqXMBjeymIjFDAkAFH06mHJH/cSBHAgU0s4vfpBn6b2nf8tiRLvagKD8RbTpq2FKTBg7cl9l3c7Q== - path-exists@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-4.0.0.tgz#513bdbe2d3b95d7762e8c1137efa195c6c61b5b3" @@ -8211,7 +8075,7 @@ pretty-format@^29.0.0, pretty-format@^29.7.0: ansi-styles "^5.0.0" react-is "^18.0.0" -process-nextick-args@^2.0.0, process-nextick-args@~2.0.0: +process-nextick-args@~2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.1.tgz#7820d9b16120cc55ca9ae7792680ae7dba6d7fe2" integrity sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag== @@ -8258,23 +8122,6 @@ psl@^1.1.33: resolved "https://registry.yarnpkg.com/psl/-/psl-1.9.0.tgz#d0df2a137f00794565fcaf3b2c00cd09f8d5a5a7" integrity sha512-E/ZsdU4HLs/68gYzgGTkMicWTLPdAftJLfJFlLUAAKZGkStNU72sZjT66SnMDVOfOWY/YAoiD7Jxa9iHvngcag== -pump@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/pump/-/pump-2.0.1.tgz#12399add6e4cf7526d973cbc8b5ce2e2908b3909" - integrity sha512-ruPMNRkN3MHP1cWJc9OWr+T/xDP0jhXYCLfJcBuX54hhfIBnaQmAUMfDcG4DM5UMWByBbJY69QSphm3jtDKIkA== - dependencies: - end-of-stream "^1.1.0" - once "^1.3.1" - -pumpify@^1.3.5: - version "1.5.1" - resolved "https://registry.yarnpkg.com/pumpify/-/pumpify-1.5.1.tgz#36513be246ab27570b1a374a5ce278bfd74370ce" - integrity sha512-oClZI37HvuUJJxSKKrC17bZ9Cu0ZYhEAGPsPUy9KlMUmv9dKX2o77RUmq7f3XjIxbwyGwYzbzQ1L2Ks8sIradQ== - dependencies: - duplexify "^3.6.0" - inherits "^2.0.3" - pump "^2.0.0" - punycode@^2.1.0, punycode@^2.1.1: version "2.3.0" resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.3.0.tgz#f67fa67c94da8f4d0cfff981aee4118064199b8f" @@ -8456,7 +8303,16 @@ read-pkg@^5.2.0: parse-json "^5.0.0" type-fest "^0.6.0" -readable-stream@^2.0.0, readable-stream@^2.0.1, readable-stream@^2.0.5, readable-stream@^2.1.5, readable-stream@^2.3.3, readable-stream@^2.3.5, readable-stream@^2.3.6, readable-stream@~2.3.6: +readable-stream@^3.4.0: + version "3.6.2" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.6.2.tgz#56a9b36ea965c00c5a93ef31eb111a0f11056967" + integrity sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA== + dependencies: + inherits "^2.0.3" + string_decoder "^1.1.1" + util-deprecate "^1.0.1" + +readable-stream@~2.3.6: version "2.3.8" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.8.tgz#91125e8042bba1b9887f49345f6277027ce8be9b" integrity sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA== @@ -8572,33 +8428,11 @@ regjsparser@^0.9.1: dependencies: jsesc "~0.5.0" -remove-bom-buffer@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/remove-bom-buffer/-/remove-bom-buffer-3.0.0.tgz#c2bf1e377520d324f623892e33c10cac2c252b53" - integrity sha512-8v2rWhaakv18qcvNeli2mZ/TMTL2nEyAKRvzo1WtnZBl15SHyEhrCu2/xKlJyUFKHiHgfXIyuY6g2dObJJycXQ== - dependencies: - is-buffer "^1.1.5" - is-utf8 "^0.2.1" - -remove-bom-stream@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/remove-bom-stream/-/remove-bom-stream-1.2.0.tgz#05f1a593f16e42e1fb90ebf59de8e569525f9523" - integrity sha512-wigO8/O08XHb8YPzpDDT+QmRANfW6vLqxfaXm1YXhnFf3AkSLyjfG3GEFg4McZkmgL7KvCj5u2KczkvSP6NfHA== - dependencies: - remove-bom-buffer "^3.0.0" - safe-buffer "^5.1.0" - through2 "^2.0.3" - -remove-trailing-separator@^1.0.1, remove-trailing-separator@^1.1.0: +remove-trailing-separator@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz#c24bce2a283adad5bc3f58e0d48249b92379d8ef" integrity sha512-/hS+Y0u3aOfIETiaiirUFwDBDzmXPvO+jAfKTitUngIPzdKc6Z0LoFjM/CK5PL4C+eKwHohlHAb6H0VFfmmUsw== -replace-ext@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/replace-ext/-/replace-ext-1.0.1.tgz#2d6d996d04a15855d967443631dd5f77825b016a" - integrity sha512-yD5BHCe7quCgBph4rMQ+0KkIRKwWCrHDOX1p1Gp6HwjPM5kVoCdKGNhN7ydqqsX6lJEnQDKZ/tFMiEdQ1dvPEw== - replace-ext@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/replace-ext/-/replace-ext-2.0.0.tgz#9471c213d22e1bcc26717cd6e50881d88f812b06" @@ -8645,12 +8479,12 @@ resolve-from@^5.0.0: resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-5.0.0.tgz#c35225843df8f776df21c57557bc087e9dfdfc69" integrity sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw== -resolve-options@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/resolve-options/-/resolve-options-1.1.0.tgz#32bb9e39c06d67338dc9378c0d6d6074566ad131" - integrity sha512-NYDgziiroVeDC29xq7bp/CacZERYsA9bXYd1ZmcJlF3BcrZv5pTb4NG7SjdyKDnXZ84aC4vo2u6sNKIA1LCu/A== +resolve-options@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/resolve-options/-/resolve-options-2.0.0.tgz#a1a57a9949db549dd075de3f5550675f02f1e4c5" + integrity sha512-/FopbmmFOQCfsCx77BRFdKOniglTiHumLgwvd6IDPihy1GKkadZbgQJBcTb2lMzSR1pndzd96b1nZrreZ7+9/A== dependencies: - value-or-function "^3.0.0" + value-or-function "^4.0.0" resolve-pathname@^3.0.0: version "3.0.0" @@ -8754,16 +8588,16 @@ safe-array-concat@^1.0.1: has-symbols "^1.0.3" isarray "^2.0.5" -safe-buffer@^5.1.0: - version "5.2.1" - resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" - integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== - safe-buffer@~5.1.0, safe-buffer@~5.1.1: version "5.1.2" resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d" integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g== +safe-buffer@~5.2.0: + version "5.2.1" + resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" + integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== + safe-regex-test@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/safe-regex-test/-/safe-regex-test-1.0.0.tgz#793b874d524eb3640d1873aad03596db2d4f2295" @@ -8985,12 +8819,14 @@ stop-iteration-iterator@^1.0.0: dependencies: internal-slot "^1.0.4" -stream-shift@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/stream-shift/-/stream-shift-1.0.1.tgz#d7088281559ab2778424279b0877da3c392d5a3d" - integrity sha512-AiisoFqQ0vbGcZgQPY1cdP2I76glaVA/RauYR4G4thNFgkTqr90yXTo4LYX60Jl+sIlPNHHdGSwo01AvbKUSVQ== +stream-composer@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/stream-composer/-/stream-composer-1.0.2.tgz#7ee61ca1587bf5f31b2e29aa2093cbf11442d152" + integrity sha512-bnBselmwfX5K10AH6L4c8+S5lgZMWI7ZYrz2rvYjCPB2DIMC4Ig8OpxGpNJSxRZ58oti7y1IcNvjBAz9vW5m4w== + dependencies: + streamx "^2.13.2" -streamx@^2.12.5: +streamx@^2.12.0, streamx@^2.12.5, streamx@^2.13.2, streamx@^2.14.0: version "2.15.1" resolved "https://registry.yarnpkg.com/streamx/-/streamx-2.15.1.tgz#396ad286d8bc3eeef8f5cea3f029e81237c024c6" integrity sha512-fQMzy2O/Q47rgwErk/eGeLu/roaFWV0jVsogDmrszM9uIw8L5OA+t+V93MgYlufNptfjmYR1tOMWhei/Eh7TQA== @@ -9062,6 +8898,13 @@ string.prototype.trimstart@^1.0.7: define-properties "^1.2.0" es-abstract "^1.22.1" +string_decoder@^1.1.1: + version "1.3.0" + resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.3.0.tgz#42f114594a46cf1a8e30b0a84f56c78c3edac21e" + integrity sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA== + dependencies: + safe-buffer "~5.2.0" + string_decoder@~1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.1.1.tgz#9cf1611ba62685d7030ae9e4ba34149c3af03fc8" @@ -9218,15 +9061,7 @@ thriftrw@^3.5.0: error "7.0.2" long "^2.4.0" -through2-filter@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/through2-filter/-/through2-filter-3.0.0.tgz#700e786df2367c2c88cd8aa5be4cf9c1e7831254" - integrity sha512-jaRjI2WxN3W1V8/FMZ9HKIBXixtiqs3SQSX4/YGIiP3gL6djW48VoZq9tDqeCWs3MT8YY5wb/zli8VW8snY1CA== - dependencies: - through2 "~2.0.0" - xtend "~4.0.0" - -through2@^2.0.0, through2@^2.0.1, through2@^2.0.3, through2@~2.0.0: +through2@^2.0.1: version "2.0.5" resolved "https://registry.yarnpkg.com/through2/-/through2-2.0.5.tgz#01c1e39eb31d07cb7d03a96a70823260b23132cd" integrity sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ== @@ -9254,14 +9089,6 @@ tmpl@1.0.5: resolved "https://registry.yarnpkg.com/tmpl/-/tmpl-1.0.5.tgz#8683e0b902bb9c20c4f726e3c0b69f36518c07cc" integrity sha512-3f0uOEAQwIqGuWW2MVzYg8fV/QNnc/IpuJNG837rLuczAaLVHslWHZQj4IGiEl5Hs3kkbhwL9Ab7Hrsmuj+Smw== -to-absolute-glob@^2.0.0: - version "2.0.2" - resolved "https://registry.yarnpkg.com/to-absolute-glob/-/to-absolute-glob-2.0.2.tgz#1865f43d9e74b0822db9f145b78cff7d0f7c849b" - integrity sha512-rtwLUQEwT8ZeKQbyFJyomBRYXyE16U5VKuy0ftxLMK/PZb2fkOsg5r9kHdauuVDbsNdIBoC/HCthpidamQFXYA== - dependencies: - is-absolute "^1.0.0" - is-negated-glob "^1.0.0" - to-fast-properties@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-2.0.0.tgz#dc5e698cbd079265bc73e0377681a4e4e83f616e" @@ -9274,12 +9101,12 @@ to-regex-range@^5.0.1: dependencies: is-number "^7.0.0" -to-through@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/to-through/-/to-through-2.0.0.tgz#fc92adaba072647bc0b67d6b03664aa195093af6" - integrity sha512-+QIz37Ly7acM4EMdw2PRN389OneM5+d844tirkGp4dPKzI5OE72V9OsbFp+CIYJDahZ41ZV05hNtcPAQUAm9/Q== +to-through@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/to-through/-/to-through-3.0.0.tgz#bf4956eaca5a0476474850a53672bed6906ace54" + integrity sha512-y8MN937s/HVhEoBU1SxfHC+wxCHkV1a9gW8eAdTadYh/bGyesZIVcbjI+mSpFbSVwQici/XjBjuUyri1dnXwBw== dependencies: - through2 "^2.0.3" + streamx "^2.12.5" toggle-selection@^1.0.6: version "1.0.6" @@ -9431,11 +9258,6 @@ unbox-primitive@^1.0.2: has-symbols "^1.0.3" which-boxed-primitive "^1.0.2" -unc-path-regex@^0.1.2: - version "0.1.2" - resolved "https://registry.yarnpkg.com/unc-path-regex/-/unc-path-regex-0.1.2.tgz#e73dd3d7b0d7c5ed86fbac6b0ae7d8c6a69d50fa" - integrity sha512-eXL4nmJT7oCpkZsHZUOJo8hcX3GbsiDOa0Qu9F646fi8dT3XuSVopVqAcEiVzSKKH7UoDti23wNX3qGFxcW5Qg== - underscore.string@~3.3.4: version "3.3.6" resolved "https://registry.yarnpkg.com/underscore.string/-/underscore.string-3.3.6.tgz#ad8cf23d7423cb3b53b898476117588f4e2f9159" @@ -9482,14 +9304,6 @@ unique-names-generator@^4.6.0: resolved "https://registry.yarnpkg.com/unique-names-generator/-/unique-names-generator-4.7.1.tgz#966407b12ba97f618928f77322cfac8c80df5597" integrity sha512-lMx9dX+KRmG8sq6gulYYpKWZc9RlGsgBR6aoO8Qsm3qvkSJ+3rAymr+TnV8EDMrIrwuFJ4kruzMWM/OpYzPoow== -unique-stream@^2.0.2: - version "2.3.1" - resolved "https://registry.yarnpkg.com/unique-stream/-/unique-stream-2.3.1.tgz#c65d110e9a4adf9a6c5948b28053d9a8d04cbeac" - integrity sha512-2nY4TnBE70yoxHkDli7DMazpWiP7xMdCYqU2nBRO0UB+ZpEkGsSija7MvmvnZFUeC+mrgiUfcHSr3LmRFIg4+A== - dependencies: - json-stable-stringify-without-jsonify "^1.0.1" - through2-filter "^3.0.0" - universalify@^0.1.0: version "0.1.2" resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.1.2.tgz#b646f69be3942dabcecc9d6639c80dc105efaa66" @@ -9558,7 +9372,7 @@ usehooks-ts@^2.9.1: resolved "https://registry.yarnpkg.com/usehooks-ts/-/usehooks-ts-2.9.1.tgz#953d3284851ffd097432379e271ce046a8180b37" integrity sha512-2FAuSIGHlY+apM9FVlj8/oNhd+1y+Uwv5QNkMQz1oSfdHk4PXo1qoCw9I5M7j0vpH8CSWFJwXbVPeYDjLCx9PA== -util-deprecate@^1.0.2, util-deprecate@~1.0.1: +util-deprecate@^1.0.1, util-deprecate@^1.0.2, util-deprecate@~1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" integrity sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw== @@ -9595,10 +9409,10 @@ value-equal@^1.0.1: resolved "https://registry.yarnpkg.com/value-equal/-/value-equal-1.0.1.tgz#1e0b794c734c5c0cade179c437d356d931a34d6c" integrity sha512-NOJ6JZCAWr0zlxZt+xqCHNTEKOsrks2HQd4MqhP1qy4z1SkbEP467eNx6TgDKXMvUOb+OENfJCZwM+16n7fRfw== -value-or-function@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/value-or-function/-/value-or-function-3.0.0.tgz#1c243a50b595c1be54a754bfece8563b9ff8d813" - integrity sha512-jdBB2FrWvQC/pnPtIqcLsMaQgjhdb6B7tk1MMyTKapox+tQZbdRP4uLxu/JY0t7fbfDCUMnuelzEYv5GsxHhdg== +value-or-function@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/value-or-function/-/value-or-function-4.0.0.tgz#70836b6a876a010dc3a2b884e7902e9db064378d" + integrity sha512-aeVK81SIuT6aMJfNo9Vte8Dw0/FZINGBV8BfCraGtqVxIeLAEhJyoWs8SmvRVmXfGss2PmmOwZCuBPbZR+IYWg== vaul@^0.7.0: version "0.7.1" @@ -9607,55 +9421,47 @@ vaul@^0.7.0: dependencies: "@radix-ui/react-dialog" "^1.0.4" -vinyl-fs@^3.0.2: - version "3.0.3" - resolved "https://registry.yarnpkg.com/vinyl-fs/-/vinyl-fs-3.0.3.tgz#c85849405f67428feabbbd5c5dbdd64f47d31bc7" - integrity sha512-vIu34EkyNyJxmP0jscNzWBSygh7VWhqun6RmqVfXePrOwi9lhvRs//dOaGOTRUQr4tx7/zd26Tk5WeSVZitgng== +vinyl-contents@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/vinyl-contents/-/vinyl-contents-2.0.0.tgz#cc2ba4db3a36658d069249e9e36d9e2b41935d89" + integrity sha512-cHq6NnGyi2pZ7xwdHSW1v4Jfnho4TEGtxZHw01cmnc8+i7jgR6bRnED/LbrKan/Q7CvVLbnvA5OepnhbpjBZ5Q== dependencies: - fs-mkdirp-stream "^1.0.0" - glob-stream "^6.1.0" - graceful-fs "^4.0.0" + bl "^5.0.0" + vinyl "^3.0.0" + +vinyl-fs@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/vinyl-fs/-/vinyl-fs-4.0.0.tgz#06cb36efc911c6e128452f230b96584a9133c3a1" + integrity sha512-7GbgBnYfaquMk3Qu9g22x000vbYkOex32930rBnc3qByw6HfMEAoELjCjoJv4HuEQxHAurT+nvMHm6MnJllFLw== + dependencies: + fs-mkdirp-stream "^2.0.1" + glob-stream "^8.0.0" + graceful-fs "^4.2.11" + iconv-lite "^0.6.3" is-valid-glob "^1.0.0" - lazystream "^1.0.0" - lead "^1.0.0" - object.assign "^4.0.4" - pumpify "^1.3.5" - readable-stream "^2.3.3" - remove-bom-buffer "^3.0.0" - remove-bom-stream "^1.2.0" - resolve-options "^1.1.0" - through2 "^2.0.0" - to-through "^2.0.0" - value-or-function "^3.0.0" - vinyl "^2.0.0" - vinyl-sourcemap "^1.1.0" + lead "^4.0.0" + normalize-path "3.0.0" + resolve-options "^2.0.0" + stream-composer "^1.0.2" + streamx "^2.14.0" + to-through "^3.0.0" + value-or-function "^4.0.0" + vinyl "^3.0.0" + vinyl-sourcemap "^2.0.0" -vinyl-sourcemap@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/vinyl-sourcemap/-/vinyl-sourcemap-1.1.0.tgz#92a800593a38703a8cdb11d8b300ad4be63b3e16" - integrity sha512-NiibMgt6VJGJmyw7vtzhctDcfKch4e4n9TBeoWlirb7FMg9/1Ov9k+A5ZRAtywBpRPiyECvQRQllYM8dECegVA== +vinyl-sourcemap@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/vinyl-sourcemap/-/vinyl-sourcemap-2.0.0.tgz#422f410a0ea97cb54cebd698d56a06d7a22e0277" + integrity sha512-BAEvWxbBUXvlNoFQVFVHpybBbjW1r03WhohJzJDSfgrrK5xVYIDTan6xN14DlyImShgDRv2gl9qhM6irVMsV0Q== dependencies: - append-buffer "^1.0.2" - convert-source-map "^1.5.0" - graceful-fs "^4.1.6" - normalize-path "^2.1.1" - now-and-later "^2.0.0" - remove-bom-buffer "^3.0.0" - vinyl "^2.0.0" + convert-source-map "^2.0.0" + graceful-fs "^4.2.10" + now-and-later "^3.0.0" + streamx "^2.12.5" + vinyl "^3.0.0" + vinyl-contents "^2.0.0" -vinyl@^2.0.0: - version "2.2.1" - resolved "https://registry.yarnpkg.com/vinyl/-/vinyl-2.2.1.tgz#23cfb8bbab5ece3803aa2c0a1eb28af7cbba1974" - integrity sha512-LII3bXRFBZLlezoG5FfZVcXflZgWP/4dCwKtxd5ky9+LOtM4CS3bIRQsmR1KMnMW07jpE8fqR2lcxPZ+8sJIcw== - dependencies: - clone "^2.1.1" - clone-buffer "^1.0.0" - clone-stats "^1.0.0" - cloneable-readable "^1.0.0" - remove-trailing-separator "^1.0.1" - replace-ext "^1.0.0" - -vinyl@~3.0.0: +vinyl@^3.0.0, vinyl@~3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/vinyl/-/vinyl-3.0.0.tgz#11e14732bf56e2faa98ffde5157fe6c13259ff30" integrity sha512-rC2VRfAVVCGEgjnxHUnpIVh3AGuk62rP3tqVrn+yab0YH7UULisC085+NYH+mnqf3Wx4SpSi1RQMwudL89N03g== From fb1fc1a882da1faa628ac06a89dc5e2af80623e5 Mon Sep 17 00:00:00 2001 From: Robin Date: Fri, 13 Oct 2023 14:28:32 -0400 Subject: [PATCH 45/48] Remove Netlify CD develop.element.io and Nightly were the final things to depend on this deployment, and they've now been updated to use call.element.dev, so we can disable Netlify deployments. --- .github/workflows/netlify-fullmesh.yaml | 88 ------------------------- .github/workflows/netlify-livekit.yaml | 87 ------------------------ 2 files changed, 175 deletions(-) delete mode 100644 .github/workflows/netlify-fullmesh.yaml delete mode 100644 .github/workflows/netlify-livekit.yaml diff --git a/.github/workflows/netlify-fullmesh.yaml b/.github/workflows/netlify-fullmesh.yaml deleted file mode 100644 index 117e0546..00000000 --- a/.github/workflows/netlify-fullmesh.yaml +++ /dev/null @@ -1,88 +0,0 @@ -name: Netlify Main -on: - workflow_run: - workflows: ["Build"] - types: - - completed - branches: - - "full-mesh" - -jobs: - deploy: - runs-on: ubuntu-latest - permissions: - deployments: write - # Important: the 'branches' filter above will match the 'main' branch on forks, - # so we need to check the head repo too in order to not run on PRs from forks - # We check the branch name again too just for completeness - # (Is there a nicer way to see if a PR is from a fork?) - if: github.event.workflow_run.conclusion == 'success' && github.event.workflow_run.head_repository.full_name == 'vector-im/element-call' && github.event.workflow_run.head_branch == 'full-mesh' - steps: - - name: Create Deployment - uses: bobheadxi/deployments@v1 - id: deployment - with: - step: start - token: ${{ secrets.GITHUB_TOKEN }} - env: main-branch-cd - ref: ${{ github.event.workflow_run.head_sha }} - - - name: "Download artifact" - uses: actions/github-script@v6.4.1 - with: - script: | - const artifacts = await github.rest.actions.listWorkflowRunArtifacts({ - owner: context.repo.owner, - repo: context.repo.repo, - run_id: ${{ github.event.workflow_run.id }}, - }); - const matchArtifact = artifacts.data.artifacts.filter((artifact) => { - return artifact.name == "build" - })[0]; - const download = await github.rest.actions.downloadArtifact({ - owner: context.repo.owner, - repo: context.repo.repo, - artifact_id: matchArtifact.id, - archive_format: 'zip', - }); - const fs = require('fs'); - fs.writeFileSync('${{github.workspace}}/build.zip', Buffer.from(download.data)); - - - name: Extract Artifacts - run: unzip -d dist build.zip && rm build.zip - - - name: Add redirects file - # We fetch from github directly as we don't bother checking out the repo - run: curl -s https://raw.githubusercontent.com/vector-im/element-call/main/config/netlify_redirects > dist/_redirects - - - name: Add config file - run: curl -s https://raw.githubusercontent.com/vector-im/element-call/main/config/element_io_develop.json > dist/config.json - - - name: Deploy to Netlify - id: netlify - uses: nwtgck/actions-netlify@v2.1.0 - with: - publish-dir: dist - deploy-message: "Deploy from GitHub Actions" - production-branch: main - production-deploy: true - # These don't work because we're in workflow_run - enable-pull-request-comment: false - enable-commit-comment: false - github-deployment-environment: main - env: - NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} - NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }} - timeout-minutes: 1 - - - name: Update deployment status - uses: bobheadxi/deployments@v1 - if: always() - with: - step: finish - override: false - token: ${{ secrets.GITHUB_TOKEN }} - status: ${{ job.status }} - env: ${{ steps.deployment.outputs.env }} - deployment_id: ${{ steps.deployment.outputs.deployment_id }} - env_url: ${{ steps.netlify.outputs.deploy-url }} diff --git a/.github/workflows/netlify-livekit.yaml b/.github/workflows/netlify-livekit.yaml deleted file mode 100644 index c5d2bcf3..00000000 --- a/.github/workflows/netlify-livekit.yaml +++ /dev/null @@ -1,87 +0,0 @@ -name: Netlify LiveKit -on: - workflow_run: - workflows: ["Build"] - types: - - completed - branches: - - "livekit" - -jobs: - deploy: - runs-on: ubuntu-latest - permissions: - deployments: write - # Important: the 'branches' filter above will match the 'livekit' branch on forks, - # so we need to check the head repo too in order to not run on PRs from forks - # We check the branch name again too just for completeness - # (Is there a nicer way to see if a PR is from a fork?) - if: github.event.workflow_run.conclusion == 'success' && github.event.workflow_run.head_repository.full_name == 'vector-im/element-call' && github.event.workflow_run.head_branch == 'livekit' - steps: - - name: Create Deployment - uses: bobheadxi/deployments@v1 - id: deployment - with: - step: start - token: ${{ secrets.GITHUB_TOKEN }} - env: livekit-experiment-branch-cd - ref: ${{ github.event.workflow_run.head_sha }} - - - name: "Download artifact" - uses: actions/github-script@v6.4.1 - with: - script: | - const artifacts = await github.rest.actions.listWorkflowRunArtifacts({ - owner: context.repo.owner, - repo: context.repo.repo, - run_id: ${{ github.event.workflow_run.id }}, - }); - const matchArtifact = artifacts.data.artifacts.filter((artifact) => { - return artifact.name == "build" - })[0]; - const download = await github.rest.actions.downloadArtifact({ - owner: context.repo.owner, - repo: context.repo.repo, - artifact_id: matchArtifact.id, - archive_format: 'zip', - }); - const fs = require('fs'); - fs.writeFileSync('${{github.workspace}}/build.zip', Buffer.from(download.data)); - - - name: Extract Artifacts - run: unzip -d dist build.zip && rm build.zip - - - name: Add redirects file - # We fetch from github directly as we don't bother checking out the repo - run: curl -s https://raw.githubusercontent.com/vector-im/element-call/livekit/config/netlify_redirects > dist/_redirects - - - name: Add config file - run: curl -s https://raw.githubusercontent.com/vector-im/element-call/livekit/config/element_io_preview.json > dist/config.json - - - name: Deploy to Netlify - id: netlify - uses: nwtgck/actions-netlify@v2.1.0 - with: - publish-dir: dist - deploy-message: "Deploy from GitHub Actions" - production-branch: livekit - production-deploy: true - # These don't work because we're in workflow_run - enable-pull-request-comment: false - enable-commit-comment: false - env: - NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} - NETLIFY_SITE_ID: e3b9fa82-c040-4db6-b4bf-42b524d57423 - timeout-minutes: 1 - - - name: Update deployment status - uses: bobheadxi/deployments@v1 - if: always() - with: - step: finish - override: false - token: ${{ secrets.GITHUB_TOKEN }} - status: ${{ job.status }} - env: ${{ steps.deployment.outputs.env }} - deployment_id: ${{ steps.deployment.outputs.deployment_id }} - env_url: ${{ steps.netlify.outputs.deploy-url }} From 120abde5bd09435cb8c6dfff9ed7095702b36856 Mon Sep 17 00:00:00 2001 From: Robin Date: Fri, 13 Oct 2023 14:40:24 -0400 Subject: [PATCH 46/48] Replace glass component with the upstreamed version It's now been implemented in Compound Web, so we can remove our custom implementation. --- src/Glass.module.css | 31 ----------------------- src/Glass.tsx | 52 --------------------------------------- src/Modal.tsx | 4 +-- src/room/VideoPreview.tsx | 2 +- 4 files changed, 2 insertions(+), 87 deletions(-) delete mode 100644 src/Glass.module.css delete mode 100644 src/Glass.tsx diff --git a/src/Glass.module.css b/src/Glass.module.css deleted file mode 100644 index cdb9621a..00000000 --- a/src/Glass.module.css +++ /dev/null @@ -1,31 +0,0 @@ -/* -Copyright 2023 New Vector Ltd - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -.glass { - border-radius: 36px; - padding: 11px; - border: 1px solid var(--cpd-color-alpha-gray-400); - background: var(--cpd-color-alpha-gray-400); - backdrop-filter: blur(10px); -} - -.glass > * { - border-radius: 24px; -} - -.glass.frosted { - backdrop-filter: blur(20px); -} diff --git a/src/Glass.tsx b/src/Glass.tsx deleted file mode 100644 index be59172d..00000000 --- a/src/Glass.tsx +++ /dev/null @@ -1,52 +0,0 @@ -/* -Copyright 2023 New Vector Ltd - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -import { - ComponentPropsWithoutRef, - ReactNode, - forwardRef, - Children, -} from "react"; -import classNames from "classnames"; - -import styles from "./Glass.module.css"; - -interface Props extends ComponentPropsWithoutRef<"div"> { - children: ReactNode; - className?: string; - /** - * Increases the blur effect. - * @default false - */ - frosted?: boolean; -} - -/** - * Adds a border of glass around a child component. - */ -export const Glass = forwardRef( - ({ frosted = false, children, className, ...rest }, ref) => ( -
- {Children.only(children)} -
- ), -); diff --git a/src/Modal.tsx b/src/Modal.tsx index 5a6aea94..8f7d2aed 100644 --- a/src/Modal.tsx +++ b/src/Modal.tsx @@ -29,12 +29,11 @@ import { Drawer } from "vaul"; import { VisuallyHidden } from "@radix-ui/react-visually-hidden"; import CloseIcon from "@vector-im/compound-design-tokens/icons/close.svg?react"; import classNames from "classnames"; -import { Heading } from "@vector-im/compound-web"; +import { Heading, Glass } from "@vector-im/compound-web"; import styles from "./Modal.module.css"; import overlayStyles from "./Overlay.module.css"; import { useMediaQuery } from "./useMediaQuery"; -import { Glass } from "./Glass"; // TODO: Support tabs export interface Props extends AriaDialogProps { @@ -118,7 +117,6 @@ export const Modal: FC = ({ /> Date: Sun, 15 Oct 2023 17:15:52 +0000 Subject: [PATCH 47/48] Update dependency vaul to v0.7.2 --- yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index 65640411..fb59d2b8 100644 --- a/yarn.lock +++ b/yarn.lock @@ -9415,9 +9415,9 @@ value-or-function@^4.0.0: integrity sha512-aeVK81SIuT6aMJfNo9Vte8Dw0/FZINGBV8BfCraGtqVxIeLAEhJyoWs8SmvRVmXfGss2PmmOwZCuBPbZR+IYWg== vaul@^0.7.0: - version "0.7.1" - resolved "https://registry.yarnpkg.com/vaul/-/vaul-0.7.1.tgz#76bd22baedec1d4ce56b1fa4e1151d3924b6c2c6" - integrity sha512-kChKcUCzW2m+WwKojuJFBSViYksVKTnicb//8U8KmxNroUVJBPQBJJ6S7Pi2rYw3Kp7LO5UDTPYI3tnTphuolA== + version "0.7.2" + resolved "https://registry.yarnpkg.com/vaul/-/vaul-0.7.2.tgz#10594441989d274ffd8b91720e2218bb7b23aec5" + integrity sha512-pdVwdV93YNZnm07ix2lcq8Xmohto9ExNDLiZk3oo33lIbxl9Yx2WvPOADvVNHxoOO8nzE87M2RUgXD1GuaWxMw== dependencies: "@radix-ui/react-dialog" "^1.0.4" From 76d8482e5377c7cc4ee555cc74c028af9037a88d Mon Sep 17 00:00:00 2001 From: Robin Date: Mon, 16 Oct 2023 12:37:22 -0400 Subject: [PATCH 48/48] Update the invite button icon The design specs have changed to always use the outline variants of icons on buttons like this. --- src/button/InviteButton.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/button/InviteButton.tsx b/src/button/InviteButton.tsx index 45fb9776..b3d66295 100644 --- a/src/button/InviteButton.tsx +++ b/src/button/InviteButton.tsx @@ -17,14 +17,14 @@ limitations under the License. import { ComponentPropsWithoutRef, FC } from "react"; import { Button } from "@vector-im/compound-web"; import { useTranslation } from "react-i18next"; -import UserAddSolidIcon from "@vector-im/compound-design-tokens/icons/user-add-solid.svg?react"; +import UserAddIcon from "@vector-im/compound-design-tokens/icons/user-add.svg?react"; export const InviteButton: FC< Omit, "children"> > = (props) => { const { t } = useTranslation(); return ( - );