From bbcff2d09cdec1c52a30c82ff621f118c33bf934 Mon Sep 17 00:00:00 2001 From: avivkeller Date: Thu, 8 May 2025 16:44:15 -0400 Subject: [PATCH 1/3] chore: use subpath imports instead of path aliases --- COLLABORATOR_GUIDE.md | 2 +- apps/site/app/[locale]/[...path]/page.tsx | 8 +++--- apps/site/app/[locale]/error.tsx | 4 +-- apps/site/app/[locale]/feed/[feed]/route.ts | 6 ++--- apps/site/app/[locale]/layout.tsx | 12 ++++----- .../app/[locale]/next-data/api-data/route.ts | 12 ++++----- .../blog-data/[category]/[page]/route.ts | 6 ++--- .../next-data/download-snippets/route.tsx | 4 +-- .../next-data/og/[category]/[title]/route.tsx | 6 ++--- .../app/[locale]/next-data/page-data/route.ts | 6 ++--- .../[locale]/next-data/release-data/route.ts | 4 +-- apps/site/app/[locale]/not-found.tsx | 4 +-- apps/site/app/[locale]/page.tsx | 16 ++++++------ apps/site/app/global-error.tsx | 6 ++--- apps/site/app/sitemap.ts | 6 ++--- apps/site/client-context.ts | 4 +-- .../Blog/BlogHeader/__tests__/index.test.jsx | 2 +- .../site/components/Blog/BlogHeader/index.tsx | 4 +-- .../BlogPostCard/__tests__/index.test.jsx | 2 +- .../components/Blog/BlogPostCard/index.tsx | 10 ++++---- apps/site/components/Common/Button.tsx | 2 +- apps/site/components/Common/CodeBox.tsx | 4 +-- apps/site/components/Common/CrossLink.tsx | 2 +- apps/site/components/Common/FormattedTime.tsx | 2 +- apps/site/components/Common/LinkTabs.tsx | 4 +-- apps/site/components/Common/Pagination.tsx | 2 +- apps/site/components/Common/Search/index.tsx | 4 +-- .../Downloads/DownloadButton/index.tsx | 10 ++++---- .../components/Downloads/DownloadLink.tsx | 12 ++++----- .../DownloadReleasesTable/DetailsButton.tsx | 6 ++--- .../Downloads/DownloadReleasesTable/index.tsx | 6 ++--- .../Downloads/MinorReleasesTable/index.tsx | 8 +++--- .../Downloads/Release/BlogPostLink.tsx | 4 +-- .../Downloads/Release/ChangelogLink.tsx | 8 +++--- .../Downloads/Release/DownloadLink.tsx | 6 ++--- .../Release/InstallationMethodDropdown.tsx | 6 ++--- .../Release/OperatingSystemDropdown.tsx | 8 +++--- .../Release/PackageManagerDropdown.tsx | 6 ++--- .../Downloads/Release/PlatformDropdown.tsx | 10 ++++---- .../Release/PrebuiltDownloadButtons.tsx | 8 +++--- .../Downloads/Release/ReleaseCodeBox.tsx | 16 ++++++------ .../Downloads/Release/VersionDropdown.tsx | 2 +- .../Downloads/ReleaseModal/index.tsx | 8 +++--- .../Downloads/ReleaseOverview/index.tsx | 4 +-- apps/site/components/Link.tsx | 2 +- apps/site/components/LinkWithArrow.tsx | 2 +- .../components/MDX/Calendar/Event/index.tsx | 8 +++--- .../MDX/Calendar/UpcomingMeetings.tsx | 12 ++++----- apps/site/components/MDX/Calendar/utils.ts | 2 +- apps/site/components/MDX/CodeBox/index.tsx | 4 +-- apps/site/components/MDX/Image/index.tsx | 2 +- apps/site/components/withAvatarGroup.tsx | 6 ++--- apps/site/components/withBadgeGroup.tsx | 6 ++--- apps/site/components/withBanner.tsx | 6 ++--- apps/site/components/withBlogCategories.tsx | 10 ++++---- apps/site/components/withBlogCrossLinks.tsx | 8 +++--- apps/site/components/withBreadcrumbs.tsx | 8 +++--- apps/site/components/withDownloadSection.tsx | 12 ++++----- apps/site/components/withFooter.tsx | 6 ++--- apps/site/components/withLayout.tsx | 18 ++++++------- apps/site/components/withMetaBar.tsx | 16 ++++++------ apps/site/components/withNavBar.tsx | 14 +++++------ apps/site/components/withNodeRelease.tsx | 4 +-- apps/site/components/withNodejsLogo.tsx | 2 +- .../components/withProgressionSidebar.tsx | 8 +++--- apps/site/components/withSidebar.tsx | 8 +++--- .../site/components/withSidebarCrossLinks.tsx | 6 ++--- .../__tests__/useClientContext.test.jsx | 4 +-- .../__tests__/useCopyToClipboard.test.jsx | 2 +- .../__tests__/useDetectOS.test.mjs | 2 +- .../__tests__/useMediaQuery.test.mjs | 2 +- .../__tests__/useNotification.test.jsx | 4 +-- .../hooks/react-client/useClientContext.ts | 4 +-- apps/site/hooks/react-client/useDetectOS.ts | 6 ++--- .../hooks/react-client/useNavigationState.ts | 4 +-- .../hooks/react-client/useNotification.ts | 2 +- .../hooks/react-generic/useSiteNavigation.ts | 8 ++---- .../hooks/react-server/useClientContext.ts | 2 +- apps/site/i18n.tsx | 2 +- apps/site/layouts/About.tsx | 14 +++++------ apps/site/layouts/ArticlePage.tsx | 8 +++--- apps/site/layouts/Base.tsx | 4 +-- apps/site/layouts/Blog.tsx | 14 +++++------ apps/site/layouts/Default.tsx | 8 +++--- apps/site/layouts/Download.tsx | 8 +++--- apps/site/layouts/GlowingBackdrop.tsx | 4 +-- apps/site/layouts/Learn.tsx | 14 +++++------ apps/site/layouts/Post.tsx | 16 ++++++------ apps/site/middleware.ts | 2 +- apps/site/next-data/blogData.ts | 6 ++--- apps/site/next-data/downloadSnippets.ts | 8 +++--- .../generators/__tests__/releaseData.test.mjs | 2 +- .../__tests__/websiteFeeds.test.mjs | 2 +- apps/site/next-data/providers/blogData.ts | 6 ++--- .../next-data/providers/downloadSnippets.ts | 2 +- apps/site/next-data/providers/releaseData.ts | 2 +- apps/site/next-data/providers/websiteFeeds.ts | 4 +-- apps/site/next-data/releaseData.ts | 6 ++--- apps/site/package.json | 11 ++++++++ .../__tests__/matterProvider.test.jsx | 2 +- .../navigationStateProvider.test.jsx | 2 +- .../__tests__/notificationProvider.test.jsx | 2 +- .../__tests__/releaseProvider.test.jsx | 2 +- .../__tests__/themeProvider.test.jsx | 2 +- apps/site/providers/matterProvider.tsx | 6 ++--- apps/site/providers/releaseModalProvider.tsx | 4 +-- apps/site/providers/releaseProvider.tsx | 6 ++--- apps/site/providers/themeProvider.tsx | 2 +- .../__tests__/releaseReducer.test.mjs | 2 +- apps/site/reducers/releaseReducer.ts | 2 +- apps/site/tsconfig.json | 4 --- apps/site/types/release.ts | 6 ++--- apps/site/types/server.ts | 4 +-- .../__tests__/assignClientContext.test.mjs | 2 +- apps/site/util/__tests__/authorUtils.test.mjs | 2 +- apps/site/util/__tests__/blogUtils.test.mjs | 2 +- apps/site/util/__tests__/dateUtils.test.mjs | 2 +- apps/site/util/__tests__/debounce.test.mjs | 2 +- apps/site/util/__tests__/deepMerge.test.mjs | 2 +- apps/site/util/__tests__/detectOS.test.mjs | 2 +- .../util/__tests__/downloadUtils.test.mjs | 2 +- .../__tests__/getHighEntropyValues.test.mjs | 2 +- .../__tests__/getLanguageDisplayName.test.mjs | 4 +-- .../util/__tests__/getNodeApiLink.test.mjs | 2 +- .../__tests__/getNodeDownloadUrl.test.mjs | 2 +- .../util/__tests__/getUserPlatform.test.mjs | 2 +- apps/site/util/__tests__/gitHubUtils.test.mjs | 2 +- apps/site/util/__tests__/hexToRGBA.test.mjs | 2 +- apps/site/util/__tests__/imageUtils.test.mjs | 2 +- apps/site/util/__tests__/stringUtils.test.mjs | 2 +- apps/site/util/assignClientContext.ts | 2 +- apps/site/util/authorUtils.ts | 8 +++--- apps/site/util/blogUtils.ts | 2 +- apps/site/util/detectOS.ts | 2 +- apps/site/util/downloadUtils.tsx | 6 ++--- apps/site/util/getHighlighter.ts | 2 +- apps/site/util/getLanguageDisplayName.ts | 2 +- apps/site/util/getNodeApiLink.ts | 2 +- apps/site/util/getNodeDownloadUrl.ts | 4 +-- apps/site/util/getUserPlatform.ts | 2 +- package.json | 2 +- packages/i18n/lib/index.mjs | 2 +- packages/i18n/tsconfig.json | 1 - .../Common/AlertBox/index.stories.tsx | 2 +- .../AvatarGroup/Avatar/index.stories.tsx | 2 +- .../Common/AvatarGroup/Avatar/index.tsx | 4 +-- .../AvatarGroup/Overlay/index.stories.tsx | 2 +- .../Common/AvatarGroup/Overlay/index.tsx | 4 +-- .../Common/AvatarGroup/index.stories.tsx | 2 +- .../Common/AvatarGroup/index.tsx | 14 +++++------ .../Common/Badge/index.stories.tsx | 2 +- .../Common/BadgeGroup/index.stories.tsx | 2 +- .../ui-components/Common/BadgeGroup/index.tsx | 6 ++--- .../Common/Banner/index.stories.tsx | 2 +- .../Common/BaseActiveLink/index.tsx | 2 +- .../Common/BaseButton/index.stories.tsx | 2 +- .../ui-components/Common/BaseButton/index.tsx | 4 +-- .../Common/BaseCodeBox/index.stories.tsx | 2 +- .../Common/BaseCodeBox/index.tsx | 6 ++--- .../Common/BaseCrossLink/index.stories.tsx | 2 +- .../Common/BaseCrossLink/index.tsx | 8 +++--- .../Common/BaseLinkTabs/index.stories.tsx | 2 +- .../Common/BaseLinkTabs/index.tsx | 6 ++--- .../BasePagination/Ellipsis/index.stories.tsx | 2 +- .../__tests__/index.test.jsx | 2 +- .../PaginationListItem/index.stories.tsx | 2 +- .../PaginationListItem/index.tsx | 4 +-- .../BasePagination/__tests__/index.test.jsx | 2 +- .../Common/BasePagination/index.stories.tsx | 2 +- .../Common/BasePagination/index.tsx | 7 +++--- .../BasePagination/useGetPageElements.tsx | 10 ++++---- .../Common/Blockquote/index.stories.tsx | 2 +- .../Breadcrumbs/BreadcrumbHomeLink/index.tsx | 4 +-- .../Breadcrumbs/BreadcrumbLink/index.tsx | 4 +-- .../BreadcrumbTruncatedItem/index.tsx | 2 +- .../Common/Breadcrumbs/index.stories.tsx | 2 +- .../Common/Breadcrumbs/index.tsx | 15 +++++------ .../Common/CodeTabs/index.stories.tsx | 4 +-- .../ui-components/Common/CodeTabs/index.tsx | 4 +-- .../Common/GlowingBackdrop/index.stories.tsx | 2 +- .../Common/GlowingBackdrop/index.tsx | 2 +- .../Common/LanguageDropDown/index.stories.tsx | 2 +- .../Common/LanguageDropDown/index.tsx | 4 +-- .../Common/Modal/index.stories.tsx | 2 +- .../Common/NodejsLogo/index.stories.tsx | 2 +- .../ui-components/Common/NodejsLogo/index.tsx | 5 ++-- .../Common/Notification/index.stories.tsx | 2 +- .../Common/Preview/index.stories.tsx | 2 +- .../ui-components/Common/Preview/index.tsx | 7 +++--- .../ProgressionSidebarGroup/index.tsx | 9 +++---- .../ProgressionSidebarItem/index.tsx | 11 +++----- .../ProgressionSidebar/index.stories.tsx | 2 +- .../Common/ProgressionSidebar/index.tsx | 8 +++--- .../Common/Select/index.stories.tsx | 4 +-- .../ui-components/Common/Select/index.tsx | 6 ++--- .../Common/Separator/index.stories.tsx | 2 +- .../Common/Tabs/index.stories.tsx | 2 +- .../Common/ThemeToggle/index.stories.tsx | 2 +- .../Common/Tooltip/index.stories.tsx | 2 +- .../Containers/Footer/index.stories.tsx | 2 +- .../ui-components/Containers/Footer/index.tsx | 10 ++++---- .../Containers/MetaBar/index.stories.tsx | 5 ++-- .../Containers/MetaBar/index.tsx | 4 +-- .../NavBar/NavItem/index.stories.tsx | 2 +- .../Containers/NavBar/NavItem/index.tsx | 6 ++--- .../Containers/NavBar/index.stories.tsx | 2 +- .../ui-components/Containers/NavBar/index.tsx | 9 +++---- .../Sidebar/SidebarGroup/index.stories.tsx | 2 +- .../Containers/Sidebar/SidebarGroup/index.tsx | 9 +++---- .../Sidebar/SidebarItem/index.stories.tsx | 2 +- .../Containers/Sidebar/SidebarItem/index.tsx | 9 +++---- .../Containers/Sidebar/index.stories.tsx | 2 +- .../Containers/Sidebar/index.tsx | 8 +++--- .../Icons/HexagonGrid.stories.tsx | 2 +- .../Icons/InstallationMethod/index.ts | 16 ++++++------ .../ui-components/Icons/Logos/JsWhite.tsx | 2 +- packages/ui-components/Icons/Logos/Nodejs.tsx | 2 +- packages/ui-components/Icons/Logos/index.ts | 14 +++++------ .../Icons/OperatingSystem/index.ts | 8 +++--- .../Icons/PackageManager/index.ts | 6 ++--- packages/ui-components/Icons/Social/index.ts | 14 +++++------ .../__design__/node-logos.stories.tsx | 2 +- .../__design__/platform-logos.stories.tsx | 9 ++----- .../__design__/social-logos.stories.tsx | 2 +- packages/ui-components/package.json | 25 ++++++++++++------- packages/ui-components/tsconfig.json | 2 +- 226 files changed, 565 insertions(+), 577 deletions(-) diff --git a/COLLABORATOR_GUIDE.md b/COLLABORATOR_GUIDE.md index 825783c05da34..6dcd3f49d5de2 100644 --- a/COLLABORATOR_GUIDE.md +++ b/COLLABORATOR_GUIDE.md @@ -356,7 +356,7 @@ To add a new download installation method, follow these steps: } ``` -3. **Update `InstallationMethodLabel` and `InstallationMethod` in `@/types/release.ts`:** +3. **Update `InstallationMethodLabel` and `InstallationMethod` in `apps/site/types/release.ts`:** - Add the new method to the `InstallationMethodLabel` and `InstallationMethod` types. diff --git a/apps/site/app/[locale]/[...path]/page.tsx b/apps/site/app/[locale]/[...path]/page.tsx index 13e6342fd58be..0fc9790eee15a 100644 --- a/apps/site/app/[locale]/[...path]/page.tsx +++ b/apps/site/app/[locale]/[...path]/page.tsx @@ -7,13 +7,13 @@ * dynamic params, which will lead on static export errors and other sort of issues. */ -import * as basePage from '@/app/[locale]/page'; +import * as basePage from '#app/[locale]/page'; import { ENABLE_STATIC_EXPORT_LOCALE, ENABLE_STATIC_EXPORT, -} from '@/next.constants.mjs'; -import { dynamicRouter } from '@/next.dynamic.mjs'; -import { availableLocaleCodes, defaultLocale } from '@/next.locales.mjs'; +} from '#next.constants.mjs'; +import { dynamicRouter } from '#next.dynamic.mjs'; +import { availableLocaleCodes, defaultLocale } from '#next.locales.mjs'; // This is the default Viewport Metadata // @see https://nextjs.org/docs/app/api-reference/functions/generate-viewport#generateviewport-function diff --git a/apps/site/app/[locale]/error.tsx b/apps/site/app/[locale]/error.tsx index 79feae5ccf4c0..afd5d875c2eea 100644 --- a/apps/site/app/[locale]/error.tsx +++ b/apps/site/app/[locale]/error.tsx @@ -4,8 +4,8 @@ import { ArrowRightIcon } from '@heroicons/react/24/solid'; import { useTranslations } from 'next-intl'; import type { FC } from 'react'; -import Button from '@/components/Common/Button'; -import GlowingBackdropLayout from '@/layouts/GlowingBackdrop'; +import Button from '#components/Common/Button'; +import GlowingBackdropLayout from '#layouts/GlowingBackdrop'; const ErrorPage: FC<{ error: Error }> = () => { const t = useTranslations(); diff --git a/apps/site/app/[locale]/feed/[feed]/route.ts b/apps/site/app/[locale]/feed/[feed]/route.ts index d9abcf4dede63..30c50669e669e 100644 --- a/apps/site/app/[locale]/feed/[feed]/route.ts +++ b/apps/site/app/[locale]/feed/[feed]/route.ts @@ -1,8 +1,8 @@ import { NextResponse } from 'next/server'; -import provideWebsiteFeeds from '@/next-data/providers/websiteFeeds'; -import { siteConfig } from '@/next.json.mjs'; -import { defaultLocale } from '@/next.locales.mjs'; +import provideWebsiteFeeds from '#next-data/providers/websiteFeeds'; +import { siteConfig } from '#next.json.mjs'; +import { defaultLocale } from '#next.locales.mjs'; type DynamicStaticPaths = { locale: string; feed: string }; type StaticParams = { params: Promise }; diff --git a/apps/site/app/[locale]/layout.tsx b/apps/site/app/[locale]/layout.tsx index 4b28313a7599b..2002e21a40c2e 100644 --- a/apps/site/app/[locale]/layout.tsx +++ b/apps/site/app/[locale]/layout.tsx @@ -4,13 +4,13 @@ import classNames from 'classnames'; import { NextIntlClientProvider } from 'next-intl'; import type { FC, PropsWithChildren } from 'react'; -import BaseLayout from '@/layouts/Base'; -import { VERCEL_ENV } from '@/next.constants.mjs'; -import { IBM_PLEX_MONO, OPEN_SANS } from '@/next.fonts'; -import { availableLocalesMap, defaultLocale } from '@/next.locales.mjs'; -import { ThemeProvider } from '@/providers/themeProvider'; +import BaseLayout from '#layouts/Base'; +import { VERCEL_ENV } from '#next.constants.mjs'; +import { IBM_PLEX_MONO, OPEN_SANS } from '#next.fonts'; +import { availableLocalesMap, defaultLocale } from '#next.locales.mjs'; +import { ThemeProvider } from '#providers/themeProvider'; -import '@/styles/index.css'; +import '#styles/index.css'; const fontClasses = classNames(IBM_PLEX_MONO.variable, OPEN_SANS.variable); diff --git a/apps/site/app/[locale]/next-data/api-data/route.ts b/apps/site/app/[locale]/next-data/api-data/route.ts index 849d93864de07..8019f99fbfeff 100644 --- a/apps/site/app/[locale]/next-data/api-data/route.ts +++ b/apps/site/app/[locale]/next-data/api-data/route.ts @@ -1,11 +1,11 @@ import { deflateSync } from 'node:zlib'; -import provideReleaseData from '@/next-data/providers/releaseData'; -import { GITHUB_API_KEY } from '@/next.constants.mjs'; -import { defaultLocale } from '@/next.locales.mjs'; -import type { GitHubApiFile } from '@/types'; -import { getGitHubApiDocsUrl } from '@/util/gitHubUtils'; -import { parseRichTextIntoPlainText } from '@/util/stringUtils'; +import provideReleaseData from '#next-data/providers/releaseData'; +import { GITHUB_API_KEY } from '#next.constants.mjs'; +import { defaultLocale } from '#next.locales.mjs'; +import type { GitHubApiFile } from '#types'; +import { getGitHubApiDocsUrl } from '#util/gitHubUtils'; +import { parseRichTextIntoPlainText } from '#util/stringUtils'; // Defines if we should use the GitHub API Key for the request // based on the environment variable `GITHUB_API_KEY` diff --git a/apps/site/app/[locale]/next-data/blog-data/[category]/[page]/route.ts b/apps/site/app/[locale]/next-data/blog-data/[category]/[page]/route.ts index ed7977b3d6252..f4c8365ed3e49 100644 --- a/apps/site/app/[locale]/next-data/blog-data/[category]/[page]/route.ts +++ b/apps/site/app/[locale]/next-data/blog-data/[category]/[page]/route.ts @@ -1,9 +1,9 @@ import { provideBlogPosts, providePaginatedBlogPosts, -} from '@/next-data/providers/blogData'; -import { defaultLocale } from '@/next.locales.mjs'; -import type { BlogCategory } from '@/types'; +} from '#next-data/providers/blogData'; +import { defaultLocale } from '#next.locales.mjs'; +import type { BlogCategory } from '#types'; type DynamicStaticPaths = { locale: string; diff --git a/apps/site/app/[locale]/next-data/download-snippets/route.tsx b/apps/site/app/[locale]/next-data/download-snippets/route.tsx index 7ef5cfb53a02d..68e46f044988c 100644 --- a/apps/site/app/[locale]/next-data/download-snippets/route.tsx +++ b/apps/site/app/[locale]/next-data/download-snippets/route.tsx @@ -1,5 +1,5 @@ -import provideDownloadSnippets from '@/next-data/providers/downloadSnippets'; -import { defaultLocale } from '@/next.locales.mjs'; +import provideDownloadSnippets from '#next-data/providers/downloadSnippets'; +import { defaultLocale } from '#next.locales.mjs'; type DynamicStaticPaths = { locale: string }; type StaticParams = { params: Promise }; diff --git a/apps/site/app/[locale]/next-data/og/[category]/[title]/route.tsx b/apps/site/app/[locale]/next-data/og/[category]/[title]/route.tsx index 5f1b19cc8c643..56e077a5bb575 100644 --- a/apps/site/app/[locale]/next-data/og/[category]/[title]/route.tsx +++ b/apps/site/app/[locale]/next-data/og/[category]/[title]/route.tsx @@ -2,9 +2,9 @@ import HexagonGrid from '@node-core/ui-components/Icons/HexagonGrid'; import JsWhiteIcon from '@node-core/ui-components/Icons/Logos/JsWhite'; import { ImageResponse } from 'next/og'; -import { DEFAULT_CATEGORY_OG_TYPE } from '@/next.constants.mjs'; -import { defaultLocale } from '@/next.locales.mjs'; -import { hexToRGBA } from '@/util/hexToRGBA'; +import { DEFAULT_CATEGORY_OG_TYPE } from '#next.constants.mjs'; +import { defaultLocale } from '#next.locales.mjs'; +import { hexToRGBA } from '#util/hexToRGBA'; // TODO: use CSS variables instead of absolute values const CATEGORY_TO_THEME_COLOUR_MAP = { diff --git a/apps/site/app/[locale]/next-data/page-data/route.ts b/apps/site/app/[locale]/next-data/page-data/route.ts index 4259685cfecf3..11df5abbf7754 100644 --- a/apps/site/app/[locale]/next-data/page-data/route.ts +++ b/apps/site/app/[locale]/next-data/page-data/route.ts @@ -2,9 +2,9 @@ import { deflateSync } from 'node:zlib'; import matter from 'gray-matter'; -import { dynamicRouter } from '@/next.dynamic.mjs'; -import { defaultLocale } from '@/next.locales.mjs'; -import { parseRichTextIntoPlainText } from '@/util/stringUtils'; +import { dynamicRouter } from '#next.dynamic.mjs'; +import { defaultLocale } from '#next.locales.mjs'; +import { parseRichTextIntoPlainText } from '#util/stringUtils'; // This is the Route Handler for the `GET` method which handles the request // for a digest and metadata of all existing pages on Node.js Website diff --git a/apps/site/app/[locale]/next-data/release-data/route.ts b/apps/site/app/[locale]/next-data/release-data/route.ts index 6d72572315f39..5509f7ca9d377 100644 --- a/apps/site/app/[locale]/next-data/release-data/route.ts +++ b/apps/site/app/[locale]/next-data/release-data/route.ts @@ -1,5 +1,5 @@ -import provideReleaseData from '@/next-data/providers/releaseData'; -import { defaultLocale } from '@/next.locales.mjs'; +import provideReleaseData from '#next-data/providers/releaseData'; +import { defaultLocale } from '#next.locales.mjs'; // This is the Route Handler for the `GET` method which handles the request // for generating static data related to the Node.js Release Data diff --git a/apps/site/app/[locale]/not-found.tsx b/apps/site/app/[locale]/not-found.tsx index 9ab34ca5bbf2e..3cc0200893d5e 100644 --- a/apps/site/app/[locale]/not-found.tsx +++ b/apps/site/app/[locale]/not-found.tsx @@ -5,8 +5,8 @@ import Image from 'next/image'; import { useTranslations } from 'next-intl'; import type { FC } from 'react'; -import Button from '@/components/Common/Button'; -import GlowingBackdropLayout from '@/layouts/GlowingBackdrop'; +import Button from '#components/Common/Button'; +import GlowingBackdropLayout from '#layouts/GlowingBackdrop'; const NotFoundPage: FC = () => { const t = useTranslations(); diff --git a/apps/site/app/[locale]/page.tsx b/apps/site/app/[locale]/page.tsx index 123644759baf6..1a1b98af30e30 100644 --- a/apps/site/app/[locale]/page.tsx +++ b/apps/site/app/[locale]/page.tsx @@ -11,17 +11,17 @@ import { notFound, redirect } from 'next/navigation'; import { setRequestLocale } from 'next-intl/server'; import type { FC } from 'react'; -import { setClientContext } from '@/client-context'; -import WithLayout from '@/components/withLayout'; +import { setClientContext } from '#client-context'; +import WithLayout from '#components/withLayout'; import { ENABLE_STATIC_EXPORT_LOCALE, ENABLE_STATIC_EXPORT, -} from '@/next.constants.mjs'; -import { PAGE_VIEWPORT, DYNAMIC_ROUTES } from '@/next.dynamic.constants.mjs'; -import { dynamicRouter } from '@/next.dynamic.mjs'; -import { allLocaleCodes, availableLocaleCodes } from '@/next.locales.mjs'; -import { defaultLocale } from '@/next.locales.mjs'; -import { MatterProvider } from '@/providers/matterProvider'; +} from '#next.constants.mjs'; +import { PAGE_VIEWPORT, DYNAMIC_ROUTES } from '#next.dynamic.constants.mjs'; +import { dynamicRouter } from '#next.dynamic.mjs'; +import { allLocaleCodes, availableLocaleCodes } from '#next.locales.mjs'; +import { defaultLocale } from '#next.locales.mjs'; +import { MatterProvider } from '#providers/matterProvider'; type DynamicStaticPaths = { path: Array; locale: string }; type DynamicParams = { params: Promise }; diff --git a/apps/site/app/global-error.tsx b/apps/site/app/global-error.tsx index 53238830c7a2c..bc04644ab3c89 100644 --- a/apps/site/app/global-error.tsx +++ b/apps/site/app/global-error.tsx @@ -3,9 +3,9 @@ import { ArrowRightIcon } from '@heroicons/react/24/solid'; import type { FC } from 'react'; -import Button from '@/components/Common/Button'; -import BaseLayout from '@/layouts/Base'; -import GlowingBackdropLayout from '@/layouts/GlowingBackdrop'; +import Button from '#components/Common/Button'; +import BaseLayout from '#layouts/Base'; +import GlowingBackdropLayout from '#layouts/GlowingBackdrop'; const GlobalErrorPage: FC<{ error: Error }> = () => ( diff --git a/apps/site/app/sitemap.ts b/apps/site/app/sitemap.ts index 19a33e05dffec..19ad6293478f0 100644 --- a/apps/site/app/sitemap.ts +++ b/apps/site/app/sitemap.ts @@ -4,9 +4,9 @@ import { BASE_PATH, BASE_URL, EXTERNAL_LINKS_SITEMAP, -} from '@/next.constants.mjs'; -import { dynamicRouter } from '@/next.dynamic.mjs'; -import { availableLocaleCodes, defaultLocale } from '@/next.locales.mjs'; +} from '#next.constants.mjs'; +import { dynamicRouter } from '#next.dynamic.mjs'; +import { availableLocaleCodes, defaultLocale } from '#next.locales.mjs'; // This is the combination of the Application Base URL and Base PATH const baseUrlAndPath = `${BASE_URL}${BASE_PATH}`; diff --git a/apps/site/client-context.ts b/apps/site/client-context.ts index 0ee4c5e38d04f..7228b6836fd44 100644 --- a/apps/site/client-context.ts +++ b/apps/site/client-context.ts @@ -1,7 +1,7 @@ import { cache } from 'react'; -import type { ClientSharedServerContext } from '@/types'; -import { assignClientContext } from '@/util/assignClientContext'; +import type { ClientSharedServerContext } from '#types'; +import { assignClientContext } from '#util/assignClientContext'; // This allows us to have Server-Side Context's of the shared "contextual" data // which includes the frontmatter, the current pathname from the dynamic segments diff --git a/apps/site/components/Blog/BlogHeader/__tests__/index.test.jsx b/apps/site/components/Blog/BlogHeader/__tests__/index.test.jsx index c895ea729ee81..f6198e7102679 100644 --- a/apps/site/components/Blog/BlogHeader/__tests__/index.test.jsx +++ b/apps/site/components/Blog/BlogHeader/__tests__/index.test.jsx @@ -3,7 +3,7 @@ import assert from 'node:assert/strict'; import { render, screen } from '@testing-library/react'; -import BlogHeader from '@/components/Blog/BlogHeader'; +import BlogHeader from '#components/Blog/BlogHeader'; describe('BlogHeader', () => { it('should have correct href when category is all', () => { diff --git a/apps/site/components/Blog/BlogHeader/index.tsx b/apps/site/components/Blog/BlogHeader/index.tsx index ddbcdc750c698..d371779f01a04 100644 --- a/apps/site/components/Blog/BlogHeader/index.tsx +++ b/apps/site/components/Blog/BlogHeader/index.tsx @@ -2,8 +2,8 @@ import { RssIcon } from '@heroicons/react/24/solid'; import { useTranslations } from 'next-intl'; import type { FC } from 'react'; -import Link from '@/components/Link'; -import { siteConfig } from '@/next.json.mjs'; +import Link from '#components/Link'; +import { siteConfig } from '#next.json.mjs'; import styles from './index.module.css'; diff --git a/apps/site/components/Blog/BlogPostCard/__tests__/index.test.jsx b/apps/site/components/Blog/BlogPostCard/__tests__/index.test.jsx index 8e0a19f5e650c..7bce9624a752a 100644 --- a/apps/site/components/Blog/BlogPostCard/__tests__/index.test.jsx +++ b/apps/site/components/Blog/BlogPostCard/__tests__/index.test.jsx @@ -5,7 +5,7 @@ import { render, screen } from '@testing-library/react'; import { isVisible } from '../../../../../../tests/utilities.mjs'; -import BlogPostCard from '@/components/Blog/BlogPostCard'; +import BlogPostCard from '#components/Blog/BlogPostCard'; function renderBlogPostCard({ title = 'Blog post title', diff --git a/apps/site/components/Blog/BlogPostCard/index.tsx b/apps/site/components/Blog/BlogPostCard/index.tsx index b99c1ac13a465..a0e9b00bd064b 100644 --- a/apps/site/components/Blog/BlogPostCard/index.tsx +++ b/apps/site/components/Blog/BlogPostCard/index.tsx @@ -2,11 +2,11 @@ import Preview from '@node-core/ui-components/Common/Preview'; import { useTranslations } from 'next-intl'; import type { FC } from 'react'; -import FormattedTime from '@/components/Common/FormattedTime'; -import Link from '@/components/Link'; -import WithAvatarGroup from '@/components/withAvatarGroup'; -import type { BlogCategory } from '@/types'; -import { mapBlogCategoryToPreviewType } from '@/util/blogUtils'; +import FormattedTime from '#components/Common/FormattedTime'; +import Link from '#components/Link'; +import WithAvatarGroup from '#components/withAvatarGroup'; +import type { BlogCategory } from '#types'; +import { mapBlogCategoryToPreviewType } from '#util/blogUtils'; import styles from './index.module.css'; diff --git a/apps/site/components/Common/Button.tsx b/apps/site/components/Common/Button.tsx index 87d98febce2d1..ce721dc6f0f17 100644 --- a/apps/site/components/Common/Button.tsx +++ b/apps/site/components/Common/Button.tsx @@ -3,7 +3,7 @@ import BaseButton, { } from '@node-core/ui-components/Common/BaseButton'; import type { FC, ComponentProps } from 'react'; -import Link from '@/components/Link'; +import Link from '#components/Link'; const Button: FC< Omit & Omit, 'as' | 'size'> diff --git a/apps/site/components/Common/CodeBox.tsx b/apps/site/components/Common/CodeBox.tsx index b95304a11a08e..e45c54b6de619 100644 --- a/apps/site/components/Common/CodeBox.tsx +++ b/apps/site/components/Common/CodeBox.tsx @@ -4,8 +4,8 @@ import BaseCodeBox from '@node-core/ui-components/Common/BaseCodeBox'; import { useTranslations } from 'next-intl'; import type { FC, PropsWithChildren, ReactNode } from 'react'; -import Link from '@/components/Link'; -import { useCopyToClipboard, useNotification } from '@/hooks'; +import Link from '#components/Link'; +import { useCopyToClipboard, useNotification } from '#hooks'; type CodeBoxProps = { language: string; diff --git a/apps/site/components/Common/CrossLink.tsx b/apps/site/components/Common/CrossLink.tsx index 85ef3fc0c8809..eceb92734d3a4 100644 --- a/apps/site/components/Common/CrossLink.tsx +++ b/apps/site/components/Common/CrossLink.tsx @@ -3,7 +3,7 @@ import type { CrossLinkProps } from '@node-core/ui-components/Common/BaseCrossLi import { useTranslations } from 'next-intl'; import type { FC } from 'react'; -import Link from '@/components/Link'; +import Link from '#components/Link'; const CrossLink: FC> = props => { const t = useTranslations(); diff --git a/apps/site/components/Common/FormattedTime.tsx b/apps/site/components/Common/FormattedTime.tsx index 68aff9ee78dd3..d3ef17bf2d2cb 100644 --- a/apps/site/components/Common/FormattedTime.tsx +++ b/apps/site/components/Common/FormattedTime.tsx @@ -2,7 +2,7 @@ import type { DateTimeFormatOptions } from 'next-intl'; import { useFormatter } from 'next-intl'; import type { FC } from 'react'; -import { DEFAULT_DATE_FORMAT } from '@/next.calendar.constants.mjs'; +import { DEFAULT_DATE_FORMAT } from '#next.calendar.constants.mjs'; type FormattedTimeProps = { date: string | Date; diff --git a/apps/site/components/Common/LinkTabs.tsx b/apps/site/components/Common/LinkTabs.tsx index 7f45ef41b8994..0ec1f87836b33 100644 --- a/apps/site/components/Common/LinkTabs.tsx +++ b/apps/site/components/Common/LinkTabs.tsx @@ -4,8 +4,8 @@ import BaseLinkTabs from '@node-core/ui-components/Common/BaseLinkTabs'; import type { LinkTabsProps } from '@node-core/ui-components/Common/BaseLinkTabs'; import type { FC } from 'react'; -import Link from '@/components/Link'; -import { useRouter } from '@/navigation.mjs'; +import Link from '#components/Link'; +import { useRouter } from '#navigation.mjs'; const LinkTabs: FC> = props => { const { push } = useRouter(); diff --git a/apps/site/components/Common/Pagination.tsx b/apps/site/components/Common/Pagination.tsx index 05a759cba1d31..273de6232df71 100644 --- a/apps/site/components/Common/Pagination.tsx +++ b/apps/site/components/Common/Pagination.tsx @@ -3,7 +3,7 @@ import type { PaginationProps } from '@node-core/ui-components/Common/BasePagina import { useTranslations } from 'next-intl'; import type { FC } from 'react'; -import Link from '@/components/Link'; +import Link from '#components/Link'; const Pagination: FC< Omit diff --git a/apps/site/components/Common/Search/index.tsx b/apps/site/components/Common/Search/index.tsx index 4e8728c36ffd6..395260065e856 100644 --- a/apps/site/components/Common/Search/index.tsx +++ b/apps/site/components/Common/Search/index.tsx @@ -5,14 +5,14 @@ import { useTranslations, useLocale } from 'next-intl'; import { useTheme } from 'next-themes'; import type { FC } from 'react'; -import { useRouter } from '@/navigation.mjs'; +import { useRouter } from '#navigation.mjs'; import { ORAMA_CLOUD_ENDPOINT, ORAMA_CLOUD_API_KEY, DEFAULT_ORAMA_QUERY_PARAMS, DEFAULT_ORAMA_SUGGESTIONS, BASE_URL, -} from '@/next.constants.mjs'; +} from '#next.constants.mjs'; type ResultMapDescription = { path: string; diff --git a/apps/site/components/Downloads/DownloadButton/index.tsx b/apps/site/components/Downloads/DownloadButton/index.tsx index 622e655acaf02..591db6e1a4023 100644 --- a/apps/site/components/Downloads/DownloadButton/index.tsx +++ b/apps/site/components/Downloads/DownloadButton/index.tsx @@ -4,11 +4,11 @@ import { CloudArrowDownIcon } from '@heroicons/react/24/outline'; import classNames from 'classnames'; import type { FC, PropsWithChildren } from 'react'; -import Button from '@/components/Common/Button'; -import { useClientContext } from '@/hooks'; -import type { NodeRelease } from '@/types'; -import { getNodeDownloadUrl } from '@/util/getNodeDownloadUrl'; -import { getUserPlatform } from '@/util/getUserPlatform'; +import Button from '#components/Common/Button'; +import { useClientContext } from '#hooks'; +import type { NodeRelease } from '#types'; +import { getNodeDownloadUrl } from '#util/getNodeDownloadUrl'; +import { getUserPlatform } from '#util/getUserPlatform'; import styles from './index.module.css'; diff --git a/apps/site/components/Downloads/DownloadLink.tsx b/apps/site/components/Downloads/DownloadLink.tsx index df9fc74c5e7ab..715614ff2c676 100644 --- a/apps/site/components/Downloads/DownloadLink.tsx +++ b/apps/site/components/Downloads/DownloadLink.tsx @@ -2,12 +2,12 @@ import type { FC, PropsWithChildren } from 'react'; -import LinkWithArrow from '@/components/LinkWithArrow'; -import { useClientContext } from '@/hooks'; -import type { NodeRelease } from '@/types'; -import type { DownloadKind } from '@/util/getNodeDownloadUrl'; -import { getNodeDownloadUrl } from '@/util/getNodeDownloadUrl'; -import { getUserPlatform } from '@/util/getUserPlatform'; +import LinkWithArrow from '#components/LinkWithArrow'; +import { useClientContext } from '#hooks'; +import type { NodeRelease } from '#types'; +import type { DownloadKind } from '#util/getNodeDownloadUrl'; +import { getNodeDownloadUrl } from '#util/getNodeDownloadUrl'; +import { getUserPlatform } from '#util/getUserPlatform'; type DownloadLinkProps = { release: NodeRelease; kind?: DownloadKind }; diff --git a/apps/site/components/Downloads/DownloadReleasesTable/DetailsButton.tsx b/apps/site/components/Downloads/DownloadReleasesTable/DetailsButton.tsx index 3c20ba738e4d4..d545bce041f3e 100644 --- a/apps/site/components/Downloads/DownloadReleasesTable/DetailsButton.tsx +++ b/apps/site/components/Downloads/DownloadReleasesTable/DetailsButton.tsx @@ -4,9 +4,9 @@ import { useTranslations } from 'next-intl'; import type { FC } from 'react'; import { use } from 'react'; -import LinkWithArrow from '@/components/LinkWithArrow'; -import { ReleaseModalContext } from '@/providers/releaseModalProvider'; -import type { NodeRelease } from '@/types'; +import LinkWithArrow from '#components/LinkWithArrow'; +import { ReleaseModalContext } from '#providers/releaseModalProvider'; +import type { NodeRelease } from '#types'; type DetailsButtonProps = { versionData: NodeRelease; diff --git a/apps/site/components/Downloads/DownloadReleasesTable/index.tsx b/apps/site/components/Downloads/DownloadReleasesTable/index.tsx index 460e4e29eab2e..2536a0f0e572d 100644 --- a/apps/site/components/Downloads/DownloadReleasesTable/index.tsx +++ b/apps/site/components/Downloads/DownloadReleasesTable/index.tsx @@ -2,9 +2,9 @@ import Badge from '@node-core/ui-components/Common/Badge'; import { getTranslations } from 'next-intl/server'; import type { FC } from 'react'; -import FormattedTime from '@/components/Common/FormattedTime'; -import DetailsButton from '@/components/Downloads/DownloadReleasesTable/DetailsButton'; -import getReleaseData from '@/next-data/releaseData'; +import FormattedTime from '#components/Common/FormattedTime'; +import DetailsButton from '#components/Downloads/DownloadReleasesTable/DetailsButton'; +import getReleaseData from '#next-data/releaseData'; const DownloadReleasesTable: FC = async () => { const releaseData = await getReleaseData(); diff --git a/apps/site/components/Downloads/MinorReleasesTable/index.tsx b/apps/site/components/Downloads/MinorReleasesTable/index.tsx index 0fde534416cbf..35ab3b35de7c1 100644 --- a/apps/site/components/Downloads/MinorReleasesTable/index.tsx +++ b/apps/site/components/Downloads/MinorReleasesTable/index.tsx @@ -4,10 +4,10 @@ import Separator from '@node-core/ui-components/Common/Separator'; import { useTranslations } from 'next-intl'; import type { FC } from 'react'; -import Link from '@/components/Link'; -import { BASE_CHANGELOG_URL } from '@/next.constants.mjs'; -import type { MinorVersion } from '@/types'; -import { getNodeApiLink } from '@/util/getNodeApiLink'; +import Link from '#components/Link'; +import { BASE_CHANGELOG_URL } from '#next.constants.mjs'; +import type { MinorVersion } from '#types'; +import { getNodeApiLink } from '#util/getNodeApiLink'; import styles from './index.module.css'; diff --git a/apps/site/components/Downloads/Release/BlogPostLink.tsx b/apps/site/components/Downloads/Release/BlogPostLink.tsx index 3082da9c3c5c8..df14edf935890 100644 --- a/apps/site/components/Downloads/Release/BlogPostLink.tsx +++ b/apps/site/components/Downloads/Release/BlogPostLink.tsx @@ -3,8 +3,8 @@ import type { FC, PropsWithChildren } from 'react'; import { useContext } from 'react'; -import Link from '@/components/Link'; -import { ReleaseContext } from '@/providers/releaseProvider'; +import Link from '#components/Link'; +import { ReleaseContext } from '#providers/releaseProvider'; const BlogPostLink: FC = ({ children }) => { const { release } = useContext(ReleaseContext); diff --git a/apps/site/components/Downloads/Release/ChangelogLink.tsx b/apps/site/components/Downloads/Release/ChangelogLink.tsx index ff3e08d616ea9..19c093f0d7271 100644 --- a/apps/site/components/Downloads/Release/ChangelogLink.tsx +++ b/apps/site/components/Downloads/Release/ChangelogLink.tsx @@ -3,10 +3,10 @@ import type { FC, PropsWithChildren } from 'react'; import { useContext } from 'react'; -import Link from '@/components/Link'; -import LinkWithArrow from '@/components/LinkWithArrow'; -import { BASE_CHANGELOG_URL } from '@/next.constants.mjs'; -import { ReleaseContext } from '@/providers/releaseProvider'; +import Link from '#components/Link'; +import LinkWithArrow from '#components/LinkWithArrow'; +import { BASE_CHANGELOG_URL } from '#next.constants.mjs'; +import { ReleaseContext } from '#providers/releaseProvider'; const ChangelogLink: FC = ({ children }) => { const { release } = useContext(ReleaseContext); diff --git a/apps/site/components/Downloads/Release/DownloadLink.tsx b/apps/site/components/Downloads/Release/DownloadLink.tsx index 40b43abb80648..fad1ff4bb36d1 100644 --- a/apps/site/components/Downloads/Release/DownloadLink.tsx +++ b/apps/site/components/Downloads/Release/DownloadLink.tsx @@ -3,9 +3,9 @@ import type { FC, PropsWithChildren } from 'react'; import { useContext } from 'react'; -import DownloadLinkBase from '@/components/Downloads/DownloadLink'; -import { ReleaseContext } from '@/providers/releaseProvider'; -import type { DownloadKind } from '@/util/getNodeDownloadUrl'; +import DownloadLinkBase from '#components/Downloads/DownloadLink'; +import { ReleaseContext } from '#providers/releaseProvider'; +import type { DownloadKind } from '#util/getNodeDownloadUrl'; type DownloadLinkProps = { kind?: DownloadKind }; diff --git a/apps/site/components/Downloads/Release/InstallationMethodDropdown.tsx b/apps/site/components/Downloads/Release/InstallationMethodDropdown.tsx index c857c9b0ddf87..e7e63848aec47 100644 --- a/apps/site/components/Downloads/Release/InstallationMethodDropdown.tsx +++ b/apps/site/components/Downloads/Release/InstallationMethodDropdown.tsx @@ -5,9 +5,9 @@ import { useTranslations } from 'next-intl'; import { useContext, useEffect, useMemo } from 'react'; import type { FC } from 'react'; -import { ReleaseContext } from '@/providers/releaseProvider'; -import type { InstallationMethod } from '@/types/release'; -import { nextItem, INSTALL_METHODS, parseCompat } from '@/util/downloadUtils'; +import { ReleaseContext } from '#providers/releaseProvider'; +import type { InstallationMethod } from '#types/release'; +import { nextItem, INSTALL_METHODS, parseCompat } from '#util/downloadUtils'; const InstallationMethodDropdown: FC = () => { const release = useContext(ReleaseContext); diff --git a/apps/site/components/Downloads/Release/OperatingSystemDropdown.tsx b/apps/site/components/Downloads/Release/OperatingSystemDropdown.tsx index 578c0e0e0be15..97269c3756f13 100644 --- a/apps/site/components/Downloads/Release/OperatingSystemDropdown.tsx +++ b/apps/site/components/Downloads/Release/OperatingSystemDropdown.tsx @@ -5,10 +5,10 @@ import { useTranslations } from 'next-intl'; import { useContext, useEffect, useMemo } from 'react'; import type { FC } from 'react'; -import { useClientContext } from '@/hooks'; -import { ReleaseContext } from '@/providers/releaseProvider'; -import type { UserOS } from '@/types/userOS'; -import { nextItem, OPERATING_SYSTEMS, parseCompat } from '@/util/downloadUtils'; +import { useClientContext } from '#hooks'; +import { ReleaseContext } from '#providers/releaseProvider'; +import type { UserOS } from '#types/userOS'; +import { nextItem, OPERATING_SYSTEMS, parseCompat } from '#util/downloadUtils'; type OperatingSystemDropdownProps = { exclude?: Array }; diff --git a/apps/site/components/Downloads/Release/PackageManagerDropdown.tsx b/apps/site/components/Downloads/Release/PackageManagerDropdown.tsx index ff58252e08420..86f6cde2c541b 100644 --- a/apps/site/components/Downloads/Release/PackageManagerDropdown.tsx +++ b/apps/site/components/Downloads/Release/PackageManagerDropdown.tsx @@ -5,9 +5,9 @@ import { useTranslations } from 'next-intl'; import { useContext, useEffect, useMemo } from 'react'; import type { FC } from 'react'; -import { ReleaseContext } from '@/providers/releaseProvider'; -import type { PackageManager } from '@/types/release'; -import { nextItem, PACKAGE_MANAGERS, parseCompat } from '@/util/downloadUtils'; +import { ReleaseContext } from '#providers/releaseProvider'; +import type { PackageManager } from '#types/release'; +import { nextItem, PACKAGE_MANAGERS, parseCompat } from '#util/downloadUtils'; const PackageManagerDropdown: FC = () => { const release = useContext(ReleaseContext); diff --git a/apps/site/components/Downloads/Release/PlatformDropdown.tsx b/apps/site/components/Downloads/Release/PlatformDropdown.tsx index a6a30bbaef6a7..7e0614ceafb2b 100644 --- a/apps/site/components/Downloads/Release/PlatformDropdown.tsx +++ b/apps/site/components/Downloads/Release/PlatformDropdown.tsx @@ -5,11 +5,11 @@ import { useTranslations } from 'next-intl'; import type { FC } from 'react'; import { useEffect, useContext, useMemo } from 'react'; -import { useClientContext } from '@/hooks'; -import { ReleaseContext } from '@/providers/releaseProvider'; -import type { UserPlatform } from '@/types/userOS'; -import { PLATFORMS, nextItem, parseCompat } from '@/util/downloadUtils'; -import { getUserPlatform } from '@/util/getUserPlatform'; +import { useClientContext } from '#hooks'; +import { ReleaseContext } from '#providers/releaseProvider'; +import type { UserPlatform } from '#types/userOS'; +import { PLATFORMS, nextItem, parseCompat } from '#util/downloadUtils'; +import { getUserPlatform } from '#util/getUserPlatform'; const PlatformDropdown: FC = () => { const { architecture, bitness } = useClientContext(); diff --git a/apps/site/components/Downloads/Release/PrebuiltDownloadButtons.tsx b/apps/site/components/Downloads/Release/PrebuiltDownloadButtons.tsx index b968e68651c2b..f1ac918fc6b54 100644 --- a/apps/site/components/Downloads/Release/PrebuiltDownloadButtons.tsx +++ b/apps/site/components/Downloads/Release/PrebuiltDownloadButtons.tsx @@ -6,13 +6,13 @@ import { useTranslations } from 'next-intl'; import { useContext } from 'react'; import type { FC } from 'react'; -import Button from '@/components/Common/Button'; -import { ReleaseContext } from '@/providers/releaseProvider'; +import Button from '#components/Common/Button'; +import { ReleaseContext } from '#providers/releaseProvider'; import { OperatingSystemLabel, OS_NOT_SUPPORTING_INSTALLERS, -} from '@/util/downloadUtils'; -import { getNodeDownloadUrl } from '@/util/getNodeDownloadUrl'; +} from '#util/downloadUtils'; +import { getNodeDownloadUrl } from '#util/getNodeDownloadUrl'; // Retrieves the pure extension piece from the input string const getExtension = (input: string) => String(input.split('.').slice(-1)); diff --git a/apps/site/components/Downloads/Release/ReleaseCodeBox.tsx b/apps/site/components/Downloads/Release/ReleaseCodeBox.tsx index 7678f7ac66f16..13351d7a1d26c 100644 --- a/apps/site/components/Downloads/Release/ReleaseCodeBox.tsx +++ b/apps/site/components/Downloads/Release/ReleaseCodeBox.tsx @@ -6,14 +6,14 @@ import { useTranslations } from 'next-intl'; import type { FC } from 'react'; import { useContext, useMemo } from 'react'; -import CodeBox from '@/components/Common/CodeBox'; -import Link from '@/components/Link'; -import LinkWithArrow from '@/components/LinkWithArrow'; -import { createSval } from '@/next.jsx.compiler.mjs'; -import { ReleaseContext, ReleasesContext } from '@/providers/releaseProvider'; -import type { ReleaseContextType } from '@/types/release'; -import { INSTALL_METHODS } from '@/util/downloadUtils'; -import { highlightToHtml } from '@/util/getHighlighter'; +import CodeBox from '#components/Common/CodeBox'; +import Link from '#components/Link'; +import LinkWithArrow from '#components/LinkWithArrow'; +import { createSval } from '#next.jsx.compiler.mjs'; +import { ReleaseContext, ReleasesContext } from '#providers/releaseProvider'; +import type { ReleaseContextType } from '#types/release'; +import { INSTALL_METHODS } from '#util/downloadUtils'; +import { highlightToHtml } from '#util/getHighlighter'; // Creates a minimal JavaScript interpreter for parsing the JavaScript code from the snippets // Note: that the code runs inside a sandboxed environment and cannot interact with any code outside of the sandbox diff --git a/apps/site/components/Downloads/Release/VersionDropdown.tsx b/apps/site/components/Downloads/Release/VersionDropdown.tsx index 2f8b1b015c358..8f193b3b3d8da 100644 --- a/apps/site/components/Downloads/Release/VersionDropdown.tsx +++ b/apps/site/components/Downloads/Release/VersionDropdown.tsx @@ -5,7 +5,7 @@ import { useTranslations } from 'next-intl'; import type { FC } from 'react'; import { useContext } from 'react'; -import { ReleaseContext, ReleasesContext } from '@/providers/releaseProvider'; +import { ReleaseContext, ReleasesContext } from '#providers/releaseProvider'; const getDropDownStatus = (version: string, status: string) => { if (status === 'LTS') { diff --git a/apps/site/components/Downloads/ReleaseModal/index.tsx b/apps/site/components/Downloads/ReleaseModal/index.tsx index 23b50e785739d..7634ecb383db5 100644 --- a/apps/site/components/Downloads/ReleaseModal/index.tsx +++ b/apps/site/components/Downloads/ReleaseModal/index.tsx @@ -3,10 +3,10 @@ import Modal from '@node-core/ui-components/Common/Modal'; import { useTranslations } from 'next-intl'; import type { FC } from 'react'; -import { MinorReleasesTable } from '@/components/Downloads/MinorReleasesTable'; -import { ReleaseOverview } from '@/components/Downloads/ReleaseOverview'; -import LinkWithArrow from '@/components/LinkWithArrow'; -import type { NodeRelease } from '@/types'; +import { MinorReleasesTable } from '#components/Downloads/MinorReleasesTable'; +import { ReleaseOverview } from '#components/Downloads/ReleaseOverview'; +import LinkWithArrow from '#components/LinkWithArrow'; +import type { NodeRelease } from '#types'; type ReleaseModalProps = { isOpen: boolean; diff --git a/apps/site/components/Downloads/ReleaseOverview/index.tsx b/apps/site/components/Downloads/ReleaseOverview/index.tsx index c444908c99586..539a1d12b8528 100644 --- a/apps/site/components/Downloads/ReleaseOverview/index.tsx +++ b/apps/site/components/Downloads/ReleaseOverview/index.tsx @@ -8,8 +8,8 @@ import NpmIcon from '@node-core/ui-components/Icons/PackageManager/Npm'; import { useTranslations } from 'next-intl'; import type { FC, ReactNode, SVGProps } from 'react'; -import FormattedTime from '@/components/Common/FormattedTime'; -import type { NodeRelease } from '@/types'; +import FormattedTime from '#components/Common/FormattedTime'; +import type { NodeRelease } from '#types'; import styles from './index.module.css'; diff --git a/apps/site/components/Link.tsx b/apps/site/components/Link.tsx index ae680b9971fac..23d986da08df7 100644 --- a/apps/site/components/Link.tsx +++ b/apps/site/components/Link.tsx @@ -1,6 +1,6 @@ import type { FC, HTMLProps } from 'react'; -import { Link as LocalizedLink } from '@/navigation.mjs'; +import { Link as LocalizedLink } from '#navigation.mjs'; const Link: FC> = ({ children, diff --git a/apps/site/components/LinkWithArrow.tsx b/apps/site/components/LinkWithArrow.tsx index fb44bef842c21..bb61f1463e391 100644 --- a/apps/site/components/LinkWithArrow.tsx +++ b/apps/site/components/LinkWithArrow.tsx @@ -3,7 +3,7 @@ import type { SlotProps } from '@radix-ui/react-slot'; import { Slot } from '@radix-ui/react-slot'; import type { ComponentProps, FC, PropsWithChildren } from 'react'; -import Link from '@/components/Link'; +import Link from '#components/Link'; type LinkWithArrowProps = | ({ asChild?: false } & ComponentProps) diff --git a/apps/site/components/MDX/Calendar/Event/index.tsx b/apps/site/components/MDX/Calendar/Event/index.tsx index a83a62df801d8..3357eeab22472 100644 --- a/apps/site/components/MDX/Calendar/Event/index.tsx +++ b/apps/site/components/MDX/Calendar/Event/index.tsx @@ -1,9 +1,9 @@ import type { FC } from 'react'; -import FormattedTime from '@/components/Common/FormattedTime'; -import Link from '@/components/Link'; -import { getZoomLink, isZoned } from '@/components/MDX/Calendar/utils'; -import type { CalendarEvent } from '@/types'; +import FormattedTime from '#components/Common/FormattedTime'; +import Link from '#components/Link'; +import { getZoomLink, isZoned } from '#components/MDX/Calendar/utils'; +import type { CalendarEvent } from '#types'; import styles from './index.module.css'; diff --git a/apps/site/components/MDX/Calendar/UpcomingMeetings.tsx b/apps/site/components/MDX/Calendar/UpcomingMeetings.tsx index cac02b5d71fc8..ed425c2fea41c 100644 --- a/apps/site/components/MDX/Calendar/UpcomingMeetings.tsx +++ b/apps/site/components/MDX/Calendar/UpcomingMeetings.tsx @@ -1,11 +1,11 @@ import type { FC } from 'react'; -import FormattedTime from '@/components/Common/FormattedTime'; -import Event from '@/components/MDX/Calendar/Event'; -import { getZoomLink, isZoned } from '@/components/MDX/Calendar/utils'; -import { CALENDAR_NODEJS_ID } from '@/next.calendar.constants.mjs'; -import { getCalendarEvents } from '@/next.calendar.mjs'; -import type { CalendarEvent } from '@/types'; +import FormattedTime from '#components/Common/FormattedTime'; +import Event from '#components/MDX/Calendar/Event'; +import { getZoomLink, isZoned } from '#components/MDX/Calendar/utils'; +import { CALENDAR_NODEJS_ID } from '#next.calendar.constants.mjs'; +import { getCalendarEvents } from '#next.calendar.mjs'; +import type { CalendarEvent } from '#types'; import styles from './calendar.module.css'; diff --git a/apps/site/components/MDX/Calendar/utils.ts b/apps/site/components/MDX/Calendar/utils.ts index 7b0f632577172..2a63d895b1b3a 100644 --- a/apps/site/components/MDX/Calendar/utils.ts +++ b/apps/site/components/MDX/Calendar/utils.ts @@ -1,4 +1,4 @@ -import type { CalendarEvent, ZonedCalendarTime } from '@/types'; +import type { CalendarEvent, ZonedCalendarTime } from '#types'; export const isZoned = (d: object): d is ZonedCalendarTime => 'dateTime' in d && 'timeZone' in d; diff --git a/apps/site/components/MDX/CodeBox/index.tsx b/apps/site/components/MDX/CodeBox/index.tsx index 01df11b11e741..4edf2f18a165d 100644 --- a/apps/site/components/MDX/CodeBox/index.tsx +++ b/apps/site/components/MDX/CodeBox/index.tsx @@ -1,7 +1,7 @@ import type { FC, PropsWithChildren } from 'react'; -import CodeBox from '@/components/Common/CodeBox'; -import { getLanguageDisplayName } from '@/util/getLanguageDisplayName'; +import CodeBox from '#components/Common/CodeBox'; +import { getLanguageDisplayName } from '#util/getLanguageDisplayName'; type CodeBoxProps = { className?: string; showCopyButton?: string }; diff --git a/apps/site/components/MDX/Image/index.tsx b/apps/site/components/MDX/Image/index.tsx index 871651ddd2882..6f22fe27657d8 100644 --- a/apps/site/components/MDX/Image/index.tsx +++ b/apps/site/components/MDX/Image/index.tsx @@ -2,7 +2,7 @@ import type { ImageProps } from 'next/image'; import Image from 'next/image'; import type { FC } from 'react'; -import { isSvgImage } from '@/util/imageUtils'; +import { isSvgImage } from '#util/imageUtils'; const MDXImage: FC = ({ width, height, alt, src, ...props }) => { const isUnoptimizedImage = isSvgImage(src.toString()); diff --git a/apps/site/components/withAvatarGroup.tsx b/apps/site/components/withAvatarGroup.tsx index 10bbcfc8732fb..aef1093924aab 100644 --- a/apps/site/components/withAvatarGroup.tsx +++ b/apps/site/components/withAvatarGroup.tsx @@ -4,9 +4,9 @@ import AvatarGroup from '@node-core/ui-components/Common/AvatarGroup'; import Image from 'next/image'; import type { ComponentProps, FC } from 'react'; -import Link from '@/components/Link'; -import type { AuthorProps } from '@/types'; -import { getAuthors } from '@/util/authorUtils'; +import Link from '#components/Link'; +import type { AuthorProps } from '#types'; +import { getAuthors } from '#util/authorUtils'; type WithAvatarGroupProps = Omit< ComponentProps, diff --git a/apps/site/components/withBadgeGroup.tsx b/apps/site/components/withBadgeGroup.tsx index 4047f3af8ec1c..338ba6ff93744 100644 --- a/apps/site/components/withBadgeGroup.tsx +++ b/apps/site/components/withBadgeGroup.tsx @@ -1,9 +1,9 @@ import BadgeGroup from '@node-core/ui-components/Common/BadgeGroup'; import type { FC } from 'react'; -import Link from '@/components/Link'; -import { siteConfig } from '@/next.json.mjs'; -import { dateIsBetween } from '@/util/dateUtils'; +import Link from '#components/Link'; +import { siteConfig } from '#next.json.mjs'; +import { dateIsBetween } from '#util/dateUtils'; const WithBadgeGroup: FC<{ section: string }> = ({ section }) => { const badge = siteConfig.websiteBadges[section]; diff --git a/apps/site/components/withBanner.tsx b/apps/site/components/withBanner.tsx index 32061a10c7284..e031222dd7f53 100644 --- a/apps/site/components/withBanner.tsx +++ b/apps/site/components/withBanner.tsx @@ -2,9 +2,9 @@ import { ArrowUpRightIcon } from '@heroicons/react/24/outline'; import Banner from '@node-core/ui-components/Common/Banner'; import type { FC } from 'react'; -import Link from '@/components/Link'; -import { siteConfig } from '@/next.json.mjs'; -import { dateIsBetween } from '@/util/dateUtils'; +import Link from '#components/Link'; +import { siteConfig } from '#next.json.mjs'; +import { dateIsBetween } from '#util/dateUtils'; const WithBanner: FC<{ section: string }> = ({ section }) => { const banner = siteConfig.websiteBanners[section]; diff --git a/apps/site/components/withBlogCategories.tsx b/apps/site/components/withBlogCategories.tsx index 9bb121d98feda..148d967783823 100644 --- a/apps/site/components/withBlogCategories.tsx +++ b/apps/site/components/withBlogCategories.tsx @@ -1,11 +1,11 @@ import { useTranslations } from 'next-intl'; import type { ComponentProps, FC } from 'react'; -import BlogPostCard from '@/components/Blog/BlogPostCard'; -import LinkTabs from '@/components/Common/LinkTabs'; -import Pagination from '@/components/Common/Pagination'; -import type { BlogPostsRSC } from '@/types'; -import { mapAuthorToCardAuthors } from '@/util/authorUtils'; +import BlogPostCard from '#components/Blog/BlogPostCard'; +import LinkTabs from '#components/Common/LinkTabs'; +import Pagination from '#components/Common/Pagination'; +import type { BlogPostsRSC } from '#types'; +import { mapAuthorToCardAuthors } from '#util/authorUtils'; type WithBlogCategoriesProps = { categories: ComponentProps['tabs']; diff --git a/apps/site/components/withBlogCrossLinks.tsx b/apps/site/components/withBlogCrossLinks.tsx index 07d05fa8900d2..6a4ed5cb20ee0 100644 --- a/apps/site/components/withBlogCrossLinks.tsx +++ b/apps/site/components/withBlogCrossLinks.tsx @@ -1,9 +1,9 @@ import type { FC } from 'react'; -import { getClientContext } from '@/client-context'; -import CrossLink from '@/components/Common/CrossLink'; -import getBlogData from '@/next-data/blogData'; -import type { BlogCategory } from '@/types'; +import { getClientContext } from '#client-context'; +import CrossLink from '#components/Common/CrossLink'; +import getBlogData from '#next-data/blogData'; +import type { BlogCategory } from '#types'; const WithBlogCrossLinks: FC = async () => { const { pathname } = getClientContext(); diff --git a/apps/site/components/withBreadcrumbs.tsx b/apps/site/components/withBreadcrumbs.tsx index fce1d3b85b7b6..ddc3fe80efa9e 100644 --- a/apps/site/components/withBreadcrumbs.tsx +++ b/apps/site/components/withBreadcrumbs.tsx @@ -5,10 +5,10 @@ import Breadcrumbs from '@node-core/ui-components/Common/Breadcrumbs'; import { useTranslations } from 'next-intl'; import type { FC } from 'react'; -import Link from '@/components/Link'; -import { useClientContext, useMediaQuery, useSiteNavigation } from '@/hooks'; -import type { NavigationKeys } from '@/types'; -import { dashToCamelCase } from '@/util/stringUtils'; +import Link from '#components/Link'; +import { useClientContext, useMediaQuery, useSiteNavigation } from '#hooks'; +import type { NavigationKeys } from '#types'; +import { dashToCamelCase } from '#util/stringUtils'; type WithBreadcrumbsProps = { navKeys?: Array; diff --git a/apps/site/components/withDownloadSection.tsx b/apps/site/components/withDownloadSection.tsx index ebc48602665b8..7897d649de726 100644 --- a/apps/site/components/withDownloadSection.tsx +++ b/apps/site/components/withDownloadSection.tsx @@ -1,12 +1,12 @@ import { getLocale } from 'next-intl/server'; import type { FC, PropsWithChildren } from 'react'; -import { getClientContext } from '@/client-context'; -import WithNodeRelease from '@/components/withNodeRelease'; -import getDownloadSnippets from '@/next-data/downloadSnippets'; -import getReleaseData from '@/next-data/releaseData'; -import { defaultLocale } from '@/next.locales.mjs'; -import { ReleaseProvider, ReleasesProvider } from '@/providers/releaseProvider'; +import { getClientContext } from '#client-context'; +import WithNodeRelease from '#components/withNodeRelease'; +import getDownloadSnippets from '#next-data/downloadSnippets'; +import getReleaseData from '#next-data/releaseData'; +import { defaultLocale } from '#next.locales.mjs'; +import { ReleaseProvider, ReleasesProvider } from '#providers/releaseProvider'; // By default the translated languages do not contain all the download snippets // Hence we always merge any translated snippet with the fallbacks for missing snippets diff --git a/apps/site/components/withFooter.tsx b/apps/site/components/withFooter.tsx index 53b9c96592b54..435a90aa2736a 100644 --- a/apps/site/components/withFooter.tsx +++ b/apps/site/components/withFooter.tsx @@ -4,9 +4,9 @@ import Footer from '@node-core/ui-components/Containers/Footer'; import { useTranslations } from 'next-intl'; import type { FC } from 'react'; -import Link from '@/components/Link'; -import { usePathname } from '@/navigation.mjs'; -import { siteNavigation } from '@/next.json.mjs'; +import Link from '#components/Link'; +import { usePathname } from '#navigation.mjs'; +import { siteNavigation } from '#next.json.mjs'; const WithFooter: FC = () => { const t = useTranslations(); diff --git a/apps/site/components/withLayout.tsx b/apps/site/components/withLayout.tsx index 0c4a1638ee5b3..6b1713d1aca4d 100644 --- a/apps/site/components/withLayout.tsx +++ b/apps/site/components/withLayout.tsx @@ -1,14 +1,14 @@ import type { FC, PropsWithChildren } from 'react'; -import AboutLayout from '@/layouts/About'; -import ArticlePageLayout from '@/layouts/ArticlePage'; -import BlogLayout from '@/layouts/Blog'; -import DefaultLayout from '@/layouts/Default'; -import DownloadLayout from '@/layouts/Download'; -import GlowingBackdropLayout from '@/layouts/GlowingBackdrop'; -import LearnLayout from '@/layouts/Learn'; -import PostLayout from '@/layouts/Post'; -import type { Layouts } from '@/types'; +import AboutLayout from '#layouts/About'; +import ArticlePageLayout from '#layouts/ArticlePage'; +import BlogLayout from '#layouts/Blog'; +import DefaultLayout from '#layouts/Default'; +import DownloadLayout from '#layouts/Download'; +import GlowingBackdropLayout from '#layouts/GlowingBackdrop'; +import LearnLayout from '#layouts/Learn'; +import PostLayout from '#layouts/Post'; +import type { Layouts } from '#types'; const layouts = { about: AboutLayout, diff --git a/apps/site/components/withMetaBar.tsx b/apps/site/components/withMetaBar.tsx index 133568e2793a8..b115f44227971 100644 --- a/apps/site/components/withMetaBar.tsx +++ b/apps/site/components/withMetaBar.tsx @@ -5,14 +5,14 @@ import GitHubIcon from '@node-core/ui-components/Icons/Social/GitHub'; import { useFormatter, useLocale, useTranslations } from 'next-intl'; import type { FC } from 'react'; -import Link from '@/components/Link'; -import WithAvatarGroup from '@/components/withAvatarGroup'; -import { useClientContext } from '@/hooks/react-client'; -import useMediaQuery from '@/hooks/react-client/useMediaQuery'; -import { DEFAULT_DATE_FORMAT } from '@/next.calendar.constants.mjs'; -import { TRANSLATION_URL } from '@/next.constants.mjs'; -import { defaultLocale } from '@/next.locales.mjs'; -import { getGitHubBlobUrl } from '@/util/gitHubUtils'; +import Link from '#components/Link'; +import WithAvatarGroup from '#components/withAvatarGroup'; +import { useClientContext } from '#hooks/react-client'; +import useMediaQuery from '#hooks/react-client/useMediaQuery'; +import { DEFAULT_DATE_FORMAT } from '#next.calendar.constants.mjs'; +import { TRANSLATION_URL } from '#next.constants.mjs'; +import { defaultLocale } from '#next.locales.mjs'; +import { getGitHubBlobUrl } from '#util/gitHubUtils'; const WithMetaBar: FC = () => { const { headings, readingTime, frontmatter, filename } = useClientContext(); diff --git a/apps/site/components/withNavBar.tsx b/apps/site/components/withNavBar.tsx index 9850ad9f31c8d..5bfa84d7dcf17 100644 --- a/apps/site/components/withNavBar.tsx +++ b/apps/site/components/withNavBar.tsx @@ -13,14 +13,14 @@ import { useLocale, useTranslations } from 'next-intl'; import { useTheme } from 'next-themes'; import type { FC } from 'react'; -import Link from '@/components/Link'; -import WithBanner from '@/components/withBanner'; -import WithNodejsLogo from '@/components/withNodejsLogo'; -import { useSiteNavigation } from '@/hooks'; -import { useRouter, usePathname } from '@/navigation.mjs'; -import { availableLocales } from '@/next.locales.mjs'; +import Link from '#components/Link'; +import WithBanner from '#components/withBanner'; +import WithNodejsLogo from '#components/withNodejsLogo'; +import { useSiteNavigation } from '#hooks'; +import { useRouter, usePathname } from '#navigation.mjs'; +import { availableLocales } from '#next.locales.mjs'; -const SearchButton = dynamic(() => import('@/components/Common/Search'), { +const SearchButton = dynamic(() => import('#components/Common/Search'), { ssr: false, loading: () => ( diff --git a/apps/site/components/withNodeRelease.tsx b/apps/site/components/withNodeRelease.tsx index 521579fb4f8c8..3d4be66d766f0 100644 --- a/apps/site/components/withNodeRelease.tsx +++ b/apps/site/components/withNodeRelease.tsx @@ -1,7 +1,7 @@ import type { FC } from 'react'; -import getReleaseData from '@/next-data/releaseData'; -import type { NodeRelease, NodeReleaseStatus } from '@/types'; +import getReleaseData from '#next-data/releaseData'; +import type { NodeRelease, NodeReleaseStatus } from '#types'; type WithNodeReleaseProps = { status: Array | NodeReleaseStatus; diff --git a/apps/site/components/withNodejsLogo.tsx b/apps/site/components/withNodejsLogo.tsx index 0b76506a77904..8aa5f2082a6be 100644 --- a/apps/site/components/withNodejsLogo.tsx +++ b/apps/site/components/withNodejsLogo.tsx @@ -2,7 +2,7 @@ import NodejsLogo from '@node-core/ui-components/Common/NodejsLogo'; import { useTranslations } from 'next-intl'; import type { FC } from 'react'; -import { siteConfig } from '@/next.json.mjs'; +import { siteConfig } from '#next.json.mjs'; const WithNodejsLogo: FC = () => { const t = useTranslations(); diff --git a/apps/site/components/withProgressionSidebar.tsx b/apps/site/components/withProgressionSidebar.tsx index 9ee005206bf46..c068e4752b9e0 100644 --- a/apps/site/components/withProgressionSidebar.tsx +++ b/apps/site/components/withProgressionSidebar.tsx @@ -6,10 +6,10 @@ import { useLocale, useTranslations } from 'next-intl'; import type { RichTranslationValues } from 'next-intl'; import type { FC } from 'react'; -import Link from '@/components/Link'; -import { useSiteNavigation } from '@/hooks/server'; -import { useRouter } from '@/navigation.mjs'; -import type { NavigationKeys } from '@/types'; +import Link from '#components/Link'; +import { useSiteNavigation } from '#hooks/server'; +import { useRouter } from '#navigation.mjs'; +import type { NavigationKeys } from '#types'; type WithProgressionSidebarProps = { navKey: NavigationKeys; diff --git a/apps/site/components/withSidebar.tsx b/apps/site/components/withSidebar.tsx index ac70f5bf624d4..82ef92df4dce5 100644 --- a/apps/site/components/withSidebar.tsx +++ b/apps/site/components/withSidebar.tsx @@ -6,10 +6,10 @@ import { useLocale, useTranslations } from 'next-intl'; import type { RichTranslationValues } from 'next-intl'; import type { FC } from 'react'; -import Link from '@/components/Link'; -import { useSiteNavigation } from '@/hooks/server'; -import { useRouter } from '@/navigation.mjs'; -import type { NavigationKeys } from '@/types'; +import Link from '#components/Link'; +import { useSiteNavigation } from '#hooks/server'; +import { useRouter } from '#navigation.mjs'; +import type { NavigationKeys } from '#types'; type WithSidebarProps = { navKeys: Array; diff --git a/apps/site/components/withSidebarCrossLinks.tsx b/apps/site/components/withSidebarCrossLinks.tsx index 8b4513ddd2fd1..f8da2879c4a5b 100644 --- a/apps/site/components/withSidebarCrossLinks.tsx +++ b/apps/site/components/withSidebarCrossLinks.tsx @@ -1,8 +1,8 @@ import type { FC } from 'react'; -import CrossLink from '@/components/Common/CrossLink'; -import { useClientContext, useSiteNavigation } from '@/hooks/server'; -import type { NavigationKeys } from '@/types'; +import CrossLink from '#components/Common/CrossLink'; +import { useClientContext, useSiteNavigation } from '#hooks/server'; +import type { NavigationKeys } from '#types'; type WithCrossLinksProps = { navKey: NavigationKeys }; diff --git a/apps/site/hooks/react-client/__tests__/useClientContext.test.jsx b/apps/site/hooks/react-client/__tests__/useClientContext.test.jsx index 8f3eb918996e9..2e978bd1f6b77 100644 --- a/apps/site/hooks/react-client/__tests__/useClientContext.test.jsx +++ b/apps/site/hooks/react-client/__tests__/useClientContext.test.jsx @@ -3,8 +3,8 @@ import { renderHook } from '@testing-library/react'; import { describe, it } from 'node:test'; import assert from 'node:assert/strict'; -import useClientContext from '@/hooks/react-client/useClientContext'; -import { MatterContext } from '@/providers/matterProvider'; +import useClientContext from '#hooks/react-client/useClientContext'; +import { MatterContext } from '#providers/matterProvider'; describe('useClientContext', () => { it('should return client context values', () => { diff --git a/apps/site/hooks/react-client/__tests__/useCopyToClipboard.test.jsx b/apps/site/hooks/react-client/__tests__/useCopyToClipboard.test.jsx index 1a9610c0fded1..505dd1bd6944a 100644 --- a/apps/site/hooks/react-client/__tests__/useCopyToClipboard.test.jsx +++ b/apps/site/hooks/react-client/__tests__/useCopyToClipboard.test.jsx @@ -4,7 +4,7 @@ import { setTimeout } from 'node:timers/promises'; import { render, fireEvent, screen } from '@testing-library/react'; -import useCopyToClipboard from '@/hooks/react-client/useCopyToClipboard'; +import useCopyToClipboard from '#hooks/react-client/useCopyToClipboard'; navigator.clipboard = { writeText: () => {} }; diff --git a/apps/site/hooks/react-client/__tests__/useDetectOS.test.mjs b/apps/site/hooks/react-client/__tests__/useDetectOS.test.mjs index c410bba50d133..f08cc936062ad 100644 --- a/apps/site/hooks/react-client/__tests__/useDetectOS.test.mjs +++ b/apps/site/hooks/react-client/__tests__/useDetectOS.test.mjs @@ -3,7 +3,7 @@ import { describe, it, afterEach } from 'node:test'; import { renderHook, waitFor } from '@testing-library/react'; -import useDetectOS from '@/hooks/react-client/useDetectOS'; +import useDetectOS from '#hooks/react-client/useDetectOS'; const windowsUserAgent = 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36'; diff --git a/apps/site/hooks/react-client/__tests__/useMediaQuery.test.mjs b/apps/site/hooks/react-client/__tests__/useMediaQuery.test.mjs index c7b0cf0aca981..7d7dcd195ca85 100644 --- a/apps/site/hooks/react-client/__tests__/useMediaQuery.test.mjs +++ b/apps/site/hooks/react-client/__tests__/useMediaQuery.test.mjs @@ -3,7 +3,7 @@ import { describe, it } from 'node:test'; import { renderHook } from '@testing-library/react'; -import useMediaQuery from '@/hooks/react-client/useMediaQuery'; +import useMediaQuery from '#hooks/react-client/useMediaQuery'; const noop = () => {}; diff --git a/apps/site/hooks/react-client/__tests__/useNotification.test.jsx b/apps/site/hooks/react-client/__tests__/useNotification.test.jsx index 3748584eff189..8f3caf1d8565f 100644 --- a/apps/site/hooks/react-client/__tests__/useNotification.test.jsx +++ b/apps/site/hooks/react-client/__tests__/useNotification.test.jsx @@ -3,8 +3,8 @@ import { render } from '@testing-library/react'; import { describe, it } from 'node:test'; import assert from 'node:assert/strict'; -import useNotification from '@/hooks/react-client/useNotification'; -import { NotificationProvider } from '@/providers/notificationProvider'; +import useNotification from '#hooks/react-client/useNotification'; +import { NotificationProvider } from '#providers/notificationProvider'; describe('useNotification', () => { it('should return the notification dispatch function', () => { diff --git a/apps/site/hooks/react-client/useClientContext.ts b/apps/site/hooks/react-client/useClientContext.ts index a323ab0428fdb..415590aad1dd9 100644 --- a/apps/site/hooks/react-client/useClientContext.ts +++ b/apps/site/hooks/react-client/useClientContext.ts @@ -2,8 +2,8 @@ import { useContext } from 'react'; -import { MatterContext } from '@/providers/matterProvider'; -import type { ClientSharedServerContext } from '@/types'; +import { MatterContext } from '#providers/matterProvider'; +import type { ClientSharedServerContext } from '#types'; const useClientContext = (): ClientSharedServerContext => { const { diff --git a/apps/site/hooks/react-client/useDetectOS.ts b/apps/site/hooks/react-client/useDetectOS.ts index 68854dee2abf5..0e9ca76f6e908 100644 --- a/apps/site/hooks/react-client/useDetectOS.ts +++ b/apps/site/hooks/react-client/useDetectOS.ts @@ -2,9 +2,9 @@ import { useEffect, useState } from 'react'; -import type { UserArchitecture, UserBitness, UserOS } from '@/types/userOS'; -import { detectOS } from '@/util/detectOS'; -import { getHighEntropyValues } from '@/util/getHighEntropyValues'; +import type { UserArchitecture, UserBitness, UserOS } from '#types/userOS'; +import { detectOS } from '#util/detectOS'; +import { getHighEntropyValues } from '#util/getHighEntropyValues'; type UserOSState = { os: UserOS | 'LOADING'; diff --git a/apps/site/hooks/react-client/useNavigationState.ts b/apps/site/hooks/react-client/useNavigationState.ts index c899ec6957a26..bb5a93eda1197 100644 --- a/apps/site/hooks/react-client/useNavigationState.ts +++ b/apps/site/hooks/react-client/useNavigationState.ts @@ -3,8 +3,8 @@ import type { RefObject } from 'react'; import { useContext, useEffect } from 'react'; -import { NavigationStateContext } from '@/providers/navigationStateProvider'; -import { debounce } from '@/util/debounce'; +import { NavigationStateContext } from '#providers/navigationStateProvider'; +import { debounce } from '#util/debounce'; const useNavigationState = ( id: string, diff --git a/apps/site/hooks/react-client/useNotification.ts b/apps/site/hooks/react-client/useNotification.ts index 9e8343b4a7534..524239ffca57b 100644 --- a/apps/site/hooks/react-client/useNotification.ts +++ b/apps/site/hooks/react-client/useNotification.ts @@ -2,7 +2,7 @@ import { useContext } from 'react'; -import { NotificationDispatch } from '@/providers/notificationProvider'; +import { NotificationDispatch } from '#providers/notificationProvider'; const useNotification = () => useContext(NotificationDispatch); diff --git a/apps/site/hooks/react-generic/useSiteNavigation.ts b/apps/site/hooks/react-generic/useSiteNavigation.ts index a6c2024f00783..9ad6b40abf084 100644 --- a/apps/site/hooks/react-generic/useSiteNavigation.ts +++ b/apps/site/hooks/react-generic/useSiteNavigation.ts @@ -2,12 +2,8 @@ import type { RichTranslationValues } from 'next-intl'; import { useTranslations } from 'next-intl'; import type { HTMLAttributeAnchorTarget } from 'react'; -import { siteNavigation } from '@/next.json.mjs'; -import type { - FormattedMessage, - NavigationEntry, - NavigationKeys, -} from '@/types'; +import { siteNavigation } from '#next.json.mjs'; +import type { FormattedMessage, NavigationEntry, NavigationKeys } from '#types'; type Context = Record; type Navigation = Record; diff --git a/apps/site/hooks/react-server/useClientContext.ts b/apps/site/hooks/react-server/useClientContext.ts index f50800fb073b6..0c60368c2150a 100644 --- a/apps/site/hooks/react-server/useClientContext.ts +++ b/apps/site/hooks/react-server/useClientContext.ts @@ -1,4 +1,4 @@ -import { getClientContext } from '@/client-context'; +import { getClientContext } from '#client-context'; const useClientContext = () => getClientContext(); diff --git a/apps/site/i18n.tsx b/apps/site/i18n.tsx index 81209f2b5ed71..cb247e3a0a762 100644 --- a/apps/site/i18n.tsx +++ b/apps/site/i18n.tsx @@ -2,7 +2,7 @@ import { importLocale } from '@node-core/website-i18n'; import defaultMessages from '@node-core/website-i18n/locales/en.json'; import { getRequestConfig } from 'next-intl/server'; -import { availableLocaleCodes, defaultLocale } from '@/next.locales.mjs'; +import { availableLocaleCodes, defaultLocale } from '#next.locales.mjs'; import deepMerge from './util/deepMerge'; diff --git a/apps/site/layouts/About.tsx b/apps/site/layouts/About.tsx index 7deab417f4fae..6a48bc8f77a10 100644 --- a/apps/site/layouts/About.tsx +++ b/apps/site/layouts/About.tsx @@ -1,12 +1,12 @@ import type { FC, PropsWithChildren } from 'react'; -import WithBreadcrumbs from '@/components/withBreadcrumbs'; -import WithFooter from '@/components/withFooter'; -import WithMetaBar from '@/components/withMetaBar'; -import WithNavBar from '@/components/withNavBar'; -import WithSidebar from '@/components/withSidebar'; -import ArticleLayout from '@/layouts/Article'; -import { ReleaseModalProvider } from '@/providers/releaseModalProvider'; +import WithBreadcrumbs from '#components/withBreadcrumbs'; +import WithFooter from '#components/withFooter'; +import WithMetaBar from '#components/withMetaBar'; +import WithNavBar from '#components/withNavBar'; +import WithSidebar from '#components/withSidebar'; +import ArticleLayout from '#layouts/Article'; +import { ReleaseModalProvider } from '#providers/releaseModalProvider'; const AboutLayout: FC = ({ children }) => ( diff --git a/apps/site/layouts/ArticlePage.tsx b/apps/site/layouts/ArticlePage.tsx index a2cadddc0cfb2..2ed3b63be615a 100644 --- a/apps/site/layouts/ArticlePage.tsx +++ b/apps/site/layouts/ArticlePage.tsx @@ -1,9 +1,9 @@ import type { FC, PropsWithChildren } from 'react'; -import WithMetaBar from '@/components/withMetaBar'; -import WithNavBar from '@/components/withNavBar'; -import WithSidebar from '@/components/withSidebar'; -import ArticleLayout from '@/layouts/Article'; +import WithMetaBar from '#components/withMetaBar'; +import WithNavBar from '#components/withNavBar'; +import WithSidebar from '#components/withSidebar'; +import ArticleLayout from '#layouts/Article'; const ArticlePageLayout: FC = ({ children }) => ( <> diff --git a/apps/site/layouts/Base.tsx b/apps/site/layouts/Base.tsx index 7176b805e5206..38c03e263cb94 100644 --- a/apps/site/layouts/Base.tsx +++ b/apps/site/layouts/Base.tsx @@ -2,8 +2,8 @@ import type { FC, PropsWithChildren } from 'react'; -import { NavigationStateProvider } from '@/providers/navigationStateProvider'; -import { NotificationProvider } from '@/providers/notificationProvider'; +import { NavigationStateProvider } from '#providers/navigationStateProvider'; +import { NotificationProvider } from '#providers/notificationProvider'; import styles from './layouts.module.css'; diff --git a/apps/site/layouts/Blog.tsx b/apps/site/layouts/Blog.tsx index b8a57d5a9a5f3..6952c32b55e23 100644 --- a/apps/site/layouts/Blog.tsx +++ b/apps/site/layouts/Blog.tsx @@ -1,13 +1,13 @@ import { getTranslations } from 'next-intl/server'; import type { FC } from 'react'; -import { getClientContext } from '@/client-context'; -import BlogHeader from '@/components/Blog/BlogHeader'; -import WithBlogCategories from '@/components/withBlogCategories'; -import WithFooter from '@/components/withFooter'; -import WithNavBar from '@/components/withNavBar'; -import getBlogData from '@/next-data/blogData'; -import type { BlogCategory } from '@/types'; +import { getClientContext } from '#client-context'; +import BlogHeader from '#components/Blog/BlogHeader'; +import WithBlogCategories from '#components/withBlogCategories'; +import WithFooter from '#components/withFooter'; +import WithNavBar from '#components/withNavBar'; +import getBlogData from '#next-data/blogData'; +import type { BlogCategory } from '#types'; import styles from './layouts.module.css'; diff --git a/apps/site/layouts/Default.tsx b/apps/site/layouts/Default.tsx index ad903411dadca..f9f5ae7954239 100644 --- a/apps/site/layouts/Default.tsx +++ b/apps/site/layouts/Default.tsx @@ -1,9 +1,9 @@ import type { FC, PropsWithChildren } from 'react'; -import WithFooter from '@/components/withFooter'; -import WithNavBar from '@/components/withNavBar'; -import WithSidebar from '@/components/withSidebar'; -import ArticleLayout from '@/layouts/Article'; +import WithFooter from '#components/withFooter'; +import WithNavBar from '#components/withNavBar'; +import WithSidebar from '#components/withSidebar'; +import ArticleLayout from '#layouts/Article'; const DefaultLayout: FC = ({ children }) => ( <> diff --git a/apps/site/layouts/Download.tsx b/apps/site/layouts/Download.tsx index cedae914aab5a..b25d66524825d 100644 --- a/apps/site/layouts/Download.tsx +++ b/apps/site/layouts/Download.tsx @@ -1,9 +1,9 @@ import type { FC, PropsWithChildren } from 'react'; -import { getClientContext } from '@/client-context'; -import WithDownloadSection from '@/components/withDownloadSection'; -import WithFooter from '@/components/withFooter'; -import WithNavBar from '@/components/withNavBar'; +import { getClientContext } from '#client-context'; +import WithDownloadSection from '#components/withDownloadSection'; +import WithFooter from '#components/withFooter'; +import WithNavBar from '#components/withNavBar'; import styles from './layouts.module.css'; diff --git a/apps/site/layouts/GlowingBackdrop.tsx b/apps/site/layouts/GlowingBackdrop.tsx index 491eb03b0bc7a..8724f0d2bfdc9 100644 --- a/apps/site/layouts/GlowingBackdrop.tsx +++ b/apps/site/layouts/GlowingBackdrop.tsx @@ -2,8 +2,8 @@ import GlowingBackdrop from '@node-core/ui-components/Common/GlowingBackdrop'; import classNames from 'classnames'; import type { FC, PropsWithChildren } from 'react'; -import WithFooter from '@/components/withFooter'; -import WithNavBar from '@/components/withNavBar'; +import WithFooter from '#components/withFooter'; +import WithNavBar from '#components/withNavBar'; import styles from './layouts.module.css'; diff --git a/apps/site/layouts/Learn.tsx b/apps/site/layouts/Learn.tsx index a42e6ae5a221c..c20621ebecd26 100644 --- a/apps/site/layouts/Learn.tsx +++ b/apps/site/layouts/Learn.tsx @@ -1,12 +1,12 @@ import type { FC, PropsWithChildren } from 'react'; -import WithBreadcrumbs from '@/components/withBreadcrumbs'; -import WithFooter from '@/components/withFooter'; -import WithMetaBar from '@/components/withMetaBar'; -import WithNavBar from '@/components/withNavBar'; -import WithProgressionSidebar from '@/components/withProgressionSidebar'; -import WithSidebarCrossLinks from '@/components/withSidebarCrossLinks'; -import ArticleLayout from '@/layouts/Article'; +import WithBreadcrumbs from '#components/withBreadcrumbs'; +import WithFooter from '#components/withFooter'; +import WithMetaBar from '#components/withMetaBar'; +import WithNavBar from '#components/withNavBar'; +import WithProgressionSidebar from '#components/withProgressionSidebar'; +import WithSidebarCrossLinks from '#components/withSidebarCrossLinks'; +import ArticleLayout from '#layouts/Article'; const LearnLayout: FC = ({ children }) => ( <> diff --git a/apps/site/layouts/Post.tsx b/apps/site/layouts/Post.tsx index 57ee76f80347d..5645dd28aeacd 100644 --- a/apps/site/layouts/Post.tsx +++ b/apps/site/layouts/Post.tsx @@ -1,14 +1,14 @@ import Preview from '@node-core/ui-components/Common/Preview'; import type { FC, PropsWithChildren } from 'react'; -import WithAvatarGroup from '@/components/withAvatarGroup'; -import WithBlogCrossLinks from '@/components/withBlogCrossLinks'; -import WithFooter from '@/components/withFooter'; -import WithMetaBar from '@/components/withMetaBar'; -import WithNavBar from '@/components/withNavBar'; -import { useClientContext } from '@/hooks/react-server'; -import { mapAuthorToCardAuthors } from '@/util/authorUtils'; -import { mapBlogCategoryToPreviewType } from '@/util/blogUtils'; +import WithAvatarGroup from '#components/withAvatarGroup'; +import WithBlogCrossLinks from '#components/withBlogCrossLinks'; +import WithFooter from '#components/withFooter'; +import WithMetaBar from '#components/withMetaBar'; +import WithNavBar from '#components/withNavBar'; +import { useClientContext } from '#hooks/react-server'; +import { mapAuthorToCardAuthors } from '#util/authorUtils'; +import { mapBlogCategoryToPreviewType } from '#util/blogUtils'; import styles from './layouts.module.css'; diff --git a/apps/site/middleware.ts b/apps/site/middleware.ts index 95183c635d1c8..bc8b9fdeecadf 100644 --- a/apps/site/middleware.ts +++ b/apps/site/middleware.ts @@ -1,6 +1,6 @@ import createMiddleware from 'next-intl/middleware'; -import { availableLocaleCodes, defaultLocale } from '@/next.locales.mjs'; +import { availableLocaleCodes, defaultLocale } from '#next.locales.mjs'; export default createMiddleware({ // A list of all locales that are supported diff --git a/apps/site/next-data/blogData.ts b/apps/site/next-data/blogData.ts index a5d1f8e9d704b..391790640b1bd 100644 --- a/apps/site/next-data/blogData.ts +++ b/apps/site/next-data/blogData.ts @@ -2,8 +2,8 @@ import { ENABLE_STATIC_EXPORT, NEXT_DATA_URL, IS_NOT_VERCEL_RUNTIME_ENV, -} from '@/next.constants.mjs'; -import type { BlogCategory, BlogPostsRSC } from '@/types'; +} from '#next.constants.mjs'; +import type { BlogCategory, BlogPostsRSC } from '#types'; const getBlogData = ( cat: BlogCategory, @@ -14,7 +14,7 @@ const getBlogData = ( // the data directly within the current thread, which will anyways be loaded only once // We use lazy-imports to prevent `provideBlogData` from executing on import if (ENABLE_STATIC_EXPORT || IS_NOT_VERCEL_RUNTIME_ENV) { - return import('@/next-data/providers/blogData').then( + return import('#next-data/providers/blogData').then( ({ provideBlogPosts, providePaginatedBlogPosts }) => page ? providePaginatedBlogPosts(cat, page) : provideBlogPosts(cat) ); diff --git a/apps/site/next-data/downloadSnippets.ts b/apps/site/next-data/downloadSnippets.ts index d371d07388c9e..6c20f8b45abcd 100644 --- a/apps/site/next-data/downloadSnippets.ts +++ b/apps/site/next-data/downloadSnippets.ts @@ -2,9 +2,9 @@ import { ENABLE_STATIC_EXPORT, NEXT_DATA_URL, IS_NOT_VERCEL_RUNTIME_ENV, -} from '@/next.constants.mjs'; -import { availableLocaleCodes } from '@/next.locales.mjs'; -import type { DownloadSnippet } from '@/types'; +} from '#next.constants.mjs'; +import { availableLocaleCodes } from '#next.locales.mjs'; +import type { DownloadSnippet } from '#types'; export default async function getDownloadSnippets( lang: string @@ -21,7 +21,7 @@ export default async function getDownloadSnippets( // We use lazy-imports to prevent `provideBlogData` from executing on import if (ENABLE_STATIC_EXPORT || IS_NOT_VERCEL_RUNTIME_ENV) { const { default: provideDownloadSnippets } = await import( - '@/next-data/providers/downloadSnippets' + '#next-data/providers/downloadSnippets' ); return provideDownloadSnippets(lang)!; } diff --git a/apps/site/next-data/generators/__tests__/releaseData.test.mjs b/apps/site/next-data/generators/__tests__/releaseData.test.mjs index 2201969e1f962..314411ff295fd 100644 --- a/apps/site/next-data/generators/__tests__/releaseData.test.mjs +++ b/apps/site/next-data/generators/__tests__/releaseData.test.mjs @@ -32,7 +32,7 @@ describe('generateReleaseData', () => { }); const { default: generateReleaseData } = await import( - '@/next-data/generators/releaseData.mjs' + '#next-data/generators/releaseData.mjs' ); const result = await generateReleaseData(); diff --git a/apps/site/next-data/generators/__tests__/websiteFeeds.test.mjs b/apps/site/next-data/generators/__tests__/websiteFeeds.test.mjs index 4e7f53413a9c1..739cd048a8f78 100644 --- a/apps/site/next-data/generators/__tests__/websiteFeeds.test.mjs +++ b/apps/site/next-data/generators/__tests__/websiteFeeds.test.mjs @@ -1,7 +1,7 @@ import assert from 'node:assert/strict'; import { describe, it } from 'node:test'; -import generateWebsiteFeeds from '@/next-data/generators/websiteFeeds.mjs'; +import generateWebsiteFeeds from '#next-data/generators/websiteFeeds.mjs'; import { BASE_URL, BASE_PATH } from '../../../next.constants.mjs'; import { siteConfig } from '../../../next.json.mjs'; diff --git a/apps/site/next-data/providers/blogData.ts b/apps/site/next-data/providers/blogData.ts index bf06a7891665e..7d2bb0d3e34ff 100644 --- a/apps/site/next-data/providers/blogData.ts +++ b/apps/site/next-data/providers/blogData.ts @@ -1,8 +1,8 @@ import { cache } from 'react'; -import generateBlogData from '@/next-data/generators/blogData.mjs'; -import { BLOG_POSTS_PER_PAGE } from '@/next.constants.mjs'; -import type { BlogCategory, BlogPostsRSC } from '@/types'; +import generateBlogData from '#next-data/generators/blogData.mjs'; +import { BLOG_POSTS_PER_PAGE } from '#next.constants.mjs'; +import type { BlogCategory, BlogPostsRSC } from '#types'; const { categories, posts } = await generateBlogData(); diff --git a/apps/site/next-data/providers/downloadSnippets.ts b/apps/site/next-data/providers/downloadSnippets.ts index 29b5ec7f62631..51c376b273b70 100644 --- a/apps/site/next-data/providers/downloadSnippets.ts +++ b/apps/site/next-data/providers/downloadSnippets.ts @@ -1,6 +1,6 @@ import { cache } from 'react'; -import generateDownloadSnippets from '@/next-data/generators/downloadSnippets.mjs'; +import generateDownloadSnippets from '#next-data/generators/downloadSnippets.mjs'; const downloadSnippets = await generateDownloadSnippets(); diff --git a/apps/site/next-data/providers/releaseData.ts b/apps/site/next-data/providers/releaseData.ts index 515be9c92f941..73f4e0a8bad9e 100644 --- a/apps/site/next-data/providers/releaseData.ts +++ b/apps/site/next-data/providers/releaseData.ts @@ -1,6 +1,6 @@ import { cache } from 'react'; -import generateReleaseData from '@/next-data/generators/releaseData.mjs'; +import generateReleaseData from '#next-data/generators/releaseData.mjs'; const releaseData = await generateReleaseData(); diff --git a/apps/site/next-data/providers/websiteFeeds.ts b/apps/site/next-data/providers/websiteFeeds.ts index 79f9ef404d81b..5ef4dec4acce6 100644 --- a/apps/site/next-data/providers/websiteFeeds.ts +++ b/apps/site/next-data/providers/websiteFeeds.ts @@ -1,7 +1,7 @@ import { cache } from 'react'; -import generateWebsiteFeeds from '@/next-data/generators/websiteFeeds.mjs'; -import { provideBlogPosts } from '@/next-data/providers/blogData'; +import generateWebsiteFeeds from '#next-data/generators/websiteFeeds.mjs'; +import { provideBlogPosts } from '#next-data/providers/blogData'; const websiteFeeds = generateWebsiteFeeds(provideBlogPosts('all')); diff --git a/apps/site/next-data/releaseData.ts b/apps/site/next-data/releaseData.ts index deafe804129a0..288cfab99541a 100644 --- a/apps/site/next-data/releaseData.ts +++ b/apps/site/next-data/releaseData.ts @@ -2,8 +2,8 @@ import { ENABLE_STATIC_EXPORT, NEXT_DATA_URL, IS_NOT_VERCEL_RUNTIME_ENV, -} from '@/next.constants.mjs'; -import type { NodeRelease } from '@/types'; +} from '#next.constants.mjs'; +import type { NodeRelease } from '#types'; const getReleaseData = (): Promise> => { // When we're using Static Exports the Next.js Server is not running (during build-time) @@ -11,7 +11,7 @@ const getReleaseData = (): Promise> => { // the data directly within the current thread, which will anyways be loaded only once // We use lazy-imports to prevent `provideBlogData` from executing on import if (ENABLE_STATIC_EXPORT || IS_NOT_VERCEL_RUNTIME_ENV) { - return import('@/next-data/providers/releaseData').then( + return import('#next-data/providers/releaseData').then( ({ default: provideReleaseData }) => provideReleaseData() ); } diff --git a/apps/site/package.json b/apps/site/package.json index 266b9d4093df6..982205091eafb 100644 --- a/apps/site/package.json +++ b/apps/site/package.json @@ -108,5 +108,16 @@ "typescript-eslint": "~8.31.1", "unified": "^11.0.5", "user-agent-data-types": "0.4.2" + }, + "imports": { + "#*": [ + "./*", + "./*.tsx", + "./*/index.tsx", + "./*.ts", + "./*/index.ts", + "./*.mjs", + "./*/index.mjs" + ] } } diff --git a/apps/site/providers/__tests__/matterProvider.test.jsx b/apps/site/providers/__tests__/matterProvider.test.jsx index a9248f3535231..91b12a44b7e10 100644 --- a/apps/site/providers/__tests__/matterProvider.test.jsx +++ b/apps/site/providers/__tests__/matterProvider.test.jsx @@ -3,7 +3,7 @@ import assert from 'node:assert/strict'; import { act, render } from '@testing-library/react'; -import { MatterProvider, MatterContext } from '@/providers/matterProvider'; +import { MatterProvider, MatterContext } from '#providers/matterProvider'; const mockContext = { frontmatter: {}, diff --git a/apps/site/providers/__tests__/navigationStateProvider.test.jsx b/apps/site/providers/__tests__/navigationStateProvider.test.jsx index b91e0615735d4..c9aa5a35cec6a 100644 --- a/apps/site/providers/__tests__/navigationStateProvider.test.jsx +++ b/apps/site/providers/__tests__/navigationStateProvider.test.jsx @@ -3,7 +3,7 @@ import assert from 'node:assert/strict'; import { render } from '@testing-library/react'; -import { NavigationStateProvider } from '@/providers/navigationStateProvider'; +import { NavigationStateProvider } from '#providers/navigationStateProvider'; describe('NavigationStateProvider', () => { it('should render without crashing', () => { diff --git a/apps/site/providers/__tests__/notificationProvider.test.jsx b/apps/site/providers/__tests__/notificationProvider.test.jsx index 98b6bb8a80708..739d069f2a355 100644 --- a/apps/site/providers/__tests__/notificationProvider.test.jsx +++ b/apps/site/providers/__tests__/notificationProvider.test.jsx @@ -7,7 +7,7 @@ import userEvent from '@testing-library/user-event'; import { NotificationProvider, NotificationDispatch, -} from '@/providers/notificationProvider'; +} from '#providers/notificationProvider'; describe('NotificationProvider', () => { it('renders children and shows notification with the provided message', async t => { diff --git a/apps/site/providers/__tests__/releaseProvider.test.jsx b/apps/site/providers/__tests__/releaseProvider.test.jsx index ed3031bf24f7e..a1d8ee7c10698 100644 --- a/apps/site/providers/__tests__/releaseProvider.test.jsx +++ b/apps/site/providers/__tests__/releaseProvider.test.jsx @@ -3,7 +3,7 @@ import assert from 'node:assert/strict'; import { render } from '@testing-library/react'; -import { ReleaseProvider, ReleasesProvider } from '@/providers/releaseProvider'; +import { ReleaseProvider, ReleasesProvider } from '#providers/releaseProvider'; describe('ReleaseProvider', () => { it('should render without crashing', () => { diff --git a/apps/site/providers/__tests__/themeProvider.test.jsx b/apps/site/providers/__tests__/themeProvider.test.jsx index de0b4960ea5cd..90e07df69afbc 100644 --- a/apps/site/providers/__tests__/themeProvider.test.jsx +++ b/apps/site/providers/__tests__/themeProvider.test.jsx @@ -16,7 +16,7 @@ describe('ThemeProvider', () => { }, }); - const { ThemeProvider } = await import('@/providers/themeProvider'); + const { ThemeProvider } = await import('#providers/themeProvider'); const { container } = render( diff --git a/apps/site/providers/matterProvider.tsx b/apps/site/providers/matterProvider.tsx index ba028bf3edccd..c6a496ebaa3b0 100644 --- a/apps/site/providers/matterProvider.tsx +++ b/apps/site/providers/matterProvider.tsx @@ -3,9 +3,9 @@ import { createContext } from 'react'; import type { FC, PropsWithChildren } from 'react'; -import { useDetectOS } from '@/hooks'; -import type { ClientSharedServerContext } from '@/types'; -import { assignClientContext } from '@/util/assignClientContext'; +import { useDetectOS } from '#hooks'; +import type { ClientSharedServerContext } from '#types'; +import { assignClientContext } from '#util/assignClientContext'; export const MatterContext = createContext( assignClientContext({}) diff --git a/apps/site/providers/releaseModalProvider.tsx b/apps/site/providers/releaseModalProvider.tsx index acbcb17cc8e5c..5c1e21171677d 100644 --- a/apps/site/providers/releaseModalProvider.tsx +++ b/apps/site/providers/releaseModalProvider.tsx @@ -3,8 +3,8 @@ import { createContext, useState } from 'react'; import type { FC, PropsWithChildren } from 'react'; -import ReleaseModal from '@/components/Downloads/ReleaseModal'; -import type { NodeRelease } from '@/types'; +import ReleaseModal from '#components/Downloads/ReleaseModal'; +import type { NodeRelease } from '#types'; type ReleaseModalContextType = { activeRelease: NodeRelease | null; diff --git a/apps/site/providers/releaseProvider.tsx b/apps/site/providers/releaseProvider.tsx index 80105503d5aa4..98518113d818f 100644 --- a/apps/site/providers/releaseProvider.tsx +++ b/apps/site/providers/releaseProvider.tsx @@ -9,9 +9,9 @@ import { useReducer, } from 'react'; -import reducer, { getActions, releaseState } from '@/reducers/releaseReducer'; -import type { NodeRelease } from '@/types'; -import type * as Types from '@/types/release'; +import reducer, { getActions, releaseState } from '#reducers/releaseReducer'; +import type { NodeRelease } from '#types'; +import type * as Types from '#types/release'; export const ReleasesContext = createContext({ releases: [], diff --git a/apps/site/providers/themeProvider.tsx b/apps/site/providers/themeProvider.tsx index 1f11276f0b54d..57f51b2342cb3 100644 --- a/apps/site/providers/themeProvider.tsx +++ b/apps/site/providers/themeProvider.tsx @@ -3,7 +3,7 @@ import { ThemeProvider as NextThemeProvider } from 'next-themes'; import type { FC, PropsWithChildren } from 'react'; -import { THEME_STORAGE_KEY } from '@/next.constants.mjs'; +import { THEME_STORAGE_KEY } from '#next.constants.mjs'; export const ThemeProvider: FC = ({ children }) => ( { it('should return the initial state', () => { diff --git a/apps/site/reducers/releaseReducer.ts b/apps/site/reducers/releaseReducer.ts index 6b475f170e92c..b64f432d25243 100644 --- a/apps/site/reducers/releaseReducer.ts +++ b/apps/site/reducers/releaseReducer.ts @@ -1,6 +1,6 @@ import type { Dispatch } from 'react'; -import type * as Types from '@/types/release'; +import type * as Types from '#types/release'; export const releaseState: Types.ReleaseState = { // The selected Node.js version to be downloaded diff --git a/apps/site/tsconfig.json b/apps/site/tsconfig.json index aa0bedd8483c1..8b985a1ab27fc 100644 --- a/apps/site/tsconfig.json +++ b/apps/site/tsconfig.json @@ -14,10 +14,6 @@ "isolatedModules": true, "jsx": "preserve", "incremental": true, - "paths": { - "@/*": ["./*"], - "@node-core/ui-components/*": ["../../packages/ui-components/*"] - }, "plugins": [{ "name": "next" }], "baseUrl": "." }, diff --git a/apps/site/types/release.ts b/apps/site/types/release.ts index c06919cac9a8a..2dbf313efe737 100644 --- a/apps/site/types/release.ts +++ b/apps/site/types/release.ts @@ -1,6 +1,6 @@ -import type { DownloadSnippet } from '@/types/downloads'; -import type { NodeRelease } from '@/types/releases'; -import type { UserOS, UserPlatform } from '@/types/userOS'; +import type { DownloadSnippet } from '#types/downloads'; +import type { NodeRelease } from '#types/releases'; +import type { UserOS, UserPlatform } from '#types/userOS'; export type InstallationMethod = | 'NVM' diff --git a/apps/site/types/server.ts b/apps/site/types/server.ts index e668cf6636e0d..55d2f03203738 100644 --- a/apps/site/types/server.ts +++ b/apps/site/types/server.ts @@ -1,8 +1,8 @@ import type { Heading } from '@vcarl/remark-headings'; import type { ReadTimeResults } from 'reading-time'; -import type { useDetectOS } from '@/hooks'; -import type { LegacyFrontMatter } from '@/types/frontmatter'; +import type { useDetectOS } from '#hooks'; +import type { LegacyFrontMatter } from '#types/frontmatter'; export interface ClientSharedServerContext extends ReturnType { diff --git a/apps/site/util/__tests__/assignClientContext.test.mjs b/apps/site/util/__tests__/assignClientContext.test.mjs index 2712f5856381d..7429e1cc140ad 100644 --- a/apps/site/util/__tests__/assignClientContext.test.mjs +++ b/apps/site/util/__tests__/assignClientContext.test.mjs @@ -1,7 +1,7 @@ import assert from 'node:assert/strict'; import { describe, it } from 'node:test'; -import { assignClientContext } from '@/util/assignClientContext'; +import { assignClientContext } from '#util/assignClientContext'; const mockContext = { frontmatter: { title: 'Sample Title' }, diff --git a/apps/site/util/__tests__/authorUtils.test.mjs b/apps/site/util/__tests__/authorUtils.test.mjs index 402a3033d6110..ca88938820b1a 100644 --- a/apps/site/util/__tests__/authorUtils.test.mjs +++ b/apps/site/util/__tests__/authorUtils.test.mjs @@ -6,7 +6,7 @@ import { getAuthorWithId, getAuthorWithName, getAuthors, -} from '@/util/authorUtils'; +} from '#util/authorUtils'; describe('mapAuthorToCardAuthors', () => { it('maps authors to card authors with default avatar source', () => { diff --git a/apps/site/util/__tests__/blogUtils.test.mjs b/apps/site/util/__tests__/blogUtils.test.mjs index 404d9622442fc..d9fffa3d8daf7 100644 --- a/apps/site/util/__tests__/blogUtils.test.mjs +++ b/apps/site/util/__tests__/blogUtils.test.mjs @@ -1,7 +1,7 @@ import assert from 'node:assert/strict'; import { describe, it } from 'node:test'; -import { mapBlogCategoryToPreviewType } from '@/util/blogUtils'; +import { mapBlogCategoryToPreviewType } from '#util/blogUtils'; describe('mapBlogCategoryToPreviewType', () => { it('returns the correct preview type for recognized categories', () => { diff --git a/apps/site/util/__tests__/dateUtils.test.mjs b/apps/site/util/__tests__/dateUtils.test.mjs index 754dfe3829ddc..b2e238d0cd355 100644 --- a/apps/site/util/__tests__/dateUtils.test.mjs +++ b/apps/site/util/__tests__/dateUtils.test.mjs @@ -1,7 +1,7 @@ import assert from 'node:assert/strict'; import { describe, it } from 'node:test'; -import { dateIsBetween } from '@/util/dateUtils'; +import { dateIsBetween } from '#util/dateUtils'; describe('dateIsBetween', () => { it('should return true when the current date is between start and end dates', () => { diff --git a/apps/site/util/__tests__/debounce.test.mjs b/apps/site/util/__tests__/debounce.test.mjs index b140d38332cd6..ec0100787d77f 100644 --- a/apps/site/util/__tests__/debounce.test.mjs +++ b/apps/site/util/__tests__/debounce.test.mjs @@ -1,7 +1,7 @@ import assert from 'node:assert/strict'; import { describe, it, beforeEach } from 'node:test'; -import { debounce } from '@/util/debounce'; +import { debounce } from '#util/debounce'; describe('debounce', () => { beforeEach(t => { diff --git a/apps/site/util/__tests__/deepMerge.test.mjs b/apps/site/util/__tests__/deepMerge.test.mjs index 48c680e5c1ad5..0e281f1831ec6 100644 --- a/apps/site/util/__tests__/deepMerge.test.mjs +++ b/apps/site/util/__tests__/deepMerge.test.mjs @@ -1,7 +1,7 @@ import assert from 'node:assert/strict'; import { describe, it } from 'node:test'; -import deepMerge from '@/util/deepMerge'; +import deepMerge from '#util/deepMerge'; describe('deepMerge', () => { it('should merge nested objects', () => { diff --git a/apps/site/util/__tests__/detectOS.test.mjs b/apps/site/util/__tests__/detectOS.test.mjs index b4b5c61054c76..ad037768d8e99 100644 --- a/apps/site/util/__tests__/detectOS.test.mjs +++ b/apps/site/util/__tests__/detectOS.test.mjs @@ -1,7 +1,7 @@ import assert from 'node:assert/strict'; import { describe, it } from 'node:test'; -import { detectOsInUserAgent, detectOS } from '@/util/detectOS'; +import { detectOsInUserAgent, detectOS } from '#util/detectOS'; const userAgentTestCases = [ [ diff --git a/apps/site/util/__tests__/downloadUtils.test.mjs b/apps/site/util/__tests__/downloadUtils.test.mjs index bbf2c839cdcd6..f63d9a30607db 100644 --- a/apps/site/util/__tests__/downloadUtils.test.mjs +++ b/apps/site/util/__tests__/downloadUtils.test.mjs @@ -8,7 +8,7 @@ import { INSTALL_METHODS, PACKAGE_MANAGERS, PLATFORMS, -} from '@/util/downloadUtils'; +} from '#util/downloadUtils'; describe('parseCompat', () => { it('should handle all OS, install methods, and package managers', () => { diff --git a/apps/site/util/__tests__/getHighEntropyValues.test.mjs b/apps/site/util/__tests__/getHighEntropyValues.test.mjs index dab3e3b9288a2..d2999e889c031 100644 --- a/apps/site/util/__tests__/getHighEntropyValues.test.mjs +++ b/apps/site/util/__tests__/getHighEntropyValues.test.mjs @@ -1,7 +1,7 @@ import assert from 'node:assert/strict'; import { describe, it, beforeEach } from 'node:test'; -import { getHighEntropyValues } from '@/util/getHighEntropyValues'; +import { getHighEntropyValues } from '#util/getHighEntropyValues'; const mock = () => Promise.resolve({ platform: 'Win32', architecture: 'x86' }); diff --git a/apps/site/util/__tests__/getLanguageDisplayName.test.mjs b/apps/site/util/__tests__/getLanguageDisplayName.test.mjs index f89094b75ab36..2b482db58345b 100644 --- a/apps/site/util/__tests__/getLanguageDisplayName.test.mjs +++ b/apps/site/util/__tests__/getLanguageDisplayName.test.mjs @@ -2,7 +2,7 @@ import assert from 'node:assert/strict'; import { it, describe, mock } from 'node:test'; describe('getLanguageDisplayName', async () => { - mock.module('@/shiki.config.mjs', { + mock.module('#shiki.config.mjs', { namedExports: { LANGUAGES: [ { name: 'javascript', aliases: ['js'], displayName: 'JavaScript' }, @@ -12,7 +12,7 @@ describe('getLanguageDisplayName', async () => { }); const { getLanguageDisplayName } = await import( - '@/util/getLanguageDisplayName' + '#util/getLanguageDisplayName' ); it('should return the display name for a known language', () => { diff --git a/apps/site/util/__tests__/getNodeApiLink.test.mjs b/apps/site/util/__tests__/getNodeApiLink.test.mjs index d9001247f47e4..c301453308a9f 100644 --- a/apps/site/util/__tests__/getNodeApiLink.test.mjs +++ b/apps/site/util/__tests__/getNodeApiLink.test.mjs @@ -1,7 +1,7 @@ import assert from 'node:assert/strict'; import { describe, it } from 'node:test'; -import { getNodeApiLink } from '@/util/getNodeApiLink'; +import { getNodeApiLink } from '#util/getNodeApiLink'; describe('getNodeApiLink', () => { it('should return the correct API link for versions >=0.3.1 and <0.5.1', () => { diff --git a/apps/site/util/__tests__/getNodeDownloadUrl.test.mjs b/apps/site/util/__tests__/getNodeDownloadUrl.test.mjs index 3f6828bcb74a2..96b24c1fe0877 100644 --- a/apps/site/util/__tests__/getNodeDownloadUrl.test.mjs +++ b/apps/site/util/__tests__/getNodeDownloadUrl.test.mjs @@ -1,7 +1,7 @@ import assert from 'node:assert/strict'; import { describe, it } from 'node:test'; -import { getNodeDownloadUrl } from '@/util/getNodeDownloadUrl'; +import { getNodeDownloadUrl } from '#util/getNodeDownloadUrl'; const version = 'v18.16.0'; diff --git a/apps/site/util/__tests__/getUserPlatform.test.mjs b/apps/site/util/__tests__/getUserPlatform.test.mjs index 9d867ad551b15..814ac4de9a9dd 100644 --- a/apps/site/util/__tests__/getUserPlatform.test.mjs +++ b/apps/site/util/__tests__/getUserPlatform.test.mjs @@ -1,7 +1,7 @@ import assert from 'node:assert/strict'; import { describe, it } from 'node:test'; -import { getUserPlatform } from '@/util/getUserPlatform'; +import { getUserPlatform } from '#util/getUserPlatform'; describe('getUserPlatform', () => { it('should return arm64 for arm + 64', () => { diff --git a/apps/site/util/__tests__/gitHubUtils.test.mjs b/apps/site/util/__tests__/gitHubUtils.test.mjs index 1bf9bddc87d78..a48792f2fa3d3 100644 --- a/apps/site/util/__tests__/gitHubUtils.test.mjs +++ b/apps/site/util/__tests__/gitHubUtils.test.mjs @@ -10,7 +10,7 @@ const { createGitHubSlugger, getGitHubBlobUrl, getGitHubApiDocsUrl, -} = await import('@/util/gitHubUtils'); +} = await import('#util/gitHubUtils'); describe('gitHubUtils', () => { it('getGitHubAvatarUrl returns the correct URL', () => { diff --git a/apps/site/util/__tests__/hexToRGBA.test.mjs b/apps/site/util/__tests__/hexToRGBA.test.mjs index f14cba50e53b4..d15fd7d477c14 100644 --- a/apps/site/util/__tests__/hexToRGBA.test.mjs +++ b/apps/site/util/__tests__/hexToRGBA.test.mjs @@ -1,7 +1,7 @@ import assert from 'node:assert/strict'; import { describe, it } from 'node:test'; -import { hexToRGBA } from '@/util/hexToRGBA'; +import { hexToRGBA } from '#util/hexToRGBA'; describe('hexToRGBA', () => { it('should convert a hex color to an rgba color', () => { diff --git a/apps/site/util/__tests__/imageUtils.test.mjs b/apps/site/util/__tests__/imageUtils.test.mjs index e4153e98cb498..f8f3d6af901c6 100644 --- a/apps/site/util/__tests__/imageUtils.test.mjs +++ b/apps/site/util/__tests__/imageUtils.test.mjs @@ -1,7 +1,7 @@ import assert from 'node:assert/strict'; import { describe, it } from 'node:test'; -import { isSvgImage } from '@/util/imageUtils'; +import { isSvgImage } from '#util/imageUtils'; describe('isSvgImage', () => { const testCases = [ { diff --git a/apps/site/util/__tests__/stringUtils.test.mjs b/apps/site/util/__tests__/stringUtils.test.mjs index 8ffb7ec6b54ab..671e7f554f48b 100644 --- a/apps/site/util/__tests__/stringUtils.test.mjs +++ b/apps/site/util/__tests__/stringUtils.test.mjs @@ -5,7 +5,7 @@ import { getAcronymFromString, parseRichTextIntoPlainText, dashToCamelCase, -} from '@/util/stringUtils'; +} from '#util/stringUtils'; describe('String utils', () => { it('getAcronymFromString returns the correct acronym', () => { diff --git a/apps/site/util/assignClientContext.ts b/apps/site/util/assignClientContext.ts index f9f2e3508ca78..12936c8534d29 100644 --- a/apps/site/util/assignClientContext.ts +++ b/apps/site/util/assignClientContext.ts @@ -1,4 +1,4 @@ -import type { ClientSharedServerContext } from '@/types'; +import type { ClientSharedServerContext } from '#types'; export const assignClientContext = ( props: Partial diff --git a/apps/site/util/authorUtils.ts b/apps/site/util/authorUtils.ts index 5a346a80bad95..f4e5588c5740a 100644 --- a/apps/site/util/authorUtils.ts +++ b/apps/site/util/authorUtils.ts @@ -1,7 +1,7 @@ -import { authors } from '@/next.json.mjs'; -import type { AuthorProps } from '@/types'; -import { getGitHubAvatarUrl } from '@/util/gitHubUtils'; -import { getAcronymFromString } from '@/util/stringUtils'; +import { authors } from '#next.json.mjs'; +import type { AuthorProps } from '#types'; +import { getGitHubAvatarUrl } from '#util/gitHubUtils'; +import { getAcronymFromString } from '#util/stringUtils'; export const mapAuthorToCardAuthors = (author: string) => { // Clears text in parentheses diff --git a/apps/site/util/blogUtils.ts b/apps/site/util/blogUtils.ts index 6f63355fbabd6..8c136639b3fe9 100644 --- a/apps/site/util/blogUtils.ts +++ b/apps/site/util/blogUtils.ts @@ -1,4 +1,4 @@ -import type { BlogPreviewType } from '@/types'; +import type { BlogPreviewType } from '#types'; export const mapBlogCategoryToPreviewType = (type: string): BlogPreviewType => { switch (type) { diff --git a/apps/site/util/detectOS.ts b/apps/site/util/detectOS.ts index 351eb1a9fe444..8cdf65342ebb1 100644 --- a/apps/site/util/detectOS.ts +++ b/apps/site/util/detectOS.ts @@ -1,4 +1,4 @@ -import type { UserOS } from '@/types/userOS'; +import type { UserOS } from '#types/userOS'; export const detectOsInUserAgent = (userAgent: string | undefined): UserOS => { // Match OS names and convert to uppercase directly if there's a match diff --git a/apps/site/util/downloadUtils.tsx b/apps/site/util/downloadUtils.tsx index f95e2a626e210..56257a574f565 100644 --- a/apps/site/util/downloadUtils.tsx +++ b/apps/site/util/downloadUtils.tsx @@ -4,9 +4,9 @@ import * as OSIcons from '@node-core/ui-components/Icons/OperatingSystem'; import * as PackageManagerIcons from '@node-core/ui-components/Icons/PackageManager'; import satisfies from 'semver/functions/satisfies'; -import type { NodeReleaseStatus } from '@/types'; -import type * as Types from '@/types/release'; -import type { UserOS, UserPlatform } from '@/types/userOS'; +import type { NodeReleaseStatus } from '#types'; +import type * as Types from '#types/release'; +import type { UserOS, UserPlatform } from '#types/userOS'; // This is a manual list of OS's that do not support/have a way of being installed // with an executable installer. This is used to disable the installer button. diff --git a/apps/site/util/getHighlighter.ts b/apps/site/util/getHighlighter.ts index 2a7b3778e84e8..059dbc2704170 100644 --- a/apps/site/util/getHighlighter.ts +++ b/apps/site/util/getHighlighter.ts @@ -1,7 +1,7 @@ import { createHighlighterCoreSync } from '@shikijs/core'; import { createJavaScriptRegexEngine } from '@shikijs/engine-javascript'; -import { LANGUAGES, DEFAULT_THEME } from '@/shiki.config.mjs'; +import { LANGUAGES, DEFAULT_THEME } from '#shiki.config.mjs'; // This creates a memoized minimal Shikiji Syntax Highlighter export const shiki = createHighlighterCoreSync({ diff --git a/apps/site/util/getLanguageDisplayName.ts b/apps/site/util/getLanguageDisplayName.ts index 5b1f167ab7092..f2997d7cf9f37 100644 --- a/apps/site/util/getLanguageDisplayName.ts +++ b/apps/site/util/getLanguageDisplayName.ts @@ -1,4 +1,4 @@ -import { LANGUAGES } from '@/shiki.config.mjs'; +import { LANGUAGES } from '#shiki.config.mjs'; export const getLanguageDisplayName = (language: string): string => { const languageByIdOrAlias = LANGUAGES.find( diff --git a/apps/site/util/getNodeApiLink.ts b/apps/site/util/getNodeApiLink.ts index 54286c83614b6..5d1462ce49413 100644 --- a/apps/site/util/getNodeApiLink.ts +++ b/apps/site/util/getNodeApiLink.ts @@ -1,6 +1,6 @@ import semVer from 'semver'; -import { DOCS_URL, DIST_URL } from '@/next.constants.mjs'; +import { DOCS_URL, DIST_URL } from '#next.constants.mjs'; export const getNodeApiLink = (version: string) => { if (semVer.satisfies(version, '>=0.3.1 <0.5.1')) { diff --git a/apps/site/util/getNodeDownloadUrl.ts b/apps/site/util/getNodeDownloadUrl.ts index 6b4fc34935cd0..5bed9ee8a4520 100644 --- a/apps/site/util/getNodeDownloadUrl.ts +++ b/apps/site/util/getNodeDownloadUrl.ts @@ -1,5 +1,5 @@ -import { DIST_URL } from '@/next.constants.mjs'; -import type { UserOS, UserPlatform } from '@/types/userOS'; +import { DIST_URL } from '#next.constants.mjs'; +import type { UserOS, UserPlatform } from '#types/userOS'; export type DownloadKind = 'installer' | 'binary' | 'source'; diff --git a/apps/site/util/getUserPlatform.ts b/apps/site/util/getUserPlatform.ts index 3341cccca5286..46161c4239b07 100644 --- a/apps/site/util/getUserPlatform.ts +++ b/apps/site/util/getUserPlatform.ts @@ -1,4 +1,4 @@ -import type * as Types from '@/types/userOS'; +import type * as Types from '#types/userOS'; // This method is used to retrieve a User's platform based on their architecture and bitness. // Note: This is only used for automatic Platform detection for supported platforms by using `useDetectOS` diff --git a/package.json b/package.json index e52404ead05a8..1d3bf0f7bc8d9 100644 --- a/package.json +++ b/package.json @@ -28,7 +28,7 @@ "storybook": "turbo run storybook", "storybook:build": "turbo run storybook:build", "test": "turbo test:unit", - "test:ci": "cross-env NODE_OPTIONS=\"--test-reporter=lcov --test-reporter-destination=lcov.info --test-reporter=junit --test-reporter-destination=junit.xml --test-reporter=@reporters/github --test-reporter-destination=stdout --test-reporter=spec --test-reporter-destination=stdout\" turbo test:unit" + "test:ci": "cross-env NODE_OPTIONS=\"--test-reporter=lcov --test-reporter-destination=lcov.info --test-reporter=junit --test-reporter-destination=junit.xml --test-reporter=@reporters/github --test-reporter-destination=stdout\" turbo test:unit" }, "dependencies": { "acorn": "^8.14.1", diff --git a/packages/i18n/lib/index.mjs b/packages/i18n/lib/index.mjs index 33a2602445a12..12956d80a643b 100644 --- a/packages/i18n/lib/index.mjs +++ b/packages/i18n/lib/index.mjs @@ -1,6 +1,6 @@ 'use strict'; -import localeConfig from '@node-core/website-i18n/config.json' with { type: 'json' }; +import localeConfig from '../config.json' with { type: 'json' }; /** * Imports a locale when exists from the locales directory diff --git a/packages/i18n/tsconfig.json b/packages/i18n/tsconfig.json index 096873c40fd5e..9882c04e6ef66 100644 --- a/packages/i18n/tsconfig.json +++ b/packages/i18n/tsconfig.json @@ -12,7 +12,6 @@ "resolveJsonModule": true, "isolatedModules": true, "incremental": true, - "paths": { "@/*": ["./*"] }, "baseUrl": ".", "outDir": "dist", "rootDir": "." diff --git a/packages/ui-components/Common/AlertBox/index.stories.tsx b/packages/ui-components/Common/AlertBox/index.stories.tsx index 5329069af7b89..7001fb69d8f65 100644 --- a/packages/ui-components/Common/AlertBox/index.stories.tsx +++ b/packages/ui-components/Common/AlertBox/index.stories.tsx @@ -1,7 +1,7 @@ import { ExclamationCircleIcon } from '@heroicons/react/24/solid'; import type { Meta as MetaObj, StoryObj } from '@storybook/react'; -import AlertBox from '@node-core/ui-components/Common/AlertBox'; +import AlertBox from '#Common/AlertBox'; type Story = StoryObj; type Meta = MetaObj; diff --git a/packages/ui-components/Common/AvatarGroup/Avatar/index.stories.tsx b/packages/ui-components/Common/AvatarGroup/Avatar/index.stories.tsx index b1520f9f3cf44..79003e6dd06bd 100644 --- a/packages/ui-components/Common/AvatarGroup/Avatar/index.stories.tsx +++ b/packages/ui-components/Common/AvatarGroup/Avatar/index.stories.tsx @@ -1,6 +1,6 @@ import type { Meta as MetaObj, StoryObj } from '@storybook/react'; -import Avatar from '@node-core/ui-components/Common/AvatarGroup/Avatar'; +import Avatar from '#Common/AvatarGroup/Avatar'; type Story = StoryObj; type Meta = MetaObj; diff --git a/packages/ui-components/Common/AvatarGroup/Avatar/index.tsx b/packages/ui-components/Common/AvatarGroup/Avatar/index.tsx index fcf15fc679599..eef9a82587266 100644 --- a/packages/ui-components/Common/AvatarGroup/Avatar/index.tsx +++ b/packages/ui-components/Common/AvatarGroup/Avatar/index.tsx @@ -2,10 +2,10 @@ import classNames from 'classnames'; import type { HTMLAttributes, ElementType } from 'react'; import { forwardRef } from 'react'; -import type { LinkLike } from '@node-core/ui-components/types'; - import styles from './index.module.css'; +import type { LinkLike } from '#types'; + export type AvatarProps = { image?: string; name?: string; diff --git a/packages/ui-components/Common/AvatarGroup/Overlay/index.stories.tsx b/packages/ui-components/Common/AvatarGroup/Overlay/index.stories.tsx index 77dbb5b53bd57..d6dbb6c49a5fd 100644 --- a/packages/ui-components/Common/AvatarGroup/Overlay/index.stories.tsx +++ b/packages/ui-components/Common/AvatarGroup/Overlay/index.stories.tsx @@ -1,6 +1,6 @@ import type { Meta as MetaObj, StoryObj } from '@storybook/react'; -import AvatarOverlay from '@node-core/ui-components/Common/AvatarGroup/Overlay'; +import AvatarOverlay from '#Common/AvatarGroup/Overlay'; type Story = StoryObj; type Meta = MetaObj; diff --git a/packages/ui-components/Common/AvatarGroup/Overlay/index.tsx b/packages/ui-components/Common/AvatarGroup/Overlay/index.tsx index 9e74a9a34b85c..05a5f0bad487e 100644 --- a/packages/ui-components/Common/AvatarGroup/Overlay/index.tsx +++ b/packages/ui-components/Common/AvatarGroup/Overlay/index.tsx @@ -1,10 +1,10 @@ import { ArrowUpRightIcon } from '@heroicons/react/24/solid'; import type { ComponentProps, FC } from 'react'; -import Avatar from '@node-core/ui-components/Common/AvatarGroup/Avatar'; - import styles from './index.module.css'; +import Avatar from '#Common/AvatarGroup/Avatar'; + export type AvatarOverlayProps = ComponentProps & { url?: string; }; diff --git a/packages/ui-components/Common/AvatarGroup/index.stories.tsx b/packages/ui-components/Common/AvatarGroup/index.stories.tsx index 928f369286ddb..4c05da1e63d95 100644 --- a/packages/ui-components/Common/AvatarGroup/index.stories.tsx +++ b/packages/ui-components/Common/AvatarGroup/index.stories.tsx @@ -1,6 +1,6 @@ import type { Meta as MetaObj, StoryObj } from '@storybook/react'; -import AvatarGroup from '@node-core/ui-components/Common/AvatarGroup'; +import AvatarGroup from '#Common/AvatarGroup'; type Story = StoryObj; type Meta = MetaObj; diff --git a/packages/ui-components/Common/AvatarGroup/index.tsx b/packages/ui-components/Common/AvatarGroup/index.tsx index 53bc0d6f61a03..449d1998e0d14 100644 --- a/packages/ui-components/Common/AvatarGroup/index.tsx +++ b/packages/ui-components/Common/AvatarGroup/index.tsx @@ -4,15 +4,15 @@ import classNames from 'classnames'; import type { FC, ElementType } from 'react'; import { useState, useMemo } from 'react'; -import type { AvatarProps } from '@node-core/ui-components/Common/AvatarGroup/Avatar'; -import Avatar from '@node-core/ui-components/Common/AvatarGroup/Avatar'; -import avatarstyles from '@node-core/ui-components/Common/AvatarGroup/Avatar/index.module.css'; -import AvatarOverlay from '@node-core/ui-components/Common/AvatarGroup/Overlay'; -import Tooltip from '@node-core/ui-components/Common/Tooltip'; -import type { LinkLike } from '@node-core/ui-components/types'; - import styles from './index.module.css'; +import type { AvatarProps } from '#Common/AvatarGroup/Avatar'; +import Avatar from '#Common/AvatarGroup/Avatar'; +import avatarstyles from '#Common/AvatarGroup/Avatar/index.module.css'; +import AvatarOverlay from '#Common/AvatarGroup/Overlay'; +import Tooltip from '#Common/Tooltip'; +import type { LinkLike } from '#types'; + type AvatarGroupProps = { avatars: Array; limit?: number; diff --git a/packages/ui-components/Common/Badge/index.stories.tsx b/packages/ui-components/Common/Badge/index.stories.tsx index 874ec97c26fd9..f558044bfedad 100644 --- a/packages/ui-components/Common/Badge/index.stories.tsx +++ b/packages/ui-components/Common/Badge/index.stories.tsx @@ -1,6 +1,6 @@ import type { Meta as MetaObj, StoryObj } from '@storybook/react'; -import Badge from '@node-core/ui-components/Common/Badge'; +import Badge from '#Common/Badge'; type Story = StoryObj; type Meta = MetaObj; diff --git a/packages/ui-components/Common/BadgeGroup/index.stories.tsx b/packages/ui-components/Common/BadgeGroup/index.stories.tsx index ac2fe623dfdb5..d9362b9613e37 100644 --- a/packages/ui-components/Common/BadgeGroup/index.stories.tsx +++ b/packages/ui-components/Common/BadgeGroup/index.stories.tsx @@ -1,6 +1,6 @@ import type { Meta as MetaObj, StoryObj } from '@storybook/react'; -import BadgeGroup from '@node-core/ui-components/Common/BadgeGroup'; +import BadgeGroup from '#Common/BadgeGroup'; type Story = StoryObj; type Meta = MetaObj; diff --git a/packages/ui-components/Common/BadgeGroup/index.tsx b/packages/ui-components/Common/BadgeGroup/index.tsx index 761ca9e3aaec6..2fc5c7d64f2f1 100644 --- a/packages/ui-components/Common/BadgeGroup/index.tsx +++ b/packages/ui-components/Common/BadgeGroup/index.tsx @@ -1,11 +1,11 @@ import ArrowRightIcon from '@heroicons/react/24/solid/ArrowRightIcon'; import type { ComponentProps, FC, PropsWithChildren } from 'react'; -import Badge from '@node-core/ui-components/Common/Badge'; -import type { LinkLike } from '@node-core/ui-components/types'; - import styles from './index.module.css'; +import Badge from '#Common/Badge'; +import type { LinkLike } from '#types'; + type BadgeGroupKind = 'default' | 'warning' | 'error'; type BadgeGroupProps = { diff --git a/packages/ui-components/Common/Banner/index.stories.tsx b/packages/ui-components/Common/Banner/index.stories.tsx index f893f3cab801e..000dfe6ff988c 100644 --- a/packages/ui-components/Common/Banner/index.stories.tsx +++ b/packages/ui-components/Common/Banner/index.stories.tsx @@ -1,6 +1,6 @@ import type { Meta as MetaObj, StoryObj } from '@storybook/react'; -import Banner from '@node-core/ui-components/Common/Banner'; +import Banner from '#Common/Banner'; type Story = StoryObj; type Meta = MetaObj; diff --git a/packages/ui-components/Common/BaseActiveLink/index.tsx b/packages/ui-components/Common/BaseActiveLink/index.tsx index 40d85fd9c0db7..40a12d352bbc4 100644 --- a/packages/ui-components/Common/BaseActiveLink/index.tsx +++ b/packages/ui-components/Common/BaseActiveLink/index.tsx @@ -1,7 +1,7 @@ import classNames from 'classnames'; import type { ComponentProps, FC } from 'react'; -import type { LinkLike } from '@node-core/ui-components/types'; +import type { LinkLike } from '#types'; export type ActiveLocalizedLinkProps = ComponentProps & { activeClassName?: string; diff --git a/packages/ui-components/Common/BaseButton/index.stories.tsx b/packages/ui-components/Common/BaseButton/index.stories.tsx index 6d0e741cc361a..210747c8f8080 100644 --- a/packages/ui-components/Common/BaseButton/index.stories.tsx +++ b/packages/ui-components/Common/BaseButton/index.stories.tsx @@ -1,7 +1,7 @@ import { ArrowRightIcon } from '@heroicons/react/24/solid'; import type { Meta as MetaObj, StoryObj } from '@storybook/react'; -import BaseButton from '@node-core/ui-components/Common/BaseButton'; +import BaseButton from '#Common/BaseButton'; type Story = StoryObj; type Meta = MetaObj; diff --git a/packages/ui-components/Common/BaseButton/index.tsx b/packages/ui-components/Common/BaseButton/index.tsx index 109b4988af78a..3f48970a5bbaf 100644 --- a/packages/ui-components/Common/BaseButton/index.tsx +++ b/packages/ui-components/Common/BaseButton/index.tsx @@ -1,10 +1,10 @@ import classNames from 'classnames'; import type { FC, AnchorHTMLAttributes, ButtonHTMLAttributes } from 'react'; -import type { LinkLike } from '@node-core/ui-components/types'; - import styles from './index.module.css'; +import type { LinkLike } from '#types'; + export type ButtonProps = ( | AnchorHTMLAttributes | ButtonHTMLAttributes diff --git a/packages/ui-components/Common/BaseCodeBox/index.stories.tsx b/packages/ui-components/Common/BaseCodeBox/index.stories.tsx index 003b6b2c2692d..826a5b80827a2 100644 --- a/packages/ui-components/Common/BaseCodeBox/index.stories.tsx +++ b/packages/ui-components/Common/BaseCodeBox/index.stories.tsx @@ -1,6 +1,6 @@ import type { Meta as MetaObj, StoryObj } from '@storybook/react'; -import BaseCodeBox from '@node-core/ui-components/Common/BaseCodeBox'; +import BaseCodeBox from '#Common/BaseCodeBox'; type Story = StoryObj; type Meta = MetaObj; diff --git a/packages/ui-components/Common/BaseCodeBox/index.tsx b/packages/ui-components/Common/BaseCodeBox/index.tsx index b51d89c67cf11..ca9e83348de26 100644 --- a/packages/ui-components/Common/BaseCodeBox/index.tsx +++ b/packages/ui-components/Common/BaseCodeBox/index.tsx @@ -8,11 +8,11 @@ import classNames from 'classnames'; import type { FC, PropsWithChildren, ReactElement, ReactNode } from 'react'; import { Fragment, isValidElement, useRef } from 'react'; -import BaseButton from '@node-core/ui-components/Common/BaseButton'; -import type { LinkLike } from '@node-core/ui-components/types'; - import styles from './index.module.css'; +import BaseButton from '#Common/BaseButton'; +import type { LinkLike } from '#types'; + // Transforms a code element with plain text content into a more structured // format for rendering with line numbers const transformCode = >( diff --git a/packages/ui-components/Common/BaseCrossLink/index.stories.tsx b/packages/ui-components/Common/BaseCrossLink/index.stories.tsx index e34f67cfa666a..6968fa9180d35 100644 --- a/packages/ui-components/Common/BaseCrossLink/index.stories.tsx +++ b/packages/ui-components/Common/BaseCrossLink/index.stories.tsx @@ -1,6 +1,6 @@ import type { Meta as MetaObj, StoryObj } from '@storybook/react'; -import BaseCrossLink from '@node-core/ui-components/Common/BaseCrossLink'; +import BaseCrossLink from '#Common/BaseCrossLink'; type Story = StoryObj; type Meta = MetaObj; diff --git a/packages/ui-components/Common/BaseCrossLink/index.tsx b/packages/ui-components/Common/BaseCrossLink/index.tsx index 3c15a34c83c48..178277a86af6b 100644 --- a/packages/ui-components/Common/BaseCrossLink/index.tsx +++ b/packages/ui-components/Common/BaseCrossLink/index.tsx @@ -1,14 +1,12 @@ import classNames from 'classnames'; import type { FC } from 'react'; -import PrevNextArrow from '@node-core/ui-components/Common/BasePagination/PrevNextArrow'; -import type { - LinkLike, - FormattedMessage, -} from '@node-core/ui-components/types'; +import PrevNextArrow from '#Common/BasePagination/PrevNextArrow'; import styles from './index.module.css'; +import type { LinkLike, FormattedMessage } from '#types'; + export type CrossLinkProps = { type: 'previous' | 'next'; text: FormattedMessage; diff --git a/packages/ui-components/Common/BaseLinkTabs/index.stories.tsx b/packages/ui-components/Common/BaseLinkTabs/index.stories.tsx index 76bf7e499c3eb..8240fcdaeb08f 100644 --- a/packages/ui-components/Common/BaseLinkTabs/index.stories.tsx +++ b/packages/ui-components/Common/BaseLinkTabs/index.stories.tsx @@ -1,6 +1,6 @@ import type { Meta as MetaObj, StoryObj } from '@storybook/react'; -import BaseLinkTabs from '@node-core/ui-components/Common/BaseLinkTabs'; +import BaseLinkTabs from '#Common/BaseLinkTabs'; type Story = StoryObj; type Meta = MetaObj; diff --git a/packages/ui-components/Common/BaseLinkTabs/index.tsx b/packages/ui-components/Common/BaseLinkTabs/index.tsx index 04578e0da7336..735d52775120b 100644 --- a/packages/ui-components/Common/BaseLinkTabs/index.tsx +++ b/packages/ui-components/Common/BaseLinkTabs/index.tsx @@ -1,10 +1,10 @@ import type { FC, PropsWithChildren } from 'react'; -import Select from '@node-core/ui-components/Common/Select'; -import type { LinkLike } from '@node-core/ui-components/types'; - import styles from './index.module.css'; +import Select from '#Common/Select'; +import type { LinkLike } from '#types'; + type LinkTab = { key: string; label: string; link: string }; export type LinkTabsProps = PropsWithChildren<{ diff --git a/packages/ui-components/Common/BasePagination/Ellipsis/index.stories.tsx b/packages/ui-components/Common/BasePagination/Ellipsis/index.stories.tsx index 916c1f6c9b802..98fb4d0b58391 100644 --- a/packages/ui-components/Common/BasePagination/Ellipsis/index.stories.tsx +++ b/packages/ui-components/Common/BasePagination/Ellipsis/index.stories.tsx @@ -1,6 +1,6 @@ import type { Meta as MetaObj, StoryObj } from '@storybook/react'; -import Ellipsis from '@node-core/ui-components/Common/BasePagination/Ellipsis'; +import Ellipsis from '#Common/BasePagination/Ellipsis'; type Story = StoryObj; type Meta = MetaObj; diff --git a/packages/ui-components/Common/BasePagination/PaginationListItem/__tests__/index.test.jsx b/packages/ui-components/Common/BasePagination/PaginationListItem/__tests__/index.test.jsx index 880454f3c6fbc..e8bf996c149f1 100644 --- a/packages/ui-components/Common/BasePagination/PaginationListItem/__tests__/index.test.jsx +++ b/packages/ui-components/Common/BasePagination/PaginationListItem/__tests__/index.test.jsx @@ -5,7 +5,7 @@ import { render, screen } from '@testing-library/react'; import { isVisible } from '../../../../../../tests/utilities.mjs'; -import PaginationListItem from '@node-core/ui-components/Common/BasePagination/PaginationListItem'; +import PaginationListItem from '#Common/BasePagination/PaginationListItem'; function renderPaginationListItem({ url, diff --git a/packages/ui-components/Common/BasePagination/PaginationListItem/index.stories.tsx b/packages/ui-components/Common/BasePagination/PaginationListItem/index.stories.tsx index 5a0934c9a39d9..eb0c8d490524a 100644 --- a/packages/ui-components/Common/BasePagination/PaginationListItem/index.stories.tsx +++ b/packages/ui-components/Common/BasePagination/PaginationListItem/index.stories.tsx @@ -1,6 +1,6 @@ import type { Meta as MetaObj, StoryObj } from '@storybook/react'; -import PaginationListItem from '@node-core/ui-components/Common/BasePagination/PaginationListItem'; +import PaginationListItem from '#Common/BasePagination/PaginationListItem'; type Story = StoryObj; type Meta = MetaObj; diff --git a/packages/ui-components/Common/BasePagination/PaginationListItem/index.tsx b/packages/ui-components/Common/BasePagination/PaginationListItem/index.tsx index 66543d4c8601a..d21eb9c344bf7 100644 --- a/packages/ui-components/Common/BasePagination/PaginationListItem/index.tsx +++ b/packages/ui-components/Common/BasePagination/PaginationListItem/index.tsx @@ -1,9 +1,9 @@ import type { FC } from 'react'; -import type { LinkLike } from '@node-core/ui-components/types'; - import styles from './index.module.css'; +import type { LinkLike } from '#types'; + export type PaginationListItemProps = { url: string; pageNumber: number; diff --git a/packages/ui-components/Common/BasePagination/__tests__/index.test.jsx b/packages/ui-components/Common/BasePagination/__tests__/index.test.jsx index b1721557806d2..8d6d3d1af02c9 100644 --- a/packages/ui-components/Common/BasePagination/__tests__/index.test.jsx +++ b/packages/ui-components/Common/BasePagination/__tests__/index.test.jsx @@ -5,7 +5,7 @@ import { render, screen } from '@testing-library/react'; import { isVisible } from '../../../../../tests/utilities.mjs'; -import BasePagination from '@node-core/ui-components/Common/BasePagination'; +import BasePagination from '#Common/BasePagination'; const getPageLabel = number => number.toString(); const labels = { diff --git a/packages/ui-components/Common/BasePagination/index.stories.tsx b/packages/ui-components/Common/BasePagination/index.stories.tsx index 98fb6397da289..faa4fcc628ee5 100644 --- a/packages/ui-components/Common/BasePagination/index.stories.tsx +++ b/packages/ui-components/Common/BasePagination/index.stories.tsx @@ -1,6 +1,6 @@ import type { Meta as MetaObj, StoryObj } from '@storybook/react'; -import BasePagination from '@node-core/ui-components/Common/BasePagination'; +import BasePagination from '#Common/BasePagination'; type Story = StoryObj; type Meta = MetaObj; diff --git a/packages/ui-components/Common/BasePagination/index.tsx b/packages/ui-components/Common/BasePagination/index.tsx index 4cabe6e6e2683..210d27c702994 100644 --- a/packages/ui-components/Common/BasePagination/index.tsx +++ b/packages/ui-components/Common/BasePagination/index.tsx @@ -1,12 +1,13 @@ import { ArrowRightIcon, ArrowLeftIcon } from '@heroicons/react/20/solid'; import type { FC } from 'react'; -import Button from '@node-core/ui-components/Common/BaseButton'; -import { useGetPageElements } from '@node-core/ui-components/Common/BasePagination/useGetPageElements'; -import type { LinkLike } from '@node-core/ui-components/types'; +import { useGetPageElements } from '#Common/BasePagination/useGetPageElements'; import styles from './index.module.css'; +import Button from '#Common/BaseButton'; +import type { LinkLike } from '#types'; + type Page = { url: string }; export type PaginationProps = { diff --git a/packages/ui-components/Common/BasePagination/useGetPageElements.tsx b/packages/ui-components/Common/BasePagination/useGetPageElements.tsx index eabceb995c5ec..f6df13605cf92 100644 --- a/packages/ui-components/Common/BasePagination/useGetPageElements.tsx +++ b/packages/ui-components/Common/BasePagination/useGetPageElements.tsx @@ -1,10 +1,10 @@ import type { ComponentProps } from 'react'; -import type BasePagination from '@node-core/ui-components/Common/BasePagination'; -import Ellipsis from '@node-core/ui-components/Common/BasePagination/Ellipsis'; -import type { PaginationListItemProps } from '@node-core/ui-components/Common/BasePagination/PaginationListItem'; -import PaginationListItem from '@node-core/ui-components/Common/BasePagination/PaginationListItem'; -import type { LinkLike } from '@node-core/ui-components/types'; +import type BasePagination from '#Common/BasePagination'; +import Ellipsis from '#Common/BasePagination/Ellipsis'; +import type { PaginationListItemProps } from '#Common/BasePagination/PaginationListItem'; +import PaginationListItem from '#Common/BasePagination/PaginationListItem'; +import type { LinkLike } from '#types'; const parsePages = ( pages: ComponentProps['pages'], diff --git a/packages/ui-components/Common/Blockquote/index.stories.tsx b/packages/ui-components/Common/Blockquote/index.stories.tsx index 7d0bb884f0d62..56f7436e0fdf5 100644 --- a/packages/ui-components/Common/Blockquote/index.stories.tsx +++ b/packages/ui-components/Common/Blockquote/index.stories.tsx @@ -1,6 +1,6 @@ import type { Meta as MetaObj, StoryObj } from '@storybook/react'; -import Blockquote from '@node-core/ui-components/Common/Blockquote'; +import Blockquote from '#Common/Blockquote'; type Story = StoryObj; type Meta = MetaObj; diff --git a/packages/ui-components/Common/Breadcrumbs/BreadcrumbHomeLink/index.tsx b/packages/ui-components/Common/Breadcrumbs/BreadcrumbHomeLink/index.tsx index c8ed33c1385ad..327bc4cd2fb68 100644 --- a/packages/ui-components/Common/Breadcrumbs/BreadcrumbHomeLink/index.tsx +++ b/packages/ui-components/Common/Breadcrumbs/BreadcrumbHomeLink/index.tsx @@ -1,10 +1,10 @@ import HomeIcon from '@heroicons/react/24/outline/HomeIcon'; import type { ComponentProps, FC } from 'react'; -import BreadcrumbLink from '@node-core/ui-components/Common/Breadcrumbs/BreadcrumbLink'; - import styles from './index.module.css'; +import BreadcrumbLink from '#Common/Breadcrumbs/BreadcrumbLink'; + type BreadcrumbHomeLinkProps = Omit< ComponentProps, 'href' diff --git a/packages/ui-components/Common/Breadcrumbs/BreadcrumbLink/index.tsx b/packages/ui-components/Common/Breadcrumbs/BreadcrumbLink/index.tsx index 61c7969f0dfea..4d2c7cacb1d0c 100644 --- a/packages/ui-components/Common/Breadcrumbs/BreadcrumbLink/index.tsx +++ b/packages/ui-components/Common/Breadcrumbs/BreadcrumbLink/index.tsx @@ -1,10 +1,10 @@ import classNames from 'classnames'; import type { ComponentProps, FC } from 'react'; -import type { LinkLike } from '@node-core/ui-components/types'; - import styles from './index.module.css'; +import type { LinkLike } from '#types'; + type BreadcrumbLinkProps = { active?: boolean; as: LinkLike; diff --git a/packages/ui-components/Common/Breadcrumbs/BreadcrumbTruncatedItem/index.tsx b/packages/ui-components/Common/Breadcrumbs/BreadcrumbTruncatedItem/index.tsx index 5177da5a6ab01..4e67ef4ecb3af 100644 --- a/packages/ui-components/Common/Breadcrumbs/BreadcrumbTruncatedItem/index.tsx +++ b/packages/ui-components/Common/Breadcrumbs/BreadcrumbTruncatedItem/index.tsx @@ -1,4 +1,4 @@ -import BreadcrumbItem from '@node-core/ui-components/Common/Breadcrumbs/BreadcrumbItem'; +import BreadcrumbItem from '#Common/Breadcrumbs/BreadcrumbItem'; const BreadcrumbTruncatedItem = () => ( diff --git a/packages/ui-components/Common/Breadcrumbs/index.stories.tsx b/packages/ui-components/Common/Breadcrumbs/index.stories.tsx index e591ba7e5f0b8..2abce4d8ecf29 100644 --- a/packages/ui-components/Common/Breadcrumbs/index.stories.tsx +++ b/packages/ui-components/Common/Breadcrumbs/index.stories.tsx @@ -1,6 +1,6 @@ import type { Meta as MetaObj, StoryObj } from '@storybook/react'; -import Breadcrumbs from '@node-core/ui-components/Common/Breadcrumbs'; +import Breadcrumbs from '#Common/Breadcrumbs'; type Story = StoryObj; type Meta = MetaObj; diff --git a/packages/ui-components/Common/Breadcrumbs/index.tsx b/packages/ui-components/Common/Breadcrumbs/index.tsx index acf8c0ee10204..191f14890e161 100644 --- a/packages/ui-components/Common/Breadcrumbs/index.tsx +++ b/packages/ui-components/Common/Breadcrumbs/index.tsx @@ -1,15 +1,12 @@ import type { FC } from 'react'; import { useMemo } from 'react'; -import BreadcrumbHomeLink from '@node-core/ui-components/Common/Breadcrumbs/BreadcrumbHomeLink'; -import BreadcrumbItem from '@node-core/ui-components/Common/Breadcrumbs/BreadcrumbItem'; -import BreadcrumbLink from '@node-core/ui-components/Common/Breadcrumbs/BreadcrumbLink'; -import BreadcrumbRoot from '@node-core/ui-components/Common/Breadcrumbs/BreadcrumbRoot'; -import BreadcrumbTruncatedItem from '@node-core/ui-components/Common/Breadcrumbs/BreadcrumbTruncatedItem'; -import type { - FormattedMessage, - LinkLike, -} from '@node-core/ui-components/types'; +import BreadcrumbHomeLink from '#Common/Breadcrumbs/BreadcrumbHomeLink'; +import BreadcrumbItem from '#Common/Breadcrumbs/BreadcrumbItem'; +import BreadcrumbLink from '#Common/Breadcrumbs/BreadcrumbLink'; +import BreadcrumbRoot from '#Common/Breadcrumbs/BreadcrumbRoot'; +import BreadcrumbTruncatedItem from '#Common/Breadcrumbs/BreadcrumbTruncatedItem'; +import type { FormattedMessage, LinkLike } from '#types'; export type BreadcrumbLink = { label: FormattedMessage; diff --git a/packages/ui-components/Common/CodeTabs/index.stories.tsx b/packages/ui-components/Common/CodeTabs/index.stories.tsx index 0cd1d6c43eb36..0042b6d0ba065 100644 --- a/packages/ui-components/Common/CodeTabs/index.stories.tsx +++ b/packages/ui-components/Common/CodeTabs/index.stories.tsx @@ -2,8 +2,8 @@ import * as TabsPrimitive from '@radix-ui/react-tabs'; import type { Meta as MetaObj, StoryObj } from '@storybook/react'; import type { FC } from 'react'; -import BaseCodeBox from '@node-core/ui-components/Common/BaseCodeBox'; -import CodeTabs from '@node-core/ui-components/Common/CodeTabs'; +import BaseCodeBox from '#Common/BaseCodeBox'; +import CodeTabs from '#Common/CodeTabs'; type Story = StoryObj; type Meta = MetaObj; diff --git a/packages/ui-components/Common/CodeTabs/index.tsx b/packages/ui-components/Common/CodeTabs/index.tsx index e56a19543cb0c..fc2942f8af8e7 100644 --- a/packages/ui-components/Common/CodeTabs/index.tsx +++ b/packages/ui-components/Common/CodeTabs/index.tsx @@ -1,9 +1,9 @@ import type { ComponentProps, FC } from 'react'; -import Tabs from '@node-core/ui-components/Common/Tabs'; - import styles from './index.module.css'; +import Tabs from '#Common/Tabs'; + type CodeTabsProps = Pick< ComponentProps, 'tabs' | 'defaultValue' | 'children' | 'addons' diff --git a/packages/ui-components/Common/GlowingBackdrop/index.stories.tsx b/packages/ui-components/Common/GlowingBackdrop/index.stories.tsx index 6db52628da914..d5ee6ea44d7f6 100644 --- a/packages/ui-components/Common/GlowingBackdrop/index.stories.tsx +++ b/packages/ui-components/Common/GlowingBackdrop/index.stories.tsx @@ -1,6 +1,6 @@ import type { Meta as MetaObj, StoryObj } from '@storybook/react'; -import GlowingBackdrop from '@node-core/ui-components/Common/GlowingBackdrop'; +import GlowingBackdrop from '#Common/GlowingBackdrop'; type Story = StoryObj; type Meta = MetaObj; diff --git a/packages/ui-components/Common/GlowingBackdrop/index.tsx b/packages/ui-components/Common/GlowingBackdrop/index.tsx index bd774964e1500..4699375d6fa42 100644 --- a/packages/ui-components/Common/GlowingBackdrop/index.tsx +++ b/packages/ui-components/Common/GlowingBackdrop/index.tsx @@ -1,6 +1,6 @@ import type { FC } from 'react'; -import HexagonGrid from '@node-core/ui-components/Icons/HexagonGrid'; +import HexagonGrid from '#Icons/HexagonGrid'; import styles from './index.module.css'; diff --git a/packages/ui-components/Common/LanguageDropDown/index.stories.tsx b/packages/ui-components/Common/LanguageDropDown/index.stories.tsx index 200674881139d..64574aaf6e8ef 100644 --- a/packages/ui-components/Common/LanguageDropDown/index.stories.tsx +++ b/packages/ui-components/Common/LanguageDropDown/index.stories.tsx @@ -1,6 +1,6 @@ import type { Meta as MetaObj, StoryObj } from '@storybook/react'; -import LanguageDropDown from '@node-core/ui-components/Common/LanguageDropDown'; +import LanguageDropDown from '#Common/LanguageDropDown'; type Story = StoryObj; type Meta = MetaObj; diff --git a/packages/ui-components/Common/LanguageDropDown/index.tsx b/packages/ui-components/Common/LanguageDropDown/index.tsx index d9f845198b483..b99fe38fe6f92 100644 --- a/packages/ui-components/Common/LanguageDropDown/index.tsx +++ b/packages/ui-components/Common/LanguageDropDown/index.tsx @@ -3,10 +3,10 @@ import * as DropdownMenu from '@radix-ui/react-dropdown-menu'; import classNames from 'classnames'; import type { FC } from 'react'; -import type { SimpleLocaleConfig } from '@node-core/ui-components/types'; - import styles from './index.module.css'; +import type { SimpleLocaleConfig } from '#types'; + type LanguageDropDownProps = { onChange?: (newLocale: SimpleLocaleConfig) => void; currentLanguage: string; diff --git a/packages/ui-components/Common/Modal/index.stories.tsx b/packages/ui-components/Common/Modal/index.stories.tsx index 8b650418a2383..01665d613f6f4 100644 --- a/packages/ui-components/Common/Modal/index.stories.tsx +++ b/packages/ui-components/Common/Modal/index.stories.tsx @@ -1,6 +1,6 @@ import type { Meta as MetaObj, StoryObj } from '@storybook/react'; -import Modal from '@node-core/ui-components/Common/Modal'; +import Modal from '#Common/Modal'; type Story = StoryObj; type Meta = MetaObj; diff --git a/packages/ui-components/Common/NodejsLogo/index.stories.tsx b/packages/ui-components/Common/NodejsLogo/index.stories.tsx index f8c739ef55a01..c63dfa684253d 100644 --- a/packages/ui-components/Common/NodejsLogo/index.stories.tsx +++ b/packages/ui-components/Common/NodejsLogo/index.stories.tsx @@ -1,6 +1,6 @@ import type { Meta as MetaObj, StoryObj } from '@storybook/react'; -import NodejsLogo from '@node-core/ui-components/Common/NodejsLogo'; +import NodejsLogo from '#Common/NodejsLogo'; type Story = StoryObj; type Meta = MetaObj; diff --git a/packages/ui-components/Common/NodejsLogo/index.tsx b/packages/ui-components/Common/NodejsLogo/index.tsx index 38c0c995b0d58..2dcfe508fe0a7 100644 --- a/packages/ui-components/Common/NodejsLogo/index.tsx +++ b/packages/ui-components/Common/NodejsLogo/index.tsx @@ -1,10 +1,11 @@ import type { FC } from 'react'; -import NodejsIcon from '@node-core/ui-components/Icons/Logos/Nodejs'; -import type { LogoVariant } from '@node-core/ui-components/types'; +import NodejsIcon from '#Icons/Logos/Nodejs'; import style from './index.module.css'; +import type { LogoVariant } from '#types'; + type NodejsLogoProps = { variant?: LogoVariant; ariaLabel?: string; diff --git a/packages/ui-components/Common/Notification/index.stories.tsx b/packages/ui-components/Common/Notification/index.stories.tsx index 3bff7438edb61..af2d758ab8b19 100644 --- a/packages/ui-components/Common/Notification/index.stories.tsx +++ b/packages/ui-components/Common/Notification/index.stories.tsx @@ -1,7 +1,7 @@ import { CodeBracketIcon } from '@heroicons/react/24/solid'; import type { Meta as MetaObj, StoryObj } from '@storybook/react'; -import Notification from '@node-core/ui-components/Common/Notification'; +import Notification from '#Common/Notification'; type Story = StoryObj; type Meta = MetaObj; diff --git a/packages/ui-components/Common/Preview/index.stories.tsx b/packages/ui-components/Common/Preview/index.stories.tsx index 92a606add2b11..5359ce4bfcaf5 100644 --- a/packages/ui-components/Common/Preview/index.stories.tsx +++ b/packages/ui-components/Common/Preview/index.stories.tsx @@ -1,6 +1,6 @@ import type { Meta as MetaObj, StoryObj } from '@storybook/react'; -import Preview from '@node-core/ui-components/Common/Preview'; +import Preview from '#Common/Preview'; type Story = StoryObj; type Meta = MetaObj; diff --git a/packages/ui-components/Common/Preview/index.tsx b/packages/ui-components/Common/Preview/index.tsx index 16d06d039805e..eace5fd9d0cf4 100644 --- a/packages/ui-components/Common/Preview/index.tsx +++ b/packages/ui-components/Common/Preview/index.tsx @@ -1,12 +1,13 @@ import classNames from 'classnames'; import type { FC } from 'react'; -import HexagonGrid from '@node-core/ui-components/Icons/HexagonGrid'; -import JsWhiteIcon from '@node-core/ui-components/Icons/Logos/JsWhite'; -import type { BlogPreviewType } from '@node-core/ui-components/types'; +import HexagonGrid from '#Icons/HexagonGrid'; +import JsWhiteIcon from '#Icons/Logos/JsWhite'; import styles from './index.module.css'; +import type { BlogPreviewType } from '#types'; + type PreviewProps = { title: string; type?: BlogPreviewType; diff --git a/packages/ui-components/Common/ProgressionSidebar/ProgressionSidebarGroup/index.tsx b/packages/ui-components/Common/ProgressionSidebar/ProgressionSidebarGroup/index.tsx index 20219c29e6528..c44f55e22fa6a 100644 --- a/packages/ui-components/Common/ProgressionSidebar/ProgressionSidebarGroup/index.tsx +++ b/packages/ui-components/Common/ProgressionSidebar/ProgressionSidebarGroup/index.tsx @@ -1,13 +1,10 @@ import type { ComponentProps, FC } from 'react'; -import ProgressionSidebarItem from '@node-core/ui-components/Common/ProgressionSidebar/ProgressionSidebarItem'; -import type { - FormattedMessage, - LinkLike, -} from '@node-core/ui-components/types'; - import styles from './index.module.css'; +import ProgressionSidebarItem from '#Common/ProgressionSidebar/ProgressionSidebarItem'; +import type { FormattedMessage, LinkLike } from '#types'; + type ProgressionSidebarGroupProps = { groupName: FormattedMessage; items: Array>; diff --git a/packages/ui-components/Common/ProgressionSidebar/ProgressionSidebarItem/index.tsx b/packages/ui-components/Common/ProgressionSidebar/ProgressionSidebarItem/index.tsx index 1ffcb13dadea0..6ff8760e5cc27 100644 --- a/packages/ui-components/Common/ProgressionSidebar/ProgressionSidebarItem/index.tsx +++ b/packages/ui-components/Common/ProgressionSidebar/ProgressionSidebarItem/index.tsx @@ -1,14 +1,11 @@ import type { FC } from 'react'; -import BaseActiveLink from '@node-core/ui-components/Common/BaseActiveLink'; -import ProgressionSidebarIcon from '@node-core/ui-components/Common/ProgressionSidebar/ProgressionSidebarIcon'; -import type { - FormattedMessage, - LinkLike, -} from '@node-core/ui-components/types'; - import styles from './index.module.css'; +import BaseActiveLink from '#Common/BaseActiveLink'; +import ProgressionSidebarIcon from '#Common/ProgressionSidebar/ProgressionSidebarIcon'; +import type { FormattedMessage, LinkLike } from '#types'; + type ProgressionSidebarItemProps = { label: FormattedMessage; link: string; diff --git a/packages/ui-components/Common/ProgressionSidebar/index.stories.tsx b/packages/ui-components/Common/ProgressionSidebar/index.stories.tsx index f2594b1d82c75..36fa60290a78e 100644 --- a/packages/ui-components/Common/ProgressionSidebar/index.stories.tsx +++ b/packages/ui-components/Common/ProgressionSidebar/index.stories.tsx @@ -1,6 +1,6 @@ import type { Meta as MetaObj, StoryObj } from '@storybook/react'; -import ProgressionSidebar from '@node-core/ui-components/Common/ProgressionSidebar'; +import ProgressionSidebar from '#Common/ProgressionSidebar'; type Story = StoryObj; type Meta = MetaObj; diff --git a/packages/ui-components/Common/ProgressionSidebar/index.tsx b/packages/ui-components/Common/ProgressionSidebar/index.tsx index f571c850af269..d3a2a38bf06fb 100644 --- a/packages/ui-components/Common/ProgressionSidebar/index.tsx +++ b/packages/ui-components/Common/ProgressionSidebar/index.tsx @@ -2,12 +2,12 @@ import { useRef, type ComponentProps, type FC } from 'react'; -import ProgressionSidebarGroup from '@node-core/ui-components/Common/ProgressionSidebar/ProgressionSidebarGroup'; -import Select from '@node-core/ui-components/Common/Select'; -import type { LinkLike } from '@node-core/ui-components/types'; - import styles from './index.module.css'; +import ProgressionSidebarGroup from '#Common/ProgressionSidebar/ProgressionSidebarGroup'; +import Select from '#Common/Select'; +import type { LinkLike } from '#types'; + type ProgressionSidebarProps = { groups: Array>; pathname?: string; diff --git a/packages/ui-components/Common/Select/index.stories.tsx b/packages/ui-components/Common/Select/index.stories.tsx index 7af58fe7c5bee..abace5b0511ac 100644 --- a/packages/ui-components/Common/Select/index.stories.tsx +++ b/packages/ui-components/Common/Select/index.stories.tsx @@ -1,7 +1,7 @@ import type { Meta as MetaObj, StoryObj } from '@storybook/react'; -import Select from '@node-core/ui-components/Common/Select'; -import * as OSIcons from '@node-core/ui-components/Icons/OperatingSystem'; +import Select from '#Common/Select'; +import * as OSIcons from '#Icons/OperatingSystem'; type Story = StoryObj; type Meta = MetaObj; diff --git a/packages/ui-components/Common/Select/index.tsx b/packages/ui-components/Common/Select/index.tsx index 66060a782dbe1..4c7b088a8a8c6 100644 --- a/packages/ui-components/Common/Select/index.tsx +++ b/packages/ui-components/Common/Select/index.tsx @@ -6,11 +6,11 @@ import classNames from 'classnames'; import { useEffect, useId, useMemo, useState } from 'react'; import type { ReactElement, ReactNode } from 'react'; -import Skeleton from '@node-core/ui-components/Common/Skeleton'; -import type { FormattedMessage } from '@node-core/ui-components/types'; - import styles from './index.module.css'; +import Skeleton from '#Common/Skeleton'; +import type { FormattedMessage } from '#types'; + export type SelectValue = { label: FormattedMessage | string; value: T; diff --git a/packages/ui-components/Common/Separator/index.stories.tsx b/packages/ui-components/Common/Separator/index.stories.tsx index 4fe7337c8b58c..7e2f1bca52281 100644 --- a/packages/ui-components/Common/Separator/index.stories.tsx +++ b/packages/ui-components/Common/Separator/index.stories.tsx @@ -1,6 +1,6 @@ import type { Meta as MetaObj, StoryObj } from '@storybook/react'; -import Separator from '@node-core/ui-components/Common/Separator'; +import Separator from '#Common/Separator'; type Story = StoryObj; type Meta = MetaObj; diff --git a/packages/ui-components/Common/Tabs/index.stories.tsx b/packages/ui-components/Common/Tabs/index.stories.tsx index 0325422768505..97eaf4290c0cf 100644 --- a/packages/ui-components/Common/Tabs/index.stories.tsx +++ b/packages/ui-components/Common/Tabs/index.stories.tsx @@ -2,7 +2,7 @@ import * as TabsPrimitive from '@radix-ui/react-tabs'; import type { Meta as MetaObj, StoryObj } from '@storybook/react'; import type { ComponentProps } from 'react'; -import Tabs from '@node-core/ui-components/Common/Tabs'; +import Tabs from '#Common/Tabs'; type Story = StoryObj; type Meta = MetaObj; diff --git a/packages/ui-components/Common/ThemeToggle/index.stories.tsx b/packages/ui-components/Common/ThemeToggle/index.stories.tsx index a09fe58a118c0..ad5e40698e0f2 100644 --- a/packages/ui-components/Common/ThemeToggle/index.stories.tsx +++ b/packages/ui-components/Common/ThemeToggle/index.stories.tsx @@ -1,6 +1,6 @@ import type { Meta as MetaObj, StoryObj } from '@storybook/react'; -import ThemeToggle from '@node-core/ui-components/Common/ThemeToggle'; +import ThemeToggle from '#Common/ThemeToggle'; type Story = StoryObj; type Meta = MetaObj; diff --git a/packages/ui-components/Common/Tooltip/index.stories.tsx b/packages/ui-components/Common/Tooltip/index.stories.tsx index bf4a087dc13b7..83df873767350 100644 --- a/packages/ui-components/Common/Tooltip/index.stories.tsx +++ b/packages/ui-components/Common/Tooltip/index.stories.tsx @@ -1,6 +1,6 @@ import type { Meta as MetaObj, StoryObj } from '@storybook/react'; -import Tooltip from '@node-core/ui-components/Common/Tooltip'; +import Tooltip from '#Common/Tooltip'; type Story = StoryObj; type Meta = MetaObj; diff --git a/packages/ui-components/Containers/Footer/index.stories.tsx b/packages/ui-components/Containers/Footer/index.stories.tsx index 872a0bf48c1ff..3c34bb3543af8 100644 --- a/packages/ui-components/Containers/Footer/index.stories.tsx +++ b/packages/ui-components/Containers/Footer/index.stories.tsx @@ -1,6 +1,6 @@ import type { Meta as MetaObj, StoryObj } from '@storybook/react'; -import Footer from '@node-core/ui-components/Containers/Footer'; +import Footer from '#Containers/Footer'; type Story = StoryObj; type Meta = MetaObj; diff --git a/packages/ui-components/Containers/Footer/index.tsx b/packages/ui-components/Containers/Footer/index.tsx index d6a2dacbeb482..f5ade8c5b91e5 100644 --- a/packages/ui-components/Containers/Footer/index.tsx +++ b/packages/ui-components/Containers/Footer/index.tsx @@ -2,7 +2,9 @@ import type { FC, SVGProps } from 'react'; -import NavItem from '@node-core/ui-components/Containers/NavBar/NavItem'; +import styles from './index.module.css'; + +import NavItem from '#Containers/NavBar/NavItem'; import { Bluesky, Discord, @@ -11,10 +13,8 @@ import { Mastodon, Slack, X, -} from '@node-core/ui-components/Icons/Social'; -import type { LinkLike } from '@node-core/ui-components/types'; - -import styles from './index.module.css'; +} from '#Icons/Social'; +import type { LinkLike } from '#types'; const footerSocialIcons: Record>> = { github: GitHub, diff --git a/packages/ui-components/Containers/MetaBar/index.stories.tsx b/packages/ui-components/Containers/MetaBar/index.stories.tsx index 9f70782713604..5b238f8c33f6c 100644 --- a/packages/ui-components/Containers/MetaBar/index.stories.tsx +++ b/packages/ui-components/Containers/MetaBar/index.stories.tsx @@ -1,8 +1,9 @@ import { CodeBracketIcon } from '@heroicons/react/24/outline'; import type { Meta as MetaObj, StoryObj } from '@storybook/react'; -import MetaBar from '@node-core/ui-components/Containers/MetaBar'; -import GitHubIcon from '@node-core/ui-components/Icons/Social/GitHub'; +import GitHubIcon from '#Icons/Social/GitHub'; + +import MetaBar from '#Containers/MetaBar'; type Story = StoryObj; type Meta = MetaObj; diff --git a/packages/ui-components/Containers/MetaBar/index.tsx b/packages/ui-components/Containers/MetaBar/index.tsx index eaca311870cee..38c4602e38711 100644 --- a/packages/ui-components/Containers/MetaBar/index.tsx +++ b/packages/ui-components/Containers/MetaBar/index.tsx @@ -2,10 +2,10 @@ import type { Heading } from '@vcarl/remark-headings'; import { Fragment, useMemo } from 'react'; import type { FC } from 'react'; -import type { LinkLike } from '@node-core/ui-components/types'; - import styles from './index.module.css'; +import type { LinkLike } from '#types'; + type MetaBarProps = { items: Partial>; headings?: { diff --git a/packages/ui-components/Containers/NavBar/NavItem/index.stories.tsx b/packages/ui-components/Containers/NavBar/NavItem/index.stories.tsx index 3cfae44cdf8fd..f08457f5fb141 100644 --- a/packages/ui-components/Containers/NavBar/NavItem/index.stories.tsx +++ b/packages/ui-components/Containers/NavBar/NavItem/index.stories.tsx @@ -1,6 +1,6 @@ import type { Meta as MetaObj, StoryObj } from '@storybook/react'; -import NavItem from '@node-core/ui-components/Containers/NavBar/NavItem'; +import NavItem from '#Containers/NavBar/NavItem'; type Story = StoryObj; type Meta = MetaObj; diff --git a/packages/ui-components/Containers/NavBar/NavItem/index.tsx b/packages/ui-components/Containers/NavBar/NavItem/index.tsx index 2daaa4f8c6ce7..265f63d3847f0 100644 --- a/packages/ui-components/Containers/NavBar/NavItem/index.tsx +++ b/packages/ui-components/Containers/NavBar/NavItem/index.tsx @@ -2,11 +2,11 @@ import { ArrowUpRightIcon } from '@heroicons/react/24/solid'; import classNames from 'classnames'; import type { FC, HTMLAttributeAnchorTarget, PropsWithChildren } from 'react'; -import BaseActiveLink from '@node-core/ui-components/Common/BaseActiveLink'; -import type { LinkLike } from '@node-core/ui-components/types'; - import styles from './index.module.css'; +import BaseActiveLink from '#Common/BaseActiveLink'; +import type { LinkLike } from '#types'; + type NavItemType = 'nav' | 'footer'; type NavItemProps = { diff --git a/packages/ui-components/Containers/NavBar/index.stories.tsx b/packages/ui-components/Containers/NavBar/index.stories.tsx index 665b574fa85aa..7049df79dfe6d 100644 --- a/packages/ui-components/Containers/NavBar/index.stories.tsx +++ b/packages/ui-components/Containers/NavBar/index.stories.tsx @@ -1,6 +1,6 @@ import type { Meta as MetaObj, StoryObj } from '@storybook/react'; -import NavBar from '@node-core/ui-components/Containers/NavBar'; +import NavBar from '#Containers/NavBar'; type Story = StoryObj; type Meta = MetaObj; diff --git a/packages/ui-components/Containers/NavBar/index.tsx b/packages/ui-components/Containers/NavBar/index.tsx index d50309aaa2a17..4336712557952 100644 --- a/packages/ui-components/Containers/NavBar/index.tsx +++ b/packages/ui-components/Containers/NavBar/index.tsx @@ -12,14 +12,11 @@ import type { ElementType, } from 'react'; -import NavItem from '@node-core/ui-components/Containers/NavBar/NavItem'; -import type { - FormattedMessage, - LinkLike, -} from '@node-core/ui-components/types'; - import style from './index.module.css'; +import NavItem from '#Containers/NavBar/NavItem'; +import type { FormattedMessage, LinkLike } from '#types'; + const navInteractionIcons = { show: , close: , diff --git a/packages/ui-components/Containers/Sidebar/SidebarGroup/index.stories.tsx b/packages/ui-components/Containers/Sidebar/SidebarGroup/index.stories.tsx index 5fd052df21822..314e5218bf486 100644 --- a/packages/ui-components/Containers/Sidebar/SidebarGroup/index.stories.tsx +++ b/packages/ui-components/Containers/Sidebar/SidebarGroup/index.stories.tsx @@ -1,6 +1,6 @@ import type { Meta as MetaObj, StoryObj } from '@storybook/react'; -import SidebarGroup from '@node-core/ui-components/Containers/Sidebar/SidebarGroup'; +import SidebarGroup from '#Containers/Sidebar/SidebarGroup'; type Story = StoryObj; type Meta = MetaObj; diff --git a/packages/ui-components/Containers/Sidebar/SidebarGroup/index.tsx b/packages/ui-components/Containers/Sidebar/SidebarGroup/index.tsx index e26183fe0e58e..9946bdc7eeafb 100644 --- a/packages/ui-components/Containers/Sidebar/SidebarGroup/index.tsx +++ b/packages/ui-components/Containers/Sidebar/SidebarGroup/index.tsx @@ -1,13 +1,10 @@ import type { ComponentProps, FC } from 'react'; -import SidebarItem from '@node-core/ui-components/Containers/Sidebar/SidebarItem'; -import type { - FormattedMessage, - LinkLike, -} from '@node-core/ui-components/types'; - import styles from './index.module.css'; +import SidebarItem from '#Containers/Sidebar/SidebarItem'; +import type { FormattedMessage, LinkLike } from '#types'; + type SidebarGroupProps = { groupName: FormattedMessage; items: Array, 'as' | 'pathname'>>; diff --git a/packages/ui-components/Containers/Sidebar/SidebarItem/index.stories.tsx b/packages/ui-components/Containers/Sidebar/SidebarItem/index.stories.tsx index a8cb4c50fda36..30109f83621ad 100644 --- a/packages/ui-components/Containers/Sidebar/SidebarItem/index.stories.tsx +++ b/packages/ui-components/Containers/Sidebar/SidebarItem/index.stories.tsx @@ -1,6 +1,6 @@ import type { Meta as MetaObj, StoryObj } from '@storybook/react'; -import SidebarItem from '@node-core/ui-components/Containers/Sidebar/SidebarItem'; +import SidebarItem from '#Containers/Sidebar/SidebarItem'; type Story = StoryObj; type Meta = MetaObj; diff --git a/packages/ui-components/Containers/Sidebar/SidebarItem/index.tsx b/packages/ui-components/Containers/Sidebar/SidebarItem/index.tsx index 417cb0744f517..3487ba16c1d26 100644 --- a/packages/ui-components/Containers/Sidebar/SidebarItem/index.tsx +++ b/packages/ui-components/Containers/Sidebar/SidebarItem/index.tsx @@ -1,14 +1,11 @@ import { ArrowUpRightIcon } from '@heroicons/react/24/solid'; import type { FC } from 'react'; -import ActiveLink from '@node-core/ui-components/Common/BaseActiveLink'; -import type { - FormattedMessage, - LinkLike, -} from '@node-core/ui-components/types'; - import styles from './index.module.css'; +import ActiveLink from '#Common/BaseActiveLink'; +import type { FormattedMessage, LinkLike } from '#types'; + type SidebarItemProps = { label: FormattedMessage; link: string; diff --git a/packages/ui-components/Containers/Sidebar/index.stories.tsx b/packages/ui-components/Containers/Sidebar/index.stories.tsx index 4fcb32d9379fe..090d80a00ed1b 100644 --- a/packages/ui-components/Containers/Sidebar/index.stories.tsx +++ b/packages/ui-components/Containers/Sidebar/index.stories.tsx @@ -1,6 +1,6 @@ import type { Meta as MetaObj, StoryObj } from '@storybook/react'; -import Sidebar from '@node-core/ui-components/Containers/Sidebar'; +import Sidebar from '#Containers/Sidebar'; type Story = StoryObj; type Meta = MetaObj; diff --git a/packages/ui-components/Containers/Sidebar/index.tsx b/packages/ui-components/Containers/Sidebar/index.tsx index d2756905294dc..0ea2d1c2fe82b 100644 --- a/packages/ui-components/Containers/Sidebar/index.tsx +++ b/packages/ui-components/Containers/Sidebar/index.tsx @@ -1,11 +1,11 @@ import type { ComponentProps, FC } from 'react'; -import Select from '@node-core/ui-components/Common/Select'; -import SidebarGroup from '@node-core/ui-components/Containers/Sidebar/SidebarGroup'; -import type { LinkLike } from '@node-core/ui-components/types'; - import styles from './index.module.css'; +import Select from '#Common/Select'; +import SidebarGroup from '#Containers/Sidebar/SidebarGroup'; +import type { LinkLike } from '#types'; + type SidebarProps = { groups: Array, 'as' | 'pathname'>>; pathname?: string; diff --git a/packages/ui-components/Icons/HexagonGrid.stories.tsx b/packages/ui-components/Icons/HexagonGrid.stories.tsx index c5d56a3674728..0f047f58a2a83 100644 --- a/packages/ui-components/Icons/HexagonGrid.stories.tsx +++ b/packages/ui-components/Icons/HexagonGrid.stories.tsx @@ -1,6 +1,6 @@ import type { Meta as MetaObj, StoryObj } from '@storybook/react'; -import HexagonGrid from '@node-core/ui-components/Icons/HexagonGrid'; +import HexagonGrid from '#Icons/HexagonGrid'; type Story = StoryObj; type Meta = MetaObj; diff --git a/packages/ui-components/Icons/InstallationMethod/index.ts b/packages/ui-components/Icons/InstallationMethod/index.ts index e85544bbaa928..9691770e358ed 100644 --- a/packages/ui-components/Icons/InstallationMethod/index.ts +++ b/packages/ui-components/Icons/InstallationMethod/index.ts @@ -1,10 +1,10 @@ -import Choco from '@node-core/ui-components/Icons/InstallationMethod/Choco'; -import Devbox from '@node-core/ui-components/Icons/InstallationMethod/Devbox'; -import Docker from '@node-core/ui-components/Icons/InstallationMethod/Docker'; -import FNM from '@node-core/ui-components/Icons/InstallationMethod/FNM'; -import Homebrew from '@node-core/ui-components/Icons/InstallationMethod/Homebrew'; -import N from '@node-core/ui-components/Icons/InstallationMethod/N'; -import NVM from '@node-core/ui-components/Icons/InstallationMethod/NVM'; -import Volta from '@node-core/ui-components/Icons/InstallationMethod/Volta'; +import Choco from '#Icons/InstallationMethod/Choco'; +import Devbox from '#Icons/InstallationMethod/Devbox'; +import Docker from '#Icons/InstallationMethod/Docker'; +import FNM from '#Icons/InstallationMethod/FNM'; +import Homebrew from '#Icons/InstallationMethod/Homebrew'; +import N from '#Icons/InstallationMethod/N'; +import NVM from '#Icons/InstallationMethod/NVM'; +import Volta from '#Icons/InstallationMethod/Volta'; export { Choco, Devbox, Docker, FNM, Homebrew, N, NVM, Volta }; diff --git a/packages/ui-components/Icons/Logos/JsWhite.tsx b/packages/ui-components/Icons/Logos/JsWhite.tsx index 0f388784a11c6..1d9aab1640cc8 100644 --- a/packages/ui-components/Icons/Logos/JsWhite.tsx +++ b/packages/ui-components/Icons/Logos/JsWhite.tsx @@ -1,6 +1,6 @@ import type { FC } from 'react'; -import type { TailwindSVG } from '@node-core/ui-components/types'; +import type { TailwindSVG } from '#types'; const JsWhiteIcon: FC = props => ( & { variant?: LogoVariant; diff --git a/packages/ui-components/Icons/Logos/index.ts b/packages/ui-components/Icons/Logos/index.ts index de487f949bc23..4a84f91491474 100644 --- a/packages/ui-components/Icons/Logos/index.ts +++ b/packages/ui-components/Icons/Logos/index.ts @@ -1,10 +1,10 @@ -import JsGreen from '@node-core/ui-components/Icons/Logos/JsGreen'; -import JsWhite from '@node-core/ui-components/Icons/Logos/JsWhite'; -import Nodejs from '@node-core/ui-components/Icons/Logos/Nodejs'; -import NodejsStackedBlack from '@node-core/ui-components/Icons/Logos/NodejsStackedBlack'; -import NodejsStackedDark from '@node-core/ui-components/Icons/Logos/NodejsStackedDark'; -import NodejsStackedLight from '@node-core/ui-components/Icons/Logos/NodejsStackedLight'; -import NodejsStackedWhite from '@node-core/ui-components/Icons/Logos/NodejsStackedWhite'; +import JsGreen from '#Icons/Logos/JsGreen'; +import JsWhite from '#Icons/Logos/JsWhite'; +import Nodejs from '#Icons/Logos/Nodejs'; +import NodejsStackedBlack from '#Icons/Logos/NodejsStackedBlack'; +import NodejsStackedDark from '#Icons/Logos/NodejsStackedDark'; +import NodejsStackedLight from '#Icons/Logos/NodejsStackedLight'; +import NodejsStackedWhite from '#Icons/Logos/NodejsStackedWhite'; export { JsGreen, diff --git a/packages/ui-components/Icons/OperatingSystem/index.ts b/packages/ui-components/Icons/OperatingSystem/index.ts index 161eba3f61f41..77cd057d4e297 100644 --- a/packages/ui-components/Icons/OperatingSystem/index.ts +++ b/packages/ui-components/Icons/OperatingSystem/index.ts @@ -1,6 +1,6 @@ -import AIX from '@node-core/ui-components/Icons/OperatingSystem/AIX'; -import Apple from '@node-core/ui-components/Icons/OperatingSystem/Apple'; -import Linux from '@node-core/ui-components/Icons/OperatingSystem/Linux'; -import Microsoft from '@node-core/ui-components/Icons/OperatingSystem/Microsoft'; +import AIX from '#Icons/OperatingSystem/AIX'; +import Apple from '#Icons/OperatingSystem/Apple'; +import Linux from '#Icons/OperatingSystem/Linux'; +import Microsoft from '#Icons/OperatingSystem/Microsoft'; export { AIX, Apple, Linux, Microsoft }; diff --git a/packages/ui-components/Icons/PackageManager/index.ts b/packages/ui-components/Icons/PackageManager/index.ts index 2bf58ab964c5a..9d8580500d091 100644 --- a/packages/ui-components/Icons/PackageManager/index.ts +++ b/packages/ui-components/Icons/PackageManager/index.ts @@ -1,5 +1,5 @@ -import NPM from '@node-core/ui-components/Icons/PackageManager/Npm'; -import PNPM from '@node-core/ui-components/Icons/PackageManager/Pnpm'; -import YARN from '@node-core/ui-components/Icons/PackageManager/Yarn'; +import NPM from '#Icons/PackageManager/Npm'; +import PNPM from '#Icons/PackageManager/Pnpm'; +import YARN from '#Icons/PackageManager/Yarn'; export { NPM, PNPM, YARN }; diff --git a/packages/ui-components/Icons/Social/index.ts b/packages/ui-components/Icons/Social/index.ts index 4f9da6edd82f3..38ca462fe0006 100644 --- a/packages/ui-components/Icons/Social/index.ts +++ b/packages/ui-components/Icons/Social/index.ts @@ -1,9 +1,9 @@ -import Bluesky from '@node-core/ui-components/Icons/Social/Bluesky'; -import Discord from '@node-core/ui-components/Icons/Social/Discord'; -import GitHub from '@node-core/ui-components/Icons/Social/GitHub'; -import LinkedIn from '@node-core/ui-components/Icons/Social/LinkedIn'; -import Mastodon from '@node-core/ui-components/Icons/Social/Mastodon'; -import Slack from '@node-core/ui-components/Icons/Social/Slack'; -import X from '@node-core/ui-components/Icons/Social/X'; +import Bluesky from '#Icons/Social/Bluesky'; +import Discord from '#Icons/Social/Discord'; +import GitHub from '#Icons/Social/GitHub'; +import LinkedIn from '#Icons/Social/LinkedIn'; +import Mastodon from '#Icons/Social/Mastodon'; +import Slack from '#Icons/Social/Slack'; +import X from '#Icons/Social/X'; export { Bluesky, Discord, GitHub, LinkedIn, Mastodon, Slack, X }; diff --git a/packages/ui-components/__design__/node-logos.stories.tsx b/packages/ui-components/__design__/node-logos.stories.tsx index 61abc86dc6ac5..6d4ce80ca5a74 100644 --- a/packages/ui-components/__design__/node-logos.stories.tsx +++ b/packages/ui-components/__design__/node-logos.stories.tsx @@ -8,7 +8,7 @@ import { NodejsStackedDark, NodejsStackedLight, NodejsStackedWhite, -} from '@node-core/ui-components/Icons/Logos'; +} from '#Icons/Logos'; export const HorizontalLogo: StoryObj = { render: () => , diff --git a/packages/ui-components/__design__/platform-logos.stories.tsx b/packages/ui-components/__design__/platform-logos.stories.tsx index 9b311dda28b7f..f22a4cc1fa880 100644 --- a/packages/ui-components/__design__/platform-logos.stories.tsx +++ b/packages/ui-components/__design__/platform-logos.stories.tsx @@ -8,13 +8,8 @@ import { Choco, N, Volta, -} from '@node-core/ui-components/Icons/InstallationMethod'; -import { - Apple, - Linux, - Microsoft, - AIX, -} from '@node-core/ui-components/Icons/OperatingSystem'; +} from '#Icons/InstallationMethod'; +import { Apple, Linux, Microsoft, AIX } from '#Icons/OperatingSystem'; const osIcons = [Apple, Linux, Microsoft, AIX]; const installMethodIcons = [Docker, Homebrew, NVM, Devbox, Choco, N, Volta]; diff --git a/packages/ui-components/__design__/social-logos.stories.tsx b/packages/ui-components/__design__/social-logos.stories.tsx index ab7ddea04721c..ca492738e0bc0 100644 --- a/packages/ui-components/__design__/social-logos.stories.tsx +++ b/packages/ui-components/__design__/social-logos.stories.tsx @@ -8,7 +8,7 @@ import { Mastodon, Slack, X, -} from '@node-core/ui-components/Icons/Social'; +} from '#Icons/Social'; const socialIcons = [ [GitHub, Mastodon, LinkedIn], diff --git a/packages/ui-components/package.json b/packages/ui-components/package.json index ee7a168c79620..3ad403e21ea8c 100644 --- a/packages/ui-components/package.json +++ b/packages/ui-components/package.json @@ -2,15 +2,13 @@ "name": "@node-core/ui-components", "type": "module", "exports": { - "./Common/*": "./Common/*", - "./Common/*/*": "./Common/*/*", - "./Containers/*": "./Containers/*", - "./Containers/*/*": "./Containers/*/*", - "./Icons/*": "./Icons/*", - "./Icons/*/*": "./Icons/*/*", - "./styles/*": "./styles/*", - "./types": "./types.ts", - "./stylelint/*": "./stylelint/*" + "./*": [ + "./*", + "./*.tsx", + "./*/index.tsx", + "./*.ts", + "./*/index.ts" + ] }, "files": [ "Common", @@ -78,6 +76,15 @@ "typescript": "~5.8.2", "typescript-eslint": "~8.31.1" }, + "imports": { + "#*": [ + "./*", + "./*.tsx", + "./*/index.tsx", + "./*.ts", + "./*/index.ts" + ] + }, "engines": { "node": ">=20" } diff --git a/packages/ui-components/tsconfig.json b/packages/ui-components/tsconfig.json index 70e9aa7cd51c2..1a335855bef01 100644 --- a/packages/ui-components/tsconfig.json +++ b/packages/ui-components/tsconfig.json @@ -14,7 +14,7 @@ "isolatedModules": true, "jsx": "preserve", "incremental": true, - "paths": { "@node-core/ui-components/*": ["./*"] } + "baseUrl": "." }, "include": [ "**/*.ts", From c3f4189dd8b0618f3332e69ba0b3b49cf9964f5b Mon Sep 17 00:00:00 2001 From: avivkeller Date: Thu, 8 May 2025 17:40:13 -0400 Subject: [PATCH 2/3] fixup! chore: use subpath imports instead of path aliases --- packages/ui-components/Common/AvatarGroup/Avatar/index.tsx | 4 ++-- packages/ui-components/Common/AvatarGroup/Overlay/index.tsx | 4 ++-- packages/ui-components/Common/AvatarGroup/index.tsx | 4 ++-- packages/ui-components/Common/BadgeGroup/index.tsx | 4 ++-- packages/ui-components/Common/BaseButton/index.tsx | 4 ++-- packages/ui-components/Common/BaseCodeBox/index.tsx | 4 ++-- packages/ui-components/Common/BaseCrossLink/index.tsx | 3 +-- packages/ui-components/Common/BaseLinkTabs/index.tsx | 4 ++-- .../Common/BasePagination/PaginationListItem/index.tsx | 4 ++-- packages/ui-components/Common/BasePagination/index.tsx | 5 ++--- .../Common/Breadcrumbs/BreadcrumbHomeLink/index.tsx | 4 ++-- .../Common/Breadcrumbs/BreadcrumbLink/index.tsx | 4 ++-- packages/ui-components/Common/CodeTabs/index.tsx | 4 ++-- packages/ui-components/Common/LanguageDropDown/index.tsx | 4 ++-- packages/ui-components/Common/NodejsLogo/index.tsx | 3 +-- packages/ui-components/Common/Preview/index.tsx | 3 +-- .../ProgressionSidebar/ProgressionSidebarGroup/index.tsx | 4 ++-- .../ProgressionSidebar/ProgressionSidebarItem/index.tsx | 4 ++-- packages/ui-components/Common/ProgressionSidebar/index.tsx | 4 ++-- packages/ui-components/Common/Select/index.tsx | 4 ++-- packages/ui-components/Containers/Footer/index.tsx | 4 ++-- packages/ui-components/Containers/MetaBar/index.stories.tsx | 3 +-- packages/ui-components/Containers/MetaBar/index.tsx | 4 ++-- packages/ui-components/Containers/NavBar/NavItem/index.tsx | 4 ++-- packages/ui-components/Containers/NavBar/index.tsx | 4 ++-- .../ui-components/Containers/Sidebar/SidebarGroup/index.tsx | 4 ++-- .../ui-components/Containers/Sidebar/SidebarItem/index.tsx | 4 ++-- packages/ui-components/Containers/Sidebar/index.tsx | 4 ++-- 28 files changed, 52 insertions(+), 57 deletions(-) diff --git a/packages/ui-components/Common/AvatarGroup/Avatar/index.tsx b/packages/ui-components/Common/AvatarGroup/Avatar/index.tsx index eef9a82587266..32b0cea02d66c 100644 --- a/packages/ui-components/Common/AvatarGroup/Avatar/index.tsx +++ b/packages/ui-components/Common/AvatarGroup/Avatar/index.tsx @@ -2,10 +2,10 @@ import classNames from 'classnames'; import type { HTMLAttributes, ElementType } from 'react'; import { forwardRef } from 'react'; -import styles from './index.module.css'; - import type { LinkLike } from '#types'; +import styles from './index.module.css'; + export type AvatarProps = { image?: string; name?: string; diff --git a/packages/ui-components/Common/AvatarGroup/Overlay/index.tsx b/packages/ui-components/Common/AvatarGroup/Overlay/index.tsx index 05a5f0bad487e..8176b05d8e27d 100644 --- a/packages/ui-components/Common/AvatarGroup/Overlay/index.tsx +++ b/packages/ui-components/Common/AvatarGroup/Overlay/index.tsx @@ -1,10 +1,10 @@ import { ArrowUpRightIcon } from '@heroicons/react/24/solid'; import type { ComponentProps, FC } from 'react'; -import styles from './index.module.css'; - import Avatar from '#Common/AvatarGroup/Avatar'; +import styles from './index.module.css'; + export type AvatarOverlayProps = ComponentProps & { url?: string; }; diff --git a/packages/ui-components/Common/AvatarGroup/index.tsx b/packages/ui-components/Common/AvatarGroup/index.tsx index 449d1998e0d14..f52ce1c519bfe 100644 --- a/packages/ui-components/Common/AvatarGroup/index.tsx +++ b/packages/ui-components/Common/AvatarGroup/index.tsx @@ -4,8 +4,6 @@ import classNames from 'classnames'; import type { FC, ElementType } from 'react'; import { useState, useMemo } from 'react'; -import styles from './index.module.css'; - import type { AvatarProps } from '#Common/AvatarGroup/Avatar'; import Avatar from '#Common/AvatarGroup/Avatar'; import avatarstyles from '#Common/AvatarGroup/Avatar/index.module.css'; @@ -13,6 +11,8 @@ import AvatarOverlay from '#Common/AvatarGroup/Overlay'; import Tooltip from '#Common/Tooltip'; import type { LinkLike } from '#types'; +import styles from './index.module.css'; + type AvatarGroupProps = { avatars: Array; limit?: number; diff --git a/packages/ui-components/Common/BadgeGroup/index.tsx b/packages/ui-components/Common/BadgeGroup/index.tsx index 2fc5c7d64f2f1..b797e38f56f7d 100644 --- a/packages/ui-components/Common/BadgeGroup/index.tsx +++ b/packages/ui-components/Common/BadgeGroup/index.tsx @@ -1,11 +1,11 @@ import ArrowRightIcon from '@heroicons/react/24/solid/ArrowRightIcon'; import type { ComponentProps, FC, PropsWithChildren } from 'react'; -import styles from './index.module.css'; - import Badge from '#Common/Badge'; import type { LinkLike } from '#types'; +import styles from './index.module.css'; + type BadgeGroupKind = 'default' | 'warning' | 'error'; type BadgeGroupProps = { diff --git a/packages/ui-components/Common/BaseButton/index.tsx b/packages/ui-components/Common/BaseButton/index.tsx index 3f48970a5bbaf..ad2661f55aac7 100644 --- a/packages/ui-components/Common/BaseButton/index.tsx +++ b/packages/ui-components/Common/BaseButton/index.tsx @@ -1,10 +1,10 @@ import classNames from 'classnames'; import type { FC, AnchorHTMLAttributes, ButtonHTMLAttributes } from 'react'; -import styles from './index.module.css'; - import type { LinkLike } from '#types'; +import styles from './index.module.css'; + export type ButtonProps = ( | AnchorHTMLAttributes | ButtonHTMLAttributes diff --git a/packages/ui-components/Common/BaseCodeBox/index.tsx b/packages/ui-components/Common/BaseCodeBox/index.tsx index ca9e83348de26..58af8f8af7375 100644 --- a/packages/ui-components/Common/BaseCodeBox/index.tsx +++ b/packages/ui-components/Common/BaseCodeBox/index.tsx @@ -8,11 +8,11 @@ import classNames from 'classnames'; import type { FC, PropsWithChildren, ReactElement, ReactNode } from 'react'; import { Fragment, isValidElement, useRef } from 'react'; -import styles from './index.module.css'; - import BaseButton from '#Common/BaseButton'; import type { LinkLike } from '#types'; +import styles from './index.module.css'; + // Transforms a code element with plain text content into a more structured // format for rendering with line numbers const transformCode = >( diff --git a/packages/ui-components/Common/BaseCrossLink/index.tsx b/packages/ui-components/Common/BaseCrossLink/index.tsx index 178277a86af6b..96e7df13b317d 100644 --- a/packages/ui-components/Common/BaseCrossLink/index.tsx +++ b/packages/ui-components/Common/BaseCrossLink/index.tsx @@ -2,11 +2,10 @@ import classNames from 'classnames'; import type { FC } from 'react'; import PrevNextArrow from '#Common/BasePagination/PrevNextArrow'; +import type { LinkLike, FormattedMessage } from '#types'; import styles from './index.module.css'; -import type { LinkLike, FormattedMessage } from '#types'; - export type CrossLinkProps = { type: 'previous' | 'next'; text: FormattedMessage; diff --git a/packages/ui-components/Common/BaseLinkTabs/index.tsx b/packages/ui-components/Common/BaseLinkTabs/index.tsx index 735d52775120b..4e693534fcb00 100644 --- a/packages/ui-components/Common/BaseLinkTabs/index.tsx +++ b/packages/ui-components/Common/BaseLinkTabs/index.tsx @@ -1,10 +1,10 @@ import type { FC, PropsWithChildren } from 'react'; -import styles from './index.module.css'; - import Select from '#Common/Select'; import type { LinkLike } from '#types'; +import styles from './index.module.css'; + type LinkTab = { key: string; label: string; link: string }; export type LinkTabsProps = PropsWithChildren<{ diff --git a/packages/ui-components/Common/BasePagination/PaginationListItem/index.tsx b/packages/ui-components/Common/BasePagination/PaginationListItem/index.tsx index d21eb9c344bf7..09762e97f343c 100644 --- a/packages/ui-components/Common/BasePagination/PaginationListItem/index.tsx +++ b/packages/ui-components/Common/BasePagination/PaginationListItem/index.tsx @@ -1,9 +1,9 @@ import type { FC } from 'react'; -import styles from './index.module.css'; - import type { LinkLike } from '#types'; +import styles from './index.module.css'; + export type PaginationListItemProps = { url: string; pageNumber: number; diff --git a/packages/ui-components/Common/BasePagination/index.tsx b/packages/ui-components/Common/BasePagination/index.tsx index 210d27c702994..a8cb70fd69db2 100644 --- a/packages/ui-components/Common/BasePagination/index.tsx +++ b/packages/ui-components/Common/BasePagination/index.tsx @@ -1,13 +1,12 @@ import { ArrowRightIcon, ArrowLeftIcon } from '@heroicons/react/20/solid'; import type { FC } from 'react'; +import Button from '#Common/BaseButton'; import { useGetPageElements } from '#Common/BasePagination/useGetPageElements'; +import type { LinkLike } from '#types'; import styles from './index.module.css'; -import Button from '#Common/BaseButton'; -import type { LinkLike } from '#types'; - type Page = { url: string }; export type PaginationProps = { diff --git a/packages/ui-components/Common/Breadcrumbs/BreadcrumbHomeLink/index.tsx b/packages/ui-components/Common/Breadcrumbs/BreadcrumbHomeLink/index.tsx index 327bc4cd2fb68..df04884d4cf01 100644 --- a/packages/ui-components/Common/Breadcrumbs/BreadcrumbHomeLink/index.tsx +++ b/packages/ui-components/Common/Breadcrumbs/BreadcrumbHomeLink/index.tsx @@ -1,10 +1,10 @@ import HomeIcon from '@heroicons/react/24/outline/HomeIcon'; import type { ComponentProps, FC } from 'react'; -import styles from './index.module.css'; - import BreadcrumbLink from '#Common/Breadcrumbs/BreadcrumbLink'; +import styles from './index.module.css'; + type BreadcrumbHomeLinkProps = Omit< ComponentProps, 'href' diff --git a/packages/ui-components/Common/Breadcrumbs/BreadcrumbLink/index.tsx b/packages/ui-components/Common/Breadcrumbs/BreadcrumbLink/index.tsx index 4d2c7cacb1d0c..408a0de854c39 100644 --- a/packages/ui-components/Common/Breadcrumbs/BreadcrumbLink/index.tsx +++ b/packages/ui-components/Common/Breadcrumbs/BreadcrumbLink/index.tsx @@ -1,10 +1,10 @@ import classNames from 'classnames'; import type { ComponentProps, FC } from 'react'; -import styles from './index.module.css'; - import type { LinkLike } from '#types'; +import styles from './index.module.css'; + type BreadcrumbLinkProps = { active?: boolean; as: LinkLike; diff --git a/packages/ui-components/Common/CodeTabs/index.tsx b/packages/ui-components/Common/CodeTabs/index.tsx index fc2942f8af8e7..77ad910f33c3b 100644 --- a/packages/ui-components/Common/CodeTabs/index.tsx +++ b/packages/ui-components/Common/CodeTabs/index.tsx @@ -1,9 +1,9 @@ import type { ComponentProps, FC } from 'react'; -import styles from './index.module.css'; - import Tabs from '#Common/Tabs'; +import styles from './index.module.css'; + type CodeTabsProps = Pick< ComponentProps, 'tabs' | 'defaultValue' | 'children' | 'addons' diff --git a/packages/ui-components/Common/LanguageDropDown/index.tsx b/packages/ui-components/Common/LanguageDropDown/index.tsx index b99fe38fe6f92..1f30a24890743 100644 --- a/packages/ui-components/Common/LanguageDropDown/index.tsx +++ b/packages/ui-components/Common/LanguageDropDown/index.tsx @@ -3,10 +3,10 @@ import * as DropdownMenu from '@radix-ui/react-dropdown-menu'; import classNames from 'classnames'; import type { FC } from 'react'; -import styles from './index.module.css'; - import type { SimpleLocaleConfig } from '#types'; +import styles from './index.module.css'; + type LanguageDropDownProps = { onChange?: (newLocale: SimpleLocaleConfig) => void; currentLanguage: string; diff --git a/packages/ui-components/Common/NodejsLogo/index.tsx b/packages/ui-components/Common/NodejsLogo/index.tsx index 2dcfe508fe0a7..ab39ae6ebcd07 100644 --- a/packages/ui-components/Common/NodejsLogo/index.tsx +++ b/packages/ui-components/Common/NodejsLogo/index.tsx @@ -1,11 +1,10 @@ import type { FC } from 'react'; import NodejsIcon from '#Icons/Logos/Nodejs'; +import type { LogoVariant } from '#types'; import style from './index.module.css'; -import type { LogoVariant } from '#types'; - type NodejsLogoProps = { variant?: LogoVariant; ariaLabel?: string; diff --git a/packages/ui-components/Common/Preview/index.tsx b/packages/ui-components/Common/Preview/index.tsx index eace5fd9d0cf4..3d3cc977ceeda 100644 --- a/packages/ui-components/Common/Preview/index.tsx +++ b/packages/ui-components/Common/Preview/index.tsx @@ -3,11 +3,10 @@ import type { FC } from 'react'; import HexagonGrid from '#Icons/HexagonGrid'; import JsWhiteIcon from '#Icons/Logos/JsWhite'; +import type { BlogPreviewType } from '#types'; import styles from './index.module.css'; -import type { BlogPreviewType } from '#types'; - type PreviewProps = { title: string; type?: BlogPreviewType; diff --git a/packages/ui-components/Common/ProgressionSidebar/ProgressionSidebarGroup/index.tsx b/packages/ui-components/Common/ProgressionSidebar/ProgressionSidebarGroup/index.tsx index c44f55e22fa6a..c2414bdba620b 100644 --- a/packages/ui-components/Common/ProgressionSidebar/ProgressionSidebarGroup/index.tsx +++ b/packages/ui-components/Common/ProgressionSidebar/ProgressionSidebarGroup/index.tsx @@ -1,10 +1,10 @@ import type { ComponentProps, FC } from 'react'; -import styles from './index.module.css'; - import ProgressionSidebarItem from '#Common/ProgressionSidebar/ProgressionSidebarItem'; import type { FormattedMessage, LinkLike } from '#types'; +import styles from './index.module.css'; + type ProgressionSidebarGroupProps = { groupName: FormattedMessage; items: Array>; diff --git a/packages/ui-components/Common/ProgressionSidebar/ProgressionSidebarItem/index.tsx b/packages/ui-components/Common/ProgressionSidebar/ProgressionSidebarItem/index.tsx index 6ff8760e5cc27..66088de93eec8 100644 --- a/packages/ui-components/Common/ProgressionSidebar/ProgressionSidebarItem/index.tsx +++ b/packages/ui-components/Common/ProgressionSidebar/ProgressionSidebarItem/index.tsx @@ -1,11 +1,11 @@ import type { FC } from 'react'; -import styles from './index.module.css'; - import BaseActiveLink from '#Common/BaseActiveLink'; import ProgressionSidebarIcon from '#Common/ProgressionSidebar/ProgressionSidebarIcon'; import type { FormattedMessage, LinkLike } from '#types'; +import styles from './index.module.css'; + type ProgressionSidebarItemProps = { label: FormattedMessage; link: string; diff --git a/packages/ui-components/Common/ProgressionSidebar/index.tsx b/packages/ui-components/Common/ProgressionSidebar/index.tsx index d3a2a38bf06fb..702218100f832 100644 --- a/packages/ui-components/Common/ProgressionSidebar/index.tsx +++ b/packages/ui-components/Common/ProgressionSidebar/index.tsx @@ -2,12 +2,12 @@ import { useRef, type ComponentProps, type FC } from 'react'; -import styles from './index.module.css'; - import ProgressionSidebarGroup from '#Common/ProgressionSidebar/ProgressionSidebarGroup'; import Select from '#Common/Select'; import type { LinkLike } from '#types'; +import styles from './index.module.css'; + type ProgressionSidebarProps = { groups: Array>; pathname?: string; diff --git a/packages/ui-components/Common/Select/index.tsx b/packages/ui-components/Common/Select/index.tsx index 4c7b088a8a8c6..ecc681d11d556 100644 --- a/packages/ui-components/Common/Select/index.tsx +++ b/packages/ui-components/Common/Select/index.tsx @@ -6,11 +6,11 @@ import classNames from 'classnames'; import { useEffect, useId, useMemo, useState } from 'react'; import type { ReactElement, ReactNode } from 'react'; -import styles from './index.module.css'; - import Skeleton from '#Common/Skeleton'; import type { FormattedMessage } from '#types'; +import styles from './index.module.css'; + export type SelectValue = { label: FormattedMessage | string; value: T; diff --git a/packages/ui-components/Containers/Footer/index.tsx b/packages/ui-components/Containers/Footer/index.tsx index f5ade8c5b91e5..94c766155acea 100644 --- a/packages/ui-components/Containers/Footer/index.tsx +++ b/packages/ui-components/Containers/Footer/index.tsx @@ -2,8 +2,6 @@ import type { FC, SVGProps } from 'react'; -import styles from './index.module.css'; - import NavItem from '#Containers/NavBar/NavItem'; import { Bluesky, @@ -16,6 +14,8 @@ import { } from '#Icons/Social'; import type { LinkLike } from '#types'; +import styles from './index.module.css'; + const footerSocialIcons: Record>> = { github: GitHub, mastodon: Mastodon, diff --git a/packages/ui-components/Containers/MetaBar/index.stories.tsx b/packages/ui-components/Containers/MetaBar/index.stories.tsx index 5b238f8c33f6c..e0baecddfe483 100644 --- a/packages/ui-components/Containers/MetaBar/index.stories.tsx +++ b/packages/ui-components/Containers/MetaBar/index.stories.tsx @@ -1,9 +1,8 @@ import { CodeBracketIcon } from '@heroicons/react/24/outline'; import type { Meta as MetaObj, StoryObj } from '@storybook/react'; -import GitHubIcon from '#Icons/Social/GitHub'; - import MetaBar from '#Containers/MetaBar'; +import GitHubIcon from '#Icons/Social/GitHub'; type Story = StoryObj; type Meta = MetaObj; diff --git a/packages/ui-components/Containers/MetaBar/index.tsx b/packages/ui-components/Containers/MetaBar/index.tsx index 38c4602e38711..f351b79b6483b 100644 --- a/packages/ui-components/Containers/MetaBar/index.tsx +++ b/packages/ui-components/Containers/MetaBar/index.tsx @@ -2,10 +2,10 @@ import type { Heading } from '@vcarl/remark-headings'; import { Fragment, useMemo } from 'react'; import type { FC } from 'react'; -import styles from './index.module.css'; - import type { LinkLike } from '#types'; +import styles from './index.module.css'; + type MetaBarProps = { items: Partial>; headings?: { diff --git a/packages/ui-components/Containers/NavBar/NavItem/index.tsx b/packages/ui-components/Containers/NavBar/NavItem/index.tsx index 265f63d3847f0..91afaced9e26c 100644 --- a/packages/ui-components/Containers/NavBar/NavItem/index.tsx +++ b/packages/ui-components/Containers/NavBar/NavItem/index.tsx @@ -2,11 +2,11 @@ import { ArrowUpRightIcon } from '@heroicons/react/24/solid'; import classNames from 'classnames'; import type { FC, HTMLAttributeAnchorTarget, PropsWithChildren } from 'react'; -import styles from './index.module.css'; - import BaseActiveLink from '#Common/BaseActiveLink'; import type { LinkLike } from '#types'; +import styles from './index.module.css'; + type NavItemType = 'nav' | 'footer'; type NavItemProps = { diff --git a/packages/ui-components/Containers/NavBar/index.tsx b/packages/ui-components/Containers/NavBar/index.tsx index 4336712557952..0e0aaa3da40e1 100644 --- a/packages/ui-components/Containers/NavBar/index.tsx +++ b/packages/ui-components/Containers/NavBar/index.tsx @@ -12,11 +12,11 @@ import type { ElementType, } from 'react'; -import style from './index.module.css'; - import NavItem from '#Containers/NavBar/NavItem'; import type { FormattedMessage, LinkLike } from '#types'; +import style from './index.module.css'; + const navInteractionIcons = { show: , close: , diff --git a/packages/ui-components/Containers/Sidebar/SidebarGroup/index.tsx b/packages/ui-components/Containers/Sidebar/SidebarGroup/index.tsx index 9946bdc7eeafb..3c2b041f395f1 100644 --- a/packages/ui-components/Containers/Sidebar/SidebarGroup/index.tsx +++ b/packages/ui-components/Containers/Sidebar/SidebarGroup/index.tsx @@ -1,10 +1,10 @@ import type { ComponentProps, FC } from 'react'; -import styles from './index.module.css'; - import SidebarItem from '#Containers/Sidebar/SidebarItem'; import type { FormattedMessage, LinkLike } from '#types'; +import styles from './index.module.css'; + type SidebarGroupProps = { groupName: FormattedMessage; items: Array, 'as' | 'pathname'>>; diff --git a/packages/ui-components/Containers/Sidebar/SidebarItem/index.tsx b/packages/ui-components/Containers/Sidebar/SidebarItem/index.tsx index 3487ba16c1d26..c410f2123d691 100644 --- a/packages/ui-components/Containers/Sidebar/SidebarItem/index.tsx +++ b/packages/ui-components/Containers/Sidebar/SidebarItem/index.tsx @@ -1,11 +1,11 @@ import { ArrowUpRightIcon } from '@heroicons/react/24/solid'; import type { FC } from 'react'; -import styles from './index.module.css'; - import ActiveLink from '#Common/BaseActiveLink'; import type { FormattedMessage, LinkLike } from '#types'; +import styles from './index.module.css'; + type SidebarItemProps = { label: FormattedMessage; link: string; diff --git a/packages/ui-components/Containers/Sidebar/index.tsx b/packages/ui-components/Containers/Sidebar/index.tsx index 0ea2d1c2fe82b..b724e65cc93d4 100644 --- a/packages/ui-components/Containers/Sidebar/index.tsx +++ b/packages/ui-components/Containers/Sidebar/index.tsx @@ -1,11 +1,11 @@ import type { ComponentProps, FC } from 'react'; -import styles from './index.module.css'; - import Select from '#Common/Select'; import SidebarGroup from '#Containers/Sidebar/SidebarGroup'; import type { LinkLike } from '#types'; +import styles from './index.module.css'; + type SidebarProps = { groups: Array, 'as' | 'pathname'>>; pathname?: string; From f465df75174fad7fc7d98e34cce393ba18664019 Mon Sep 17 00:00:00 2001 From: avivkeller Date: Fri, 9 May 2025 18:46:47 -0400 Subject: [PATCH 3/3] #ui and #site --- apps/site/app/[locale]/[...path]/page.tsx | 8 ++++---- apps/site/app/[locale]/error.tsx | 4 ++-- apps/site/app/[locale]/feed/[feed]/route.ts | 6 +++--- apps/site/app/[locale]/layout.tsx | 12 ++++++------ .../app/[locale]/next-data/api-data/route.ts | 12 ++++++------ .../blog-data/[category]/[page]/route.ts | 6 +++--- .../next-data/download-snippets/route.tsx | 4 ++-- .../next-data/og/[category]/[title]/route.tsx | 6 +++--- .../app/[locale]/next-data/page-data/route.ts | 6 +++--- .../[locale]/next-data/release-data/route.ts | 4 ++-- apps/site/app/[locale]/not-found.tsx | 4 ++-- apps/site/app/[locale]/page.tsx | 19 +++++++++++-------- apps/site/app/global-error.tsx | 6 +++--- apps/site/app/sitemap.ts | 6 +++--- apps/site/client-context.ts | 4 ++-- .../Blog/BlogHeader/__tests__/index.test.jsx | 2 +- .../site/components/Blog/BlogHeader/index.tsx | 4 ++-- .../BlogPostCard/__tests__/index.test.jsx | 2 +- .../components/Blog/BlogPostCard/index.tsx | 10 +++++----- apps/site/components/Common/Button.tsx | 2 +- apps/site/components/Common/CodeBox.tsx | 4 ++-- apps/site/components/Common/CrossLink.tsx | 2 +- apps/site/components/Common/FormattedTime.tsx | 2 +- apps/site/components/Common/LinkTabs.tsx | 4 ++-- apps/site/components/Common/Pagination.tsx | 2 +- apps/site/components/Common/Search/index.tsx | 4 ++-- .../Downloads/DownloadButton/index.tsx | 10 +++++----- .../components/Downloads/DownloadLink.tsx | 12 ++++++------ .../DownloadReleasesTable/DetailsButton.tsx | 6 +++--- .../Downloads/DownloadReleasesTable/index.tsx | 6 +++--- .../Downloads/MinorReleasesTable/index.tsx | 8 ++++---- .../Downloads/Release/BlogPostLink.tsx | 4 ++-- .../Downloads/Release/ChangelogLink.tsx | 8 ++++---- .../Downloads/Release/DownloadLink.tsx | 6 +++--- .../Release/InstallationMethodDropdown.tsx | 10 +++++++--- .../Release/OperatingSystemDropdown.tsx | 12 ++++++++---- .../Release/PackageManagerDropdown.tsx | 10 +++++++--- .../Downloads/Release/PlatformDropdown.tsx | 10 +++++----- .../Release/PrebuiltDownloadButtons.tsx | 8 ++++---- .../Downloads/Release/ReleaseCodeBox.tsx | 19 +++++++++++-------- .../Downloads/Release/VersionDropdown.tsx | 5 ++++- .../Downloads/ReleaseModal/index.tsx | 8 ++++---- .../Downloads/ReleaseOverview/index.tsx | 4 ++-- apps/site/components/Link.tsx | 2 +- apps/site/components/LinkWithArrow.tsx | 2 +- .../components/MDX/Calendar/Event/index.tsx | 8 ++++---- .../MDX/Calendar/UpcomingMeetings.tsx | 12 ++++++------ apps/site/components/MDX/Calendar/utils.ts | 2 +- apps/site/components/MDX/CodeBox/index.tsx | 4 ++-- apps/site/components/MDX/Image/index.tsx | 2 +- apps/site/components/withAvatarGroup.tsx | 6 +++--- apps/site/components/withBadgeGroup.tsx | 6 +++--- apps/site/components/withBanner.tsx | 6 +++--- apps/site/components/withBlogCategories.tsx | 10 +++++----- apps/site/components/withBlogCrossLinks.tsx | 8 ++++---- apps/site/components/withBreadcrumbs.tsx | 12 ++++++++---- apps/site/components/withDownloadSection.tsx | 15 +++++++++------ apps/site/components/withFooter.tsx | 6 +++--- apps/site/components/withLayout.tsx | 18 +++++++++--------- apps/site/components/withMetaBar.tsx | 16 ++++++++-------- apps/site/components/withNavBar.tsx | 14 +++++++------- apps/site/components/withNodeRelease.tsx | 4 ++-- apps/site/components/withNodejsLogo.tsx | 2 +- .../components/withProgressionSidebar.tsx | 8 ++++---- apps/site/components/withSidebar.tsx | 8 ++++---- .../site/components/withSidebarCrossLinks.tsx | 6 +++--- .../__tests__/useClientContext.test.jsx | 4 ++-- .../__tests__/useCopyToClipboard.test.jsx | 2 +- .../__tests__/useDetectOS.test.mjs | 2 +- .../__tests__/useMediaQuery.test.mjs | 2 +- .../__tests__/useNotification.test.jsx | 4 ++-- .../hooks/react-client/useClientContext.ts | 4 ++-- apps/site/hooks/react-client/useDetectOS.ts | 6 +++--- .../hooks/react-client/useNavigationState.ts | 4 ++-- .../hooks/react-client/useNotification.ts | 2 +- .../hooks/react-generic/useSiteNavigation.ts | 8 ++++++-- .../hooks/react-server/useClientContext.ts | 2 +- apps/site/i18n.tsx | 2 +- apps/site/layouts/About.tsx | 14 +++++++------- apps/site/layouts/ArticlePage.tsx | 8 ++++---- apps/site/layouts/Base.tsx | 4 ++-- apps/site/layouts/Blog.tsx | 14 +++++++------- apps/site/layouts/Default.tsx | 8 ++++---- apps/site/layouts/Download.tsx | 8 ++++---- apps/site/layouts/GlowingBackdrop.tsx | 4 ++-- apps/site/layouts/Learn.tsx | 14 +++++++------- apps/site/layouts/Post.tsx | 16 ++++++++-------- apps/site/middleware.ts | 2 +- apps/site/next-data/blogData.ts | 6 +++--- apps/site/next-data/downloadSnippets.ts | 8 ++++---- .../generators/__tests__/releaseData.test.mjs | 2 +- .../__tests__/websiteFeeds.test.mjs | 2 +- apps/site/next-data/providers/blogData.ts | 6 +++--- .../next-data/providers/downloadSnippets.ts | 2 +- apps/site/next-data/providers/releaseData.ts | 2 +- apps/site/next-data/providers/websiteFeeds.ts | 4 ++-- apps/site/next-data/releaseData.ts | 6 +++--- apps/site/package.json | 2 +- .../__tests__/matterProvider.test.jsx | 2 +- .../navigationStateProvider.test.jsx | 2 +- .../__tests__/notificationProvider.test.jsx | 2 +- .../__tests__/releaseProvider.test.jsx | 5 ++++- .../__tests__/themeProvider.test.jsx | 2 +- apps/site/providers/matterProvider.tsx | 6 +++--- apps/site/providers/releaseModalProvider.tsx | 4 ++-- apps/site/providers/releaseProvider.tsx | 9 ++++++--- apps/site/providers/themeProvider.tsx | 2 +- .../__tests__/releaseReducer.test.mjs | 5 ++++- apps/site/reducers/releaseReducer.ts | 2 +- apps/site/types/release.ts | 6 +++--- apps/site/types/server.ts | 4 ++-- .../__tests__/assignClientContext.test.mjs | 2 +- apps/site/util/__tests__/authorUtils.test.mjs | 2 +- apps/site/util/__tests__/blogUtils.test.mjs | 2 +- apps/site/util/__tests__/dateUtils.test.mjs | 2 +- apps/site/util/__tests__/debounce.test.mjs | 2 +- apps/site/util/__tests__/deepMerge.test.mjs | 2 +- apps/site/util/__tests__/detectOS.test.mjs | 2 +- .../util/__tests__/downloadUtils.test.mjs | 2 +- .../__tests__/getHighEntropyValues.test.mjs | 2 +- .../__tests__/getLanguageDisplayName.test.mjs | 4 ++-- .../util/__tests__/getNodeApiLink.test.mjs | 2 +- .../__tests__/getNodeDownloadUrl.test.mjs | 2 +- .../util/__tests__/getUserPlatform.test.mjs | 2 +- apps/site/util/__tests__/gitHubUtils.test.mjs | 2 +- apps/site/util/__tests__/hexToRGBA.test.mjs | 2 +- apps/site/util/__tests__/imageUtils.test.mjs | 2 +- apps/site/util/__tests__/stringUtils.test.mjs | 2 +- apps/site/util/assignClientContext.ts | 2 +- apps/site/util/authorUtils.ts | 8 ++++---- apps/site/util/blogUtils.ts | 2 +- apps/site/util/detectOS.ts | 2 +- apps/site/util/downloadUtils.tsx | 6 +++--- apps/site/util/getHighlighter.ts | 2 +- apps/site/util/getLanguageDisplayName.ts | 2 +- apps/site/util/getNodeApiLink.ts | 2 +- apps/site/util/getNodeDownloadUrl.ts | 4 ++-- apps/site/util/getUserPlatform.ts | 2 +- .../Common/AlertBox/index.stories.tsx | 2 +- .../AvatarGroup/Avatar/index.stories.tsx | 2 +- .../Common/AvatarGroup/Avatar/index.tsx | 2 +- .../AvatarGroup/Overlay/index.stories.tsx | 2 +- .../Common/AvatarGroup/Overlay/index.tsx | 2 +- .../Common/AvatarGroup/index.stories.tsx | 2 +- .../Common/AvatarGroup/index.tsx | 12 ++++++------ .../Common/Badge/index.stories.tsx | 2 +- .../Common/BadgeGroup/index.stories.tsx | 2 +- .../ui-components/Common/BadgeGroup/index.tsx | 4 ++-- .../Common/Banner/index.stories.tsx | 2 +- .../Common/BaseActiveLink/index.tsx | 2 +- .../Common/BaseButton/index.stories.tsx | 2 +- .../ui-components/Common/BaseButton/index.tsx | 2 +- .../Common/BaseCodeBox/index.stories.tsx | 2 +- .../Common/BaseCodeBox/index.tsx | 4 ++-- .../Common/BaseCrossLink/index.stories.tsx | 2 +- .../Common/BaseCrossLink/index.tsx | 4 ++-- .../Common/BaseLinkTabs/index.stories.tsx | 2 +- .../Common/BaseLinkTabs/index.tsx | 4 ++-- .../BasePagination/Ellipsis/index.stories.tsx | 2 +- .../__tests__/index.test.jsx | 2 +- .../PaginationListItem/index.stories.tsx | 2 +- .../PaginationListItem/index.tsx | 2 +- .../BasePagination/__tests__/index.test.jsx | 2 +- .../Common/BasePagination/index.stories.tsx | 2 +- .../Common/BasePagination/index.tsx | 6 +++--- .../BasePagination/useGetPageElements.tsx | 10 +++++----- .../Common/Blockquote/index.stories.tsx | 2 +- .../Breadcrumbs/BreadcrumbHomeLink/index.tsx | 2 +- .../Breadcrumbs/BreadcrumbLink/index.tsx | 2 +- .../BreadcrumbTruncatedItem/index.tsx | 2 +- .../Common/Breadcrumbs/index.stories.tsx | 2 +- .../Common/Breadcrumbs/index.tsx | 12 ++++++------ .../Common/CodeTabs/index.stories.tsx | 4 ++-- .../ui-components/Common/CodeTabs/index.tsx | 2 +- .../Common/GlowingBackdrop/index.stories.tsx | 2 +- .../Common/GlowingBackdrop/index.tsx | 2 +- .../Common/LanguageDropDown/index.stories.tsx | 2 +- .../Common/LanguageDropDown/index.tsx | 2 +- .../Common/Modal/index.stories.tsx | 2 +- .../Common/NodejsLogo/index.stories.tsx | 2 +- .../ui-components/Common/NodejsLogo/index.tsx | 4 ++-- .../Common/Notification/index.stories.tsx | 2 +- .../Common/Preview/index.stories.tsx | 2 +- .../ui-components/Common/Preview/index.tsx | 6 +++--- .../ProgressionSidebarGroup/index.tsx | 4 ++-- .../ProgressionSidebarItem/index.tsx | 6 +++--- .../ProgressionSidebar/index.stories.tsx | 2 +- .../Common/ProgressionSidebar/index.tsx | 6 +++--- .../Common/Select/index.stories.tsx | 4 ++-- .../ui-components/Common/Select/index.tsx | 4 ++-- .../Common/Separator/index.stories.tsx | 2 +- .../Common/Tabs/index.stories.tsx | 2 +- .../Common/ThemeToggle/index.stories.tsx | 2 +- .../Common/Tooltip/index.stories.tsx | 2 +- .../Containers/Footer/index.stories.tsx | 2 +- .../ui-components/Containers/Footer/index.tsx | 6 +++--- .../Containers/MetaBar/index.stories.tsx | 4 ++-- .../Containers/MetaBar/index.tsx | 2 +- .../NavBar/NavItem/index.stories.tsx | 2 +- .../Containers/NavBar/NavItem/index.tsx | 4 ++-- .../Containers/NavBar/index.stories.tsx | 2 +- .../ui-components/Containers/NavBar/index.tsx | 4 ++-- .../Sidebar/SidebarGroup/index.stories.tsx | 2 +- .../Containers/Sidebar/SidebarGroup/index.tsx | 4 ++-- .../Sidebar/SidebarItem/index.stories.tsx | 2 +- .../Containers/Sidebar/SidebarItem/index.tsx | 4 ++-- .../Containers/Sidebar/index.stories.tsx | 2 +- .../Containers/Sidebar/index.tsx | 6 +++--- .../Icons/HexagonGrid.stories.tsx | 2 +- .../Icons/InstallationMethod/index.ts | 16 ++++++++-------- .../ui-components/Icons/Logos/JsWhite.tsx | 2 +- packages/ui-components/Icons/Logos/Nodejs.tsx | 2 +- packages/ui-components/Icons/Logos/index.ts | 14 +++++++------- .../Icons/OperatingSystem/index.ts | 8 ++++---- .../Icons/PackageManager/index.ts | 6 +++--- packages/ui-components/Icons/Social/index.ts | 14 +++++++------- .../__design__/node-logos.stories.tsx | 2 +- .../__design__/platform-logos.stories.tsx | 4 ++-- .../__design__/social-logos.stories.tsx | 2 +- packages/ui-components/package.json | 2 +- 220 files changed, 548 insertions(+), 507 deletions(-) diff --git a/apps/site/app/[locale]/[...path]/page.tsx b/apps/site/app/[locale]/[...path]/page.tsx index 0fc9790eee15a..01edf259fe177 100644 --- a/apps/site/app/[locale]/[...path]/page.tsx +++ b/apps/site/app/[locale]/[...path]/page.tsx @@ -7,13 +7,13 @@ * dynamic params, which will lead on static export errors and other sort of issues. */ -import * as basePage from '#app/[locale]/page'; +import * as basePage from '#site/app/[locale]/page'; import { ENABLE_STATIC_EXPORT_LOCALE, ENABLE_STATIC_EXPORT, -} from '#next.constants.mjs'; -import { dynamicRouter } from '#next.dynamic.mjs'; -import { availableLocaleCodes, defaultLocale } from '#next.locales.mjs'; +} from '#site/next.constants.mjs'; +import { dynamicRouter } from '#site/next.dynamic.mjs'; +import { availableLocaleCodes, defaultLocale } from '#site/next.locales.mjs'; // This is the default Viewport Metadata // @see https://nextjs.org/docs/app/api-reference/functions/generate-viewport#generateviewport-function diff --git a/apps/site/app/[locale]/error.tsx b/apps/site/app/[locale]/error.tsx index afd5d875c2eea..c3f2232662fd4 100644 --- a/apps/site/app/[locale]/error.tsx +++ b/apps/site/app/[locale]/error.tsx @@ -4,8 +4,8 @@ import { ArrowRightIcon } from '@heroicons/react/24/solid'; import { useTranslations } from 'next-intl'; import type { FC } from 'react'; -import Button from '#components/Common/Button'; -import GlowingBackdropLayout from '#layouts/GlowingBackdrop'; +import Button from '#site/components/Common/Button'; +import GlowingBackdropLayout from '#site/layouts/GlowingBackdrop'; const ErrorPage: FC<{ error: Error }> = () => { const t = useTranslations(); diff --git a/apps/site/app/[locale]/feed/[feed]/route.ts b/apps/site/app/[locale]/feed/[feed]/route.ts index 30c50669e669e..a5abc2981a17b 100644 --- a/apps/site/app/[locale]/feed/[feed]/route.ts +++ b/apps/site/app/[locale]/feed/[feed]/route.ts @@ -1,8 +1,8 @@ import { NextResponse } from 'next/server'; -import provideWebsiteFeeds from '#next-data/providers/websiteFeeds'; -import { siteConfig } from '#next.json.mjs'; -import { defaultLocale } from '#next.locales.mjs'; +import provideWebsiteFeeds from '#site/next-data/providers/websiteFeeds'; +import { siteConfig } from '#site/next.json.mjs'; +import { defaultLocale } from '#site/next.locales.mjs'; type DynamicStaticPaths = { locale: string; feed: string }; type StaticParams = { params: Promise }; diff --git a/apps/site/app/[locale]/layout.tsx b/apps/site/app/[locale]/layout.tsx index 2002e21a40c2e..ed0a60eb0057e 100644 --- a/apps/site/app/[locale]/layout.tsx +++ b/apps/site/app/[locale]/layout.tsx @@ -4,13 +4,13 @@ import classNames from 'classnames'; import { NextIntlClientProvider } from 'next-intl'; import type { FC, PropsWithChildren } from 'react'; -import BaseLayout from '#layouts/Base'; -import { VERCEL_ENV } from '#next.constants.mjs'; -import { IBM_PLEX_MONO, OPEN_SANS } from '#next.fonts'; -import { availableLocalesMap, defaultLocale } from '#next.locales.mjs'; -import { ThemeProvider } from '#providers/themeProvider'; +import BaseLayout from '#site/layouts/Base'; +import { VERCEL_ENV } from '#site/next.constants.mjs'; +import { IBM_PLEX_MONO, OPEN_SANS } from '#site/next.fonts'; +import { availableLocalesMap, defaultLocale } from '#site/next.locales.mjs'; +import { ThemeProvider } from '#site/providers/themeProvider'; -import '#styles/index.css'; +import '#site/styles/index.css'; const fontClasses = classNames(IBM_PLEX_MONO.variable, OPEN_SANS.variable); diff --git a/apps/site/app/[locale]/next-data/api-data/route.ts b/apps/site/app/[locale]/next-data/api-data/route.ts index 8019f99fbfeff..de008a59739b0 100644 --- a/apps/site/app/[locale]/next-data/api-data/route.ts +++ b/apps/site/app/[locale]/next-data/api-data/route.ts @@ -1,11 +1,11 @@ import { deflateSync } from 'node:zlib'; -import provideReleaseData from '#next-data/providers/releaseData'; -import { GITHUB_API_KEY } from '#next.constants.mjs'; -import { defaultLocale } from '#next.locales.mjs'; -import type { GitHubApiFile } from '#types'; -import { getGitHubApiDocsUrl } from '#util/gitHubUtils'; -import { parseRichTextIntoPlainText } from '#util/stringUtils'; +import provideReleaseData from '#site/next-data/providers/releaseData'; +import { GITHUB_API_KEY } from '#site/next.constants.mjs'; +import { defaultLocale } from '#site/next.locales.mjs'; +import type { GitHubApiFile } from '#site/types'; +import { getGitHubApiDocsUrl } from '#site/util/gitHubUtils'; +import { parseRichTextIntoPlainText } from '#site/util/stringUtils'; // Defines if we should use the GitHub API Key for the request // based on the environment variable `GITHUB_API_KEY` diff --git a/apps/site/app/[locale]/next-data/blog-data/[category]/[page]/route.ts b/apps/site/app/[locale]/next-data/blog-data/[category]/[page]/route.ts index f4c8365ed3e49..11f5489084d88 100644 --- a/apps/site/app/[locale]/next-data/blog-data/[category]/[page]/route.ts +++ b/apps/site/app/[locale]/next-data/blog-data/[category]/[page]/route.ts @@ -1,9 +1,9 @@ import { provideBlogPosts, providePaginatedBlogPosts, -} from '#next-data/providers/blogData'; -import { defaultLocale } from '#next.locales.mjs'; -import type { BlogCategory } from '#types'; +} from '#site/next-data/providers/blogData'; +import { defaultLocale } from '#site/next.locales.mjs'; +import type { BlogCategory } from '#site/types'; type DynamicStaticPaths = { locale: string; diff --git a/apps/site/app/[locale]/next-data/download-snippets/route.tsx b/apps/site/app/[locale]/next-data/download-snippets/route.tsx index 68e46f044988c..90232982a2d45 100644 --- a/apps/site/app/[locale]/next-data/download-snippets/route.tsx +++ b/apps/site/app/[locale]/next-data/download-snippets/route.tsx @@ -1,5 +1,5 @@ -import provideDownloadSnippets from '#next-data/providers/downloadSnippets'; -import { defaultLocale } from '#next.locales.mjs'; +import provideDownloadSnippets from '#site/next-data/providers/downloadSnippets'; +import { defaultLocale } from '#site/next.locales.mjs'; type DynamicStaticPaths = { locale: string }; type StaticParams = { params: Promise }; diff --git a/apps/site/app/[locale]/next-data/og/[category]/[title]/route.tsx b/apps/site/app/[locale]/next-data/og/[category]/[title]/route.tsx index 56e077a5bb575..05b304e5721ed 100644 --- a/apps/site/app/[locale]/next-data/og/[category]/[title]/route.tsx +++ b/apps/site/app/[locale]/next-data/og/[category]/[title]/route.tsx @@ -2,9 +2,9 @@ import HexagonGrid from '@node-core/ui-components/Icons/HexagonGrid'; import JsWhiteIcon from '@node-core/ui-components/Icons/Logos/JsWhite'; import { ImageResponse } from 'next/og'; -import { DEFAULT_CATEGORY_OG_TYPE } from '#next.constants.mjs'; -import { defaultLocale } from '#next.locales.mjs'; -import { hexToRGBA } from '#util/hexToRGBA'; +import { DEFAULT_CATEGORY_OG_TYPE } from '#site/next.constants.mjs'; +import { defaultLocale } from '#site/next.locales.mjs'; +import { hexToRGBA } from '#site/util/hexToRGBA'; // TODO: use CSS variables instead of absolute values const CATEGORY_TO_THEME_COLOUR_MAP = { diff --git a/apps/site/app/[locale]/next-data/page-data/route.ts b/apps/site/app/[locale]/next-data/page-data/route.ts index 11df5abbf7754..d7e9fdd09efd4 100644 --- a/apps/site/app/[locale]/next-data/page-data/route.ts +++ b/apps/site/app/[locale]/next-data/page-data/route.ts @@ -2,9 +2,9 @@ import { deflateSync } from 'node:zlib'; import matter from 'gray-matter'; -import { dynamicRouter } from '#next.dynamic.mjs'; -import { defaultLocale } from '#next.locales.mjs'; -import { parseRichTextIntoPlainText } from '#util/stringUtils'; +import { dynamicRouter } from '#site/next.dynamic.mjs'; +import { defaultLocale } from '#site/next.locales.mjs'; +import { parseRichTextIntoPlainText } from '#site/util/stringUtils'; // This is the Route Handler for the `GET` method which handles the request // for a digest and metadata of all existing pages on Node.js Website diff --git a/apps/site/app/[locale]/next-data/release-data/route.ts b/apps/site/app/[locale]/next-data/release-data/route.ts index 5509f7ca9d377..8b4d229f81066 100644 --- a/apps/site/app/[locale]/next-data/release-data/route.ts +++ b/apps/site/app/[locale]/next-data/release-data/route.ts @@ -1,5 +1,5 @@ -import provideReleaseData from '#next-data/providers/releaseData'; -import { defaultLocale } from '#next.locales.mjs'; +import provideReleaseData from '#site/next-data/providers/releaseData'; +import { defaultLocale } from '#site/next.locales.mjs'; // This is the Route Handler for the `GET` method which handles the request // for generating static data related to the Node.js Release Data diff --git a/apps/site/app/[locale]/not-found.tsx b/apps/site/app/[locale]/not-found.tsx index 3cc0200893d5e..7972f7c265ac4 100644 --- a/apps/site/app/[locale]/not-found.tsx +++ b/apps/site/app/[locale]/not-found.tsx @@ -5,8 +5,8 @@ import Image from 'next/image'; import { useTranslations } from 'next-intl'; import type { FC } from 'react'; -import Button from '#components/Common/Button'; -import GlowingBackdropLayout from '#layouts/GlowingBackdrop'; +import Button from '#site/components/Common/Button'; +import GlowingBackdropLayout from '#site/layouts/GlowingBackdrop'; const NotFoundPage: FC = () => { const t = useTranslations(); diff --git a/apps/site/app/[locale]/page.tsx b/apps/site/app/[locale]/page.tsx index 1a1b98af30e30..624e7e1afe598 100644 --- a/apps/site/app/[locale]/page.tsx +++ b/apps/site/app/[locale]/page.tsx @@ -11,17 +11,20 @@ import { notFound, redirect } from 'next/navigation'; import { setRequestLocale } from 'next-intl/server'; import type { FC } from 'react'; -import { setClientContext } from '#client-context'; -import WithLayout from '#components/withLayout'; +import { setClientContext } from '#site/client-context'; +import WithLayout from '#site/components/withLayout'; import { ENABLE_STATIC_EXPORT_LOCALE, ENABLE_STATIC_EXPORT, -} from '#next.constants.mjs'; -import { PAGE_VIEWPORT, DYNAMIC_ROUTES } from '#next.dynamic.constants.mjs'; -import { dynamicRouter } from '#next.dynamic.mjs'; -import { allLocaleCodes, availableLocaleCodes } from '#next.locales.mjs'; -import { defaultLocale } from '#next.locales.mjs'; -import { MatterProvider } from '#providers/matterProvider'; +} from '#site/next.constants.mjs'; +import { + PAGE_VIEWPORT, + DYNAMIC_ROUTES, +} from '#site/next.dynamic.constants.mjs'; +import { dynamicRouter } from '#site/next.dynamic.mjs'; +import { allLocaleCodes, availableLocaleCodes } from '#site/next.locales.mjs'; +import { defaultLocale } from '#site/next.locales.mjs'; +import { MatterProvider } from '#site/providers/matterProvider'; type DynamicStaticPaths = { path: Array; locale: string }; type DynamicParams = { params: Promise }; diff --git a/apps/site/app/global-error.tsx b/apps/site/app/global-error.tsx index bc04644ab3c89..7c656bfe74487 100644 --- a/apps/site/app/global-error.tsx +++ b/apps/site/app/global-error.tsx @@ -3,9 +3,9 @@ import { ArrowRightIcon } from '@heroicons/react/24/solid'; import type { FC } from 'react'; -import Button from '#components/Common/Button'; -import BaseLayout from '#layouts/Base'; -import GlowingBackdropLayout from '#layouts/GlowingBackdrop'; +import Button from '#site/components/Common/Button'; +import BaseLayout from '#site/layouts/Base'; +import GlowingBackdropLayout from '#site/layouts/GlowingBackdrop'; const GlobalErrorPage: FC<{ error: Error }> = () => ( diff --git a/apps/site/app/sitemap.ts b/apps/site/app/sitemap.ts index 19ad6293478f0..86b8c337a7290 100644 --- a/apps/site/app/sitemap.ts +++ b/apps/site/app/sitemap.ts @@ -4,9 +4,9 @@ import { BASE_PATH, BASE_URL, EXTERNAL_LINKS_SITEMAP, -} from '#next.constants.mjs'; -import { dynamicRouter } from '#next.dynamic.mjs'; -import { availableLocaleCodes, defaultLocale } from '#next.locales.mjs'; +} from '#site/next.constants.mjs'; +import { dynamicRouter } from '#site/next.dynamic.mjs'; +import { availableLocaleCodes, defaultLocale } from '#site/next.locales.mjs'; // This is the combination of the Application Base URL and Base PATH const baseUrlAndPath = `${BASE_URL}${BASE_PATH}`; diff --git a/apps/site/client-context.ts b/apps/site/client-context.ts index 7228b6836fd44..8ed30d8fb353b 100644 --- a/apps/site/client-context.ts +++ b/apps/site/client-context.ts @@ -1,7 +1,7 @@ import { cache } from 'react'; -import type { ClientSharedServerContext } from '#types'; -import { assignClientContext } from '#util/assignClientContext'; +import type { ClientSharedServerContext } from '#site/types'; +import { assignClientContext } from '#site/util/assignClientContext'; // This allows us to have Server-Side Context's of the shared "contextual" data // which includes the frontmatter, the current pathname from the dynamic segments diff --git a/apps/site/components/Blog/BlogHeader/__tests__/index.test.jsx b/apps/site/components/Blog/BlogHeader/__tests__/index.test.jsx index f6198e7102679..83ef08a47e5e6 100644 --- a/apps/site/components/Blog/BlogHeader/__tests__/index.test.jsx +++ b/apps/site/components/Blog/BlogHeader/__tests__/index.test.jsx @@ -3,7 +3,7 @@ import assert from 'node:assert/strict'; import { render, screen } from '@testing-library/react'; -import BlogHeader from '#components/Blog/BlogHeader'; +import BlogHeader from '#site/components/Blog/BlogHeader'; describe('BlogHeader', () => { it('should have correct href when category is all', () => { diff --git a/apps/site/components/Blog/BlogHeader/index.tsx b/apps/site/components/Blog/BlogHeader/index.tsx index d371779f01a04..d345b8bf1e5b7 100644 --- a/apps/site/components/Blog/BlogHeader/index.tsx +++ b/apps/site/components/Blog/BlogHeader/index.tsx @@ -2,8 +2,8 @@ import { RssIcon } from '@heroicons/react/24/solid'; import { useTranslations } from 'next-intl'; import type { FC } from 'react'; -import Link from '#components/Link'; -import { siteConfig } from '#next.json.mjs'; +import Link from '#site/components/Link'; +import { siteConfig } from '#site/next.json.mjs'; import styles from './index.module.css'; diff --git a/apps/site/components/Blog/BlogPostCard/__tests__/index.test.jsx b/apps/site/components/Blog/BlogPostCard/__tests__/index.test.jsx index 7bce9624a752a..a0a09b8187055 100644 --- a/apps/site/components/Blog/BlogPostCard/__tests__/index.test.jsx +++ b/apps/site/components/Blog/BlogPostCard/__tests__/index.test.jsx @@ -5,7 +5,7 @@ import { render, screen } from '@testing-library/react'; import { isVisible } from '../../../../../../tests/utilities.mjs'; -import BlogPostCard from '#components/Blog/BlogPostCard'; +import BlogPostCard from '#site/components/Blog/BlogPostCard'; function renderBlogPostCard({ title = 'Blog post title', diff --git a/apps/site/components/Blog/BlogPostCard/index.tsx b/apps/site/components/Blog/BlogPostCard/index.tsx index a0e9b00bd064b..4f7487b86de75 100644 --- a/apps/site/components/Blog/BlogPostCard/index.tsx +++ b/apps/site/components/Blog/BlogPostCard/index.tsx @@ -2,11 +2,11 @@ import Preview from '@node-core/ui-components/Common/Preview'; import { useTranslations } from 'next-intl'; import type { FC } from 'react'; -import FormattedTime from '#components/Common/FormattedTime'; -import Link from '#components/Link'; -import WithAvatarGroup from '#components/withAvatarGroup'; -import type { BlogCategory } from '#types'; -import { mapBlogCategoryToPreviewType } from '#util/blogUtils'; +import FormattedTime from '#site/components/Common/FormattedTime'; +import Link from '#site/components/Link'; +import WithAvatarGroup from '#site/components/withAvatarGroup'; +import type { BlogCategory } from '#site/types'; +import { mapBlogCategoryToPreviewType } from '#site/util/blogUtils'; import styles from './index.module.css'; diff --git a/apps/site/components/Common/Button.tsx b/apps/site/components/Common/Button.tsx index ce721dc6f0f17..206570b3a9bcb 100644 --- a/apps/site/components/Common/Button.tsx +++ b/apps/site/components/Common/Button.tsx @@ -3,7 +3,7 @@ import BaseButton, { } from '@node-core/ui-components/Common/BaseButton'; import type { FC, ComponentProps } from 'react'; -import Link from '#components/Link'; +import Link from '#site/components/Link'; const Button: FC< Omit & Omit, 'as' | 'size'> diff --git a/apps/site/components/Common/CodeBox.tsx b/apps/site/components/Common/CodeBox.tsx index e45c54b6de619..4b050cf5f9c8d 100644 --- a/apps/site/components/Common/CodeBox.tsx +++ b/apps/site/components/Common/CodeBox.tsx @@ -4,8 +4,8 @@ import BaseCodeBox from '@node-core/ui-components/Common/BaseCodeBox'; import { useTranslations } from 'next-intl'; import type { FC, PropsWithChildren, ReactNode } from 'react'; -import Link from '#components/Link'; -import { useCopyToClipboard, useNotification } from '#hooks'; +import Link from '#site/components/Link'; +import { useCopyToClipboard, useNotification } from '#site/hooks'; type CodeBoxProps = { language: string; diff --git a/apps/site/components/Common/CrossLink.tsx b/apps/site/components/Common/CrossLink.tsx index eceb92734d3a4..c22dbdd6661e3 100644 --- a/apps/site/components/Common/CrossLink.tsx +++ b/apps/site/components/Common/CrossLink.tsx @@ -3,7 +3,7 @@ import type { CrossLinkProps } from '@node-core/ui-components/Common/BaseCrossLi import { useTranslations } from 'next-intl'; import type { FC } from 'react'; -import Link from '#components/Link'; +import Link from '#site/components/Link'; const CrossLink: FC> = props => { const t = useTranslations(); diff --git a/apps/site/components/Common/FormattedTime.tsx b/apps/site/components/Common/FormattedTime.tsx index d3ef17bf2d2cb..17787e7a19d64 100644 --- a/apps/site/components/Common/FormattedTime.tsx +++ b/apps/site/components/Common/FormattedTime.tsx @@ -2,7 +2,7 @@ import type { DateTimeFormatOptions } from 'next-intl'; import { useFormatter } from 'next-intl'; import type { FC } from 'react'; -import { DEFAULT_DATE_FORMAT } from '#next.calendar.constants.mjs'; +import { DEFAULT_DATE_FORMAT } from '#site/next.calendar.constants.mjs'; type FormattedTimeProps = { date: string | Date; diff --git a/apps/site/components/Common/LinkTabs.tsx b/apps/site/components/Common/LinkTabs.tsx index 0ec1f87836b33..60c9c4d716668 100644 --- a/apps/site/components/Common/LinkTabs.tsx +++ b/apps/site/components/Common/LinkTabs.tsx @@ -4,8 +4,8 @@ import BaseLinkTabs from '@node-core/ui-components/Common/BaseLinkTabs'; import type { LinkTabsProps } from '@node-core/ui-components/Common/BaseLinkTabs'; import type { FC } from 'react'; -import Link from '#components/Link'; -import { useRouter } from '#navigation.mjs'; +import Link from '#site/components/Link'; +import { useRouter } from '#site/navigation.mjs'; const LinkTabs: FC> = props => { const { push } = useRouter(); diff --git a/apps/site/components/Common/Pagination.tsx b/apps/site/components/Common/Pagination.tsx index 273de6232df71..2992d1abf365f 100644 --- a/apps/site/components/Common/Pagination.tsx +++ b/apps/site/components/Common/Pagination.tsx @@ -3,7 +3,7 @@ import type { PaginationProps } from '@node-core/ui-components/Common/BasePagina import { useTranslations } from 'next-intl'; import type { FC } from 'react'; -import Link from '#components/Link'; +import Link from '#site/components/Link'; const Pagination: FC< Omit diff --git a/apps/site/components/Common/Search/index.tsx b/apps/site/components/Common/Search/index.tsx index 395260065e856..14a01db46a60d 100644 --- a/apps/site/components/Common/Search/index.tsx +++ b/apps/site/components/Common/Search/index.tsx @@ -5,14 +5,14 @@ import { useTranslations, useLocale } from 'next-intl'; import { useTheme } from 'next-themes'; import type { FC } from 'react'; -import { useRouter } from '#navigation.mjs'; +import { useRouter } from '#site/navigation.mjs'; import { ORAMA_CLOUD_ENDPOINT, ORAMA_CLOUD_API_KEY, DEFAULT_ORAMA_QUERY_PARAMS, DEFAULT_ORAMA_SUGGESTIONS, BASE_URL, -} from '#next.constants.mjs'; +} from '#site/next.constants.mjs'; type ResultMapDescription = { path: string; diff --git a/apps/site/components/Downloads/DownloadButton/index.tsx b/apps/site/components/Downloads/DownloadButton/index.tsx index 591db6e1a4023..f238ce4546505 100644 --- a/apps/site/components/Downloads/DownloadButton/index.tsx +++ b/apps/site/components/Downloads/DownloadButton/index.tsx @@ -4,11 +4,11 @@ import { CloudArrowDownIcon } from '@heroicons/react/24/outline'; import classNames from 'classnames'; import type { FC, PropsWithChildren } from 'react'; -import Button from '#components/Common/Button'; -import { useClientContext } from '#hooks'; -import type { NodeRelease } from '#types'; -import { getNodeDownloadUrl } from '#util/getNodeDownloadUrl'; -import { getUserPlatform } from '#util/getUserPlatform'; +import Button from '#site/components/Common/Button'; +import { useClientContext } from '#site/hooks'; +import type { NodeRelease } from '#site/types'; +import { getNodeDownloadUrl } from '#site/util/getNodeDownloadUrl'; +import { getUserPlatform } from '#site/util/getUserPlatform'; import styles from './index.module.css'; diff --git a/apps/site/components/Downloads/DownloadLink.tsx b/apps/site/components/Downloads/DownloadLink.tsx index 715614ff2c676..e639a83d2ac7c 100644 --- a/apps/site/components/Downloads/DownloadLink.tsx +++ b/apps/site/components/Downloads/DownloadLink.tsx @@ -2,12 +2,12 @@ import type { FC, PropsWithChildren } from 'react'; -import LinkWithArrow from '#components/LinkWithArrow'; -import { useClientContext } from '#hooks'; -import type { NodeRelease } from '#types'; -import type { DownloadKind } from '#util/getNodeDownloadUrl'; -import { getNodeDownloadUrl } from '#util/getNodeDownloadUrl'; -import { getUserPlatform } from '#util/getUserPlatform'; +import LinkWithArrow from '#site/components/LinkWithArrow'; +import { useClientContext } from '#site/hooks'; +import type { NodeRelease } from '#site/types'; +import type { DownloadKind } from '#site/util/getNodeDownloadUrl'; +import { getNodeDownloadUrl } from '#site/util/getNodeDownloadUrl'; +import { getUserPlatform } from '#site/util/getUserPlatform'; type DownloadLinkProps = { release: NodeRelease; kind?: DownloadKind }; diff --git a/apps/site/components/Downloads/DownloadReleasesTable/DetailsButton.tsx b/apps/site/components/Downloads/DownloadReleasesTable/DetailsButton.tsx index d545bce041f3e..b8fbeb6f160b9 100644 --- a/apps/site/components/Downloads/DownloadReleasesTable/DetailsButton.tsx +++ b/apps/site/components/Downloads/DownloadReleasesTable/DetailsButton.tsx @@ -4,9 +4,9 @@ import { useTranslations } from 'next-intl'; import type { FC } from 'react'; import { use } from 'react'; -import LinkWithArrow from '#components/LinkWithArrow'; -import { ReleaseModalContext } from '#providers/releaseModalProvider'; -import type { NodeRelease } from '#types'; +import LinkWithArrow from '#site/components/LinkWithArrow'; +import { ReleaseModalContext } from '#site/providers/releaseModalProvider'; +import type { NodeRelease } from '#site/types'; type DetailsButtonProps = { versionData: NodeRelease; diff --git a/apps/site/components/Downloads/DownloadReleasesTable/index.tsx b/apps/site/components/Downloads/DownloadReleasesTable/index.tsx index 2536a0f0e572d..fa2180f5f7fbe 100644 --- a/apps/site/components/Downloads/DownloadReleasesTable/index.tsx +++ b/apps/site/components/Downloads/DownloadReleasesTable/index.tsx @@ -2,9 +2,9 @@ import Badge from '@node-core/ui-components/Common/Badge'; import { getTranslations } from 'next-intl/server'; import type { FC } from 'react'; -import FormattedTime from '#components/Common/FormattedTime'; -import DetailsButton from '#components/Downloads/DownloadReleasesTable/DetailsButton'; -import getReleaseData from '#next-data/releaseData'; +import FormattedTime from '#site/components/Common/FormattedTime'; +import DetailsButton from '#site/components/Downloads/DownloadReleasesTable/DetailsButton'; +import getReleaseData from '#site/next-data/releaseData'; const DownloadReleasesTable: FC = async () => { const releaseData = await getReleaseData(); diff --git a/apps/site/components/Downloads/MinorReleasesTable/index.tsx b/apps/site/components/Downloads/MinorReleasesTable/index.tsx index 35ab3b35de7c1..c2cf17ec975a5 100644 --- a/apps/site/components/Downloads/MinorReleasesTable/index.tsx +++ b/apps/site/components/Downloads/MinorReleasesTable/index.tsx @@ -4,10 +4,10 @@ import Separator from '@node-core/ui-components/Common/Separator'; import { useTranslations } from 'next-intl'; import type { FC } from 'react'; -import Link from '#components/Link'; -import { BASE_CHANGELOG_URL } from '#next.constants.mjs'; -import type { MinorVersion } from '#types'; -import { getNodeApiLink } from '#util/getNodeApiLink'; +import Link from '#site/components/Link'; +import { BASE_CHANGELOG_URL } from '#site/next.constants.mjs'; +import type { MinorVersion } from '#site/types'; +import { getNodeApiLink } from '#site/util/getNodeApiLink'; import styles from './index.module.css'; diff --git a/apps/site/components/Downloads/Release/BlogPostLink.tsx b/apps/site/components/Downloads/Release/BlogPostLink.tsx index df14edf935890..484fffb0eaac1 100644 --- a/apps/site/components/Downloads/Release/BlogPostLink.tsx +++ b/apps/site/components/Downloads/Release/BlogPostLink.tsx @@ -3,8 +3,8 @@ import type { FC, PropsWithChildren } from 'react'; import { useContext } from 'react'; -import Link from '#components/Link'; -import { ReleaseContext } from '#providers/releaseProvider'; +import Link from '#site/components/Link'; +import { ReleaseContext } from '#site/providers/releaseProvider'; const BlogPostLink: FC = ({ children }) => { const { release } = useContext(ReleaseContext); diff --git a/apps/site/components/Downloads/Release/ChangelogLink.tsx b/apps/site/components/Downloads/Release/ChangelogLink.tsx index 19c093f0d7271..13c4f4f784e80 100644 --- a/apps/site/components/Downloads/Release/ChangelogLink.tsx +++ b/apps/site/components/Downloads/Release/ChangelogLink.tsx @@ -3,10 +3,10 @@ import type { FC, PropsWithChildren } from 'react'; import { useContext } from 'react'; -import Link from '#components/Link'; -import LinkWithArrow from '#components/LinkWithArrow'; -import { BASE_CHANGELOG_URL } from '#next.constants.mjs'; -import { ReleaseContext } from '#providers/releaseProvider'; +import Link from '#site/components/Link'; +import LinkWithArrow from '#site/components/LinkWithArrow'; +import { BASE_CHANGELOG_URL } from '#site/next.constants.mjs'; +import { ReleaseContext } from '#site/providers/releaseProvider'; const ChangelogLink: FC = ({ children }) => { const { release } = useContext(ReleaseContext); diff --git a/apps/site/components/Downloads/Release/DownloadLink.tsx b/apps/site/components/Downloads/Release/DownloadLink.tsx index fad1ff4bb36d1..dc685ccedda79 100644 --- a/apps/site/components/Downloads/Release/DownloadLink.tsx +++ b/apps/site/components/Downloads/Release/DownloadLink.tsx @@ -3,9 +3,9 @@ import type { FC, PropsWithChildren } from 'react'; import { useContext } from 'react'; -import DownloadLinkBase from '#components/Downloads/DownloadLink'; -import { ReleaseContext } from '#providers/releaseProvider'; -import type { DownloadKind } from '#util/getNodeDownloadUrl'; +import DownloadLinkBase from '#site/components/Downloads/DownloadLink'; +import { ReleaseContext } from '#site/providers/releaseProvider'; +import type { DownloadKind } from '#site/util/getNodeDownloadUrl'; type DownloadLinkProps = { kind?: DownloadKind }; diff --git a/apps/site/components/Downloads/Release/InstallationMethodDropdown.tsx b/apps/site/components/Downloads/Release/InstallationMethodDropdown.tsx index e7e63848aec47..b050b156f18c4 100644 --- a/apps/site/components/Downloads/Release/InstallationMethodDropdown.tsx +++ b/apps/site/components/Downloads/Release/InstallationMethodDropdown.tsx @@ -5,9 +5,13 @@ import { useTranslations } from 'next-intl'; import { useContext, useEffect, useMemo } from 'react'; import type { FC } from 'react'; -import { ReleaseContext } from '#providers/releaseProvider'; -import type { InstallationMethod } from '#types/release'; -import { nextItem, INSTALL_METHODS, parseCompat } from '#util/downloadUtils'; +import { ReleaseContext } from '#site/providers/releaseProvider'; +import type { InstallationMethod } from '#site/types/release'; +import { + nextItem, + INSTALL_METHODS, + parseCompat, +} from '#site/util/downloadUtils'; const InstallationMethodDropdown: FC = () => { const release = useContext(ReleaseContext); diff --git a/apps/site/components/Downloads/Release/OperatingSystemDropdown.tsx b/apps/site/components/Downloads/Release/OperatingSystemDropdown.tsx index 97269c3756f13..e5ba1e404d141 100644 --- a/apps/site/components/Downloads/Release/OperatingSystemDropdown.tsx +++ b/apps/site/components/Downloads/Release/OperatingSystemDropdown.tsx @@ -5,10 +5,14 @@ import { useTranslations } from 'next-intl'; import { useContext, useEffect, useMemo } from 'react'; import type { FC } from 'react'; -import { useClientContext } from '#hooks'; -import { ReleaseContext } from '#providers/releaseProvider'; -import type { UserOS } from '#types/userOS'; -import { nextItem, OPERATING_SYSTEMS, parseCompat } from '#util/downloadUtils'; +import { useClientContext } from '#site/hooks'; +import { ReleaseContext } from '#site/providers/releaseProvider'; +import type { UserOS } from '#site/types/userOS'; +import { + nextItem, + OPERATING_SYSTEMS, + parseCompat, +} from '#site/util/downloadUtils'; type OperatingSystemDropdownProps = { exclude?: Array }; diff --git a/apps/site/components/Downloads/Release/PackageManagerDropdown.tsx b/apps/site/components/Downloads/Release/PackageManagerDropdown.tsx index 86f6cde2c541b..28a48d178339d 100644 --- a/apps/site/components/Downloads/Release/PackageManagerDropdown.tsx +++ b/apps/site/components/Downloads/Release/PackageManagerDropdown.tsx @@ -5,9 +5,13 @@ import { useTranslations } from 'next-intl'; import { useContext, useEffect, useMemo } from 'react'; import type { FC } from 'react'; -import { ReleaseContext } from '#providers/releaseProvider'; -import type { PackageManager } from '#types/release'; -import { nextItem, PACKAGE_MANAGERS, parseCompat } from '#util/downloadUtils'; +import { ReleaseContext } from '#site/providers/releaseProvider'; +import type { PackageManager } from '#site/types/release'; +import { + nextItem, + PACKAGE_MANAGERS, + parseCompat, +} from '#site/util/downloadUtils'; const PackageManagerDropdown: FC = () => { const release = useContext(ReleaseContext); diff --git a/apps/site/components/Downloads/Release/PlatformDropdown.tsx b/apps/site/components/Downloads/Release/PlatformDropdown.tsx index 7e0614ceafb2b..7e5405e612155 100644 --- a/apps/site/components/Downloads/Release/PlatformDropdown.tsx +++ b/apps/site/components/Downloads/Release/PlatformDropdown.tsx @@ -5,11 +5,11 @@ import { useTranslations } from 'next-intl'; import type { FC } from 'react'; import { useEffect, useContext, useMemo } from 'react'; -import { useClientContext } from '#hooks'; -import { ReleaseContext } from '#providers/releaseProvider'; -import type { UserPlatform } from '#types/userOS'; -import { PLATFORMS, nextItem, parseCompat } from '#util/downloadUtils'; -import { getUserPlatform } from '#util/getUserPlatform'; +import { useClientContext } from '#site/hooks'; +import { ReleaseContext } from '#site/providers/releaseProvider'; +import type { UserPlatform } from '#site/types/userOS'; +import { PLATFORMS, nextItem, parseCompat } from '#site/util/downloadUtils'; +import { getUserPlatform } from '#site/util/getUserPlatform'; const PlatformDropdown: FC = () => { const { architecture, bitness } = useClientContext(); diff --git a/apps/site/components/Downloads/Release/PrebuiltDownloadButtons.tsx b/apps/site/components/Downloads/Release/PrebuiltDownloadButtons.tsx index f1ac918fc6b54..6b23dd1ed508e 100644 --- a/apps/site/components/Downloads/Release/PrebuiltDownloadButtons.tsx +++ b/apps/site/components/Downloads/Release/PrebuiltDownloadButtons.tsx @@ -6,13 +6,13 @@ import { useTranslations } from 'next-intl'; import { useContext } from 'react'; import type { FC } from 'react'; -import Button from '#components/Common/Button'; -import { ReleaseContext } from '#providers/releaseProvider'; +import Button from '#site/components/Common/Button'; +import { ReleaseContext } from '#site/providers/releaseProvider'; import { OperatingSystemLabel, OS_NOT_SUPPORTING_INSTALLERS, -} from '#util/downloadUtils'; -import { getNodeDownloadUrl } from '#util/getNodeDownloadUrl'; +} from '#site/util/downloadUtils'; +import { getNodeDownloadUrl } from '#site/util/getNodeDownloadUrl'; // Retrieves the pure extension piece from the input string const getExtension = (input: string) => String(input.split('.').slice(-1)); diff --git a/apps/site/components/Downloads/Release/ReleaseCodeBox.tsx b/apps/site/components/Downloads/Release/ReleaseCodeBox.tsx index 13351d7a1d26c..1ee5e6303d0c0 100644 --- a/apps/site/components/Downloads/Release/ReleaseCodeBox.tsx +++ b/apps/site/components/Downloads/Release/ReleaseCodeBox.tsx @@ -6,14 +6,17 @@ import { useTranslations } from 'next-intl'; import type { FC } from 'react'; import { useContext, useMemo } from 'react'; -import CodeBox from '#components/Common/CodeBox'; -import Link from '#components/Link'; -import LinkWithArrow from '#components/LinkWithArrow'; -import { createSval } from '#next.jsx.compiler.mjs'; -import { ReleaseContext, ReleasesContext } from '#providers/releaseProvider'; -import type { ReleaseContextType } from '#types/release'; -import { INSTALL_METHODS } from '#util/downloadUtils'; -import { highlightToHtml } from '#util/getHighlighter'; +import CodeBox from '#site/components/Common/CodeBox'; +import Link from '#site/components/Link'; +import LinkWithArrow from '#site/components/LinkWithArrow'; +import { createSval } from '#site/next.jsx.compiler.mjs'; +import { + ReleaseContext, + ReleasesContext, +} from '#site/providers/releaseProvider'; +import type { ReleaseContextType } from '#site/types/release'; +import { INSTALL_METHODS } from '#site/util/downloadUtils'; +import { highlightToHtml } from '#site/util/getHighlighter'; // Creates a minimal JavaScript interpreter for parsing the JavaScript code from the snippets // Note: that the code runs inside a sandboxed environment and cannot interact with any code outside of the sandbox diff --git a/apps/site/components/Downloads/Release/VersionDropdown.tsx b/apps/site/components/Downloads/Release/VersionDropdown.tsx index 8f193b3b3d8da..c2e1663f09a19 100644 --- a/apps/site/components/Downloads/Release/VersionDropdown.tsx +++ b/apps/site/components/Downloads/Release/VersionDropdown.tsx @@ -5,7 +5,10 @@ import { useTranslations } from 'next-intl'; import type { FC } from 'react'; import { useContext } from 'react'; -import { ReleaseContext, ReleasesContext } from '#providers/releaseProvider'; +import { + ReleaseContext, + ReleasesContext, +} from '#site/providers/releaseProvider'; const getDropDownStatus = (version: string, status: string) => { if (status === 'LTS') { diff --git a/apps/site/components/Downloads/ReleaseModal/index.tsx b/apps/site/components/Downloads/ReleaseModal/index.tsx index 7634ecb383db5..83a272a7214a0 100644 --- a/apps/site/components/Downloads/ReleaseModal/index.tsx +++ b/apps/site/components/Downloads/ReleaseModal/index.tsx @@ -3,10 +3,10 @@ import Modal from '@node-core/ui-components/Common/Modal'; import { useTranslations } from 'next-intl'; import type { FC } from 'react'; -import { MinorReleasesTable } from '#components/Downloads/MinorReleasesTable'; -import { ReleaseOverview } from '#components/Downloads/ReleaseOverview'; -import LinkWithArrow from '#components/LinkWithArrow'; -import type { NodeRelease } from '#types'; +import { MinorReleasesTable } from '#site/components/Downloads/MinorReleasesTable'; +import { ReleaseOverview } from '#site/components/Downloads/ReleaseOverview'; +import LinkWithArrow from '#site/components/LinkWithArrow'; +import type { NodeRelease } from '#site/types'; type ReleaseModalProps = { isOpen: boolean; diff --git a/apps/site/components/Downloads/ReleaseOverview/index.tsx b/apps/site/components/Downloads/ReleaseOverview/index.tsx index 539a1d12b8528..a29118a8e400f 100644 --- a/apps/site/components/Downloads/ReleaseOverview/index.tsx +++ b/apps/site/components/Downloads/ReleaseOverview/index.tsx @@ -8,8 +8,8 @@ import NpmIcon from '@node-core/ui-components/Icons/PackageManager/Npm'; import { useTranslations } from 'next-intl'; import type { FC, ReactNode, SVGProps } from 'react'; -import FormattedTime from '#components/Common/FormattedTime'; -import type { NodeRelease } from '#types'; +import FormattedTime from '#site/components/Common/FormattedTime'; +import type { NodeRelease } from '#site/types'; import styles from './index.module.css'; diff --git a/apps/site/components/Link.tsx b/apps/site/components/Link.tsx index 23d986da08df7..72ececf586631 100644 --- a/apps/site/components/Link.tsx +++ b/apps/site/components/Link.tsx @@ -1,6 +1,6 @@ import type { FC, HTMLProps } from 'react'; -import { Link as LocalizedLink } from '#navigation.mjs'; +import { Link as LocalizedLink } from '#site/navigation.mjs'; const Link: FC> = ({ children, diff --git a/apps/site/components/LinkWithArrow.tsx b/apps/site/components/LinkWithArrow.tsx index bb61f1463e391..12eb3cdf5472d 100644 --- a/apps/site/components/LinkWithArrow.tsx +++ b/apps/site/components/LinkWithArrow.tsx @@ -3,7 +3,7 @@ import type { SlotProps } from '@radix-ui/react-slot'; import { Slot } from '@radix-ui/react-slot'; import type { ComponentProps, FC, PropsWithChildren } from 'react'; -import Link from '#components/Link'; +import Link from '#site/components/Link'; type LinkWithArrowProps = | ({ asChild?: false } & ComponentProps) diff --git a/apps/site/components/MDX/Calendar/Event/index.tsx b/apps/site/components/MDX/Calendar/Event/index.tsx index 3357eeab22472..542cb494b6bb7 100644 --- a/apps/site/components/MDX/Calendar/Event/index.tsx +++ b/apps/site/components/MDX/Calendar/Event/index.tsx @@ -1,9 +1,9 @@ import type { FC } from 'react'; -import FormattedTime from '#components/Common/FormattedTime'; -import Link from '#components/Link'; -import { getZoomLink, isZoned } from '#components/MDX/Calendar/utils'; -import type { CalendarEvent } from '#types'; +import FormattedTime from '#site/components/Common/FormattedTime'; +import Link from '#site/components/Link'; +import { getZoomLink, isZoned } from '#site/components/MDX/Calendar/utils'; +import type { CalendarEvent } from '#site/types'; import styles from './index.module.css'; diff --git a/apps/site/components/MDX/Calendar/UpcomingMeetings.tsx b/apps/site/components/MDX/Calendar/UpcomingMeetings.tsx index ed425c2fea41c..743db02817ab0 100644 --- a/apps/site/components/MDX/Calendar/UpcomingMeetings.tsx +++ b/apps/site/components/MDX/Calendar/UpcomingMeetings.tsx @@ -1,11 +1,11 @@ import type { FC } from 'react'; -import FormattedTime from '#components/Common/FormattedTime'; -import Event from '#components/MDX/Calendar/Event'; -import { getZoomLink, isZoned } from '#components/MDX/Calendar/utils'; -import { CALENDAR_NODEJS_ID } from '#next.calendar.constants.mjs'; -import { getCalendarEvents } from '#next.calendar.mjs'; -import type { CalendarEvent } from '#types'; +import FormattedTime from '#site/components/Common/FormattedTime'; +import Event from '#site/components/MDX/Calendar/Event'; +import { getZoomLink, isZoned } from '#site/components/MDX/Calendar/utils'; +import { CALENDAR_NODEJS_ID } from '#site/next.calendar.constants.mjs'; +import { getCalendarEvents } from '#site/next.calendar.mjs'; +import type { CalendarEvent } from '#site/types'; import styles from './calendar.module.css'; diff --git a/apps/site/components/MDX/Calendar/utils.ts b/apps/site/components/MDX/Calendar/utils.ts index 2a63d895b1b3a..0c051431d969d 100644 --- a/apps/site/components/MDX/Calendar/utils.ts +++ b/apps/site/components/MDX/Calendar/utils.ts @@ -1,4 +1,4 @@ -import type { CalendarEvent, ZonedCalendarTime } from '#types'; +import type { CalendarEvent, ZonedCalendarTime } from '#site/types'; export const isZoned = (d: object): d is ZonedCalendarTime => 'dateTime' in d && 'timeZone' in d; diff --git a/apps/site/components/MDX/CodeBox/index.tsx b/apps/site/components/MDX/CodeBox/index.tsx index 4edf2f18a165d..8aa1367993b20 100644 --- a/apps/site/components/MDX/CodeBox/index.tsx +++ b/apps/site/components/MDX/CodeBox/index.tsx @@ -1,7 +1,7 @@ import type { FC, PropsWithChildren } from 'react'; -import CodeBox from '#components/Common/CodeBox'; -import { getLanguageDisplayName } from '#util/getLanguageDisplayName'; +import CodeBox from '#site/components/Common/CodeBox'; +import { getLanguageDisplayName } from '#site/util/getLanguageDisplayName'; type CodeBoxProps = { className?: string; showCopyButton?: string }; diff --git a/apps/site/components/MDX/Image/index.tsx b/apps/site/components/MDX/Image/index.tsx index 6f22fe27657d8..844a9596acf0b 100644 --- a/apps/site/components/MDX/Image/index.tsx +++ b/apps/site/components/MDX/Image/index.tsx @@ -2,7 +2,7 @@ import type { ImageProps } from 'next/image'; import Image from 'next/image'; import type { FC } from 'react'; -import { isSvgImage } from '#util/imageUtils'; +import { isSvgImage } from '#site/util/imageUtils'; const MDXImage: FC = ({ width, height, alt, src, ...props }) => { const isUnoptimizedImage = isSvgImage(src.toString()); diff --git a/apps/site/components/withAvatarGroup.tsx b/apps/site/components/withAvatarGroup.tsx index aef1093924aab..0c82aabe74c07 100644 --- a/apps/site/components/withAvatarGroup.tsx +++ b/apps/site/components/withAvatarGroup.tsx @@ -4,9 +4,9 @@ import AvatarGroup from '@node-core/ui-components/Common/AvatarGroup'; import Image from 'next/image'; import type { ComponentProps, FC } from 'react'; -import Link from '#components/Link'; -import type { AuthorProps } from '#types'; -import { getAuthors } from '#util/authorUtils'; +import Link from '#site/components/Link'; +import type { AuthorProps } from '#site/types'; +import { getAuthors } from '#site/util/authorUtils'; type WithAvatarGroupProps = Omit< ComponentProps, diff --git a/apps/site/components/withBadgeGroup.tsx b/apps/site/components/withBadgeGroup.tsx index 338ba6ff93744..ceda7771adff4 100644 --- a/apps/site/components/withBadgeGroup.tsx +++ b/apps/site/components/withBadgeGroup.tsx @@ -1,9 +1,9 @@ import BadgeGroup from '@node-core/ui-components/Common/BadgeGroup'; import type { FC } from 'react'; -import Link from '#components/Link'; -import { siteConfig } from '#next.json.mjs'; -import { dateIsBetween } from '#util/dateUtils'; +import Link from '#site/components/Link'; +import { siteConfig } from '#site/next.json.mjs'; +import { dateIsBetween } from '#site/util/dateUtils'; const WithBadgeGroup: FC<{ section: string }> = ({ section }) => { const badge = siteConfig.websiteBadges[section]; diff --git a/apps/site/components/withBanner.tsx b/apps/site/components/withBanner.tsx index e031222dd7f53..09f05065959d4 100644 --- a/apps/site/components/withBanner.tsx +++ b/apps/site/components/withBanner.tsx @@ -2,9 +2,9 @@ import { ArrowUpRightIcon } from '@heroicons/react/24/outline'; import Banner from '@node-core/ui-components/Common/Banner'; import type { FC } from 'react'; -import Link from '#components/Link'; -import { siteConfig } from '#next.json.mjs'; -import { dateIsBetween } from '#util/dateUtils'; +import Link from '#site/components/Link'; +import { siteConfig } from '#site/next.json.mjs'; +import { dateIsBetween } from '#site/util/dateUtils'; const WithBanner: FC<{ section: string }> = ({ section }) => { const banner = siteConfig.websiteBanners[section]; diff --git a/apps/site/components/withBlogCategories.tsx b/apps/site/components/withBlogCategories.tsx index 148d967783823..c011a6b60b618 100644 --- a/apps/site/components/withBlogCategories.tsx +++ b/apps/site/components/withBlogCategories.tsx @@ -1,11 +1,11 @@ import { useTranslations } from 'next-intl'; import type { ComponentProps, FC } from 'react'; -import BlogPostCard from '#components/Blog/BlogPostCard'; -import LinkTabs from '#components/Common/LinkTabs'; -import Pagination from '#components/Common/Pagination'; -import type { BlogPostsRSC } from '#types'; -import { mapAuthorToCardAuthors } from '#util/authorUtils'; +import BlogPostCard from '#site/components/Blog/BlogPostCard'; +import LinkTabs from '#site/components/Common/LinkTabs'; +import Pagination from '#site/components/Common/Pagination'; +import type { BlogPostsRSC } from '#site/types'; +import { mapAuthorToCardAuthors } from '#site/util/authorUtils'; type WithBlogCategoriesProps = { categories: ComponentProps['tabs']; diff --git a/apps/site/components/withBlogCrossLinks.tsx b/apps/site/components/withBlogCrossLinks.tsx index 6a4ed5cb20ee0..f5d09ed136504 100644 --- a/apps/site/components/withBlogCrossLinks.tsx +++ b/apps/site/components/withBlogCrossLinks.tsx @@ -1,9 +1,9 @@ import type { FC } from 'react'; -import { getClientContext } from '#client-context'; -import CrossLink from '#components/Common/CrossLink'; -import getBlogData from '#next-data/blogData'; -import type { BlogCategory } from '#types'; +import { getClientContext } from '#site/client-context'; +import CrossLink from '#site/components/Common/CrossLink'; +import getBlogData from '#site/next-data/blogData'; +import type { BlogCategory } from '#site/types'; const WithBlogCrossLinks: FC = async () => { const { pathname } = getClientContext(); diff --git a/apps/site/components/withBreadcrumbs.tsx b/apps/site/components/withBreadcrumbs.tsx index ddc3fe80efa9e..a0fcc4f28792a 100644 --- a/apps/site/components/withBreadcrumbs.tsx +++ b/apps/site/components/withBreadcrumbs.tsx @@ -5,10 +5,14 @@ import Breadcrumbs from '@node-core/ui-components/Common/Breadcrumbs'; import { useTranslations } from 'next-intl'; import type { FC } from 'react'; -import Link from '#components/Link'; -import { useClientContext, useMediaQuery, useSiteNavigation } from '#hooks'; -import type { NavigationKeys } from '#types'; -import { dashToCamelCase } from '#util/stringUtils'; +import Link from '#site/components/Link'; +import { + useClientContext, + useMediaQuery, + useSiteNavigation, +} from '#site/hooks'; +import type { NavigationKeys } from '#site/types'; +import { dashToCamelCase } from '#site/util/stringUtils'; type WithBreadcrumbsProps = { navKeys?: Array; diff --git a/apps/site/components/withDownloadSection.tsx b/apps/site/components/withDownloadSection.tsx index 7897d649de726..c65c4b0a53fd5 100644 --- a/apps/site/components/withDownloadSection.tsx +++ b/apps/site/components/withDownloadSection.tsx @@ -1,12 +1,15 @@ import { getLocale } from 'next-intl/server'; import type { FC, PropsWithChildren } from 'react'; -import { getClientContext } from '#client-context'; -import WithNodeRelease from '#components/withNodeRelease'; -import getDownloadSnippets from '#next-data/downloadSnippets'; -import getReleaseData from '#next-data/releaseData'; -import { defaultLocale } from '#next.locales.mjs'; -import { ReleaseProvider, ReleasesProvider } from '#providers/releaseProvider'; +import { getClientContext } from '#site/client-context'; +import WithNodeRelease from '#site/components/withNodeRelease'; +import getDownloadSnippets from '#site/next-data/downloadSnippets'; +import getReleaseData from '#site/next-data/releaseData'; +import { defaultLocale } from '#site/next.locales.mjs'; +import { + ReleaseProvider, + ReleasesProvider, +} from '#site/providers/releaseProvider'; // By default the translated languages do not contain all the download snippets // Hence we always merge any translated snippet with the fallbacks for missing snippets diff --git a/apps/site/components/withFooter.tsx b/apps/site/components/withFooter.tsx index 435a90aa2736a..8bf75ac402940 100644 --- a/apps/site/components/withFooter.tsx +++ b/apps/site/components/withFooter.tsx @@ -4,9 +4,9 @@ import Footer from '@node-core/ui-components/Containers/Footer'; import { useTranslations } from 'next-intl'; import type { FC } from 'react'; -import Link from '#components/Link'; -import { usePathname } from '#navigation.mjs'; -import { siteNavigation } from '#next.json.mjs'; +import Link from '#site/components/Link'; +import { usePathname } from '#site/navigation.mjs'; +import { siteNavigation } from '#site/next.json.mjs'; const WithFooter: FC = () => { const t = useTranslations(); diff --git a/apps/site/components/withLayout.tsx b/apps/site/components/withLayout.tsx index 6b1713d1aca4d..ec553190e621d 100644 --- a/apps/site/components/withLayout.tsx +++ b/apps/site/components/withLayout.tsx @@ -1,14 +1,14 @@ import type { FC, PropsWithChildren } from 'react'; -import AboutLayout from '#layouts/About'; -import ArticlePageLayout from '#layouts/ArticlePage'; -import BlogLayout from '#layouts/Blog'; -import DefaultLayout from '#layouts/Default'; -import DownloadLayout from '#layouts/Download'; -import GlowingBackdropLayout from '#layouts/GlowingBackdrop'; -import LearnLayout from '#layouts/Learn'; -import PostLayout from '#layouts/Post'; -import type { Layouts } from '#types'; +import AboutLayout from '#site/layouts/About'; +import ArticlePageLayout from '#site/layouts/ArticlePage'; +import BlogLayout from '#site/layouts/Blog'; +import DefaultLayout from '#site/layouts/Default'; +import DownloadLayout from '#site/layouts/Download'; +import GlowingBackdropLayout from '#site/layouts/GlowingBackdrop'; +import LearnLayout from '#site/layouts/Learn'; +import PostLayout from '#site/layouts/Post'; +import type { Layouts } from '#site/types'; const layouts = { about: AboutLayout, diff --git a/apps/site/components/withMetaBar.tsx b/apps/site/components/withMetaBar.tsx index b115f44227971..a7dd313ad8167 100644 --- a/apps/site/components/withMetaBar.tsx +++ b/apps/site/components/withMetaBar.tsx @@ -5,14 +5,14 @@ import GitHubIcon from '@node-core/ui-components/Icons/Social/GitHub'; import { useFormatter, useLocale, useTranslations } from 'next-intl'; import type { FC } from 'react'; -import Link from '#components/Link'; -import WithAvatarGroup from '#components/withAvatarGroup'; -import { useClientContext } from '#hooks/react-client'; -import useMediaQuery from '#hooks/react-client/useMediaQuery'; -import { DEFAULT_DATE_FORMAT } from '#next.calendar.constants.mjs'; -import { TRANSLATION_URL } from '#next.constants.mjs'; -import { defaultLocale } from '#next.locales.mjs'; -import { getGitHubBlobUrl } from '#util/gitHubUtils'; +import Link from '#site/components/Link'; +import WithAvatarGroup from '#site/components/withAvatarGroup'; +import { useClientContext } from '#site/hooks/react-client'; +import useMediaQuery from '#site/hooks/react-client/useMediaQuery'; +import { DEFAULT_DATE_FORMAT } from '#site/next.calendar.constants.mjs'; +import { TRANSLATION_URL } from '#site/next.constants.mjs'; +import { defaultLocale } from '#site/next.locales.mjs'; +import { getGitHubBlobUrl } from '#site/util/gitHubUtils'; const WithMetaBar: FC = () => { const { headings, readingTime, frontmatter, filename } = useClientContext(); diff --git a/apps/site/components/withNavBar.tsx b/apps/site/components/withNavBar.tsx index 5bfa84d7dcf17..882d98bcef78f 100644 --- a/apps/site/components/withNavBar.tsx +++ b/apps/site/components/withNavBar.tsx @@ -13,14 +13,14 @@ import { useLocale, useTranslations } from 'next-intl'; import { useTheme } from 'next-themes'; import type { FC } from 'react'; -import Link from '#components/Link'; -import WithBanner from '#components/withBanner'; -import WithNodejsLogo from '#components/withNodejsLogo'; -import { useSiteNavigation } from '#hooks'; -import { useRouter, usePathname } from '#navigation.mjs'; -import { availableLocales } from '#next.locales.mjs'; +import Link from '#site/components/Link'; +import WithBanner from '#site/components/withBanner'; +import WithNodejsLogo from '#site/components/withNodejsLogo'; +import { useSiteNavigation } from '#site/hooks'; +import { useRouter, usePathname } from '#site/navigation.mjs'; +import { availableLocales } from '#site/next.locales.mjs'; -const SearchButton = dynamic(() => import('#components/Common/Search'), { +const SearchButton = dynamic(() => import('#site/components/Common/Search'), { ssr: false, loading: () => ( diff --git a/apps/site/components/withNodeRelease.tsx b/apps/site/components/withNodeRelease.tsx index 3d4be66d766f0..bb73bfa8290b7 100644 --- a/apps/site/components/withNodeRelease.tsx +++ b/apps/site/components/withNodeRelease.tsx @@ -1,7 +1,7 @@ import type { FC } from 'react'; -import getReleaseData from '#next-data/releaseData'; -import type { NodeRelease, NodeReleaseStatus } from '#types'; +import getReleaseData from '#site/next-data/releaseData'; +import type { NodeRelease, NodeReleaseStatus } from '#site/types'; type WithNodeReleaseProps = { status: Array | NodeReleaseStatus; diff --git a/apps/site/components/withNodejsLogo.tsx b/apps/site/components/withNodejsLogo.tsx index 8aa5f2082a6be..87566aeb78b6b 100644 --- a/apps/site/components/withNodejsLogo.tsx +++ b/apps/site/components/withNodejsLogo.tsx @@ -2,7 +2,7 @@ import NodejsLogo from '@node-core/ui-components/Common/NodejsLogo'; import { useTranslations } from 'next-intl'; import type { FC } from 'react'; -import { siteConfig } from '#next.json.mjs'; +import { siteConfig } from '#site/next.json.mjs'; const WithNodejsLogo: FC = () => { const t = useTranslations(); diff --git a/apps/site/components/withProgressionSidebar.tsx b/apps/site/components/withProgressionSidebar.tsx index c068e4752b9e0..a98d27e801f85 100644 --- a/apps/site/components/withProgressionSidebar.tsx +++ b/apps/site/components/withProgressionSidebar.tsx @@ -6,10 +6,10 @@ import { useLocale, useTranslations } from 'next-intl'; import type { RichTranslationValues } from 'next-intl'; import type { FC } from 'react'; -import Link from '#components/Link'; -import { useSiteNavigation } from '#hooks/server'; -import { useRouter } from '#navigation.mjs'; -import type { NavigationKeys } from '#types'; +import Link from '#site/components/Link'; +import { useSiteNavigation } from '#site/hooks/server'; +import { useRouter } from '#site/navigation.mjs'; +import type { NavigationKeys } from '#site/types'; type WithProgressionSidebarProps = { navKey: NavigationKeys; diff --git a/apps/site/components/withSidebar.tsx b/apps/site/components/withSidebar.tsx index 82ef92df4dce5..5e93888d994c7 100644 --- a/apps/site/components/withSidebar.tsx +++ b/apps/site/components/withSidebar.tsx @@ -6,10 +6,10 @@ import { useLocale, useTranslations } from 'next-intl'; import type { RichTranslationValues } from 'next-intl'; import type { FC } from 'react'; -import Link from '#components/Link'; -import { useSiteNavigation } from '#hooks/server'; -import { useRouter } from '#navigation.mjs'; -import type { NavigationKeys } from '#types'; +import Link from '#site/components/Link'; +import { useSiteNavigation } from '#site/hooks/server'; +import { useRouter } from '#site/navigation.mjs'; +import type { NavigationKeys } from '#site/types'; type WithSidebarProps = { navKeys: Array; diff --git a/apps/site/components/withSidebarCrossLinks.tsx b/apps/site/components/withSidebarCrossLinks.tsx index f8da2879c4a5b..53bac9215efe3 100644 --- a/apps/site/components/withSidebarCrossLinks.tsx +++ b/apps/site/components/withSidebarCrossLinks.tsx @@ -1,8 +1,8 @@ import type { FC } from 'react'; -import CrossLink from '#components/Common/CrossLink'; -import { useClientContext, useSiteNavigation } from '#hooks/server'; -import type { NavigationKeys } from '#types'; +import CrossLink from '#site/components/Common/CrossLink'; +import { useClientContext, useSiteNavigation } from '#site/hooks/server'; +import type { NavigationKeys } from '#site/types'; type WithCrossLinksProps = { navKey: NavigationKeys }; diff --git a/apps/site/hooks/react-client/__tests__/useClientContext.test.jsx b/apps/site/hooks/react-client/__tests__/useClientContext.test.jsx index 2e978bd1f6b77..7d43d41caafa3 100644 --- a/apps/site/hooks/react-client/__tests__/useClientContext.test.jsx +++ b/apps/site/hooks/react-client/__tests__/useClientContext.test.jsx @@ -3,8 +3,8 @@ import { renderHook } from '@testing-library/react'; import { describe, it } from 'node:test'; import assert from 'node:assert/strict'; -import useClientContext from '#hooks/react-client/useClientContext'; -import { MatterContext } from '#providers/matterProvider'; +import useClientContext from '#site/hooks/react-client/useClientContext'; +import { MatterContext } from '#site/providers/matterProvider'; describe('useClientContext', () => { it('should return client context values', () => { diff --git a/apps/site/hooks/react-client/__tests__/useCopyToClipboard.test.jsx b/apps/site/hooks/react-client/__tests__/useCopyToClipboard.test.jsx index 505dd1bd6944a..5bb64c54c7592 100644 --- a/apps/site/hooks/react-client/__tests__/useCopyToClipboard.test.jsx +++ b/apps/site/hooks/react-client/__tests__/useCopyToClipboard.test.jsx @@ -4,7 +4,7 @@ import { setTimeout } from 'node:timers/promises'; import { render, fireEvent, screen } from '@testing-library/react'; -import useCopyToClipboard from '#hooks/react-client/useCopyToClipboard'; +import useCopyToClipboard from '#site/hooks/react-client/useCopyToClipboard'; navigator.clipboard = { writeText: () => {} }; diff --git a/apps/site/hooks/react-client/__tests__/useDetectOS.test.mjs b/apps/site/hooks/react-client/__tests__/useDetectOS.test.mjs index f08cc936062ad..ce9616ae418ad 100644 --- a/apps/site/hooks/react-client/__tests__/useDetectOS.test.mjs +++ b/apps/site/hooks/react-client/__tests__/useDetectOS.test.mjs @@ -3,7 +3,7 @@ import { describe, it, afterEach } from 'node:test'; import { renderHook, waitFor } from '@testing-library/react'; -import useDetectOS from '#hooks/react-client/useDetectOS'; +import useDetectOS from '#site/hooks/react-client/useDetectOS'; const windowsUserAgent = 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36'; diff --git a/apps/site/hooks/react-client/__tests__/useMediaQuery.test.mjs b/apps/site/hooks/react-client/__tests__/useMediaQuery.test.mjs index 7d7dcd195ca85..5bc2c382204f5 100644 --- a/apps/site/hooks/react-client/__tests__/useMediaQuery.test.mjs +++ b/apps/site/hooks/react-client/__tests__/useMediaQuery.test.mjs @@ -3,7 +3,7 @@ import { describe, it } from 'node:test'; import { renderHook } from '@testing-library/react'; -import useMediaQuery from '#hooks/react-client/useMediaQuery'; +import useMediaQuery from '#site/hooks/react-client/useMediaQuery'; const noop = () => {}; diff --git a/apps/site/hooks/react-client/__tests__/useNotification.test.jsx b/apps/site/hooks/react-client/__tests__/useNotification.test.jsx index 8f3caf1d8565f..fcba40ea86091 100644 --- a/apps/site/hooks/react-client/__tests__/useNotification.test.jsx +++ b/apps/site/hooks/react-client/__tests__/useNotification.test.jsx @@ -3,8 +3,8 @@ import { render } from '@testing-library/react'; import { describe, it } from 'node:test'; import assert from 'node:assert/strict'; -import useNotification from '#hooks/react-client/useNotification'; -import { NotificationProvider } from '#providers/notificationProvider'; +import useNotification from '#site/hooks/react-client/useNotification'; +import { NotificationProvider } from '#site/providers/notificationProvider'; describe('useNotification', () => { it('should return the notification dispatch function', () => { diff --git a/apps/site/hooks/react-client/useClientContext.ts b/apps/site/hooks/react-client/useClientContext.ts index 415590aad1dd9..2ecfae88cabc0 100644 --- a/apps/site/hooks/react-client/useClientContext.ts +++ b/apps/site/hooks/react-client/useClientContext.ts @@ -2,8 +2,8 @@ import { useContext } from 'react'; -import { MatterContext } from '#providers/matterProvider'; -import type { ClientSharedServerContext } from '#types'; +import { MatterContext } from '#site/providers/matterProvider'; +import type { ClientSharedServerContext } from '#site/types'; const useClientContext = (): ClientSharedServerContext => { const { diff --git a/apps/site/hooks/react-client/useDetectOS.ts b/apps/site/hooks/react-client/useDetectOS.ts index 0e9ca76f6e908..e751738bd1c61 100644 --- a/apps/site/hooks/react-client/useDetectOS.ts +++ b/apps/site/hooks/react-client/useDetectOS.ts @@ -2,9 +2,9 @@ import { useEffect, useState } from 'react'; -import type { UserArchitecture, UserBitness, UserOS } from '#types/userOS'; -import { detectOS } from '#util/detectOS'; -import { getHighEntropyValues } from '#util/getHighEntropyValues'; +import type { UserArchitecture, UserBitness, UserOS } from '#site/types/userOS'; +import { detectOS } from '#site/util/detectOS'; +import { getHighEntropyValues } from '#site/util/getHighEntropyValues'; type UserOSState = { os: UserOS | 'LOADING'; diff --git a/apps/site/hooks/react-client/useNavigationState.ts b/apps/site/hooks/react-client/useNavigationState.ts index bb5a93eda1197..ab3e420d6e668 100644 --- a/apps/site/hooks/react-client/useNavigationState.ts +++ b/apps/site/hooks/react-client/useNavigationState.ts @@ -3,8 +3,8 @@ import type { RefObject } from 'react'; import { useContext, useEffect } from 'react'; -import { NavigationStateContext } from '#providers/navigationStateProvider'; -import { debounce } from '#util/debounce'; +import { NavigationStateContext } from '#site/providers/navigationStateProvider'; +import { debounce } from '#site/util/debounce'; const useNavigationState = ( id: string, diff --git a/apps/site/hooks/react-client/useNotification.ts b/apps/site/hooks/react-client/useNotification.ts index 524239ffca57b..acac47f606faf 100644 --- a/apps/site/hooks/react-client/useNotification.ts +++ b/apps/site/hooks/react-client/useNotification.ts @@ -2,7 +2,7 @@ import { useContext } from 'react'; -import { NotificationDispatch } from '#providers/notificationProvider'; +import { NotificationDispatch } from '#site/providers/notificationProvider'; const useNotification = () => useContext(NotificationDispatch); diff --git a/apps/site/hooks/react-generic/useSiteNavigation.ts b/apps/site/hooks/react-generic/useSiteNavigation.ts index 9ad6b40abf084..768092b72f31b 100644 --- a/apps/site/hooks/react-generic/useSiteNavigation.ts +++ b/apps/site/hooks/react-generic/useSiteNavigation.ts @@ -2,8 +2,12 @@ import type { RichTranslationValues } from 'next-intl'; import { useTranslations } from 'next-intl'; import type { HTMLAttributeAnchorTarget } from 'react'; -import { siteNavigation } from '#next.json.mjs'; -import type { FormattedMessage, NavigationEntry, NavigationKeys } from '#types'; +import { siteNavigation } from '#site/next.json.mjs'; +import type { + FormattedMessage, + NavigationEntry, + NavigationKeys, +} from '#site/types'; type Context = Record; type Navigation = Record; diff --git a/apps/site/hooks/react-server/useClientContext.ts b/apps/site/hooks/react-server/useClientContext.ts index 0c60368c2150a..981ceb5070773 100644 --- a/apps/site/hooks/react-server/useClientContext.ts +++ b/apps/site/hooks/react-server/useClientContext.ts @@ -1,4 +1,4 @@ -import { getClientContext } from '#client-context'; +import { getClientContext } from '#site/client-context'; const useClientContext = () => getClientContext(); diff --git a/apps/site/i18n.tsx b/apps/site/i18n.tsx index cb247e3a0a762..3d899b06f6755 100644 --- a/apps/site/i18n.tsx +++ b/apps/site/i18n.tsx @@ -2,7 +2,7 @@ import { importLocale } from '@node-core/website-i18n'; import defaultMessages from '@node-core/website-i18n/locales/en.json'; import { getRequestConfig } from 'next-intl/server'; -import { availableLocaleCodes, defaultLocale } from '#next.locales.mjs'; +import { availableLocaleCodes, defaultLocale } from '#site/next.locales.mjs'; import deepMerge from './util/deepMerge'; diff --git a/apps/site/layouts/About.tsx b/apps/site/layouts/About.tsx index 6a48bc8f77a10..f37d797c8a852 100644 --- a/apps/site/layouts/About.tsx +++ b/apps/site/layouts/About.tsx @@ -1,12 +1,12 @@ import type { FC, PropsWithChildren } from 'react'; -import WithBreadcrumbs from '#components/withBreadcrumbs'; -import WithFooter from '#components/withFooter'; -import WithMetaBar from '#components/withMetaBar'; -import WithNavBar from '#components/withNavBar'; -import WithSidebar from '#components/withSidebar'; -import ArticleLayout from '#layouts/Article'; -import { ReleaseModalProvider } from '#providers/releaseModalProvider'; +import WithBreadcrumbs from '#site/components/withBreadcrumbs'; +import WithFooter from '#site/components/withFooter'; +import WithMetaBar from '#site/components/withMetaBar'; +import WithNavBar from '#site/components/withNavBar'; +import WithSidebar from '#site/components/withSidebar'; +import ArticleLayout from '#site/layouts/Article'; +import { ReleaseModalProvider } from '#site/providers/releaseModalProvider'; const AboutLayout: FC = ({ children }) => ( diff --git a/apps/site/layouts/ArticlePage.tsx b/apps/site/layouts/ArticlePage.tsx index 2ed3b63be615a..02c2cbb412c46 100644 --- a/apps/site/layouts/ArticlePage.tsx +++ b/apps/site/layouts/ArticlePage.tsx @@ -1,9 +1,9 @@ import type { FC, PropsWithChildren } from 'react'; -import WithMetaBar from '#components/withMetaBar'; -import WithNavBar from '#components/withNavBar'; -import WithSidebar from '#components/withSidebar'; -import ArticleLayout from '#layouts/Article'; +import WithMetaBar from '#site/components/withMetaBar'; +import WithNavBar from '#site/components/withNavBar'; +import WithSidebar from '#site/components/withSidebar'; +import ArticleLayout from '#site/layouts/Article'; const ArticlePageLayout: FC = ({ children }) => ( <> diff --git a/apps/site/layouts/Base.tsx b/apps/site/layouts/Base.tsx index 38c03e263cb94..83ff12826ed06 100644 --- a/apps/site/layouts/Base.tsx +++ b/apps/site/layouts/Base.tsx @@ -2,8 +2,8 @@ import type { FC, PropsWithChildren } from 'react'; -import { NavigationStateProvider } from '#providers/navigationStateProvider'; -import { NotificationProvider } from '#providers/notificationProvider'; +import { NavigationStateProvider } from '#site/providers/navigationStateProvider'; +import { NotificationProvider } from '#site/providers/notificationProvider'; import styles from './layouts.module.css'; diff --git a/apps/site/layouts/Blog.tsx b/apps/site/layouts/Blog.tsx index 6952c32b55e23..4d174cca68c98 100644 --- a/apps/site/layouts/Blog.tsx +++ b/apps/site/layouts/Blog.tsx @@ -1,13 +1,13 @@ import { getTranslations } from 'next-intl/server'; import type { FC } from 'react'; -import { getClientContext } from '#client-context'; -import BlogHeader from '#components/Blog/BlogHeader'; -import WithBlogCategories from '#components/withBlogCategories'; -import WithFooter from '#components/withFooter'; -import WithNavBar from '#components/withNavBar'; -import getBlogData from '#next-data/blogData'; -import type { BlogCategory } from '#types'; +import { getClientContext } from '#site/client-context'; +import BlogHeader from '#site/components/Blog/BlogHeader'; +import WithBlogCategories from '#site/components/withBlogCategories'; +import WithFooter from '#site/components/withFooter'; +import WithNavBar from '#site/components/withNavBar'; +import getBlogData from '#site/next-data/blogData'; +import type { BlogCategory } from '#site/types'; import styles from './layouts.module.css'; diff --git a/apps/site/layouts/Default.tsx b/apps/site/layouts/Default.tsx index f9f5ae7954239..dc459c28fa7c4 100644 --- a/apps/site/layouts/Default.tsx +++ b/apps/site/layouts/Default.tsx @@ -1,9 +1,9 @@ import type { FC, PropsWithChildren } from 'react'; -import WithFooter from '#components/withFooter'; -import WithNavBar from '#components/withNavBar'; -import WithSidebar from '#components/withSidebar'; -import ArticleLayout from '#layouts/Article'; +import WithFooter from '#site/components/withFooter'; +import WithNavBar from '#site/components/withNavBar'; +import WithSidebar from '#site/components/withSidebar'; +import ArticleLayout from '#site/layouts/Article'; const DefaultLayout: FC = ({ children }) => ( <> diff --git a/apps/site/layouts/Download.tsx b/apps/site/layouts/Download.tsx index b25d66524825d..eb0cfdcacdf94 100644 --- a/apps/site/layouts/Download.tsx +++ b/apps/site/layouts/Download.tsx @@ -1,9 +1,9 @@ import type { FC, PropsWithChildren } from 'react'; -import { getClientContext } from '#client-context'; -import WithDownloadSection from '#components/withDownloadSection'; -import WithFooter from '#components/withFooter'; -import WithNavBar from '#components/withNavBar'; +import { getClientContext } from '#site/client-context'; +import WithDownloadSection from '#site/components/withDownloadSection'; +import WithFooter from '#site/components/withFooter'; +import WithNavBar from '#site/components/withNavBar'; import styles from './layouts.module.css'; diff --git a/apps/site/layouts/GlowingBackdrop.tsx b/apps/site/layouts/GlowingBackdrop.tsx index 8724f0d2bfdc9..30487e8fd001a 100644 --- a/apps/site/layouts/GlowingBackdrop.tsx +++ b/apps/site/layouts/GlowingBackdrop.tsx @@ -2,8 +2,8 @@ import GlowingBackdrop from '@node-core/ui-components/Common/GlowingBackdrop'; import classNames from 'classnames'; import type { FC, PropsWithChildren } from 'react'; -import WithFooter from '#components/withFooter'; -import WithNavBar from '#components/withNavBar'; +import WithFooter from '#site/components/withFooter'; +import WithNavBar from '#site/components/withNavBar'; import styles from './layouts.module.css'; diff --git a/apps/site/layouts/Learn.tsx b/apps/site/layouts/Learn.tsx index c20621ebecd26..e795495ac64a1 100644 --- a/apps/site/layouts/Learn.tsx +++ b/apps/site/layouts/Learn.tsx @@ -1,12 +1,12 @@ import type { FC, PropsWithChildren } from 'react'; -import WithBreadcrumbs from '#components/withBreadcrumbs'; -import WithFooter from '#components/withFooter'; -import WithMetaBar from '#components/withMetaBar'; -import WithNavBar from '#components/withNavBar'; -import WithProgressionSidebar from '#components/withProgressionSidebar'; -import WithSidebarCrossLinks from '#components/withSidebarCrossLinks'; -import ArticleLayout from '#layouts/Article'; +import WithBreadcrumbs from '#site/components/withBreadcrumbs'; +import WithFooter from '#site/components/withFooter'; +import WithMetaBar from '#site/components/withMetaBar'; +import WithNavBar from '#site/components/withNavBar'; +import WithProgressionSidebar from '#site/components/withProgressionSidebar'; +import WithSidebarCrossLinks from '#site/components/withSidebarCrossLinks'; +import ArticleLayout from '#site/layouts/Article'; const LearnLayout: FC = ({ children }) => ( <> diff --git a/apps/site/layouts/Post.tsx b/apps/site/layouts/Post.tsx index 5645dd28aeacd..a614fc27a36bd 100644 --- a/apps/site/layouts/Post.tsx +++ b/apps/site/layouts/Post.tsx @@ -1,14 +1,14 @@ import Preview from '@node-core/ui-components/Common/Preview'; import type { FC, PropsWithChildren } from 'react'; -import WithAvatarGroup from '#components/withAvatarGroup'; -import WithBlogCrossLinks from '#components/withBlogCrossLinks'; -import WithFooter from '#components/withFooter'; -import WithMetaBar from '#components/withMetaBar'; -import WithNavBar from '#components/withNavBar'; -import { useClientContext } from '#hooks/react-server'; -import { mapAuthorToCardAuthors } from '#util/authorUtils'; -import { mapBlogCategoryToPreviewType } from '#util/blogUtils'; +import WithAvatarGroup from '#site/components/withAvatarGroup'; +import WithBlogCrossLinks from '#site/components/withBlogCrossLinks'; +import WithFooter from '#site/components/withFooter'; +import WithMetaBar from '#site/components/withMetaBar'; +import WithNavBar from '#site/components/withNavBar'; +import { useClientContext } from '#site/hooks/react-server'; +import { mapAuthorToCardAuthors } from '#site/util/authorUtils'; +import { mapBlogCategoryToPreviewType } from '#site/util/blogUtils'; import styles from './layouts.module.css'; diff --git a/apps/site/middleware.ts b/apps/site/middleware.ts index bc8b9fdeecadf..58c3ded5d1d70 100644 --- a/apps/site/middleware.ts +++ b/apps/site/middleware.ts @@ -1,6 +1,6 @@ import createMiddleware from 'next-intl/middleware'; -import { availableLocaleCodes, defaultLocale } from '#next.locales.mjs'; +import { availableLocaleCodes, defaultLocale } from '#site/next.locales.mjs'; export default createMiddleware({ // A list of all locales that are supported diff --git a/apps/site/next-data/blogData.ts b/apps/site/next-data/blogData.ts index 391790640b1bd..9536f5bf57ba9 100644 --- a/apps/site/next-data/blogData.ts +++ b/apps/site/next-data/blogData.ts @@ -2,8 +2,8 @@ import { ENABLE_STATIC_EXPORT, NEXT_DATA_URL, IS_NOT_VERCEL_RUNTIME_ENV, -} from '#next.constants.mjs'; -import type { BlogCategory, BlogPostsRSC } from '#types'; +} from '#site/next.constants.mjs'; +import type { BlogCategory, BlogPostsRSC } from '#site/types'; const getBlogData = ( cat: BlogCategory, @@ -14,7 +14,7 @@ const getBlogData = ( // the data directly within the current thread, which will anyways be loaded only once // We use lazy-imports to prevent `provideBlogData` from executing on import if (ENABLE_STATIC_EXPORT || IS_NOT_VERCEL_RUNTIME_ENV) { - return import('#next-data/providers/blogData').then( + return import('#site/next-data/providers/blogData').then( ({ provideBlogPosts, providePaginatedBlogPosts }) => page ? providePaginatedBlogPosts(cat, page) : provideBlogPosts(cat) ); diff --git a/apps/site/next-data/downloadSnippets.ts b/apps/site/next-data/downloadSnippets.ts index 6c20f8b45abcd..ba2d596eaf062 100644 --- a/apps/site/next-data/downloadSnippets.ts +++ b/apps/site/next-data/downloadSnippets.ts @@ -2,9 +2,9 @@ import { ENABLE_STATIC_EXPORT, NEXT_DATA_URL, IS_NOT_VERCEL_RUNTIME_ENV, -} from '#next.constants.mjs'; -import { availableLocaleCodes } from '#next.locales.mjs'; -import type { DownloadSnippet } from '#types'; +} from '#site/next.constants.mjs'; +import { availableLocaleCodes } from '#site/next.locales.mjs'; +import type { DownloadSnippet } from '#site/types'; export default async function getDownloadSnippets( lang: string @@ -21,7 +21,7 @@ export default async function getDownloadSnippets( // We use lazy-imports to prevent `provideBlogData` from executing on import if (ENABLE_STATIC_EXPORT || IS_NOT_VERCEL_RUNTIME_ENV) { const { default: provideDownloadSnippets } = await import( - '#next-data/providers/downloadSnippets' + '#site/next-data/providers/downloadSnippets' ); return provideDownloadSnippets(lang)!; } diff --git a/apps/site/next-data/generators/__tests__/releaseData.test.mjs b/apps/site/next-data/generators/__tests__/releaseData.test.mjs index 314411ff295fd..43de9287c87b1 100644 --- a/apps/site/next-data/generators/__tests__/releaseData.test.mjs +++ b/apps/site/next-data/generators/__tests__/releaseData.test.mjs @@ -32,7 +32,7 @@ describe('generateReleaseData', () => { }); const { default: generateReleaseData } = await import( - '#next-data/generators/releaseData.mjs' + '#site/next-data/generators/releaseData.mjs' ); const result = await generateReleaseData(); diff --git a/apps/site/next-data/generators/__tests__/websiteFeeds.test.mjs b/apps/site/next-data/generators/__tests__/websiteFeeds.test.mjs index 739cd048a8f78..3235698f649a2 100644 --- a/apps/site/next-data/generators/__tests__/websiteFeeds.test.mjs +++ b/apps/site/next-data/generators/__tests__/websiteFeeds.test.mjs @@ -1,7 +1,7 @@ import assert from 'node:assert/strict'; import { describe, it } from 'node:test'; -import generateWebsiteFeeds from '#next-data/generators/websiteFeeds.mjs'; +import generateWebsiteFeeds from '#site/next-data/generators/websiteFeeds.mjs'; import { BASE_URL, BASE_PATH } from '../../../next.constants.mjs'; import { siteConfig } from '../../../next.json.mjs'; diff --git a/apps/site/next-data/providers/blogData.ts b/apps/site/next-data/providers/blogData.ts index 7d2bb0d3e34ff..de7d42c8f57a5 100644 --- a/apps/site/next-data/providers/blogData.ts +++ b/apps/site/next-data/providers/blogData.ts @@ -1,8 +1,8 @@ import { cache } from 'react'; -import generateBlogData from '#next-data/generators/blogData.mjs'; -import { BLOG_POSTS_PER_PAGE } from '#next.constants.mjs'; -import type { BlogCategory, BlogPostsRSC } from '#types'; +import generateBlogData from '#site/next-data/generators/blogData.mjs'; +import { BLOG_POSTS_PER_PAGE } from '#site/next.constants.mjs'; +import type { BlogCategory, BlogPostsRSC } from '#site/types'; const { categories, posts } = await generateBlogData(); diff --git a/apps/site/next-data/providers/downloadSnippets.ts b/apps/site/next-data/providers/downloadSnippets.ts index 51c376b273b70..a7aa7ff7b3d9f 100644 --- a/apps/site/next-data/providers/downloadSnippets.ts +++ b/apps/site/next-data/providers/downloadSnippets.ts @@ -1,6 +1,6 @@ import { cache } from 'react'; -import generateDownloadSnippets from '#next-data/generators/downloadSnippets.mjs'; +import generateDownloadSnippets from '#site/next-data/generators/downloadSnippets.mjs'; const downloadSnippets = await generateDownloadSnippets(); diff --git a/apps/site/next-data/providers/releaseData.ts b/apps/site/next-data/providers/releaseData.ts index 73f4e0a8bad9e..04f37ac05eeda 100644 --- a/apps/site/next-data/providers/releaseData.ts +++ b/apps/site/next-data/providers/releaseData.ts @@ -1,6 +1,6 @@ import { cache } from 'react'; -import generateReleaseData from '#next-data/generators/releaseData.mjs'; +import generateReleaseData from '#site/next-data/generators/releaseData.mjs'; const releaseData = await generateReleaseData(); diff --git a/apps/site/next-data/providers/websiteFeeds.ts b/apps/site/next-data/providers/websiteFeeds.ts index 5ef4dec4acce6..ca3b911d78cbe 100644 --- a/apps/site/next-data/providers/websiteFeeds.ts +++ b/apps/site/next-data/providers/websiteFeeds.ts @@ -1,7 +1,7 @@ import { cache } from 'react'; -import generateWebsiteFeeds from '#next-data/generators/websiteFeeds.mjs'; -import { provideBlogPosts } from '#next-data/providers/blogData'; +import generateWebsiteFeeds from '#site/next-data/generators/websiteFeeds.mjs'; +import { provideBlogPosts } from '#site/next-data/providers/blogData'; const websiteFeeds = generateWebsiteFeeds(provideBlogPosts('all')); diff --git a/apps/site/next-data/releaseData.ts b/apps/site/next-data/releaseData.ts index 288cfab99541a..382a99cd08682 100644 --- a/apps/site/next-data/releaseData.ts +++ b/apps/site/next-data/releaseData.ts @@ -2,8 +2,8 @@ import { ENABLE_STATIC_EXPORT, NEXT_DATA_URL, IS_NOT_VERCEL_RUNTIME_ENV, -} from '#next.constants.mjs'; -import type { NodeRelease } from '#types'; +} from '#site/next.constants.mjs'; +import type { NodeRelease } from '#site/types'; const getReleaseData = (): Promise> => { // When we're using Static Exports the Next.js Server is not running (during build-time) @@ -11,7 +11,7 @@ const getReleaseData = (): Promise> => { // the data directly within the current thread, which will anyways be loaded only once // We use lazy-imports to prevent `provideBlogData` from executing on import if (ENABLE_STATIC_EXPORT || IS_NOT_VERCEL_RUNTIME_ENV) { - return import('#next-data/providers/releaseData').then( + return import('#site/next-data/providers/releaseData').then( ({ default: provideReleaseData }) => provideReleaseData() ); } diff --git a/apps/site/package.json b/apps/site/package.json index 982205091eafb..f6ed05652d063 100644 --- a/apps/site/package.json +++ b/apps/site/package.json @@ -110,7 +110,7 @@ "user-agent-data-types": "0.4.2" }, "imports": { - "#*": [ + "#site/*": [ "./*", "./*.tsx", "./*/index.tsx", diff --git a/apps/site/providers/__tests__/matterProvider.test.jsx b/apps/site/providers/__tests__/matterProvider.test.jsx index 91b12a44b7e10..c1e5cb3631074 100644 --- a/apps/site/providers/__tests__/matterProvider.test.jsx +++ b/apps/site/providers/__tests__/matterProvider.test.jsx @@ -3,7 +3,7 @@ import assert from 'node:assert/strict'; import { act, render } from '@testing-library/react'; -import { MatterProvider, MatterContext } from '#providers/matterProvider'; +import { MatterProvider, MatterContext } from '#site/providers/matterProvider'; const mockContext = { frontmatter: {}, diff --git a/apps/site/providers/__tests__/navigationStateProvider.test.jsx b/apps/site/providers/__tests__/navigationStateProvider.test.jsx index c9aa5a35cec6a..04b9ac8c19156 100644 --- a/apps/site/providers/__tests__/navigationStateProvider.test.jsx +++ b/apps/site/providers/__tests__/navigationStateProvider.test.jsx @@ -3,7 +3,7 @@ import assert from 'node:assert/strict'; import { render } from '@testing-library/react'; -import { NavigationStateProvider } from '#providers/navigationStateProvider'; +import { NavigationStateProvider } from '#site/providers/navigationStateProvider'; describe('NavigationStateProvider', () => { it('should render without crashing', () => { diff --git a/apps/site/providers/__tests__/notificationProvider.test.jsx b/apps/site/providers/__tests__/notificationProvider.test.jsx index 739d069f2a355..9a95573ef7511 100644 --- a/apps/site/providers/__tests__/notificationProvider.test.jsx +++ b/apps/site/providers/__tests__/notificationProvider.test.jsx @@ -7,7 +7,7 @@ import userEvent from '@testing-library/user-event'; import { NotificationProvider, NotificationDispatch, -} from '#providers/notificationProvider'; +} from '#site/providers/notificationProvider'; describe('NotificationProvider', () => { it('renders children and shows notification with the provided message', async t => { diff --git a/apps/site/providers/__tests__/releaseProvider.test.jsx b/apps/site/providers/__tests__/releaseProvider.test.jsx index a1d8ee7c10698..05e8aadff9e9a 100644 --- a/apps/site/providers/__tests__/releaseProvider.test.jsx +++ b/apps/site/providers/__tests__/releaseProvider.test.jsx @@ -3,7 +3,10 @@ import assert from 'node:assert/strict'; import { render } from '@testing-library/react'; -import { ReleaseProvider, ReleasesProvider } from '#providers/releaseProvider'; +import { + ReleaseProvider, + ReleasesProvider, +} from '#site/providers/releaseProvider'; describe('ReleaseProvider', () => { it('should render without crashing', () => { diff --git a/apps/site/providers/__tests__/themeProvider.test.jsx b/apps/site/providers/__tests__/themeProvider.test.jsx index 90e07df69afbc..e3103521b91a0 100644 --- a/apps/site/providers/__tests__/themeProvider.test.jsx +++ b/apps/site/providers/__tests__/themeProvider.test.jsx @@ -16,7 +16,7 @@ describe('ThemeProvider', () => { }, }); - const { ThemeProvider } = await import('#providers/themeProvider'); + const { ThemeProvider } = await import('#site/providers/themeProvider'); const { container } = render( diff --git a/apps/site/providers/matterProvider.tsx b/apps/site/providers/matterProvider.tsx index c6a496ebaa3b0..1e683d3e9d974 100644 --- a/apps/site/providers/matterProvider.tsx +++ b/apps/site/providers/matterProvider.tsx @@ -3,9 +3,9 @@ import { createContext } from 'react'; import type { FC, PropsWithChildren } from 'react'; -import { useDetectOS } from '#hooks'; -import type { ClientSharedServerContext } from '#types'; -import { assignClientContext } from '#util/assignClientContext'; +import { useDetectOS } from '#site/hooks'; +import type { ClientSharedServerContext } from '#site/types'; +import { assignClientContext } from '#site/util/assignClientContext'; export const MatterContext = createContext( assignClientContext({}) diff --git a/apps/site/providers/releaseModalProvider.tsx b/apps/site/providers/releaseModalProvider.tsx index 5c1e21171677d..8f94aba9fe5ff 100644 --- a/apps/site/providers/releaseModalProvider.tsx +++ b/apps/site/providers/releaseModalProvider.tsx @@ -3,8 +3,8 @@ import { createContext, useState } from 'react'; import type { FC, PropsWithChildren } from 'react'; -import ReleaseModal from '#components/Downloads/ReleaseModal'; -import type { NodeRelease } from '#types'; +import ReleaseModal from '#site/components/Downloads/ReleaseModal'; +import type { NodeRelease } from '#site/types'; type ReleaseModalContextType = { activeRelease: NodeRelease | null; diff --git a/apps/site/providers/releaseProvider.tsx b/apps/site/providers/releaseProvider.tsx index 98518113d818f..61ee7a5ee17c0 100644 --- a/apps/site/providers/releaseProvider.tsx +++ b/apps/site/providers/releaseProvider.tsx @@ -9,9 +9,12 @@ import { useReducer, } from 'react'; -import reducer, { getActions, releaseState } from '#reducers/releaseReducer'; -import type { NodeRelease } from '#types'; -import type * as Types from '#types/release'; +import reducer, { + getActions, + releaseState, +} from '#site/reducers/releaseReducer'; +import type { NodeRelease } from '#site/types'; +import type * as Types from '#site/types/release'; export const ReleasesContext = createContext({ releases: [], diff --git a/apps/site/providers/themeProvider.tsx b/apps/site/providers/themeProvider.tsx index 57f51b2342cb3..252d7efd68ec4 100644 --- a/apps/site/providers/themeProvider.tsx +++ b/apps/site/providers/themeProvider.tsx @@ -3,7 +3,7 @@ import { ThemeProvider as NextThemeProvider } from 'next-themes'; import type { FC, PropsWithChildren } from 'react'; -import { THEME_STORAGE_KEY } from '#next.constants.mjs'; +import { THEME_STORAGE_KEY } from '#site/next.constants.mjs'; export const ThemeProvider: FC = ({ children }) => ( { it('should return the initial state', () => { diff --git a/apps/site/reducers/releaseReducer.ts b/apps/site/reducers/releaseReducer.ts index b64f432d25243..3ad09f64e089c 100644 --- a/apps/site/reducers/releaseReducer.ts +++ b/apps/site/reducers/releaseReducer.ts @@ -1,6 +1,6 @@ import type { Dispatch } from 'react'; -import type * as Types from '#types/release'; +import type * as Types from '#site/types/release'; export const releaseState: Types.ReleaseState = { // The selected Node.js version to be downloaded diff --git a/apps/site/types/release.ts b/apps/site/types/release.ts index 2dbf313efe737..28f945f6cbd3a 100644 --- a/apps/site/types/release.ts +++ b/apps/site/types/release.ts @@ -1,6 +1,6 @@ -import type { DownloadSnippet } from '#types/downloads'; -import type { NodeRelease } from '#types/releases'; -import type { UserOS, UserPlatform } from '#types/userOS'; +import type { DownloadSnippet } from '#site/types/downloads'; +import type { NodeRelease } from '#site/types/releases'; +import type { UserOS, UserPlatform } from '#site/types/userOS'; export type InstallationMethod = | 'NVM' diff --git a/apps/site/types/server.ts b/apps/site/types/server.ts index 55d2f03203738..35736d36a16d8 100644 --- a/apps/site/types/server.ts +++ b/apps/site/types/server.ts @@ -1,8 +1,8 @@ import type { Heading } from '@vcarl/remark-headings'; import type { ReadTimeResults } from 'reading-time'; -import type { useDetectOS } from '#hooks'; -import type { LegacyFrontMatter } from '#types/frontmatter'; +import type { useDetectOS } from '#site/hooks'; +import type { LegacyFrontMatter } from '#site/types/frontmatter'; export interface ClientSharedServerContext extends ReturnType { diff --git a/apps/site/util/__tests__/assignClientContext.test.mjs b/apps/site/util/__tests__/assignClientContext.test.mjs index 7429e1cc140ad..5768d13cb8c3b 100644 --- a/apps/site/util/__tests__/assignClientContext.test.mjs +++ b/apps/site/util/__tests__/assignClientContext.test.mjs @@ -1,7 +1,7 @@ import assert from 'node:assert/strict'; import { describe, it } from 'node:test'; -import { assignClientContext } from '#util/assignClientContext'; +import { assignClientContext } from '#site/util/assignClientContext'; const mockContext = { frontmatter: { title: 'Sample Title' }, diff --git a/apps/site/util/__tests__/authorUtils.test.mjs b/apps/site/util/__tests__/authorUtils.test.mjs index ca88938820b1a..6a26617258a4d 100644 --- a/apps/site/util/__tests__/authorUtils.test.mjs +++ b/apps/site/util/__tests__/authorUtils.test.mjs @@ -6,7 +6,7 @@ import { getAuthorWithId, getAuthorWithName, getAuthors, -} from '#util/authorUtils'; +} from '#site/util/authorUtils'; describe('mapAuthorToCardAuthors', () => { it('maps authors to card authors with default avatar source', () => { diff --git a/apps/site/util/__tests__/blogUtils.test.mjs b/apps/site/util/__tests__/blogUtils.test.mjs index d9fffa3d8daf7..7142de43505fd 100644 --- a/apps/site/util/__tests__/blogUtils.test.mjs +++ b/apps/site/util/__tests__/blogUtils.test.mjs @@ -1,7 +1,7 @@ import assert from 'node:assert/strict'; import { describe, it } from 'node:test'; -import { mapBlogCategoryToPreviewType } from '#util/blogUtils'; +import { mapBlogCategoryToPreviewType } from '#site/util/blogUtils'; describe('mapBlogCategoryToPreviewType', () => { it('returns the correct preview type for recognized categories', () => { diff --git a/apps/site/util/__tests__/dateUtils.test.mjs b/apps/site/util/__tests__/dateUtils.test.mjs index b2e238d0cd355..f9dfe49d738da 100644 --- a/apps/site/util/__tests__/dateUtils.test.mjs +++ b/apps/site/util/__tests__/dateUtils.test.mjs @@ -1,7 +1,7 @@ import assert from 'node:assert/strict'; import { describe, it } from 'node:test'; -import { dateIsBetween } from '#util/dateUtils'; +import { dateIsBetween } from '#site/util/dateUtils'; describe('dateIsBetween', () => { it('should return true when the current date is between start and end dates', () => { diff --git a/apps/site/util/__tests__/debounce.test.mjs b/apps/site/util/__tests__/debounce.test.mjs index ec0100787d77f..0632a3c153f2b 100644 --- a/apps/site/util/__tests__/debounce.test.mjs +++ b/apps/site/util/__tests__/debounce.test.mjs @@ -1,7 +1,7 @@ import assert from 'node:assert/strict'; import { describe, it, beforeEach } from 'node:test'; -import { debounce } from '#util/debounce'; +import { debounce } from '#site/util/debounce'; describe('debounce', () => { beforeEach(t => { diff --git a/apps/site/util/__tests__/deepMerge.test.mjs b/apps/site/util/__tests__/deepMerge.test.mjs index 0e281f1831ec6..c41a2d421e979 100644 --- a/apps/site/util/__tests__/deepMerge.test.mjs +++ b/apps/site/util/__tests__/deepMerge.test.mjs @@ -1,7 +1,7 @@ import assert from 'node:assert/strict'; import { describe, it } from 'node:test'; -import deepMerge from '#util/deepMerge'; +import deepMerge from '#site/util/deepMerge'; describe('deepMerge', () => { it('should merge nested objects', () => { diff --git a/apps/site/util/__tests__/detectOS.test.mjs b/apps/site/util/__tests__/detectOS.test.mjs index ad037768d8e99..c056140aa714a 100644 --- a/apps/site/util/__tests__/detectOS.test.mjs +++ b/apps/site/util/__tests__/detectOS.test.mjs @@ -1,7 +1,7 @@ import assert from 'node:assert/strict'; import { describe, it } from 'node:test'; -import { detectOsInUserAgent, detectOS } from '#util/detectOS'; +import { detectOsInUserAgent, detectOS } from '#site/util/detectOS'; const userAgentTestCases = [ [ diff --git a/apps/site/util/__tests__/downloadUtils.test.mjs b/apps/site/util/__tests__/downloadUtils.test.mjs index f63d9a30607db..1f1e9a8bbb502 100644 --- a/apps/site/util/__tests__/downloadUtils.test.mjs +++ b/apps/site/util/__tests__/downloadUtils.test.mjs @@ -8,7 +8,7 @@ import { INSTALL_METHODS, PACKAGE_MANAGERS, PLATFORMS, -} from '#util/downloadUtils'; +} from '#site/util/downloadUtils'; describe('parseCompat', () => { it('should handle all OS, install methods, and package managers', () => { diff --git a/apps/site/util/__tests__/getHighEntropyValues.test.mjs b/apps/site/util/__tests__/getHighEntropyValues.test.mjs index d2999e889c031..6d789d3092a31 100644 --- a/apps/site/util/__tests__/getHighEntropyValues.test.mjs +++ b/apps/site/util/__tests__/getHighEntropyValues.test.mjs @@ -1,7 +1,7 @@ import assert from 'node:assert/strict'; import { describe, it, beforeEach } from 'node:test'; -import { getHighEntropyValues } from '#util/getHighEntropyValues'; +import { getHighEntropyValues } from '#site/util/getHighEntropyValues'; const mock = () => Promise.resolve({ platform: 'Win32', architecture: 'x86' }); diff --git a/apps/site/util/__tests__/getLanguageDisplayName.test.mjs b/apps/site/util/__tests__/getLanguageDisplayName.test.mjs index 2b482db58345b..e70c4ecf5bc27 100644 --- a/apps/site/util/__tests__/getLanguageDisplayName.test.mjs +++ b/apps/site/util/__tests__/getLanguageDisplayName.test.mjs @@ -2,7 +2,7 @@ import assert from 'node:assert/strict'; import { it, describe, mock } from 'node:test'; describe('getLanguageDisplayName', async () => { - mock.module('#shiki.config.mjs', { + mock.module('#site/shiki.config.mjs', { namedExports: { LANGUAGES: [ { name: 'javascript', aliases: ['js'], displayName: 'JavaScript' }, @@ -12,7 +12,7 @@ describe('getLanguageDisplayName', async () => { }); const { getLanguageDisplayName } = await import( - '#util/getLanguageDisplayName' + '#site/util/getLanguageDisplayName' ); it('should return the display name for a known language', () => { diff --git a/apps/site/util/__tests__/getNodeApiLink.test.mjs b/apps/site/util/__tests__/getNodeApiLink.test.mjs index c301453308a9f..1987405e325c3 100644 --- a/apps/site/util/__tests__/getNodeApiLink.test.mjs +++ b/apps/site/util/__tests__/getNodeApiLink.test.mjs @@ -1,7 +1,7 @@ import assert from 'node:assert/strict'; import { describe, it } from 'node:test'; -import { getNodeApiLink } from '#util/getNodeApiLink'; +import { getNodeApiLink } from '#site/util/getNodeApiLink'; describe('getNodeApiLink', () => { it('should return the correct API link for versions >=0.3.1 and <0.5.1', () => { diff --git a/apps/site/util/__tests__/getNodeDownloadUrl.test.mjs b/apps/site/util/__tests__/getNodeDownloadUrl.test.mjs index 96b24c1fe0877..8ec40abda7fb2 100644 --- a/apps/site/util/__tests__/getNodeDownloadUrl.test.mjs +++ b/apps/site/util/__tests__/getNodeDownloadUrl.test.mjs @@ -1,7 +1,7 @@ import assert from 'node:assert/strict'; import { describe, it } from 'node:test'; -import { getNodeDownloadUrl } from '#util/getNodeDownloadUrl'; +import { getNodeDownloadUrl } from '#site/util/getNodeDownloadUrl'; const version = 'v18.16.0'; diff --git a/apps/site/util/__tests__/getUserPlatform.test.mjs b/apps/site/util/__tests__/getUserPlatform.test.mjs index 814ac4de9a9dd..15a0ac90958d1 100644 --- a/apps/site/util/__tests__/getUserPlatform.test.mjs +++ b/apps/site/util/__tests__/getUserPlatform.test.mjs @@ -1,7 +1,7 @@ import assert from 'node:assert/strict'; import { describe, it } from 'node:test'; -import { getUserPlatform } from '#util/getUserPlatform'; +import { getUserPlatform } from '#site/util/getUserPlatform'; describe('getUserPlatform', () => { it('should return arm64 for arm + 64', () => { diff --git a/apps/site/util/__tests__/gitHubUtils.test.mjs b/apps/site/util/__tests__/gitHubUtils.test.mjs index a48792f2fa3d3..5afc3e64b8c6a 100644 --- a/apps/site/util/__tests__/gitHubUtils.test.mjs +++ b/apps/site/util/__tests__/gitHubUtils.test.mjs @@ -10,7 +10,7 @@ const { createGitHubSlugger, getGitHubBlobUrl, getGitHubApiDocsUrl, -} = await import('#util/gitHubUtils'); +} = await import('#site/util/gitHubUtils'); describe('gitHubUtils', () => { it('getGitHubAvatarUrl returns the correct URL', () => { diff --git a/apps/site/util/__tests__/hexToRGBA.test.mjs b/apps/site/util/__tests__/hexToRGBA.test.mjs index d15fd7d477c14..94bdd29fa4f83 100644 --- a/apps/site/util/__tests__/hexToRGBA.test.mjs +++ b/apps/site/util/__tests__/hexToRGBA.test.mjs @@ -1,7 +1,7 @@ import assert from 'node:assert/strict'; import { describe, it } from 'node:test'; -import { hexToRGBA } from '#util/hexToRGBA'; +import { hexToRGBA } from '#site/util/hexToRGBA'; describe('hexToRGBA', () => { it('should convert a hex color to an rgba color', () => { diff --git a/apps/site/util/__tests__/imageUtils.test.mjs b/apps/site/util/__tests__/imageUtils.test.mjs index f8f3d6af901c6..76174a7b4e23e 100644 --- a/apps/site/util/__tests__/imageUtils.test.mjs +++ b/apps/site/util/__tests__/imageUtils.test.mjs @@ -1,7 +1,7 @@ import assert from 'node:assert/strict'; import { describe, it } from 'node:test'; -import { isSvgImage } from '#util/imageUtils'; +import { isSvgImage } from '#site/util/imageUtils'; describe('isSvgImage', () => { const testCases = [ { diff --git a/apps/site/util/__tests__/stringUtils.test.mjs b/apps/site/util/__tests__/stringUtils.test.mjs index 671e7f554f48b..23429d185a32a 100644 --- a/apps/site/util/__tests__/stringUtils.test.mjs +++ b/apps/site/util/__tests__/stringUtils.test.mjs @@ -5,7 +5,7 @@ import { getAcronymFromString, parseRichTextIntoPlainText, dashToCamelCase, -} from '#util/stringUtils'; +} from '#site/util/stringUtils'; describe('String utils', () => { it('getAcronymFromString returns the correct acronym', () => { diff --git a/apps/site/util/assignClientContext.ts b/apps/site/util/assignClientContext.ts index 12936c8534d29..43e50d519454f 100644 --- a/apps/site/util/assignClientContext.ts +++ b/apps/site/util/assignClientContext.ts @@ -1,4 +1,4 @@ -import type { ClientSharedServerContext } from '#types'; +import type { ClientSharedServerContext } from '#site/types'; export const assignClientContext = ( props: Partial diff --git a/apps/site/util/authorUtils.ts b/apps/site/util/authorUtils.ts index f4e5588c5740a..4a3cccc975ac5 100644 --- a/apps/site/util/authorUtils.ts +++ b/apps/site/util/authorUtils.ts @@ -1,7 +1,7 @@ -import { authors } from '#next.json.mjs'; -import type { AuthorProps } from '#types'; -import { getGitHubAvatarUrl } from '#util/gitHubUtils'; -import { getAcronymFromString } from '#util/stringUtils'; +import { authors } from '#site/next.json.mjs'; +import type { AuthorProps } from '#site/types'; +import { getGitHubAvatarUrl } from '#site/util/gitHubUtils'; +import { getAcronymFromString } from '#site/util/stringUtils'; export const mapAuthorToCardAuthors = (author: string) => { // Clears text in parentheses diff --git a/apps/site/util/blogUtils.ts b/apps/site/util/blogUtils.ts index 8c136639b3fe9..2ddf810e1aaf6 100644 --- a/apps/site/util/blogUtils.ts +++ b/apps/site/util/blogUtils.ts @@ -1,4 +1,4 @@ -import type { BlogPreviewType } from '#types'; +import type { BlogPreviewType } from '#site/types'; export const mapBlogCategoryToPreviewType = (type: string): BlogPreviewType => { switch (type) { diff --git a/apps/site/util/detectOS.ts b/apps/site/util/detectOS.ts index 8cdf65342ebb1..c7769c5237375 100644 --- a/apps/site/util/detectOS.ts +++ b/apps/site/util/detectOS.ts @@ -1,4 +1,4 @@ -import type { UserOS } from '#types/userOS'; +import type { UserOS } from '#site/types/userOS'; export const detectOsInUserAgent = (userAgent: string | undefined): UserOS => { // Match OS names and convert to uppercase directly if there's a match diff --git a/apps/site/util/downloadUtils.tsx b/apps/site/util/downloadUtils.tsx index 56257a574f565..6536a3b6747ab 100644 --- a/apps/site/util/downloadUtils.tsx +++ b/apps/site/util/downloadUtils.tsx @@ -4,9 +4,9 @@ import * as OSIcons from '@node-core/ui-components/Icons/OperatingSystem'; import * as PackageManagerIcons from '@node-core/ui-components/Icons/PackageManager'; import satisfies from 'semver/functions/satisfies'; -import type { NodeReleaseStatus } from '#types'; -import type * as Types from '#types/release'; -import type { UserOS, UserPlatform } from '#types/userOS'; +import type { NodeReleaseStatus } from '#site/types'; +import type * as Types from '#site/types/release'; +import type { UserOS, UserPlatform } from '#site/types/userOS'; // This is a manual list of OS's that do not support/have a way of being installed // with an executable installer. This is used to disable the installer button. diff --git a/apps/site/util/getHighlighter.ts b/apps/site/util/getHighlighter.ts index 059dbc2704170..63aa6d1c0b0ba 100644 --- a/apps/site/util/getHighlighter.ts +++ b/apps/site/util/getHighlighter.ts @@ -1,7 +1,7 @@ import { createHighlighterCoreSync } from '@shikijs/core'; import { createJavaScriptRegexEngine } from '@shikijs/engine-javascript'; -import { LANGUAGES, DEFAULT_THEME } from '#shiki.config.mjs'; +import { LANGUAGES, DEFAULT_THEME } from '#site/shiki.config.mjs'; // This creates a memoized minimal Shikiji Syntax Highlighter export const shiki = createHighlighterCoreSync({ diff --git a/apps/site/util/getLanguageDisplayName.ts b/apps/site/util/getLanguageDisplayName.ts index f2997d7cf9f37..a62081bd93c4d 100644 --- a/apps/site/util/getLanguageDisplayName.ts +++ b/apps/site/util/getLanguageDisplayName.ts @@ -1,4 +1,4 @@ -import { LANGUAGES } from '#shiki.config.mjs'; +import { LANGUAGES } from '#site/shiki.config.mjs'; export const getLanguageDisplayName = (language: string): string => { const languageByIdOrAlias = LANGUAGES.find( diff --git a/apps/site/util/getNodeApiLink.ts b/apps/site/util/getNodeApiLink.ts index 5d1462ce49413..ec99cd89c543b 100644 --- a/apps/site/util/getNodeApiLink.ts +++ b/apps/site/util/getNodeApiLink.ts @@ -1,6 +1,6 @@ import semVer from 'semver'; -import { DOCS_URL, DIST_URL } from '#next.constants.mjs'; +import { DOCS_URL, DIST_URL } from '#site/next.constants.mjs'; export const getNodeApiLink = (version: string) => { if (semVer.satisfies(version, '>=0.3.1 <0.5.1')) { diff --git a/apps/site/util/getNodeDownloadUrl.ts b/apps/site/util/getNodeDownloadUrl.ts index 5bed9ee8a4520..d5f2a8ef0c44d 100644 --- a/apps/site/util/getNodeDownloadUrl.ts +++ b/apps/site/util/getNodeDownloadUrl.ts @@ -1,5 +1,5 @@ -import { DIST_URL } from '#next.constants.mjs'; -import type { UserOS, UserPlatform } from '#types/userOS'; +import { DIST_URL } from '#site/next.constants.mjs'; +import type { UserOS, UserPlatform } from '#site/types/userOS'; export type DownloadKind = 'installer' | 'binary' | 'source'; diff --git a/apps/site/util/getUserPlatform.ts b/apps/site/util/getUserPlatform.ts index 46161c4239b07..496fe4dec2f24 100644 --- a/apps/site/util/getUserPlatform.ts +++ b/apps/site/util/getUserPlatform.ts @@ -1,4 +1,4 @@ -import type * as Types from '#types/userOS'; +import type * as Types from '#site/types/userOS'; // This method is used to retrieve a User's platform based on their architecture and bitness. // Note: This is only used for automatic Platform detection for supported platforms by using `useDetectOS` diff --git a/packages/ui-components/Common/AlertBox/index.stories.tsx b/packages/ui-components/Common/AlertBox/index.stories.tsx index 7001fb69d8f65..d26a407bdacc3 100644 --- a/packages/ui-components/Common/AlertBox/index.stories.tsx +++ b/packages/ui-components/Common/AlertBox/index.stories.tsx @@ -1,7 +1,7 @@ import { ExclamationCircleIcon } from '@heroicons/react/24/solid'; import type { Meta as MetaObj, StoryObj } from '@storybook/react'; -import AlertBox from '#Common/AlertBox'; +import AlertBox from '#ui/Common/AlertBox'; type Story = StoryObj; type Meta = MetaObj; diff --git a/packages/ui-components/Common/AvatarGroup/Avatar/index.stories.tsx b/packages/ui-components/Common/AvatarGroup/Avatar/index.stories.tsx index 79003e6dd06bd..387ecaa02880e 100644 --- a/packages/ui-components/Common/AvatarGroup/Avatar/index.stories.tsx +++ b/packages/ui-components/Common/AvatarGroup/Avatar/index.stories.tsx @@ -1,6 +1,6 @@ import type { Meta as MetaObj, StoryObj } from '@storybook/react'; -import Avatar from '#Common/AvatarGroup/Avatar'; +import Avatar from '#ui/Common/AvatarGroup/Avatar'; type Story = StoryObj; type Meta = MetaObj; diff --git a/packages/ui-components/Common/AvatarGroup/Avatar/index.tsx b/packages/ui-components/Common/AvatarGroup/Avatar/index.tsx index 32b0cea02d66c..666dca159918a 100644 --- a/packages/ui-components/Common/AvatarGroup/Avatar/index.tsx +++ b/packages/ui-components/Common/AvatarGroup/Avatar/index.tsx @@ -2,7 +2,7 @@ import classNames from 'classnames'; import type { HTMLAttributes, ElementType } from 'react'; import { forwardRef } from 'react'; -import type { LinkLike } from '#types'; +import type { LinkLike } from '#ui/types'; import styles from './index.module.css'; diff --git a/packages/ui-components/Common/AvatarGroup/Overlay/index.stories.tsx b/packages/ui-components/Common/AvatarGroup/Overlay/index.stories.tsx index d6dbb6c49a5fd..ca9340dd39298 100644 --- a/packages/ui-components/Common/AvatarGroup/Overlay/index.stories.tsx +++ b/packages/ui-components/Common/AvatarGroup/Overlay/index.stories.tsx @@ -1,6 +1,6 @@ import type { Meta as MetaObj, StoryObj } from '@storybook/react'; -import AvatarOverlay from '#Common/AvatarGroup/Overlay'; +import AvatarOverlay from '#ui/Common/AvatarGroup/Overlay'; type Story = StoryObj; type Meta = MetaObj; diff --git a/packages/ui-components/Common/AvatarGroup/Overlay/index.tsx b/packages/ui-components/Common/AvatarGroup/Overlay/index.tsx index 8176b05d8e27d..2b91a8bd21143 100644 --- a/packages/ui-components/Common/AvatarGroup/Overlay/index.tsx +++ b/packages/ui-components/Common/AvatarGroup/Overlay/index.tsx @@ -1,7 +1,7 @@ import { ArrowUpRightIcon } from '@heroicons/react/24/solid'; import type { ComponentProps, FC } from 'react'; -import Avatar from '#Common/AvatarGroup/Avatar'; +import Avatar from '#ui/Common/AvatarGroup/Avatar'; import styles from './index.module.css'; diff --git a/packages/ui-components/Common/AvatarGroup/index.stories.tsx b/packages/ui-components/Common/AvatarGroup/index.stories.tsx index 4c05da1e63d95..e2480b42754f1 100644 --- a/packages/ui-components/Common/AvatarGroup/index.stories.tsx +++ b/packages/ui-components/Common/AvatarGroup/index.stories.tsx @@ -1,6 +1,6 @@ import type { Meta as MetaObj, StoryObj } from '@storybook/react'; -import AvatarGroup from '#Common/AvatarGroup'; +import AvatarGroup from '#ui/Common/AvatarGroup'; type Story = StoryObj; type Meta = MetaObj; diff --git a/packages/ui-components/Common/AvatarGroup/index.tsx b/packages/ui-components/Common/AvatarGroup/index.tsx index f52ce1c519bfe..51d08744f61b3 100644 --- a/packages/ui-components/Common/AvatarGroup/index.tsx +++ b/packages/ui-components/Common/AvatarGroup/index.tsx @@ -4,12 +4,12 @@ import classNames from 'classnames'; import type { FC, ElementType } from 'react'; import { useState, useMemo } from 'react'; -import type { AvatarProps } from '#Common/AvatarGroup/Avatar'; -import Avatar from '#Common/AvatarGroup/Avatar'; -import avatarstyles from '#Common/AvatarGroup/Avatar/index.module.css'; -import AvatarOverlay from '#Common/AvatarGroup/Overlay'; -import Tooltip from '#Common/Tooltip'; -import type { LinkLike } from '#types'; +import type { AvatarProps } from '#ui/Common/AvatarGroup/Avatar'; +import Avatar from '#ui/Common/AvatarGroup/Avatar'; +import avatarstyles from '#ui/Common/AvatarGroup/Avatar/index.module.css'; +import AvatarOverlay from '#ui/Common/AvatarGroup/Overlay'; +import Tooltip from '#ui/Common/Tooltip'; +import type { LinkLike } from '#ui/types'; import styles from './index.module.css'; diff --git a/packages/ui-components/Common/Badge/index.stories.tsx b/packages/ui-components/Common/Badge/index.stories.tsx index f558044bfedad..86df07062de4d 100644 --- a/packages/ui-components/Common/Badge/index.stories.tsx +++ b/packages/ui-components/Common/Badge/index.stories.tsx @@ -1,6 +1,6 @@ import type { Meta as MetaObj, StoryObj } from '@storybook/react'; -import Badge from '#Common/Badge'; +import Badge from '#ui/Common/Badge'; type Story = StoryObj; type Meta = MetaObj; diff --git a/packages/ui-components/Common/BadgeGroup/index.stories.tsx b/packages/ui-components/Common/BadgeGroup/index.stories.tsx index d9362b9613e37..ae100c07c653a 100644 --- a/packages/ui-components/Common/BadgeGroup/index.stories.tsx +++ b/packages/ui-components/Common/BadgeGroup/index.stories.tsx @@ -1,6 +1,6 @@ import type { Meta as MetaObj, StoryObj } from '@storybook/react'; -import BadgeGroup from '#Common/BadgeGroup'; +import BadgeGroup from '#ui/Common/BadgeGroup'; type Story = StoryObj; type Meta = MetaObj; diff --git a/packages/ui-components/Common/BadgeGroup/index.tsx b/packages/ui-components/Common/BadgeGroup/index.tsx index b797e38f56f7d..2975fc8fe3f9b 100644 --- a/packages/ui-components/Common/BadgeGroup/index.tsx +++ b/packages/ui-components/Common/BadgeGroup/index.tsx @@ -1,8 +1,8 @@ import ArrowRightIcon from '@heroicons/react/24/solid/ArrowRightIcon'; import type { ComponentProps, FC, PropsWithChildren } from 'react'; -import Badge from '#Common/Badge'; -import type { LinkLike } from '#types'; +import Badge from '#ui/Common/Badge'; +import type { LinkLike } from '#ui/types'; import styles from './index.module.css'; diff --git a/packages/ui-components/Common/Banner/index.stories.tsx b/packages/ui-components/Common/Banner/index.stories.tsx index 000dfe6ff988c..b088f8106c377 100644 --- a/packages/ui-components/Common/Banner/index.stories.tsx +++ b/packages/ui-components/Common/Banner/index.stories.tsx @@ -1,6 +1,6 @@ import type { Meta as MetaObj, StoryObj } from '@storybook/react'; -import Banner from '#Common/Banner'; +import Banner from '#ui/Common/Banner'; type Story = StoryObj; type Meta = MetaObj; diff --git a/packages/ui-components/Common/BaseActiveLink/index.tsx b/packages/ui-components/Common/BaseActiveLink/index.tsx index 40a12d352bbc4..05a00af11e5fb 100644 --- a/packages/ui-components/Common/BaseActiveLink/index.tsx +++ b/packages/ui-components/Common/BaseActiveLink/index.tsx @@ -1,7 +1,7 @@ import classNames from 'classnames'; import type { ComponentProps, FC } from 'react'; -import type { LinkLike } from '#types'; +import type { LinkLike } from '#ui/types'; export type ActiveLocalizedLinkProps = ComponentProps & { activeClassName?: string; diff --git a/packages/ui-components/Common/BaseButton/index.stories.tsx b/packages/ui-components/Common/BaseButton/index.stories.tsx index 210747c8f8080..36ffb058a914f 100644 --- a/packages/ui-components/Common/BaseButton/index.stories.tsx +++ b/packages/ui-components/Common/BaseButton/index.stories.tsx @@ -1,7 +1,7 @@ import { ArrowRightIcon } from '@heroicons/react/24/solid'; import type { Meta as MetaObj, StoryObj } from '@storybook/react'; -import BaseButton from '#Common/BaseButton'; +import BaseButton from '#ui/Common/BaseButton'; type Story = StoryObj; type Meta = MetaObj; diff --git a/packages/ui-components/Common/BaseButton/index.tsx b/packages/ui-components/Common/BaseButton/index.tsx index ad2661f55aac7..383c6f8d9dd53 100644 --- a/packages/ui-components/Common/BaseButton/index.tsx +++ b/packages/ui-components/Common/BaseButton/index.tsx @@ -1,7 +1,7 @@ import classNames from 'classnames'; import type { FC, AnchorHTMLAttributes, ButtonHTMLAttributes } from 'react'; -import type { LinkLike } from '#types'; +import type { LinkLike } from '#ui/types'; import styles from './index.module.css'; diff --git a/packages/ui-components/Common/BaseCodeBox/index.stories.tsx b/packages/ui-components/Common/BaseCodeBox/index.stories.tsx index 826a5b80827a2..d5ebd7aa65a3b 100644 --- a/packages/ui-components/Common/BaseCodeBox/index.stories.tsx +++ b/packages/ui-components/Common/BaseCodeBox/index.stories.tsx @@ -1,6 +1,6 @@ import type { Meta as MetaObj, StoryObj } from '@storybook/react'; -import BaseCodeBox from '#Common/BaseCodeBox'; +import BaseCodeBox from '#ui/Common/BaseCodeBox'; type Story = StoryObj; type Meta = MetaObj; diff --git a/packages/ui-components/Common/BaseCodeBox/index.tsx b/packages/ui-components/Common/BaseCodeBox/index.tsx index 58af8f8af7375..c35fd7347ad9d 100644 --- a/packages/ui-components/Common/BaseCodeBox/index.tsx +++ b/packages/ui-components/Common/BaseCodeBox/index.tsx @@ -8,8 +8,8 @@ import classNames from 'classnames'; import type { FC, PropsWithChildren, ReactElement, ReactNode } from 'react'; import { Fragment, isValidElement, useRef } from 'react'; -import BaseButton from '#Common/BaseButton'; -import type { LinkLike } from '#types'; +import BaseButton from '#ui/Common/BaseButton'; +import type { LinkLike } from '#ui/types'; import styles from './index.module.css'; diff --git a/packages/ui-components/Common/BaseCrossLink/index.stories.tsx b/packages/ui-components/Common/BaseCrossLink/index.stories.tsx index 6968fa9180d35..2b5b6970bc034 100644 --- a/packages/ui-components/Common/BaseCrossLink/index.stories.tsx +++ b/packages/ui-components/Common/BaseCrossLink/index.stories.tsx @@ -1,6 +1,6 @@ import type { Meta as MetaObj, StoryObj } from '@storybook/react'; -import BaseCrossLink from '#Common/BaseCrossLink'; +import BaseCrossLink from '#ui/Common/BaseCrossLink'; type Story = StoryObj; type Meta = MetaObj; diff --git a/packages/ui-components/Common/BaseCrossLink/index.tsx b/packages/ui-components/Common/BaseCrossLink/index.tsx index 96e7df13b317d..c9d069be70c8f 100644 --- a/packages/ui-components/Common/BaseCrossLink/index.tsx +++ b/packages/ui-components/Common/BaseCrossLink/index.tsx @@ -1,8 +1,8 @@ import classNames from 'classnames'; import type { FC } from 'react'; -import PrevNextArrow from '#Common/BasePagination/PrevNextArrow'; -import type { LinkLike, FormattedMessage } from '#types'; +import PrevNextArrow from '#ui/Common/BasePagination/PrevNextArrow'; +import type { LinkLike, FormattedMessage } from '#ui/types'; import styles from './index.module.css'; diff --git a/packages/ui-components/Common/BaseLinkTabs/index.stories.tsx b/packages/ui-components/Common/BaseLinkTabs/index.stories.tsx index 8240fcdaeb08f..49b7dc99e6121 100644 --- a/packages/ui-components/Common/BaseLinkTabs/index.stories.tsx +++ b/packages/ui-components/Common/BaseLinkTabs/index.stories.tsx @@ -1,6 +1,6 @@ import type { Meta as MetaObj, StoryObj } from '@storybook/react'; -import BaseLinkTabs from '#Common/BaseLinkTabs'; +import BaseLinkTabs from '#ui/Common/BaseLinkTabs'; type Story = StoryObj; type Meta = MetaObj; diff --git a/packages/ui-components/Common/BaseLinkTabs/index.tsx b/packages/ui-components/Common/BaseLinkTabs/index.tsx index 4e693534fcb00..81ec353f178c7 100644 --- a/packages/ui-components/Common/BaseLinkTabs/index.tsx +++ b/packages/ui-components/Common/BaseLinkTabs/index.tsx @@ -1,7 +1,7 @@ import type { FC, PropsWithChildren } from 'react'; -import Select from '#Common/Select'; -import type { LinkLike } from '#types'; +import Select from '#ui/Common/Select'; +import type { LinkLike } from '#ui/types'; import styles from './index.module.css'; diff --git a/packages/ui-components/Common/BasePagination/Ellipsis/index.stories.tsx b/packages/ui-components/Common/BasePagination/Ellipsis/index.stories.tsx index 98fb4d0b58391..66def59b3be0d 100644 --- a/packages/ui-components/Common/BasePagination/Ellipsis/index.stories.tsx +++ b/packages/ui-components/Common/BasePagination/Ellipsis/index.stories.tsx @@ -1,6 +1,6 @@ import type { Meta as MetaObj, StoryObj } from '@storybook/react'; -import Ellipsis from '#Common/BasePagination/Ellipsis'; +import Ellipsis from '#ui/Common/BasePagination/Ellipsis'; type Story = StoryObj; type Meta = MetaObj; diff --git a/packages/ui-components/Common/BasePagination/PaginationListItem/__tests__/index.test.jsx b/packages/ui-components/Common/BasePagination/PaginationListItem/__tests__/index.test.jsx index e8bf996c149f1..df825c250bdc4 100644 --- a/packages/ui-components/Common/BasePagination/PaginationListItem/__tests__/index.test.jsx +++ b/packages/ui-components/Common/BasePagination/PaginationListItem/__tests__/index.test.jsx @@ -5,7 +5,7 @@ import { render, screen } from '@testing-library/react'; import { isVisible } from '../../../../../../tests/utilities.mjs'; -import PaginationListItem from '#Common/BasePagination/PaginationListItem'; +import PaginationListItem from '#ui/Common/BasePagination/PaginationListItem'; function renderPaginationListItem({ url, diff --git a/packages/ui-components/Common/BasePagination/PaginationListItem/index.stories.tsx b/packages/ui-components/Common/BasePagination/PaginationListItem/index.stories.tsx index eb0c8d490524a..b990e1b4339f9 100644 --- a/packages/ui-components/Common/BasePagination/PaginationListItem/index.stories.tsx +++ b/packages/ui-components/Common/BasePagination/PaginationListItem/index.stories.tsx @@ -1,6 +1,6 @@ import type { Meta as MetaObj, StoryObj } from '@storybook/react'; -import PaginationListItem from '#Common/BasePagination/PaginationListItem'; +import PaginationListItem from '#ui/Common/BasePagination/PaginationListItem'; type Story = StoryObj; type Meta = MetaObj; diff --git a/packages/ui-components/Common/BasePagination/PaginationListItem/index.tsx b/packages/ui-components/Common/BasePagination/PaginationListItem/index.tsx index 09762e97f343c..fe5006b96fa78 100644 --- a/packages/ui-components/Common/BasePagination/PaginationListItem/index.tsx +++ b/packages/ui-components/Common/BasePagination/PaginationListItem/index.tsx @@ -1,6 +1,6 @@ import type { FC } from 'react'; -import type { LinkLike } from '#types'; +import type { LinkLike } from '#ui/types'; import styles from './index.module.css'; diff --git a/packages/ui-components/Common/BasePagination/__tests__/index.test.jsx b/packages/ui-components/Common/BasePagination/__tests__/index.test.jsx index 8d6d3d1af02c9..a91013ac8bf21 100644 --- a/packages/ui-components/Common/BasePagination/__tests__/index.test.jsx +++ b/packages/ui-components/Common/BasePagination/__tests__/index.test.jsx @@ -5,7 +5,7 @@ import { render, screen } from '@testing-library/react'; import { isVisible } from '../../../../../tests/utilities.mjs'; -import BasePagination from '#Common/BasePagination'; +import BasePagination from '#ui/Common/BasePagination'; const getPageLabel = number => number.toString(); const labels = { diff --git a/packages/ui-components/Common/BasePagination/index.stories.tsx b/packages/ui-components/Common/BasePagination/index.stories.tsx index faa4fcc628ee5..2a1e4c8247caa 100644 --- a/packages/ui-components/Common/BasePagination/index.stories.tsx +++ b/packages/ui-components/Common/BasePagination/index.stories.tsx @@ -1,6 +1,6 @@ import type { Meta as MetaObj, StoryObj } from '@storybook/react'; -import BasePagination from '#Common/BasePagination'; +import BasePagination from '#ui/Common/BasePagination'; type Story = StoryObj; type Meta = MetaObj; diff --git a/packages/ui-components/Common/BasePagination/index.tsx b/packages/ui-components/Common/BasePagination/index.tsx index a8cb70fd69db2..e4b33a8ab16b9 100644 --- a/packages/ui-components/Common/BasePagination/index.tsx +++ b/packages/ui-components/Common/BasePagination/index.tsx @@ -1,9 +1,9 @@ import { ArrowRightIcon, ArrowLeftIcon } from '@heroicons/react/20/solid'; import type { FC } from 'react'; -import Button from '#Common/BaseButton'; -import { useGetPageElements } from '#Common/BasePagination/useGetPageElements'; -import type { LinkLike } from '#types'; +import Button from '#ui/Common/BaseButton'; +import { useGetPageElements } from '#ui/Common/BasePagination/useGetPageElements'; +import type { LinkLike } from '#ui/types'; import styles from './index.module.css'; diff --git a/packages/ui-components/Common/BasePagination/useGetPageElements.tsx b/packages/ui-components/Common/BasePagination/useGetPageElements.tsx index f6df13605cf92..2cb159c994531 100644 --- a/packages/ui-components/Common/BasePagination/useGetPageElements.tsx +++ b/packages/ui-components/Common/BasePagination/useGetPageElements.tsx @@ -1,10 +1,10 @@ import type { ComponentProps } from 'react'; -import type BasePagination from '#Common/BasePagination'; -import Ellipsis from '#Common/BasePagination/Ellipsis'; -import type { PaginationListItemProps } from '#Common/BasePagination/PaginationListItem'; -import PaginationListItem from '#Common/BasePagination/PaginationListItem'; -import type { LinkLike } from '#types'; +import type BasePagination from '#ui/Common/BasePagination'; +import Ellipsis from '#ui/Common/BasePagination/Ellipsis'; +import type { PaginationListItemProps } from '#ui/Common/BasePagination/PaginationListItem'; +import PaginationListItem from '#ui/Common/BasePagination/PaginationListItem'; +import type { LinkLike } from '#ui/types'; const parsePages = ( pages: ComponentProps['pages'], diff --git a/packages/ui-components/Common/Blockquote/index.stories.tsx b/packages/ui-components/Common/Blockquote/index.stories.tsx index 56f7436e0fdf5..3e8fc0f0d42b0 100644 --- a/packages/ui-components/Common/Blockquote/index.stories.tsx +++ b/packages/ui-components/Common/Blockquote/index.stories.tsx @@ -1,6 +1,6 @@ import type { Meta as MetaObj, StoryObj } from '@storybook/react'; -import Blockquote from '#Common/Blockquote'; +import Blockquote from '#ui/Common/Blockquote'; type Story = StoryObj; type Meta = MetaObj; diff --git a/packages/ui-components/Common/Breadcrumbs/BreadcrumbHomeLink/index.tsx b/packages/ui-components/Common/Breadcrumbs/BreadcrumbHomeLink/index.tsx index df04884d4cf01..8faed3e1fb116 100644 --- a/packages/ui-components/Common/Breadcrumbs/BreadcrumbHomeLink/index.tsx +++ b/packages/ui-components/Common/Breadcrumbs/BreadcrumbHomeLink/index.tsx @@ -1,7 +1,7 @@ import HomeIcon from '@heroicons/react/24/outline/HomeIcon'; import type { ComponentProps, FC } from 'react'; -import BreadcrumbLink from '#Common/Breadcrumbs/BreadcrumbLink'; +import BreadcrumbLink from '#ui/Common/Breadcrumbs/BreadcrumbLink'; import styles from './index.module.css'; diff --git a/packages/ui-components/Common/Breadcrumbs/BreadcrumbLink/index.tsx b/packages/ui-components/Common/Breadcrumbs/BreadcrumbLink/index.tsx index 408a0de854c39..ea52968dd9ce0 100644 --- a/packages/ui-components/Common/Breadcrumbs/BreadcrumbLink/index.tsx +++ b/packages/ui-components/Common/Breadcrumbs/BreadcrumbLink/index.tsx @@ -1,7 +1,7 @@ import classNames from 'classnames'; import type { ComponentProps, FC } from 'react'; -import type { LinkLike } from '#types'; +import type { LinkLike } from '#ui/types'; import styles from './index.module.css'; diff --git a/packages/ui-components/Common/Breadcrumbs/BreadcrumbTruncatedItem/index.tsx b/packages/ui-components/Common/Breadcrumbs/BreadcrumbTruncatedItem/index.tsx index 4e67ef4ecb3af..00d0984c8389f 100644 --- a/packages/ui-components/Common/Breadcrumbs/BreadcrumbTruncatedItem/index.tsx +++ b/packages/ui-components/Common/Breadcrumbs/BreadcrumbTruncatedItem/index.tsx @@ -1,4 +1,4 @@ -import BreadcrumbItem from '#Common/Breadcrumbs/BreadcrumbItem'; +import BreadcrumbItem from '#ui/Common/Breadcrumbs/BreadcrumbItem'; const BreadcrumbTruncatedItem = () => ( diff --git a/packages/ui-components/Common/Breadcrumbs/index.stories.tsx b/packages/ui-components/Common/Breadcrumbs/index.stories.tsx index 2abce4d8ecf29..56983c3fff9f1 100644 --- a/packages/ui-components/Common/Breadcrumbs/index.stories.tsx +++ b/packages/ui-components/Common/Breadcrumbs/index.stories.tsx @@ -1,6 +1,6 @@ import type { Meta as MetaObj, StoryObj } from '@storybook/react'; -import Breadcrumbs from '#Common/Breadcrumbs'; +import Breadcrumbs from '#ui/Common/Breadcrumbs'; type Story = StoryObj; type Meta = MetaObj; diff --git a/packages/ui-components/Common/Breadcrumbs/index.tsx b/packages/ui-components/Common/Breadcrumbs/index.tsx index 191f14890e161..a90b01c5843ca 100644 --- a/packages/ui-components/Common/Breadcrumbs/index.tsx +++ b/packages/ui-components/Common/Breadcrumbs/index.tsx @@ -1,12 +1,12 @@ import type { FC } from 'react'; import { useMemo } from 'react'; -import BreadcrumbHomeLink from '#Common/Breadcrumbs/BreadcrumbHomeLink'; -import BreadcrumbItem from '#Common/Breadcrumbs/BreadcrumbItem'; -import BreadcrumbLink from '#Common/Breadcrumbs/BreadcrumbLink'; -import BreadcrumbRoot from '#Common/Breadcrumbs/BreadcrumbRoot'; -import BreadcrumbTruncatedItem from '#Common/Breadcrumbs/BreadcrumbTruncatedItem'; -import type { FormattedMessage, LinkLike } from '#types'; +import BreadcrumbHomeLink from '#ui/Common/Breadcrumbs/BreadcrumbHomeLink'; +import BreadcrumbItem from '#ui/Common/Breadcrumbs/BreadcrumbItem'; +import BreadcrumbLink from '#ui/Common/Breadcrumbs/BreadcrumbLink'; +import BreadcrumbRoot from '#ui/Common/Breadcrumbs/BreadcrumbRoot'; +import BreadcrumbTruncatedItem from '#ui/Common/Breadcrumbs/BreadcrumbTruncatedItem'; +import type { FormattedMessage, LinkLike } from '#ui/types'; export type BreadcrumbLink = { label: FormattedMessage; diff --git a/packages/ui-components/Common/CodeTabs/index.stories.tsx b/packages/ui-components/Common/CodeTabs/index.stories.tsx index 0042b6d0ba065..55c6c43ac8974 100644 --- a/packages/ui-components/Common/CodeTabs/index.stories.tsx +++ b/packages/ui-components/Common/CodeTabs/index.stories.tsx @@ -2,8 +2,8 @@ import * as TabsPrimitive from '@radix-ui/react-tabs'; import type { Meta as MetaObj, StoryObj } from '@storybook/react'; import type { FC } from 'react'; -import BaseCodeBox from '#Common/BaseCodeBox'; -import CodeTabs from '#Common/CodeTabs'; +import BaseCodeBox from '#ui/Common/BaseCodeBox'; +import CodeTabs from '#ui/Common/CodeTabs'; type Story = StoryObj; type Meta = MetaObj; diff --git a/packages/ui-components/Common/CodeTabs/index.tsx b/packages/ui-components/Common/CodeTabs/index.tsx index 77ad910f33c3b..68c6cecc6925b 100644 --- a/packages/ui-components/Common/CodeTabs/index.tsx +++ b/packages/ui-components/Common/CodeTabs/index.tsx @@ -1,6 +1,6 @@ import type { ComponentProps, FC } from 'react'; -import Tabs from '#Common/Tabs'; +import Tabs from '#ui/Common/Tabs'; import styles from './index.module.css'; diff --git a/packages/ui-components/Common/GlowingBackdrop/index.stories.tsx b/packages/ui-components/Common/GlowingBackdrop/index.stories.tsx index d5ee6ea44d7f6..5bcd3667d08a9 100644 --- a/packages/ui-components/Common/GlowingBackdrop/index.stories.tsx +++ b/packages/ui-components/Common/GlowingBackdrop/index.stories.tsx @@ -1,6 +1,6 @@ import type { Meta as MetaObj, StoryObj } from '@storybook/react'; -import GlowingBackdrop from '#Common/GlowingBackdrop'; +import GlowingBackdrop from '#ui/Common/GlowingBackdrop'; type Story = StoryObj; type Meta = MetaObj; diff --git a/packages/ui-components/Common/GlowingBackdrop/index.tsx b/packages/ui-components/Common/GlowingBackdrop/index.tsx index 4699375d6fa42..ea498c396ce9f 100644 --- a/packages/ui-components/Common/GlowingBackdrop/index.tsx +++ b/packages/ui-components/Common/GlowingBackdrop/index.tsx @@ -1,6 +1,6 @@ import type { FC } from 'react'; -import HexagonGrid from '#Icons/HexagonGrid'; +import HexagonGrid from '#ui/Icons/HexagonGrid'; import styles from './index.module.css'; diff --git a/packages/ui-components/Common/LanguageDropDown/index.stories.tsx b/packages/ui-components/Common/LanguageDropDown/index.stories.tsx index 64574aaf6e8ef..97378c0d1726c 100644 --- a/packages/ui-components/Common/LanguageDropDown/index.stories.tsx +++ b/packages/ui-components/Common/LanguageDropDown/index.stories.tsx @@ -1,6 +1,6 @@ import type { Meta as MetaObj, StoryObj } from '@storybook/react'; -import LanguageDropDown from '#Common/LanguageDropDown'; +import LanguageDropDown from '#ui/Common/LanguageDropDown'; type Story = StoryObj; type Meta = MetaObj; diff --git a/packages/ui-components/Common/LanguageDropDown/index.tsx b/packages/ui-components/Common/LanguageDropDown/index.tsx index 1f30a24890743..e55178333f431 100644 --- a/packages/ui-components/Common/LanguageDropDown/index.tsx +++ b/packages/ui-components/Common/LanguageDropDown/index.tsx @@ -3,7 +3,7 @@ import * as DropdownMenu from '@radix-ui/react-dropdown-menu'; import classNames from 'classnames'; import type { FC } from 'react'; -import type { SimpleLocaleConfig } from '#types'; +import type { SimpleLocaleConfig } from '#ui/types'; import styles from './index.module.css'; diff --git a/packages/ui-components/Common/Modal/index.stories.tsx b/packages/ui-components/Common/Modal/index.stories.tsx index 01665d613f6f4..8040bbd63134e 100644 --- a/packages/ui-components/Common/Modal/index.stories.tsx +++ b/packages/ui-components/Common/Modal/index.stories.tsx @@ -1,6 +1,6 @@ import type { Meta as MetaObj, StoryObj } from '@storybook/react'; -import Modal from '#Common/Modal'; +import Modal from '#ui/Common/Modal'; type Story = StoryObj; type Meta = MetaObj; diff --git a/packages/ui-components/Common/NodejsLogo/index.stories.tsx b/packages/ui-components/Common/NodejsLogo/index.stories.tsx index c63dfa684253d..acaa659efbae6 100644 --- a/packages/ui-components/Common/NodejsLogo/index.stories.tsx +++ b/packages/ui-components/Common/NodejsLogo/index.stories.tsx @@ -1,6 +1,6 @@ import type { Meta as MetaObj, StoryObj } from '@storybook/react'; -import NodejsLogo from '#Common/NodejsLogo'; +import NodejsLogo from '#ui/Common/NodejsLogo'; type Story = StoryObj; type Meta = MetaObj; diff --git a/packages/ui-components/Common/NodejsLogo/index.tsx b/packages/ui-components/Common/NodejsLogo/index.tsx index ab39ae6ebcd07..21725e85d5ae0 100644 --- a/packages/ui-components/Common/NodejsLogo/index.tsx +++ b/packages/ui-components/Common/NodejsLogo/index.tsx @@ -1,7 +1,7 @@ import type { FC } from 'react'; -import NodejsIcon from '#Icons/Logos/Nodejs'; -import type { LogoVariant } from '#types'; +import NodejsIcon from '#ui/Icons/Logos/Nodejs'; +import type { LogoVariant } from '#ui/types'; import style from './index.module.css'; diff --git a/packages/ui-components/Common/Notification/index.stories.tsx b/packages/ui-components/Common/Notification/index.stories.tsx index af2d758ab8b19..e0ae660015a32 100644 --- a/packages/ui-components/Common/Notification/index.stories.tsx +++ b/packages/ui-components/Common/Notification/index.stories.tsx @@ -1,7 +1,7 @@ import { CodeBracketIcon } from '@heroicons/react/24/solid'; import type { Meta as MetaObj, StoryObj } from '@storybook/react'; -import Notification from '#Common/Notification'; +import Notification from '#ui/Common/Notification'; type Story = StoryObj; type Meta = MetaObj; diff --git a/packages/ui-components/Common/Preview/index.stories.tsx b/packages/ui-components/Common/Preview/index.stories.tsx index 5359ce4bfcaf5..0d9b2b7f500ee 100644 --- a/packages/ui-components/Common/Preview/index.stories.tsx +++ b/packages/ui-components/Common/Preview/index.stories.tsx @@ -1,6 +1,6 @@ import type { Meta as MetaObj, StoryObj } from '@storybook/react'; -import Preview from '#Common/Preview'; +import Preview from '#ui/Common/Preview'; type Story = StoryObj; type Meta = MetaObj; diff --git a/packages/ui-components/Common/Preview/index.tsx b/packages/ui-components/Common/Preview/index.tsx index 3d3cc977ceeda..9ea59cfb486cb 100644 --- a/packages/ui-components/Common/Preview/index.tsx +++ b/packages/ui-components/Common/Preview/index.tsx @@ -1,9 +1,9 @@ import classNames from 'classnames'; import type { FC } from 'react'; -import HexagonGrid from '#Icons/HexagonGrid'; -import JsWhiteIcon from '#Icons/Logos/JsWhite'; -import type { BlogPreviewType } from '#types'; +import HexagonGrid from '#ui/Icons/HexagonGrid'; +import JsWhiteIcon from '#ui/Icons/Logos/JsWhite'; +import type { BlogPreviewType } from '#ui/types'; import styles from './index.module.css'; diff --git a/packages/ui-components/Common/ProgressionSidebar/ProgressionSidebarGroup/index.tsx b/packages/ui-components/Common/ProgressionSidebar/ProgressionSidebarGroup/index.tsx index c2414bdba620b..e0c681ca9c75a 100644 --- a/packages/ui-components/Common/ProgressionSidebar/ProgressionSidebarGroup/index.tsx +++ b/packages/ui-components/Common/ProgressionSidebar/ProgressionSidebarGroup/index.tsx @@ -1,7 +1,7 @@ import type { ComponentProps, FC } from 'react'; -import ProgressionSidebarItem from '#Common/ProgressionSidebar/ProgressionSidebarItem'; -import type { FormattedMessage, LinkLike } from '#types'; +import ProgressionSidebarItem from '#ui/Common/ProgressionSidebar/ProgressionSidebarItem'; +import type { FormattedMessage, LinkLike } from '#ui/types'; import styles from './index.module.css'; diff --git a/packages/ui-components/Common/ProgressionSidebar/ProgressionSidebarItem/index.tsx b/packages/ui-components/Common/ProgressionSidebar/ProgressionSidebarItem/index.tsx index 66088de93eec8..bfe313b8dbdce 100644 --- a/packages/ui-components/Common/ProgressionSidebar/ProgressionSidebarItem/index.tsx +++ b/packages/ui-components/Common/ProgressionSidebar/ProgressionSidebarItem/index.tsx @@ -1,8 +1,8 @@ import type { FC } from 'react'; -import BaseActiveLink from '#Common/BaseActiveLink'; -import ProgressionSidebarIcon from '#Common/ProgressionSidebar/ProgressionSidebarIcon'; -import type { FormattedMessage, LinkLike } from '#types'; +import BaseActiveLink from '#ui/Common/BaseActiveLink'; +import ProgressionSidebarIcon from '#ui/Common/ProgressionSidebar/ProgressionSidebarIcon'; +import type { FormattedMessage, LinkLike } from '#ui/types'; import styles from './index.module.css'; diff --git a/packages/ui-components/Common/ProgressionSidebar/index.stories.tsx b/packages/ui-components/Common/ProgressionSidebar/index.stories.tsx index 36fa60290a78e..f40b33b36f837 100644 --- a/packages/ui-components/Common/ProgressionSidebar/index.stories.tsx +++ b/packages/ui-components/Common/ProgressionSidebar/index.stories.tsx @@ -1,6 +1,6 @@ import type { Meta as MetaObj, StoryObj } from '@storybook/react'; -import ProgressionSidebar from '#Common/ProgressionSidebar'; +import ProgressionSidebar from '#ui/Common/ProgressionSidebar'; type Story = StoryObj; type Meta = MetaObj; diff --git a/packages/ui-components/Common/ProgressionSidebar/index.tsx b/packages/ui-components/Common/ProgressionSidebar/index.tsx index 702218100f832..0afab901b55f1 100644 --- a/packages/ui-components/Common/ProgressionSidebar/index.tsx +++ b/packages/ui-components/Common/ProgressionSidebar/index.tsx @@ -2,9 +2,9 @@ import { useRef, type ComponentProps, type FC } from 'react'; -import ProgressionSidebarGroup from '#Common/ProgressionSidebar/ProgressionSidebarGroup'; -import Select from '#Common/Select'; -import type { LinkLike } from '#types'; +import ProgressionSidebarGroup from '#ui/Common/ProgressionSidebar/ProgressionSidebarGroup'; +import Select from '#ui/Common/Select'; +import type { LinkLike } from '#ui/types'; import styles from './index.module.css'; diff --git a/packages/ui-components/Common/Select/index.stories.tsx b/packages/ui-components/Common/Select/index.stories.tsx index abace5b0511ac..c3230f6857dde 100644 --- a/packages/ui-components/Common/Select/index.stories.tsx +++ b/packages/ui-components/Common/Select/index.stories.tsx @@ -1,7 +1,7 @@ import type { Meta as MetaObj, StoryObj } from '@storybook/react'; -import Select from '#Common/Select'; -import * as OSIcons from '#Icons/OperatingSystem'; +import Select from '#ui/Common/Select'; +import * as OSIcons from '#ui/Icons/OperatingSystem'; type Story = StoryObj; type Meta = MetaObj; diff --git a/packages/ui-components/Common/Select/index.tsx b/packages/ui-components/Common/Select/index.tsx index ecc681d11d556..efef75be7f0a9 100644 --- a/packages/ui-components/Common/Select/index.tsx +++ b/packages/ui-components/Common/Select/index.tsx @@ -6,8 +6,8 @@ import classNames from 'classnames'; import { useEffect, useId, useMemo, useState } from 'react'; import type { ReactElement, ReactNode } from 'react'; -import Skeleton from '#Common/Skeleton'; -import type { FormattedMessage } from '#types'; +import Skeleton from '#ui/Common/Skeleton'; +import type { FormattedMessage } from '#ui/types'; import styles from './index.module.css'; diff --git a/packages/ui-components/Common/Separator/index.stories.tsx b/packages/ui-components/Common/Separator/index.stories.tsx index 7e2f1bca52281..96bb2674f059c 100644 --- a/packages/ui-components/Common/Separator/index.stories.tsx +++ b/packages/ui-components/Common/Separator/index.stories.tsx @@ -1,6 +1,6 @@ import type { Meta as MetaObj, StoryObj } from '@storybook/react'; -import Separator from '#Common/Separator'; +import Separator from '#ui/Common/Separator'; type Story = StoryObj; type Meta = MetaObj; diff --git a/packages/ui-components/Common/Tabs/index.stories.tsx b/packages/ui-components/Common/Tabs/index.stories.tsx index 97eaf4290c0cf..880879abb9194 100644 --- a/packages/ui-components/Common/Tabs/index.stories.tsx +++ b/packages/ui-components/Common/Tabs/index.stories.tsx @@ -2,7 +2,7 @@ import * as TabsPrimitive from '@radix-ui/react-tabs'; import type { Meta as MetaObj, StoryObj } from '@storybook/react'; import type { ComponentProps } from 'react'; -import Tabs from '#Common/Tabs'; +import Tabs from '#ui/Common/Tabs'; type Story = StoryObj; type Meta = MetaObj; diff --git a/packages/ui-components/Common/ThemeToggle/index.stories.tsx b/packages/ui-components/Common/ThemeToggle/index.stories.tsx index ad5e40698e0f2..12762fc982974 100644 --- a/packages/ui-components/Common/ThemeToggle/index.stories.tsx +++ b/packages/ui-components/Common/ThemeToggle/index.stories.tsx @@ -1,6 +1,6 @@ import type { Meta as MetaObj, StoryObj } from '@storybook/react'; -import ThemeToggle from '#Common/ThemeToggle'; +import ThemeToggle from '#ui/Common/ThemeToggle'; type Story = StoryObj; type Meta = MetaObj; diff --git a/packages/ui-components/Common/Tooltip/index.stories.tsx b/packages/ui-components/Common/Tooltip/index.stories.tsx index 83df873767350..f48e069e03500 100644 --- a/packages/ui-components/Common/Tooltip/index.stories.tsx +++ b/packages/ui-components/Common/Tooltip/index.stories.tsx @@ -1,6 +1,6 @@ import type { Meta as MetaObj, StoryObj } from '@storybook/react'; -import Tooltip from '#Common/Tooltip'; +import Tooltip from '#ui/Common/Tooltip'; type Story = StoryObj; type Meta = MetaObj; diff --git a/packages/ui-components/Containers/Footer/index.stories.tsx b/packages/ui-components/Containers/Footer/index.stories.tsx index 3c34bb3543af8..4ab3ef251ffed 100644 --- a/packages/ui-components/Containers/Footer/index.stories.tsx +++ b/packages/ui-components/Containers/Footer/index.stories.tsx @@ -1,6 +1,6 @@ import type { Meta as MetaObj, StoryObj } from '@storybook/react'; -import Footer from '#Containers/Footer'; +import Footer from '#ui/Containers/Footer'; type Story = StoryObj; type Meta = MetaObj; diff --git a/packages/ui-components/Containers/Footer/index.tsx b/packages/ui-components/Containers/Footer/index.tsx index 94c766155acea..53a977ed33fc2 100644 --- a/packages/ui-components/Containers/Footer/index.tsx +++ b/packages/ui-components/Containers/Footer/index.tsx @@ -2,7 +2,7 @@ import type { FC, SVGProps } from 'react'; -import NavItem from '#Containers/NavBar/NavItem'; +import NavItem from '#ui/Containers/NavBar/NavItem'; import { Bluesky, Discord, @@ -11,8 +11,8 @@ import { Mastodon, Slack, X, -} from '#Icons/Social'; -import type { LinkLike } from '#types'; +} from '#ui/Icons/Social'; +import type { LinkLike } from '#ui/types'; import styles from './index.module.css'; diff --git a/packages/ui-components/Containers/MetaBar/index.stories.tsx b/packages/ui-components/Containers/MetaBar/index.stories.tsx index e0baecddfe483..513d8a27267d2 100644 --- a/packages/ui-components/Containers/MetaBar/index.stories.tsx +++ b/packages/ui-components/Containers/MetaBar/index.stories.tsx @@ -1,8 +1,8 @@ import { CodeBracketIcon } from '@heroicons/react/24/outline'; import type { Meta as MetaObj, StoryObj } from '@storybook/react'; -import MetaBar from '#Containers/MetaBar'; -import GitHubIcon from '#Icons/Social/GitHub'; +import MetaBar from '#ui/Containers/MetaBar'; +import GitHubIcon from '#ui/Icons/Social/GitHub'; type Story = StoryObj; type Meta = MetaObj; diff --git a/packages/ui-components/Containers/MetaBar/index.tsx b/packages/ui-components/Containers/MetaBar/index.tsx index f351b79b6483b..ad1e4cf4eda78 100644 --- a/packages/ui-components/Containers/MetaBar/index.tsx +++ b/packages/ui-components/Containers/MetaBar/index.tsx @@ -2,7 +2,7 @@ import type { Heading } from '@vcarl/remark-headings'; import { Fragment, useMemo } from 'react'; import type { FC } from 'react'; -import type { LinkLike } from '#types'; +import type { LinkLike } from '#ui/types'; import styles from './index.module.css'; diff --git a/packages/ui-components/Containers/NavBar/NavItem/index.stories.tsx b/packages/ui-components/Containers/NavBar/NavItem/index.stories.tsx index f08457f5fb141..9c819254f3973 100644 --- a/packages/ui-components/Containers/NavBar/NavItem/index.stories.tsx +++ b/packages/ui-components/Containers/NavBar/NavItem/index.stories.tsx @@ -1,6 +1,6 @@ import type { Meta as MetaObj, StoryObj } from '@storybook/react'; -import NavItem from '#Containers/NavBar/NavItem'; +import NavItem from '#ui/Containers/NavBar/NavItem'; type Story = StoryObj; type Meta = MetaObj; diff --git a/packages/ui-components/Containers/NavBar/NavItem/index.tsx b/packages/ui-components/Containers/NavBar/NavItem/index.tsx index 91afaced9e26c..74607ce18134d 100644 --- a/packages/ui-components/Containers/NavBar/NavItem/index.tsx +++ b/packages/ui-components/Containers/NavBar/NavItem/index.tsx @@ -2,8 +2,8 @@ import { ArrowUpRightIcon } from '@heroicons/react/24/solid'; import classNames from 'classnames'; import type { FC, HTMLAttributeAnchorTarget, PropsWithChildren } from 'react'; -import BaseActiveLink from '#Common/BaseActiveLink'; -import type { LinkLike } from '#types'; +import BaseActiveLink from '#ui/Common/BaseActiveLink'; +import type { LinkLike } from '#ui/types'; import styles from './index.module.css'; diff --git a/packages/ui-components/Containers/NavBar/index.stories.tsx b/packages/ui-components/Containers/NavBar/index.stories.tsx index 7049df79dfe6d..3a18f73b7a9ae 100644 --- a/packages/ui-components/Containers/NavBar/index.stories.tsx +++ b/packages/ui-components/Containers/NavBar/index.stories.tsx @@ -1,6 +1,6 @@ import type { Meta as MetaObj, StoryObj } from '@storybook/react'; -import NavBar from '#Containers/NavBar'; +import NavBar from '#ui/Containers/NavBar'; type Story = StoryObj; type Meta = MetaObj; diff --git a/packages/ui-components/Containers/NavBar/index.tsx b/packages/ui-components/Containers/NavBar/index.tsx index 0e0aaa3da40e1..1c89566be1c42 100644 --- a/packages/ui-components/Containers/NavBar/index.tsx +++ b/packages/ui-components/Containers/NavBar/index.tsx @@ -12,8 +12,8 @@ import type { ElementType, } from 'react'; -import NavItem from '#Containers/NavBar/NavItem'; -import type { FormattedMessage, LinkLike } from '#types'; +import NavItem from '#ui/Containers/NavBar/NavItem'; +import type { FormattedMessage, LinkLike } from '#ui/types'; import style from './index.module.css'; diff --git a/packages/ui-components/Containers/Sidebar/SidebarGroup/index.stories.tsx b/packages/ui-components/Containers/Sidebar/SidebarGroup/index.stories.tsx index 314e5218bf486..9bbd1dc8c64ad 100644 --- a/packages/ui-components/Containers/Sidebar/SidebarGroup/index.stories.tsx +++ b/packages/ui-components/Containers/Sidebar/SidebarGroup/index.stories.tsx @@ -1,6 +1,6 @@ import type { Meta as MetaObj, StoryObj } from '@storybook/react'; -import SidebarGroup from '#Containers/Sidebar/SidebarGroup'; +import SidebarGroup from '#ui/Containers/Sidebar/SidebarGroup'; type Story = StoryObj; type Meta = MetaObj; diff --git a/packages/ui-components/Containers/Sidebar/SidebarGroup/index.tsx b/packages/ui-components/Containers/Sidebar/SidebarGroup/index.tsx index 3c2b041f395f1..821c3865eb9a2 100644 --- a/packages/ui-components/Containers/Sidebar/SidebarGroup/index.tsx +++ b/packages/ui-components/Containers/Sidebar/SidebarGroup/index.tsx @@ -1,7 +1,7 @@ import type { ComponentProps, FC } from 'react'; -import SidebarItem from '#Containers/Sidebar/SidebarItem'; -import type { FormattedMessage, LinkLike } from '#types'; +import SidebarItem from '#ui/Containers/Sidebar/SidebarItem'; +import type { FormattedMessage, LinkLike } from '#ui/types'; import styles from './index.module.css'; diff --git a/packages/ui-components/Containers/Sidebar/SidebarItem/index.stories.tsx b/packages/ui-components/Containers/Sidebar/SidebarItem/index.stories.tsx index 30109f83621ad..cceee0d5ddf6c 100644 --- a/packages/ui-components/Containers/Sidebar/SidebarItem/index.stories.tsx +++ b/packages/ui-components/Containers/Sidebar/SidebarItem/index.stories.tsx @@ -1,6 +1,6 @@ import type { Meta as MetaObj, StoryObj } from '@storybook/react'; -import SidebarItem from '#Containers/Sidebar/SidebarItem'; +import SidebarItem from '#ui/Containers/Sidebar/SidebarItem'; type Story = StoryObj; type Meta = MetaObj; diff --git a/packages/ui-components/Containers/Sidebar/SidebarItem/index.tsx b/packages/ui-components/Containers/Sidebar/SidebarItem/index.tsx index c410f2123d691..a15a370a7b2ce 100644 --- a/packages/ui-components/Containers/Sidebar/SidebarItem/index.tsx +++ b/packages/ui-components/Containers/Sidebar/SidebarItem/index.tsx @@ -1,8 +1,8 @@ import { ArrowUpRightIcon } from '@heroicons/react/24/solid'; import type { FC } from 'react'; -import ActiveLink from '#Common/BaseActiveLink'; -import type { FormattedMessage, LinkLike } from '#types'; +import ActiveLink from '#ui/Common/BaseActiveLink'; +import type { FormattedMessage, LinkLike } from '#ui/types'; import styles from './index.module.css'; diff --git a/packages/ui-components/Containers/Sidebar/index.stories.tsx b/packages/ui-components/Containers/Sidebar/index.stories.tsx index 090d80a00ed1b..2443bf5b7d040 100644 --- a/packages/ui-components/Containers/Sidebar/index.stories.tsx +++ b/packages/ui-components/Containers/Sidebar/index.stories.tsx @@ -1,6 +1,6 @@ import type { Meta as MetaObj, StoryObj } from '@storybook/react'; -import Sidebar from '#Containers/Sidebar'; +import Sidebar from '#ui/Containers/Sidebar'; type Story = StoryObj; type Meta = MetaObj; diff --git a/packages/ui-components/Containers/Sidebar/index.tsx b/packages/ui-components/Containers/Sidebar/index.tsx index b724e65cc93d4..8806b98e3525d 100644 --- a/packages/ui-components/Containers/Sidebar/index.tsx +++ b/packages/ui-components/Containers/Sidebar/index.tsx @@ -1,8 +1,8 @@ import type { ComponentProps, FC } from 'react'; -import Select from '#Common/Select'; -import SidebarGroup from '#Containers/Sidebar/SidebarGroup'; -import type { LinkLike } from '#types'; +import Select from '#ui/Common/Select'; +import SidebarGroup from '#ui/Containers/Sidebar/SidebarGroup'; +import type { LinkLike } from '#ui/types'; import styles from './index.module.css'; diff --git a/packages/ui-components/Icons/HexagonGrid.stories.tsx b/packages/ui-components/Icons/HexagonGrid.stories.tsx index 0f047f58a2a83..ecc0be09b73d2 100644 --- a/packages/ui-components/Icons/HexagonGrid.stories.tsx +++ b/packages/ui-components/Icons/HexagonGrid.stories.tsx @@ -1,6 +1,6 @@ import type { Meta as MetaObj, StoryObj } from '@storybook/react'; -import HexagonGrid from '#Icons/HexagonGrid'; +import HexagonGrid from '#ui/Icons/HexagonGrid'; type Story = StoryObj; type Meta = MetaObj; diff --git a/packages/ui-components/Icons/InstallationMethod/index.ts b/packages/ui-components/Icons/InstallationMethod/index.ts index 9691770e358ed..ef8fbe9f60805 100644 --- a/packages/ui-components/Icons/InstallationMethod/index.ts +++ b/packages/ui-components/Icons/InstallationMethod/index.ts @@ -1,10 +1,10 @@ -import Choco from '#Icons/InstallationMethod/Choco'; -import Devbox from '#Icons/InstallationMethod/Devbox'; -import Docker from '#Icons/InstallationMethod/Docker'; -import FNM from '#Icons/InstallationMethod/FNM'; -import Homebrew from '#Icons/InstallationMethod/Homebrew'; -import N from '#Icons/InstallationMethod/N'; -import NVM from '#Icons/InstallationMethod/NVM'; -import Volta from '#Icons/InstallationMethod/Volta'; +import Choco from '#ui/Icons/InstallationMethod/Choco'; +import Devbox from '#ui/Icons/InstallationMethod/Devbox'; +import Docker from '#ui/Icons/InstallationMethod/Docker'; +import FNM from '#ui/Icons/InstallationMethod/FNM'; +import Homebrew from '#ui/Icons/InstallationMethod/Homebrew'; +import N from '#ui/Icons/InstallationMethod/N'; +import NVM from '#ui/Icons/InstallationMethod/NVM'; +import Volta from '#ui/Icons/InstallationMethod/Volta'; export { Choco, Devbox, Docker, FNM, Homebrew, N, NVM, Volta }; diff --git a/packages/ui-components/Icons/Logos/JsWhite.tsx b/packages/ui-components/Icons/Logos/JsWhite.tsx index 1d9aab1640cc8..76e8894b2df88 100644 --- a/packages/ui-components/Icons/Logos/JsWhite.tsx +++ b/packages/ui-components/Icons/Logos/JsWhite.tsx @@ -1,6 +1,6 @@ import type { FC } from 'react'; -import type { TailwindSVG } from '#types'; +import type { TailwindSVG } from '#ui/types'; const JsWhiteIcon: FC = props => ( & { variant?: LogoVariant; diff --git a/packages/ui-components/Icons/Logos/index.ts b/packages/ui-components/Icons/Logos/index.ts index 4a84f91491474..d2762bf43e66e 100644 --- a/packages/ui-components/Icons/Logos/index.ts +++ b/packages/ui-components/Icons/Logos/index.ts @@ -1,10 +1,10 @@ -import JsGreen from '#Icons/Logos/JsGreen'; -import JsWhite from '#Icons/Logos/JsWhite'; -import Nodejs from '#Icons/Logos/Nodejs'; -import NodejsStackedBlack from '#Icons/Logos/NodejsStackedBlack'; -import NodejsStackedDark from '#Icons/Logos/NodejsStackedDark'; -import NodejsStackedLight from '#Icons/Logos/NodejsStackedLight'; -import NodejsStackedWhite from '#Icons/Logos/NodejsStackedWhite'; +import JsGreen from '#ui/Icons/Logos/JsGreen'; +import JsWhite from '#ui/Icons/Logos/JsWhite'; +import Nodejs from '#ui/Icons/Logos/Nodejs'; +import NodejsStackedBlack from '#ui/Icons/Logos/NodejsStackedBlack'; +import NodejsStackedDark from '#ui/Icons/Logos/NodejsStackedDark'; +import NodejsStackedLight from '#ui/Icons/Logos/NodejsStackedLight'; +import NodejsStackedWhite from '#ui/Icons/Logos/NodejsStackedWhite'; export { JsGreen, diff --git a/packages/ui-components/Icons/OperatingSystem/index.ts b/packages/ui-components/Icons/OperatingSystem/index.ts index 77cd057d4e297..775fb3c8f32c5 100644 --- a/packages/ui-components/Icons/OperatingSystem/index.ts +++ b/packages/ui-components/Icons/OperatingSystem/index.ts @@ -1,6 +1,6 @@ -import AIX from '#Icons/OperatingSystem/AIX'; -import Apple from '#Icons/OperatingSystem/Apple'; -import Linux from '#Icons/OperatingSystem/Linux'; -import Microsoft from '#Icons/OperatingSystem/Microsoft'; +import AIX from '#ui/Icons/OperatingSystem/AIX'; +import Apple from '#ui/Icons/OperatingSystem/Apple'; +import Linux from '#ui/Icons/OperatingSystem/Linux'; +import Microsoft from '#ui/Icons/OperatingSystem/Microsoft'; export { AIX, Apple, Linux, Microsoft }; diff --git a/packages/ui-components/Icons/PackageManager/index.ts b/packages/ui-components/Icons/PackageManager/index.ts index 9d8580500d091..554428be9e02f 100644 --- a/packages/ui-components/Icons/PackageManager/index.ts +++ b/packages/ui-components/Icons/PackageManager/index.ts @@ -1,5 +1,5 @@ -import NPM from '#Icons/PackageManager/Npm'; -import PNPM from '#Icons/PackageManager/Pnpm'; -import YARN from '#Icons/PackageManager/Yarn'; +import NPM from '#ui/Icons/PackageManager/Npm'; +import PNPM from '#ui/Icons/PackageManager/Pnpm'; +import YARN from '#ui/Icons/PackageManager/Yarn'; export { NPM, PNPM, YARN }; diff --git a/packages/ui-components/Icons/Social/index.ts b/packages/ui-components/Icons/Social/index.ts index 38ca462fe0006..da4edf3064faf 100644 --- a/packages/ui-components/Icons/Social/index.ts +++ b/packages/ui-components/Icons/Social/index.ts @@ -1,9 +1,9 @@ -import Bluesky from '#Icons/Social/Bluesky'; -import Discord from '#Icons/Social/Discord'; -import GitHub from '#Icons/Social/GitHub'; -import LinkedIn from '#Icons/Social/LinkedIn'; -import Mastodon from '#Icons/Social/Mastodon'; -import Slack from '#Icons/Social/Slack'; -import X from '#Icons/Social/X'; +import Bluesky from '#ui/Icons/Social/Bluesky'; +import Discord from '#ui/Icons/Social/Discord'; +import GitHub from '#ui/Icons/Social/GitHub'; +import LinkedIn from '#ui/Icons/Social/LinkedIn'; +import Mastodon from '#ui/Icons/Social/Mastodon'; +import Slack from '#ui/Icons/Social/Slack'; +import X from '#ui/Icons/Social/X'; export { Bluesky, Discord, GitHub, LinkedIn, Mastodon, Slack, X }; diff --git a/packages/ui-components/__design__/node-logos.stories.tsx b/packages/ui-components/__design__/node-logos.stories.tsx index 6d4ce80ca5a74..543538c03f6cc 100644 --- a/packages/ui-components/__design__/node-logos.stories.tsx +++ b/packages/ui-components/__design__/node-logos.stories.tsx @@ -8,7 +8,7 @@ import { NodejsStackedDark, NodejsStackedLight, NodejsStackedWhite, -} from '#Icons/Logos'; +} from '#ui/Icons/Logos'; export const HorizontalLogo: StoryObj = { render: () => , diff --git a/packages/ui-components/__design__/platform-logos.stories.tsx b/packages/ui-components/__design__/platform-logos.stories.tsx index f22a4cc1fa880..541e7c4830f85 100644 --- a/packages/ui-components/__design__/platform-logos.stories.tsx +++ b/packages/ui-components/__design__/platform-logos.stories.tsx @@ -8,8 +8,8 @@ import { Choco, N, Volta, -} from '#Icons/InstallationMethod'; -import { Apple, Linux, Microsoft, AIX } from '#Icons/OperatingSystem'; +} from '#ui/Icons/InstallationMethod'; +import { Apple, Linux, Microsoft, AIX } from '#ui/Icons/OperatingSystem'; const osIcons = [Apple, Linux, Microsoft, AIX]; const installMethodIcons = [Docker, Homebrew, NVM, Devbox, Choco, N, Volta]; diff --git a/packages/ui-components/__design__/social-logos.stories.tsx b/packages/ui-components/__design__/social-logos.stories.tsx index ca492738e0bc0..f610752e2730c 100644 --- a/packages/ui-components/__design__/social-logos.stories.tsx +++ b/packages/ui-components/__design__/social-logos.stories.tsx @@ -8,7 +8,7 @@ import { Mastodon, Slack, X, -} from '#Icons/Social'; +} from '#ui/Icons/Social'; const socialIcons = [ [GitHub, Mastodon, LinkedIn], diff --git a/packages/ui-components/package.json b/packages/ui-components/package.json index 3ad403e21ea8c..ea4952e3d4738 100644 --- a/packages/ui-components/package.json +++ b/packages/ui-components/package.json @@ -77,7 +77,7 @@ "typescript-eslint": "~8.31.1" }, "imports": { - "#*": [ + "#ui/*": [ "./*", "./*.tsx", "./*/index.tsx",