From 67c2f2180d70a53b3e8b018f5d6b526ee81fae19 Mon Sep 17 00:00:00 2001 From: Manuel S Date: Sat, 27 Aug 2022 03:28:36 +0200 Subject: [PATCH] fix: Improved bundle size (#142) * Framer Motion is now lazy loaded. * FontAwesome is now a custom component removing all the bloat we don't need. * Imports and exports for types now use the proper syntax to get excluded by bundlers. --- .eslintrc.json | 51 +- next.config.js | 2 +- package-lock.json | 905 +++++++++++------- package.json | 5 +- src/components/box/Flex.ts | 2 +- src/components/bracket/BracketChart.tsx | 11 +- .../bracket/BracketThemeSummaryCard.tsx | 4 +- src/components/button/Button.tsx | 3 +- src/components/button/FilterToggleButton.tsx | 2 +- src/components/button/IconTextButton.tsx | 6 +- src/components/button/VideoButton.tsx | 7 +- src/components/card/AnimeSummaryCard.tsx | 8 +- src/components/card/ArtistSummaryCard.tsx | 2 +- src/components/card/Card.ts | 2 +- src/components/card/ErrorCard.tsx | 4 +- src/components/card/SummaryCard.tsx | 5 +- src/components/card/ThemeDetailCard.tsx | 2 +- src/components/card/ThemeSummaryCard.tsx | 10 +- .../description-list/DescriptionList.tsx | 2 +- src/components/external-link/ExternalLink.tsx | 2 +- .../featured-theme/FeaturedTheme.tsx | 2 +- src/components/filter/AnimeThemeFilter.tsx | 2 +- src/components/footer/Footer.tsx | 2 +- src/components/icon/FontAwesomeIcon.tsx | 43 + src/components/icon/Icon.tsx | 10 +- src/components/image/CoverImage.tsx | 4 +- src/components/image/Logo.tsx | 2 +- src/components/image/LogoPlaceholder.tsx | 2 +- src/components/image/MultiCoverImage.tsx | 4 +- src/components/image/StudioCoverImage.tsx | 5 +- src/components/index/AlphabeticalIndex.tsx | 3 +- src/components/input/Input.tsx | 6 +- src/components/listbox/Listbox.tsx | 3 +- src/components/listbox/ListboxCustom.tsx | 7 +- src/components/listbox/ListboxNative.tsx | 5 +- src/components/menu/Menu.tsx | 2 +- src/components/menu/ThemeMenu.tsx | 2 +- .../navigation/SeasonNavigation.tsx | 4 +- src/components/navigation/YearNavigation.tsx | 2 +- .../search-filter/SearchFilterSortBy.tsx | 2 +- src/components/search/SearchAnime.tsx | 2 +- src/components/search/SearchArtist.tsx | 2 +- src/components/search/SearchEntity.tsx | 8 +- src/components/search/SearchGlobal.tsx | 4 +- src/components/search/SearchSeries.tsx | 2 +- src/components/search/SearchStudio.tsx | 7 +- src/components/search/SearchTheme.tsx | 2 +- src/components/seo/SEO.tsx | 2 +- src/components/skeleton/Skeleton.tsx | 4 +- src/components/switcher/Switcher.tsx | 9 +- src/components/table/Table.tsx | 2 +- src/components/table/ThemeTable.tsx | 2 +- src/components/tag/ContentWarningTags.tsx | 2 +- src/components/tag/EpisodeTag.tsx | 2 +- src/components/tag/Tag.tsx | 10 +- src/components/tag/ThemeEntryTags.tsx | 2 +- src/components/tag/VideoTags.tsx | 2 +- src/components/text/Text.ts | 6 +- src/components/toast/AnnouncementToast.tsx | 3 +- src/components/toast/PlaylistAddToast.tsx | 2 +- src/components/toast/ToastHub.tsx | 4 +- src/components/utils/Collapse.tsx | 2 +- src/components/utils/ErrorBoundary.tsx | 3 +- src/components/utils/HeightTransition.tsx | 5 +- src/components/utils/Performances.tsx | 2 +- src/components/utils/SongTitle.tsx | 2 +- src/components/utils/SongTitleWithArtists.tsx | 2 +- .../video-player/VideoPlayer.style.ts | 4 +- src/components/video-player/VideoPlayer.tsx | 5 +- src/context/toastContext.tsx | 3 +- src/hooks/useColorTheme.ts | 3 +- src/hooks/useEntitySearch.ts | 5 +- src/hooks/useLocalPlaylist.tsx | 3 +- src/hooks/useSetting.ts | 2 +- src/hooks/useWatchHistory.ts | 3 +- src/lib/client/index.ts | 4 +- src/lib/client/randomTheme.ts | 2 +- src/lib/client/search.ts | 2 +- src/lib/common/animethemes/api.ts | 7 +- src/lib/common/animethemes/resolvers.ts | 2 +- src/lib/common/index.ts | 3 +- src/pages/_app.tsx | 7 +- src/pages/_document.tsx | 3 +- .../anime/[animeSlug]/[videoSlug]/index.tsx | 9 +- src/pages/anime/[animeSlug]/index.tsx | 11 +- src/pages/anime/index.tsx | 7 +- src/pages/api/revalidate.ts | 4 +- src/pages/artist/[artistSlug]/index.tsx | 8 +- src/pages/artist/index.tsx | 7 +- src/pages/design.tsx | 12 +- src/pages/dev.tsx | 3 +- src/pages/event/[bracketSlug]/index.tsx | 11 +- src/pages/event/anime-awards.tsx | 19 +- src/pages/event/index.tsx | 2 +- src/pages/index.tsx | 6 +- src/pages/profile/gallery/index.tsx | 7 +- src/pages/profile/index.tsx | 3 +- src/pages/search/[entity]/index.tsx | 4 +- src/pages/series/[seriesSlug]/index.tsx | 8 +- src/pages/series/index.tsx | 7 +- src/pages/studio/[studioSlug]/index.tsx | 8 +- src/pages/studio/index.tsx | 7 +- src/pages/wiki/[...pageSlug]/index.tsx | 21 +- src/pages/wiki/index.tsx | 7 +- src/pages/year/[year]/[season]/index.tsx | 11 +- src/pages/year/[year]/index.tsx | 11 +- src/pages/year/index.tsx | 7 +- src/styles/mixins.ts | 3 +- src/theme/colors/dark.ts | 3 +- src/theme/index.ts | 3 +- src/utils/comparators.ts | 4 +- src/utils/config.js | 2 + src/utils/createVideoSlug.ts | 4 +- src/utils/extractBackgroundColor.ts | 2 +- src/utils/extractImages.ts | 4 +- src/utils/fetchStaticPaths.ts | 2 +- src/utils/motionFeatures.ts | 3 + 117 files changed, 954 insertions(+), 576 deletions(-) create mode 100644 src/components/icon/FontAwesomeIcon.tsx create mode 100644 src/utils/motionFeatures.ts diff --git a/.eslintrc.json b/.eslintrc.json index c5c7504..594804c 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -1,13 +1,11 @@ { - "parser": "@typescript-eslint/parser", - "plugins": [ - "@typescript-eslint" - ], "extends": [ "next/core-web-vitals", "plugin:react/recommended", - "eslint:recommended", - "plugin:@typescript-eslint/recommended" + "eslint:recommended" + ], + "ignorePatterns": [ + "src/generated" ], "rules": { "semi": [ @@ -36,17 +34,40 @@ "SwitchCase": 1 } ], - "no-duplicate-imports": "error", - "@typescript-eslint/no-unused-vars": "error", "react/react-in-jsx-scope": "off", "react/self-closing-comp": "error", // For now we don't habe prop-types validation - "react/prop-types": "off", - "@typescript-eslint/no-empty-interface": [ - "error", - { - "allowSingleExtends": true + "react/prop-types": "off" + + }, + "overrides": [ + { + "files": [ + "**/*.{ts,tsx}" + ], + "parser": "@typescript-eslint/parser", + "plugins": [ + "@typescript-eslint" + ], + "extends": [ + "plugin:@typescript-eslint/recommended" + ], + "parserOptions": { + "project": [ + "./tsconfig.json" + ] + }, + "rules": { + "@typescript-eslint/no-unused-vars": "error", + "@typescript-eslint/no-empty-interface": [ + "error", + { + "allowSingleExtends": true + } + ], + "@typescript-eslint/consistent-type-imports": "error", + "@typescript-eslint/consistent-type-exports": "error" } - ] - } + } + ] } diff --git a/next.config.js b/next.config.js index 8073c84..4c01d7e 100644 --- a/next.config.js +++ b/next.config.js @@ -7,7 +7,7 @@ const withBundleAnalyzer = require("@next/bundle-analyzer")({ if (!validateConfig()) { error("Shutting down because of invalid configuration..."); - return process.exit(1); + process.exit(1); } if (STAGING) { diff --git a/package-lock.json b/package-lock.json index 318a159..265c558 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,17 +1,16 @@ { "name": "animethemes-web", - "version": "2.0.0", + "version": "3.0.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "animethemes-web", - "version": "2.0.0", + "version": "3.0.0", "dependencies": { "@fortawesome/fontawesome-svg-core": "^6.1.1", "@fortawesome/free-brands-svg-icons": "^6.1.1", "@fortawesome/pro-solid-svg-icons": "^6.1.1", - "@fortawesome/react-fontawesome": "^0.1.18", "@graphql-tools/merge": "^8.2.1", "@graphql-tools/schema": "^8.2.0", "@graphql-tools/utils": "^8.6.5", @@ -19,13 +18,13 @@ "@reach/listbox": "^0.17.0", "@reach/menu-button": "^0.17.0", "common-tags": "^1.8.0", - "framer-motion": "^6.2.1", + "framer-motion": "^6.5.1", "graphql": "^15.8.0", "graphql-parse-resolve-info": "^4.12.0", "graphql-tag": "^2.12.6", "lodash-es": "^4.17.21", "marked": "^4.0.12", - "next": "^12.2.0", + "next": "^12.2.5", "p-limit": "^3.1.0", "prismjs": "^1.27.0", "react": "^17.0.2", @@ -1317,18 +1316,6 @@ "node": ">=6" } }, - "node_modules/@fortawesome/react-fontawesome": { - "version": "0.1.18", - "resolved": "https://npm.fontawesome.com/@fortawesome/react-fontawesome/-/0.1.18/react-fontawesome-0.1.18.tgz", - "integrity": "sha512-RwLIB4TZw0M9gvy5u+TusAA0afbwM4JQIimNH/j3ygd6aIvYPQLqXMhC9ErY26J23rDPyDZldIfPq/HpTTJ/tQ==", - "dependencies": { - "prop-types": "^15.8.1" - }, - "peerDependencies": { - "@fortawesome/fontawesome-svg-core": "~1 || ~6", - "react": ">=16.x" - } - }, "node_modules/@graphql-codegen/cli": { "version": "2.9.1", "resolved": "https://registry.npmjs.org/@graphql-codegen/cli/-/cli-2.9.1.tgz", @@ -2249,6 +2236,64 @@ "node": ">=12" } }, + "node_modules/@motionone/animation": { + "version": "10.14.0", + "resolved": "https://registry.npmjs.org/@motionone/animation/-/animation-10.14.0.tgz", + "integrity": "sha512-h+1sdyBP8vbxEBW5gPFDnj+m2DCqdlAuf2g6Iafb1lcMnqjsRXWlPw1AXgvUMXmreyhqmPbJqoNfIKdytampRQ==", + "dependencies": { + "@motionone/easing": "^10.14.0", + "@motionone/types": "^10.14.0", + "@motionone/utils": "^10.14.0", + "tslib": "^2.3.1" + } + }, + "node_modules/@motionone/dom": { + "version": "10.12.0", + "resolved": "https://registry.npmjs.org/@motionone/dom/-/dom-10.12.0.tgz", + "integrity": "sha512-UdPTtLMAktHiqV0atOczNYyDd/d8Cf5fFsd1tua03PqTwwCe/6lwhLSQ8a7TbnQ5SN0gm44N1slBfj+ORIhrqw==", + "dependencies": { + "@motionone/animation": "^10.12.0", + "@motionone/generators": "^10.12.0", + "@motionone/types": "^10.12.0", + "@motionone/utils": "^10.12.0", + "hey-listen": "^1.0.8", + "tslib": "^2.3.1" + } + }, + "node_modules/@motionone/easing": { + "version": "10.14.0", + "resolved": "https://registry.npmjs.org/@motionone/easing/-/easing-10.14.0.tgz", + "integrity": "sha512-2vUBdH9uWTlRbuErhcsMmt1jvMTTqvGmn9fHq8FleFDXBlHFs5jZzHJT9iw+4kR1h6a4SZQuCf72b9ji92qNYA==", + "dependencies": { + "@motionone/utils": "^10.14.0", + "tslib": "^2.3.1" + } + }, + "node_modules/@motionone/generators": { + "version": "10.14.0", + "resolved": "https://registry.npmjs.org/@motionone/generators/-/generators-10.14.0.tgz", + "integrity": "sha512-6kRHezoFfIjFN7pPpaxmkdZXD36tQNcyJe3nwVqwJ+ZfC0e3rFmszR8kp9DEVFs9QL/akWjuGPSLBI1tvz+Vjg==", + "dependencies": { + "@motionone/types": "^10.14.0", + "@motionone/utils": "^10.14.0", + "tslib": "^2.3.1" + } + }, + "node_modules/@motionone/types": { + "version": "10.14.0", + "resolved": "https://registry.npmjs.org/@motionone/types/-/types-10.14.0.tgz", + "integrity": "sha512-3bNWyYBHtVd27KncnJLhksMFQ5o2MSdk1cA/IZqsHtA9DnRM1SYgN01CTcJ8Iw8pCXF5Ocp34tyAjY7WRpOJJQ==" + }, + "node_modules/@motionone/utils": { + "version": "10.14.0", + "resolved": "https://registry.npmjs.org/@motionone/utils/-/utils-10.14.0.tgz", + "integrity": "sha512-sLWBLPzRqkxmOTRzSaD3LFQXCPHvDzyHJ1a3VP9PRzBxyVd2pv51/gMOsdAcxQ9n+MIeGJnxzXBYplUHKj4jkw==", + "dependencies": { + "@motionone/types": "^10.14.0", + "hey-listen": "^1.0.8", + "tslib": "^2.3.1" + } + }, "node_modules/@n1ru4l/graphql-live-query": { "version": "0.9.0", "resolved": "https://registry.npmjs.org/@n1ru4l/graphql-live-query/-/graphql-live-query-0.9.0.tgz", @@ -2267,9 +2312,9 @@ } }, "node_modules/@next/env": { - "version": "12.2.0", - "resolved": "https://registry.npmjs.org/@next/env/-/env-12.2.0.tgz", - "integrity": "sha512-/FCkDpL/8SodJEXvx/DYNlOD5ijTtkozf4PPulYPtkPOJaMPpBSOkzmsta4fnrnbdH6eZjbwbiXFdr6gSQCV4w==" + "version": "12.2.5", + "resolved": "https://registry.npmjs.org/@next/env/-/env-12.2.5.tgz", + "integrity": "sha512-vLPLV3cpPGjUPT3PjgRj7e3nio9t6USkuew3JE/jMeon/9Mvp1WyR18v3iwnCuX7eUAm1HmAbJHHLAbcu/EJcw==" }, "node_modules/@next/eslint-plugin-next": { "version": "12.1.6", @@ -2313,9 +2358,9 @@ } }, "node_modules/@next/swc-android-arm-eabi": { - "version": "12.2.0", - "resolved": "https://registry.npmjs.org/@next/swc-android-arm-eabi/-/swc-android-arm-eabi-12.2.0.tgz", - "integrity": "sha512-hbneH8DNRB2x0Nf5fPCYoL8a0osvdTCe4pvOc9Rv5CpDsoOlf8BWBs2OWpeP0U2BktGvIsuUhmISmdYYGyrvTw==", + "version": "12.2.5", + "resolved": "https://registry.npmjs.org/@next/swc-android-arm-eabi/-/swc-android-arm-eabi-12.2.5.tgz", + "integrity": "sha512-cPWClKxGhgn2dLWnspW+7psl3MoLQUcNqJqOHk2BhNcou9ARDtC0IjQkKe5qcn9qg7I7U83Gp1yh2aesZfZJMA==", "cpu": [ "arm" ], @@ -2328,9 +2373,9 @@ } }, "node_modules/@next/swc-android-arm64": { - "version": "12.2.0", - "resolved": "https://registry.npmjs.org/@next/swc-android-arm64/-/swc-android-arm64-12.2.0.tgz", - "integrity": "sha512-1eEk91JHjczcJomxJ8X0XaUeNcp5Lx1U2Ic7j15ouJ83oRX+3GIslOuabW2oPkSgXbHkThMClhirKpvG98kwZg==", + "version": "12.2.5", + "resolved": "https://registry.npmjs.org/@next/swc-android-arm64/-/swc-android-arm64-12.2.5.tgz", + "integrity": "sha512-vMj0efliXmC5b7p+wfcQCX0AfU8IypjkzT64GiKJD9PgiA3IILNiGJr1fw2lyUDHkjeWx/5HMlMEpLnTsQslwg==", "cpu": [ "arm64" ], @@ -2343,9 +2388,9 @@ } }, "node_modules/@next/swc-darwin-arm64": { - "version": "12.2.0", - "resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-12.2.0.tgz", - "integrity": "sha512-x5U5gJd7ZvrEtTFnBld9O2bUlX8opu7mIQUqRzj7KeWzBwPhrIzTTsQXAiNqsaMuaRPvyHBVW/5d/6g6+89Y8g==", + "version": "12.2.5", + "resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-12.2.5.tgz", + "integrity": "sha512-VOPWbO5EFr6snla/WcxUKtvzGVShfs302TEMOtzYyWni6f9zuOetijJvVh9CCTzInnXAZMtHyNhefijA4HMYLg==", "cpu": [ "arm64" ], @@ -2358,9 +2403,9 @@ } }, "node_modules/@next/swc-darwin-x64": { - "version": "12.2.0", - "resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-12.2.0.tgz", - "integrity": "sha512-iwMNFsrAPjfedjKDv9AXPAV16PWIomP3qw/FfPaxkDVRbUls7BNdofBLzkQmqxqWh93WrawLwaqyXpJuAaiwJA==", + "version": "12.2.5", + "resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-12.2.5.tgz", + "integrity": "sha512-5o8bTCgAmtYOgauO/Xd27vW52G2/m3i5PX7MUYePquxXAnX73AAtqA3WgPXBRitEB60plSKZgOTkcpqrsh546A==", "cpu": [ "x64" ], @@ -2373,9 +2418,9 @@ } }, "node_modules/@next/swc-freebsd-x64": { - "version": "12.2.0", - "resolved": "https://registry.npmjs.org/@next/swc-freebsd-x64/-/swc-freebsd-x64-12.2.0.tgz", - "integrity": "sha512-gRiAw8g3Akf6niTDLEm1Emfa7jXDjvaAj/crDO8hKASKA4Y1fS4kbi/tyWw5VtoFI4mUzRmCPmZ8eL0tBSG58A==", + "version": "12.2.5", + "resolved": "https://registry.npmjs.org/@next/swc-freebsd-x64/-/swc-freebsd-x64-12.2.5.tgz", + "integrity": "sha512-yYUbyup1JnznMtEBRkK4LT56N0lfK5qNTzr6/DEyDw5TbFVwnuy2hhLBzwCBkScFVjpFdfiC6SQAX3FrAZzuuw==", "cpu": [ "x64" ], @@ -2388,9 +2433,9 @@ } }, "node_modules/@next/swc-linux-arm-gnueabihf": { - "version": "12.2.0", - "resolved": "https://registry.npmjs.org/@next/swc-linux-arm-gnueabihf/-/swc-linux-arm-gnueabihf-12.2.0.tgz", - "integrity": "sha512-/TJZkxaIpeEwnXh6A40trgwd40C5+LJroLUOEQwMOJdavLl62PjCA6dGl1pgooWLCIb5YdBQ0EG4ylzvLwS2+Q==", + "version": "12.2.5", + "resolved": "https://registry.npmjs.org/@next/swc-linux-arm-gnueabihf/-/swc-linux-arm-gnueabihf-12.2.5.tgz", + "integrity": "sha512-2ZE2/G921Acks7UopJZVMgKLdm4vN4U0yuzvAMJ6KBavPzqESA2yHJlm85TV/K9gIjKhSk5BVtauIUntFRP8cg==", "cpu": [ "arm" ], @@ -2403,9 +2448,9 @@ } }, "node_modules/@next/swc-linux-arm64-gnu": { - "version": "12.2.0", - "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-12.2.0.tgz", - "integrity": "sha512-++WAB4ElXCSOKG9H8r4ENF8EaV+w0QkrpjehmryFkQXmt5juVXz+nKDVlCRMwJU7A1O0Mie82XyEoOrf6Np1pA==", + "version": "12.2.5", + "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-12.2.5.tgz", + "integrity": "sha512-/I6+PWVlz2wkTdWqhlSYYJ1pWWgUVva6SgX353oqTh8njNQp1SdFQuWDqk8LnM6ulheVfSsgkDzxrDaAQZnzjQ==", "cpu": [ "arm64" ], @@ -2418,9 +2463,9 @@ } }, "node_modules/@next/swc-linux-arm64-musl": { - "version": "12.2.0", - "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-12.2.0.tgz", - "integrity": "sha512-XrqkHi/VglEn5zs2CYK6ofJGQySrd+Lr4YdmfJ7IhsCnMKkQY1ma9Hv5THwhZVof3e+6oFHrQ9bWrw9K4WTjFA==", + "version": "12.2.5", + "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-12.2.5.tgz", + "integrity": "sha512-LPQRelfX6asXyVr59p5sTpx5l+0yh2Vjp/R8Wi4X9pnqcayqT4CUJLiHqCvZuLin3IsFdisJL0rKHMoaZLRfmg==", "cpu": [ "arm64" ], @@ -2433,9 +2478,9 @@ } }, "node_modules/@next/swc-linux-x64-gnu": { - "version": "12.2.0", - "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-12.2.0.tgz", - "integrity": "sha512-MyhHbAKVjpn065WzRbqpLu2krj4kHLi6RITQdD1ee+uxq9r2yg5Qe02l24NxKW+1/lkmpusl4Y5Lks7rBiJn4w==", + "version": "12.2.5", + "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-12.2.5.tgz", + "integrity": "sha512-0szyAo8jMCClkjNK0hknjhmAngUppoRekW6OAezbEYwHXN/VNtsXbfzgYOqjKWxEx3OoAzrT3jLwAF0HdX2MEw==", "cpu": [ "x64" ], @@ -2448,9 +2493,9 @@ } }, "node_modules/@next/swc-linux-x64-musl": { - "version": "12.2.0", - "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-12.2.0.tgz", - "integrity": "sha512-Tz1tJZ5egE0S/UqCd5V6ZPJsdSzv/8aa7FkwFmIJ9neLS8/00za+OY5pq470iZQbPrkTwpKzmfTTIPRVD5iqDg==", + "version": "12.2.5", + "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-12.2.5.tgz", + "integrity": "sha512-zg/Y6oBar1yVnW6Il1I/08/2ukWtOG6s3acdJdEyIdsCzyQi4RLxbbhkD/EGQyhqBvd3QrC6ZXQEXighQUAZ0g==", "cpu": [ "x64" ], @@ -2463,9 +2508,9 @@ } }, "node_modules/@next/swc-win32-arm64-msvc": { - "version": "12.2.0", - "resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-12.2.0.tgz", - "integrity": "sha512-0iRO/CPMCdCYUzuH6wXLnsfJX1ykBX4emOOvH0qIgtiZM0nVYbF8lkEyY2ph4XcsurpinS+ziWuYCXVqrOSqiw==", + "version": "12.2.5", + "resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-12.2.5.tgz", + "integrity": "sha512-3/90DRNSqeeSRMMEhj4gHHQlLhhKg5SCCoYfE3kBjGpE63EfnblYUqsszGGZ9ekpKL/R4/SGB40iCQr8tR5Jiw==", "cpu": [ "arm64" ], @@ -2478,9 +2523,9 @@ } }, "node_modules/@next/swc-win32-ia32-msvc": { - "version": "12.2.0", - "resolved": "https://registry.npmjs.org/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-12.2.0.tgz", - "integrity": "sha512-8A26RJVcJHwIKm8xo/qk2ePRquJ6WCI2keV2qOW/Qm+ZXrPXHMIWPYABae/nKN243YFBNyPiHytjX37VrcpUhg==", + "version": "12.2.5", + "resolved": "https://registry.npmjs.org/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-12.2.5.tgz", + "integrity": "sha512-hGLc0ZRAwnaPL4ulwpp4D2RxmkHQLuI8CFOEEHdzZpS63/hMVzv81g8jzYA0UXbb9pus/iTc3VRbVbAM03SRrw==", "cpu": [ "ia32" ], @@ -2493,9 +2538,9 @@ } }, "node_modules/@next/swc-win32-x64-msvc": { - "version": "12.2.0", - "resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-12.2.0.tgz", - "integrity": "sha512-OI14ozFLThEV3ey6jE47zrzSTV/6eIMsvbwozo+XfdWqOPwQ7X00YkRx4GVMKMC0rM44oGS2gmwMKYpe4EblnA==", + "version": "12.2.5", + "resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-12.2.5.tgz", + "integrity": "sha512-7h5/ahY7NeaO2xygqVrSG/Y8Vs4cdjxIjowTZ5W6CKoTKn7tmnuxlUc2h74x06FKmbhAd9agOjr/AOKyxYYm9Q==", "cpu": [ "x64" ], @@ -2547,48 +2592,6 @@ "resolved": "https://registry.npmjs.org/@polka/url/-/url-1.0.0-next.21.tgz", "integrity": "sha512-a5Sab1C4/icpTZVzZc5Ghpz88yQtGOyNqYXcZgOssB2uuAr+wF/MvN6bgtW32q7HHrvBki+BsZ0OuNv6EV3K9g==" }, - "node_modules/@reach/auto-id": { - "version": "0.17.0", - "resolved": "https://registry.npmjs.org/@reach/auto-id/-/auto-id-0.17.0.tgz", - "integrity": "sha512-ud8iPwF52RVzEmkHq1twuqGuPA+moreumUHdtgvU3sr3/15BNhwp3KyDLrKKSz0LP1r3V4pSdyF9MbYM8BoSjA==", - "dependencies": { - "@reach/utils": "0.17.0", - "tslib": "^2.3.0" - }, - "peerDependencies": { - "react": "^16.8.0 || 17.x", - "react-dom": "^16.8.0 || 17.x" - } - }, - "node_modules/@reach/descendants": { - "version": "0.17.0", - "resolved": "https://registry.npmjs.org/@reach/descendants/-/descendants-0.17.0.tgz", - "integrity": "sha512-c7lUaBfjgcmKFZiAWqhG+VnXDMEhPkI4kAav/82XKZD6NVvFjsQOTH+v3tUkskrAPV44Yuch0mFW/u5Ntifr7Q==", - "dependencies": { - "@reach/utils": "0.17.0", - "tslib": "^2.3.0" - }, - "peerDependencies": { - "react": "^16.8.0 || 17.x", - "react-dom": "^16.8.0 || 17.x" - } - }, - "node_modules/@reach/dropdown": { - "version": "0.17.0", - "resolved": "https://registry.npmjs.org/@reach/dropdown/-/dropdown-0.17.0.tgz", - "integrity": "sha512-qBTIGInhxtPHtdj4Pl2XZgZMz3e37liydh0xR3qc48syu7g71sL4nqyKjOzThykyfhA3Pb3/wFgsFJKGTSdaig==", - "dependencies": { - "@reach/auto-id": "0.17.0", - "@reach/descendants": "0.17.0", - "@reach/popover": "0.17.0", - "@reach/utils": "0.17.0", - "tslib": "^2.3.0" - }, - "peerDependencies": { - "react": "^16.8.0 || 17.x", - "react-dom": "^16.8.0 || 17.x" - } - }, "node_modules/@reach/listbox": { "version": "0.17.0", "resolved": "https://registry.npmjs.org/@reach/listbox/-/listbox-0.17.0.tgz", @@ -2606,7 +2609,33 @@ "react-dom": "^16.8.0 || 17.x" } }, - "node_modules/@reach/machine": { + "node_modules/@reach/listbox/node_modules/@reach/auto-id": { + "version": "0.17.0", + "resolved": "https://registry.npmjs.org/@reach/auto-id/-/auto-id-0.17.0.tgz", + "integrity": "sha512-ud8iPwF52RVzEmkHq1twuqGuPA+moreumUHdtgvU3sr3/15BNhwp3KyDLrKKSz0LP1r3V4pSdyF9MbYM8BoSjA==", + "dependencies": { + "@reach/utils": "0.17.0", + "tslib": "^2.3.0" + }, + "peerDependencies": { + "react": "^16.8.0 || 17.x", + "react-dom": "^16.8.0 || 17.x" + } + }, + "node_modules/@reach/listbox/node_modules/@reach/descendants": { + "version": "0.17.0", + "resolved": "https://registry.npmjs.org/@reach/descendants/-/descendants-0.17.0.tgz", + "integrity": "sha512-c7lUaBfjgcmKFZiAWqhG+VnXDMEhPkI4kAav/82XKZD6NVvFjsQOTH+v3tUkskrAPV44Yuch0mFW/u5Ntifr7Q==", + "dependencies": { + "@reach/utils": "0.17.0", + "tslib": "^2.3.0" + }, + "peerDependencies": { + "react": "^16.8.0 || 17.x", + "react-dom": "^16.8.0 || 17.x" + } + }, + "node_modules/@reach/listbox/node_modules/@reach/machine": { "version": "0.17.0", "resolved": "https://registry.npmjs.org/@reach/machine/-/machine-0.17.0.tgz", "integrity": "sha512-9EHnuPgXzkbRENvRUzJvVvYt+C2jp7PGN0xon7ffmKoK8rTO6eA/bb7P0xgloyDDQtu88TBUXKzW0uASqhTXGA==", @@ -2620,6 +2649,65 @@ "react-dom": "^16.8.0 || 17.x" } }, + "node_modules/@reach/listbox/node_modules/@reach/popover": { + "version": "0.17.0", + "resolved": "https://registry.npmjs.org/@reach/popover/-/popover-0.17.0.tgz", + "integrity": "sha512-yYbBF4fMz4Ml4LB3agobZjcZ/oPtPsNv70ZAd7lEC2h7cvhF453pA+zOBGYTPGupKaeBvgAnrMjj7RnxDU5hoQ==", + "dependencies": { + "@reach/portal": "0.17.0", + "@reach/rect": "0.17.0", + "@reach/utils": "0.17.0", + "tabbable": "^4.0.0", + "tslib": "^2.3.0" + }, + "peerDependencies": { + "react": "^16.8.0 || 17.x", + "react-dom": "^16.8.0 || 17.x" + } + }, + "node_modules/@reach/listbox/node_modules/@reach/popover/node_modules/@reach/portal": { + "version": "0.17.0", + "resolved": "https://registry.npmjs.org/@reach/portal/-/portal-0.17.0.tgz", + "integrity": "sha512-+IxsgVycOj+WOeNPL2NdgooUdHPSY285wCtj/iWID6akyr4FgGUK7sMhRM9aGFyrGpx2vzr+eggbUmAVZwOz+A==", + "dependencies": { + "@reach/utils": "0.17.0", + "tiny-warning": "^1.0.3", + "tslib": "^2.3.0" + }, + "peerDependencies": { + "react": "^16.8.0 || 17.x", + "react-dom": "^16.8.0 || 17.x" + } + }, + "node_modules/@reach/listbox/node_modules/@reach/popover/node_modules/@reach/rect": { + "version": "0.17.0", + "resolved": "https://registry.npmjs.org/@reach/rect/-/rect-0.17.0.tgz", + "integrity": "sha512-3YB7KA5cLjbLc20bmPkJ06DIfXSK06Cb5BbD2dHgKXjUkT9WjZaLYIbYCO8dVjwcyO3GCNfOmPxy62VsPmZwYA==", + "dependencies": { + "@reach/observe-rect": "1.2.0", + "@reach/utils": "0.17.0", + "prop-types": "^15.7.2", + "tiny-warning": "^1.0.3", + "tslib": "^2.3.0" + }, + "peerDependencies": { + "react": "^16.8.0 || 17.x", + "react-dom": "^16.8.0 || 17.x" + } + }, + "node_modules/@reach/listbox/node_modules/@reach/utils": { + "version": "0.17.0", + "resolved": "https://registry.npmjs.org/@reach/utils/-/utils-0.17.0.tgz", + "integrity": "sha512-M5y8fCBbrWeIsxedgcSw6oDlAMQDkl5uv3VnMVJ7guwpf4E48Xlh1v66z/1BgN/WYe2y8mB/ilFD2nysEfdGeA==", + "dependencies": { + "tiny-warning": "^1.0.3", + "tslib": "^2.3.0" + }, + "peerDependencies": { + "react": "^16.8.0 || 17.x", + "react-dom": "^16.8.0 || 17.x" + } + }, "node_modules/@reach/menu-button": { "version": "0.17.0", "resolved": "https://registry.npmjs.org/@reach/menu-button/-/menu-button-0.17.0.tgz", @@ -2638,12 +2726,49 @@ "react-is": "^16.8.0 || 17.x" } }, - "node_modules/@reach/observe-rect": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/@reach/observe-rect/-/observe-rect-1.2.0.tgz", - "integrity": "sha512-Ba7HmkFgfQxZqqaeIWWkNK0rEhpxVQHIoVyW1YDSkGsGIXzcaW4deC8B0pZrNSSyLTdIk7y+5olKt5+g0GmFIQ==" + "node_modules/@reach/menu-button/node_modules/@reach/dropdown": { + "version": "0.17.0", + "resolved": "https://registry.npmjs.org/@reach/dropdown/-/dropdown-0.17.0.tgz", + "integrity": "sha512-qBTIGInhxtPHtdj4Pl2XZgZMz3e37liydh0xR3qc48syu7g71sL4nqyKjOzThykyfhA3Pb3/wFgsFJKGTSdaig==", + "dependencies": { + "@reach/auto-id": "0.17.0", + "@reach/descendants": "0.17.0", + "@reach/popover": "0.17.0", + "@reach/utils": "0.17.0", + "tslib": "^2.3.0" + }, + "peerDependencies": { + "react": "^16.8.0 || 17.x", + "react-dom": "^16.8.0 || 17.x" + } }, - "node_modules/@reach/popover": { + "node_modules/@reach/menu-button/node_modules/@reach/dropdown/node_modules/@reach/auto-id": { + "version": "0.17.0", + "resolved": "https://registry.npmjs.org/@reach/auto-id/-/auto-id-0.17.0.tgz", + "integrity": "sha512-ud8iPwF52RVzEmkHq1twuqGuPA+moreumUHdtgvU3sr3/15BNhwp3KyDLrKKSz0LP1r3V4pSdyF9MbYM8BoSjA==", + "dependencies": { + "@reach/utils": "0.17.0", + "tslib": "^2.3.0" + }, + "peerDependencies": { + "react": "^16.8.0 || 17.x", + "react-dom": "^16.8.0 || 17.x" + } + }, + "node_modules/@reach/menu-button/node_modules/@reach/dropdown/node_modules/@reach/descendants": { + "version": "0.17.0", + "resolved": "https://registry.npmjs.org/@reach/descendants/-/descendants-0.17.0.tgz", + "integrity": "sha512-c7lUaBfjgcmKFZiAWqhG+VnXDMEhPkI4kAav/82XKZD6NVvFjsQOTH+v3tUkskrAPV44Yuch0mFW/u5Ntifr7Q==", + "dependencies": { + "@reach/utils": "0.17.0", + "tslib": "^2.3.0" + }, + "peerDependencies": { + "react": "^16.8.0 || 17.x", + "react-dom": "^16.8.0 || 17.x" + } + }, + "node_modules/@reach/menu-button/node_modules/@reach/popover": { "version": "0.17.0", "resolved": "https://registry.npmjs.org/@reach/popover/-/popover-0.17.0.tgz", "integrity": "sha512-yYbBF4fMz4Ml4LB3agobZjcZ/oPtPsNv70ZAd7lEC2h7cvhF453pA+zOBGYTPGupKaeBvgAnrMjj7RnxDU5hoQ==", @@ -2659,7 +2784,7 @@ "react-dom": "^16.8.0 || 17.x" } }, - "node_modules/@reach/portal": { + "node_modules/@reach/menu-button/node_modules/@reach/popover/node_modules/@reach/portal": { "version": "0.17.0", "resolved": "https://registry.npmjs.org/@reach/portal/-/portal-0.17.0.tgz", "integrity": "sha512-+IxsgVycOj+WOeNPL2NdgooUdHPSY285wCtj/iWID6akyr4FgGUK7sMhRM9aGFyrGpx2vzr+eggbUmAVZwOz+A==", @@ -2673,7 +2798,7 @@ "react-dom": "^16.8.0 || 17.x" } }, - "node_modules/@reach/rect": { + "node_modules/@reach/menu-button/node_modules/@reach/popover/node_modules/@reach/rect": { "version": "0.17.0", "resolved": "https://registry.npmjs.org/@reach/rect/-/rect-0.17.0.tgz", "integrity": "sha512-3YB7KA5cLjbLc20bmPkJ06DIfXSK06Cb5BbD2dHgKXjUkT9WjZaLYIbYCO8dVjwcyO3GCNfOmPxy62VsPmZwYA==", @@ -2689,7 +2814,7 @@ "react-dom": "^16.8.0 || 17.x" } }, - "node_modules/@reach/utils": { + "node_modules/@reach/menu-button/node_modules/@reach/utils": { "version": "0.17.0", "resolved": "https://registry.npmjs.org/@reach/utils/-/utils-0.17.0.tgz", "integrity": "sha512-M5y8fCBbrWeIsxedgcSw6oDlAMQDkl5uv3VnMVJ7guwpf4E48Xlh1v66z/1BgN/WYe2y8mB/ilFD2nysEfdGeA==", @@ -2702,6 +2827,11 @@ "react-dom": "^16.8.0 || 17.x" } }, + "node_modules/@reach/observe-rect": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@reach/observe-rect/-/observe-rect-1.2.0.tgz", + "integrity": "sha512-Ba7HmkFgfQxZqqaeIWWkNK0rEhpxVQHIoVyW1YDSkGsGIXzcaW4deC8B0pZrNSSyLTdIk7y+5olKt5+g0GmFIQ==" + }, "node_modules/@rushstack/eslint-patch": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/@rushstack/eslint-patch/-/eslint-patch-1.1.3.tgz", @@ -2709,9 +2839,9 @@ "dev": true }, "node_modules/@swc/helpers": { - "version": "0.4.2", - "resolved": "https://registry.npmjs.org/@swc/helpers/-/helpers-0.4.2.tgz", - "integrity": "sha512-556Az0VX7WR6UdoTn4htt/l3zPQ7bsQWK+HqdG4swV7beUCxo/BqmvbOpUkTIm/9ih86LIf1qsUnywNL3obGHw==", + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/@swc/helpers/-/helpers-0.4.3.tgz", + "integrity": "sha512-6JrF+fdUK2zbGpJIlN7G3v966PQjyx/dPt1T9km2wj+EUBqgrxCk3uX4Kct16MIm9gGxfKRcfax2hVf5jvlTzA==", "dependencies": { "tslib": "^2.4.0" } @@ -5216,10 +5346,11 @@ } }, "node_modules/framer-motion": { - "version": "6.3.11", - "resolved": "https://registry.npmjs.org/framer-motion/-/framer-motion-6.3.11.tgz", - "integrity": "sha512-xQLk+ZSklNs5QNCUmdWPpKMOuWiB8ZETsvcIOWw8xvri9K3TamuifgCI/B6XpaEDR0/V2ZQF2Wm+gUAZrXo+rw==", + "version": "6.5.1", + "resolved": "https://registry.npmjs.org/framer-motion/-/framer-motion-6.5.1.tgz", + "integrity": "sha512-o1BGqqposwi7cgDrtg0dNONhkmPsUFDaLcKXigzuTFC5x58mE8iyTazxSudFzmT6MEyJKfjjU8ItoMe3W+3fiw==", "dependencies": { + "@motionone/dom": "10.12.0", "framesync": "6.0.1", "hey-listen": "^1.0.8", "popmotion": "11.0.3", @@ -6853,16 +6984,16 @@ "dev": true }, "node_modules/next": { - "version": "12.2.0", - "resolved": "https://registry.npmjs.org/next/-/next-12.2.0.tgz", - "integrity": "sha512-B4j7D3SHYopLYx6/Ark0fenwIar9tEaZZFAaxmKjgcMMexhVJzB3jt7X+6wcdXPPMeUD6r09weUtnDpjox/vIA==", + "version": "12.2.5", + "resolved": "https://registry.npmjs.org/next/-/next-12.2.5.tgz", + "integrity": "sha512-tBdjqX5XC/oFs/6gxrZhjmiq90YWizUYU6qOWAfat7zJwrwapJ+BYgX2PmiacunXMaRpeVT4vz5MSPSLgNkrpA==", "dependencies": { - "@next/env": "12.2.0", - "@swc/helpers": "0.4.2", + "@next/env": "12.2.5", + "@swc/helpers": "0.4.3", "caniuse-lite": "^1.0.30001332", - "postcss": "8.4.5", - "styled-jsx": "5.0.2", - "use-sync-external-store": "1.1.0" + "postcss": "8.4.14", + "styled-jsx": "5.0.4", + "use-sync-external-store": "1.2.0" }, "bin": { "next": "dist/bin/next" @@ -6871,19 +7002,19 @@ "node": ">=12.22.0" }, "optionalDependencies": { - "@next/swc-android-arm-eabi": "12.2.0", - "@next/swc-android-arm64": "12.2.0", - "@next/swc-darwin-arm64": "12.2.0", - "@next/swc-darwin-x64": "12.2.0", - "@next/swc-freebsd-x64": "12.2.0", - "@next/swc-linux-arm-gnueabihf": "12.2.0", - "@next/swc-linux-arm64-gnu": "12.2.0", - "@next/swc-linux-arm64-musl": "12.2.0", - "@next/swc-linux-x64-gnu": "12.2.0", - "@next/swc-linux-x64-musl": "12.2.0", - "@next/swc-win32-arm64-msvc": "12.2.0", - "@next/swc-win32-ia32-msvc": "12.2.0", - "@next/swc-win32-x64-msvc": "12.2.0" + "@next/swc-android-arm-eabi": "12.2.5", + "@next/swc-android-arm64": "12.2.5", + "@next/swc-darwin-arm64": "12.2.5", + "@next/swc-darwin-x64": "12.2.5", + "@next/swc-freebsd-x64": "12.2.5", + "@next/swc-linux-arm-gnueabihf": "12.2.5", + "@next/swc-linux-arm64-gnu": "12.2.5", + "@next/swc-linux-arm64-musl": "12.2.5", + "@next/swc-linux-x64-gnu": "12.2.5", + "@next/swc-linux-x64-musl": "12.2.5", + "@next/swc-win32-arm64-msvc": "12.2.5", + "@next/swc-win32-ia32-msvc": "12.2.5", + "@next/swc-win32-x64-msvc": "12.2.5" }, "peerDependencies": { "fibers": ">= 3.1.0", @@ -7409,20 +7540,26 @@ } }, "node_modules/postcss": { - "version": "8.4.5", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.5.tgz", - "integrity": "sha512-jBDboWM8qpaqwkMwItqTQTiFikhs/67OYVvblFFTM7MrZjt6yMKd6r2kgXizEbTTljacm4NldIlZnhbjr84QYg==", + "version": "8.4.14", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.14.tgz", + "integrity": "sha512-E398TUmfAYFPBSdzgeieK2Y1+1cpdxJx8yXbK/m57nRhKSmk1GB2tO4lbLBtlkfPQTDKfe4Xqv1ASWPpayPEig==", + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/postcss" + } + ], "dependencies": { - "nanoid": "^3.1.30", + "nanoid": "^3.3.4", "picocolors": "^1.0.0", - "source-map-js": "^1.0.1" + "source-map-js": "^1.0.2" }, "engines": { "node": "^10 || ^12 || >=14" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/postcss/" } }, "node_modules/postcss-value-parser": { @@ -8295,9 +8432,9 @@ } }, "node_modules/styled-jsx": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/styled-jsx/-/styled-jsx-5.0.2.tgz", - "integrity": "sha512-LqPQrbBh3egD57NBcHET4qcgshPks+yblyhPlH2GY8oaDgKs8SK4C3dBh3oSJjgzJ3G5t1SYEZGHkP+QEpX9EQ==", + "version": "5.0.4", + "resolved": "https://registry.npmjs.org/styled-jsx/-/styled-jsx-5.0.4.tgz", + "integrity": "sha512-sDFWLbg4zR+UkNzfk5lPilyIgtpddfxXEULxhujorr5jtePTUqiPDc5BC0v1NRqTr/WaFBGQQUoYToGlF4B2KQ==", "engines": { "node": ">= 12.0.0" }, @@ -8849,9 +8986,9 @@ } }, "node_modules/use-sync-external-store": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/use-sync-external-store/-/use-sync-external-store-1.1.0.tgz", - "integrity": "sha512-SEnieB2FPKEVne66NpXPd1Np4R1lTNKfjuy3XdIoPQKYBAFdzbzSZlSn1KJZUiihQLQC5Znot4SBz1EOTBwQAQ==", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/use-sync-external-store/-/use-sync-external-store-1.2.0.tgz", + "integrity": "sha512-eEgnFxGQ1Ife9bzYs6VLi8/4X6CObHMw9Qr9tPY43iKwsPw8xE8+EFsf/2cFZ5S3esXgpWgtSCtLNS41F+sKPA==", "peerDependencies": { "react": "^16.8.0 || ^17.0.0 || ^18.0.0" } @@ -10103,14 +10240,6 @@ "@fortawesome/fontawesome-common-types": "6.1.1" } }, - "@fortawesome/react-fontawesome": { - "version": "0.1.18", - "resolved": "https://npm.fontawesome.com/@fortawesome/react-fontawesome/-/0.1.18/react-fontawesome-0.1.18.tgz", - "integrity": "sha512-RwLIB4TZw0M9gvy5u+TusAA0afbwM4JQIimNH/j3ygd6aIvYPQLqXMhC9ErY26J23rDPyDZldIfPq/HpTTJ/tQ==", - "requires": { - "prop-types": "^15.8.1" - } - }, "@graphql-codegen/cli": { "version": "2.9.1", "resolved": "https://registry.npmjs.org/@graphql-codegen/cli/-/cli-2.9.1.tgz", @@ -10924,6 +11053,64 @@ "unist-util-visit": "^1.4.1" } }, + "@motionone/animation": { + "version": "10.14.0", + "resolved": "https://registry.npmjs.org/@motionone/animation/-/animation-10.14.0.tgz", + "integrity": "sha512-h+1sdyBP8vbxEBW5gPFDnj+m2DCqdlAuf2g6Iafb1lcMnqjsRXWlPw1AXgvUMXmreyhqmPbJqoNfIKdytampRQ==", + "requires": { + "@motionone/easing": "^10.14.0", + "@motionone/types": "^10.14.0", + "@motionone/utils": "^10.14.0", + "tslib": "^2.3.1" + } + }, + "@motionone/dom": { + "version": "10.12.0", + "resolved": "https://registry.npmjs.org/@motionone/dom/-/dom-10.12.0.tgz", + "integrity": "sha512-UdPTtLMAktHiqV0atOczNYyDd/d8Cf5fFsd1tua03PqTwwCe/6lwhLSQ8a7TbnQ5SN0gm44N1slBfj+ORIhrqw==", + "requires": { + "@motionone/animation": "^10.12.0", + "@motionone/generators": "^10.12.0", + "@motionone/types": "^10.12.0", + "@motionone/utils": "^10.12.0", + "hey-listen": "^1.0.8", + "tslib": "^2.3.1" + } + }, + "@motionone/easing": { + "version": "10.14.0", + "resolved": "https://registry.npmjs.org/@motionone/easing/-/easing-10.14.0.tgz", + "integrity": "sha512-2vUBdH9uWTlRbuErhcsMmt1jvMTTqvGmn9fHq8FleFDXBlHFs5jZzHJT9iw+4kR1h6a4SZQuCf72b9ji92qNYA==", + "requires": { + "@motionone/utils": "^10.14.0", + "tslib": "^2.3.1" + } + }, + "@motionone/generators": { + "version": "10.14.0", + "resolved": "https://registry.npmjs.org/@motionone/generators/-/generators-10.14.0.tgz", + "integrity": "sha512-6kRHezoFfIjFN7pPpaxmkdZXD36tQNcyJe3nwVqwJ+ZfC0e3rFmszR8kp9DEVFs9QL/akWjuGPSLBI1tvz+Vjg==", + "requires": { + "@motionone/types": "^10.14.0", + "@motionone/utils": "^10.14.0", + "tslib": "^2.3.1" + } + }, + "@motionone/types": { + "version": "10.14.0", + "resolved": "https://registry.npmjs.org/@motionone/types/-/types-10.14.0.tgz", + "integrity": "sha512-3bNWyYBHtVd27KncnJLhksMFQ5o2MSdk1cA/IZqsHtA9DnRM1SYgN01CTcJ8Iw8pCXF5Ocp34tyAjY7WRpOJJQ==" + }, + "@motionone/utils": { + "version": "10.14.0", + "resolved": "https://registry.npmjs.org/@motionone/utils/-/utils-10.14.0.tgz", + "integrity": "sha512-sLWBLPzRqkxmOTRzSaD3LFQXCPHvDzyHJ1a3VP9PRzBxyVd2pv51/gMOsdAcxQ9n+MIeGJnxzXBYplUHKj4jkw==", + "requires": { + "@motionone/types": "^10.14.0", + "hey-listen": "^1.0.8", + "tslib": "^2.3.1" + } + }, "@n1ru4l/graphql-live-query": { "version": "0.9.0", "resolved": "https://registry.npmjs.org/@n1ru4l/graphql-live-query/-/graphql-live-query-0.9.0.tgz", @@ -10940,9 +11127,9 @@ } }, "@next/env": { - "version": "12.2.0", - "resolved": "https://registry.npmjs.org/@next/env/-/env-12.2.0.tgz", - "integrity": "sha512-/FCkDpL/8SodJEXvx/DYNlOD5ijTtkozf4PPulYPtkPOJaMPpBSOkzmsta4fnrnbdH6eZjbwbiXFdr6gSQCV4w==" + "version": "12.2.5", + "resolved": "https://registry.npmjs.org/@next/env/-/env-12.2.5.tgz", + "integrity": "sha512-vLPLV3cpPGjUPT3PjgRj7e3nio9t6USkuew3JE/jMeon/9Mvp1WyR18v3iwnCuX7eUAm1HmAbJHHLAbcu/EJcw==" }, "@next/eslint-plugin-next": { "version": "12.1.6", @@ -10979,81 +11166,81 @@ } }, "@next/swc-android-arm-eabi": { - "version": "12.2.0", - "resolved": "https://registry.npmjs.org/@next/swc-android-arm-eabi/-/swc-android-arm-eabi-12.2.0.tgz", - "integrity": "sha512-hbneH8DNRB2x0Nf5fPCYoL8a0osvdTCe4pvOc9Rv5CpDsoOlf8BWBs2OWpeP0U2BktGvIsuUhmISmdYYGyrvTw==", + "version": "12.2.5", + "resolved": "https://registry.npmjs.org/@next/swc-android-arm-eabi/-/swc-android-arm-eabi-12.2.5.tgz", + "integrity": "sha512-cPWClKxGhgn2dLWnspW+7psl3MoLQUcNqJqOHk2BhNcou9ARDtC0IjQkKe5qcn9qg7I7U83Gp1yh2aesZfZJMA==", "optional": true }, "@next/swc-android-arm64": { - "version": "12.2.0", - "resolved": "https://registry.npmjs.org/@next/swc-android-arm64/-/swc-android-arm64-12.2.0.tgz", - "integrity": "sha512-1eEk91JHjczcJomxJ8X0XaUeNcp5Lx1U2Ic7j15ouJ83oRX+3GIslOuabW2oPkSgXbHkThMClhirKpvG98kwZg==", + "version": "12.2.5", + "resolved": "https://registry.npmjs.org/@next/swc-android-arm64/-/swc-android-arm64-12.2.5.tgz", + "integrity": "sha512-vMj0efliXmC5b7p+wfcQCX0AfU8IypjkzT64GiKJD9PgiA3IILNiGJr1fw2lyUDHkjeWx/5HMlMEpLnTsQslwg==", "optional": true }, "@next/swc-darwin-arm64": { - "version": "12.2.0", - "resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-12.2.0.tgz", - "integrity": "sha512-x5U5gJd7ZvrEtTFnBld9O2bUlX8opu7mIQUqRzj7KeWzBwPhrIzTTsQXAiNqsaMuaRPvyHBVW/5d/6g6+89Y8g==", + "version": "12.2.5", + "resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-12.2.5.tgz", + "integrity": "sha512-VOPWbO5EFr6snla/WcxUKtvzGVShfs302TEMOtzYyWni6f9zuOetijJvVh9CCTzInnXAZMtHyNhefijA4HMYLg==", "optional": true }, "@next/swc-darwin-x64": { - "version": "12.2.0", - "resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-12.2.0.tgz", - "integrity": "sha512-iwMNFsrAPjfedjKDv9AXPAV16PWIomP3qw/FfPaxkDVRbUls7BNdofBLzkQmqxqWh93WrawLwaqyXpJuAaiwJA==", + "version": "12.2.5", + "resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-12.2.5.tgz", + "integrity": "sha512-5o8bTCgAmtYOgauO/Xd27vW52G2/m3i5PX7MUYePquxXAnX73AAtqA3WgPXBRitEB60plSKZgOTkcpqrsh546A==", "optional": true }, "@next/swc-freebsd-x64": { - "version": "12.2.0", - "resolved": "https://registry.npmjs.org/@next/swc-freebsd-x64/-/swc-freebsd-x64-12.2.0.tgz", - "integrity": "sha512-gRiAw8g3Akf6niTDLEm1Emfa7jXDjvaAj/crDO8hKASKA4Y1fS4kbi/tyWw5VtoFI4mUzRmCPmZ8eL0tBSG58A==", + "version": "12.2.5", + "resolved": "https://registry.npmjs.org/@next/swc-freebsd-x64/-/swc-freebsd-x64-12.2.5.tgz", + "integrity": "sha512-yYUbyup1JnznMtEBRkK4LT56N0lfK5qNTzr6/DEyDw5TbFVwnuy2hhLBzwCBkScFVjpFdfiC6SQAX3FrAZzuuw==", "optional": true }, "@next/swc-linux-arm-gnueabihf": { - "version": "12.2.0", - "resolved": "https://registry.npmjs.org/@next/swc-linux-arm-gnueabihf/-/swc-linux-arm-gnueabihf-12.2.0.tgz", - "integrity": "sha512-/TJZkxaIpeEwnXh6A40trgwd40C5+LJroLUOEQwMOJdavLl62PjCA6dGl1pgooWLCIb5YdBQ0EG4ylzvLwS2+Q==", + "version": "12.2.5", + "resolved": "https://registry.npmjs.org/@next/swc-linux-arm-gnueabihf/-/swc-linux-arm-gnueabihf-12.2.5.tgz", + "integrity": "sha512-2ZE2/G921Acks7UopJZVMgKLdm4vN4U0yuzvAMJ6KBavPzqESA2yHJlm85TV/K9gIjKhSk5BVtauIUntFRP8cg==", "optional": true }, "@next/swc-linux-arm64-gnu": { - "version": "12.2.0", - "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-12.2.0.tgz", - "integrity": "sha512-++WAB4ElXCSOKG9H8r4ENF8EaV+w0QkrpjehmryFkQXmt5juVXz+nKDVlCRMwJU7A1O0Mie82XyEoOrf6Np1pA==", + "version": "12.2.5", + "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-12.2.5.tgz", + "integrity": "sha512-/I6+PWVlz2wkTdWqhlSYYJ1pWWgUVva6SgX353oqTh8njNQp1SdFQuWDqk8LnM6ulheVfSsgkDzxrDaAQZnzjQ==", "optional": true }, "@next/swc-linux-arm64-musl": { - "version": "12.2.0", - "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-12.2.0.tgz", - "integrity": "sha512-XrqkHi/VglEn5zs2CYK6ofJGQySrd+Lr4YdmfJ7IhsCnMKkQY1ma9Hv5THwhZVof3e+6oFHrQ9bWrw9K4WTjFA==", + "version": "12.2.5", + "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-12.2.5.tgz", + "integrity": "sha512-LPQRelfX6asXyVr59p5sTpx5l+0yh2Vjp/R8Wi4X9pnqcayqT4CUJLiHqCvZuLin3IsFdisJL0rKHMoaZLRfmg==", "optional": true }, "@next/swc-linux-x64-gnu": { - "version": "12.2.0", - "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-12.2.0.tgz", - "integrity": "sha512-MyhHbAKVjpn065WzRbqpLu2krj4kHLi6RITQdD1ee+uxq9r2yg5Qe02l24NxKW+1/lkmpusl4Y5Lks7rBiJn4w==", + "version": "12.2.5", + "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-12.2.5.tgz", + "integrity": "sha512-0szyAo8jMCClkjNK0hknjhmAngUppoRekW6OAezbEYwHXN/VNtsXbfzgYOqjKWxEx3OoAzrT3jLwAF0HdX2MEw==", "optional": true }, "@next/swc-linux-x64-musl": { - "version": "12.2.0", - "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-12.2.0.tgz", - "integrity": "sha512-Tz1tJZ5egE0S/UqCd5V6ZPJsdSzv/8aa7FkwFmIJ9neLS8/00za+OY5pq470iZQbPrkTwpKzmfTTIPRVD5iqDg==", + "version": "12.2.5", + "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-12.2.5.tgz", + "integrity": "sha512-zg/Y6oBar1yVnW6Il1I/08/2ukWtOG6s3acdJdEyIdsCzyQi4RLxbbhkD/EGQyhqBvd3QrC6ZXQEXighQUAZ0g==", "optional": true }, "@next/swc-win32-arm64-msvc": { - "version": "12.2.0", - "resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-12.2.0.tgz", - "integrity": "sha512-0iRO/CPMCdCYUzuH6wXLnsfJX1ykBX4emOOvH0qIgtiZM0nVYbF8lkEyY2ph4XcsurpinS+ziWuYCXVqrOSqiw==", + "version": "12.2.5", + "resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-12.2.5.tgz", + "integrity": "sha512-3/90DRNSqeeSRMMEhj4gHHQlLhhKg5SCCoYfE3kBjGpE63EfnblYUqsszGGZ9ekpKL/R4/SGB40iCQr8tR5Jiw==", "optional": true }, "@next/swc-win32-ia32-msvc": { - "version": "12.2.0", - "resolved": "https://registry.npmjs.org/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-12.2.0.tgz", - "integrity": "sha512-8A26RJVcJHwIKm8xo/qk2ePRquJ6WCI2keV2qOW/Qm+ZXrPXHMIWPYABae/nKN243YFBNyPiHytjX37VrcpUhg==", + "version": "12.2.5", + "resolved": "https://registry.npmjs.org/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-12.2.5.tgz", + "integrity": "sha512-hGLc0ZRAwnaPL4ulwpp4D2RxmkHQLuI8CFOEEHdzZpS63/hMVzv81g8jzYA0UXbb9pus/iTc3VRbVbAM03SRrw==", "optional": true }, "@next/swc-win32-x64-msvc": { - "version": "12.2.0", - "resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-12.2.0.tgz", - "integrity": "sha512-OI14ozFLThEV3ey6jE47zrzSTV/6eIMsvbwozo+XfdWqOPwQ7X00YkRx4GVMKMC0rM44oGS2gmwMKYpe4EblnA==", + "version": "12.2.5", + "resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-12.2.5.tgz", + "integrity": "sha512-7h5/ahY7NeaO2xygqVrSG/Y8Vs4cdjxIjowTZ5W6CKoTKn7tmnuxlUc2h74x06FKmbhAd9agOjr/AOKyxYYm9Q==", "optional": true }, "@nodelib/fs.scandir": { @@ -11087,36 +11274,6 @@ "resolved": "https://registry.npmjs.org/@polka/url/-/url-1.0.0-next.21.tgz", "integrity": "sha512-a5Sab1C4/icpTZVzZc5Ghpz88yQtGOyNqYXcZgOssB2uuAr+wF/MvN6bgtW32q7HHrvBki+BsZ0OuNv6EV3K9g==" }, - "@reach/auto-id": { - "version": "0.17.0", - "resolved": "https://registry.npmjs.org/@reach/auto-id/-/auto-id-0.17.0.tgz", - "integrity": "sha512-ud8iPwF52RVzEmkHq1twuqGuPA+moreumUHdtgvU3sr3/15BNhwp3KyDLrKKSz0LP1r3V4pSdyF9MbYM8BoSjA==", - "requires": { - "@reach/utils": "0.17.0", - "tslib": "^2.3.0" - } - }, - "@reach/descendants": { - "version": "0.17.0", - "resolved": "https://registry.npmjs.org/@reach/descendants/-/descendants-0.17.0.tgz", - "integrity": "sha512-c7lUaBfjgcmKFZiAWqhG+VnXDMEhPkI4kAav/82XKZD6NVvFjsQOTH+v3tUkskrAPV44Yuch0mFW/u5Ntifr7Q==", - "requires": { - "@reach/utils": "0.17.0", - "tslib": "^2.3.0" - } - }, - "@reach/dropdown": { - "version": "0.17.0", - "resolved": "https://registry.npmjs.org/@reach/dropdown/-/dropdown-0.17.0.tgz", - "integrity": "sha512-qBTIGInhxtPHtdj4Pl2XZgZMz3e37liydh0xR3qc48syu7g71sL4nqyKjOzThykyfhA3Pb3/wFgsFJKGTSdaig==", - "requires": { - "@reach/auto-id": "0.17.0", - "@reach/descendants": "0.17.0", - "@reach/popover": "0.17.0", - "@reach/utils": "0.17.0", - "tslib": "^2.3.0" - } - }, "@reach/listbox": { "version": "0.17.0", "resolved": "https://registry.npmjs.org/@reach/listbox/-/listbox-0.17.0.tgz", @@ -11128,16 +11285,81 @@ "@reach/popover": "0.17.0", "@reach/utils": "0.17.0", "prop-types": "^15.7.2" - } - }, - "@reach/machine": { - "version": "0.17.0", - "resolved": "https://registry.npmjs.org/@reach/machine/-/machine-0.17.0.tgz", - "integrity": "sha512-9EHnuPgXzkbRENvRUzJvVvYt+C2jp7PGN0xon7ffmKoK8rTO6eA/bb7P0xgloyDDQtu88TBUXKzW0uASqhTXGA==", - "requires": { - "@reach/utils": "0.17.0", - "@xstate/fsm": "1.4.0", - "tslib": "^2.3.0" + }, + "dependencies": { + "@reach/auto-id": { + "version": "0.17.0", + "resolved": "https://registry.npmjs.org/@reach/auto-id/-/auto-id-0.17.0.tgz", + "integrity": "sha512-ud8iPwF52RVzEmkHq1twuqGuPA+moreumUHdtgvU3sr3/15BNhwp3KyDLrKKSz0LP1r3V4pSdyF9MbYM8BoSjA==", + "requires": { + "@reach/utils": "0.17.0", + "tslib": "^2.3.0" + } + }, + "@reach/descendants": { + "version": "0.17.0", + "resolved": "https://registry.npmjs.org/@reach/descendants/-/descendants-0.17.0.tgz", + "integrity": "sha512-c7lUaBfjgcmKFZiAWqhG+VnXDMEhPkI4kAav/82XKZD6NVvFjsQOTH+v3tUkskrAPV44Yuch0mFW/u5Ntifr7Q==", + "requires": { + "@reach/utils": "0.17.0", + "tslib": "^2.3.0" + } + }, + "@reach/machine": { + "version": "0.17.0", + "resolved": "https://registry.npmjs.org/@reach/machine/-/machine-0.17.0.tgz", + "integrity": "sha512-9EHnuPgXzkbRENvRUzJvVvYt+C2jp7PGN0xon7ffmKoK8rTO6eA/bb7P0xgloyDDQtu88TBUXKzW0uASqhTXGA==", + "requires": { + "@reach/utils": "0.17.0", + "@xstate/fsm": "1.4.0", + "tslib": "^2.3.0" + } + }, + "@reach/popover": { + "version": "0.17.0", + "resolved": "https://registry.npmjs.org/@reach/popover/-/popover-0.17.0.tgz", + "integrity": "sha512-yYbBF4fMz4Ml4LB3agobZjcZ/oPtPsNv70ZAd7lEC2h7cvhF453pA+zOBGYTPGupKaeBvgAnrMjj7RnxDU5hoQ==", + "requires": { + "@reach/portal": "0.17.0", + "@reach/rect": "0.17.0", + "@reach/utils": "0.17.0", + "tabbable": "^4.0.0", + "tslib": "^2.3.0" + }, + "dependencies": { + "@reach/portal": { + "version": "0.17.0", + "resolved": "https://registry.npmjs.org/@reach/portal/-/portal-0.17.0.tgz", + "integrity": "sha512-+IxsgVycOj+WOeNPL2NdgooUdHPSY285wCtj/iWID6akyr4FgGUK7sMhRM9aGFyrGpx2vzr+eggbUmAVZwOz+A==", + "requires": { + "@reach/utils": "0.17.0", + "tiny-warning": "^1.0.3", + "tslib": "^2.3.0" + } + }, + "@reach/rect": { + "version": "0.17.0", + "resolved": "https://registry.npmjs.org/@reach/rect/-/rect-0.17.0.tgz", + "integrity": "sha512-3YB7KA5cLjbLc20bmPkJ06DIfXSK06Cb5BbD2dHgKXjUkT9WjZaLYIbYCO8dVjwcyO3GCNfOmPxy62VsPmZwYA==", + "requires": { + "@reach/observe-rect": "1.2.0", + "@reach/utils": "0.17.0", + "prop-types": "^15.7.2", + "tiny-warning": "^1.0.3", + "tslib": "^2.3.0" + } + } + } + }, + "@reach/utils": { + "version": "0.17.0", + "resolved": "https://registry.npmjs.org/@reach/utils/-/utils-0.17.0.tgz", + "integrity": "sha512-M5y8fCBbrWeIsxedgcSw6oDlAMQDkl5uv3VnMVJ7guwpf4E48Xlh1v66z/1BgN/WYe2y8mB/ilFD2nysEfdGeA==", + "requires": { + "tiny-warning": "^1.0.3", + "tslib": "^2.3.0" + } + } } }, "@reach/menu-button": { @@ -11151,6 +11373,85 @@ "prop-types": "^15.7.2", "tiny-warning": "^1.0.3", "tslib": "^2.3.0" + }, + "dependencies": { + "@reach/dropdown": { + "version": "0.17.0", + "resolved": "https://registry.npmjs.org/@reach/dropdown/-/dropdown-0.17.0.tgz", + "integrity": "sha512-qBTIGInhxtPHtdj4Pl2XZgZMz3e37liydh0xR3qc48syu7g71sL4nqyKjOzThykyfhA3Pb3/wFgsFJKGTSdaig==", + "requires": { + "@reach/auto-id": "0.17.0", + "@reach/descendants": "0.17.0", + "@reach/popover": "0.17.0", + "@reach/utils": "0.17.0", + "tslib": "^2.3.0" + }, + "dependencies": { + "@reach/auto-id": { + "version": "0.17.0", + "resolved": "https://registry.npmjs.org/@reach/auto-id/-/auto-id-0.17.0.tgz", + "integrity": "sha512-ud8iPwF52RVzEmkHq1twuqGuPA+moreumUHdtgvU3sr3/15BNhwp3KyDLrKKSz0LP1r3V4pSdyF9MbYM8BoSjA==", + "requires": { + "@reach/utils": "0.17.0", + "tslib": "^2.3.0" + } + }, + "@reach/descendants": { + "version": "0.17.0", + "resolved": "https://registry.npmjs.org/@reach/descendants/-/descendants-0.17.0.tgz", + "integrity": "sha512-c7lUaBfjgcmKFZiAWqhG+VnXDMEhPkI4kAav/82XKZD6NVvFjsQOTH+v3tUkskrAPV44Yuch0mFW/u5Ntifr7Q==", + "requires": { + "@reach/utils": "0.17.0", + "tslib": "^2.3.0" + } + } + } + }, + "@reach/popover": { + "version": "0.17.0", + "resolved": "https://registry.npmjs.org/@reach/popover/-/popover-0.17.0.tgz", + "integrity": "sha512-yYbBF4fMz4Ml4LB3agobZjcZ/oPtPsNv70ZAd7lEC2h7cvhF453pA+zOBGYTPGupKaeBvgAnrMjj7RnxDU5hoQ==", + "requires": { + "@reach/portal": "0.17.0", + "@reach/rect": "0.17.0", + "@reach/utils": "0.17.0", + "tabbable": "^4.0.0", + "tslib": "^2.3.0" + }, + "dependencies": { + "@reach/portal": { + "version": "0.17.0", + "resolved": "https://registry.npmjs.org/@reach/portal/-/portal-0.17.0.tgz", + "integrity": "sha512-+IxsgVycOj+WOeNPL2NdgooUdHPSY285wCtj/iWID6akyr4FgGUK7sMhRM9aGFyrGpx2vzr+eggbUmAVZwOz+A==", + "requires": { + "@reach/utils": "0.17.0", + "tiny-warning": "^1.0.3", + "tslib": "^2.3.0" + } + }, + "@reach/rect": { + "version": "0.17.0", + "resolved": "https://registry.npmjs.org/@reach/rect/-/rect-0.17.0.tgz", + "integrity": "sha512-3YB7KA5cLjbLc20bmPkJ06DIfXSK06Cb5BbD2dHgKXjUkT9WjZaLYIbYCO8dVjwcyO3GCNfOmPxy62VsPmZwYA==", + "requires": { + "@reach/observe-rect": "1.2.0", + "@reach/utils": "0.17.0", + "prop-types": "^15.7.2", + "tiny-warning": "^1.0.3", + "tslib": "^2.3.0" + } + } + } + }, + "@reach/utils": { + "version": "0.17.0", + "resolved": "https://registry.npmjs.org/@reach/utils/-/utils-0.17.0.tgz", + "integrity": "sha512-M5y8fCBbrWeIsxedgcSw6oDlAMQDkl5uv3VnMVJ7guwpf4E48Xlh1v66z/1BgN/WYe2y8mB/ilFD2nysEfdGeA==", + "requires": { + "tiny-warning": "^1.0.3", + "tslib": "^2.3.0" + } + } } }, "@reach/observe-rect": { @@ -11158,49 +11459,6 @@ "resolved": "https://registry.npmjs.org/@reach/observe-rect/-/observe-rect-1.2.0.tgz", "integrity": "sha512-Ba7HmkFgfQxZqqaeIWWkNK0rEhpxVQHIoVyW1YDSkGsGIXzcaW4deC8B0pZrNSSyLTdIk7y+5olKt5+g0GmFIQ==" }, - "@reach/popover": { - "version": "0.17.0", - "resolved": "https://registry.npmjs.org/@reach/popover/-/popover-0.17.0.tgz", - "integrity": "sha512-yYbBF4fMz4Ml4LB3agobZjcZ/oPtPsNv70ZAd7lEC2h7cvhF453pA+zOBGYTPGupKaeBvgAnrMjj7RnxDU5hoQ==", - "requires": { - "@reach/portal": "0.17.0", - "@reach/rect": "0.17.0", - "@reach/utils": "0.17.0", - "tabbable": "^4.0.0", - "tslib": "^2.3.0" - } - }, - "@reach/portal": { - "version": "0.17.0", - "resolved": "https://registry.npmjs.org/@reach/portal/-/portal-0.17.0.tgz", - "integrity": "sha512-+IxsgVycOj+WOeNPL2NdgooUdHPSY285wCtj/iWID6akyr4FgGUK7sMhRM9aGFyrGpx2vzr+eggbUmAVZwOz+A==", - "requires": { - "@reach/utils": "0.17.0", - "tiny-warning": "^1.0.3", - "tslib": "^2.3.0" - } - }, - "@reach/rect": { - "version": "0.17.0", - "resolved": "https://registry.npmjs.org/@reach/rect/-/rect-0.17.0.tgz", - "integrity": "sha512-3YB7KA5cLjbLc20bmPkJ06DIfXSK06Cb5BbD2dHgKXjUkT9WjZaLYIbYCO8dVjwcyO3GCNfOmPxy62VsPmZwYA==", - "requires": { - "@reach/observe-rect": "1.2.0", - "@reach/utils": "0.17.0", - "prop-types": "^15.7.2", - "tiny-warning": "^1.0.3", - "tslib": "^2.3.0" - } - }, - "@reach/utils": { - "version": "0.17.0", - "resolved": "https://registry.npmjs.org/@reach/utils/-/utils-0.17.0.tgz", - "integrity": "sha512-M5y8fCBbrWeIsxedgcSw6oDlAMQDkl5uv3VnMVJ7guwpf4E48Xlh1v66z/1BgN/WYe2y8mB/ilFD2nysEfdGeA==", - "requires": { - "tiny-warning": "^1.0.3", - "tslib": "^2.3.0" - } - }, "@rushstack/eslint-patch": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/@rushstack/eslint-patch/-/eslint-patch-1.1.3.tgz", @@ -11208,9 +11466,9 @@ "dev": true }, "@swc/helpers": { - "version": "0.4.2", - "resolved": "https://registry.npmjs.org/@swc/helpers/-/helpers-0.4.2.tgz", - "integrity": "sha512-556Az0VX7WR6UdoTn4htt/l3zPQ7bsQWK+HqdG4swV7beUCxo/BqmvbOpUkTIm/9ih86LIf1qsUnywNL3obGHw==", + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/@swc/helpers/-/helpers-0.4.3.tgz", + "integrity": "sha512-6JrF+fdUK2zbGpJIlN7G3v966PQjyx/dPt1T9km2wj+EUBqgrxCk3uX4Kct16MIm9gGxfKRcfax2hVf5jvlTzA==", "requires": { "tslib": "^2.4.0" }, @@ -13139,11 +13397,12 @@ } }, "framer-motion": { - "version": "6.3.11", - "resolved": "https://registry.npmjs.org/framer-motion/-/framer-motion-6.3.11.tgz", - "integrity": "sha512-xQLk+ZSklNs5QNCUmdWPpKMOuWiB8ZETsvcIOWw8xvri9K3TamuifgCI/B6XpaEDR0/V2ZQF2Wm+gUAZrXo+rw==", + "version": "6.5.1", + "resolved": "https://registry.npmjs.org/framer-motion/-/framer-motion-6.5.1.tgz", + "integrity": "sha512-o1BGqqposwi7cgDrtg0dNONhkmPsUFDaLcKXigzuTFC5x58mE8iyTazxSudFzmT6MEyJKfjjU8ItoMe3W+3fiw==", "requires": { "@emotion/is-prop-valid": "^0.8.2", + "@motionone/dom": "10.12.0", "framesync": "6.0.1", "hey-listen": "^1.0.8", "popmotion": "11.0.3", @@ -14341,29 +14600,29 @@ "dev": true }, "next": { - "version": "12.2.0", - "resolved": "https://registry.npmjs.org/next/-/next-12.2.0.tgz", - "integrity": "sha512-B4j7D3SHYopLYx6/Ark0fenwIar9tEaZZFAaxmKjgcMMexhVJzB3jt7X+6wcdXPPMeUD6r09weUtnDpjox/vIA==", + "version": "12.2.5", + "resolved": "https://registry.npmjs.org/next/-/next-12.2.5.tgz", + "integrity": "sha512-tBdjqX5XC/oFs/6gxrZhjmiq90YWizUYU6qOWAfat7zJwrwapJ+BYgX2PmiacunXMaRpeVT4vz5MSPSLgNkrpA==", "requires": { - "@next/env": "12.2.0", - "@next/swc-android-arm-eabi": "12.2.0", - "@next/swc-android-arm64": "12.2.0", - "@next/swc-darwin-arm64": "12.2.0", - "@next/swc-darwin-x64": "12.2.0", - "@next/swc-freebsd-x64": "12.2.0", - "@next/swc-linux-arm-gnueabihf": "12.2.0", - "@next/swc-linux-arm64-gnu": "12.2.0", - "@next/swc-linux-arm64-musl": "12.2.0", - "@next/swc-linux-x64-gnu": "12.2.0", - "@next/swc-linux-x64-musl": "12.2.0", - "@next/swc-win32-arm64-msvc": "12.2.0", - "@next/swc-win32-ia32-msvc": "12.2.0", - "@next/swc-win32-x64-msvc": "12.2.0", - "@swc/helpers": "0.4.2", + "@next/env": "12.2.5", + "@next/swc-android-arm-eabi": "12.2.5", + "@next/swc-android-arm64": "12.2.5", + "@next/swc-darwin-arm64": "12.2.5", + "@next/swc-darwin-x64": "12.2.5", + "@next/swc-freebsd-x64": "12.2.5", + "@next/swc-linux-arm-gnueabihf": "12.2.5", + "@next/swc-linux-arm64-gnu": "12.2.5", + "@next/swc-linux-arm64-musl": "12.2.5", + "@next/swc-linux-x64-gnu": "12.2.5", + "@next/swc-linux-x64-musl": "12.2.5", + "@next/swc-win32-arm64-msvc": "12.2.5", + "@next/swc-win32-ia32-msvc": "12.2.5", + "@next/swc-win32-x64-msvc": "12.2.5", + "@swc/helpers": "0.4.3", "caniuse-lite": "^1.0.30001332", - "postcss": "8.4.5", - "styled-jsx": "5.0.2", - "use-sync-external-store": "1.1.0" + "postcss": "8.4.14", + "styled-jsx": "5.0.4", + "use-sync-external-store": "1.2.0" } }, "no-case": { @@ -14732,13 +14991,13 @@ } }, "postcss": { - "version": "8.4.5", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.5.tgz", - "integrity": "sha512-jBDboWM8qpaqwkMwItqTQTiFikhs/67OYVvblFFTM7MrZjt6yMKd6r2kgXizEbTTljacm4NldIlZnhbjr84QYg==", + "version": "8.4.14", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.14.tgz", + "integrity": "sha512-E398TUmfAYFPBSdzgeieK2Y1+1cpdxJx8yXbK/m57nRhKSmk1GB2tO4lbLBtlkfPQTDKfe4Xqv1ASWPpayPEig==", "requires": { - "nanoid": "^3.1.30", + "nanoid": "^3.3.4", "picocolors": "^1.0.0", - "source-map-js": "^1.0.1" + "source-map-js": "^1.0.2" } }, "postcss-value-parser": { @@ -15393,9 +15652,9 @@ } }, "styled-jsx": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/styled-jsx/-/styled-jsx-5.0.2.tgz", - "integrity": "sha512-LqPQrbBh3egD57NBcHET4qcgshPks+yblyhPlH2GY8oaDgKs8SK4C3dBh3oSJjgzJ3G5t1SYEZGHkP+QEpX9EQ==", + "version": "5.0.4", + "resolved": "https://registry.npmjs.org/styled-jsx/-/styled-jsx-5.0.4.tgz", + "integrity": "sha512-sDFWLbg4zR+UkNzfk5lPilyIgtpddfxXEULxhujorr5jtePTUqiPDc5BC0v1NRqTr/WaFBGQQUoYToGlF4B2KQ==", "requires": {} }, "supports-color": { @@ -15794,9 +16053,9 @@ "requires": {} }, "use-sync-external-store": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/use-sync-external-store/-/use-sync-external-store-1.1.0.tgz", - "integrity": "sha512-SEnieB2FPKEVne66NpXPd1Np4R1lTNKfjuy3XdIoPQKYBAFdzbzSZlSn1KJZUiihQLQC5Znot4SBz1EOTBwQAQ==", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/use-sync-external-store/-/use-sync-external-store-1.2.0.tgz", + "integrity": "sha512-eEgnFxGQ1Ife9bzYs6VLi8/4X6CObHMw9Qr9tPY43iKwsPw8xE8+EFsf/2cFZ5S3esXgpWgtSCtLNS41F+sKPA==", "requires": {} }, "util-deprecate": { diff --git a/package.json b/package.json index 2f857a9..032beb5 100644 --- a/package.json +++ b/package.json @@ -13,7 +13,6 @@ "@fortawesome/fontawesome-svg-core": "^6.1.1", "@fortawesome/free-brands-svg-icons": "^6.1.1", "@fortawesome/pro-solid-svg-icons": "^6.1.1", - "@fortawesome/react-fontawesome": "^0.1.18", "@graphql-tools/merge": "^8.2.1", "@graphql-tools/schema": "^8.2.0", "@graphql-tools/utils": "^8.6.5", @@ -21,13 +20,13 @@ "@reach/listbox": "^0.17.0", "@reach/menu-button": "^0.17.0", "common-tags": "^1.8.0", - "framer-motion": "^6.2.1", + "framer-motion": "^6.5.1", "graphql": "^15.8.0", "graphql-parse-resolve-info": "^4.12.0", "graphql-tag": "^2.12.6", "lodash-es": "^4.17.21", "marked": "^4.0.12", - "next": "^12.2.0", + "next": "^12.2.5", "p-limit": "^3.1.0", "prismjs": "^1.27.0", "react": "^17.0.2", diff --git a/src/components/box/Flex.ts b/src/components/box/Flex.ts index 171c086..9cb83f8 100644 --- a/src/components/box/Flex.ts +++ b/src/components/box/Flex.ts @@ -1,5 +1,5 @@ import styled from "styled-components"; -import { Property } from "csstype"; +import type { Property } from "csstype"; const Flex = styled.div<{ $wrap?: boolean diff --git a/src/components/bracket/BracketChart.tsx b/src/components/bracket/BracketChart.tsx index de44466..3913034 100644 --- a/src/components/bracket/BracketChart.tsx +++ b/src/components/bracket/BracketChart.tsx @@ -2,13 +2,14 @@ import styled from "styled-components"; import { Text } from "components/text"; import { faDiagramProject } from "@fortawesome/pro-solid-svg-icons"; import { Icon } from "components/icon"; -import { memo, RefObject, useCallback, useRef, useState } from "react"; +import type { RefObject } from "react"; +import { memo, useCallback, useRef, useState } from "react"; import theme from "theme"; -import { motion } from "framer-motion"; +import { m } from "framer-motion"; import { Button } from "components/button"; import { BracketThemeSummaryCard } from "components/bracket/BracketThemeSummaryCard"; -import { BracketPageQuery } from "generated/graphql"; -import { RequiredNonNullable } from "utils/types"; +import type { BracketPageQuery } from "generated/graphql"; +import type { RequiredNonNullable } from "utils/types"; const StyledBracketContainer = styled.div` flex: 1 1 0; @@ -27,7 +28,7 @@ const StyledBracketContainer = styled.div` } `; -const StyledBracket = styled(motion.div)` +const StyledBracket = styled(m.div)` display: flex; position: relative; diff --git a/src/components/bracket/BracketThemeSummaryCard.tsx b/src/components/bracket/BracketThemeSummaryCard.tsx index e25f39d..1395331 100644 --- a/src/components/bracket/BracketThemeSummaryCard.tsx +++ b/src/components/bracket/BracketThemeSummaryCard.tsx @@ -9,8 +9,8 @@ import { Icon } from "components/icon"; import { faAward, faSeedling, faUsers } from "@fortawesome/pro-solid-svg-icons"; import { CornerIcon } from "components/icon/CornerIcon"; import gql from "graphql-tag"; -import { BracketThemeSummaryCardConstestantFragment } from "generated/graphql"; -import { ComponentPropsWithoutRef, ReactNode } from "react"; +import type { BracketThemeSummaryCardConstestantFragment } from "generated/graphql"; +import type { ComponentPropsWithoutRef, ReactNode } from "react"; import { TextLink } from "components/text/TextLink"; const StyledSummaryCardWrapper = styled.div` diff --git a/src/components/button/Button.tsx b/src/components/button/Button.tsx index 053184d..d6dda2e 100644 --- a/src/components/button/Button.tsx +++ b/src/components/button/Button.tsx @@ -2,7 +2,8 @@ import styled, { css } from "styled-components"; import theme from "theme"; import { withHover } from "styles/mixins"; import { Solid } from "components/box"; -import { ComponentPropsWithoutRef, ForwardedRef, forwardRef, ReactNode } from "react"; +import type { ComponentPropsWithoutRef, ForwardedRef, ReactNode } from "react"; +import { forwardRef } from "react"; export const Button = forwardRef(ButtonWithRef); diff --git a/src/components/button/FilterToggleButton.tsx b/src/components/button/FilterToggleButton.tsx index 577a6d8..16d2df3 100644 --- a/src/components/button/FilterToggleButton.tsx +++ b/src/components/button/FilterToggleButton.tsx @@ -1,6 +1,6 @@ import { faFilter } from "@fortawesome/pro-solid-svg-icons"; import { IconTextButton } from "components/button"; -import { ComponentPropsWithoutRef } from "react"; +import type { ComponentPropsWithoutRef } from "react"; export function FilterToggleButton(props: Partial>) { return ( diff --git a/src/components/button/IconTextButton.tsx b/src/components/button/IconTextButton.tsx index d615197..32c8e52 100644 --- a/src/components/button/IconTextButton.tsx +++ b/src/components/button/IconTextButton.tsx @@ -3,8 +3,8 @@ import { Button } from "components/button"; import styled, { css } from "styled-components"; import theme from "theme"; import useMediaQuery from "hooks/useMediaQuery"; -import { IconProp } from "@fortawesome/fontawesome-svg-core"; -import { ComponentPropsWithoutRef, ReactNode } from "react"; +import type { IconDefinition } from "@fortawesome/fontawesome-svg-core"; +import type { ComponentPropsWithoutRef, ReactNode } from "react"; const StyledButton = styled(Button)` gap: 8px; @@ -19,7 +19,7 @@ const StyledText = styled.span<{ collapsible: boolean }>` `; interface IconTextButtonProps extends ComponentPropsWithoutRef { - icon: IconProp + icon: IconDefinition children: ReactNode collapsible?: boolean } diff --git a/src/components/button/VideoButton.tsx b/src/components/button/VideoButton.tsx index 7fe7516..1ae76c4 100644 --- a/src/components/button/VideoButton.tsx +++ b/src/components/button/VideoButton.tsx @@ -1,4 +1,5 @@ -import { ComponentPropsWithoutRef, useContext } from "react"; +import type { ComponentPropsWithoutRef } from "react"; +import { useContext } from "react"; import Link from "next/link"; import { faCompactDisc, faPlay } from "@fortawesome/pro-solid-svg-icons"; import PlayerContext from "context/playerContext"; @@ -7,7 +8,7 @@ import { Icon } from "components/icon"; import { Button } from "components/button"; import { VideoTags } from "components/tag"; import gql from "graphql-tag"; -import { +import type { VideoButtonAnimeFragment, VideoButtonEntryFragment, VideoButtonThemeFragment, @@ -33,7 +34,7 @@ export function VideoButton({ anime, theme, entry, video, ...props }: VideoButto legacyBehavior> diff --git a/src/components/card/AnimeSummaryCard.tsx b/src/components/card/AnimeSummaryCard.tsx index ab83204..d087340 100644 --- a/src/components/card/AnimeSummaryCard.tsx +++ b/src/components/card/AnimeSummaryCard.tsx @@ -13,7 +13,7 @@ import { Collapse } from "components/utils"; import { ThemeTable } from "components/table"; import useMediaQuery from "hooks/useMediaQuery"; import gql from "graphql-tag"; -import { AnimeSummaryCardAnimeExpandableFragment, AnimeSummaryCardAnimeFragment } from "generated/graphql"; +import type { AnimeSummaryCardAnimeExpandableFragment, AnimeSummaryCardAnimeFragment } from "generated/graphql"; import { TextLink } from "components/text/TextLink"; const StyledWrapper = styled.div` @@ -123,7 +123,11 @@ export function AnimeSummaryCard({ anime, expandable = false, ...props }: AnimeS title={isExpanded ? "Collapse" : "Expand"} onClick={handleToggleExpand} > - + )} diff --git a/src/components/card/ArtistSummaryCard.tsx b/src/components/card/ArtistSummaryCard.tsx index 3372453..b6f2dad 100644 --- a/src/components/card/ArtistSummaryCard.tsx +++ b/src/components/card/ArtistSummaryCard.tsx @@ -1,7 +1,7 @@ import extractImages from "utils/extractImages"; import { SummaryCard } from "components/card"; import gql from "graphql-tag"; -import { ArtistSummaryCardArtistFragment } from "generated/graphql"; +import type { ArtistSummaryCardArtistFragment } from "generated/graphql"; type ArtistSummaryCardProps = { artist: ArtistSummaryCardArtistFragment diff --git a/src/components/card/Card.ts b/src/components/card/Card.ts index 9ba9c95..46290cd 100644 --- a/src/components/card/Card.ts +++ b/src/components/card/Card.ts @@ -2,7 +2,7 @@ import styled, { css } from "styled-components"; import { Solid } from "components/box"; import theme from "theme"; import { withHover } from "styles/mixins"; -import { Colors } from "theme/colors"; +import type { Colors } from "theme/colors"; export const Card = styled(Solid)<{ hoverable?: boolean diff --git a/src/components/card/ErrorCard.tsx b/src/components/card/ErrorCard.tsx index 32ea26b..d212e7d 100644 --- a/src/components/card/ErrorCard.tsx +++ b/src/components/card/ErrorCard.tsx @@ -1,10 +1,10 @@ import { Card } from "components/card"; import { Row } from "components/box"; import { Text } from "components/text"; -import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; import { faExclamation } from "@fortawesome/pro-solid-svg-icons"; import styled from "styled-components"; import theme from "theme"; +import { Icon } from "components/icon"; const StyledCard = styled(Card)` display: flex; @@ -27,7 +27,7 @@ export function ErrorCard({ error }: ErrorCardProps) { - + An error occurred while searching! Help improving the site by sending us the following error message: diff --git a/src/components/card/SummaryCard.tsx b/src/components/card/SummaryCard.tsx index 1c4168d..548d643 100644 --- a/src/components/card/SummaryCard.tsx +++ b/src/components/card/SummaryCard.tsx @@ -4,11 +4,12 @@ import styled, { css } from "styled-components"; import { Card } from "components/card"; import { Column } from "components/box"; import withBasePath from "utils/withBasePath"; -import { ComponentPropsWithoutRef, ReactNode, useState } from "react"; +import type { ComponentPropsWithoutRef, ReactNode } from "react"; +import { useState } from "react"; import { loadingAnimation } from "styles/mixins"; import { TextLink } from "components/text/TextLink"; import { ConditionalWrapper } from "components/utils/ConditionalWrapper"; -import { Property } from "csstype"; +import type { Property } from "csstype"; const StyledSummaryCard = styled(Card)` display: flex; diff --git a/src/components/card/ThemeDetailCard.tsx b/src/components/card/ThemeDetailCard.tsx index bc9fded..cfea64d 100644 --- a/src/components/card/ThemeDetailCard.tsx +++ b/src/components/card/ThemeDetailCard.tsx @@ -5,7 +5,7 @@ import { ThemeMenu } from "components/menu"; import { ThemeEntryTags } from "components/tag"; import { VideoTags } from "components/tag/VideoTags"; import gql from "graphql-tag"; -import { ThemeDetailCardThemeFragment } from "generated/graphql"; +import type { ThemeDetailCardThemeFragment } from "generated/graphql"; import styled from "styled-components"; import { Card } from "components/card/Card"; import theme from "theme"; diff --git a/src/components/card/ThemeSummaryCard.tsx b/src/components/card/ThemeSummaryCard.tsx index a03a70d..85c717d 100644 --- a/src/components/card/ThemeSummaryCard.tsx +++ b/src/components/card/ThemeSummaryCard.tsx @@ -15,13 +15,13 @@ import styled from "styled-components"; import { Table, ThemeTable } from "components/table"; import theme from "theme"; import useMediaQuery from "hooks/useMediaQuery"; -import { +import type { ThemeSummaryCardArtistFragment, ThemeSummaryCardQuery, ThemeSummaryCardThemeExpandableFragment, ThemeSummaryCardThemeFragment } from "generated/graphql"; -import { PropsWithChildren } from "react"; +import type { PropsWithChildren } from "react"; import { TableBody, TableCell, TableHead, TableHeadCell, TableRow } from "components/table/Table"; import { TextLink } from "components/text/TextLink"; @@ -125,7 +125,11 @@ export function ThemeSummaryCard({ theme, artist, children, expandable, ...props title={isExpanded ? "Collapse" : "Expand"} onClick={handleToggleExpand} > - + )} diff --git a/src/components/description-list/DescriptionList.tsx b/src/components/description-list/DescriptionList.tsx index 57b9cf6..470542c 100644 --- a/src/components/description-list/DescriptionList.tsx +++ b/src/components/description-list/DescriptionList.tsx @@ -1,6 +1,6 @@ import styled from "styled-components"; import { Text } from "components/text"; -import { ComponentPropsWithoutRef, ReactNode } from "react"; +import type { ComponentPropsWithoutRef, ReactNode } from "react"; const StyledDescriptionList = styled.dl` display: flex; diff --git a/src/components/external-link/ExternalLink.tsx b/src/components/external-link/ExternalLink.tsx index efa0e6f..68ac0dd 100644 --- a/src/components/external-link/ExternalLink.tsx +++ b/src/components/external-link/ExternalLink.tsx @@ -1,7 +1,7 @@ import { faChevronCircleRight } from "@fortawesome/pro-solid-svg-icons"; import { Text } from "components/text"; import { Icon } from "components/icon"; -import { ComponentPropsWithoutRef, ReactNode } from "react"; +import type { ComponentPropsWithoutRef, ReactNode } from "react"; interface ExternalLinkProps extends ComponentPropsWithoutRef { href?: string | null diff --git a/src/components/featured-theme/FeaturedTheme.tsx b/src/components/featured-theme/FeaturedTheme.tsx index 2798783..94bcdd3 100644 --- a/src/components/featured-theme/FeaturedTheme.tsx +++ b/src/components/featured-theme/FeaturedTheme.tsx @@ -11,7 +11,7 @@ import createVideoSlug from "utils/createVideoSlug"; import Link from "next/link"; import { VIDEO_URL } from "utils/config"; import gql from "graphql-tag"; -import { FeaturedThemeThemeFragment } from "generated/graphql"; +import type { FeaturedThemeThemeFragment } from "generated/graphql"; const slowPan = keyframes` from { diff --git a/src/components/filter/AnimeThemeFilter.tsx b/src/components/filter/AnimeThemeFilter.tsx index 6dba237..7509cdb 100644 --- a/src/components/filter/AnimeThemeFilter.tsx +++ b/src/components/filter/AnimeThemeFilter.tsx @@ -5,7 +5,7 @@ import { Listbox } from "components/listbox"; import { HorizontalScroll } from "components/utils"; import { either, themeIndexComparator, themeTypeComparator } from "utils/comparators"; import gql from "graphql-tag"; -import { AnimeThemeFilterThemeFragment } from "generated/graphql"; +import type { AnimeThemeFilterThemeFragment } from "generated/graphql"; interface AnimeThemeFilterProps { themes: Array diff --git a/src/components/footer/Footer.tsx b/src/components/footer/Footer.tsx index 012083e..bd0fb1e 100644 --- a/src/components/footer/Footer.tsx +++ b/src/components/footer/Footer.tsx @@ -7,7 +7,7 @@ import { faDiscord, faGithub, faReddit, faTwitter } from "@fortawesome/free-bran import { Button } from "components/button"; import styled from "styled-components"; import theme from "theme"; -import { ComponentPropsWithoutRef } from "react"; +import type { ComponentPropsWithoutRef } from "react"; import { APP_URL } from "utils/config"; const StyledFooter = styled(Solid)` diff --git a/src/components/icon/FontAwesomeIcon.tsx b/src/components/icon/FontAwesomeIcon.tsx new file mode 100644 index 0000000..36a8490 --- /dev/null +++ b/src/components/icon/FontAwesomeIcon.tsx @@ -0,0 +1,43 @@ +import type { SVGProps } from "react"; +import type { IconDefinition } from "@fortawesome/fontawesome-svg-core"; + +export type FontAwesomeIconProps = SVGProps & { + icon: IconDefinition + title?: string +} + +const xmlns = "http://www.w3.org/2000/svg"; + +export function FontAwesomeIcon(props: FontAwesomeIconProps) { + const { icon: iconProps, children, className = "", title, ...rest } = props; + + const { prefix, iconName, icon } = iconProps; + const [width, height, , , svgPathData] = icon; + + const dataFa = `${prefix}-${iconName}`; + + return ( + + ); +} diff --git a/src/components/icon/Icon.tsx b/src/components/icon/Icon.tsx index 1c2f712..e76f68b 100644 --- a/src/components/icon/Icon.tsx +++ b/src/components/icon/Icon.tsx @@ -1,12 +1,10 @@ -import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; +import { FontAwesomeIcon } from "components/icon/FontAwesomeIcon"; import styled from "styled-components"; import theme from "theme"; -import { Property } from "csstype"; -import { Colors } from "theme/colors"; +import type { Property } from "csstype"; +import type { Colors } from "theme/colors"; -export const Icon = styled(FontAwesomeIcon).attrs({ - fixedWidth: true -})<{ color?: keyof Colors, transition?: Property.Transition }>` +export const Icon = styled(FontAwesomeIcon)<{ color?: keyof Colors, transition?: Property.Transition }>` color: ${(props) => props.color && theme.colors[props.color]}; transition: ${(props) => props.transition} diff --git a/src/components/image/CoverImage.tsx b/src/components/image/CoverImage.tsx index e89fc13..2f311b9 100644 --- a/src/components/image/CoverImage.tsx +++ b/src/components/image/CoverImage.tsx @@ -2,8 +2,8 @@ import extractImages from "utils/extractImages"; import { AspectRatio } from "components/utils"; import { FullWidthImage } from "components/image"; import gql from "graphql-tag"; -import { CoverImageResourceWithImagesFragment } from "generated/graphql"; -import { ComponentPropsWithoutRef } from "react"; +import type { CoverImageResourceWithImagesFragment } from "generated/graphql"; +import type { ComponentPropsWithoutRef } from "react"; interface CoverImageProps extends ComponentPropsWithoutRef { resourceWithImages: CoverImageResourceWithImagesFragment diff --git a/src/components/image/Logo.tsx b/src/components/image/Logo.tsx index ddab66e..d3b5e8f 100644 --- a/src/components/image/Logo.tsx +++ b/src/components/image/Logo.tsx @@ -1,4 +1,4 @@ -import { SVGAttributes } from "react"; +import type { SVGAttributes } from "react"; export function Logo(props: SVGAttributes) { return ( diff --git a/src/components/image/LogoPlaceholder.tsx b/src/components/image/LogoPlaceholder.tsx index 6c00dce..f8bdcd2 100644 --- a/src/components/image/LogoPlaceholder.tsx +++ b/src/components/image/LogoPlaceholder.tsx @@ -1,7 +1,7 @@ import styled from "styled-components"; import theme from "theme"; import { Logo } from "components/image/Logo"; -import { ComponentPropsWithoutRef } from "react"; +import type { ComponentPropsWithoutRef } from "react"; const StyledPlaceholder = styled.div` width: 100%; diff --git a/src/components/image/MultiCoverImage.tsx b/src/components/image/MultiCoverImage.tsx index 2c24838..c8b57a8 100644 --- a/src/components/image/MultiCoverImage.tsx +++ b/src/components/image/MultiCoverImage.tsx @@ -1,8 +1,8 @@ import extractImages from "utils/extractImages"; import { AspectRatio } from "components/utils"; import styled, { css } from "styled-components"; -import { ComponentPropsWithoutRef } from "react"; -import { MultiCoverImageResourceWithImagesFragment } from "generated/graphql"; +import type { ComponentPropsWithoutRef } from "react"; +import type { MultiCoverImageResourceWithImagesFragment } from "generated/graphql"; import gql from "graphql-tag"; import { LogoPlaceholder } from "components/image/LogoPlaceholder"; diff --git a/src/components/image/StudioCoverImage.tsx b/src/components/image/StudioCoverImage.tsx index 964a45f..92ba1c5 100644 --- a/src/components/image/StudioCoverImage.tsx +++ b/src/components/image/StudioCoverImage.tsx @@ -2,8 +2,9 @@ import extractImages from "utils/extractImages"; import { AspectRatio } from "components/utils"; import { FullWidthImage, MultiCoverImage } from "components/image"; import gql from "graphql-tag"; -import { ComponentPropsWithoutRef, useState } from "react"; -import { StudioCoverImageStudioFragment } from "generated/graphql"; +import type { ComponentPropsWithoutRef } from "react"; +import { useState } from "react"; +import type { StudioCoverImageStudioFragment } from "generated/graphql"; import styled from "styled-components"; const StyledImage = styled(FullWidthImage)` diff --git a/src/components/index/AlphabeticalIndex.tsx b/src/components/index/AlphabeticalIndex.tsx index a543062..6eb9d14 100644 --- a/src/components/index/AlphabeticalIndex.tsx +++ b/src/components/index/AlphabeticalIndex.tsx @@ -1,4 +1,5 @@ -import React, { ReactNode } from "react"; +import type { ReactNode } from "react"; +import React from "react"; import Link from "next/link"; import { groupBy } from "lodash-es"; import { Text } from "components/text"; diff --git a/src/components/input/Input.tsx b/src/components/input/Input.tsx index ad2454f..bc35bae 100644 --- a/src/components/input/Input.tsx +++ b/src/components/input/Input.tsx @@ -3,8 +3,8 @@ import theme from "theme"; import { Icon } from "components/icon"; import { faTimes } from "@fortawesome/pro-solid-svg-icons"; import { Button } from "components/button"; -import { IconProp } from "@fortawesome/fontawesome-svg-core"; -import { ComponentPropsWithoutRef, FormEvent } from "react"; +import type { IconDefinition } from "@fortawesome/fontawesome-svg-core"; +import type { ComponentPropsWithoutRef, FormEvent } from "react"; import { withColorTheme } from "styles/mixins"; const StyledSearchInput = styled.div` @@ -47,7 +47,7 @@ interface InputProps extends ComponentPropsWithoutRef onChange: (value: string) => void onSubmit?: (event: FormEvent) => void resettable?: boolean - icon?: IconProp + icon?: IconDefinition inputProps?: ComponentPropsWithoutRef } diff --git a/src/components/listbox/Listbox.tsx b/src/components/listbox/Listbox.tsx index 5e1f575..0d9833e 100644 --- a/src/components/listbox/Listbox.tsx +++ b/src/components/listbox/Listbox.tsx @@ -1,6 +1,7 @@ import { ListboxCustom, ListboxNative } from "components/listbox"; import theme from "theme"; -import { createContext, ReactNode, useContext } from "react"; +import type { ReactNode } from "react"; +import { createContext, useContext } from "react"; import useMediaQuery from "hooks/useMediaQuery"; const ListboxContext = createContext({ diff --git a/src/components/listbox/ListboxCustom.tsx b/src/components/listbox/ListboxCustom.tsx index 864e133..7f31a0e 100644 --- a/src/components/listbox/ListboxCustom.tsx +++ b/src/components/listbox/ListboxCustom.tsx @@ -1,5 +1,4 @@ import styled from "styled-components"; -import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; import { faCheck, faSort, faTimes } from "@fortawesome/pro-solid-svg-icons"; import { Button } from "components/button"; import { Text } from "components/text"; @@ -14,8 +13,8 @@ import { } from "@reach/listbox"; import { flipDown } from "styles/animations"; import { Icon } from "components/icon"; -import { ListboxOptionProps, ListboxProps } from "components/listbox/Listbox"; -import { SyntheticEvent } from "react"; +import type { ListboxOptionProps, ListboxProps } from "components/listbox/Listbox"; +import type { SyntheticEvent } from "react"; // ReachUI's listbox can't handle null values, so we are giving it a fake null value. // The caveat is, that we can't use this value normally, thus it's obscure name. @@ -161,7 +160,7 @@ ListboxCustom.Option = function ListboxCustomOption({ value, children, hidden = ); diff --git a/src/components/listbox/ListboxNative.tsx b/src/components/listbox/ListboxNative.tsx index e3c773b..286c253 100644 --- a/src/components/listbox/ListboxNative.tsx +++ b/src/components/listbox/ListboxNative.tsx @@ -3,9 +3,10 @@ import { faSort, faTimes } from "@fortawesome/pro-solid-svg-icons"; import { Button } from "components/button"; import { Text } from "components/text"; import theme from "theme"; -import { createContext, SyntheticEvent, useCallback, useContext, useEffect, useState } from "react"; +import type { SyntheticEvent } from "react"; +import { createContext, useCallback, useContext, useEffect, useState } from "react"; import { Icon } from "components/icon"; -import { ListboxOptionProps, ListboxProps } from "components/listbox/Listbox"; +import type { ListboxOptionProps, ListboxProps } from "components/listbox/Listbox"; const NULL_VALUE = "__NULL__"; diff --git a/src/components/menu/Menu.tsx b/src/components/menu/Menu.tsx index a53bd4e..836f950 100644 --- a/src/components/menu/Menu.tsx +++ b/src/components/menu/Menu.tsx @@ -6,7 +6,7 @@ import { withHover } from "styles/mixins"; import { Icon } from "components/icon"; import { faEllipsisV } from "@fortawesome/pro-solid-svg-icons"; import { fadeIn, flipDown, slideIn } from "styles/animations"; -import { ComponentPropsWithoutRef, PropsWithChildren, ReactNode } from "react"; +import type { ComponentPropsWithoutRef, PropsWithChildren, ReactNode } from "react"; const StyledMenuItems = styled(MenuItems)` z-index: ${theme.zIndices.menuPopover}; diff --git a/src/components/menu/ThemeMenu.tsx b/src/components/menu/ThemeMenu.tsx index 509bad7..5f7f0da 100644 --- a/src/components/menu/ThemeMenu.tsx +++ b/src/components/menu/ThemeMenu.tsx @@ -4,7 +4,7 @@ import { Text } from "components/text"; import { Menu } from "components/menu"; import useLocalPlaylist from "hooks/useLocalPlaylist"; import gql from "graphql-tag"; -import { ThemeMenuThemeFragment } from "generated/graphql"; +import type { ThemeMenuThemeFragment } from "generated/graphql"; interface ThemeMenuProps { theme: ThemeMenuThemeFragment diff --git a/src/components/navigation/SeasonNavigation.tsx b/src/components/navigation/SeasonNavigation.tsx index 1cd7bf7..91c0054 100644 --- a/src/components/navigation/SeasonNavigation.tsx +++ b/src/components/navigation/SeasonNavigation.tsx @@ -2,9 +2,9 @@ import { Row } from "components/box"; import { Switcher } from "components/switcher"; import Link from "next/link"; import { HorizontalScroll } from "components/utils"; -import { YearDetailPageProps } from "pages/year/[year]"; +import type { YearDetailPageProps } from "pages/year/[year]"; import { SwitcherOption } from "components/switcher/Switcher"; -import { SeasonDetailPageProps } from "pages/year/[year]/[season]"; +import type { SeasonDetailPageProps } from "pages/year/[year]/[season]"; export function SeasonNavigation(props: YearDetailPageProps | SeasonDetailPageProps) { const { year } = props; diff --git a/src/components/navigation/YearNavigation.tsx b/src/components/navigation/YearNavigation.tsx index d6dbdab..43fc557 100644 --- a/src/components/navigation/YearNavigation.tsx +++ b/src/components/navigation/YearNavigation.tsx @@ -3,7 +3,7 @@ import { Button } from "components/button"; import styled from "styled-components"; import { Row } from "components/box"; import { Text } from "components/text"; -import { YearDetailPageProps } from "pages/year/[year]"; +import type { YearDetailPageProps } from "pages/year/[year]"; const StyledYear = styled.div` flex: 1; diff --git a/src/components/search-filter/SearchFilterSortBy.tsx b/src/components/search-filter/SearchFilterSortBy.tsx index c3d8331..c1e8496 100644 --- a/src/components/search-filter/SearchFilterSortBy.tsx +++ b/src/components/search-filter/SearchFilterSortBy.tsx @@ -1,7 +1,7 @@ import { Text } from "components/text"; import { Listbox } from "components/listbox"; import { SearchFilter } from "components/search-filter"; -import { ComponentPropsWithoutRef, ReactNode } from "react"; +import type { ComponentPropsWithoutRef, ReactNode } from "react"; interface SearchFilterSortByProps { children: ReactNode diff --git a/src/components/search/SearchAnime.tsx b/src/components/search/SearchAnime.tsx index a602e46..cda4e21 100644 --- a/src/components/search/SearchAnime.tsx +++ b/src/components/search/SearchAnime.tsx @@ -8,7 +8,7 @@ import { SearchEntity } from "components/search"; import { AnimeSummaryCard } from "components/card"; import { useState } from "react"; import gql from "graphql-tag"; -import { SearchAnimeQuery, SearchAnimeQueryVariables } from "generated/graphql"; +import type { SearchAnimeQuery, SearchAnimeQueryVariables } from "generated/graphql"; import { fetchDataClient } from "lib/client"; import useFilterStorage from "hooks/useFilterStorage"; diff --git a/src/components/search/SearchArtist.tsx b/src/components/search/SearchArtist.tsx index 5015678..38b6f60 100644 --- a/src/components/search/SearchArtist.tsx +++ b/src/components/search/SearchArtist.tsx @@ -3,7 +3,7 @@ import { SearchEntity } from "components/search"; import { ArtistSummaryCard } from "components/card"; import { useState } from "react"; import { fetchDataClient } from "lib/client"; -import { SearchArtistQuery, SearchArtistQueryVariables } from "generated/graphql"; +import type { SearchArtistQuery, SearchArtistQueryVariables } from "generated/graphql"; import gql from "graphql-tag"; import useFilterStorage from "hooks/useFilterStorage"; diff --git a/src/components/search/SearchEntity.tsx b/src/components/search/SearchEntity.tsx index 887e80d..64970fd 100644 --- a/src/components/search/SearchEntity.tsx +++ b/src/components/search/SearchEntity.tsx @@ -6,9 +6,9 @@ import { Icon } from "components/icon"; import { SearchFilterGroup } from "components/search-filter"; import { ErrorCard } from "components/card"; import useEntitySearch from "hooks/useEntitySearch"; -import { ReactNode } from "react"; -import { SearchArgs } from "generated/graphql"; -import { SimpleSearchArgs } from "lib/client/search"; +import type { ReactNode } from "react"; +import type { SearchArgs } from "generated/graphql"; +import type { SimpleSearchArgs } from "lib/client/search"; interface SearchEntityProps { entity: string @@ -81,7 +81,7 @@ export function SearchEntity({ entity, fetchResults, searchArgs, filters, ren {(hasNextPage || isPlaceholderData) && ( )} diff --git a/src/components/search/SearchGlobal.tsx b/src/components/search/SearchGlobal.tsx index 5d67cfc..d3508cb 100644 --- a/src/components/search/SearchGlobal.tsx +++ b/src/components/search/SearchGlobal.tsx @@ -9,8 +9,8 @@ import { AnimeSummaryCard, ArtistSummaryCard, ErrorCard, SummaryCard, ThemeSumma import { useRouter } from "next/router"; import { fetchDataClient } from "lib/client"; import gql from "graphql-tag"; -import { SearchGlobalQuery, SearchGlobalQueryVariables } from "generated/graphql"; -import { ReactNode } from "react"; +import type { SearchGlobalQuery, SearchGlobalQueryVariables } from "generated/graphql"; +import type { ReactNode } from "react"; interface SearchGlobalProps { searchQuery?: string diff --git a/src/components/search/SearchSeries.tsx b/src/components/search/SearchSeries.tsx index 9c37850..191524d 100644 --- a/src/components/search/SearchSeries.tsx +++ b/src/components/search/SearchSeries.tsx @@ -3,7 +3,7 @@ import { SearchEntity } from "components/search"; import { SummaryCard } from "components/card"; import { useState } from "react"; import { fetchDataClient } from "lib/client"; -import { SearchSeriesQuery, SearchSeriesQueryVariables } from "generated/graphql"; +import type { SearchSeriesQuery, SearchSeriesQueryVariables } from "generated/graphql"; import gql from "graphql-tag"; import useFilterStorage from "hooks/useFilterStorage"; diff --git a/src/components/search/SearchStudio.tsx b/src/components/search/SearchStudio.tsx index dbc333b..49d636b 100644 --- a/src/components/search/SearchStudio.tsx +++ b/src/components/search/SearchStudio.tsx @@ -1,14 +1,15 @@ import { SearchFilterFirstLetter, SearchFilterSortBy } from "components/search-filter"; import { SearchEntity } from "components/search"; import { SummaryCard } from "components/card"; -import { SyntheticEvent, useState } from "react"; +import type { SyntheticEvent } from "react"; +import { useState } from "react"; import { fetchDataClient } from "lib/client"; -import { SearchStudioQuery, SearchStudioQueryVariables } from "generated/graphql"; +import type { SearchStudioQuery, SearchStudioQueryVariables } from "generated/graphql"; import gql from "graphql-tag"; import { StudioCoverImage } from "components/image/StudioCoverImage"; import extractImages from "utils/extractImages"; import extractBackgroundColor from "utils/extractBackgroundColor"; -import { Property } from "csstype"; +import type { Property } from "csstype"; import useFilterStorage from "hooks/useFilterStorage"; const initialFilter = { diff --git a/src/components/search/SearchTheme.tsx b/src/components/search/SearchTheme.tsx index cb07852..580413c 100644 --- a/src/components/search/SearchTheme.tsx +++ b/src/components/search/SearchTheme.tsx @@ -3,7 +3,7 @@ import { SearchEntity } from "components/search"; import { ThemeSummaryCard } from "components/card"; import { useState } from "react"; import { fetchDataClient } from "lib/client"; -import { SearchThemeQuery, SearchThemeQueryVariables } from "generated/graphql"; +import type { SearchThemeQuery, SearchThemeQueryVariables } from "generated/graphql"; import gql from "graphql-tag"; import useFilterStorage from "hooks/useFilterStorage"; diff --git a/src/components/seo/SEO.tsx b/src/components/seo/SEO.tsx index 32d4699..438ac04 100644 --- a/src/components/seo/SEO.tsx +++ b/src/components/seo/SEO.tsx @@ -1,4 +1,4 @@ -import { PropsWithChildren } from "react"; +import type { PropsWithChildren } from "react"; import Head from "next/head"; import withBasePath from "utils/withBasePath"; diff --git a/src/components/skeleton/Skeleton.tsx b/src/components/skeleton/Skeleton.tsx index 94e081c..86c8e23 100644 --- a/src/components/skeleton/Skeleton.tsx +++ b/src/components/skeleton/Skeleton.tsx @@ -2,8 +2,8 @@ import styled from "styled-components"; import { loadingAnimation } from "styles/mixins"; import { fadeIn } from "styles/animations"; import theme from "theme"; -import { ReactNode } from "react"; -import { Property } from "csstype"; +import type { ReactNode } from "react"; +import type { Property } from "csstype"; const StyledSkeleton = styled.div` ${loadingAnimation} diff --git a/src/components/switcher/Switcher.tsx b/src/components/switcher/Switcher.tsx index 1426d43..f804631 100644 --- a/src/components/switcher/Switcher.tsx +++ b/src/components/switcher/Switcher.tsx @@ -1,12 +1,13 @@ import styled, { css } from "styled-components"; -import { LayoutGroup, motion } from "framer-motion"; +import { LayoutGroup, m } from "framer-motion"; import theme from "theme"; import { uniqueId as createUniqueId } from "lodash-es"; -import { +import type { ComponentPropsWithoutRef, ComponentPropsWithRef, + ReactNode } from "react"; +import { createContext, - ReactNode, useContext, useMemo } from "react"; @@ -66,7 +67,7 @@ const StyledButton = styled.button` `)} `; -const StyledButtonBackground = styled(motion.div)` +const StyledButtonBackground = styled(m.div)` position: absolute; z-index: ${theme.zIndices.switcherButton}; top: 0; diff --git a/src/components/table/Table.tsx b/src/components/table/Table.tsx index a45bf85..02530d5 100644 --- a/src/components/table/Table.tsx +++ b/src/components/table/Table.tsx @@ -1,7 +1,7 @@ import styled, { css } from "styled-components"; import theme from "theme"; import { withHover } from "styles/mixins"; -import { Property } from "csstype"; +import type { Property } from "csstype"; export const Table = styled.div<{ style: { "--columns": Property.GridTemplateColumns } }>``; diff --git a/src/components/table/ThemeTable.tsx b/src/components/table/ThemeTable.tsx index 8ab088f..817cac2 100644 --- a/src/components/table/ThemeTable.tsx +++ b/src/components/table/ThemeTable.tsx @@ -8,7 +8,7 @@ import { ContentWarningTags, EpisodeTag, VideoTags } from "components/tag"; import { Row } from "components/box"; import { TableBody, TableCell, TableHead, TableHeadCell, TableRow } from "components/table/Table"; import gql from "graphql-tag"; -import { ThemeTableThemeFragment } from "generated/graphql"; +import type { ThemeTableThemeFragment } from "generated/graphql"; export interface ThemeTableProps { themes: Array diff --git a/src/components/tag/ContentWarningTags.tsx b/src/components/tag/ContentWarningTags.tsx index af3f2d8..35a4d6f 100644 --- a/src/components/tag/ContentWarningTags.tsx +++ b/src/components/tag/ContentWarningTags.tsx @@ -2,7 +2,7 @@ import { faExclamationCircle } from "@fortawesome/pro-solid-svg-icons"; import { Tag } from "components/tag"; import { Icon } from "components/icon"; import gql from "graphql-tag"; -import { ContentWarningTagsEntryFragment } from "generated/graphql"; +import type { ContentWarningTagsEntryFragment } from "generated/graphql"; interface ContentWarningTagsProps { entry: ContentWarningTagsEntryFragment diff --git a/src/components/tag/EpisodeTag.tsx b/src/components/tag/EpisodeTag.tsx index 0500b7a..a918c2c 100644 --- a/src/components/tag/EpisodeTag.tsx +++ b/src/components/tag/EpisodeTag.tsx @@ -1,7 +1,7 @@ import { faFilm } from "@fortawesome/pro-solid-svg-icons"; import { Tag } from "components/tag"; import gql from "graphql-tag"; -import { EpisodeTagEntryFragment } from "generated/graphql"; +import type { EpisodeTagEntryFragment } from "generated/graphql"; interface EpisodeTagProps { entry: EpisodeTagEntryFragment diff --git a/src/components/tag/Tag.tsx b/src/components/tag/Tag.tsx index 7928237..abd10df 100644 --- a/src/components/tag/Tag.tsx +++ b/src/components/tag/Tag.tsx @@ -2,9 +2,9 @@ import styled, { css } from "styled-components"; import { Text } from "components/text"; import { Icon } from "components/icon"; import theme from "theme"; -import { IconProp } from "@fortawesome/fontawesome-svg-core"; -import { HTMLAttributes, ReactComponentElement, ReactElement, ReactNode } from "react"; -import { Colors } from "theme/colors"; +import type { IconDefinition } from "@fortawesome/fontawesome-svg-core"; +import type { HTMLAttributes, ReactComponentElement, ReactElement, ReactNode } from "react"; +import type { Colors } from "theme/colors"; const StyledTag = styled.span` display: flex; @@ -28,7 +28,7 @@ const StyledText = styled(Text)` `; interface TagProps extends HTMLAttributes { - icon?: ReactComponentElement | IconProp + icon?: ReactComponentElement | IconDefinition children?: ReactNode hideTextOnMobile?: boolean textColor?: keyof Colors @@ -47,6 +47,6 @@ export function Tag({ icon, children, hideTextOnMobile = false, textColor, ...pr ); } -function isIcon(value: ReactComponentElement | IconProp): value is ReactComponentElement { +function isIcon(value: ReactComponentElement | IconDefinition): value is ReactComponentElement { return typeof value === "object" && "type" in value && (value as ReactElement).type === Icon; } diff --git a/src/components/tag/ThemeEntryTags.tsx b/src/components/tag/ThemeEntryTags.tsx index 7108f4a..a531f1a 100644 --- a/src/components/tag/ThemeEntryTags.tsx +++ b/src/components/tag/ThemeEntryTags.tsx @@ -1,7 +1,7 @@ import { ContentWarningTags, EpisodeTag } from "components/tag"; import { Row } from "components/box"; import gql from "graphql-tag"; -import { ThemeEntryTagsEntryFragment } from "generated/graphql"; +import type { ThemeEntryTagsEntryFragment } from "generated/graphql"; type ThemeEntryTagsProps = { entry: ThemeEntryTagsEntryFragment diff --git a/src/components/tag/VideoTags.tsx b/src/components/tag/VideoTags.tsx index 30ffe18..0ab8a73 100644 --- a/src/components/tag/VideoTags.tsx +++ b/src/components/tag/VideoTags.tsx @@ -10,7 +10,7 @@ import { Tag } from "components/tag"; import { Row } from "components/box"; import styled from "styled-components"; import gql from "graphql-tag"; -import { VideoTagsVideoFragment } from "generated/graphql"; +import type { VideoTagsVideoFragment } from "generated/graphql"; const StyledVideoTags = styled(Row)` align-items: baseline; diff --git a/src/components/text/Text.ts b/src/components/text/Text.ts index 7f72e21..627d6b0 100644 --- a/src/components/text/Text.ts +++ b/src/components/text/Text.ts @@ -1,8 +1,8 @@ import styled, { css } from "styled-components"; import theme from "theme"; -import { Property } from "csstype"; -import { Colors } from "theme/colors"; -import { ReactElement } from "react"; +import type { Property } from "csstype"; +import type { Colors } from "theme/colors"; +import type { ReactElement } from "react"; interface TextProps { variant?: "h1" | "h2" | "h3" | "small" | "code"; diff --git a/src/components/toast/AnnouncementToast.tsx b/src/components/toast/AnnouncementToast.tsx index 34522e8..12cf3cc 100644 --- a/src/components/toast/AnnouncementToast.tsx +++ b/src/components/toast/AnnouncementToast.tsx @@ -2,7 +2,8 @@ import { useEffect, useState } from "react"; import styled from "styled-components"; import { Toast } from "components/toast"; import { Text } from "components/text"; -import { Announcement, fetchAnnouncements } from "lib/client/announcement"; +import type { Announcement } from "lib/client/announcement"; +import { fetchAnnouncements } from "lib/client/announcement"; import { ShowAnnouncements } from "utils/settings"; import theme from "theme"; import { useToasts } from "context/toastContext"; diff --git a/src/components/toast/PlaylistAddToast.tsx b/src/components/toast/PlaylistAddToast.tsx index 458f29d..052d7d8 100644 --- a/src/components/toast/PlaylistAddToast.tsx +++ b/src/components/toast/PlaylistAddToast.tsx @@ -3,7 +3,7 @@ import { Toast } from "components/toast"; import { Text } from "components/text"; import { Row } from "components/box"; import { SongTitle } from "components/utils"; -import { FetchThemeSummaryCardData } from "components/card/ThemeSummaryCard"; +import type { FetchThemeSummaryCardData } from "components/card/ThemeSummaryCard"; interface PlaylistAddToastProps { theme: Exclude diff --git a/src/components/toast/ToastHub.tsx b/src/components/toast/ToastHub.tsx index f2c05f9..caa6c35 100644 --- a/src/components/toast/ToastHub.tsx +++ b/src/components/toast/ToastHub.tsx @@ -2,7 +2,7 @@ import { useToasts } from "context/toastContext"; import styled from "styled-components"; import { Container } from "components/container"; import theme from "theme"; -import { AnimatePresence, motion } from "framer-motion"; +import { AnimatePresence, m } from "framer-motion"; const StyledToastHub = styled(Container)` position: fixed; @@ -18,7 +18,7 @@ const StyledToastHub = styled(Container)` pointer-events: none; `; -const StyledToastContainer = styled(motion.div)` +const StyledToastContainer = styled(m.div)` pointer-events: initial; `; diff --git a/src/components/utils/Collapse.tsx b/src/components/utils/Collapse.tsx index 1767107..d022180 100644 --- a/src/components/utils/Collapse.tsx +++ b/src/components/utils/Collapse.tsx @@ -1,6 +1,6 @@ import styled from "styled-components"; import { fadeIn, slideIn } from "styles/animations"; -import { ReactNode } from "react"; +import type { ReactNode } from "react"; const StyledWrapper = styled.div` animation-name: ${slideIn("-16px")}, ${fadeIn}; diff --git a/src/components/utils/ErrorBoundary.tsx b/src/components/utils/ErrorBoundary.tsx index 69c1d3a..266cc70 100644 --- a/src/components/utils/ErrorBoundary.tsx +++ b/src/components/utils/ErrorBoundary.tsx @@ -1,4 +1,5 @@ -import { Component, ErrorInfo, ReactNode } from "react"; +import type { ErrorInfo, ReactNode } from "react"; +import { Component } from "react"; import Link from "next/link"; import { Text } from "components/text"; import { Container } from "components/container"; diff --git a/src/components/utils/HeightTransition.tsx b/src/components/utils/HeightTransition.tsx index 0a6385b..3e1e7a2 100644 --- a/src/components/utils/HeightTransition.tsx +++ b/src/components/utils/HeightTransition.tsx @@ -1,6 +1,7 @@ -import { ReactNode, useEffect, useRef, useState } from "react"; +import type { ReactNode } from "react"; +import { useEffect, useRef, useState } from "react"; import styled from "styled-components"; -import { Property } from "csstype"; +import type { Property } from "csstype"; const StyledShadowFix = styled.div` overflow: hidden; diff --git a/src/components/utils/Performances.tsx b/src/components/utils/Performances.tsx index fc9d398..5bcb14f 100644 --- a/src/components/utils/Performances.tsx +++ b/src/components/utils/Performances.tsx @@ -3,7 +3,7 @@ import { Text } from "components/text"; import styled from "styled-components"; import { useState } from "react"; import gql from "graphql-tag"; -import { PerformancesArtistFragment, PerformancesSongFragment } from "generated/graphql"; +import type { PerformancesArtistFragment, PerformancesSongFragment } from "generated/graphql"; const StyledArtist = styled(Text)` &:not(:first-of-type)::before { diff --git a/src/components/utils/SongTitle.tsx b/src/components/utils/SongTitle.tsx index 9776194..83c6c8f 100644 --- a/src/components/utils/SongTitle.tsx +++ b/src/components/utils/SongTitle.tsx @@ -1,7 +1,7 @@ import Link from "next/link"; import { Text } from "components/text"; import gql from "graphql-tag"; -import { SongTitleSongFragment } from "generated/graphql"; +import type { SongTitleSongFragment } from "generated/graphql"; export interface SongTitleProps { song: SongTitleSongFragment | null diff --git a/src/components/utils/SongTitleWithArtists.tsx b/src/components/utils/SongTitleWithArtists.tsx index 50fa2f2..4fbbbce 100644 --- a/src/components/utils/SongTitleWithArtists.tsx +++ b/src/components/utils/SongTitleWithArtists.tsx @@ -1,7 +1,7 @@ import { Text } from "components/text"; import { Performances, SongTitle } from "components/utils"; import gql from "graphql-tag"; -import { SongTitleWithArtistsArtistFragment, SongTitleWithArtistsSongFragment } from "generated/graphql"; +import type { SongTitleWithArtistsArtistFragment, SongTitleWithArtistsSongFragment } from "generated/graphql"; interface SongTitleWithArtistsProps { song: SongTitleWithArtistsSongFragment | null diff --git a/src/components/video-player/VideoPlayer.style.ts b/src/components/video-player/VideoPlayer.style.ts index 007a4d9..2fd620c 100644 --- a/src/components/video-player/VideoPlayer.style.ts +++ b/src/components/video-player/VideoPlayer.style.ts @@ -1,5 +1,5 @@ import styled, { css, keyframes } from "styled-components"; -import { motion } from "framer-motion"; +import { m } from "framer-motion"; import { Button } from "components/button"; import theme from "theme"; import { slideIn } from "styles/animations"; @@ -13,7 +13,7 @@ const slowPan = keyframes` } `; -export const StyledPlayer = styled(motion.div)<{ $background: boolean }>` +export const StyledPlayer = styled(m.div)<{ $background: boolean }>` width: 100%; max-height: calc(100vh - 96px); aspect-ratio: 16 / 9; diff --git a/src/components/video-player/VideoPlayer.tsx b/src/components/video-player/VideoPlayer.tsx index 53ef238..7ce5f16 100644 --- a/src/components/video-player/VideoPlayer.tsx +++ b/src/components/video-player/VideoPlayer.tsx @@ -1,4 +1,5 @@ -import { SyntheticEvent, MouseEvent, useContext, useEffect, useRef, useState } from "react"; +import type { SyntheticEvent, MouseEvent } from "react"; +import { useContext, useEffect, useRef, useState } from "react"; import { StyledAudio, StyledAudioBackground, @@ -29,7 +30,7 @@ import useSetting from "hooks/useSetting"; import { AudioMode, GlobalVolume } from "utils/settings"; import { VIDEO_URL, AUDIO_URL } from "utils/config"; import gql from "graphql-tag"; -import { +import type { VideoPlayerAnimeFragment, VideoPlayerEntryFragment, VideoPlayerThemeFragment, diff --git a/src/context/toastContext.tsx b/src/context/toastContext.tsx index 1df8117..2607e8a 100644 --- a/src/context/toastContext.tsx +++ b/src/context/toastContext.tsx @@ -1,4 +1,5 @@ -import { createContext, ReactNode, useContext, useState } from "react"; +import type { ReactNode } from "react"; +import { createContext, useContext, useState } from "react"; interface IToastContext { activeToasts: Array diff --git a/src/hooks/useColorTheme.ts b/src/hooks/useColorTheme.ts index af4ba80..823e191 100644 --- a/src/hooks/useColorTheme.ts +++ b/src/hooks/useColorTheme.ts @@ -1,6 +1,7 @@ import { useEffect } from "react"; import useLocalStorageState from "use-local-storage-state"; -import { ColorTheme, isColorTheme } from "context/colorThemeContext"; +import type { ColorTheme } from "context/colorThemeContext"; +import { isColorTheme } from "context/colorThemeContext"; export default function useColorTheme(): [ColorTheme, (colorTheme: ColorTheme) => void] { const [ theme, setTheme ] = useLocalStorageState("theme", { ssr: true, defaultValue: "system" }); diff --git a/src/hooks/useEntitySearch.ts b/src/hooks/useEntitySearch.ts index a54b9ba..7c0f2a4 100644 --- a/src/hooks/useEntitySearch.ts +++ b/src/hooks/useEntitySearch.ts @@ -1,6 +1,7 @@ import { useInfiniteQuery } from "react-query"; -import { SimpleSearchArgs, toSearchArgs } from "lib/client/search"; -import { SearchArgs } from "generated/graphql"; +import type { SimpleSearchArgs } from "lib/client/search"; +import { toSearchArgs } from "lib/client/search"; +import type { SearchArgs } from "generated/graphql"; export default function useEntitySearch( entity: string, diff --git a/src/hooks/useLocalPlaylist.tsx b/src/hooks/useLocalPlaylist.tsx index dbe4347..ed285f6 100644 --- a/src/hooks/useLocalPlaylist.tsx +++ b/src/hooks/useLocalPlaylist.tsx @@ -1,7 +1,8 @@ import useLocalStorageState from "use-local-storage-state"; import { PlaylistAddToast } from "components/toast"; import { useToasts } from "context/toastContext"; -import { FetchThemeSummaryCardData, fetchThemeSummaryCardData } from "components/card/ThemeSummaryCard"; +import type { FetchThemeSummaryCardData } from "components/card/ThemeSummaryCard"; +import { fetchThemeSummaryCardData } from "components/card/ThemeSummaryCard"; interface LocalPlaylistTheme { id: number diff --git a/src/hooks/useSetting.ts b/src/hooks/useSetting.ts index 1055a05..1995d3b 100644 --- a/src/hooks/useSetting.ts +++ b/src/hooks/useSetting.ts @@ -1,5 +1,5 @@ import useLocalStorageState from "use-local-storage-state"; -import { Setting } from "utils/settings"; +import type { Setting } from "utils/settings"; export default function useSetting({ __KEY__: key, __INITIAL_VALUE__: initialValue }: Setting) { const [setting, setSetting] = useLocalStorageState(key, { ssr: true, defaultValue: initialValue }); diff --git a/src/hooks/useWatchHistory.ts b/src/hooks/useWatchHistory.ts index d0722b0..0ae619a 100644 --- a/src/hooks/useWatchHistory.ts +++ b/src/hooks/useWatchHistory.ts @@ -1,5 +1,6 @@ import useLocalStorageState from "use-local-storage-state"; -import { FetchThemeSummaryCardData, fetchThemeSummaryCardData } from "components/card/ThemeSummaryCard"; +import type { FetchThemeSummaryCardData } from "components/card/ThemeSummaryCard"; +import { fetchThemeSummaryCardData } from "components/card/ThemeSummaryCard"; interface WatchHistoryTheme { id: number diff --git a/src/lib/client/index.ts b/src/lib/client/index.ts index 417560c..9d9b4d1 100644 --- a/src/lib/client/index.ts +++ b/src/lib/client/index.ts @@ -1,5 +1,5 @@ -import { ASTNode } from "graphql"; -import { ApiExecutionResult } from "lib/common"; +import type { ASTNode } from "graphql"; +import type { ApiExecutionResult } from "lib/common"; export async function fetchDataClient( query: string | ASTNode diff --git a/src/lib/client/randomTheme.ts b/src/lib/client/randomTheme.ts index a09c5b2..b93512f 100644 --- a/src/lib/client/randomTheme.ts +++ b/src/lib/client/randomTheme.ts @@ -1,5 +1,5 @@ import { fetchDataClient } from "lib/client/index"; -import { SearchThemeQuery } from "generated/graphql"; +import type { SearchThemeQuery } from "generated/graphql"; import gql from "graphql-tag"; import { ThemeSummaryCard } from "components/card"; diff --git a/src/lib/client/search.ts b/src/lib/client/search.ts index dbd8e2a..076936f 100644 --- a/src/lib/client/search.ts +++ b/src/lib/client/search.ts @@ -1,6 +1,6 @@ import { apiResolver, fetchJson } from "lib/common/animethemes/api"; import gql from "graphql-tag"; -import { SearchArgs } from "generated/graphql"; +import type { SearchArgs } from "generated/graphql"; export interface SimpleSearchArgs { query?: string | null diff --git a/src/lib/common/animethemes/api.ts b/src/lib/common/animethemes/api.ts index b0fe91f..b12d137 100644 --- a/src/lib/common/animethemes/api.ts +++ b/src/lib/common/animethemes/api.ts @@ -1,9 +1,10 @@ import pLimit from "p-limit"; -import { parseResolveInfo, ResolveTree } from "graphql-parse-resolve-info"; +import type { ResolveTree } from "graphql-parse-resolve-info"; +import { parseResolveInfo } from "graphql-parse-resolve-info"; import devLog from "utils/devLog"; import { CLIENT_API_URL, SERVER_API_KEY, SERVER_API_URL } from "utils/config"; -import { GraphQLFieldResolver, GraphQLOutputType, GraphQLResolveInfo } from "graphql"; -import { Path } from "graphql/jsutils/Path"; +import type { GraphQLFieldResolver, GraphQLOutputType, GraphQLResolveInfo } from "graphql"; +import type { Path } from "graphql/jsutils/Path"; const limit = pLimit(5); diff --git a/src/lib/common/animethemes/resolvers.ts b/src/lib/common/animethemes/resolvers.ts index 0360064..aa026fb 100644 --- a/src/lib/common/animethemes/resolvers.ts +++ b/src/lib/common/animethemes/resolvers.ts @@ -1,5 +1,5 @@ import { apiResolver, INCLUDES } from "./api"; -import { IResolvers } from "@graphql-tools/utils"; +import type { IResolvers } from "@graphql-tools/utils"; const resolvers: IResolvers = { Query: { diff --git a/src/lib/common/index.ts b/src/lib/common/index.ts index 26575dd..db01fc6 100644 --- a/src/lib/common/index.ts +++ b/src/lib/common/index.ts @@ -1,4 +1,5 @@ -import { ASTNode, graphql, GraphQLSchema, print } from "graphql"; +import type { ASTNode, GraphQLSchema } from "graphql"; +import { graphql, print } from "graphql"; export interface ApiExecutionResult { data: T diff --git a/src/pages/_app.tsx b/src/pages/_app.tsx index 733ba74..47464ee 100644 --- a/src/pages/_app.tsx +++ b/src/pages/_app.tsx @@ -9,7 +9,8 @@ import ColorThemeContext from "context/colorThemeContext"; import useColorTheme from "hooks/useColorTheme"; import { VideoPlayer } from "components/video-player"; import PlayerContext from "context/playerContext"; -import { ComponentType, ReactNode, useEffect, useState } from "react"; +import type { ComponentType, ReactNode } from "react"; +import { useEffect, useState } from "react"; import { QueryClient, QueryClientProvider } from "react-query"; import Head from "next/head"; import withBasePath from "utils/withBasePath"; @@ -28,7 +29,8 @@ import { ExternalLink } from "components/external-link"; import "@fortawesome/fontawesome-svg-core/styles.css"; import "styles/prism.scss"; -import { AppProps } from "next/app"; +import type { AppProps } from "next/app"; +import { LazyMotion } from "framer-motion"; config.autoAddCss = false; @@ -104,6 +106,7 @@ export default function MyApp({ Component, pageProps }: AppProps) { id: "announcement", content: } ] }), + stackContext(LazyMotion, { features: () => import("utils/motionFeatures").then(res => res.default) }), stackContext(ErrorBoundary, {}), ]}> diff --git a/src/pages/_document.tsx b/src/pages/_document.tsx index 9713604..be36b56 100644 --- a/src/pages/_document.tsx +++ b/src/pages/_document.tsx @@ -1,4 +1,5 @@ -import Document, { DocumentContext, Head, Html, Main, NextScript } from "next/document"; +import type { DocumentContext } from "next/document"; +import Document, { Head, Html, Main, NextScript } from "next/document"; import { ServerStyleSheet } from "styled-components"; const ThemeInjection = () => { diff --git a/src/pages/anime/[animeSlug]/[videoSlug]/index.tsx b/src/pages/anime/[animeSlug]/[videoSlug]/index.tsx index bf37e4e..57839dd 100644 --- a/src/pages/anime/[animeSlug]/[videoSlug]/index.tsx +++ b/src/pages/anime/[animeSlug]/[videoSlug]/index.tsx @@ -15,17 +15,18 @@ import styled from "styled-components"; import theme from "theme"; import createVideoSlug from "utils/createVideoSlug"; import fetchStaticPaths from "utils/fetchStaticPaths"; -import getSharedPageProps, { SharedPageProps } from "utils/getSharedPageProps"; +import type { SharedPageProps } from "utils/getSharedPageProps"; +import getSharedPageProps from "utils/getSharedPageProps"; import { Menu } from "components/menu"; import { useToasts } from "context/toastContext"; import { Toast } from "components/toast"; import { ThemeEntryTags, VideoTags } from "components/tag"; import { VIDEO_URL } from "utils/config"; -import { VideoPageAllQuery, VideoPageQuery, VideoPageQueryVariables } from "generated/graphql"; -import { GetStaticPaths, GetStaticProps } from "next"; +import type { VideoPageAllQuery, VideoPageQuery, VideoPageQueryVariables } from "generated/graphql"; +import type { GetStaticPaths, GetStaticProps } from "next"; import { fetchData } from "lib/server"; import gql from "graphql-tag"; -import { RequiredNonNullable } from "utils/types"; +import type { RequiredNonNullable } from "utils/types"; import { Switcher } from "components/switcher"; import useSetting from "hooks/useSetting"; import { AudioMode } from "utils/settings"; diff --git a/src/pages/anime/[animeSlug]/index.tsx b/src/pages/anime/[animeSlug]/index.tsx index 3b6c845..18d4b65 100644 --- a/src/pages/anime/[animeSlug]/index.tsx +++ b/src/pages/anime/[animeSlug]/index.tsx @@ -20,13 +20,14 @@ import { studioNameComparator } from "utils/comparators"; import fetchStaticPaths from "utils/fetchStaticPaths"; -import getSharedPageProps, { SharedPageProps } from "utils/getSharedPageProps"; -import { GetStaticPaths, GetStaticProps } from "next"; -import { ParsedUrlQuery } from "querystring"; +import type { SharedPageProps } from "utils/getSharedPageProps"; +import getSharedPageProps from "utils/getSharedPageProps"; +import type { GetStaticPaths, GetStaticProps } from "next"; +import type { ParsedUrlQuery } from "querystring"; import { fetchData } from "lib/server"; import gql from "graphql-tag"; -import { AnimeDetailPageAllQuery, AnimeDetailPageQuery, AnimeDetailPageQueryVariables } from "generated/graphql"; -import { RequiredNonNullable } from "utils/types"; +import type { AnimeDetailPageAllQuery, AnimeDetailPageQuery, AnimeDetailPageQueryVariables } from "generated/graphql"; +import type { RequiredNonNullable } from "utils/types"; const StyledList = styled.div` display: flex; diff --git a/src/pages/anime/index.tsx b/src/pages/anime/index.tsx index d6798d6..346d7a0 100644 --- a/src/pages/anime/index.tsx +++ b/src/pages/anime/index.tsx @@ -2,11 +2,12 @@ import React from "react"; import Link from "next/link"; import { Text } from "components/text"; import { AlphabeticalIndex } from "components/index"; -import getSharedPageProps, { SharedPageProps } from "utils/getSharedPageProps"; -import { GetStaticProps } from "next"; +import type { SharedPageProps } from "utils/getSharedPageProps"; +import getSharedPageProps from "utils/getSharedPageProps"; +import type { GetStaticProps } from "next"; import { fetchData } from "lib/server"; import gql from "graphql-tag"; -import { AnimeIndexPageQuery } from "generated/graphql"; +import type { AnimeIndexPageQuery } from "generated/graphql"; interface AnimeIndexPageProps extends SharedPageProps, AnimeIndexPageQuery {} diff --git a/src/pages/api/revalidate.ts b/src/pages/api/revalidate.ts index d2b15fa..311b975 100644 --- a/src/pages/api/revalidate.ts +++ b/src/pages/api/revalidate.ts @@ -2,8 +2,8 @@ import { fetchData } from "lib/server"; import gql from "graphql-tag"; import createVideoSlug from "utils/createVideoSlug"; import { BASE_PATH, REVALIDATE_TOKEN } from "utils/config"; -import { NextApiRequest, NextApiResponse } from "next"; -import { RevalidateAnimeQuery } from "generated/graphql"; +import type { NextApiRequest, NextApiResponse } from "next"; +import type { RevalidateAnimeQuery } from "generated/graphql"; interface RevalidateQuery { secret?: string diff --git a/src/pages/artist/[artistSlug]/index.tsx b/src/pages/artist/[artistSlug]/index.tsx index a514d54..b204669 100644 --- a/src/pages/artist/[artistSlug]/index.tsx +++ b/src/pages/artist/[artistSlug]/index.tsx @@ -31,10 +31,10 @@ import extractImages from "utils/extractImages"; import gql from "graphql-tag"; import fetchStaticPaths from "utils/fetchStaticPaths"; import getSharedPageProps from "utils/getSharedPageProps"; -import { GetStaticPaths, GetStaticProps } from "next"; -import { ArtistDetailPageAllQuery, ArtistDetailPageQuery, ArtistDetailPageQueryVariables } from "generated/graphql"; -import { ParsedUrlQuery } from "querystring"; -import { RequiredNonNullable } from "utils/types"; +import type { GetStaticPaths, GetStaticProps } from "next"; +import type { ArtistDetailPageAllQuery, ArtistDetailPageQuery, ArtistDetailPageQueryVariables } from "generated/graphql"; +import type { ParsedUrlQuery } from "querystring"; +import type { RequiredNonNullable } from "utils/types"; const StyledList = styled.div` display: flex; diff --git a/src/pages/artist/index.tsx b/src/pages/artist/index.tsx index c43abc3..868f505 100644 --- a/src/pages/artist/index.tsx +++ b/src/pages/artist/index.tsx @@ -2,11 +2,12 @@ import React from "react"; import Link from "next/link"; import { Text } from "components/text"; import { AlphabeticalIndex } from "components/index"; -import getSharedPageProps, { SharedPageProps } from "utils/getSharedPageProps"; -import { GetStaticProps } from "next"; +import type { SharedPageProps } from "utils/getSharedPageProps"; +import getSharedPageProps from "utils/getSharedPageProps"; +import type { GetStaticProps } from "next"; import { fetchData } from "lib/server"; import gql from "graphql-tag"; -import { ArtistIndexPageQuery } from "generated/graphql"; +import type { ArtistIndexPageQuery } from "generated/graphql"; interface ArtistIndexPageProps extends SharedPageProps, ArtistIndexPageQuery {} diff --git a/src/pages/design.tsx b/src/pages/design.tsx index db5bcbc..62a454e 100644 --- a/src/pages/design.tsx +++ b/src/pages/design.tsx @@ -35,11 +35,11 @@ import { Input } from "components/input"; import gql from "graphql-tag"; import getSharedPageProps from "utils/getSharedPageProps"; import { Highlight } from "components/utils/Highlight"; -import { DesignPageQuery } from "generated/graphql"; -import { GetStaticProps } from "next"; +import type { DesignPageQuery } from "generated/graphql"; +import type { GetStaticProps } from "next"; import { SwitcherOption, SwitcherReset } from "components/switcher/Switcher"; -import { RequiredNonNullable } from "utils/types"; -import { Colors } from "theme/colors"; +import type { RequiredNonNullable } from "utils/types"; +import type { Colors } from "theme/colors"; const ColorGrid = styled.div` display: grid; @@ -185,8 +185,8 @@ export default function DesignPage({ demoData }: DesignPageProps) { {``} - {``} - + {``} + Tag diff --git a/src/pages/dev.tsx b/src/pages/dev.tsx index 04df98a..71b3ffa 100644 --- a/src/pages/dev.tsx +++ b/src/pages/dev.tsx @@ -1,4 +1,5 @@ -import React, { ReactNode } from "react"; +import type { ReactNode } from "react"; +import React from "react"; import Link from "next/link"; import { Text } from "components/text"; import styled from "styled-components"; diff --git a/src/pages/event/[bracketSlug]/index.tsx b/src/pages/event/[bracketSlug]/index.tsx index 5b25760..fe95877 100644 --- a/src/pages/event/[bracketSlug]/index.tsx +++ b/src/pages/event/[bracketSlug]/index.tsx @@ -7,16 +7,17 @@ import theme from "theme"; import { useState } from "react"; import { Switcher } from "components/switcher"; import { fetchData } from "lib/server"; -import getSharedPageProps, { SharedPageProps } from "utils/getSharedPageProps"; +import type { SharedPageProps } from "utils/getSharedPageProps"; +import getSharedPageProps from "utils/getSharedPageProps"; import fetchStaticPaths from "utils/fetchStaticPaths"; import gql from "graphql-tag"; import { CornerIcon } from "components/icon/CornerIcon"; import { BracketThemeSummaryCard } from "components/bracket/BracketThemeSummaryCard"; import { BracketChart } from "components/bracket/BracketChart"; -import { RequiredNonNullable } from "utils/types"; -import { BracketPageAllQuery, BracketPageQuery, BracketPageQueryVariables } from "generated/graphql"; -import { ParsedUrlQuery } from "querystring"; -import { GetStaticPaths, GetStaticProps } from "next"; +import type { RequiredNonNullable } from "utils/types"; +import type { BracketPageAllQuery, BracketPageQuery, BracketPageQueryVariables } from "generated/graphql"; +import type { ParsedUrlQuery } from "querystring"; +import type { GetStaticPaths, GetStaticProps } from "next"; import { SwitcherOption } from "components/switcher/Switcher"; const CurrentRound = styled(Solid)` diff --git a/src/pages/event/anime-awards.tsx b/src/pages/event/anime-awards.tsx index 00fb5cc..7fc189b 100644 --- a/src/pages/event/anime-awards.tsx +++ b/src/pages/event/anime-awards.tsx @@ -1,4 +1,5 @@ -import { ComponentPropsWithoutRef, Fragment, useState } from "react"; +import type { ComponentPropsWithoutRef } from "react"; +import { Fragment, useState } from "react"; import event from "lib/server/animeawards/index.json"; import { fetchData } from "lib/server"; import { SEO } from "components/seo"; @@ -13,12 +14,12 @@ import Link from "next/link"; import { SongTitleWithArtists } from "components/utils"; import { Icon } from "components/icon"; import { faAward, faHashtag, faUsers } from "@fortawesome/pro-solid-svg-icons"; -import { motion } from "framer-motion"; +import { m } from "framer-motion"; import getSharedPageProps from "utils/getSharedPageProps"; -import { GetStaticProps } from "next"; +import type { GetStaticProps } from "next"; import gql from "graphql-tag"; -import { AwardPageThemeQuery } from "generated/graphql"; -import { Comparator } from "utils/types"; +import type { AwardPageThemeQuery } from "generated/graphql"; +import type { Comparator } from "utils/types"; import { SwitcherOption, SwitcherReset } from "components/switcher/Switcher"; import { CornerIcon } from "components/icon/CornerIcon"; @@ -109,7 +110,7 @@ export default function AnimeAwardsPage({ awards }: AnimeAwardsPage) { {(typeFilter === null || typeFilter === "op") && ( [...award.nominees.openings].sort(sortFn).map((nominee, rank) => ( - - + )) )} {(typeFilter === null || typeFilter === "ed") && ( [...award.nominees.endings].sort(sortFn).map((nominee, rank) => ( - - + )) )} diff --git a/src/pages/event/index.tsx b/src/pages/event/index.tsx index a9557b8..11a9ad6 100644 --- a/src/pages/event/index.tsx +++ b/src/pages/event/index.tsx @@ -10,7 +10,7 @@ import { Icon } from "components/icon"; import theme from "theme"; import getSharedPageProps from "utils/getSharedPageProps"; import gql from "graphql-tag"; -import { EventPageQuery } from "generated/graphql"; +import type { EventPageQuery } from "generated/graphql"; const BigButton = styled(Button)` overflow: hidden; diff --git a/src/pages/index.tsx b/src/pages/index.tsx index 2184903..86cb7bc 100644 --- a/src/pages/index.tsx +++ b/src/pages/index.tsx @@ -19,12 +19,12 @@ import { fetchDataClient } from "lib/client"; import getSharedPageProps from "utils/getSharedPageProps"; import { range } from "lodash-es"; import { Skeleton } from "components/skeleton"; -import { +import type { HomePageQuery, RecentlyAddedQuery, ThemeSummaryCardThemeFragment } from "generated/graphql"; -import { GetStaticProps } from "next"; +import type { GetStaticProps } from "next"; const BigButton = styled(Button)` justify-content: flex-end; @@ -145,7 +145,7 @@ export default function HomePage({ featuredTheme }: HomePageProps) { - + Search diff --git a/src/pages/profile/gallery/index.tsx b/src/pages/profile/gallery/index.tsx index f56f91d..dc2c751 100644 --- a/src/pages/profile/gallery/index.tsx +++ b/src/pages/profile/gallery/index.tsx @@ -3,10 +3,11 @@ import styled from "styled-components"; import { Button } from "components/button"; import { useState } from "react"; import { SEO } from "components/seo"; -import getSharedPageProps, { SharedPageProps } from "utils/getSharedPageProps"; -import { GetStaticProps } from "next"; +import type { SharedPageProps } from "utils/getSharedPageProps"; +import getSharedPageProps from "utils/getSharedPageProps"; +import type { GetStaticProps } from "next"; import { fetchData } from "lib/server"; -import { GalleryPageQuery } from "generated/graphql"; +import type { GalleryPageQuery } from "generated/graphql"; import gql from "graphql-tag"; const StyledGrid = styled.div` diff --git a/src/pages/profile/index.tsx b/src/pages/profile/index.tsx index 9549d38..27a3025 100644 --- a/src/pages/profile/index.tsx +++ b/src/pages/profile/index.tsx @@ -5,7 +5,8 @@ import { Text } from "components/text"; import { SummaryCard, ThemeSummaryCard } from "components/card"; import { IconTextButton } from "components/button"; import { faKey, faTrash } from "@fortawesome/pro-solid-svg-icons"; -import useWatchHistory, { WatchHistory } from "hooks/useWatchHistory"; +import type { WatchHistory } from "hooks/useWatchHistory"; +import useWatchHistory from "hooks/useWatchHistory"; import useLocalPlaylist from "hooks/useLocalPlaylist"; import theme from "theme"; import { SearchFilter, SearchFilterGroup } from "components/search-filter"; diff --git a/src/pages/search/[entity]/index.tsx b/src/pages/search/[entity]/index.tsx index 98172e8..c7d5acd 100644 --- a/src/pages/search/[entity]/index.tsx +++ b/src/pages/search/[entity]/index.tsx @@ -2,8 +2,8 @@ import { SearchAnime, SearchArtist, SearchSeries, SearchStudio, SearchTheme } fr import { useRouter } from "next/router"; import { SEO } from "components/seo"; import { capitalize } from "lodash-es"; -import { GetStaticPaths, GetStaticProps } from "next"; -import { ParsedUrlQuery } from "querystring"; +import type { GetStaticPaths, GetStaticProps } from "next"; +import type { ParsedUrlQuery } from "querystring"; const SEARCH_ENTITIES = [ "anime", "theme", "artist", "series", "studio" ] as const; diff --git a/src/pages/series/[seriesSlug]/index.tsx b/src/pages/series/[seriesSlug]/index.tsx index 7e48eef..37803e2 100644 --- a/src/pages/series/[seriesSlug]/index.tsx +++ b/src/pages/series/[seriesSlug]/index.tsx @@ -16,10 +16,10 @@ import { MultiCoverImage } from "components/image"; import gql from "graphql-tag"; import fetchStaticPaths from "utils/fetchStaticPaths"; import getSharedPageProps from "utils/getSharedPageProps"; -import { GetStaticPaths, GetStaticProps } from "next"; -import { RequiredNonNullable } from "utils/types"; -import { SeriesDetailPageAllQuery, SeriesDetailPageQuery, SeriesDetailPageQueryVariables } from "generated/graphql"; -import { ParsedUrlQuery } from "querystring"; +import type { GetStaticPaths, GetStaticProps } from "next"; +import type { RequiredNonNullable } from "utils/types"; +import type { SeriesDetailPageAllQuery, SeriesDetailPageQuery, SeriesDetailPageQueryVariables } from "generated/graphql"; +import type { ParsedUrlQuery } from "querystring"; const StyledDesktopOnly = styled.div` gap: 24px; diff --git a/src/pages/series/index.tsx b/src/pages/series/index.tsx index d18a5de..a248451 100644 --- a/src/pages/series/index.tsx +++ b/src/pages/series/index.tsx @@ -2,11 +2,12 @@ import React from "react"; import Link from "next/link"; import { Text } from "components/text"; import { AlphabeticalIndex } from "components/index"; -import getSharedPageProps, { SharedPageProps } from "utils/getSharedPageProps"; -import { GetStaticProps } from "next"; +import type { SharedPageProps } from "utils/getSharedPageProps"; +import getSharedPageProps from "utils/getSharedPageProps"; +import type { GetStaticProps } from "next"; import { fetchData } from "lib/server"; import gql from "graphql-tag"; -import { SeriesIndexPageQuery } from "generated/graphql"; +import type { SeriesIndexPageQuery } from "generated/graphql"; interface SeriesIndexPageProps extends SharedPageProps, SeriesIndexPageQuery {} diff --git a/src/pages/studio/[studioSlug]/index.tsx b/src/pages/studio/[studioSlug]/index.tsx index 6f9b083..f6e6397 100644 --- a/src/pages/studio/[studioSlug]/index.tsx +++ b/src/pages/studio/[studioSlug]/index.tsx @@ -26,10 +26,10 @@ import theme from "theme"; import gql from "graphql-tag"; import fetchStaticPaths from "utils/fetchStaticPaths"; import getSharedPageProps from "utils/getSharedPageProps"; -import { GetStaticPaths, GetStaticProps } from "next"; -import { RequiredNonNullable } from "utils/types"; -import { StudioDetailPageAllQuery, StudioDetailPageQuery, StudioDetailPageQueryVariables } from "generated/graphql"; -import { ParsedUrlQuery } from "querystring"; +import type { GetStaticPaths, GetStaticProps } from "next"; +import type { RequiredNonNullable } from "utils/types"; +import type { StudioDetailPageAllQuery, StudioDetailPageQuery, StudioDetailPageQueryVariables } from "generated/graphql"; +import type { ParsedUrlQuery } from "querystring"; import extractImages from "utils/extractImages"; import { StudioCoverImage } from "components/image/StudioCoverImage"; diff --git a/src/pages/studio/index.tsx b/src/pages/studio/index.tsx index a2e7a9f..7d79079 100644 --- a/src/pages/studio/index.tsx +++ b/src/pages/studio/index.tsx @@ -2,11 +2,12 @@ import React from "react"; import Link from "next/link"; import { Text } from "components/text"; import { AlphabeticalIndex } from "components/index"; -import getSharedPageProps, { SharedPageProps } from "utils/getSharedPageProps"; -import { GetStaticProps } from "next"; +import type { SharedPageProps } from "utils/getSharedPageProps"; +import getSharedPageProps from "utils/getSharedPageProps"; +import type { GetStaticProps } from "next"; import { fetchData } from "lib/server"; import gql from "graphql-tag"; -import { StudioIndexPageQuery } from "generated/graphql"; +import type { StudioIndexPageQuery } from "generated/graphql"; interface StudioIndexPageProps extends SharedPageProps, StudioIndexPageQuery {} diff --git a/src/pages/wiki/[...pageSlug]/index.tsx b/src/pages/wiki/[...pageSlug]/index.tsx index aaa1e64..74a6a09 100644 --- a/src/pages/wiki/[...pageSlug]/index.tsx +++ b/src/pages/wiki/[...pageSlug]/index.tsx @@ -1,22 +1,25 @@ import { fetchData } from "lib/server"; -import markdownToHtml, { Heading, Markdown } from "utils/markdownToHtml"; +import type { Heading, Markdown } from "utils/markdownToHtml"; +import markdownToHtml from "utils/markdownToHtml"; import { unified } from "unified"; import rehypeReact from "rehype-react"; import { Text } from "components/text"; -import { ComponentPropsWithoutRef, createElement, Fragment, useEffect, useState } from "react"; +import type { ComponentPropsWithoutRef } from "react"; +import { createElement, Fragment, useEffect, useState } from "react"; import rehypeParse from "rehype-parse"; import styled from "styled-components"; -import { motion } from "framer-motion"; +import { m } from "framer-motion"; import theme from "theme"; import { SEO } from "components/seo"; import fetchStaticPaths from "utils/fetchStaticPaths"; import gql from "graphql-tag"; -import getSharedPageProps, { SharedPageProps } from "utils/getSharedPageProps"; -import { GetStaticPaths, GetStaticProps } from "next"; -import { ParsedUrlQuery } from "querystring"; -import { DocumentPageAllQuery, DocumentPageQuery, DocumentPageQueryVariables } from "generated/graphql"; +import type { SharedPageProps } from "utils/getSharedPageProps"; +import getSharedPageProps from "utils/getSharedPageProps"; +import type { GetStaticPaths, GetStaticProps } from "next"; +import type { ParsedUrlQuery } from "querystring"; +import type { DocumentPageAllQuery, DocumentPageQuery, DocumentPageQueryVariables } from "generated/graphql"; import { TextLink } from "components/text/TextLink"; -import { RequiredNonNullable } from "utils/types"; +import type { RequiredNonNullable } from "utils/types"; const StyledGrid = styled.div` display: flex; @@ -156,7 +159,7 @@ const StyledTableOfContentsHeading = styled.li<{ $depth: number }>` font-size: ${(props) => props.$depth === 3 && "0.9rem"}; `; -const StyledDot = styled(motion.div)` +const StyledDot = styled(m.div)` position: absolute; left: -16px; width: 4px; diff --git a/src/pages/wiki/index.tsx b/src/pages/wiki/index.tsx index 0fe6a5b..d518446 100644 --- a/src/pages/wiki/index.tsx +++ b/src/pages/wiki/index.tsx @@ -1,10 +1,11 @@ import { fetchData } from "lib/server"; import { SEO } from "components/seo"; import { Text } from "components/text"; -import getSharedPageProps, { SharedPageProps } from "utils/getSharedPageProps"; -import { GetStaticProps } from "next"; +import type { SharedPageProps } from "utils/getSharedPageProps"; +import getSharedPageProps from "utils/getSharedPageProps"; +import type { GetStaticProps } from "next"; import gql from "graphql-tag"; -import { DocumentIndexPageQuery } from "generated/graphql"; +import type { DocumentIndexPageQuery } from "generated/graphql"; import { TextLink } from "components/text/TextLink"; import { AlphabeticalIndex } from "components/index"; diff --git a/src/pages/year/[year]/[season]/index.tsx b/src/pages/year/[year]/[season]/index.tsx index afa84d9..5b05146 100644 --- a/src/pages/year/[year]/[season]/index.tsx +++ b/src/pages/year/[year]/[season]/index.tsx @@ -5,11 +5,12 @@ import { fetchData } from "lib/server"; import { SEO } from "components/seo"; import gql from "graphql-tag"; import fetchStaticPaths from "utils/fetchStaticPaths"; -import getSharedPageProps, { SharedPageProps } from "utils/getSharedPageProps"; -import { GetStaticPaths, GetStaticProps } from "next"; -import { SeasonDetailPageAllQuery, SeasonDetailPageQuery, SeasonDetailPageQueryVariables } from "generated/graphql"; -import { ParsedUrlQuery } from "querystring"; -import { RequiredNonNullable } from "utils/types"; +import type { SharedPageProps } from "utils/getSharedPageProps"; +import getSharedPageProps from "utils/getSharedPageProps"; +import type { GetStaticPaths, GetStaticProps } from "next"; +import type { SeasonDetailPageAllQuery, SeasonDetailPageQuery, SeasonDetailPageQueryVariables } from "generated/graphql"; +import type { ParsedUrlQuery } from "querystring"; +import type { RequiredNonNullable } from "utils/types"; import { capitalize } from "lodash-es"; const seasonOrder = [ "Winter", "Spring", "Summer", "Fall" ]; diff --git a/src/pages/year/[year]/index.tsx b/src/pages/year/[year]/index.tsx index a11181f..f2e7258 100644 --- a/src/pages/year/[year]/index.tsx +++ b/src/pages/year/[year]/index.tsx @@ -10,11 +10,12 @@ import { SEO } from "components/seo"; import gql from "graphql-tag"; import { ANIME_A_Z, getComparator } from "utils/comparators"; import fetchStaticPaths from "utils/fetchStaticPaths"; -import getSharedPageProps, { SharedPageProps } from "utils/getSharedPageProps"; -import { ParsedUrlQuery } from "querystring"; -import { GetStaticPaths, GetStaticProps } from "next"; -import { YearDetailPageAllQuery, YearDetailPageQuery, YearDetailPageQueryVariables } from "generated/graphql"; -import { RequiredNonNullable } from "utils/types"; +import type { SharedPageProps } from "utils/getSharedPageProps"; +import getSharedPageProps from "utils/getSharedPageProps"; +import type { ParsedUrlQuery } from "querystring"; +import type { GetStaticPaths, GetStaticProps } from "next"; +import type { YearDetailPageAllQuery, YearDetailPageQuery, YearDetailPageQueryVariables } from "generated/graphql"; +import type { RequiredNonNullable } from "utils/types"; const seasonOrder = [ "Winter", "Spring", "Summer", "Fall" ]; diff --git a/src/pages/year/index.tsx b/src/pages/year/index.tsx index 6774610..c06ed47 100644 --- a/src/pages/year/index.tsx +++ b/src/pages/year/index.tsx @@ -1,10 +1,11 @@ import styled from "styled-components"; import { fetchData } from "lib/server"; import { SEO } from "components/seo"; -import getSharedPageProps, { SharedPageProps } from "utils/getSharedPageProps"; +import type { SharedPageProps } from "utils/getSharedPageProps"; +import getSharedPageProps from "utils/getSharedPageProps"; import gql from "graphql-tag"; -import { YearIndexPageQuery } from "generated/graphql"; -import { GetStaticProps } from "next"; +import type { YearIndexPageQuery } from "generated/graphql"; +import type { GetStaticProps } from "next"; import { TextLink } from "components/text/TextLink"; import { Text } from "components/text"; import { Card } from "components/card"; diff --git a/src/styles/mixins.ts b/src/styles/mixins.ts index b9bd576..8d6e7cd 100644 --- a/src/styles/mixins.ts +++ b/src/styles/mixins.ts @@ -1,4 +1,5 @@ -import { css, Interpolation, keyframes, ThemedStyledProps } from "styled-components"; +import type { Interpolation, ThemedStyledProps } from "styled-components"; +import { css, keyframes } from "styled-components"; const loadingAnimationKeyframes = keyframes` 50% { diff --git a/src/theme/colors/dark.ts b/src/theme/colors/dark.ts index 527098c..6bcf2a3 100644 --- a/src/theme/colors/dark.ts +++ b/src/theme/colors/dark.ts @@ -1,4 +1,5 @@ -import { Colors, colors, Shadows } from "./index"; +import type { Colors, Shadows } from "./index"; +import { colors } from "./index"; export const darkColors: Colors = { ...colors, diff --git a/src/theme/index.ts b/src/theme/index.ts index daf9428..7e4df90 100644 --- a/src/theme/index.ts +++ b/src/theme/index.ts @@ -1,4 +1,5 @@ -import { Colors, colors, Shadows, shadows } from "theme/colors"; +import type { Colors, Shadows } from "theme/colors"; +import { colors, shadows } from "theme/colors"; interface Theme { breakpoints: { diff --git a/src/utils/comparators.ts b/src/utils/comparators.ts index bea6307..f018f07 100644 --- a/src/utils/comparators.ts +++ b/src/utils/comparators.ts @@ -1,5 +1,5 @@ -import { Comparator } from "utils/types"; -import { Anime, Entry, Resource, Series, Studio, Theme } from "generated/graphql"; +import type { Comparator } from "utils/types"; +import type { Anime, Entry, Resource, Series, Studio, Theme } from "generated/graphql"; const seasonOrder = [ "winter", diff --git a/src/utils/config.js b/src/utils/config.js index 8309785..a78928b 100644 --- a/src/utils/config.js +++ b/src/utils/config.js @@ -1,4 +1,6 @@ // This file needs to be a .js file, because it's used by next.config.js. +// We can't use ES imports here to we supress the lint rule. +/* eslint-disable @typescript-eslint/no-var-requires */ const { error, warn } = require("next/dist/build/output/log"); const chalk = require("next/dist/lib/chalk").default; diff --git a/src/utils/createVideoSlug.ts b/src/utils/createVideoSlug.ts index 1b4b6f1..2bc358c 100644 --- a/src/utils/createVideoSlug.ts +++ b/src/utils/createVideoSlug.ts @@ -1,6 +1,6 @@ import gql from "graphql-tag"; -import { ASTNode } from "graphql"; -import { +import type { ASTNode } from "graphql"; +import type { CreateVideoSlugEntryFragment, CreateVideoSlugThemeFragment, CreateVideoSlugVideoFragment diff --git a/src/utils/extractBackgroundColor.ts b/src/utils/extractBackgroundColor.ts index f2e0f48..4964698 100644 --- a/src/utils/extractBackgroundColor.ts +++ b/src/utils/extractBackgroundColor.ts @@ -1,4 +1,4 @@ -import { Property } from "csstype"; +import type { Property } from "csstype"; export default function extractBackgroundColor(image: HTMLImageElement): Property.Background | void { try { diff --git a/src/utils/extractImages.ts b/src/utils/extractImages.ts index 1b6ed07..a56e0c5 100644 --- a/src/utils/extractImages.ts +++ b/src/utils/extractImages.ts @@ -1,6 +1,6 @@ import gql from "graphql-tag"; -import { ASTNode } from "graphql"; -import { ExtractImagesResourceWithImagesFragment } from "generated/graphql"; +import type { ASTNode } from "graphql"; +import type { ExtractImagesResourceWithImagesFragment } from "generated/graphql"; interface ExtractImages { (resourcesWithImages?: ExtractImagesResourceWithImagesFragment | null): ExtractImagesResult diff --git a/src/utils/fetchStaticPaths.ts b/src/utils/fetchStaticPaths.ts index 3862d81..d99c6e1 100644 --- a/src/utils/fetchStaticPaths.ts +++ b/src/utils/fetchStaticPaths.ts @@ -1,5 +1,5 @@ import { STAGING } from "utils/config"; -import { ParsedUrlQuery } from "querystring"; +import type { ParsedUrlQuery } from "querystring"; export default async function fetchStaticPaths( fetchPaths: () => Promise>, diff --git a/src/utils/motionFeatures.ts b/src/utils/motionFeatures.ts new file mode 100644 index 0000000..dee70d5 --- /dev/null +++ b/src/utils/motionFeatures.ts @@ -0,0 +1,3 @@ +import { domMax } from "framer-motion"; + +export default domMax;