From f0c0c3f981909560278fc57305bff82a7d80e2f5 Mon Sep 17 00:00:00 2001 From: zabarudo Date: Sat, 16 Dec 2023 13:10:04 +0530 Subject: [PATCH] init: Repo for Codecharacter Frontend 2024 --- README.md | 40 ++++++++++++++----- docker-compose.yml | 2 +- docs/README.md | 2 +- docs/spec/generator-config.yml | 2 +- package.json | 22 +++++----- packages/client/package.json | 4 +- packages/map-designer/package.json | 10 ++--- packages/map-designer/vite.dev.config.ts | 4 +- packages/map-designer/vite.prod.config.ts | 4 +- packages/renderer/package.json | 10 ++--- packages/renderer/vite.dev.config.ts | 4 +- packages/renderer/vite.prod.config.ts | 4 +- src/api/ApiConfig.ts | 2 +- .../Login/ForgetPassword/ForgetPassword.tsx | 2 +- .../ResetpasswordVerifcation.tsx | 2 +- .../IncompleteProfile/incompeleteProfile.tsx | 2 +- .../Register/ActivateUser/ActivateUser.tsx | 2 +- src/components/BattleTV/BattleTV.tsx | 2 +- .../CommitHistory/CodeMapViewbox/CodeView.tsx | 2 +- .../CommitHistory/CodeMapViewbox/MapView.tsx | 2 +- .../CommitTree/CommitHistroy.tsx | 2 +- .../CommitHistory/HistoryMain/History.tsx | 2 +- src/components/CommitModal/CommitModal.tsx | 2 +- .../DashboardOptions/DashboardOptions.tsx | 2 +- .../Leaderboard/DailyLeaderboard.tsx | 2 +- src/components/Leaderboard/Leaderboard.tsx | 2 +- .../Leaderboard/MainLeaderboard.tsx | 2 +- src/components/MapDesigner/MapDesigner.tsx | 4 +- src/components/NavBar/NavBar.tsx | 2 +- src/components/Notifs/Notifs.tsx | 2 +- src/components/RatingChart/RatingChart.tsx | 2 +- .../SelfMatchMakeModal.tsx | 2 +- src/components/SideBar/SideBar.tsx | 2 +- src/components/Terminal/Terminal.tsx | 2 +- .../TourIntroModal/TourIntroModal.tsx | 2 +- src/components/Websocket/Websocket.tsx | 2 +- src/pages/BattleTV/BattleTVPage.tsx | 2 +- src/pages/CommitHistory/CommitHistoryPage.tsx | 2 +- src/pages/Dashboard/Dashboard.tsx | 4 +- src/pages/LeaderBoard/LeaderBoardPage.tsx | 2 +- src/pages/MapDesigner/MapDesigner.tsx | 2 +- src/pages/SideBarWrap/SideBarWrap.tsx | 2 +- src/store/BattleTV/BattleTvSlice.ts | 2 +- src/store/DailyChallenge/dailyChallenge.ts | 2 +- src/store/Notifs/notifAPI.ts | 2 +- src/store/Notifs/notifSlice.ts | 2 +- src/store/User/UserApi.ts | 2 +- src/store/editor/code.ts | 2 +- src/store/rendererLogs/logAPI.ts | 2 +- src/store/rendererLogs/logSlice.ts | 2 +- stories/MapDesigner.stories.tsx | 2 +- stories/Renderer.stories.tsx | 2 +- yarn.lock | 22 +++++----- 53 files changed, 118 insertions(+), 96 deletions(-) diff --git a/README.md b/README.md index aa5df28..2adc026 100644 --- a/README.md +++ b/README.md @@ -1,20 +1,34 @@ -

CodeCharacter Web 2023

-

Monorepo for the web app, renderer and map designer of CodeCharacter 2023

+

CodeCharacter Web 2024

+

Monorepo for the web app, renderer and map designer of CodeCharacter 2024

- - + + - - + + - - + +
- +

