Feature/use second level mui imports (#743)

* Require "Theme" to be passed to "SxProps"

Decreases typescript performance otherwise

* Disallow "top" and "third-level" MUI imports

* Exclude "node_modules" in tsconfig
This commit is contained in:
schroda
2024-04-14 15:50:12 +02:00
committed by GitHub
parent 418da46c62
commit 473e85a8ed
120 changed files with 376 additions and 198 deletions

View File

@@ -7,7 +7,7 @@
*/
import { CSSProperties, forwardRef } from 'react';
import { Box } from '@mui/material';
import Box from '@mui/material/Box';
import { IReaderSettings } from '@/typings';
import { SpinnerImage } from '@/components/util/SpinnerImage';
import { imageStyle } from '@/components/reader/Page';

View File

@@ -9,7 +9,7 @@
import { CSSProperties, forwardRef } from 'react';
import Box from '@mui/material/Box';
import { useTheme } from '@mui/material/styles';
import { useMediaQuery } from '@mui/material';
import useMediaQuery from '@mui/material/useMediaQuery';
import { IReaderSettings, ReaderType } from '@/typings';
import { SpinnerImage } from '@/components/util/SpinnerImage';

View File

@@ -6,7 +6,7 @@
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
*/
import { Box } from '@mui/material';
import Box from '@mui/material/Box';
import { IReaderSettings } from '@/typings';
interface IProps {

View File

@@ -6,7 +6,10 @@
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
*/
import { List, ListItem, ListItemText, Switch } from '@mui/material';
import List from '@mui/material/List';
import ListItem from '@mui/material/ListItem';
import ListItemText from '@mui/material/ListItemText';
import Switch from '@mui/material/Switch';
import MenuItem from '@mui/material/MenuItem';
import { useTranslation } from 'react-i18next';
import { AllowedMetadataValueTypes, IReaderSettings } from '@/typings';

View File

@@ -7,7 +7,7 @@
*/
import { MouseEvent, useEffect, useRef, useState } from 'react';
import { Box } from '@mui/material';
import Box from '@mui/material/Box';
import { IReaderProps } from '@/typings';
import { Page } from '@/components/reader/Page';
import { DoublePage } from '@/components/reader/DoublePage';

View File

@@ -7,7 +7,7 @@
*/
import { MouseEvent as ReactMouseEvent, useEffect, useLayoutEffect, useRef } from 'react';
import { Box } from '@mui/material';
import Box from '@mui/material/Box';
import { IReaderProps } from '@/typings';
import { Page } from '@/components/reader/Page';

View File

@@ -7,7 +7,7 @@
*/
import { MouseEvent, useEffect, useRef } from 'react';
import { Box } from '@mui/material';
import Box from '@mui/material/Box';
import { IReaderProps } from '@/typings';
import { Page } from '@/components/reader/Page';
import { requestManager } from '@/lib/requests/RequestManager.ts';

View File

@@ -7,7 +7,7 @@
*/
import { useCallback, useEffect, useLayoutEffect, useRef } from 'react';
import { Box } from '@mui/material';
import Box from '@mui/material/Box';
import { IReaderProps } from '@/typings';
import { Page } from '@/components/reader/Page';