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/src/Parameters.ts b/packages/map-designer/src/Parameters.ts index de36de2..23907f2 100644 --- a/packages/map-designer/src/Parameters.ts +++ b/packages/map-designer/src/Parameters.ts @@ -15,9 +15,9 @@ export class Parameters { static mapTileHalfHeight = 200; - static mapTileOffsetX = 200; + static mapTileOffsetX = 250; - static mapTileOffsetY = 256; + static mapTileOffsetY = 260; static totalCoins = 6000; 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/src/scenes/TileMap.ts b/packages/renderer/src/scenes/TileMap.ts index 3c9a395..46ab612 100644 --- a/packages/renderer/src/scenes/TileMap.ts +++ b/packages/renderer/src/scenes/TileMap.ts @@ -283,7 +283,7 @@ export class TileMap extends Phaser.Scene { onComplete: () => bombSprite.destroy(), }); } - tower.healthBar.setHp(newTowerHp); + tower.setHp(newTowerHp); troop.attack(tower.x, tower.y); }, ); 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/public/assets/tower1.png b/public/assets/tower1.png index a14ce41..eff7efb 100644 Binary files a/public/assets/tower1.png and b/public/assets/tower1.png differ diff --git a/public/assets/tower2.png b/public/assets/tower2.png index 26c237b..6431448 100644 Binary files a/public/assets/tower2.png and b/public/assets/tower2.png differ diff --git a/public/assets/tower3.png b/public/assets/tower3.png index 59b9517..16392a9 100644 Binary files a/public/assets/tower3.png and b/public/assets/tower3.png differ 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/assets/deltaMap.png b/src/assets/deltaMap.png new file mode 100644 index 0000000..3b364bd Binary files /dev/null and b/src/assets/deltaMap.png differ 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.module.css b/src/components/BattleTV/BattleTV.module.css index 59b51af..3737720 100644 --- a/src/components/BattleTV/BattleTV.module.css +++ b/src/components/BattleTV/BattleTV.module.css @@ -70,7 +70,7 @@ } .automatch { - background-color: antiquewhite; + background-color: rgba(92, 129, 136, 0.37) !important; } .item .picholder { diff --git a/src/components/BattleTV/BattleTV.tsx b/src/components/BattleTV/BattleTV.tsx index 571c00b..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, @@ -32,6 +32,10 @@ function getIcon(loggedInUser: User, match: Match) { return styles.battlecardwin; } else if (match.matchVerdict == Verdict.Player2) { return styles.battlecardlose; + } else if (match.matchVerdict == Verdict.Success) { + return styles.battlecardwin; + } else if (match.matchVerdict == Verdict.Failure) { + return styles.battlecardlose; } } else { // user is PLAYER2 @@ -110,12 +114,15 @@ function PaginatedItems() { ) : ( currentItems && currentItems.map((match: Match) => ( -
+
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/Editor/Editor.tsx b/src/components/Editor/Editor.tsx index 9c7d517..6b028af 100644 --- a/src/components/Editor/Editor.tsx +++ b/src/components/Editor/Editor.tsx @@ -1,6 +1,6 @@ import * as Editor from './EditorTypes'; import styles from './style.module.css'; -import { useRef, useEffect, useState } from 'react'; +import { useRef, useEffect } from 'react'; import * as monaco from 'monaco-editor'; import { MonacoLanguageClient, @@ -57,7 +57,6 @@ buildWorkerDefinition( export default function CodeEditor(props: Editor.Props): JSX.Element { const divCodeEditor = useRef(null); - let editor: monaco.editor.IStandaloneCodeEditor; const userCode: string = props.page == 'Dashboard' ? useAppSelector(UserCode) @@ -66,11 +65,6 @@ export default function CodeEditor(props: Editor.Props): JSX.Element { const theme: string = useAppSelector(Theme); const autocomplete: boolean = useAppSelector(Autocomplete); const dispatch: React.Dispatch = useAppDispatch(); - const [workspace, setWorkspace] = useState({ - filepath: '', - folderpath: '', - }); - const [currWebsocket, setCurrWebSocket] = useState(); const keyboardHandler = useAppSelector(KeyboardHandler); @@ -94,9 +88,9 @@ export default function CodeEditor(props: Editor.Props): JSX.Element { aliases: ['Java', 'java'], }); - function createLanguageClient( + const createLanguageClient = ( transports: MessageTransports, - ): MonacoLanguageClient { + ): MonacoLanguageClient => { return new MonacoLanguageClient({ name: 'Code Editor Language Client', clientOptions: { @@ -112,49 +106,18 @@ export default function CodeEditor(props: Editor.Props): JSX.Element { }, }, }); - } - - useEffect(() => { - if (!autocomplete) return; - const url = `${lspUrl}/${ - props.language == 'c_cpp' ? 'cpp' : props.language - }`; - const wsClient = new WebSocket(url); - setCurrWebSocket(wsClient); - wsClient.onopen = () => { - const updater = { - operation: 'fileUpdate', - code: userCode, - }; - wsClient.send(JSON.stringify(updater)); - - const filePathRequest = { - operation: 'getAbsPath', - }; - wsClient.send(JSON.stringify(filePathRequest)); - const socket = toSocket(wsClient); - const reader = new WebSocketMessageReader(socket); - reader.listen((message: Message) => { - const fileInfo = message as Message & Editor.Workspace; - setWorkspace({ - filepath: fileInfo.filepath, - folderpath: fileInfo.folderpath, - }); - reader.dispose(); - }); - }; - return () => { - wsClient?.close(1000); - }; - }, [props.language, autocomplete]); + }; - useEffect(() => { - if (!divCodeEditor.current) return; - editor = monaco.editor.create(divCodeEditor.current, { + const createEditor = ( + divref: HTMLDivElement, + workspace: Editor.Workspace | null, + websocket: WebSocket | null, + ) => { + const editor = monaco.editor.create(divref, { model: monaco.editor.createModel( userCode, language == 'c_cpp' ? 'cpp' : language, - monaco.Uri.parse(workspace.filepath), + monaco.Uri.parse(workspace != null ? workspace.filepath : ''), ), fontSize: fontSize, cursorStyle: @@ -181,37 +144,13 @@ export default function CodeEditor(props: Editor.Props): JSX.Element { enabled: true, }, }); - - let languageClient: MonacoLanguageClient; - if (workspace.filepath != '' && currWebsocket != undefined) { - MonacoServices.install({ - workspaceFolders: [ - { - uri: Uri.parse(workspace.folderpath), - name: 'parse folder', - index: 1, - }, - ], - }); - - const socket = toSocket(currWebsocket); - const reader = new WebSocketMessageReader(socket); - const writer = new WebSocketMessageWriter(socket); - languageClient = createLanguageClient({ - reader, - writer, - }); - languageClient.start(); - reader.onClose(() => languageClient.stop()); - } - editor.onDidChangeModelContent(() => { - if (currWebsocket != undefined) { + if (websocket != null) { const currUpdater = { operation: 'fileUpdate', code: editor.getValue(), }; - currWebsocket.send(JSON.stringify(currUpdater)); + websocket.send(JSON.stringify(currUpdater)); } const codeNlanguage: CodeAndLanguage = { currentUserCode: editor.getValue(), @@ -263,46 +202,73 @@ export default function CodeEditor(props: Editor.Props): JSX.Element { }, ); + return editor; + }; + + useEffect(() => { + if (!divCodeEditor.current) return; + let languageClient: MonacoLanguageClient; + let editor: monaco.editor.IStandaloneCodeEditor; + let wsClient: WebSocket; + if (autocomplete) { + const url = `${lspUrl}/${ + props.language == 'c_cpp' ? 'cpp' : props.language + }`; + wsClient = new WebSocket(url); + wsClient.onopen = () => { + const updater = { + operation: 'fileUpdate', + code: userCode, + }; + wsClient.send(JSON.stringify(updater)); + const filePathRequest = { + operation: 'getAbsPath', + }; + wsClient.send(JSON.stringify(filePathRequest)); + const socket = toSocket(wsClient); + const filePathMessageReader = new WebSocketMessageReader(socket); + filePathMessageReader.listen((message: Message) => { + const fileInfo = message as Message & Editor.Workspace; + const workspace: Editor.Workspace = { + filepath: fileInfo.filepath, + folderpath: fileInfo.folderpath, + }; + filePathMessageReader.dispose(); + editor = createEditor( + divCodeEditor.current as HTMLDivElement, + workspace, + wsClient, + ); + MonacoServices.install({ + workspaceFolders: [ + { + uri: Uri.parse(workspace.folderpath), + name: 'Workspace', + index: 1, + }, + ], + }); + const newSocket = toSocket(wsClient); + const writer = new WebSocketMessageWriter(newSocket); + const reader = new WebSocketMessageReader(newSocket); + languageClient = createLanguageClient({ + reader, + writer, + }); + languageClient.start(); + reader.onClose(() => languageClient.stop()); + }); + }; + } else { + editor = createEditor(divCodeEditor.current, null, null); + } return () => { languageClient?.stop(); monaco.editor.getModels().forEach(model => model.dispose()); editor?.dispose(); + wsClient?.close(1000); }; - }, [ - fontSize, - theme, - language, - keyboardHandler, - props.page, - workspace, - currWebsocket, - ]); - - const userCodeChangeHandler = () => { - const codeNlanguage: CodeAndLanguage = { - currentUserCode: editor.getValue(), - currentUserLanguage: language, - }; - dispatch(updateUserCode(codeNlanguage)); - }; - - const dailyChallengeCodechange = () => { - const codeNlanguage: CodeAndLanguage = { - currentUserCode: editor.getValue(), - currentUserLanguage: language, - }; - dispatch(changeDcCode(codeNlanguage)); - }; + }, [fontSize, theme, language, keyboardHandler, props.page, autocomplete]); - return ( -
- ); + return
; } diff --git a/src/components/Home/AboutGame/AboutGame.tsx b/src/components/Home/AboutGame/AboutGame.tsx index 370f321..eeefc63 100644 --- a/src/components/Home/AboutGame/AboutGame.tsx +++ b/src/components/Home/AboutGame/AboutGame.tsx @@ -1,6 +1,6 @@ import styles from './AboutGame.module.css'; import { Container, Row, Col } from 'react-bootstrap'; -import mapimg from './../../../../src/assets/renderer.jpeg'; +import mapimg from './../../../../src/assets/deltaMap.png'; export default function AboutGame(): JSX.Element { return ( diff --git a/src/components/Leaderboard/DailyLeaderboard.tsx b/src/components/Leaderboard/DailyLeaderboard.tsx index ea09de9..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'; @@ -102,7 +102,7 @@ function PaginatedItems() { {' ' + row.userName.substring(0, 10)}
- {row.score} + {row.score.toFixed(2)} ))} diff --git a/src/components/Leaderboard/Leaderboard.module.css b/src/components/Leaderboard/Leaderboard.module.css index ec1fae9..1a5fc60 100644 --- a/src/components/Leaderboard/Leaderboard.module.css +++ b/src/components/Leaderboard/Leaderboard.module.css @@ -121,6 +121,17 @@ margin-right: 5px; border: none; padding: 15px 30px; + max-width: 0.8rem; + overflow-x: auto; +} +.list .item .name::-webkit-scrollbar { + display: none; + overflow-x: scroll; +} + +.list .name .name { + -ms-overflow-style: none; + scrollbar-width: none; } .list .item .score { @@ -169,11 +180,11 @@ padding: 15px 30px; } -.attackButton > img { +.attackButton>img { transition: all 0.3s ease-in-out; } -.attackButton > img:hover { +.attackButton>img:hover { transform: scale(1.15); cursor: pointer; } @@ -203,26 +214,26 @@ list-style: none; } -.menuText{ +.menuText { color: #aaaaaa; font-family: 'Poppins'; } -.menuBackground{ - background-color:#1e1e1e !important; -} +.menuBackground { + background-color: #1e1e1e !important; +} .matchHeader { background-color: #232627; - backdrop-filter: blur(100px); + backdrop-filter: blur(100px); height: 9vh; border: 0px; } -.headerText{ +.headerText { font-family: 'Poppins'; font-size: 28px; - color:#aaaaaa; + color: #aaaaaa; font-weight: bold; } @@ -254,7 +265,8 @@ border-radius: 5px; font-family: 'Poppins'; } -.content{ + +.content { background-color: transparent; } @@ -286,4 +298,4 @@ .dropdown-toggle { color: #aaaaaa; background-color: #ffffff; -} +} \ No newline at end of file diff --git a/src/components/Leaderboard/Leaderboard.tsx b/src/components/Leaderboard/Leaderboard.tsx index 5bfc446..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'; @@ -160,7 +160,9 @@ function PaginatedItems() { className={styles.pic} src={getAvatarByID(row.user.avatarId).url} > - {' ' + row.user.username.substring(0, 10)} + + {' ' + row.user.username.substring(0, 10)} +
@@ -237,6 +239,7 @@ function PaginatedItems() { onClick={() => { setActiveTier(undefined); fetchLeaderboardByTier(0); + setPage(0); }} > All Tiers @@ -246,6 +249,7 @@ function PaginatedItems() { onClick={() => { setActiveTier(TierType.Tier1); fetchLeaderboardByTier(0, TierType.Tier1); + setPage(0); }} > Tier 1 @@ -255,6 +259,7 @@ function PaginatedItems() { onClick={() => { setActiveTier(TierType.Tier2); fetchLeaderboardByTier(0, TierType.Tier2); + setPage(0); }} > Tier 2 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