+## Setup + +1. Configurations + +``` +cp config/config.example.ts config/config.ts +``` + +3. Default codes + +``` +git submodule update --init +``` + ## Scripts (To be run with `yarn` prefix) @@ -27,6 +41,14 @@ - `lint` runs the linter for the project - `format` runs the formatter for the project +## Docker + +``` +docker compose up +``` + +Container will be running on port **3000** + ## Documentation and preview deployments Check out [here](https://delta.github.io/codecharacter-web-2023/). diff --git a/docker-compose.yml b/docker-compose.yml index 0f99a9b..c6fce47 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,4 +1,4 @@ -version: '3.8' +version: '3.9' services: web: diff --git a/docs/README.md b/docs/README.md index f69f199..0377d12 100644 --- a/docs/README.md +++ b/docs/README.md @@ -1,4 +1,4 @@ -# CodeCharacter Web 2023 +# CodeCharacter Web 2024 ### Code Generation Process diff --git a/docs/spec/generator-config.yml b/docs/spec/generator-config.yml index 4771186..9c89b4f 100644 --- a/docs/spec/generator-config.yml +++ b/docs/spec/generator-config.yml @@ -3,5 +3,5 @@ typescriptThreePlus: true useSingleRequestParameter: false withInterfaces: true withoutRuntimeChecks: true -npmName: '@codecharacter-2023/client' +npmName: '@codecharacter-2024/client' npmVersion: '2023.0.0' diff --git a/package.json b/package.json index 404a627..fc727ae 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { - "name": "@codecharacter-2023/web", - "description": "The web frontend of CodeCharacter 2023", + "name": "@codecharacter-2024/web", + "description": "The web frontend of CodeCharacter 2024", "license": "MIT", "author": "Delta Force", "version": "2023.0.0", @@ -10,21 +10,21 @@ "scripts": { "lint": "eslint --ext .ts,.tsx . --ignore-path .gitignore && prettier \"**/*.{ts,tsx,js,json,yml,md}\" --check --ignore-path .gitignore", "format": "eslint --ext .ts,.tsx . --fix --ignore-path .gitignore && prettier \"**/*.{ts,tsx,js,json,yml,md}\" --write --ignore-path .gitignore", - "compile": "yarn workspace @codecharacter-2023/client run tsc && yarn workspace @codecharacter-2023/renderer run tsc && yarn workspace @codecharacter-2023/map-designer run tsc && tsc", + "compile": "yarn workspace @codecharacter-2024/client run tsc && yarn workspace @codecharacter-2024/renderer run tsc && yarn workspace @codecharacter-2024/map-designer run tsc && tsc", "test": "jest --coverage", - "dev": "concurrently -k -r \"yarn workspace @codecharacter-2023/client build:watch\" \"yarn workspace @codecharacter-2023/renderer build:watch\" \"yarn workspace @codecharacter-2023/map-designer build:watch\" \"sleep 10 && vite --config vite.dev.config.ts\"", - "build": "yarn workspace @codecharacter-2023/client run build && yarn workspace @codecharacter-2023/renderer run build && yarn workspace @codecharacter-2023/map-designer run build && vite build --config vite.prod.config.ts --emptyOutDir", - "prod": "concurrently -k -r \"sleep 5 && vite build --watch --config vite.prod.config.ts --emptyOutDir\" \"sleep 10 && live-server --host=0.0.0.0 --middleware=spa-ignore-assets dist/\" \"yarn workspace @codecharacter-2023/client build:watch\" \"yarn workspace @codecharacter-2023/renderer build:watch\" \"yarn workspace @codecharacter-2023/map-designer build:watch\"", - "renderer:demo": "yarn workspace @codecharacter-2023/renderer run dev", - "map-designer:demo": "yarn workspace @codecharacter-2023/map-designer run dev", + "dev": "concurrently -k -r \"yarn workspace @codecharacter-2024/client build:watch\" \"yarn workspace @codecharacter-2024/renderer build:watch\" \"yarn workspace @codecharacter-2024/map-designer build:watch\" \"sleep 10 && vite --config vite.dev.config.ts\"", + "build": "yarn workspace @codecharacter-2024/client run build && yarn workspace @codecharacter-2024/renderer run build && yarn workspace @codecharacter-2024/map-designer run build && vite build --config vite.prod.config.ts --emptyOutDir", + "prod": "concurrently -k -r \"sleep 5 && vite build --watch --config vite.prod.config.ts --emptyOutDir\" \"sleep 10 && live-server --host=0.0.0.0 --middleware=spa-ignore-assets dist/\" \"yarn workspace @codecharacter-2024/client build:watch\" \"yarn workspace @codecharacter-2024/renderer build:watch\" \"yarn workspace @codecharacter-2024/map-designer build:watch\"", + "renderer:demo": "yarn workspace @codecharacter-2024/renderer run dev", + "map-designer:demo": "yarn workspace @codecharacter-2024/map-designer run dev", "storybook": "start-storybook -p 6006", "storybook:build": "build-storybook", "postinstall": "husky install" }, "dependencies": { - "@codecharacter-2023/client": "workspace:packages/client", - "@codecharacter-2023/map-designer": "workspace:packages/map-designer", - "@codecharacter-2023/renderer": "workspace:packages/renderer", + "@codecharacter-2024/client": "workspace:packages/client", + "@codecharacter-2024/map-designer": "workspace:packages/map-designer", + "@codecharacter-2024/renderer": "workspace:packages/renderer", "@custom-elements-manifest/analyzer": "^0.6.6", "@fortawesome/fontawesome-svg-core": "^6.2.1", "@fortawesome/free-brands-svg-icons": "^6.2.1", diff --git a/packages/client/package.json b/packages/client/package.json index 0e02618..b2d6039 100644 --- a/packages/client/package.json +++ b/packages/client/package.json @@ -1,7 +1,7 @@ { - "name": "@codecharacter-2023/client", + "name": "@codecharacter-2024/client", "version": "2023.0.0", - "description": "OpenAPI client for CodeCharacter 2023", + "description": "OpenAPI client for CodeCharacter 2024", "author": "Delta Force", "main": "./dist/index.js", "typings": "./dist/index.d.ts", diff --git a/packages/map-designer/package.json b/packages/map-designer/package.json index a59ab14..94d87a6 100644 --- a/packages/map-designer/package.json +++ b/packages/map-designer/package.json @@ -1,18 +1,18 @@ { - "name": "@codecharacter-2023/map-designer", - "description": "Webcomponent for CodeCharacter Map Designer 2023", + "name": "@codecharacter-2024/map-designer", + "description": "Webcomponent for CodeCharacter Map Designer 2024", "license": "MIT", "author": "Delta Force", "version": "2023.0.0", - "main": "./dist/codecharacter-map-designer-2023.es.js", - "module": "./dist/codecharacter-map-designer-2023.es.js", + "main": "./dist/codecharacter-map-designer-2024.es.js", + "module": "./dist/codecharacter-map-designer-2024.es.js", "types": "./dist/src/index.d.ts", "files": [ "dist" ], "exports": { ".": { - "import": "./dist/codecharacter-map-designer-2023.es.js" + "import": "./dist/codecharacter-map-designer-2024.es.js" } }, "scripts": { diff --git a/packages/map-designer/vite.dev.config.ts b/packages/map-designer/vite.dev.config.ts index 657789a..6b39cca 100644 --- a/packages/map-designer/vite.dev.config.ts +++ b/packages/map-designer/vite.dev.config.ts @@ -9,9 +9,9 @@ export default defineConfig({ }, build: { lib: { - name: 'codecharacter-map-designer-2023', + name: 'codecharacter-map-designer-2024', entry: path.resolve(__dirname, 'src/index.ts'), - fileName: 'codecharacter-map-designer-2023', + fileName: 'codecharacter-map-designer-2024', }, rollupOptions: { external: ['phaser', 'lit'], diff --git a/packages/map-designer/vite.prod.config.ts b/packages/map-designer/vite.prod.config.ts index 755262c..c5b0622 100644 --- a/packages/map-designer/vite.prod.config.ts +++ b/packages/map-designer/vite.prod.config.ts @@ -8,9 +8,9 @@ export default defineConfig({ build: { lib: { formats: ['es'], - name: 'codecharacter-map-designer-2023', + name: 'codecharacter-map-designer-2024', entry: path.resolve(__dirname, 'src/index.ts'), - fileName: 'codecharacter-map-designer-2023', + fileName: 'codecharacter-map-designer-2024', }, rollupOptions: { external: ['phaser', 'lit', 'react'], diff --git a/packages/renderer/package.json b/packages/renderer/package.json index 033c077..91a2184 100644 --- a/packages/renderer/package.json +++ b/packages/renderer/package.json @@ -1,18 +1,18 @@ { - "name": "@codecharacter-2023/renderer", - "description": "Webcomponent for CodeCharacter Renderer 2023", + "name": "@codecharacter-2024/renderer", + "description": "Webcomponent for CodeCharacter Renderer 2024", "license": "MIT", "author": "Delta Force", "version": "2023.0.0", - "main": "./dist/codecharacter-renderer-2023.es.js", - "module": "./dist/codecharacter-renderer-2023.es.js", + "main": "./dist/codecharacter-renderer-2024.es.js", + "module": "./dist/codecharacter-renderer-2024.es.js", "types": "./dist/src/index.d.ts", "files": [ "dist" ], "exports": { ".": { - "import": "./dist/codecharacter-renderer-2023.es.js" + "import": "./dist/codecharacter-renderer-2024.es.js" } }, "scripts": { diff --git a/packages/renderer/vite.dev.config.ts b/packages/renderer/vite.dev.config.ts index dc8ccd3..6e2f9da 100644 --- a/packages/renderer/vite.dev.config.ts +++ b/packages/renderer/vite.dev.config.ts @@ -9,9 +9,9 @@ export default defineConfig({ }, build: { lib: { - name: 'codecharacter-renderer-2023', + name: 'codecharacter-renderer-2024', entry: path.resolve(__dirname, 'src/index.ts'), - fileName: 'codecharacter-renderer-2023', + fileName: 'codecharacter-renderer-2024', }, rollupOptions: { external: ['phaser', 'lit', 'react'], diff --git a/packages/renderer/vite.prod.config.ts b/packages/renderer/vite.prod.config.ts index de54386..4a37146 100644 --- a/packages/renderer/vite.prod.config.ts +++ b/packages/renderer/vite.prod.config.ts @@ -8,9 +8,9 @@ export default defineConfig({ build: { lib: { formats: ['es'], - name: 'codecharacter-renderer-2023', + name: 'codecharacter-renderer-2024', entry: path.resolve(__dirname, 'src/index.ts'), - fileName: 'codecharacter-renderer-2023', + fileName: 'codecharacter-renderer-2024', }, rollupOptions: { external: ['phaser', 'lit', 'react'], diff --git a/src/api/ApiConfig.ts b/src/api/ApiConfig.ts index 627aafb..768ce8f 100644 --- a/src/api/ApiConfig.ts +++ b/src/api/ApiConfig.ts @@ -1,4 +1,4 @@ -import { AuthApi, Configuration } from '@codecharacter-2023/client'; +import { AuthApi, Configuration } from '@codecharacter-2024/client'; import { BASE_PATH, PREFER_DEV_OVERRIDE, homeUrl } from '../config/config'; export class ApiError extends Error { status: number; diff --git a/src/components/Auth/Auth/Login/ForgetPassword/ForgetPassword.tsx b/src/components/Auth/Auth/Login/ForgetPassword/ForgetPassword.tsx index 2b5ee45..a15d542 100644 --- a/src/components/Auth/Auth/Login/ForgetPassword/ForgetPassword.tsx +++ b/src/components/Auth/Auth/Login/ForgetPassword/ForgetPassword.tsx @@ -1,6 +1,6 @@ import { useState } from 'react'; import styles from './forgetpassword.module.css'; -import { AuthApi } from '@codecharacter-2023/client'; +import { AuthApi } from '@codecharacter-2024/client'; import { ApiError, authConfig } from '../../../../../api/ApiConfig'; import { toast } from 'react-hot-toast'; import { Modal } from 'react-bootstrap'; diff --git a/src/components/Auth/Auth/Login/ForgetPassword/ResetpasswordVerifcation.tsx b/src/components/Auth/Auth/Login/ForgetPassword/ResetpasswordVerifcation.tsx index 6e21fca..90042e1 100644 --- a/src/components/Auth/Auth/Login/ForgetPassword/ResetpasswordVerifcation.tsx +++ b/src/components/Auth/Auth/Login/ForgetPassword/ResetpasswordVerifcation.tsx @@ -1,7 +1,7 @@ import { useState } from 'react'; import styles from '../../auth.module.css'; import { ApiError, authConfig } from '../../../../../api/ApiConfig'; -import { AuthApi } from '@codecharacter-2023/client'; +import { AuthApi } from '@codecharacter-2024/client'; import { useNavigate, useLocation } from 'react-router-dom'; import Toast, { toast } from 'react-hot-toast'; diff --git a/src/components/Auth/Auth/Login/IncompleteProfile/incompeleteProfile.tsx b/src/components/Auth/Auth/Login/IncompleteProfile/incompeleteProfile.tsx index 0c5936c..dd61aab 100644 --- a/src/components/Auth/Auth/Login/IncompleteProfile/incompeleteProfile.tsx +++ b/src/components/Auth/Auth/Login/IncompleteProfile/incompeleteProfile.tsx @@ -5,7 +5,7 @@ import { IconProp } from '@fortawesome/fontawesome-svg-core'; import styles from '../../../Auth/Login/IncompleteProfile/incompleteProfile.module.css'; import OtherDetails from '../../Register/FormDetails/OtherDetails'; import { useState } from 'react'; -import { CurrentUserApi } from '@codecharacter-2023/client'; +import { CurrentUserApi } from '@codecharacter-2024/client'; import { apiConfig, ApiError } from '../../../../../api/ApiConfig'; import { useNavigate } from 'react-router-dom'; import { useAppDispatch } from '../../../../../store/hooks'; diff --git a/src/components/Auth/Auth/Register/ActivateUser/ActivateUser.tsx b/src/components/Auth/Auth/Register/ActivateUser/ActivateUser.tsx index e2ad0c1..e45ab0c 100644 --- a/src/components/Auth/Auth/Register/ActivateUser/ActivateUser.tsx +++ b/src/components/Auth/Auth/Register/ActivateUser/ActivateUser.tsx @@ -1,4 +1,4 @@ -import { UserApi } from '@codecharacter-2023/client'; +import { UserApi } from '@codecharacter-2024/client'; import { Card } from 'react-bootstrap'; import { useLocation, useNavigate } from 'react-router-dom'; import { useState, useEffect } from 'react'; diff --git a/src/components/BattleTV/BattleTV.tsx b/src/components/BattleTV/BattleTV.tsx index fb91f46..825b9c4 100644 --- a/src/components/BattleTV/BattleTV.tsx +++ b/src/components/BattleTV/BattleTV.tsx @@ -14,7 +14,7 @@ import { Match, MatchMode, Verdict, -} from '@codecharacter-2023/client'; +} from '@codecharacter-2024/client'; import { User, user } from '../../store/User/UserSlice'; import { changePageState, diff --git a/src/components/CommitHistory/CodeMapViewbox/CodeView.tsx b/src/components/CommitHistory/CodeMapViewbox/CodeView.tsx index 7b19cbd..a2b2ad8 100644 --- a/src/components/CommitHistory/CodeMapViewbox/CodeView.tsx +++ b/src/components/CommitHistory/CodeMapViewbox/CodeView.tsx @@ -1,4 +1,4 @@ -import { CodeRevision } from '@codecharacter-2023/client'; +import { CodeRevision } from '@codecharacter-2024/client'; import { CodeBlock, irBlack } from 'react-code-blocks'; type PropsType = { code: CodeRevision['code']; diff --git a/src/components/CommitHistory/CodeMapViewbox/MapView.tsx b/src/components/CommitHistory/CodeMapViewbox/MapView.tsx index b0f41ae..ab9093f 100644 --- a/src/components/CommitHistory/CodeMapViewbox/MapView.tsx +++ b/src/components/CommitHistory/CodeMapViewbox/MapView.tsx @@ -1,7 +1,7 @@ import { MapDesignerComponent, MapDesignerUtils, -} from '@codecharacter-2023/map-designer'; +} from '@codecharacter-2024/map-designer'; interface MapViewBoxProps { mapCoordinates: Array>; diff --git a/src/components/CommitHistory/CommitTree/CommitHistroy.tsx b/src/components/CommitHistory/CommitTree/CommitHistroy.tsx index fe2dd7a..65071f8 100644 --- a/src/components/CommitHistory/CommitTree/CommitHistroy.tsx +++ b/src/components/CommitHistory/CommitTree/CommitHistroy.tsx @@ -1,4 +1,4 @@ -import { CodeRevision, GameMapRevision } from '@codecharacter-2023/client'; +import { CodeRevision, GameMapRevision } from '@codecharacter-2024/client'; import { useState } from 'react'; import { VerticalTimeline, diff --git a/src/components/CommitHistory/HistoryMain/History.tsx b/src/components/CommitHistory/HistoryMain/History.tsx index 5928df7..30eb4f7 100644 --- a/src/components/CommitHistory/HistoryMain/History.tsx +++ b/src/components/CommitHistory/HistoryMain/History.tsx @@ -9,7 +9,7 @@ import { CurrentUserApi, GameMapRevision, MapApi, -} from '@codecharacter-2023/client'; +} from '@codecharacter-2024/client'; import { MapObj, changeHistoryEditorMap, diff --git a/src/components/CommitModal/CommitModal.tsx b/src/components/CommitModal/CommitModal.tsx index 56e609a..239c093 100644 --- a/src/components/CommitModal/CommitModal.tsx +++ b/src/components/CommitModal/CommitModal.tsx @@ -1,4 +1,4 @@ -import { CodeApi, Language } from '@codecharacter-2023/client'; +import { CodeApi, Language } from '@codecharacter-2024/client'; import React, { useState } from 'react'; import { Button, Form, Modal, Row } from 'react-bootstrap'; import { apiConfig, ApiError } from '../../api/ApiConfig'; diff --git a/src/components/DashboardOptions/DashboardOptions.tsx b/src/components/DashboardOptions/DashboardOptions.tsx index f017baa..7fdca90 100644 --- a/src/components/DashboardOptions/DashboardOptions.tsx +++ b/src/components/DashboardOptions/DashboardOptions.tsx @@ -4,7 +4,7 @@ import styles from './DashboardOptions.module.css'; import DropdownToggle from 'react-bootstrap/esm/DropdownToggle'; import { ButtonGroup } from 'react-bootstrap'; import { apiConfig, ApiError } from '../../api/ApiConfig'; -import { CurrentUserApi } from '@codecharacter-2023/client'; +import { CurrentUserApi } from '@codecharacter-2024/client'; import Toast from 'react-hot-toast'; import { useAppDispatch } from '../../store/hooks'; import { diff --git a/src/components/Leaderboard/DailyLeaderboard.tsx b/src/components/Leaderboard/DailyLeaderboard.tsx index c15a44b..86d38db 100644 --- a/src/components/Leaderboard/DailyLeaderboard.tsx +++ b/src/components/Leaderboard/DailyLeaderboard.tsx @@ -6,7 +6,7 @@ import { getAvatarByID } from '../Avatar/Avatar'; import { DailyChallengeLeaderBoardResponse, DailyChallengesApi, -} from '@codecharacter-2023/client'; +} from '@codecharacter-2024/client'; import { apiConfig, ApiError } from '../../api/ApiConfig'; import Loader from '../Loader/Loader'; import Toast from 'react-hot-toast'; diff --git a/src/components/Leaderboard/Leaderboard.tsx b/src/components/Leaderboard/Leaderboard.tsx index 4fb05ea..6157ca0 100644 --- a/src/components/Leaderboard/Leaderboard.tsx +++ b/src/components/Leaderboard/Leaderboard.tsx @@ -9,7 +9,7 @@ import { LeaderboardEntry, MatchMode, TierType, -} from '@codecharacter-2023/client'; +} from '@codecharacter-2024/client'; import { apiConfig, ApiError } from '../../api/ApiConfig'; import Loader from '../Loader/Loader'; import swordImage from '../../assets/sword.png'; diff --git a/src/components/Leaderboard/MainLeaderboard.tsx b/src/components/Leaderboard/MainLeaderboard.tsx index 4b75052..6363abc 100644 --- a/src/components/Leaderboard/MainLeaderboard.tsx +++ b/src/components/Leaderboard/MainLeaderboard.tsx @@ -2,7 +2,7 @@ import { useEffect, useState } from 'react'; import DailyChallengeLeaderboard from './DailyLeaderboard'; import Leaderboard from './Leaderboard'; import styles from './Leaderboard.module.css'; -import { CurrentUserApi } from '@codecharacter-2023/client'; +import { CurrentUserApi } from '@codecharacter-2024/client'; import { useTour } from '@reactour/tour'; import { apiConfig } from '../../api/ApiConfig'; import { dcEnable } from '../../config/config'; diff --git a/src/components/MapDesigner/MapDesigner.tsx b/src/components/MapDesigner/MapDesigner.tsx index 122aa73..1c884ec 100644 --- a/src/components/MapDesigner/MapDesigner.tsx +++ b/src/components/MapDesigner/MapDesigner.tsx @@ -2,12 +2,12 @@ import { useEffect, useState } from 'react'; import { MapDesignerComponent, MapDesignerUtils, -} from '@codecharacter-2023/map-designer'; +} from '@codecharacter-2024/map-designer'; import { MapApi, DailyChallengesApi, CurrentUserApi, -} from '@codecharacter-2023/client'; +} from '@codecharacter-2024/client'; import Toast from 'react-hot-toast'; import styles from './MapDesigner.module.css'; import { apiConfig, ApiError } from '../../api/ApiConfig'; diff --git a/src/components/NavBar/NavBar.tsx b/src/components/NavBar/NavBar.tsx index 006a85f..02a310d 100644 --- a/src/components/NavBar/NavBar.tsx +++ b/src/components/NavBar/NavBar.tsx @@ -12,7 +12,7 @@ import { loading, } from '../../store/User/UserSlice'; import { useAppDispatch, useAppSelector } from '../../store/hooks'; -import { AuthApi } from '@codecharacter-2023/client'; +import { AuthApi } from '@codecharacter-2024/client'; import { apiConfig, ApiError } from '../../api/ApiConfig'; import Toast from 'react-hot-toast'; import DashboardOptions from '../DashboardOptions/DashboardOptions'; diff --git a/src/components/Notifs/Notifs.tsx b/src/components/Notifs/Notifs.tsx index 0f7fe5e..0364d7e 100644 --- a/src/components/Notifs/Notifs.tsx +++ b/src/components/Notifs/Notifs.tsx @@ -1,6 +1,6 @@ import { useEffect, useRef } from 'react'; import { useAppDispatch, useAppSelector } from '../../store/hooks'; -import { Notification } from '@codecharacter-2023/client'; +import { Notification } from '@codecharacter-2024/client'; import styles from './Notifs.module.css'; import notifIcon from '../../assets/notification.svg'; diff --git a/src/components/RatingChart/RatingChart.tsx b/src/components/RatingChart/RatingChart.tsx index 6d145ed..1e1f2a6 100644 --- a/src/components/RatingChart/RatingChart.tsx +++ b/src/components/RatingChart/RatingChart.tsx @@ -15,7 +15,7 @@ import { CurrentUserApi, RatingHistory, UserApi, -} from '@codecharacter-2023/client'; +} from '@codecharacter-2024/client'; import { apiConfig, ApiError } from '../../api/ApiConfig'; import Toast from 'react-hot-toast'; diff --git a/src/components/SelfMatchMakingModal/SelfMatchMakeModal.tsx b/src/components/SelfMatchMakingModal/SelfMatchMakeModal.tsx index 15444ed..2c43656 100644 --- a/src/components/SelfMatchMakingModal/SelfMatchMakeModal.tsx +++ b/src/components/SelfMatchMakingModal/SelfMatchMakeModal.tsx @@ -24,7 +24,7 @@ import { MapApi, MatchApi, MatchMode, -} from '@codecharacter-2023/client'; +} from '@codecharacter-2024/client'; import Toast from 'react-hot-toast'; const selfMatchModal = (): JSX.Element => { diff --git a/src/components/SideBar/SideBar.tsx b/src/components/SideBar/SideBar.tsx index c6e6b67..6cab8df 100644 --- a/src/components/SideBar/SideBar.tsx +++ b/src/components/SideBar/SideBar.tsx @@ -20,7 +20,7 @@ import { IsTourOver, } from '../../store/DailyChallenge/dailyChallenge'; import { useTour } from '@reactour/tour'; -import { CurrentUserApi } from '@codecharacter-2023/client'; +import { CurrentUserApi } from '@codecharacter-2024/client'; import { apiConfig } from '../../api/ApiConfig'; const icons = [ diff --git a/src/components/Terminal/Terminal.tsx b/src/components/Terminal/Terminal.tsx index 85c9604..381b990 100644 --- a/src/components/Terminal/Terminal.tsx +++ b/src/components/Terminal/Terminal.tsx @@ -1,5 +1,5 @@ import { useState } from 'react'; -import { RendererUtils } from '@codecharacter-2023/renderer'; +import { RendererUtils } from '@codecharacter-2024/renderer'; import { LazyLog, ScrollFollow } from 'react-lazylog'; export default function Terminal(): JSX.Element { diff --git a/src/components/TourIntroModal/TourIntroModal.tsx b/src/components/TourIntroModal/TourIntroModal.tsx index 742f76b..beb039a 100644 --- a/src/components/TourIntroModal/TourIntroModal.tsx +++ b/src/components/TourIntroModal/TourIntroModal.tsx @@ -1,6 +1,6 @@ import { Button, Col, Modal, Row } from 'react-bootstrap'; import { apiConfig, ApiError } from '../../api/ApiConfig'; -import { CurrentUserApi } from '@codecharacter-2023/client'; +import { CurrentUserApi } from '@codecharacter-2024/client'; import Toast from 'react-hot-toast'; import styles from './TourIntroModal.module.css'; import { useAppDispatch, useAppSelector } from '../../store/hooks'; diff --git a/src/components/Websocket/Websocket.tsx b/src/components/Websocket/Websocket.tsx index 3d4c0cf..2825092 100644 --- a/src/components/Websocket/Websocket.tsx +++ b/src/components/Websocket/Websocket.tsx @@ -4,7 +4,7 @@ import { Game, GameStatus, Notification, -} from '@codecharacter-2023/client'; +} from '@codecharacter-2024/client'; import { apiConfig } from '../../api/ApiConfig'; import { Stomp } from '@stomp/stompjs'; import { useEffect, useState } from 'react'; diff --git a/src/pages/BattleTV/BattleTVPage.tsx b/src/pages/BattleTV/BattleTVPage.tsx index 6daad7d..79056c1 100644 --- a/src/pages/BattleTV/BattleTVPage.tsx +++ b/src/pages/BattleTV/BattleTVPage.tsx @@ -1,4 +1,4 @@ -import { CurrentUserApi } from '@codecharacter-2023/client'; +import { CurrentUserApi } from '@codecharacter-2024/client'; import Toast from 'react-hot-toast'; import { useNavigate } from 'react-router-dom'; import { apiConfig, ApiError } from '../../api/ApiConfig'; diff --git a/src/pages/CommitHistory/CommitHistoryPage.tsx b/src/pages/CommitHistory/CommitHistoryPage.tsx index 47ce69d..5cc25ba 100644 --- a/src/pages/CommitHistory/CommitHistoryPage.tsx +++ b/src/pages/CommitHistory/CommitHistoryPage.tsx @@ -1,7 +1,7 @@ import { HistorySteps } from '../../components/TourProvider/HistorySteps'; import Tour from '../../components/TourProvider/TourProvider'; import History from '../../components/CommitHistory/HistoryMain/History'; -import { CurrentUserApi } from '@codecharacter-2023/client'; +import { CurrentUserApi } from '@codecharacter-2024/client'; import { useAppSelector } from '../../store/hooks'; import { apiConfig, ApiError } from '../../api/ApiConfig'; import { user } from '../../store/User/UserSlice'; diff --git a/src/pages/Dashboard/Dashboard.tsx b/src/pages/Dashboard/Dashboard.tsx index fc4327f..072c263 100644 --- a/src/pages/Dashboard/Dashboard.tsx +++ b/src/pages/Dashboard/Dashboard.tsx @@ -3,8 +3,8 @@ import { Language, DailyChallengesApi, CurrentUserApi, -} from '@codecharacter-2023/client'; -import { RendererComponent } from '@codecharacter-2023/renderer'; +} from '@codecharacter-2024/client'; +import { RendererComponent } from '@codecharacter-2024/renderer'; import Toast from 'react-hot-toast'; import { CodeBlock, irBlack } from 'react-code-blocks'; import { IconProp } from '@fortawesome/fontawesome-svg-core'; diff --git a/src/pages/LeaderBoard/LeaderBoardPage.tsx b/src/pages/LeaderBoard/LeaderBoardPage.tsx index b9cbbc8..ebdbd34 100644 --- a/src/pages/LeaderBoard/LeaderBoardPage.tsx +++ b/src/pages/LeaderBoard/LeaderBoardPage.tsx @@ -1,7 +1,7 @@ import MainLeaderboard from '../../components/Leaderboard/MainLeaderboard'; import Tour from '../../components/TourProvider/TourProvider'; import { LeaderBoardSteps } from '../../components/TourProvider/LeaderBoardSteps'; -import { CurrentUserApi } from '@codecharacter-2023/client'; +import { CurrentUserApi } from '@codecharacter-2024/client'; import { apiConfig, ApiError } from '../../api/ApiConfig'; import { useAppSelector } from '../../store/hooks'; import { user } from '../../store/User/UserSlice'; diff --git a/src/pages/MapDesigner/MapDesigner.tsx b/src/pages/MapDesigner/MapDesigner.tsx index 9a3c0ba..a1de156 100644 --- a/src/pages/MapDesigner/MapDesigner.tsx +++ b/src/pages/MapDesigner/MapDesigner.tsx @@ -1,4 +1,4 @@ -import { CurrentUserApi } from '@codecharacter-2023/client'; +import { CurrentUserApi } from '@codecharacter-2024/client'; import Toast from 'react-hot-toast'; import { useNavigate } from 'react-router-dom'; import { apiConfig, ApiError } from '../../api/ApiConfig'; diff --git a/src/pages/SideBarWrap/SideBarWrap.tsx b/src/pages/SideBarWrap/SideBarWrap.tsx index 580697f..e8edba6 100644 --- a/src/pages/SideBarWrap/SideBarWrap.tsx +++ b/src/pages/SideBarWrap/SideBarWrap.tsx @@ -1,7 +1,7 @@ import SideBar from '../../components/SideBar/SideBar'; import Tour from '../../components/TourProvider/TourProvider'; import { SideBarSteps } from '../../components/TourProvider/SideBarSteps'; -import { CurrentUserApi } from '@codecharacter-2023/client'; +import { CurrentUserApi } from '@codecharacter-2024/client'; import { apiConfig, ApiError } from '../../api/ApiConfig'; import Toast from 'react-hot-toast'; diff --git a/src/store/BattleTV/BattleTvSlice.ts b/src/store/BattleTV/BattleTvSlice.ts index 53db316..54f2815 100644 --- a/src/store/BattleTV/BattleTvSlice.ts +++ b/src/store/BattleTV/BattleTvSlice.ts @@ -1,4 +1,4 @@ -import { Match, MatchApi } from '@codecharacter-2023/client'; +import { Match, MatchApi } from '@codecharacter-2024/client'; import { apiConfig, ApiError } from '../../api/ApiConfig'; import { Action, createSlice, ThunkAction } from '@reduxjs/toolkit'; import { RootState } from '../store'; diff --git a/src/store/DailyChallenge/dailyChallenge.ts b/src/store/DailyChallenge/dailyChallenge.ts index fb72c96..c839e46 100644 --- a/src/store/DailyChallenge/dailyChallenge.ts +++ b/src/store/DailyChallenge/dailyChallenge.ts @@ -1,7 +1,7 @@ import { ChallengeType, DailyChallengeGetRequest, -} from '@codecharacter-2023/client'; +} from '@codecharacter-2024/client'; import { createSlice, PayloadAction } from '@reduxjs/toolkit'; import { RootState } from '../store'; import { CodeAndLanguage, languagesAvailable } from '../editor/code'; diff --git a/src/store/Notifs/notifAPI.ts b/src/store/Notifs/notifAPI.ts index 2bb74a9..abf2815 100644 --- a/src/store/Notifs/notifAPI.ts +++ b/src/store/Notifs/notifAPI.ts @@ -1,4 +1,4 @@ -import { NotificationApi, Notification } from '@codecharacter-2023/client'; +import { NotificationApi, Notification } from '@codecharacter-2024/client'; import { apiConfig, ApiError } from '../../api/ApiConfig'; export const getNotifs = (): Promise => { diff --git a/src/store/Notifs/notifSlice.ts b/src/store/Notifs/notifSlice.ts index 163445d..af82b25 100644 --- a/src/store/Notifs/notifSlice.ts +++ b/src/store/Notifs/notifSlice.ts @@ -1,5 +1,5 @@ import { createAsyncThunk, createSlice } from '@reduxjs/toolkit'; -import { Notification } from '@codecharacter-2023/client'; +import { Notification } from '@codecharacter-2024/client'; import { RootState } from '../store'; import { getNotifs, markNotifAsRead } from './notifAPI'; diff --git a/src/store/User/UserApi.ts b/src/store/User/UserApi.ts index 6cffa61..5ff471e 100644 --- a/src/store/User/UserApi.ts +++ b/src/store/User/UserApi.ts @@ -1,4 +1,4 @@ -import { UserApi, AuthApi, CurrentUserApi } from '@codecharacter-2023/client'; +import { UserApi, AuthApi, CurrentUserApi } from '@codecharacter-2024/client'; import { apiConfig, ApiError, authConfig } from '../../api/ApiConfig'; import { User } from './UserSlice'; import Toast, { toast } from 'react-hot-toast'; diff --git a/src/store/editor/code.ts b/src/store/editor/code.ts index 9ffe56a..9e4162a 100644 --- a/src/store/editor/code.ts +++ b/src/store/editor/code.ts @@ -1,4 +1,4 @@ -import { Code } from '@codecharacter-2023/client'; +import { Code } from '@codecharacter-2024/client'; import { createSlice, PayloadAction } from '@reduxjs/toolkit'; import { RootState } from '../store'; import defaultCppCode from '../../assets/codes/cpp/run.cpp?raw'; diff --git a/src/store/rendererLogs/logAPI.ts b/src/store/rendererLogs/logAPI.ts index 2ebab35..cf8fdf7 100644 --- a/src/store/rendererLogs/logAPI.ts +++ b/src/store/rendererLogs/logAPI.ts @@ -1,5 +1,5 @@ import { ApiError, apiConfig } from '../../api/ApiConfig'; -import { GameApi } from '@codecharacter-2023/client'; +import { GameApi } from '@codecharacter-2024/client'; export const getLogs = (id: string): Promise => { return new Promise((resolve, reject) => { diff --git a/src/store/rendererLogs/logSlice.ts b/src/store/rendererLogs/logSlice.ts index 9d703a9..47e3278 100644 --- a/src/store/rendererLogs/logSlice.ts +++ b/src/store/rendererLogs/logSlice.ts @@ -1,4 +1,4 @@ -import { RendererUtils } from '@codecharacter-2023/renderer'; +import { RendererUtils } from '@codecharacter-2024/renderer'; import { createAsyncThunk, createSlice } from '@reduxjs/toolkit'; import { RootState } from '../store'; import { getLogs } from './logAPI'; diff --git a/stories/MapDesigner.stories.tsx b/stories/MapDesigner.stories.tsx index 7377b90..bfa8e84 100644 --- a/stories/MapDesigner.stories.tsx +++ b/stories/MapDesigner.stories.tsx @@ -1,7 +1,7 @@ import { MapDesignerComponent, MapDesignerUtils, -} from '@codecharacter-2023/map-designer'; +} from '@codecharacter-2024/map-designer'; import { ComponentMeta, ComponentStory } from '@storybook/react'; import { withKnobs, object, button } from '@storybook/addon-knobs'; diff --git a/stories/Renderer.stories.tsx b/stories/Renderer.stories.tsx index 47c9701..7bdda01 100644 --- a/stories/Renderer.stories.tsx +++ b/stories/Renderer.stories.tsx @@ -1,4 +1,4 @@ -import { RendererComponent, RendererUtils } from '@codecharacter-2023/renderer'; +import { RendererComponent, RendererUtils } from '@codecharacter-2024/renderer'; import { ComponentMeta, ComponentStory } from '@storybook/react'; import { button, text, withKnobs } from '@storybook/addon-knobs'; diff --git a/yarn.lock b/yarn.lock index f3daf2a..b263086 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1627,17 +1627,17 @@ __metadata: languageName: node linkType: hard -"@codecharacter-2023/client@workspace:packages/client": +"@codecharacter-2024/client@workspace:packages/client": version: 0.0.0-use.local - resolution: "@codecharacter-2023/client@workspace:packages/client" + resolution: "@codecharacter-2024/client@workspace:packages/client" dependencies: typescript: "*" languageName: unknown linkType: soft -"@codecharacter-2023/map-designer@workspace:packages/map-designer": +"@codecharacter-2024/map-designer@workspace:packages/map-designer": version: 0.0.0-use.local - resolution: "@codecharacter-2023/map-designer@workspace:packages/map-designer" + resolution: "@codecharacter-2024/map-designer@workspace:packages/map-designer" dependencies: "@custom-elements-manifest/analyzer": ^0.4.17 "@rollup/plugin-replace": ^3.0.0 @@ -1659,9 +1659,9 @@ __metadata: languageName: unknown linkType: soft -"@codecharacter-2023/renderer@workspace:packages/renderer": +"@codecharacter-2024/renderer@workspace:packages/renderer": version: 0.0.0-use.local - resolution: "@codecharacter-2023/renderer@workspace:packages/renderer" + resolution: "@codecharacter-2024/renderer@workspace:packages/renderer" dependencies: "@custom-elements-manifest/analyzer": ^0.4.17 "@rollup/plugin-replace": ^3.0.0 @@ -1685,14 +1685,14 @@ __metadata: languageName: unknown linkType: soft -"@codecharacter-2023/web@workspace:.": +"@codecharacter-2024/web@workspace:.": version: 0.0.0-use.local - resolution: "@codecharacter-2023/web@workspace:." + resolution: "@codecharacter-2024/web@workspace:." dependencies: "@babel/core": ^7.20.7 - "@codecharacter-2023/client": "workspace:packages/client" - "@codecharacter-2023/map-designer": "workspace:packages/map-designer" - "@codecharacter-2023/renderer": "workspace:packages/renderer" + "@codecharacter-2024/client": "workspace:packages/client" + "@codecharacter-2024/map-designer": "workspace:packages/map-designer" + "@codecharacter-2024/renderer": "workspace:packages/renderer" "@custom-elements-manifest/analyzer": ^0.6.6 "@fortawesome/fontawesome-svg-core": ^6.2.1 "@fortawesome/free-brands-svg-icons": ^6.2.1