From 98d1e4e3a2b8701fbb03b5672cab5dadca528293 Mon Sep 17 00:00:00 2001 From: Dreamacro <8615343+Dreamacro@users.noreply.github.com> Date: Fri, 6 Aug 2021 23:37:49 +0800 Subject: [PATCH] Style: import order --- .eslintrc.yml | 11 + package.json | 29 +- src/components/Alert/index.tsx | 3 +- src/components/Button/index.tsx | 5 +- src/components/ButtonSelect/index.tsx | 5 +- src/components/Card/index.tsx | 5 +- src/components/Checkbox/index.tsx | 5 +- src/components/Drawer/index.tsx | 5 +- src/components/Header/index.tsx | 5 +- src/components/Icon/index.tsx | 5 +- src/components/Input/index.tsx | 7 +- src/components/Loading/Spinner/index.tsx | 3 +- src/components/Loading/index.tsx | 7 +- src/components/Message/index.tsx | 3 +- src/components/Modal/index.tsx | 5 +- src/components/Select/index.tsx | 9 +- src/components/Switch/index.tsx | 5 +- src/components/Tag/index.tsx | 3 +- src/components/Tags/index.tsx | 9 +- src/containers/App.tsx | 10 +- src/containers/Connections/Devices/index.tsx | 3 +- src/containers/Connections/Info/index.tsx | 6 +- src/containers/Connections/index.tsx | 12 +- src/containers/Connections/store.ts | 3 +- .../ExternalControllerDrawer/index.tsx | 5 +- src/containers/Logs/index.tsx | 6 +- src/containers/Overview/index.tsx | 1 + .../Proxies/components/Group/index.tsx | 8 +- .../Proxies/components/Provider/index.tsx | 10 +- .../Proxies/components/Proxy/index.tsx | 11 +- src/containers/Proxies/index.tsx | 5 +- src/containers/Rules/Provider/index.tsx | 9 +- src/containers/Rules/index.tsx | 8 +- src/containers/Settings/index.tsx | 7 +- src/containers/Sidebar/index.tsx | 4 +- src/index.ts | 3 +- src/lib/hook.ts | 2 +- src/lib/streamer.ts | 2 +- src/models/Config.ts | 3 +- src/render.tsx | 3 +- src/stores/jotai.ts | 25 +- src/stores/request.ts | 3 +- src/styles/iconfont.scss | 2 +- vite.config.ts | 10 +- yarn.lock | 300 +++++++++--------- 45 files changed, 318 insertions(+), 272 deletions(-) diff --git a/.eslintrc.yml b/.eslintrc.yml index 6986db6..9d4cc84 100644 --- a/.eslintrc.yml +++ b/.eslintrc.yml @@ -4,8 +4,19 @@ extends: parser: '@typescript-eslint/parser' parserOptions: project: './tsconfig.json' +settings: + import/parsers: + '@typescript-eslint/parser': [.ts, .tsx] + import/resolver: + typescript: + alwaysTryTypes: true rules: comma-dangle: [error, always-multiline] + import/order: [error, { + groups: [builtin, external, internal, [parent, sibling, index, object]], + newlines-between: always, + alphabetize: { order: asc } + }] '@typescript-eslint/indent': [error, 4] '@typescript-eslint/explicit-function-return-type': off '@typescript-eslint/restrict-template-expressions': off diff --git a/package.json b/package.json index 2004f33..be34929 100644 --- a/package.json +++ b/package.json @@ -26,35 +26,36 @@ }, "devDependencies": { "@types/lodash-es": "^4.17.4", - "@types/node": "^16.4.3", - "@types/react": "^17.0.15", + "@types/node": "^16.4.13", + "@types/react": "^17.0.16", "@types/react-dom": "^17.0.9", "@types/react-router-dom": "^5.1.8", "@types/react-table": "^7.7.2", "@types/react-virtualized-auto-sizer": "^1.0.1", - "@types/react-window": "^1.8.4", - "@typescript-eslint/eslint-plugin": "^4.28.4", - "@typescript-eslint/parser": "^4.28.4", - "@vitejs/plugin-react-refresh": "^1.3.5", + "@types/react-window": "^1.8.5", + "@typescript-eslint/eslint-plugin": "^4.29.0", + "@typescript-eslint/parser": "^4.29.0", + "@vitejs/plugin-react-refresh": "^1.3.6", "babel-eslint": "^10.1.0", - "eslint": "^7.31.0", + "eslint": "^7.32.0", "eslint-config-react-app": "^6.0.0", "eslint-config-standard-with-typescript": "^20.0.0", - "eslint-plugin-flowtype": "^5.8.1", + "eslint-import-resolver-typescript": "^2.4.0", + "eslint-plugin-flowtype": "^5.9.0", "eslint-plugin-import": "^2.23.4", "eslint-plugin-jsx-a11y": "^6.4.1", "eslint-plugin-node": "^11.1.0", "eslint-plugin-promise": "^5.1.0", "eslint-plugin-react": "^7.24.0", "eslint-plugin-react-hooks": "^4.2.0", - "sass": "^1.36.0", - "type-fest": "^1.2.2", + "sass": "^1.37.5", + "type-fest": "^2.0.0", "typescript": "^4.3.5", - "vite": "^2.4.3", - "vite-plugin-pwa": "^0.8.2", - "vite-plugin-windicss": "^1.2.5", + "vite": "^2.4.4", + "vite-plugin-pwa": "^0.9.3", + "vite-plugin-windicss": "^1.2.7", "vite-tsconfig-paths": "^3.3.13", - "windicss": "^3.1.5" + "windicss": "^3.1.6" }, "dependencies": { "axios": "^0.21.1", diff --git a/src/components/Alert/index.tsx b/src/components/Alert/index.tsx index ea5c979..baa1885 100644 --- a/src/components/Alert/index.tsx +++ b/src/components/Alert/index.tsx @@ -1,5 +1,6 @@ -import React from 'react' import classnames from 'classnames' +import React from 'react' + import { Icon } from '@components' import { BaseComponentProps } from '@models' import './style.scss' diff --git a/src/components/Button/index.tsx b/src/components/Button/index.tsx index 3a5725c..99348f2 100644 --- a/src/components/Button/index.tsx +++ b/src/components/Button/index.tsx @@ -1,7 +1,8 @@ -import React, { MouseEventHandler } from 'react' import classnames from 'classnames' -import { BaseComponentProps } from '@models' +import React, { MouseEventHandler } from 'react' + import { noop } from '@lib/helper' +import { BaseComponentProps } from '@models' import './style.scss' interface ButtonProps extends BaseComponentProps { diff --git a/src/components/ButtonSelect/index.tsx b/src/components/ButtonSelect/index.tsx index d798597..df6949c 100644 --- a/src/components/ButtonSelect/index.tsx +++ b/src/components/ButtonSelect/index.tsx @@ -1,6 +1,7 @@ -import * as React from 'react' -import { BaseComponentProps } from '@models/BaseProps' import classnames from 'classnames' +import * as React from 'react' + +import { BaseComponentProps } from '@models/BaseProps' import './style.scss' export interface ButtonSelectOptions { diff --git a/src/components/Card/index.tsx b/src/components/Card/index.tsx index 7afe833..e4c46d3 100644 --- a/src/components/Card/index.tsx +++ b/src/components/Card/index.tsx @@ -1,6 +1,7 @@ -import React, { forwardRef } from 'react' -import { BaseComponentProps } from '@models/BaseProps' import classnames from 'classnames' +import React, { forwardRef } from 'react' + +import { BaseComponentProps } from '@models/BaseProps' import './style.scss' interface CardProps extends BaseComponentProps { diff --git a/src/components/Checkbox/index.tsx b/src/components/Checkbox/index.tsx index f08f30a..8af8181 100644 --- a/src/components/Checkbox/index.tsx +++ b/src/components/Checkbox/index.tsx @@ -1,8 +1,9 @@ +import classnames from 'classnames' import * as React from 'react' -import { BaseComponentProps } from '@models/BaseProps' + import { Icon } from '@components' import { noop } from '@lib/helper' -import classnames from 'classnames' +import { BaseComponentProps } from '@models/BaseProps' import './style.scss' interface CheckboxProps extends BaseComponentProps { diff --git a/src/components/Drawer/index.tsx b/src/components/Drawer/index.tsx index eba668d..4255af5 100644 --- a/src/components/Drawer/index.tsx +++ b/src/components/Drawer/index.tsx @@ -1,8 +1,9 @@ +import classnames from 'classnames' import React, { useLayoutEffect, useRef, RefObject } from 'react' import { createPortal } from 'react-dom' -import classnames from 'classnames' -import { BaseComponentProps } from '@models/BaseProps' + import { Card } from '@components' +import { BaseComponentProps } from '@models/BaseProps' interface DrawerProps extends BaseComponentProps { visible?: boolean diff --git a/src/components/Header/index.tsx b/src/components/Header/index.tsx index 98d0ccd..57ebaae 100644 --- a/src/components/Header/index.tsx +++ b/src/components/Header/index.tsx @@ -1,6 +1,7 @@ -import * as React from 'react' -import { BaseComponentProps } from '@models/BaseProps' import classnames from 'classnames' +import * as React from 'react' + +import { BaseComponentProps } from '@models/BaseProps' import './style.scss' interface HeaderProps extends BaseComponentProps { diff --git a/src/components/Icon/index.tsx b/src/components/Icon/index.tsx index e531663..84f9529 100644 --- a/src/components/Icon/index.tsx +++ b/src/components/Icon/index.tsx @@ -1,6 +1,7 @@ -import * as React from 'react' -import { BaseComponentProps } from '@models/BaseProps' import classnames from 'classnames' +import * as React from 'react' + +import { BaseComponentProps } from '@models/BaseProps' interface IconProps extends BaseComponentProps { // icon type diff --git a/src/components/Input/index.tsx b/src/components/Input/index.tsx index d554c33..fd440e9 100644 --- a/src/components/Input/index.tsx +++ b/src/components/Input/index.tsx @@ -1,7 +1,8 @@ -import * as React from 'react' -import { BaseComponentProps } from '@models/BaseProps' -import { noop } from '@lib/helper' import classnames from 'classnames' +import * as React from 'react' + +import { noop } from '@lib/helper' +import { BaseComponentProps } from '@models/BaseProps' import './style.scss' interface InputProps extends BaseComponentProps { diff --git a/src/components/Loading/Spinner/index.tsx b/src/components/Loading/Spinner/index.tsx index a7fbb4f..dbb2912 100644 --- a/src/components/Loading/Spinner/index.tsx +++ b/src/components/Loading/Spinner/index.tsx @@ -1,5 +1,6 @@ -import * as React from 'react' import classnames from 'classnames' +import * as React from 'react' + import { BaseComponentProps } from '@models/BaseProps' import './style.scss' diff --git a/src/components/Loading/index.tsx b/src/components/Loading/index.tsx index 152cbf7..f42b7f4 100644 --- a/src/components/Loading/index.tsx +++ b/src/components/Loading/index.tsx @@ -1,8 +1,9 @@ -import React from 'react' import classnames from 'classnames' -import { BaseComponentProps } from '@models/BaseProps' -import { Spinner } from './Spinner' +import React from 'react' +import { BaseComponentProps } from '@models/BaseProps' + +import { Spinner } from './Spinner' import './style.scss' interface LoadingProps extends BaseComponentProps { diff --git a/src/components/Message/index.tsx b/src/components/Message/index.tsx index c6430aa..66c6130 100644 --- a/src/components/Message/index.tsx +++ b/src/components/Message/index.tsx @@ -1,6 +1,7 @@ -import React, { useLayoutEffect } from 'react' import classnames from 'classnames' +import React, { useLayoutEffect } from 'react' import { unmountComponentAtNode, render } from 'react-dom' + import { Icon } from '@components' import { noop } from '@lib/helper' import { useVisible } from '@lib/hook' diff --git a/src/components/Modal/index.tsx b/src/components/Modal/index.tsx index 754c97d..e7de82e 100644 --- a/src/components/Modal/index.tsx +++ b/src/components/Modal/index.tsx @@ -1,9 +1,10 @@ -import React, { useRef, useLayoutEffect, MouseEvent } from 'react' import classnames from 'classnames' +import React, { useRef, useLayoutEffect, MouseEvent } from 'react' import { createPortal } from 'react-dom' -import { BaseComponentProps } from '@models' + import { Button } from '@components' import { noop } from '@lib/helper' +import { BaseComponentProps } from '@models' import { useI18n } from '@stores' import './style.scss' diff --git a/src/components/Select/index.tsx b/src/components/Select/index.tsx index ebaa60e..dfd175f 100644 --- a/src/components/Select/index.tsx +++ b/src/components/Select/index.tsx @@ -1,9 +1,10 @@ -import React, { useRef, useLayoutEffect, useState, useMemo, ReactElement } from 'react' import classnames from 'classnames' -import { Icon } from '@components' -import { BaseComponentProps } from '@models' -import { noop } from '@lib/helper' +import React, { useRef, useLayoutEffect, useState, useMemo, ReactElement } from 'react' import { createPortal } from 'react-dom' + +import { Icon } from '@components' +import { noop } from '@lib/helper' +import { BaseComponentProps } from '@models' import './style.scss' type OptionValue = string | number diff --git a/src/components/Switch/index.tsx b/src/components/Switch/index.tsx index e7fbed9..4f2ae40 100644 --- a/src/components/Switch/index.tsx +++ b/src/components/Switch/index.tsx @@ -1,8 +1,9 @@ +import classnames from 'classnames' import * as React from 'react' -import { BaseComponentProps } from '@models/BaseProps' + import { Icon } from '@components' import { noop } from '@lib/helper' -import classnames from 'classnames' +import { BaseComponentProps } from '@models/BaseProps' import './style.scss' interface SwitchProps extends BaseComponentProps { diff --git a/src/components/Tag/index.tsx b/src/components/Tag/index.tsx index 752181c..fcf7b71 100644 --- a/src/components/Tag/index.tsx +++ b/src/components/Tag/index.tsx @@ -1,5 +1,6 @@ -import * as React from 'react' import classnames from 'classnames' +import * as React from 'react' + import { BaseComponentProps } from '@models/BaseProps' import './style.scss' diff --git a/src/components/Tags/index.tsx b/src/components/Tags/index.tsx index 2e4d9b1..edf7577 100644 --- a/src/components/Tags/index.tsx +++ b/src/components/Tags/index.tsx @@ -1,8 +1,9 @@ -import React, { useState, useRef, useLayoutEffect } from 'react' -import { useI18n } from '@stores' -import { BaseComponentProps } from '@models' -import { noop } from '@lib/helper' import classnames from 'classnames' +import React, { useState, useRef, useLayoutEffect } from 'react' + +import { noop } from '@lib/helper' +import { BaseComponentProps } from '@models' +import { useI18n } from '@stores' import './style.scss' interface TagsProps extends BaseComponentProps { diff --git a/src/containers/App.tsx b/src/containers/App.tsx index ec69f65..680322f 100644 --- a/src/containers/App.tsx +++ b/src/containers/App.tsx @@ -1,16 +1,16 @@ +import classnames from 'classnames' import React from 'react' import { Route, Redirect, Switch } from 'react-router-dom' -import classnames from 'classnames' -import { isClashX } from '@lib/jsBridge' // import Overview from '@containers/Overview' -import Proxies from '@containers/Proxies' +import Connections from '@containers/Connections' +import ExternalControllerModal from '@containers/ExternalControllerDrawer' import Logs from '@containers/Logs' +import Proxies from '@containers/Proxies' import Rules from '@containers/Rules' import Settings from '@containers/Settings' import SlideBar from '@containers/Sidebar' -import Connections from '@containers/Connections' -import ExternalControllerModal from '@containers/ExternalControllerDrawer' +import { isClashX } from '@lib/jsBridge' import { useLogsStreamReader } from '@stores' import '../styles/common.scss' diff --git a/src/containers/Connections/Devices/index.tsx b/src/containers/Connections/Devices/index.tsx index e34b401..bb15cfc 100644 --- a/src/containers/Connections/Devices/index.tsx +++ b/src/containers/Connections/Devices/index.tsx @@ -1,5 +1,6 @@ -import React, { useMemo } from 'react' import classnames from 'classnames' +import React, { useMemo } from 'react' + import { BaseComponentProps } from '@models' import { useI18n } from '@stores' import './style.scss' diff --git a/src/containers/Connections/Info/index.tsx b/src/containers/Connections/Info/index.tsx index 3ce4c1f..983ebbb 100644 --- a/src/containers/Connections/Info/index.tsx +++ b/src/containers/Connections/Info/index.tsx @@ -1,8 +1,10 @@ -import React, { useMemo } from 'react' import classnames from 'classnames' -import { useI18n } from '@stores' +import React, { useMemo } from 'react' + import { formatTraffic } from '@lib/helper' import { BaseComponentProps } from '@models' +import { useI18n } from '@stores' + import { Connection } from '../store' interface ConnectionsInfoProps extends BaseComponentProps { diff --git a/src/containers/Connections/index.tsx b/src/containers/Connections/index.tsx index efcd9b2..b6c2f6d 100644 --- a/src/containers/Connections/index.tsx +++ b/src/containers/Connections/index.tsx @@ -1,15 +1,17 @@ +import classnames from 'classnames' +import { groupBy } from 'lodash-es' import React, { useMemo, useLayoutEffect, useCallback, useRef, useState, useEffect } from 'react' import { Cell, Column, ColumnInstance, TableInstance, TableOptions, useBlockLayout, useFilters, UseFiltersInstanceProps, UseFiltersOptions, useResizeColumns, UseResizeColumnsColumnProps, UseResizeColumnsOptions, useSortBy, UseSortByColumnOptions, UseSortByColumnProps, UseSortByOptions, useTable } from 'react-table' -import classnames from 'classnames' import { useLatest, useScroll } from 'react-use' -import { groupBy } from 'lodash-es' + import { Header, Checkbox, Modal, Icon, Drawer, Card, Button } from '@components' -import { useClient, useConnectionStreamReader, useI18n } from '@stores' -import * as API from '@lib/request' -import { useObject, useVisible } from '@lib/hook' import { fromNow } from '@lib/date' import { formatTraffic } from '@lib/helper' +import { useObject, useVisible } from '@lib/hook' +import * as API from '@lib/request' import { RuleType } from '@models' +import { useClient, useConnectionStreamReader, useI18n } from '@stores' + import { Devices } from './Devices' import { ConnectionInfo } from './Info' import { Connection, FormatConnection, useConnections } from './store' diff --git a/src/containers/Connections/store.ts b/src/containers/Connections/store.ts index 3e52fca..380c9d3 100644 --- a/src/containers/Connections/store.ts +++ b/src/containers/Connections/store.ts @@ -1,6 +1,7 @@ -import * as API from '@lib/request' import { useState, useMemo, useRef, useCallback } from 'react' +import * as API from '@lib/request' + export type Connection = API.Connections & { completed?: boolean, uploadSpeed: number, downloadSpeed: number } export interface FormatConnection { diff --git a/src/containers/ExternalControllerDrawer/index.tsx b/src/containers/ExternalControllerDrawer/index.tsx index 4e38356..8042248 100644 --- a/src/containers/ExternalControllerDrawer/index.tsx +++ b/src/containers/ExternalControllerDrawer/index.tsx @@ -1,8 +1,9 @@ -import React, { useEffect } from 'react' import { useAtom } from 'jotai' import { useUpdateAtom } from 'jotai/utils' -import { useObject } from '@lib/hook' +import React, { useEffect } from 'react' + import { Modal, Input, Alert } from '@components' +import { useObject } from '@lib/hook' import { useI18n, useAPIInfo, identityAtom } from '@stores' import { localStorageAtom } from '@stores/request' import './style.scss' diff --git a/src/containers/Logs/index.tsx b/src/containers/Logs/index.tsx index f9acbed..b078bae 100644 --- a/src/containers/Logs/index.tsx +++ b/src/containers/Logs/index.tsx @@ -1,8 +1,10 @@ -import React, { useLayoutEffect, useEffect, useRef, useState } from 'react' import dayjs from 'dayjs' -import { useI18n, useLogsStreamReader } from '@stores' +import React, { useLayoutEffect, useEffect, useRef, useState } from 'react' + import { Card, Header } from '@components' import { Log } from '@models/Log' +import { useI18n, useLogsStreamReader } from '@stores' + import './style.scss' export default function Logs () { diff --git a/src/containers/Overview/index.tsx b/src/containers/Overview/index.tsx index aaca3ab..fe90538 100644 --- a/src/containers/Overview/index.tsx +++ b/src/containers/Overview/index.tsx @@ -1,4 +1,5 @@ import * as React from 'react' + import logo from '@assets/logo-fixing.svg' export default function Overview () { diff --git a/src/containers/Proxies/components/Group/index.tsx b/src/containers/Proxies/components/Group/index.tsx index 6387a97..a49a0d0 100644 --- a/src/containers/Proxies/components/Group/index.tsx +++ b/src/containers/Proxies/components/Group/index.tsx @@ -1,8 +1,10 @@ -import React, { useMemo } from 'react' import { useAtom } from 'jotai' -import { useProxy, useConfig, proxyMapping, useClient } from '@stores' -import { Group as IGroup } from '@lib/request' +import React, { useMemo } from 'react' + import { Tags, Tag } from '@components' +import { Group as IGroup } from '@lib/request' +import { useProxy, useConfig, proxyMapping, useClient } from '@stores' + import './style.scss' interface GroupProps { diff --git a/src/containers/Proxies/components/Provider/index.tsx b/src/containers/Proxies/components/Provider/index.tsx index 00db23e..9b80a8d 100644 --- a/src/containers/Proxies/components/Provider/index.tsx +++ b/src/containers/Proxies/components/Provider/index.tsx @@ -1,11 +1,13 @@ import React, { useMemo } from 'react' + import { Card, Tag, Icon, Loading } from '@components' -import { useClient, useI18n, useProxyProviders } from '@stores' -import { fromNow } from '@lib/date' -import { Provider as IProvider, Proxy as IProxy } from '@lib/request' -import { useVisible } from '@lib/hook' import { compareDesc } from '@containers/Proxies' import { Proxy } from '@containers/Proxies/components/Proxy' +import { fromNow } from '@lib/date' +import { useVisible } from '@lib/hook' +import { Provider as IProvider, Proxy as IProxy } from '@lib/request' +import { useClient, useI18n, useProxyProviders } from '@stores' + import './style.scss' interface ProvidersProps { diff --git a/src/containers/Proxies/components/Proxy/index.tsx b/src/containers/Proxies/components/Proxy/index.tsx index 0314d89..e9b150b 100644 --- a/src/containers/Proxies/components/Proxy/index.tsx +++ b/src/containers/Proxies/components/Proxy/index.tsx @@ -1,12 +1,13 @@ -import React, { useMemo, useLayoutEffect, useCallback } from 'react' -import { ResultAsync } from 'neverthrow' import type{ AxiosError } from 'axios' import classnames from 'classnames' -import { BaseComponentProps } from '@models' -import { useClient, useProxy } from '@stores' -import { Proxy as IProxy } from '@lib/request' +import { ResultAsync } from 'neverthrow' +import React, { useMemo, useLayoutEffect, useCallback } from 'react' + import EE, { Action } from '@lib/event' import { isClashX, jsBridge } from '@lib/jsBridge' +import { Proxy as IProxy } from '@lib/request' +import { BaseComponentProps } from '@models' +import { useClient, useProxy } from '@stores' import './style.scss' diff --git a/src/containers/Proxies/index.tsx b/src/containers/Proxies/index.tsx index a29300a..011ec69 100644 --- a/src/containers/Proxies/index.tsx +++ b/src/containers/Proxies/index.tsx @@ -1,9 +1,10 @@ import React, { useMemo } from 'react' + +import { Card, Header, Icon, Checkbox } from '@components' import EE from '@lib/event' import { useRound } from '@lib/hook' -import { Card, Header, Icon, Checkbox } from '@components' -import { useI18n, useConfig, useProxy, useProxyProviders, useGeneral } from '@stores' import * as API from '@lib/request' +import { useI18n, useConfig, useProxy, useProxyProviders, useGeneral } from '@stores' import { Proxy, Group, Provider } from './components' import './style.scss' diff --git a/src/containers/Rules/Provider/index.tsx b/src/containers/Rules/Provider/index.tsx index b53381c..ece2305 100644 --- a/src/containers/Rules/Provider/index.tsx +++ b/src/containers/Rules/Provider/index.tsx @@ -1,10 +1,11 @@ -import * as React from 'react' import classnames from 'classnames' -import { Card, Tag, Icon } from '@components' -import { useClient, useI18n, useRuleProviders } from '@stores' +import * as React from 'react' + +import { Tag, Icon } from '@components' import { fromNow } from '@lib/date' -import { RuleProvider } from '@lib/request' import { useVisible } from '@lib/hook' +import { RuleProvider } from '@lib/request' +import { useClient, useI18n, useRuleProviders } from '@stores' import './style.scss' interface ProvidersProps { diff --git a/src/containers/Rules/index.tsx b/src/containers/Rules/index.tsx index 7a98842..d8624ef 100644 --- a/src/containers/Rules/index.tsx +++ b/src/containers/Rules/index.tsx @@ -1,9 +1,11 @@ import React from 'react' +import AutoSizer from 'react-virtualized-auto-sizer' +import { FixedSizeList as List } from 'react-window' +import useSWR from 'swr' + import { Header, Card } from '@components' import { useI18n, useRule, useRuleProviders } from '@stores' -import { FixedSizeList as List } from 'react-window' -import AutoSizer from 'react-virtualized-auto-sizer' -import useSWR from 'swr' + import { Provider } from './Provider' import './style.scss' diff --git a/src/containers/Settings/index.tsx b/src/containers/Settings/index.tsx index 693245a..ec77953 100644 --- a/src/containers/Settings/index.tsx +++ b/src/containers/Settings/index.tsx @@ -1,12 +1,13 @@ -import React, { useEffect, useMemo } from 'react' import classnames from 'classnames' import { useUpdateAtom } from 'jotai/utils' import { capitalize } from 'lodash-es' +import React, { useEffect, useMemo } from 'react' + import { Header, Card, Switch, ButtonSelect, ButtonSelectOptions, Input } from '@components' -import { useI18n, useClashXData, useAPIInfo, useGeneral, useVersion, useClient, identityAtom } from '@stores' +import { Lang } from '@i18n' import { useObject } from '@lib/hook' import { jsBridge } from '@lib/jsBridge' -import { Lang } from '@i18n' +import { useI18n, useClashXData, useAPIInfo, useGeneral, useVersion, useClient, identityAtom } from '@stores' import './style.scss' const languageOptions: ButtonSelectOptions[] = [{ label: '中文', value: 'zh_CN' }, { label: 'English', value: 'en_US' }] diff --git a/src/containers/Sidebar/index.tsx b/src/containers/Sidebar/index.tsx index 672bdfa..b3075f6 100644 --- a/src/containers/Sidebar/index.tsx +++ b/src/containers/Sidebar/index.tsx @@ -1,9 +1,9 @@ +import classnames from 'classnames' import * as React from 'react' import { NavLink } from 'react-router-dom' -import classnames from 'classnames' -import { useI18n, useVersion, useClashXData } from '@stores' import logo from '@assets/logo.png' +import { useI18n, useVersion, useClashXData } from '@stores' import './style.scss' interface SidebarProps { diff --git a/src/index.ts b/src/index.ts index 4a17e8a..8f20f96 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,5 +1,6 @@ -import renderApp from './render' import { isClashX, setupJsBridge } from '@lib/jsBridge' + +import renderApp from './render' // import * as OfflinePluginRuntime from 'offline-plugin/runtime' /** diff --git a/src/lib/hook.ts b/src/lib/hook.ts index d90161a..d8b0cb5 100644 --- a/src/lib/hook.ts +++ b/src/lib/hook.ts @@ -1,7 +1,7 @@ /* eslint-disable no-redeclare */ import { Draft } from 'immer' -import { useImmer } from 'use-immer' import { useRef, useEffect, useState, useMemo } from 'react' +import { useImmer } from 'use-immer' import { noop } from '@lib/helper' diff --git a/src/lib/streamer.ts b/src/lib/streamer.ts index f11404d..7105b8b 100644 --- a/src/lib/streamer.ts +++ b/src/lib/streamer.ts @@ -1,6 +1,6 @@ import EventEmitter from 'eventemitter3' -import { SetRequired } from 'type-fest' import { ResultAsync } from 'neverthrow' +import { SetRequired } from 'type-fest' export interface Config { url: string diff --git a/src/models/Config.ts b/src/models/Config.ts index c4e3cb5..52a4b25 100644 --- a/src/models/Config.ts +++ b/src/models/Config.ts @@ -1,6 +1,7 @@ +import * as API from '@lib/request' + import { Proxy, ProxyGroup } from './Proxy' import { Rule } from './Rule' -import * as API from '@lib/request' /** * clash config diff --git a/src/render.tsx b/src/render.tsx index a21718b..209928c 100644 --- a/src/render.tsx +++ b/src/render.tsx @@ -1,8 +1,9 @@ import React, { Suspense } from 'react' import { render } from 'react-dom' import { HashRouter } from 'react-router-dom' -import App from '@containers/App' + import { Loading } from '@components' +import App from '@containers/App' import 'virtual:windi.css' export default function renderApp () { diff --git a/src/stores/jotai.ts b/src/stores/jotai.ts index 649bec9..430b99a 100644 --- a/src/stores/jotai.ts +++ b/src/stores/jotai.ts @@ -1,23 +1,24 @@ -import { ResultAsync } from 'neverthrow' import { AxiosError } from 'axios' -import { atom, useAtom } from 'jotai' -import { atomWithStorage, useUpdateAtom } from 'jotai/utils' -import { atomWithImmer } from 'jotai/immer' -import { useCallback, useEffect, useMemo } from 'react' -import { get } from 'lodash-es' -import useSWR from 'swr' import produce from 'immer' +import { atom, useAtom } from 'jotai' +import { atomWithImmer } from 'jotai/immer' +import { atomWithStorage, useUpdateAtom } from 'jotai/utils' +import { get } from 'lodash-es' +import { ResultAsync } from 'neverthrow' +import { useCallback, useEffect, useMemo } from 'react' +import useSWR from 'swr' import { Get } from 'type-fest' import { Language, locales, Lang, getDefaultLanguage } from '@i18n' -import { useWarpImmerSetter, WritableDraft } from '@lib/jotai' -import * as API from '@lib/request' -import * as Models from '@models' import { partition } from '@lib/helper' +import { useWarpImmerSetter, WritableDraft } from '@lib/jotai' import { isClashX, jsBridge } from '@lib/jsBridge' -import { StreamReader } from '@lib/streamer' -import { Log } from '@models/Log' import { Snapshot } from '@lib/request' +import * as API from '@lib/request' +import { StreamReader } from '@lib/streamer' +import * as Models from '@models' +import { Log } from '@models/Log' + import { useAPIInfo, useClient } from './request' export const identityAtom = atom(true) diff --git a/src/stores/request.ts b/src/stores/request.ts index 7ef9de6..336e1ce 100644 --- a/src/stores/request.ts +++ b/src/stores/request.ts @@ -1,7 +1,8 @@ import { atom, useAtom } from 'jotai' -import { isClashX, jsBridge } from '@lib/jsBridge' import { atomWithStorage, useAtomValue } from 'jotai/utils' import { useLocation } from 'react-use' + +import { isClashX, jsBridge } from '@lib/jsBridge' import { Client } from '@lib/request' const clashxConfigAtom = atom(async () => { diff --git a/src/styles/iconfont.scss b/src/styles/iconfont.scss index d3ad133..4878ed5 100644 --- a/src/styles/iconfont.scss +++ b/src/styles/iconfont.scss @@ -5,7 +5,7 @@ @font-face { font-family: "clash-iconfont"; - src: url('http://at.alicdn.com/t/font_841708_ok9czskbhel.ttf?t=1576162884356') format('truetype'); + src: url('//at.alicdn.com/t/font_841708_ok9czskbhel.ttf?t=1576162884356') format('truetype'); } .clash-iconfont { diff --git a/vite.config.ts b/vite.config.ts index 2d03a5f..b64e15e 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -1,15 +1,19 @@ import reactRefresh from '@vitejs/plugin-react-refresh' -import tsConfigPath from 'vite-tsconfig-paths' +import { defineConfig } from 'vite' import { VitePWA } from 'vite-plugin-pwa' import windiCSS from 'vite-plugin-windicss' -import { defineConfig } from 'vite' +import tsConfigPath from 'vite-tsconfig-paths' export default defineConfig({ plugins: [ reactRefresh(), tsConfigPath(), windiCSS(), - VitePWA(), + VitePWA({ + workbox: { + sourcemap: false, + }, + }), // https://github.com/vitejs/vite/issues/2144 { name: 'remove-css-in-js', diff --git a/yarn.lock b/yarn.lock index c571eda..111487d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -35,7 +35,7 @@ resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.14.7.tgz#7b047d7a3a89a67d2258dc61f604f098f1bc7e08" integrity sha512-nS6dZaISCXJ3+518CWiBfEr//gHyMO02uDxBkXTKZDN5POruCnOZ1N4YBRZDCabwF8nZMWBpRxIicmXtBs+fvw== -"@babel/core@^7.11.1": +"@babel/core@^7.11.1", "@babel/core@^7.14.8": version "7.14.8" resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.14.8.tgz#20cdf7c84b5d86d83fac8710a8bc605a7ba3f010" integrity sha512-/AtaeEhT6ErpDhInbXmjHcUQXH0L0TEgscfcxk1qbOvLuKCa5aZT0SOOtDKFY96/CLROwbLSKyFor6idgNaU4Q== @@ -56,27 +56,6 @@ semver "^6.3.0" source-map "^0.5.0" -"@babel/core@^7.14.6": - version "7.14.6" - resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.14.6.tgz#e0814ec1a950032ff16c13a2721de39a8416fcab" - integrity sha512-gJnOEWSqTk96qG5BoIrl5bVtc23DCycmIePPYnamY9RboYdI4nFy5vAQMSl81O5K/W0sLDWfGysnOECC+KUUCA== - dependencies: - "@babel/code-frame" "^7.14.5" - "@babel/generator" "^7.14.5" - "@babel/helper-compilation-targets" "^7.14.5" - "@babel/helper-module-transforms" "^7.14.5" - "@babel/helpers" "^7.14.6" - "@babel/parser" "^7.14.6" - "@babel/template" "^7.14.5" - "@babel/traverse" "^7.14.5" - "@babel/types" "^7.14.5" - convert-source-map "^1.7.0" - debug "^4.1.0" - gensync "^1.0.0-beta.2" - json5 "^2.1.2" - semver "^6.3.0" - source-map "^0.5.0" - "@babel/generator@^7.14.0": version "7.14.1" resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.14.1.tgz#1f99331babd65700183628da186f36f63d615c93" @@ -347,15 +326,6 @@ "@babel/traverse" "^7.14.5" "@babel/types" "^7.14.5" -"@babel/helpers@^7.14.6": - version "7.14.6" - resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.14.6.tgz#5b58306b95f1b47e2a0199434fa8658fa6c21635" - integrity sha512-yesp1ENQBiLI+iYHSJdoZKUtRpfTlL1grDIX9NRlAVppljLw/4tTyYupIB7uIYmC3stW/imAv8EqaKaS/ibmeA== - dependencies: - "@babel/template" "^7.14.5" - "@babel/traverse" "^7.14.5" - "@babel/types" "^7.14.5" - "@babel/helpers@^7.14.8": version "7.14.8" resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.14.8.tgz#839f88f463025886cff7f85a35297007e2da1b77" @@ -388,7 +358,7 @@ resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.14.1.tgz#1bd644b5db3f5797c4479d89ec1817fe02b84c47" integrity sha512-muUGEKu8E/ftMTPlNp+mc6zL3E9zKWmF5sDHZ5MSsoTP9Wyz64AhEf9kD08xYJ7w6Hdcu8H550ircnPyWSIF0Q== -"@babel/parser@^7.14.5", "@babel/parser@^7.14.6", "@babel/parser@^7.14.7": +"@babel/parser@^7.14.5", "@babel/parser@^7.14.7": version "7.14.7" resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.14.7.tgz#6099720c8839ca865a2637e6c85852ead0bdb595" integrity sha512-X67Z5y+VBJuHB/RjwECp8kSl5uYi0BvRbNeWqkaJCVh+LiTPl19WBUfG627psSgp9rSf6ojuXghQM3ha6qHHdA== @@ -1223,10 +1193,10 @@ estree-walker "^1.0.1" picomatch "^2.2.2" -"@rollup/pluginutils@^4.1.0": - version "4.1.0" - resolved "https://registry.yarnpkg.com/@rollup/pluginutils/-/pluginutils-4.1.0.tgz#0dcc61c780e39257554feb7f77207dceca13c838" - integrity sha512-TrBhfJkFxA+ER+ew2U2/fHbebhLT/l/2pRk0hfj9KusXUuRXd2v0R58AfaZK9VXDQ4TogOSEmICVrQAA3zFnHQ== +"@rollup/pluginutils@^4.1.1": + version "4.1.1" + resolved "https://registry.yarnpkg.com/@rollup/pluginutils/-/pluginutils-4.1.1.tgz#1d4da86dd4eded15656a57d933fda2b9a08d47ec" + integrity sha512-clDjivHqWGXi7u+0d2r2sBi4Ie6VLEAzWMIkvJLnDmxoOhBYOTfzGbOQBA32THHm11/LiJbd01tJUpJsbshSWQ== dependencies: estree-walker "^2.0.1" picomatch "^2.2.2" @@ -1281,10 +1251,10 @@ resolved "https://registry.yarnpkg.com/@types/node/-/node-16.4.0.tgz#2c219eaa3b8d1e4d04f4dd6e40bc68c7467d5272" integrity sha512-HrJuE7Mlqcjj+00JqMWpZ3tY8w7EUd+S0U3L1+PQSWiXZbOgyQDvi+ogoUxaHApPJq5diKxYBQwA3iIlNcPqOg== -"@types/node@^16.4.3": - version "16.4.3" - resolved "https://registry.yarnpkg.com/@types/node/-/node-16.4.3.tgz#c01c1a215721f6dec71b47d88b4687463601ba48" - integrity sha512-GKM4FLMkWDc0sfx7tXqPWkM6NBow1kge0fgQh0bOnlqo4iT1kvTvMEKE0c1RtUGnbLlGRXiAA8SumE//90uKAg== +"@types/node@^16.4.13": + version "16.4.13" + resolved "https://registry.yarnpkg.com/@types/node/-/node-16.4.13.tgz#7dfd9c14661edc65cccd43a29eb454174642370d" + integrity sha512-bLL69sKtd25w7p1nvg9pigE4gtKVpGTPojBFLMkGHXuUgap2sLqQt2qUnqmVCDfzGUL0DRNZP+1prIZJbMeAXg== "@types/prop-types@*": version "15.7.3" @@ -1329,10 +1299,10 @@ dependencies: "@types/react" "*" -"@types/react-window@^1.8.4": - version "1.8.4" - resolved "https://registry.yarnpkg.com/@types/react-window/-/react-window-1.8.4.tgz#7920f128b0238ea6bd529cbbc2cf1779e99b7456" - integrity sha512-rFJ0h1nYffFBNi6N80CFORAQNNr+440RtGCAmKyn81U99pXRoxS2goi/fkYnUJtk+LcvWCp8cmP16M8loJJsjw== +"@types/react-window@^1.8.5": + version "1.8.5" + resolved "https://registry.yarnpkg.com/@types/react-window/-/react-window-1.8.5.tgz#285fcc5cea703eef78d90f499e1457e9b5c02fc1" + integrity sha512-V9q3CvhC9Jk9bWBOysPGaWy/Z0lxYcTXLtLipkt2cnRj1JOSFNF7wqGpkScSXMgBwC+fnVRg/7shwgddBG5ICw== dependencies: "@types/react" "*" @@ -1345,10 +1315,10 @@ "@types/scheduler" "*" csstype "^3.0.2" -"@types/react@^17.0.15": - version "17.0.15" - resolved "https://registry.yarnpkg.com/@types/react/-/react-17.0.15.tgz#c7533dc38025677e312606502df7656a6ea626d0" - integrity sha512-uTKHDK9STXFHLaKv6IMnwp52fm0hwU+N89w/p9grdUqcFA6WuqDyPhaWopbNyE1k/VhgzmHl8pu1L4wITtmlLw== +"@types/react@^17.0.16": + version "17.0.16" + resolved "https://registry.yarnpkg.com/@types/react/-/react-17.0.16.tgz#056f40c45645761527baeb7d89d842a6abdf285a" + integrity sha512-3kCUiOOlQTwUUvjNFkbBTWMTxdTGybz/PfjCw9JmaRGcEDBQh+nGMg7/E9P2rklhJuYVd25IYLNcvqgSPCPksg== dependencies: "@types/prop-types" "*" "@types/scheduler" "*" @@ -1371,28 +1341,28 @@ resolved "https://registry.yarnpkg.com/@types/throttle-debounce/-/throttle-debounce-2.1.0.tgz#1c3df624bfc4b62f992d3012b84c56d41eab3776" integrity sha512-5eQEtSCoESnh2FsiLTxE121IiE60hnMqcb435fShf4bpLRjEu1Eoekht23y6zXS9Ts3l+Szu3TARnTsA0GkOkQ== -"@typescript-eslint/eslint-plugin@^4.28.4": - version "4.28.4" - resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.28.4.tgz#e73c8cabbf3f08dee0e1bda65ed4e622ae8f8921" - integrity sha512-s1oY4RmYDlWMlcV0kKPBaADn46JirZzvvH7c2CtAqxCY96S538JRBAzt83RrfkDheV/+G/vWNK0zek+8TB3Gmw== +"@typescript-eslint/eslint-plugin@^4.29.0": + version "4.29.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.29.0.tgz#b866c9cd193bfaba5e89bade0015629ebeb27996" + integrity sha512-eiREtqWRZ8aVJcNru7cT/AMVnYd9a2UHsfZT8MR1dW3UUEg6jDv9EQ9Cq4CUPZesyQ58YUpoAADGv71jY8RwgA== dependencies: - "@typescript-eslint/experimental-utils" "4.28.4" - "@typescript-eslint/scope-manager" "4.28.4" + "@typescript-eslint/experimental-utils" "4.29.0" + "@typescript-eslint/scope-manager" "4.29.0" debug "^4.3.1" functional-red-black-tree "^1.0.1" regexpp "^3.1.0" semver "^7.3.5" tsutils "^3.21.0" -"@typescript-eslint/experimental-utils@4.28.4": - version "4.28.4" - resolved "https://registry.yarnpkg.com/@typescript-eslint/experimental-utils/-/experimental-utils-4.28.4.tgz#9c70c35ebed087a5c70fb0ecd90979547b7fec96" - integrity sha512-OglKWOQRWTCoqMSy6pm/kpinEIgdcXYceIcH3EKWUl4S8xhFtN34GQRaAvTIZB9DD94rW7d/U7tUg3SYeDFNHA== +"@typescript-eslint/experimental-utils@4.29.0": + version "4.29.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/experimental-utils/-/experimental-utils-4.29.0.tgz#19b1417602d0e1ef325b3312ee95f61220542df5" + integrity sha512-FpNVKykfeaIxlArLUP/yQfv/5/3rhl1ov6RWgud4OgbqWLkEq7lqgQU9iiavZRzpzCRQV4XddyFz3wFXdkiX9w== dependencies: "@types/json-schema" "^7.0.7" - "@typescript-eslint/scope-manager" "4.28.4" - "@typescript-eslint/types" "4.28.4" - "@typescript-eslint/typescript-estree" "4.28.4" + "@typescript-eslint/scope-manager" "4.29.0" + "@typescript-eslint/types" "4.29.0" + "@typescript-eslint/typescript-estree" "4.29.0" eslint-scope "^5.1.1" eslint-utils "^3.0.0" @@ -1406,14 +1376,14 @@ "@typescript-eslint/typescript-estree" "4.28.1" debug "^4.3.1" -"@typescript-eslint/parser@^4.28.4": - version "4.28.4" - resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-4.28.4.tgz#bc462dc2779afeefdcf49082516afdc3e7b96fab" - integrity sha512-4i0jq3C6n+og7/uCHiE6q5ssw87zVdpUj1k6VlVYMonE3ILdFApEzTWgppSRG4kVNB/5jxnH+gTeKLMNfUelQA== +"@typescript-eslint/parser@^4.29.0": + version "4.29.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-4.29.0.tgz#e5367ca3c63636bb5d8e0748fcbab7a4f4a04289" + integrity sha512-+92YRNHFdXgq+GhWQPT2bmjX09X7EH36JfgN2/4wmhtwV/HPxozpCNst8jrWcngLtEVd/4zAwA6BKojAlf+YqA== dependencies: - "@typescript-eslint/scope-manager" "4.28.4" - "@typescript-eslint/types" "4.28.4" - "@typescript-eslint/typescript-estree" "4.28.4" + "@typescript-eslint/scope-manager" "4.29.0" + "@typescript-eslint/types" "4.29.0" + "@typescript-eslint/typescript-estree" "4.29.0" debug "^4.3.1" "@typescript-eslint/scope-manager@4.28.1": @@ -1424,23 +1394,23 @@ "@typescript-eslint/types" "4.28.1" "@typescript-eslint/visitor-keys" "4.28.1" -"@typescript-eslint/scope-manager@4.28.4": - version "4.28.4" - resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-4.28.4.tgz#bdbce9b6a644e34f767bd68bc17bb14353b9fe7f" - integrity sha512-ZJBNs4usViOmlyFMt9X9l+X0WAFcDH7EdSArGqpldXu7aeZxDAuAzHiMAeI+JpSefY2INHrXeqnha39FVqXb8w== +"@typescript-eslint/scope-manager@4.29.0": + version "4.29.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-4.29.0.tgz#cf5474f87321bedf416ef65839b693bddd838599" + integrity sha512-HPq7XAaDMM3DpmuijxLV9Io8/6pQnliiXMQUcAdjpJJSR+fdmbD/zHCd7hMkjJn04UQtCQBtshgxClzg6NIS2w== dependencies: - "@typescript-eslint/types" "4.28.4" - "@typescript-eslint/visitor-keys" "4.28.4" + "@typescript-eslint/types" "4.29.0" + "@typescript-eslint/visitor-keys" "4.29.0" "@typescript-eslint/types@4.28.1": version "4.28.1" resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-4.28.1.tgz#d0f2ecbef3684634db357b9bbfc97b94b828f83f" integrity sha512-4z+knEihcyX7blAGi7O3Fm3O6YRCP+r56NJFMNGsmtdw+NCdpG5SgNz427LS9nQkRVTswZLhz484hakQwB8RRg== -"@typescript-eslint/types@4.28.4": - version "4.28.4" - resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-4.28.4.tgz#41acbd79b5816b7c0dd7530a43d97d020d3aeb42" - integrity sha512-3eap4QWxGqkYuEmVebUGULMskR6Cuoc/Wii0oSOddleP4EGx1tjLnZQ0ZP33YRoMDCs5O3j56RBV4g14T4jvww== +"@typescript-eslint/types@4.29.0": + version "4.29.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-4.29.0.tgz#c8f1a1e4441ea4aca9b3109241adbc145f7f8a4e" + integrity sha512-2YJM6XfWfi8pgU2HRhTp7WgRw78TCRO3dOmSpAvIQ8MOv4B46JD2chnhpNT7Jq8j0APlIbzO1Bach734xxUl4A== "@typescript-eslint/typescript-estree@4.28.1": version "4.28.1" @@ -1455,13 +1425,13 @@ semver "^7.3.5" tsutils "^3.21.0" -"@typescript-eslint/typescript-estree@4.28.4": - version "4.28.4" - resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-4.28.4.tgz#252e6863278dc0727244be9e371eb35241c46d00" - integrity sha512-z7d8HK8XvCRyN2SNp+OXC2iZaF+O2BTquGhEYLKLx5k6p0r05ureUtgEfo5f6anLkhCxdHtCf6rPM1p4efHYDQ== +"@typescript-eslint/typescript-estree@4.29.0": + version "4.29.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-4.29.0.tgz#af7ab547757b86c91bfdbc54ff86845410856256" + integrity sha512-8ZpNHDIOyqzzgZrQW9+xQ4k5hM62Xy2R4RPO3DQxMc5Rq5QkCdSpk/drka+DL9w6sXNzV5nrdlBmf8+x495QXQ== dependencies: - "@typescript-eslint/types" "4.28.4" - "@typescript-eslint/visitor-keys" "4.28.4" + "@typescript-eslint/types" "4.29.0" + "@typescript-eslint/visitor-keys" "4.29.0" debug "^4.3.1" globby "^11.0.3" is-glob "^4.0.1" @@ -1476,46 +1446,46 @@ "@typescript-eslint/types" "4.28.1" eslint-visitor-keys "^2.0.0" -"@typescript-eslint/visitor-keys@4.28.4": - version "4.28.4" - resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-4.28.4.tgz#92dacfefccd6751cbb0a964f06683bfd72d0c4d3" - integrity sha512-NIAXAdbz1XdOuzqkJHjNKXKj8QQ4cv5cxR/g0uQhCYf/6//XrmfpaYsM7PnBcNbfvTDLUkqQ5TPNm1sozDdTWg== +"@typescript-eslint/visitor-keys@4.29.0": + version "4.29.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-4.29.0.tgz#1ff60f240def4d85ea68d4fd2e4e9759b7850c04" + integrity sha512-LoaofO1C/jAJYs0uEpYMXfHboGXzOJeV118X4OsZu9f7rG7Pr9B3+4HTU8+err81rADa4xfQmAxnRnPAI2jp+Q== dependencies: - "@typescript-eslint/types" "4.28.4" + "@typescript-eslint/types" "4.29.0" eslint-visitor-keys "^2.0.0" -"@vitejs/plugin-react-refresh@^1.3.5": - version "1.3.5" - resolved "https://registry.yarnpkg.com/@vitejs/plugin-react-refresh/-/plugin-react-refresh-1.3.5.tgz#be47e56d9965423968c8a6b2d62e5014e1e24478" - integrity sha512-7c4ELQMygKw5YFCNMLhDHrt4BOgXmROP65gPax/W43mJPNQaYW8ny1kI/bvCDNuzMqZWSK8uf2tEjPVVBnZ5IQ== +"@vitejs/plugin-react-refresh@^1.3.6": + version "1.3.6" + resolved "https://registry.yarnpkg.com/@vitejs/plugin-react-refresh/-/plugin-react-refresh-1.3.6.tgz#19818392db01e81746cfeb04e096ab3010e79fe3" + integrity sha512-iNR/UqhUOmFFxiezt0em9CgmiJBdWR+5jGxB2FihaoJfqGt76kiwaKoVOJVU5NYcDWMdN06LbyN2VIGIoYdsEA== dependencies: - "@babel/core" "^7.14.6" + "@babel/core" "^7.14.8" "@babel/plugin-transform-react-jsx-self" "^7.14.5" "@babel/plugin-transform-react-jsx-source" "^7.14.5" - "@rollup/pluginutils" "^4.1.0" + "@rollup/pluginutils" "^4.1.1" react-refresh "^0.10.0" -"@windicss/config@1.2.5": - version "1.2.5" - resolved "https://registry.yarnpkg.com/@windicss/config/-/config-1.2.5.tgz#1bc8e175a8b8cbf2e1bdb67769eb57e2ab2536fb" - integrity sha512-XzbvVQ9crDRnzHLA9t0atejAIus0X+P4l9SFPmGhUXycI63Ae0SfNzdw5q56MM5Et3Xbtju0esJ89K8bkRe+xA== +"@windicss/config@1.2.7": + version "1.2.7" + resolved "https://registry.yarnpkg.com/@windicss/config/-/config-1.2.7.tgz#c70bde7de272574f7a33eb9a1d7f80bdbffe48ba" + integrity sha512-XpH/dkXWk2LGygHzHBWWEW/yGcLqhpFFN2jo+zMeWZ1ggBzndQQzBHqHGQHcr6U6v3PoBuOz1prVWgUmQxn9eQ== dependencies: debug "^4.3.2" - jiti "^1.10.1" - windicss "^3.1.4" + jiti "^1.11.0" + windicss "^3.1.6" -"@windicss/plugin-utils@1.2.5": - version "1.2.5" - resolved "https://registry.yarnpkg.com/@windicss/plugin-utils/-/plugin-utils-1.2.5.tgz#60bab999b894f513852ebcf4a0113066b86f1938" - integrity sha512-RUFhW5l3YYkuNwYM1u7F/RoIpibULE7qe2N7D/rtiJVDf67lL9S8hjTll1/d7pvvW5XtI+fDuc8GpmGwARg83A== +"@windicss/plugin-utils@1.2.7": + version "1.2.7" + resolved "https://registry.yarnpkg.com/@windicss/plugin-utils/-/plugin-utils-1.2.7.tgz#aa2c571f66600ce2c916c9c47efe8eafb229908c" + integrity sha512-aNQhd1nEjkVsCHmzq0+4VGTmovOGGfPnH2hspH4YuDxMDhQ/99VrBdyk7irngWJjedjHB3+UYCSYWpY5a+2Hbg== dependencies: "@antfu/utils" "^0.2.4" - "@windicss/config" "1.2.5" + "@windicss/config" "1.2.7" debug "^4.3.2" - fast-glob "^3.2.6" + fast-glob "^3.2.7" magic-string "^0.25.7" micromatch "^4.0.4" - windicss "^3.1.4" + windicss "^3.1.6" "@xobotyi/scrollbar-width@^1.9.5": version "1.9.5" @@ -2144,6 +2114,17 @@ eslint-import-resolver-node@^0.3.4: debug "^2.6.9" resolve "^1.13.1" +eslint-import-resolver-typescript@^2.4.0: + version "2.4.0" + resolved "https://registry.yarnpkg.com/eslint-import-resolver-typescript/-/eslint-import-resolver-typescript-2.4.0.tgz#ec1e7063ebe807f0362a7320543aaed6fe1100e1" + integrity sha512-useJKURidCcldRLCNKWemr1fFQL1SzB3G4a0li6lFGvlc5xGe1hY343bvG07cbpCzPuM/lK19FIJB3XGFSkplA== + dependencies: + debug "^4.1.1" + glob "^7.1.6" + is-glob "^4.0.1" + resolve "^1.17.0" + tsconfig-paths "^3.9.0" + eslint-module-utils@^2.6.1: version "2.6.1" resolved "https://registry.yarnpkg.com/eslint-module-utils/-/eslint-module-utils-2.6.1.tgz#b51be1e473dd0de1c5ea638e22429c2490ea8233" @@ -2160,10 +2141,10 @@ eslint-plugin-es@^3.0.0: eslint-utils "^2.0.0" regexpp "^3.0.0" -eslint-plugin-flowtype@^5.8.1: - version "5.8.1" - resolved "https://registry.yarnpkg.com/eslint-plugin-flowtype/-/eslint-plugin-flowtype-5.8.1.tgz#6f2c313a6e9ec271a51315ccd09c2432b4d1930e" - integrity sha512-ADe4cYAn1UYVs1P1F9wKDNP2lbm3JtwbFykxJpO129utErjAhRZYQJCIKmhy6Rpx7Q9p8pc3gLVIFXtatXJriQ== +eslint-plugin-flowtype@^5.9.0: + version "5.9.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-flowtype/-/eslint-plugin-flowtype-5.9.0.tgz#8d2d81d3d79bb53470ed62b97409b31684757e30" + integrity sha512-aBUVPA5Wt0XyuV3Wg8flfVqYJR6yR2nRLuyPwoTjCg5VTk4G1X1zQpInr39tUGgRxqrA+d+B9GYK4+/d1i0Rfw== dependencies: lodash "^4.17.15" string-natural-compare "^3.0.1" @@ -2278,10 +2259,10 @@ eslint-visitor-keys@^2.0.0: resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz#f65328259305927392c938ed44eb0a5c9b2bd303" integrity sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw== -eslint@^7.31.0: - version "7.31.0" - resolved "https://registry.yarnpkg.com/eslint/-/eslint-7.31.0.tgz#f972b539424bf2604907a970860732c5d99d3aca" - integrity sha512-vafgJpSh2ia8tnTkNUkwxGmnumgckLh5aAbLa1xRmIn9+owi8qBNGKL+B881kNKNTy7FFqTEkpNkUvmw0n6PkA== +eslint@^7.32.0: + version "7.32.0" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-7.32.0.tgz#c6d328a14be3fb08c8d1d21e12c02fdb7a2a812d" + integrity sha512-VHZ8gX+EDfz+97jGcgyGCyRia/dPOd6Xh9yPv8Bl1+SoaIwD+a/vlrOmGRUyOYu7MwUhc7CxqeaDZU13S4+EpA== dependencies: "@babel/code-frame" "7.12.11" "@eslint/eslintrc" "^0.4.3" @@ -2399,7 +2380,7 @@ fast-glob@^3.1.1: micromatch "^4.0.2" picomatch "^2.2.1" -fast-glob@^3.2.5, fast-glob@^3.2.6: +fast-glob@^3.2.7: version "3.2.7" resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.2.7.tgz#fd6cb7a2d7e9aa7a7846111e85a196d6b2f766a1" integrity sha512-rYGMRwip6lUMvYD3BTScMwT1HtAs2d71SMv66Vrxs0IekGZEjhM0pcMfjQPnknBt2zeCwQMEupiN02ZP4DiT1Q== @@ -2840,10 +2821,10 @@ jest-worker@^26.2.1: merge-stream "^2.0.0" supports-color "^7.0.0" -jiti@^1.10.1: - version "1.10.1" - resolved "https://registry.yarnpkg.com/jiti/-/jiti-1.10.1.tgz#bc2a175b9435274dc8659d3d9a121a91c6b3a1af" - integrity sha512-qux9juDtAC8HlZxAk/fku73ak4TWNLigRFTNzFShE/kw4bXVFsVu538vLXAxvNyPszXgpX4YxkXfwTYEi+zf5A== +jiti@^1.11.0: + version "1.11.0" + resolved "https://registry.yarnpkg.com/jiti/-/jiti-1.11.0.tgz#64120a30d97b9bf37b8b032cf4564dfadc28984c" + integrity sha512-/2c7e61hxxTIN34UeHBB0LCJ5Tq64kgJDV7GR+++e8XRxCKRIKmB8tH6ww1W+Z6Kgd6By+C3RSCu1lXjbPT68A== jotai@^1.2.2: version "1.2.2" @@ -3319,10 +3300,10 @@ pkg-up@^2.0.0: dependencies: find-up "^2.1.0" -postcss@^8.3.5: - version "8.3.5" - resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.3.5.tgz#982216b113412bc20a86289e91eb994952a5b709" - integrity sha512-NxTuJocUhYGsMiMFHDUkmjSKT3EdH4/WbGF6GCi1NDGk+vbcUTun4fpbOqaPtD8IIsztA2ilZm2DhYCuyN58gA== +postcss@^8.3.6: + version "8.3.6" + resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.3.6.tgz#2730dd76a97969f37f53b9a6096197be311cc4ea" + integrity sha512-wG1cc/JhRgdqB6WHEuyLTedf3KIRuD0hG6ldkFEZNCjRxiC+3i6kkWUUbiJQayP28iwG35cEmAbe98585BYV0A== dependencies: colorette "^1.2.2" nanoid "^3.1.23" @@ -3588,7 +3569,7 @@ resolve-pathname@^3.0.0: resolved "https://registry.yarnpkg.com/resolve-pathname/-/resolve-pathname-3.0.0.tgz#99d02224d3cf263689becbb393bc560313025dcd" integrity sha512-C7rARubxI8bXFNB/hqcp/4iUeIXJhJZvFPFPiSPRnhU5UPxzMFIl+2E6yY6c4k9giDJAhtV+enfA+G89N6Csng== -resolve@^1.10.0, resolve@^1.10.1, resolve@^1.12.0, resolve@^1.13.1, resolve@^1.14.2, resolve@^1.19.0, resolve@^1.20.0: +resolve@^1.10.0, resolve@^1.10.1, resolve@^1.12.0, resolve@^1.13.1, resolve@^1.14.2, resolve@^1.17.0, resolve@^1.19.0, resolve@^1.20.0: version "1.20.0" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.20.0.tgz#629a013fb3f70755d6f0b7935cc1c2c5378b1975" integrity sha512-wENBPt4ySzg4ybFQW2TT1zMQucPK95HSh/nq2CFTZVOGut2+pQvSsgtda4d26YrYcr067wjbmzOG8byDPBX63A== @@ -3633,13 +3614,20 @@ rollup@^2.38.5: optionalDependencies: fsevents "~2.3.1" -rollup@^2.43.1, rollup@^2.51.2: +rollup@^2.43.1: version "2.53.3" resolved "https://registry.yarnpkg.com/rollup/-/rollup-2.53.3.tgz#14b0e57f0874d4ad23bdbb13050cf70bcd1eabf7" integrity sha512-79QIGP5DXz5ZHYnCPi3tLz+elOQi6gudp9YINdaJdjG0Yddubo6JRFUM//qCZ0Bap/GJrsUoEBVdSOc4AkMlRA== optionalDependencies: fsevents "~2.3.2" +rollup@^2.55.1: + version "2.55.1" + resolved "https://registry.yarnpkg.com/rollup/-/rollup-2.55.1.tgz#66a444648e2fb603d8e329e77a61c608a6510fda" + integrity sha512-1P9w5fpb6b4qroePh8vHKGIvPNxwoCQhjJpIqfZGHLKpZ0xcU2/XBmFxFbc9697/6bmHpmFTLk5R1dAQhFSo0g== + optionalDependencies: + fsevents "~2.3.2" + rtl-css-js@^1.14.0: version "1.14.1" resolved "https://registry.yarnpkg.com/rtl-css-js/-/rtl-css-js-1.14.1.tgz#f79781d6a0c510abe73fde60aa3cbe9dfd134a45" @@ -3664,10 +3652,10 @@ safe-buffer@~5.1.1: resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d" integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g== -sass@^1.36.0: - version "1.36.0" - resolved "https://registry.yarnpkg.com/sass/-/sass-1.36.0.tgz#5912ef9d5d16714171ba11cb17edb274c4bbc07e" - integrity sha512-fQzEjipfOv5kh930nu3Imzq3ie/sGDc/4KtQMJlt7RRdrkQSfe37Bwi/Rf/gfuYHsIuE1fIlDMvpyMcEwjnPvg== +sass@^1.37.5: + version "1.37.5" + resolved "https://registry.yarnpkg.com/sass/-/sass-1.37.5.tgz#f6838351f7cc814c4fcfe1d9a20e0cabbd1e7b3c" + integrity sha512-Cx3ewxz9QB/ErnVIiWg2cH0kiYZ0FPvheDTVC6BsiEGBTZKKZJ1Gq5Kq6jy3PKtL6+EJ8NIoaBW/RSd2R6cZOA== dependencies: chokidar ">=3.0.0 <4.0.0" @@ -4093,10 +4081,10 @@ type-fest@^0.20.2: resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.20.2.tgz#1bf207f4b28f91583666cb5fbd327887301cd5f4" integrity sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ== -type-fest@^1.2.2: - version "1.2.2" - resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-1.2.2.tgz#1930bc36b2064f7ab4aa307a6d1b65965199c698" - integrity sha512-pfkPYCcuV0TJoo/jlsUeWNV8rk7uMU6ocnYNvca1Vu+pyKi8Rl8Zo2scPt9O72gCsXIm+dMxOOWuA3VFDSdzWA== +type-fest@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-2.0.0.tgz#e9daf5615e89f6d430f34117f88f4ee2cd5a2725" + integrity sha512-BoEUnckjP9oiudy3KxlGdudtBAdJQ74Wp7dYwVPkUzBn+cVHOsBXh2zD2jLyqgbuJ1KMNriczZCI7lTBA94dFg== typescript@^4.3.5: version "4.3.5" @@ -4183,27 +4171,27 @@ 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== -vite-plugin-pwa@^0.8.2: - version "0.8.2" - resolved "https://registry.yarnpkg.com/vite-plugin-pwa/-/vite-plugin-pwa-0.8.2.tgz#2789a157e2f71faf834d968945efc22eee9ad64a" - integrity sha512-DuhFaTTV+a7FczxtKMgBEsaCOifJT5Kpe1KhHL72exb2buPkJ3Na+hoy6akAFDp7T3JuAvH0CAO9kivwbp0MPQ== +vite-plugin-pwa@^0.9.3: + version "0.9.3" + resolved "https://registry.yarnpkg.com/vite-plugin-pwa/-/vite-plugin-pwa-0.9.3.tgz#3c03df1e7b8c9a6406882b2f475d3920fecd2da9" + integrity sha512-o7UD6zMssH60dblwcTKqPeESlv1iF6tPQq2dx2N9smYMh5e5A6rlwWivV4fN8Nq2PVj82itcGRycIHDT+j32vg== dependencies: debug "^4.3.2" - fast-glob "^3.2.5" + fast-glob "^3.2.7" pretty-bytes "^5.6.0" - rollup "^2.51.2" + rollup "^2.55.1" workbox-build "^6.1.5" workbox-window "^6.1.5" -vite-plugin-windicss@^1.2.5: - version "1.2.5" - resolved "https://registry.yarnpkg.com/vite-plugin-windicss/-/vite-plugin-windicss-1.2.5.tgz#3fa963424947a24adf2ce5882f10448c0b6ea934" - integrity sha512-6z2XXQpV0WhSEoyWim4gaWyxrBhszhbufjQ3oiyJbtENoft90trJtnWYvPHXaTB0sspy1LIfSSQquru8N7KZJQ== +vite-plugin-windicss@^1.2.7: + version "1.2.7" + resolved "https://registry.yarnpkg.com/vite-plugin-windicss/-/vite-plugin-windicss-1.2.7.tgz#92671ec795ab1a8a4e520aff8117ac14c04d312f" + integrity sha512-JgIGsH5HPaz3ghDRhhLeF8VZQMUE+R0jD9u8sbne5KdBBa208r0IuTcx73V7CPcmsu7KABG6rfLgST9ffVoiDA== dependencies: - "@windicss/plugin-utils" "1.2.5" + "@windicss/plugin-utils" "1.2.7" chalk "^4.1.1" debug "^4.3.2" - windicss "^3.1.4" + windicss "^3.1.6" vite-tsconfig-paths@^3.3.13: version "3.3.13" @@ -4215,13 +4203,13 @@ vite-tsconfig-paths@^3.3.13: recrawl-sync "^2.0.3" tsconfig-paths "^3.9.0" -vite@^2.4.3: - version "2.4.3" - resolved "https://registry.yarnpkg.com/vite/-/vite-2.4.3.tgz#fe4aa78e9dd7d36bcb12eccbd52313b26cfadf77" - integrity sha512-iT6NPeiUUZ2FkzC3eazytOEMRaM4J+xgRQcNcpRcbmfYjakCFP4WKPJpeEz1U5JEKHAtwv3ZBQketQUFhFU3ng== +vite@^2.4.4: + version "2.4.4" + resolved "https://registry.yarnpkg.com/vite/-/vite-2.4.4.tgz#8c402a07ad45f168f6eb5428bead38f3e4363e47" + integrity sha512-m1wK6pFJKmaYA6AeZIUXyiAgUAAJzVXhIMYCdZUpCaFMGps0v0IlNJtbmPvkUhVEyautalajmnW5X6NboUPsnw== dependencies: esbuild "^0.12.8" - postcss "^8.3.5" + postcss "^8.3.6" resolve "^1.20.0" rollup "^2.38.5" optionalDependencies: @@ -4259,10 +4247,10 @@ which@^2.0.1: dependencies: isexe "^2.0.0" -windicss@^3.1.4, windicss@^3.1.5: - version "3.1.5" - resolved "https://registry.yarnpkg.com/windicss/-/windicss-3.1.5.tgz#e9b6d6adcbc6f6c6e33e6625a3e5923b328f3137" - integrity sha512-sGi2YiN6Bp/vWJS0jlpJhMmh7O2TBQ+yTbL6oqoRXz32q1VKELOUMfF+5pdtVL5uoVnfKf4gOUQs2XKNgU30Lw== +windicss@^3.1.6: + version "3.1.6" + resolved "https://registry.yarnpkg.com/windicss/-/windicss-3.1.6.tgz#237f24be8b38f90f451eedda166c46c25227c608" + integrity sha512-9/ShTPRs2pg/AJo4PtbgDv9p7BUgR52WqL7Gpr8VSO6LH8z4I/oKamUAlSXqyLsWD6yKS+xtxF3FRiHVJwYcuQ== word-wrap@^1.2.3: version "1.2.3"