diff --git a/frontend/package.json b/frontend/package.json index 3ace341b..24da0ddb 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -83,6 +83,7 @@ "util": "0.12.5", "uuid": "9.0.0", "vite": "4.3.8", + "vite-plugin-checker": "^0.6.1", "vite-plugin-ejs": "1.6.4", "vite-plugin-eslint": "^1.8.1", "vite-plugin-svgr": "3.2.0", diff --git a/frontend/src/views/Game.tsx b/frontend/src/views/Game.tsx index 7171486c..56a0b926 100644 --- a/frontend/src/views/Game.tsx +++ b/frontend/src/views/Game.tsx @@ -18,7 +18,7 @@ import { Dashboard, List, CloudOff } from '@mui/icons-material'; import { useTranslation } from 'react-i18next'; import useGame from './game/useGame'; import Board from './game/board/Board'; -import SummaryMode from './game/summary/SummaryMode'; +import { SummaryMode } from './game/summary/SummaryMode'; import useColumns from './game/useColumns'; import NoContent from '../components/NoContent'; import useCrypto from '../crypto/useCrypto'; diff --git a/frontend/src/views/game/__tests__/is-search-match.test.ts b/frontend/src/views/game/__tests__/is-search-match.test.ts index 6f0a3c0c..f46578fe 100644 --- a/frontend/src/views/game/__tests__/is-search-match.test.ts +++ b/frontend/src/views/game/__tests__/is-search-match.test.ts @@ -1,61 +1,58 @@ -import isSearchMatch from '../is-search-match'; +import { searchLogic } from '../is-search-match'; describe('Search Match logic', () => { it('Should be a match if there is no search (as everything matches)', () => { - expect(isSearchMatch('One little piggy', 'Bob Dylan', '', false)).toBe( - true - ); + expect(searchLogic('One little piggy', 'Bob Dylan', '', false)).toBe(true); }); it('Should not be a match if the post is blurred', () => { - expect(isSearchMatch('One little piggy', 'Bob Dylan', 'little', true)).toBe( + expect(searchLogic('One little piggy', 'Bob Dylan', 'little', true)).toBe( false ); }); it('Should be a match if the search matches the content', () => { - expect( - isSearchMatch('One little piggy', 'Bob Dylan', 'little', false) - ).toBe(true); + expect(searchLogic('One little piggy', 'Bob Dylan', 'little', false)).toBe( + true + ); - expect( - isSearchMatch('One little piggy', 'Bob Dylan', 'LITTLE', false) - ).toBe(true); + expect(searchLogic('One little piggy', 'Bob Dylan', 'LITTLE', false)).toBe( + true + ); }); it('Should NOT be a match if the search does not matches the content', () => { - expect(isSearchMatch('One little piggy', 'Bob Dylan', 'big', false)).toBe( + expect(searchLogic('One little piggy', 'Bob Dylan', 'big', false)).toBe( false ); - expect(isSearchMatch('One little piggy', 'Bob Dylan', 'litle', false)).toBe( + expect(searchLogic('One little piggy', 'Bob Dylan', 'litle', false)).toBe( false ); }); it('Should be a match if the search matches the author', () => { - expect(isSearchMatch('One little piggy', 'Bob Dylan', 'dyl', false)).toBe( + expect(searchLogic('One little piggy', 'Bob Dylan', 'dyl', false)).toBe( true ); - expect(isSearchMatch('One little piggy', 'Bob Dylan', 'bob d', false)).toBe( + expect(searchLogic('One little piggy', 'Bob Dylan', 'bob d', false)).toBe( true ); }); it('Should NOT be a match if the search does not matches the author', () => { - expect(isSearchMatch('One little piggy', 'Bob Dylan', 'John', false)).toBe( + expect(searchLogic('One little piggy', 'Bob Dylan', 'John', false)).toBe( false ); - expect(isSearchMatch('One little piggy', 'Bob Dylan', 'Lenon', false)).toBe( + expect(searchLogic('One little piggy', 'Bob Dylan', 'Lenon', false)).toBe( false ); }); it('Should NOT be a match if the author is null', () => { - expect(isSearchMatch('One little piggy', null, 'John', false)).toBe(false); - - expect(isSearchMatch('One little piggy', null, 'Lenon', false)).toBe(false); + expect(searchLogic('One little piggy', null, 'John', false)).toBe(false); + expect(searchLogic('One little piggy', null, 'Lenon', false)).toBe(false); }); }); diff --git a/frontend/src/views/game/board/Column.tsx b/frontend/src/views/game/board/Column.tsx index e141db7d..8059087c 100644 --- a/frontend/src/views/game/board/Column.tsx +++ b/frontend/src/views/game/board/Column.tsx @@ -19,6 +19,7 @@ import { ColumnContent } from '../types'; import useCrypto from '../../../crypto/useCrypto'; import useQuota from '../../../hooks/useQuota'; import useSessionUserPermissions from './useSessionUserPermissions'; +import { useSearch } from '../is-search-match'; interface ColumnProps { column: ColumnContent; @@ -62,6 +63,7 @@ const Column: React.FC = ({ const { encrypt } = useCrypto(); const permissions = useSessionUserPermissions(); const { increment } = useQuota(); + const searchPredicate = useSearch(search); const onContentChange = useCallback( (e: React.ChangeEvent) => setContent(e.target.value), [setContent] @@ -124,52 +126,57 @@ const Column: React.FC = ({ ) : null} - {groups.map((group) => ( - - onEditGroup({ - ...group, - label, - }) - } - onDelete={() => onDeleteGroup(group)} - > - {group.posts.map((post, index) => ( - onLike(post)} - onDislike={() => onDislike(post)} - onDelete={() => onDelete(post)} - onCancelVotes={() => onCancelVotes(post)} - onEdit={(content) => - onEdit({ - ...post, - content, - }) - } - onEditAction={(action) => - onEdit({ - ...post, - action, - }) - } - onEditGiphy={(giphy) => - onEdit({ - ...post, - giphy, - }) - } - /> - ))} - - ))} + {groups.map((group) => { + const posts = group.posts.filter(searchPredicate); + if (posts.length === 0) { + return null; + } + return ( + + onEditGroup({ + ...group, + label, + }) + } + onDelete={() => onDeleteGroup(group)} + > + {posts.map((post, index) => ( + onLike(post)} + onDislike={() => onDislike(post)} + onDelete={() => onDelete(post)} + onCancelVotes={() => onCancelVotes(post)} + onEdit={(content) => + onEdit({ + ...post, + content, + }) + } + onEditAction={(action) => + onEdit({ + ...post, + action, + }) + } + onEditGiphy={(giphy) => + onEdit({ + ...post, + giphy, + }) + } + /> + ))} + + ); + })} = ({ draggingOver={dropSnapshot.isDraggingOver} draggingColor={column.color} > - {posts.map((post, index) => ( + {posts.filter(searchPredicate).map((post, index) => ( onLike(post)} onDislike={() => onDislike(post)} diff --git a/frontend/src/views/game/board/post/Post.tsx b/frontend/src/views/game/board/post/Post.tsx index 4f6ee20f..9b0e00d8 100644 --- a/frontend/src/views/game/board/post/Post.tsx +++ b/frontend/src/views/game/board/post/Post.tsx @@ -37,14 +37,12 @@ import { trackEvent } from '../../../../track'; import useCrypto from '../../../../crypto/useCrypto'; import { getLorem } from './lorem'; import useCanDecrypt from '../../../../crypto/useCanDecrypt'; -import isSearchMatch from '../../is-search-match'; import { useConfirm } from 'material-ui-confirm'; interface PostItemProps { index: number; post: Post; color: string; - search: string; onLike: () => void; onDislike: () => void; onCancelVotes: () => void; @@ -72,7 +70,6 @@ const PostItem = ({ index, post, color, - search, onLike, onDislike, onCancelVotes, @@ -162,13 +159,6 @@ const PostItem = ({ return isBlurred ? generateLoremIpsum(post.content) : decrypt(post.content); }, [decrypt, isBlurred, post.content]); - const faded = !isSearchMatch( - post.content, - canShowAuthor ? post.user.name : null, - search, - isBlurred - ); - return ( <> {(provided: DraggableProvided) => ( - + {isBlurred ? ( @@ -248,7 +234,7 @@ const PostItem = ({ )} {giphyImageUrl && ( diff --git a/frontend/src/views/game/board/post/__tests__/Post.test.tsx b/frontend/src/views/game/board/post/__tests__/Post.test.tsx index f72b6b42..333f959e 100644 --- a/frontend/src/views/game/board/post/__tests__/Post.test.tsx +++ b/frontend/src/views/game/board/post/__tests__/Post.test.tsx @@ -75,7 +75,6 @@ describe('Post', () => { onEditAction={noop} onCancelVotes={noop} color="#123456" - search="" /> ); }); @@ -92,7 +91,6 @@ describe('Post', () => { onEditAction={noop} onCancelVotes={noop} color="#123456" - search="" /> ); const display = getByLabelText(/post content/i); @@ -115,7 +113,6 @@ describe('Post', () => { onEditAction={noop} onCancelVotes={noop} color="#123456" - search="" /> ); const deleteButton = queryByText(/delete/i); @@ -158,7 +155,6 @@ describe('Post', () => { onLike={noop} onCancelVotes={noop} color="#123456" - search="" /> ); const editableLabel = getByLabelText(/Post content/i); @@ -193,7 +189,6 @@ describe('Post', () => { onLike={noop} onCancelVotes={noop} color="#123456" - search="" /> ); const editableLabel = getByLabelText(/post content/i); diff --git a/frontend/src/views/game/is-search-match.ts b/frontend/src/views/game/is-search-match.ts index 32b61239..cc5fe377 100644 --- a/frontend/src/views/game/is-search-match.ts +++ b/frontend/src/views/game/is-search-match.ts @@ -1,6 +1,19 @@ -export default function isSearchMatch( +import { Post } from 'common'; +import { postPermissionLogic } from './board/permissions-logic'; +import { useCallback } from 'react'; +import useBackendCapabilities from 'global/useBackendCapabilities'; +import useUser from 'state/user/useUser'; +import useSession from './useSession'; + +type SearchPredicate = (post: Post) => boolean; + +function match(value: string, search: string) { + return value.toLocaleLowerCase().includes(search.toLocaleLowerCase()); +} + +export function searchLogic( content: string, - userName: string | null, + user: string | null, search: string, blurred: boolean ) { @@ -10,11 +23,35 @@ export default function isSearchMatch( if (blurred) { return false; } + return match(content, search) || match(user || '', search); +} + +export function useSearch(search: string): SearchPredicate { + const capabilities = useBackendCapabilities(); + const user = useUser(); + const { session } = useSession(); - return ( - content.toLocaleLowerCase().includes(search.toLocaleLowerCase()) || - (userName - ? userName.toLocaleLowerCase().includes(search.toLocaleLowerCase()) - : false) + const predicate = useCallback( + (post: Post) => { + if (!search) { + return true; + } + const permissions = postPermissionLogic( + post, + session, + capabilities, + user, + false + ); + return searchLogic( + post.content, + post.user.name, + search, + permissions.isBlurred + ); + }, + [capabilities, user, session, search] ); + + return predicate; } diff --git a/frontend/src/views/game/summary/SummaryMode.tsx b/frontend/src/views/game/summary/SummaryMode.tsx index 179fb315..baa8bbec 100644 --- a/frontend/src/views/game/summary/SummaryMode.tsx +++ b/frontend/src/views/game/summary/SummaryMode.tsx @@ -20,9 +20,9 @@ import SpeedDial from './SpeedDial'; import { useSummary } from './useSummary'; import { ColumnStats, ColumnStatsItem, ActionItem } from './types'; import useCrypto from '../../../crypto/useCrypto'; -import isSearchMatch from '../is-search-match'; import { Box } from '@mui/system'; import { usePostUserPermissionsNullable } from '../board/usePostUserPermissions'; +import { useSearch } from '../is-search-match'; interface SummaryModeProps { columns: ColumnContent[]; @@ -34,7 +34,7 @@ interface SectionProps { search: string; } -const Section = ({ stats, search }: SectionProps) => { +function Section({ stats, search }: SectionProps) { const { t } = useTranslation(); return ( @@ -58,14 +58,14 @@ const Section = ({ stats, search }: SectionProps) => { ); -}; +} interface GroupSummaryProps { group: ColumnStatsItem; search: string; } -const GroupSummary = ({ group, search }: GroupSummaryProps) => { +function GroupSummary({ group, search }: GroupSummaryProps) { const { decrypt } = useCrypto(); return ( @@ -79,7 +79,7 @@ const GroupSummary = ({ group, search }: GroupSummaryProps) => { ); -}; +} const GroupContainer = styled.div` border-left: 1px dashed ${colors.grey[500]}; @@ -100,37 +100,31 @@ interface PostsListProps { search: string; } -const PostsList = ({ items, search }: PostsListProps) => { +function PostsList({ items, search }: PostsListProps) { + const searchPredicate = useSearch(search); return (
- {items.map((item) => - item.type === 'post' ? ( - - ) : ( - - ) - )} + {items + .filter((item) => (item.post ? searchPredicate(item.post) : true)) + .map((item) => + item.type === 'post' ? ( + + ) : ( + + ) + )}
); -}; +} interface PostLineProps { item: ColumnStatsItem; - search: string; } -const PostLine = ({ item, search }: PostLineProps) => { +function PostLine({ item }: PostLineProps) { const { decrypt } = useCrypto(); const permissions = usePostUserPermissionsNullable(item.post); const canShowAuthor = permissions && permissions.canShowAuthor; - const higlighted = - search && - isSearchMatch( - item.content, - item.user ? item.user.name : null, - search, - false - ); return ( @@ -139,10 +133,7 @@ const PostLine = ({ item, search }: PostLineProps) => { +{item.likes}  -{item.dislikes} - + {decrypt(item.content)} {canShowAuthor ? (by {item.post?.user.name}) : null} @@ -150,7 +141,7 @@ const PostLine = ({ item, search }: PostLineProps) => { ); -}; +} const PostLineContainer = styled.div` :hover { @@ -191,7 +182,7 @@ interface ActionsListProps { actions: ActionItem[]; } -const ActionsList = ({ actions }: ActionsListProps) => { +function ActionsList({ actions }: ActionsListProps) { const theme = useTheme(); const { t } = useTranslation(); const { decrypt } = useCrypto(); @@ -237,9 +228,9 @@ const ActionsList = ({ actions }: ActionsListProps) => { ); -}; +} -const SummaryMode = ({ columns, search }: SummaryModeProps) => { +export function SummaryMode({ columns, search }: SummaryModeProps) { const stats = useSummary(columns); return ( @@ -254,7 +245,7 @@ const SummaryMode = ({ columns, search }: SummaryModeProps) => { ); -}; +} const SpeedDialContainer = styled.div` position: fixed; @@ -262,5 +253,3 @@ const SpeedDialContainer = styled.div` right: 20px; z-index: 3; `; - -export default SummaryMode; diff --git a/frontend/src/views/game/summary/index.tsx b/frontend/src/views/game/summary/index.tsx index 3bee64a2..bf626fed 100644 --- a/frontend/src/views/game/summary/index.tsx +++ b/frontend/src/views/game/summary/index.tsx @@ -6,7 +6,7 @@ import PhoneIcon from '@mui/icons-material/Phone'; import FavoriteIcon from '@mui/icons-material/Favorite'; import { ColumnContent } from '../types'; import { Page } from '../../../components/Page'; -import SummaryMode from './SummaryMode'; +import { SummaryMode } from './SummaryMode'; interface SummaryModeProps { columns: ColumnContent[]; diff --git a/frontend/vite.config.ts b/frontend/vite.config.ts index b27e8be8..4fe05d28 100644 --- a/frontend/vite.config.ts +++ b/frontend/vite.config.ts @@ -6,13 +6,19 @@ import inject from '@rollup/plugin-inject'; import { NodeGlobalsPolyfillPlugin } from '@esbuild-plugins/node-globals-polyfill'; import { NodeModulesPolyfillPlugin } from '@esbuild-plugins/node-modules-polyfill'; import { ViteEjsPlugin } from 'vite-plugin-ejs'; -import eslint from 'vite-plugin-eslint'; +import checker from 'vite-plugin-checker'; // https://vitejs.dev/config/ export default defineConfig({ plugins: [ react(), - eslint(), + checker({ + overlay: { initialIsOpen: false }, + typescript: true, + eslint: { + lintCommand: 'eslint "./src/**/*.{ts,tsx}"', + }, + }), viteTsconfigPaths(), svgrPlugin(), ViteEjsPlugin((config) => ({ diff --git a/frontend/yarn.lock b/frontend/yarn.lock index b1c6ee4d..796cf5e0 100644 --- a/frontend/yarn.lock +++ b/frontend/yarn.lock @@ -2331,6 +2331,13 @@ ajv@^6.10.0, ajv@^6.12.4: json-schema-traverse "^0.4.1" uri-js "^4.2.2" +ansi-escapes@^4.3.0: + version "4.3.2" + resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-4.3.2.tgz#6b2291d1db7d98b6521d5f1efa42d0f3a9feb65e" + integrity sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ== + dependencies: + type-fest "^0.21.3" + ansi-regex@^5.0.1: version "5.0.1" resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.1.tgz#082cb2c89c9fe8659a311a53bd6a4dc5301db304" @@ -2355,6 +2362,14 @@ 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.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== + dependencies: + normalize-path "^3.0.0" + picomatch "^2.0.4" + argparse@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/argparse/-/argparse-2.0.1.tgz#246f50f3ca78a3240f6c997e8a9bd1eac49e4b38" @@ -2539,6 +2554,11 @@ base64-js@^1.3.1: resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.5.1.tgz#1b1b440160a5bf7ad40b650f095963481903930a" integrity sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA== +binary-extensions@^2.0.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-2.2.0.tgz#75f502eeaf9ffde42fc98829645be4ea76bd9e2d" + integrity sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA== + blueimp-md5@^2.10.0: version "2.19.0" resolved "https://registry.yarnpkg.com/blueimp-md5/-/blueimp-md5-2.19.0.tgz#b53feea5498dcb53dc6ec4b823adb84b729c4af0" @@ -2564,7 +2584,7 @@ brace-expansion@^2.0.1: dependencies: balanced-match "^1.0.0" -braces@^3.0.2: +braces@^3.0.2, braces@~3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.2.tgz#3454e1a462ee8d599e236df336cd9ea4f8afe107" integrity sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A== @@ -2659,7 +2679,7 @@ chalk@^3.0.0: ansi-styles "^4.1.0" supports-color "^7.1.0" -chalk@^4.0.0, chalk@^4.0.2, chalk@^4.1.0: +chalk@^4.0.0, chalk@^4.0.2, chalk@^4.1.0, chalk@^4.1.1: version "4.1.2" resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.2.tgz#aac4e2b7734a740867aeb16bf02aad556a1e7a01" integrity sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA== @@ -2682,6 +2702,21 @@ check-error@^1.0.2: resolved "https://registry.yarnpkg.com/check-error/-/check-error-1.0.2.tgz#574d312edd88bb5dd8912e9286dd6c0aed4aac82" integrity sha512-BrgHpW9NURQgzoNyjfq0Wu6VFO6D7IZEmJNdtgNqpzGG8RuNFHt2jQxWlAs4HMe119chBnv+34syEZtc6IhLtA== +chokidar@^3.5.1: + version "3.5.3" + resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.5.3.tgz#1cf37c8707b932bd1af1ae22c0432e2acd1903bd" + integrity sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw== + dependencies: + anymatch "~3.1.2" + braces "~3.0.2" + glob-parent "~5.1.2" + is-binary-path "~2.1.0" + is-glob "~4.0.1" + normalize-path "~3.0.0" + readdirp "~3.6.0" + optionalDependencies: + fsevents "~2.3.2" + ci-info@^3.2.0: version "3.8.0" resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-3.8.0.tgz#81408265a5380c929f0bc665d62256628ce9ef91" @@ -2742,6 +2777,11 @@ comma-separated-tokens@^2.0.0: resolved "https://registry.yarnpkg.com/comma-separated-tokens/-/comma-separated-tokens-2.0.3.tgz#4e89c9458acb61bc8fef19f4529973b2392839ee" integrity sha512-Fu4hJdvzeylCfQPp9SGWidpzrMs7tTrlu6Vb8XGaRGck8QSNZJJp538Wrb60Lax4fPwR64ViY468OIUTbRlGZg== +commander@^8.0.0: + version "8.3.0" + resolved "https://registry.yarnpkg.com/commander/-/commander-8.3.0.tgz#4837ea1b2da67b9c616a67afbb0fafee567bca66" + integrity sha512-OkTL9umf+He2DZkUq8f8J9of7yL6RJKI24dVITBmNfZBmri9zYZQrKkuXiKhyfPSu8tUhnVBB1iKXevvnlR4Ww== + computed-style@~0.1.3: version "0.1.4" resolved "https://registry.yarnpkg.com/computed-style/-/computed-style-0.1.4.tgz#7f344fd8584b2e425bedca4a1afc0e300bb05d74" @@ -3519,6 +3559,17 @@ fast-diff@^1.2.0: resolved "https://registry.yarnpkg.com/fast-diff/-/fast-diff-1.3.0.tgz#ece407fa550a64d638536cd727e129c61616e0f0" integrity sha512-VxPP4NqbUjj6MaAOafWeUn2cXWLcCtljklUtZf0Ind4XQ+QPtmA0b18zZy0jIQx+ExRVCR/ZQpBmik5lXshNsw== +fast-glob@^3.2.7: + version "3.3.0" + resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.3.0.tgz#7c40cb491e1e2ed5664749e87bfb516dbe8727c0" + integrity sha512-ChDuvbOypPuNjO8yIDf36x7BlZX1smcUMTTcyoIjycexOxd6DFsKsg21qVBzEmr3G7fUKIRy2/psii+CIUt7FA== + dependencies: + "@nodelib/fs.stat" "^2.0.2" + "@nodelib/fs.walk" "^1.2.3" + glob-parent "^5.1.2" + merge2 "^1.3.0" + micromatch "^4.0.4" + fast-glob@^3.2.9: version "3.2.12" resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.2.12.tgz#7f39ec99c2e6ab030337142da9e0c18f37afae80" @@ -3620,6 +3671,15 @@ form-data@^4.0.0: combined-stream "^1.0.8" mime-types "^2.1.12" +fs-extra@^11.1.0: + version "11.1.1" + resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-11.1.1.tgz#da69f7c39f3b002378b0954bb6ae7efdc0876e2d" + integrity sha512-MGIE4HOvQCeUCzmlHs0vXpih4ysz4wg9qiSAu6cd42lVwPbTM1TjV7RusoyQqMmk/95gdQZX72u+YW+c3eEpFQ== + dependencies: + graceful-fs "^4.2.0" + jsonfile "^6.0.1" + universalify "^2.0.0" + fs.realpath@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" @@ -3683,7 +3743,7 @@ get-symbol-description@^1.0.0: call-bind "^1.0.2" get-intrinsic "^1.1.1" -glob-parent@^5.1.2: +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" integrity sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow== @@ -3757,7 +3817,7 @@ gopd@^1.0.1: dependencies: get-intrinsic "^1.1.3" -graceful-fs@^4.2.9: +graceful-fs@^4.1.6, graceful-fs@^4.2.0, 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== @@ -4055,6 +4115,13 @@ is-bigint@^1.0.1: dependencies: has-bigints "^1.0.1" +is-binary-path@~2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/is-binary-path/-/is-binary-path-2.1.0.tgz#ea1f7f3b80f064236e83470f86c09c254fb45b09" + integrity sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw== + dependencies: + binary-extensions "^2.0.0" + is-boolean-object@^1.1.0: version "1.1.2" resolved "https://registry.yarnpkg.com/is-boolean-object/-/is-boolean-object-1.1.2.tgz#5c6dc200246dd9321ae4b885a114bb1f75f63719" @@ -4114,7 +4181,7 @@ is-generator-function@^1.0.7: dependencies: has-tostringtag "^1.0.0" -is-glob@^4.0.0, is-glob@^4.0.1, is-glob@^4.0.3: +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" integrity sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg== @@ -4402,6 +4469,15 @@ jsonc-parser@^3.2.0: resolved "https://registry.yarnpkg.com/jsonc-parser/-/jsonc-parser-3.2.0.tgz#31ff3f4c2b9793f89c67212627c51c6394f88e76" integrity sha512-gfFQZrcTc8CnKXp6Y4/CBT3fTc0OVuDofpre4aEeEpSBPV5X5v4+Vmx+8snU7RLPrNHPKSgLxGo9YuQzz20o+w== +jsonfile@^6.0.1: + version "6.1.0" + resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-6.1.0.tgz#bc55b2634793c679ec6403094eb13698a6ec0aae" + integrity sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ== + dependencies: + universalify "^2.0.0" + optionalDependencies: + graceful-fs "^4.1.6" + jss-plugin-camel-case@^10.10.0: version "10.10.0" resolved "https://registry.yarnpkg.com/jss-plugin-camel-case/-/jss-plugin-camel-case-10.10.0.tgz#27ea159bab67eb4837fa0260204eb7925d4daa1c" @@ -4554,6 +4630,11 @@ lodash.merge@^4.6.2: resolved "https://registry.yarnpkg.com/lodash.merge/-/lodash.merge-4.6.2.tgz#558aa53b43b661e1925a0afdfa36a9a1085fe57a" integrity sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ== +lodash.pick@^4.4.0: + version "4.4.0" + resolved "https://registry.yarnpkg.com/lodash.pick/-/lodash.pick-4.4.0.tgz#52f05610fff9ded422611441ed1fc123a03001b3" + integrity sha512-hXt6Ul/5yWjfklSGvLQl8vM//l3FtyHZeuelpzK6mm99pNvN9yTDruNZPEJZD1oWrqo+izBmB7oUfWgcCX7s4Q== + lodash@4.17.21, lodash@^4.0.1, lodash@^4.17.15, lodash@^4.17.20, lodash@^4.17.21: version "4.17.21" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" @@ -4922,7 +5003,7 @@ min-indent@^1.0.0: resolved "https://registry.yarnpkg.com/min-indent/-/min-indent-1.0.1.tgz#a63f681673b30571fbe8bc25686ae746eefa9869" integrity sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg== -minimatch@^3.0.5, minimatch@^3.1.1, minimatch@^3.1.2: +minimatch@^3.0.4, minimatch@^3.0.5, minimatch@^3.1.1, minimatch@^3.1.2: version "3.1.2" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.1.2.tgz#19cd194bfd3e428f049a70817c038d89ab4be35b" integrity sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw== @@ -4998,6 +5079,11 @@ node-releases@^2.0.8: resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.12.tgz#35627cc224a23bfb06fb3380f2b3afaaa7eb1039" integrity sha512-QzsYKWhXTWx8h1kIvqfnC++o0pEmpRQA/aenALsL2F4pqNVr7YzcdMlDij5WBnwftRbJCNJL/O7zdKaxKPHqgQ== +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== + notistack@3.0.1: version "3.0.1" resolved "https://registry.yarnpkg.com/notistack/-/notistack-3.0.1.tgz#daf59888ab7e2c30a1fa8f71f9cba2978773236e" @@ -5006,6 +5092,13 @@ notistack@3.0.1: clsx "^1.1.0" goober "^2.0.33" +npm-run-path@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-4.0.1.tgz#b7ecd1e5ed53da8e37a55e1c2269e0b97ed748ea" + integrity sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw== + dependencies: + path-key "^3.0.0" + nwsapi@^2.2.4: version "2.2.4" resolved "https://registry.yarnpkg.com/nwsapi/-/nwsapi-2.2.4.tgz#fd59d5e904e8e1f03c25a7d5a15cfa16c714a1e5" @@ -5166,7 +5259,7 @@ path-is-absolute@^1.0.0: resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" integrity sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg== -path-key@^3.1.0: +path-key@^3.0.0, path-key@^3.1.0: version "3.1.1" resolved "https://registry.yarnpkg.com/path-key/-/path-key-3.1.1.tgz#581f6ade658cbba65a0d3380de7753295054f375" integrity sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q== @@ -5196,7 +5289,7 @@ picocolors@^1.0.0: resolved "https://registry.yarnpkg.com/picocolors/-/picocolors-1.0.0.tgz#cb5bdc74ff3f51892236eaf79d68bc44564ab81c" integrity sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ== -picomatch@^2.2.2, picomatch@^2.2.3, picomatch@^2.3.1: +picomatch@^2.0.4, picomatch@^2.2.1, picomatch@^2.2.2, picomatch@^2.2.3, picomatch@^2.3.1: version "2.3.1" resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.1.tgz#3ba3833733646d9d3e4995946c1365a67fb07a42" integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA== @@ -5509,6 +5602,13 @@ reactcss@^1.2.0: dependencies: lodash "^4.0.1" +readdirp@~3.6.0: + version "3.6.0" + resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-3.6.0.tgz#74a370bd857116e245b29cc97340cd431a02a6c7" + integrity sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA== + dependencies: + picomatch "^2.2.1" + recoil@0.7.7: version "0.7.7" resolved "https://registry.yarnpkg.com/recoil/-/recoil-0.7.7.tgz#c5f2c843224384c9c09e4a62c060fb4c1454dc8e" @@ -5764,6 +5864,13 @@ semver@^7.3.2, semver@^7.3.7: dependencies: lru-cache "^6.0.0" +semver@^7.3.4, semver@^7.5.0: + 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== + dependencies: + lru-cache "^6.0.0" + shebang-command@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-2.0.0.tgz#ccd0af4f8835fbdc265b82461aaf0c36663f34ea" @@ -6042,7 +6149,7 @@ time-zone@^1.0.0: resolved "https://registry.yarnpkg.com/time-zone/-/time-zone-1.0.0.tgz#99c5bf55958966af6d06d83bdf3800dc82faec5d" integrity sha512-TIsDdtKo6+XrPtiTm1ssmMngN1sAhyKnTO2kunQWqNPWIVvCm15Wmw4SWInwTVgJ5u/Tr04+8Ei9TNcw4x4ONA== -tiny-invariant@^1.0.6: +tiny-invariant@^1.0.6, tiny-invariant@^1.1.0: version "1.3.1" resolved "https://registry.yarnpkg.com/tiny-invariant/-/tiny-invariant-1.3.1.tgz#8560808c916ef02ecfd55e66090df23a4b7aa642" integrity sha512-AD5ih2NlSssTCwsMznbvwMZpJ1cbhkGd2uueNxzv2jDlEeZdU04JQfRnggJQ8DrcVBGjAsCKwFBbDlVNtEMlzw== @@ -6160,6 +6267,11 @@ 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@^0.21.3: + version "0.21.3" + resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.21.3.tgz#d260a24b0198436e133fa26a524a6d65fa3b2e37" + integrity sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w== + typed-array-length@^1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/typed-array-length/-/typed-array-length-1.0.4.tgz#89d83785e5c4098bec72e08b319651f0eac9c1bb" @@ -6273,6 +6385,11 @@ universalify@^0.2.0: resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.2.0.tgz#6451760566fa857534745ab1dde952d1b1761be0" integrity sha512-CJ1QgKmNg3CwvAv/kOFmtnEN05f0D/cn9QntgNOQlQF9dgvVTHj3t+8JPdjqawCHk7V/KA+fbUqzZ9XWhcqPUg== +universalify@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/universalify/-/universalify-2.0.0.tgz#75a4984efedc4b08975c5aeb73f530d02df25717" + integrity sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ== + update-browserslist-db@^1.0.10: version "1.0.11" resolved "https://registry.yarnpkg.com/update-browserslist-db/-/update-browserslist-db-1.0.11.tgz#9a2a641ad2907ae7b3616506f4b977851db5b940" @@ -6370,6 +6487,29 @@ vite-node@0.31.1: picocolors "^1.0.0" vite "^3.0.0 || ^4.0.0" +vite-plugin-checker@^0.6.1: + version "0.6.1" + resolved "https://registry.yarnpkg.com/vite-plugin-checker/-/vite-plugin-checker-0.6.1.tgz#51a0e654e033b5b9ad6301ae4d0ed0f5886d437c" + integrity sha512-4fAiu3W/IwRJuJkkUZlWbLunSzsvijDf0eDN6g/MGh6BUK4SMclOTGbLJCPvdAcMOQvVmm8JyJeYLYd4//8CkA== + dependencies: + "@babel/code-frame" "^7.12.13" + ansi-escapes "^4.3.0" + chalk "^4.1.1" + chokidar "^3.5.1" + commander "^8.0.0" + fast-glob "^3.2.7" + fs-extra "^11.1.0" + lodash.debounce "^4.0.8" + lodash.pick "^4.4.0" + npm-run-path "^4.0.1" + semver "^7.5.0" + strip-ansi "^6.0.0" + tiny-invariant "^1.1.0" + vscode-languageclient "^7.0.0" + vscode-languageserver "^7.0.0" + vscode-languageserver-textdocument "^1.0.1" + vscode-uri "^3.0.2" + vite-plugin-ejs@1.6.4: version "1.6.4" resolved "https://registry.yarnpkg.com/vite-plugin-ejs/-/vite-plugin-ejs-1.6.4.tgz#aa30820d8235774e717d902754a552480cf7758b" @@ -6451,6 +6591,50 @@ void-elements@3.1.0: resolved "https://registry.yarnpkg.com/void-elements/-/void-elements-3.1.0.tgz#614f7fbf8d801f0bb5f0661f5b2f5785750e4f09" integrity sha512-Dhxzh5HZuiHQhbvTW9AMetFfBHDMYpo23Uo9btPXgdYP+3T5S+p+jgNy7spra+veYhBP2dCSgxR/i2Y02h5/6w== +vscode-jsonrpc@6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/vscode-jsonrpc/-/vscode-jsonrpc-6.0.0.tgz#108bdb09b4400705176b957ceca9e0880e9b6d4e" + integrity sha512-wnJA4BnEjOSyFMvjZdpiOwhSq9uDoK8e/kpRJDTaMYzwlkrhG1fwDIZI94CLsLzlCK5cIbMMtFlJlfR57Lavmg== + +vscode-languageclient@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/vscode-languageclient/-/vscode-languageclient-7.0.0.tgz#b505c22c21ffcf96e167799757fca07a6bad0fb2" + integrity sha512-P9AXdAPlsCgslpP9pRxYPqkNYV7Xq8300/aZDpO35j1fJm/ncize8iGswzYlcvFw5DQUx4eVk+KvfXdL0rehNg== + dependencies: + minimatch "^3.0.4" + semver "^7.3.4" + vscode-languageserver-protocol "3.16.0" + +vscode-languageserver-protocol@3.16.0: + version "3.16.0" + resolved "https://registry.yarnpkg.com/vscode-languageserver-protocol/-/vscode-languageserver-protocol-3.16.0.tgz#34135b61a9091db972188a07d337406a3cdbe821" + integrity sha512-sdeUoAawceQdgIfTI+sdcwkiK2KU+2cbEYA0agzM2uqaUy2UpnnGHtWTHVEtS0ES4zHU0eMFRGN+oQgDxlD66A== + dependencies: + vscode-jsonrpc "6.0.0" + vscode-languageserver-types "3.16.0" + +vscode-languageserver-textdocument@^1.0.1: + version "1.0.8" + resolved "https://registry.yarnpkg.com/vscode-languageserver-textdocument/-/vscode-languageserver-textdocument-1.0.8.tgz#9eae94509cbd945ea44bca8dcfe4bb0c15bb3ac0" + integrity sha512-1bonkGqQs5/fxGT5UchTgjGVnfysL0O8v1AYMBjqTbWQTFn721zaPGDYFkOKtfDgFiSgXM3KwaG3FMGfW4Ed9Q== + +vscode-languageserver-types@3.16.0: + version "3.16.0" + resolved "https://registry.yarnpkg.com/vscode-languageserver-types/-/vscode-languageserver-types-3.16.0.tgz#ecf393fc121ec6974b2da3efb3155644c514e247" + integrity sha512-k8luDIWJWyenLc5ToFQQMaSrqCHiLwyKPHKPQZ5zz21vM+vIVUSvsRpcbiECH4WR88K2XZqc4ScRcZ7nk/jbeA== + +vscode-languageserver@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/vscode-languageserver/-/vscode-languageserver-7.0.0.tgz#49b068c87cfcca93a356969d20f5d9bdd501c6b0" + integrity sha512-60HTx5ID+fLRcgdHfmz0LDZAXYEV68fzwG0JWwEPBode9NuMYTIxuYXPg4ngO8i8+Ou0lM7y6GzaYWbiDL0drw== + dependencies: + vscode-languageserver-protocol "3.16.0" + +vscode-uri@^3.0.2: + version "3.0.7" + resolved "https://registry.yarnpkg.com/vscode-uri/-/vscode-uri-3.0.7.tgz#6d19fef387ee6b46c479e5fb00870e15e58c1eb8" + integrity sha512-eOpPHogvorZRobNqJGhapa0JdwaxpjVvyBp0QIUMRMSf8ZAlqOdEquKuRmw9Qwu0qXtJIWqFtMkmvJjUZmMjVA== + w3c-xmlserializer@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/w3c-xmlserializer/-/w3c-xmlserializer-4.0.0.tgz#aebdc84920d806222936e3cdce408e32488a3073"