diff --git a/src/app/.gitkeep b/app/.gitkeep similarity index 100% rename from src/app/.gitkeep rename to app/.gitkeep diff --git a/src/app/api/auth/[auth0]/route.ts b/app/api/auth/[auth0]/route.ts similarity index 100% rename from src/app/api/auth/[auth0]/route.ts rename to app/api/auth/[auth0]/route.ts diff --git a/src/app/game/configure/page.tsx b/app/game/configure/page.tsx similarity index 100% rename from src/app/game/configure/page.tsx rename to app/game/configure/page.tsx diff --git a/src/app/game/layout.tsx b/app/game/layout.tsx similarity index 69% rename from src/app/game/layout.tsx rename to app/game/layout.tsx index 2c23927..f5d6f32 100644 --- a/src/app/game/layout.tsx +++ b/app/game/layout.tsx @@ -1,4 +1,4 @@ -import { GameModeLayout } from '@/shared/layout/game-mode-layout'; +import { GameModeLayout } from '@/widget/layout'; export default function Layout({ children, diff --git a/src/app/game/page.tsx b/app/game/page.tsx similarity index 100% rename from src/app/game/page.tsx rename to app/game/page.tsx diff --git a/src/app/game/play/page.tsx b/app/game/play/page.tsx similarity index 100% rename from src/app/game/play/page.tsx rename to app/game/play/page.tsx diff --git a/src/app/game/result/page.tsx b/app/game/result/page.tsx similarity index 100% rename from src/app/game/result/page.tsx rename to app/game/result/page.tsx diff --git a/src/app/layout.tsx b/app/layout.tsx similarity index 74% rename from src/app/layout.tsx rename to app/layout.tsx index d1e00ae..6372fd4 100644 --- a/src/app/layout.tsx +++ b/app/layout.tsx @@ -1,7 +1,7 @@ -import { Auth0Provider } from '@/shared/libs/auth0/provider'; -import { JotaiProvider } from '@/shared/libs/jotai/provider'; +import '@/application/globals.css'; +import { Auth0Provider } from '@/shared/libs/auth0'; +import { JotaiProvider } from '@/shared/libs/jotai'; import type { Metadata } from 'next'; -import './globals.css'; export const metadata: Metadata = { title: 'Create Next App', diff --git a/src/app/page.tsx b/app/page.tsx similarity index 100% rename from src/app/page.tsx rename to app/page.tsx diff --git a/biome.json b/biome.json index 9e1ac1b..b16bc7a 100644 --- a/biome.json +++ b/biome.json @@ -71,7 +71,7 @@ }, "overrides": [ { - "include": ["src/shared/libs/gql-codegen/generated/"], + "include": ["src/shared/libs/gql-codegen/api/generated/"], "linter": { "rules": { "suspicious": { @@ -84,7 +84,7 @@ } }, { - "include": ["src/shared/libs/pathpida/$path.ts"], + "include": ["src/shared/libs/pathpida/lib/$path.ts"], "linter": { "rules": { "style": { diff --git a/src/middleware.ts b/middleware.ts similarity index 100% rename from src/middleware.ts rename to middleware.ts diff --git a/package.json b/package.json index d580093..78509b8 100644 --- a/package.json +++ b/package.json @@ -5,8 +5,8 @@ "scripts": { "dev": "run-p dev:*", "dev:next": "next dev", - "dev:path": "pathpida --ignorePath .gitignore --output ./src/shared/libs/pathpida --watch", - "build": "pathpida --ignorePath .gitignore --output ./src/shared/libs/pathpida && next build", + "dev:path": "pathpida --ignorePath .gitignore --output ./src/shared/libs/pathpida/lib --watch", + "build": "pathpida --ignorePath .gitignore --output ./src/shared/libs/pathpida/lib && next build", "start": "next start", "test": "vitest run", "test:watch": "vitest watch", @@ -18,7 +18,7 @@ "typecheck": "tsc --noEmit", "lefthook:sync": "lefthook install", "add:component": "bunx shadcn-ui@latest add", - "gql:codegen": "graphql-codegen --config ./src/shared/libs/gql-codegen/config.ts && bun format:fix && bun lint:fix" + "gql:codegen": "graphql-codegen --config ./src/shared/libs/gql-codegen/api/config.ts && bun format:fix && bun lint:fix" }, "dependencies": { "@auth0/nextjs-auth0": "^3.5.0", diff --git a/src/app/favicon.ico b/src/app/favicon.ico deleted file mode 100644 index 718d6fe..0000000 Binary files a/src/app/favicon.ico and /dev/null differ diff --git a/src/application/.gitkeep b/src/application/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/src/app/globals.css b/src/application/globals.css similarity index 100% rename from src/app/globals.css rename to src/application/globals.css diff --git a/src/entitie/dartsboard/stores/atoms.ts b/src/entitie/dartsboard/stores/atoms.ts index 2eb89a9..e43df72 100644 --- a/src/entitie/dartsboard/stores/atoms.ts +++ b/src/entitie/dartsboard/stores/atoms.ts @@ -1,4 +1,4 @@ -import type { Darts_Positions } from '@/shared/libs/gql-codegen/generated/graphql'; +import type { Darts_Positions } from '@/shared/libs/gql-codegen/api/generated/graphql'; import { atom } from 'jotai'; export type ConnectStatus = 'disconnected' | 'connecting' | 'connected'; diff --git a/src/page/game-configure/index.ts b/src/page/game-configure/index.ts new file mode 100644 index 0000000..1075087 --- /dev/null +++ b/src/page/game-configure/index.ts @@ -0,0 +1,2 @@ +export * from './ui'; +export { default } from './ui'; diff --git a/src/page/game-configure/ui/difficulty-selector-tabs/difficulty-selector-tabs.tsx b/src/page/game-configure/ui/difficulty-selector-tabs/difficulty-selector-tabs.tsx index 79ca2c5..1f756c5 100644 --- a/src/page/game-configure/ui/difficulty-selector-tabs/difficulty-selector-tabs.tsx +++ b/src/page/game-configure/ui/difficulty-selector-tabs/difficulty-selector-tabs.tsx @@ -3,7 +3,7 @@ import * as TabsPrimitive from '@radix-ui/react-tabs'; import * as React from 'react'; -import { cn } from '@/shared/libs/shadcn/utils'; +import { cn } from '@/shared/libs/shadcn'; import { Typography } from '@/shared/ui/typography'; const DifficultySelectorTabs = TabsPrimitive.Root; diff --git a/src/page/game-configure/ui/index.ts b/src/page/game-configure/ui/index.ts new file mode 100644 index 0000000..42f7552 --- /dev/null +++ b/src/page/game-configure/ui/index.ts @@ -0,0 +1,2 @@ +export * from './screen'; +export { default } from './screen'; diff --git a/src/page/game-configure/ui/screen/index.ts b/src/page/game-configure/ui/screen/index.ts new file mode 100644 index 0000000..42f7552 --- /dev/null +++ b/src/page/game-configure/ui/screen/index.ts @@ -0,0 +1,2 @@ +export * from './screen'; +export { default } from './screen'; diff --git a/src/page/game-configure/index.tsx b/src/page/game-configure/ui/screen/screen.tsx similarity index 95% rename from src/page/game-configure/index.tsx rename to src/page/game-configure/ui/screen/screen.tsx index a9372a1..47cf011 100644 --- a/src/page/game-configure/index.tsx +++ b/src/page/game-configure/ui/screen/screen.tsx @@ -1,9 +1,9 @@ 'use client'; -import { pagesPath } from '@/shared/libs/pathpida/$path'; +import { pagesPath } from '@/shared/libs/pathpida'; import { Button } from '@/shared/ui/button'; import { Typography } from '@/shared/ui/typography'; -import { GameHeader } from '@/widget/game-header'; +import { GameHeader } from '@/widget/ui/game-header'; import { HomeIcon, MenuIcon } from 'lucide-react'; import Link from 'next/link'; import { useSearchParams } from 'next/navigation'; @@ -12,7 +12,7 @@ import { DifficultySelectorTabs, DifficultySelectorTabsList, DifficultySelectorTabsTrigger, -} from './ui/difficulty-selector-tabs'; +} from '../difficulty-selector-tabs'; export type Query = { game_name: 'target-bull' | 'cr-number'; diff --git a/src/page/game-home/index.ts b/src/page/game-home/index.ts new file mode 100644 index 0000000..1075087 --- /dev/null +++ b/src/page/game-home/index.ts @@ -0,0 +1,2 @@ +export * from './ui'; +export { default } from './ui'; diff --git a/src/page/game-home/ui/index.ts b/src/page/game-home/ui/index.ts new file mode 100644 index 0000000..42f7552 --- /dev/null +++ b/src/page/game-home/ui/index.ts @@ -0,0 +1,2 @@ +export * from './screen'; +export { default } from './screen'; diff --git a/src/page/game-home/ui/screen/index.ts b/src/page/game-home/ui/screen/index.ts new file mode 100644 index 0000000..42f7552 --- /dev/null +++ b/src/page/game-home/ui/screen/index.ts @@ -0,0 +1,2 @@ +export * from './screen'; +export { default } from './screen'; diff --git a/src/page/game-home/index.tsx b/src/page/game-home/ui/screen/screen.tsx similarity index 96% rename from src/page/game-home/index.tsx rename to src/page/game-home/ui/screen/screen.tsx index f9a6e15..a00436c 100644 --- a/src/page/game-home/index.tsx +++ b/src/page/game-home/ui/screen/screen.tsx @@ -1,10 +1,10 @@ 'use client'; import { useConnectDartsliveHome } from '@/entitie/dartsboard/hooks/use-connect-dartslive-home'; -import { pagesPath } from '@/shared/libs/pathpida/$path'; +import { pagesPath } from '@/shared/libs/pathpida'; import { Button } from '@/shared/ui/button'; import { Typography } from '@/shared/ui/typography'; -import { GameHeader } from '@/widget/game-header'; +import { GameHeader } from '@/widget/ui/game-header'; import { BluetoothIcon, BluetoothOffIcon, diff --git a/src/page/game-play/index.ts b/src/page/game-play/index.ts new file mode 100644 index 0000000..1075087 --- /dev/null +++ b/src/page/game-play/index.ts @@ -0,0 +1,2 @@ +export * from './ui'; +export { default } from './ui'; diff --git a/src/page/game-play/ui/index.ts b/src/page/game-play/ui/index.ts new file mode 100644 index 0000000..42f7552 --- /dev/null +++ b/src/page/game-play/ui/index.ts @@ -0,0 +1,2 @@ +export * from './screen'; +export { default } from './screen'; diff --git a/src/page/game-play/ui/screen/index.ts b/src/page/game-play/ui/screen/index.ts new file mode 100644 index 0000000..42f7552 --- /dev/null +++ b/src/page/game-play/ui/screen/index.ts @@ -0,0 +1,2 @@ +export * from './screen'; +export { default } from './screen'; diff --git a/src/page/game-play/index.tsx b/src/page/game-play/ui/screen/screen.tsx similarity index 99% rename from src/page/game-play/index.tsx rename to src/page/game-play/ui/screen/screen.tsx index ecac123..5aec040 100644 --- a/src/page/game-play/index.tsx +++ b/src/page/game-play/ui/screen/screen.tsx @@ -1,7 +1,7 @@ 'use client'; import { useConnectDartsliveHome } from '@/entitie/dartsboard/hooks/use-connect-dartslive-home'; -import { pagesPath } from '@/shared/libs/pathpida/$path'; +import { pagesPath } from '@/shared/libs/pathpida'; import { Button } from '@/shared/ui/button'; import { ScrollArea } from '@/shared/ui/scroll-area'; import { Separator } from '@/shared/ui/separator'; diff --git a/src/page/game-result/index.ts b/src/page/game-result/index.ts new file mode 100644 index 0000000..1075087 --- /dev/null +++ b/src/page/game-result/index.ts @@ -0,0 +1,2 @@ +export * from './ui'; +export { default } from './ui'; diff --git a/src/page/game-result/ui/index.ts b/src/page/game-result/ui/index.ts new file mode 100644 index 0000000..42f7552 --- /dev/null +++ b/src/page/game-result/ui/index.ts @@ -0,0 +1,2 @@ +export * from './screen'; +export { default } from './screen'; diff --git a/src/page/game-result/ui/screen/index.ts b/src/page/game-result/ui/screen/index.ts new file mode 100644 index 0000000..42f7552 --- /dev/null +++ b/src/page/game-result/ui/screen/index.ts @@ -0,0 +1,2 @@ +export * from './screen'; +export { default } from './screen'; diff --git a/src/page/game-result/index.tsx b/src/page/game-result/ui/screen/screen.tsx similarity index 96% rename from src/page/game-result/index.tsx rename to src/page/game-result/ui/screen/screen.tsx index 212a87f..6d72958 100644 --- a/src/page/game-result/index.tsx +++ b/src/page/game-result/ui/screen/screen.tsx @@ -1,10 +1,10 @@ 'use client'; import { useConnectDartsliveHome } from '@/entitie/dartsboard/hooks/use-connect-dartslive-home'; -import { pagesPath } from '@/shared/libs/pathpida/$path'; +import { pagesPath } from '@/shared/libs/pathpida'; import { Button } from '@/shared/ui/button'; import { Typography } from '@/shared/ui/typography'; -import { GameHeader } from '@/widget/game-header'; +import { GameHeader } from '@/widget/ui/game-header'; import { HomeIcon, MenuIcon, RotateCcwIcon } from 'lucide-react'; import Link from 'next/link'; import { useMemo } from 'react'; diff --git a/src/page/home/index.ts b/src/page/home/index.ts new file mode 100644 index 0000000..1075087 --- /dev/null +++ b/src/page/home/index.ts @@ -0,0 +1,2 @@ +export * from './ui'; +export { default } from './ui'; diff --git a/src/page/home/ui/demo/date-range-picker.tsx b/src/page/home/ui/demo/date-range-picker.tsx index f99450b..165f39c 100644 --- a/src/page/home/ui/demo/date-range-picker.tsx +++ b/src/page/home/ui/demo/date-range-picker.tsx @@ -1,6 +1,6 @@ 'use client'; -import { cn } from '@/shared/libs/shadcn/utils'; +import { cn } from '@/shared/libs/shadcn'; import { Button } from '@/shared/ui/button'; import { Calendar } from '@/shared/ui/calendar'; import { Popover, PopoverContent, PopoverTrigger } from '@/shared/ui/popover'; diff --git a/src/page/home/ui/demo/game-play-statistics-chart.tsx b/src/page/home/ui/demo/game-play-statistics-chart.tsx index c39e5fc..520aff0 100644 --- a/src/page/home/ui/demo/game-play-statistics-chart.tsx +++ b/src/page/home/ui/demo/game-play-statistics-chart.tsx @@ -1,4 +1,4 @@ -import { ApexchartsBase } from '@/shared/libs/apexcharts/apexcharts-base'; +import { ApexchartsBase } from '@/shared/libs/apexcharts'; import { format } from '@formkit/tempo'; import type { FC } from 'react'; diff --git a/src/page/home/ui/demo/main-nav.tsx b/src/page/home/ui/demo/main-nav.tsx index fc6d969..eae28c9 100644 --- a/src/page/home/ui/demo/main-nav.tsx +++ b/src/page/home/ui/demo/main-nav.tsx @@ -1,4 +1,4 @@ -import { cn } from '@/shared/libs/shadcn/utils'; +import { cn } from '@/shared/libs/shadcn'; import Link from 'next/link'; export function MainNav({ diff --git a/src/page/home/ui/demo/recent-30-days-mpr.tsx b/src/page/home/ui/demo/recent-30-days-mpr.tsx index 3ebaf4b..7f82057 100644 --- a/src/page/home/ui/demo/recent-30-days-mpr.tsx +++ b/src/page/home/ui/demo/recent-30-days-mpr.tsx @@ -1,4 +1,4 @@ -import { ApexchartsBase } from '@/shared/libs/apexcharts/apexcharts-base'; +import { ApexchartsBase } from '@/shared/libs/apexcharts'; import { format } from '@formkit/tempo'; import type { FC } from 'react'; diff --git a/src/page/home/ui/demo/recent-30-days-ppr.tsx b/src/page/home/ui/demo/recent-30-days-ppr.tsx index d5a105f..ce73c88 100644 --- a/src/page/home/ui/demo/recent-30-days-ppr.tsx +++ b/src/page/home/ui/demo/recent-30-days-ppr.tsx @@ -1,4 +1,4 @@ -import { ApexchartsBase } from '@/shared/libs/apexcharts/apexcharts-base'; +import { ApexchartsBase } from '@/shared/libs/apexcharts'; import { format } from '@formkit/tempo'; import type { FC } from 'react'; diff --git a/src/page/home/ui/demo/recent-30-days-rating.tsx b/src/page/home/ui/demo/recent-30-days-rating.tsx index 19bfb7a..a5ee865 100644 --- a/src/page/home/ui/demo/recent-30-days-rating.tsx +++ b/src/page/home/ui/demo/recent-30-days-rating.tsx @@ -1,4 +1,4 @@ -import { ApexchartsBase } from '@/shared/libs/apexcharts/apexcharts-base'; +import { ApexchartsBase } from '@/shared/libs/apexcharts'; import { format } from '@formkit/tempo'; import type { FC } from 'react'; diff --git a/src/page/home/ui/demo/team-switcher.tsx b/src/page/home/ui/demo/team-switcher.tsx index 823c8dd..4ec1b01 100644 --- a/src/page/home/ui/demo/team-switcher.tsx +++ b/src/page/home/ui/demo/team-switcher.tsx @@ -1,6 +1,6 @@ 'use client'; -import { cn } from '@/shared/libs/shadcn/utils'; +import { cn } from '@/shared/libs/shadcn'; import { Avatar, AvatarFallback, AvatarImage } from '@/shared/ui/avatar'; import { Button } from '@/shared/ui/button'; import { diff --git a/src/page/home/ui/index.ts b/src/page/home/ui/index.ts new file mode 100644 index 0000000..42f7552 --- /dev/null +++ b/src/page/home/ui/index.ts @@ -0,0 +1,2 @@ +export * from './screen'; +export { default } from './screen'; diff --git a/src/page/home/ui/rating-charts/rating-charts.tsx b/src/page/home/ui/rating-charts/rating-charts.tsx index bd19e35..4ef8ab0 100644 --- a/src/page/home/ui/rating-charts/rating-charts.tsx +++ b/src/page/home/ui/rating-charts/rating-charts.tsx @@ -1,5 +1,5 @@ -import { ApexchartsBase } from '@/shared/libs/apexcharts/apexcharts-base'; -import { cn } from '@/shared/libs/shadcn/utils'; +import { ApexchartsBase } from '@/shared/libs/apexcharts'; +import { cn } from '@/shared/libs/shadcn'; import { Typography } from '@/shared/ui/typography'; import { ChevronDownIcon, ChevronUpIcon } from 'lucide-react'; import type { FC } from 'react'; diff --git a/src/page/home/ui/screen/index.ts b/src/page/home/ui/screen/index.ts new file mode 100644 index 0000000..42f7552 --- /dev/null +++ b/src/page/home/ui/screen/index.ts @@ -0,0 +1,2 @@ +export * from './screen'; +export { default } from './screen'; diff --git a/src/page/home/index.tsx b/src/page/home/ui/screen/screen.tsx similarity index 93% rename from src/page/home/index.tsx rename to src/page/home/ui/screen/screen.tsx index 03e5319..c9a122c 100644 --- a/src/page/home/index.tsx +++ b/src/page/home/ui/screen/screen.tsx @@ -1,12 +1,12 @@ -import { pagesPath } from '@/shared/libs/pathpida/$path'; +import { pagesPath } from '@/shared/libs/pathpida'; import { Button } from '@/shared/ui/button'; import { Card, CardContent, CardHeader, CardTitle } from '@/shared/ui/card'; import { Tabs, TabsContent, TabsList, TabsTrigger } from '@/shared/ui/tabs'; import Link from 'next/link'; -import { GamePlayStatisticsChart } from './ui/demo/game-play-statistics-chart'; -import { Recent30DaysMPR } from './ui/demo/recent-30-days-mpr'; -import { Recent30DaysPPR } from './ui/demo/recent-30-days-ppr'; -import { Recent30DaysRating } from './ui/demo/recent-30-days-rating'; +import { GamePlayStatisticsChart } from '../demo/game-play-statistics-chart'; +import { Recent30DaysMPR } from '../demo/recent-30-days-mpr'; +import { Recent30DaysPPR } from '../demo/recent-30-days-ppr'; +import { Recent30DaysRating } from '../demo/recent-30-days-rating'; export default function Home() { return ( diff --git a/src/shared/libs/apexcharts/index.ts b/src/shared/libs/apexcharts/index.ts new file mode 100644 index 0000000..5ecdd1f --- /dev/null +++ b/src/shared/libs/apexcharts/index.ts @@ -0,0 +1 @@ +export * from './ui'; diff --git a/src/shared/libs/apexcharts/apexcharts-base.tsx b/src/shared/libs/apexcharts/ui/apexcharts-base.tsx similarity index 73% rename from src/shared/libs/apexcharts/apexcharts-base.tsx rename to src/shared/libs/apexcharts/ui/apexcharts-base.tsx index ffe25a6..18b1923 100644 --- a/src/shared/libs/apexcharts/apexcharts-base.tsx +++ b/src/shared/libs/apexcharts/ui/apexcharts-base.tsx @@ -1,11 +1,12 @@ 'use client'; import dynamic from 'next/dynamic'; - +import type { FC } from 'react'; import type { Props as ApexChartsProps } from 'react-apexcharts'; + const ApexCharts = dynamic(() => import('react-apexcharts'), { ssr: false }); -export const ApexchartsBase = (props: ApexChartsProps) => { +export const ApexchartsBase: FC = props => { return ( <> diff --git a/src/shared/libs/apexcharts/ui/index.ts b/src/shared/libs/apexcharts/ui/index.ts new file mode 100644 index 0000000..da71db2 --- /dev/null +++ b/src/shared/libs/apexcharts/ui/index.ts @@ -0,0 +1 @@ +export { ApexchartsBase } from './apexcharts-base'; diff --git a/src/shared/libs/auth0/index.ts b/src/shared/libs/auth0/index.ts new file mode 100644 index 0000000..5ecdd1f --- /dev/null +++ b/src/shared/libs/auth0/index.ts @@ -0,0 +1 @@ +export * from './ui'; diff --git a/src/shared/libs/auth0/ui/index.ts b/src/shared/libs/auth0/ui/index.ts new file mode 100644 index 0000000..526ec05 --- /dev/null +++ b/src/shared/libs/auth0/ui/index.ts @@ -0,0 +1 @@ +export { Auth0Provider } from './provider'; diff --git a/src/shared/libs/auth0/provider.tsx b/src/shared/libs/auth0/ui/provider.tsx similarity index 100% rename from src/shared/libs/auth0/provider.tsx rename to src/shared/libs/auth0/ui/provider.tsx diff --git a/src/shared/libs/gql-codegen/config.ts b/src/shared/libs/gql-codegen/api/config.ts similarity index 91% rename from src/shared/libs/gql-codegen/config.ts rename to src/shared/libs/gql-codegen/api/config.ts index a765706..28ee6ad 100644 --- a/src/shared/libs/gql-codegen/config.ts +++ b/src/shared/libs/gql-codegen/api/config.ts @@ -14,7 +14,7 @@ const config: CodegenConfig = { ], documents: ['src/**/*.tsx', 'src/**/*.ts', 'src/**/*.graphql'], generates: { - 'src/shared/libs/gql-codegen/generated/': { + 'src/shared/libs/gql-codegen/api/generated/': { preset: 'client', config: { gqlTagName: 'graphql', @@ -32,7 +32,7 @@ const config: CodegenConfig = { useTypeImports: true, }, }, - 'src/shared/libs/gql-codegen/generated/sdk.ts': { + 'src/shared/libs/gql-codegen/api/generated/sdk.ts': { plugins: [ { add: { diff --git a/src/shared/libs/gql-codegen/generated/fragment-masking.ts b/src/shared/libs/gql-codegen/api/generated/fragment-masking.ts similarity index 100% rename from src/shared/libs/gql-codegen/generated/fragment-masking.ts rename to src/shared/libs/gql-codegen/api/generated/fragment-masking.ts diff --git a/src/shared/libs/gql-codegen/generated/gql.ts b/src/shared/libs/gql-codegen/api/generated/gql.ts similarity index 100% rename from src/shared/libs/gql-codegen/generated/gql.ts rename to src/shared/libs/gql-codegen/api/generated/gql.ts diff --git a/src/shared/libs/gql-codegen/generated/graphql.ts b/src/shared/libs/gql-codegen/api/generated/graphql.ts similarity index 100% rename from src/shared/libs/gql-codegen/generated/graphql.ts rename to src/shared/libs/gql-codegen/api/generated/graphql.ts diff --git a/src/shared/libs/gql-codegen/generated/index.ts b/src/shared/libs/gql-codegen/api/generated/index.ts similarity index 100% rename from src/shared/libs/gql-codegen/generated/index.ts rename to src/shared/libs/gql-codegen/api/generated/index.ts diff --git a/src/shared/libs/gql-codegen/generated/sdk.ts b/src/shared/libs/gql-codegen/api/generated/sdk.ts similarity index 100% rename from src/shared/libs/gql-codegen/generated/sdk.ts rename to src/shared/libs/gql-codegen/api/generated/sdk.ts diff --git a/src/shared/libs/gql-codegen/graphql-sdk.ts b/src/shared/libs/gql-codegen/api/graphql-sdk.ts similarity index 100% rename from src/shared/libs/gql-codegen/graphql-sdk.ts rename to src/shared/libs/gql-codegen/api/graphql-sdk.ts diff --git a/src/shared/libs/gql-codegen/api/index.ts b/src/shared/libs/gql-codegen/api/index.ts new file mode 100644 index 0000000..e78dba2 --- /dev/null +++ b/src/shared/libs/gql-codegen/api/index.ts @@ -0,0 +1 @@ +export { graphqlSdk } from './graphql-sdk'; diff --git a/src/shared/libs/gql-codegen/index.ts b/src/shared/libs/gql-codegen/index.ts new file mode 100644 index 0000000..b1c13e7 --- /dev/null +++ b/src/shared/libs/gql-codegen/index.ts @@ -0,0 +1 @@ +export * from './api'; diff --git a/src/shared/libs/jotai/index.ts b/src/shared/libs/jotai/index.ts new file mode 100644 index 0000000..5ecdd1f --- /dev/null +++ b/src/shared/libs/jotai/index.ts @@ -0,0 +1 @@ +export * from './ui'; diff --git a/src/shared/libs/jotai/ui/index.ts b/src/shared/libs/jotai/ui/index.ts new file mode 100644 index 0000000..6aa2181 --- /dev/null +++ b/src/shared/libs/jotai/ui/index.ts @@ -0,0 +1 @@ +export { JotaiProvider } from './provider'; diff --git a/src/shared/libs/jotai/provider.tsx b/src/shared/libs/jotai/ui/provider.tsx similarity index 100% rename from src/shared/libs/jotai/provider.tsx rename to src/shared/libs/jotai/ui/provider.tsx diff --git a/src/shared/libs/pathpida/index.ts b/src/shared/libs/pathpida/index.ts new file mode 100644 index 0000000..f41a696 --- /dev/null +++ b/src/shared/libs/pathpida/index.ts @@ -0,0 +1 @@ +export * from './lib'; diff --git a/src/shared/libs/pathpida/$path.ts b/src/shared/libs/pathpida/lib/$path.ts similarity index 80% rename from src/shared/libs/pathpida/$path.ts rename to src/shared/libs/pathpida/lib/$path.ts index f0efc92..44e9a86 100644 --- a/src/shared/libs/pathpida/$path.ts +++ b/src/shared/libs/pathpida/lib/$path.ts @@ -1,5 +1,5 @@ -import type { Query as Query_17iukn9 } from '../../../app/game/configure/page'; -import type { Query as Query_1iv4wk1 } from '../../../app/game/play/page'; +import type { Query as Query_18ddyjz } from '../../../../../app/game/configure/page'; +import type { Query as Query_ibwa07 } from '../../../../../app/game/play/page'; const buildSuffix = (url?: { query?: Record; @@ -15,7 +15,7 @@ const buildSuffix = (url?: { export const pagesPath = { game: { configure: { - $url: (url: { query: Query_17iukn9; hash?: string }) => ({ + $url: (url: { query: Query_18ddyjz; hash?: string }) => ({ pathname: '/game/configure' as const, query: url.query, hash: url.hash, @@ -23,7 +23,7 @@ export const pagesPath = { }), }, play: { - $url: (url: { query: Query_1iv4wk1; hash?: string }) => ({ + $url: (url: { query: Query_ibwa07; hash?: string }) => ({ pathname: '/game/play' as const, query: url.query, hash: url.hash, diff --git a/src/shared/libs/pathpida/lib/index.ts b/src/shared/libs/pathpida/lib/index.ts new file mode 100644 index 0000000..8eb59f4 --- /dev/null +++ b/src/shared/libs/pathpida/lib/index.ts @@ -0,0 +1 @@ +export { pagesPath } from './$path'; diff --git a/src/shared/libs/shadcn/index.ts b/src/shared/libs/shadcn/index.ts new file mode 100644 index 0000000..f41a696 --- /dev/null +++ b/src/shared/libs/shadcn/index.ts @@ -0,0 +1 @@ +export * from './lib'; diff --git a/src/shared/libs/shadcn/utils.test.ts b/src/shared/libs/shadcn/lib/cn.test.ts similarity index 87% rename from src/shared/libs/shadcn/utils.test.ts rename to src/shared/libs/shadcn/lib/cn.test.ts index 98c8fae..34fc69a 100644 --- a/src/shared/libs/shadcn/utils.test.ts +++ b/src/shared/libs/shadcn/lib/cn.test.ts @@ -1,5 +1,5 @@ import { describe, expect, test } from 'vitest'; -import { cn } from './utils'; +import { cn } from './cn'; describe('cn', () => { test('配列を受け取り合成することができる', () => { diff --git a/src/shared/libs/shadcn/utils.ts b/src/shared/libs/shadcn/lib/cn.ts similarity index 100% rename from src/shared/libs/shadcn/utils.ts rename to src/shared/libs/shadcn/lib/cn.ts diff --git a/src/shared/libs/shadcn/lib/index.ts b/src/shared/libs/shadcn/lib/index.ts new file mode 100644 index 0000000..414c24d --- /dev/null +++ b/src/shared/libs/shadcn/lib/index.ts @@ -0,0 +1 @@ +export { cn } from './cn'; diff --git a/src/shared/ui/avatar.tsx b/src/shared/ui/avatar.tsx index 6843459..7b1d588 100644 --- a/src/shared/ui/avatar.tsx +++ b/src/shared/ui/avatar.tsx @@ -3,7 +3,7 @@ import * as AvatarPrimitive from '@radix-ui/react-avatar'; import * as React from 'react'; -import { cn } from '@/shared/libs/shadcn/utils'; +import { cn } from '@/shared/libs/shadcn'; const Avatar = React.forwardRef< React.ElementRef, diff --git a/src/shared/ui/button.tsx b/src/shared/ui/button.tsx index 0d2e27b..c3d40c5 100644 --- a/src/shared/ui/button.tsx +++ b/src/shared/ui/button.tsx @@ -2,7 +2,7 @@ import { Slot } from '@radix-ui/react-slot'; import { type VariantProps, cva } from 'class-variance-authority'; import * as React from 'react'; -import { cn } from '@/shared/libs/shadcn/utils'; +import { cn } from '@/shared/libs/shadcn'; const buttonVariants = cva( 'inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50', diff --git a/src/shared/ui/calendar.tsx b/src/shared/ui/calendar.tsx index a3d0d9a..5936269 100644 --- a/src/shared/ui/calendar.tsx +++ b/src/shared/ui/calendar.tsx @@ -1,6 +1,6 @@ 'use client'; -import { cn } from '@/shared/libs/shadcn/utils'; +import { cn } from '@/shared/libs/shadcn'; import { buttonVariants } from '@/shared/ui/button'; import { ChevronLeft, ChevronRight } from 'lucide-react'; import type * as React from 'react'; diff --git a/src/shared/ui/card.tsx b/src/shared/ui/card.tsx index 94c652d..4c09753 100644 --- a/src/shared/ui/card.tsx +++ b/src/shared/ui/card.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; -import { cn } from '@/shared/libs/shadcn/utils'; +import { cn } from '@/shared/libs/shadcn'; const Card = React.forwardRef< HTMLDivElement, diff --git a/src/shared/ui/command.tsx b/src/shared/ui/command.tsx index 9492870..9d2ed57 100644 --- a/src/shared/ui/command.tsx +++ b/src/shared/ui/command.tsx @@ -5,7 +5,7 @@ import { Command as CommandPrimitive } from 'cmdk'; import { Search } from 'lucide-react'; import * as React from 'react'; -import { cn } from '@/shared/libs/shadcn/utils'; +import { cn } from '@/shared/libs/shadcn'; import { Dialog, DialogContent } from '@/shared/ui/dialog'; const Command = React.forwardRef< diff --git a/src/shared/ui/dialog.tsx b/src/shared/ui/dialog.tsx index 28531ac..7b0ccea 100644 --- a/src/shared/ui/dialog.tsx +++ b/src/shared/ui/dialog.tsx @@ -4,7 +4,7 @@ import * as DialogPrimitive from '@radix-ui/react-dialog'; import { X } from 'lucide-react'; import * as React from 'react'; -import { cn } from '@/shared/libs/shadcn/utils'; +import { cn } from '@/shared/libs/shadcn'; const Dialog = DialogPrimitive.Root; diff --git a/src/shared/ui/dropdown-menu.tsx b/src/shared/ui/dropdown-menu.tsx index cbc2e66..7e4089d 100644 --- a/src/shared/ui/dropdown-menu.tsx +++ b/src/shared/ui/dropdown-menu.tsx @@ -4,7 +4,7 @@ import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu'; import { Check, ChevronRight, Circle } from 'lucide-react'; import * as React from 'react'; -import { cn } from '@/shared/libs/shadcn/utils'; +import { cn } from '@/shared/libs/shadcn'; const DropdownMenu = DropdownMenuPrimitive.Root; diff --git a/src/shared/ui/input.tsx b/src/shared/ui/input.tsx index f3a8eaa..5cadb77 100644 --- a/src/shared/ui/input.tsx +++ b/src/shared/ui/input.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; -import { cn } from '@/shared/libs/shadcn/utils'; +import { cn } from '@/shared/libs/shadcn'; export interface InputProps extends React.InputHTMLAttributes {} diff --git a/src/shared/ui/label.tsx b/src/shared/ui/label.tsx index 4901323..012b191 100644 --- a/src/shared/ui/label.tsx +++ b/src/shared/ui/label.tsx @@ -4,7 +4,7 @@ import * as LabelPrimitive from '@radix-ui/react-label'; import { type VariantProps, cva } from 'class-variance-authority'; import * as React from 'react'; -import { cn } from '@/shared/libs/shadcn/utils'; +import { cn } from '@/shared/libs/shadcn'; const labelVariants = cva( 'text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70', diff --git a/src/shared/ui/popover.tsx b/src/shared/ui/popover.tsx index edc6f5c..33d361c 100644 --- a/src/shared/ui/popover.tsx +++ b/src/shared/ui/popover.tsx @@ -3,7 +3,7 @@ import * as PopoverPrimitive from '@radix-ui/react-popover'; import * as React from 'react'; -import { cn } from '@/shared/libs/shadcn/utils'; +import { cn } from '@/shared/libs/shadcn'; const Popover = PopoverPrimitive.Root; diff --git a/src/shared/ui/scroll-area.tsx b/src/shared/ui/scroll-area.tsx index 29945e6..f9255ac 100644 --- a/src/shared/ui/scroll-area.tsx +++ b/src/shared/ui/scroll-area.tsx @@ -3,7 +3,7 @@ import * as ScrollAreaPrimitive from '@radix-ui/react-scroll-area'; import * as React from 'react'; -import { cn } from '@/shared/libs/shadcn/utils'; +import { cn } from '@/shared/libs/shadcn'; const ScrollArea = React.forwardRef< React.ElementRef, diff --git a/src/shared/ui/select.tsx b/src/shared/ui/select.tsx index f4af88a..4d34338 100644 --- a/src/shared/ui/select.tsx +++ b/src/shared/ui/select.tsx @@ -4,7 +4,7 @@ import * as SelectPrimitive from '@radix-ui/react-select'; import { Check, ChevronDown, ChevronUp } from 'lucide-react'; import * as React from 'react'; -import { cn } from '@/shared/libs/shadcn/utils'; +import { cn } from '@/shared/libs/shadcn'; const Select = SelectPrimitive.Root; diff --git a/src/shared/ui/separator.tsx b/src/shared/ui/separator.tsx index cbb6f53..40c62c6 100644 --- a/src/shared/ui/separator.tsx +++ b/src/shared/ui/separator.tsx @@ -3,7 +3,7 @@ import * as SeparatorPrimitive from '@radix-ui/react-separator'; import * as React from 'react'; -import { cn } from '@/shared/libs/shadcn/utils'; +import { cn } from '@/shared/libs/shadcn'; const Separator = React.forwardRef< React.ElementRef, diff --git a/src/shared/ui/tabs.tsx b/src/shared/ui/tabs.tsx index 7246b55..223ea96 100644 --- a/src/shared/ui/tabs.tsx +++ b/src/shared/ui/tabs.tsx @@ -3,7 +3,7 @@ import * as TabsPrimitive from '@radix-ui/react-tabs'; import * as React from 'react'; -import { cn } from '@/shared/libs/shadcn/utils'; +import { cn } from '@/shared/libs/shadcn'; const Tabs = TabsPrimitive.Root; diff --git a/src/shared/ui/typography.tsx b/src/shared/ui/typography.tsx index fece6fe..77724d5 100644 --- a/src/shared/ui/typography.tsx +++ b/src/shared/ui/typography.tsx @@ -1,4 +1,4 @@ -import { cn } from '@/shared/libs/shadcn/utils'; +import { cn } from '@/shared/libs/shadcn'; import { Slot } from '@radix-ui/react-slot'; import { type VariantProps, cva } from 'class-variance-authority'; import * as React from 'react'; diff --git a/src/shared/layout/game-mode-layout.tsx b/src/widget/layout/game-mode-layout/game-mode-layout.tsx similarity index 100% rename from src/shared/layout/game-mode-layout.tsx rename to src/widget/layout/game-mode-layout/game-mode-layout.tsx diff --git a/src/widget/layout/game-mode-layout/index.ts b/src/widget/layout/game-mode-layout/index.ts new file mode 100644 index 0000000..4206e96 --- /dev/null +++ b/src/widget/layout/game-mode-layout/index.ts @@ -0,0 +1 @@ +export { GameModeLayout } from './game-mode-layout'; diff --git a/src/widget/layout/index.ts b/src/widget/layout/index.ts new file mode 100644 index 0000000..53b1314 --- /dev/null +++ b/src/widget/layout/index.ts @@ -0,0 +1 @@ +export * from './game-mode-layout'; diff --git a/src/widget/game-header/index.tsx b/src/widget/ui/game-header/game-header.tsx similarity index 94% rename from src/widget/game-header/index.tsx rename to src/widget/ui/game-header/game-header.tsx index 02107de..8e0edf9 100644 --- a/src/widget/game-header/index.tsx +++ b/src/widget/ui/game-header/game-header.tsx @@ -1,4 +1,4 @@ -import { cn } from '@/shared/libs/shadcn/utils'; +import { cn } from '@/shared/libs/shadcn'; import { Typography } from '@/shared/ui/typography'; import type { FC, ReactNode } from 'react'; import { memo } from 'react'; diff --git a/src/widget/ui/game-header/index.tsx b/src/widget/ui/game-header/index.tsx new file mode 100644 index 0000000..a426476 --- /dev/null +++ b/src/widget/ui/game-header/index.tsx @@ -0,0 +1 @@ +export { GameHeader } from './game-header';