From b2327438fe2188a63f3067c0ddd89d967e3d467c Mon Sep 17 00:00:00 2001 From: Black Ram <67595890+BlackRam-oss@users.noreply.github.com> Date: Wed, 14 Aug 2024 15:05:14 +0200 Subject: [PATCH 1/6] improve --- src/AppRoutes.tsx | 4 ++-- src/atoms/canGoBackState.ts | 4 ++-- src/atoms/choiceMenuState.ts | 4 ++-- src/atoms/hideNextButtonState.ts | 4 ++-- src/atoms/reloadInterfaceDataEventAtom.ts | 6 ++++++ src/atoms/reloadInterfaceDataEventState.ts | 6 ------ src/interceptors/DialogueDataEventInterceptor.tsx | 4 ++-- src/interceptors/EventInterceptor.tsx | 4 ++-- src/screens/ChoicesMenu.tsx | 4 ++-- src/screens/MainMenu.tsx | 4 ++-- src/screens/QuickActions.tsx | 4 ++-- src/screens/QuickLoadAlert.tsx | 4 ++-- src/screens/Settings.tsx | 4 ++-- 13 files changed, 28 insertions(+), 28 deletions(-) create mode 100644 src/atoms/reloadInterfaceDataEventAtom.ts delete mode 100644 src/atoms/reloadInterfaceDataEventState.ts diff --git a/src/AppRoutes.tsx b/src/AppRoutes.tsx index 9d86388..b9c0b0f 100644 --- a/src/AppRoutes.tsx +++ b/src/AppRoutes.tsx @@ -3,7 +3,7 @@ import { StepLabelProps } from '@drincs/pixi-vn/dist/override'; import { Route, Routes } from 'react-router-dom'; import { useSetRecoilState } from 'recoil'; import { nextStepLoadingState } from './atoms/nextStepLoadingState'; -import { reloadInterfaceDataEventState } from './atoms/reloadInterfaceDataEventState'; +import { reloadInterfaceDataEventAtom } from './atoms/reloadInterfaceDataEventAtom'; import DialogueDataEventInterceptor from './interceptors/DialogueDataEventInterceptor'; import SkipAutoInterceptor from './interceptors/SkipAutoInterceptor'; import Dialogue from './screens/Dialogue'; @@ -14,7 +14,7 @@ import QuickActions from './screens/QuickActions'; import QuickLoadAlert from './screens/QuickLoadAlert'; export default function AppRoutes() { - const notifyReloadInterfaceDataEvent = useSetRecoilState(reloadInterfaceDataEventState); + const notifyReloadInterfaceDataEvent = useSetRecoilState(reloadInterfaceDataEventAtom); const setNextStepLoading = useSetRecoilState(nextStepLoadingState); async function nextOnClick(props: StepLabelProps): Promise { setNextStepLoading(true); diff --git a/src/atoms/canGoBackState.ts b/src/atoms/canGoBackState.ts index 4351921..1cfcd39 100644 --- a/src/atoms/canGoBackState.ts +++ b/src/atoms/canGoBackState.ts @@ -1,12 +1,12 @@ import { GameStepManager } from "@drincs/pixi-vn"; import { selector } from "recoil"; -import { reloadInterfaceDataEventState } from "./reloadInterfaceDataEventState"; +import { reloadInterfaceDataEventAtom } from "./reloadInterfaceDataEventAtom"; export const canGoBackState = selector({ key: 'canGoBackState', get: ({ get }) => { // dipendencies: when the dipendencies change, the selector will re-run - get(reloadInterfaceDataEventState) + get(reloadInterfaceDataEventAtom) return GameStepManager.canGoBack }, diff --git a/src/atoms/choiceMenuState.ts b/src/atoms/choiceMenuState.ts index 1b80b23..d77404b 100644 --- a/src/atoms/choiceMenuState.ts +++ b/src/atoms/choiceMenuState.ts @@ -1,7 +1,7 @@ import { ChoiceMenuOptionsType, getChoiceMenuOptions } from "@drincs/pixi-vn"; import { selector } from "recoil"; import { hideInterfaceState } from "./hideInterfaceState"; -import { reloadInterfaceDataEventState } from "./reloadInterfaceDataEventState"; +import { reloadInterfaceDataEventAtom } from "./reloadInterfaceDataEventAtom"; type ChoiceMenu = { menu: ChoiceMenuOptionsType, @@ -12,7 +12,7 @@ export const choiceMenuState = selector({ key: 'choiceMenuState', get: ({ get }) => { // dipendencies: when the dipendencies change, the selector will re-run - get(reloadInterfaceDataEventState) + get(reloadInterfaceDataEventAtom) let hideInterface = get(hideInterfaceState) let choiceMenu = getChoiceMenuOptions() || [] diff --git a/src/atoms/hideNextButtonState.ts b/src/atoms/hideNextButtonState.ts index 8dab147..5c236e0 100644 --- a/src/atoms/hideNextButtonState.ts +++ b/src/atoms/hideNextButtonState.ts @@ -1,14 +1,14 @@ import { GameStepManager } from "@drincs/pixi-vn"; import { selector } from "recoil"; import { hideInterfaceState } from "./hideInterfaceState"; -import { reloadInterfaceDataEventState } from "./reloadInterfaceDataEventState"; +import { reloadInterfaceDataEventAtom } from "./reloadInterfaceDataEventAtom"; export const hideNextButtonState = selector({ key: 'hideNextButtonState', get: ({ get }) => { // dipendencies: when the dipendencies change, the selector will re-run let hideInterface = get(hideInterfaceState) - get(reloadInterfaceDataEventState) + get(reloadInterfaceDataEventAtom) return hideInterface || !(GameStepManager.canGoNext) }, diff --git a/src/atoms/reloadInterfaceDataEventAtom.ts b/src/atoms/reloadInterfaceDataEventAtom.ts new file mode 100644 index 0000000..42e1894 --- /dev/null +++ b/src/atoms/reloadInterfaceDataEventAtom.ts @@ -0,0 +1,6 @@ +import { atom } from "recoil"; + +export const reloadInterfaceDataEventAtom = atom({ + key: 'reloadInterfaceDataEventAtom', + default: 0, +}); diff --git a/src/atoms/reloadInterfaceDataEventState.ts b/src/atoms/reloadInterfaceDataEventState.ts deleted file mode 100644 index 55ec5ad..0000000 --- a/src/atoms/reloadInterfaceDataEventState.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { atom } from "recoil"; - -export const reloadInterfaceDataEventState = atom({ - key: 'reloadInterfaceDataEventState', - default: 0, -}); diff --git a/src/interceptors/DialogueDataEventInterceptor.tsx b/src/interceptors/DialogueDataEventInterceptor.tsx index 83a1400..1249469 100644 --- a/src/interceptors/DialogueDataEventInterceptor.tsx +++ b/src/interceptors/DialogueDataEventInterceptor.tsx @@ -5,10 +5,10 @@ import { useRecoilState, useRecoilValue, useSetRecoilState } from 'recoil'; import { autoInfoState } from '../atoms/autoInfoState'; import { dialogDataState } from '../atoms/dialogDataState'; import { hideInterfaceState } from '../atoms/hideInterfaceState'; -import { reloadInterfaceDataEventState } from '../atoms/reloadInterfaceDataEventState'; +import { reloadInterfaceDataEventAtom } from '../atoms/reloadInterfaceDataEventAtom'; export default function DialogueDataEventInterceptor() { - const reloadInterfaceDataEvent = useRecoilValue(reloadInterfaceDataEventState); + const reloadInterfaceDataEvent = useRecoilValue(reloadInterfaceDataEventAtom); const { t } = useTranslation(["translation"]); const hideInterface = useRecoilValue(hideInterfaceState) const updateAuto = useSetRecoilState(autoInfoState) diff --git a/src/interceptors/EventInterceptor.tsx b/src/interceptors/EventInterceptor.tsx index bf80860..747160f 100644 --- a/src/interceptors/EventInterceptor.tsx +++ b/src/interceptors/EventInterceptor.tsx @@ -1,12 +1,12 @@ import { useEffect } from 'react'; import { useRecoilState, useSetRecoilState } from 'recoil'; import { hideInterfaceState } from '../atoms/hideInterfaceState'; -import { reloadInterfaceDataEventState } from '../atoms/reloadInterfaceDataEventState'; +import { reloadInterfaceDataEventAtom } from '../atoms/reloadInterfaceDataEventAtom'; import { addRefreshSave, loadRefreshSave } from '../utility/ActionsUtility'; import { useMyNavigate } from '../utility/useMyNavigate'; export default function EventInterceptor() { - const notifyLoadEvent = useSetRecoilState(reloadInterfaceDataEventState); + const notifyLoadEvent = useSetRecoilState(reloadInterfaceDataEventAtom); const [hideInterface, setHideInterface] = useRecoilState(hideInterfaceState); const navigate = useMyNavigate(); diff --git a/src/screens/ChoicesMenu.tsx b/src/screens/ChoicesMenu.tsx index c7eee69..2de5f8b 100644 --- a/src/screens/ChoicesMenu.tsx +++ b/src/screens/ChoicesMenu.tsx @@ -8,7 +8,7 @@ import { useTranslation } from 'react-i18next'; import { useRecoilValue, useSetRecoilState } from 'recoil'; import { choiceMenuState } from '../atoms/choiceMenuState'; import { dialogueCardHeightState } from '../atoms/dialogueCardHeightState'; -import { reloadInterfaceDataEventState } from '../atoms/reloadInterfaceDataEventState'; +import { reloadInterfaceDataEventAtom } from '../atoms/reloadInterfaceDataEventAtom'; import ChoiceButton from '../components/ChoiceButton'; import { useMyNavigate } from '../utility/useMyNavigate'; @@ -26,7 +26,7 @@ export default function ChoicesMenu(props: IProps) { const { t } = useTranslation(["translation"]); const navigate = useMyNavigate(); const { menu, hidden } = useRecoilValue(choiceMenuState) - const notifyReloadInterfaceDataEvent = useSetRecoilState(reloadInterfaceDataEventState); + const notifyReloadInterfaceDataEvent = useSetRecoilState(reloadInterfaceDataEventAtom); const { enqueueSnackbar } = useSnackbar(); const gridVariants: Variants = { open: { diff --git a/src/screens/MainMenu.tsx b/src/screens/MainMenu.tsx index c3bd482..4bfc5d3 100644 --- a/src/screens/MainMenu.tsx +++ b/src/screens/MainMenu.tsx @@ -7,7 +7,7 @@ import { useTranslation } from 'react-i18next'; import { useSetRecoilState } from 'recoil'; import { hideInterfaceState } from '../atoms/hideInterfaceState'; import { openSettingsState } from '../atoms/openSettingsState'; -import { reloadInterfaceDataEventState } from '../atoms/reloadInterfaceDataEventState'; +import { reloadInterfaceDataEventAtom } from '../atoms/reloadInterfaceDataEventAtom'; import MenuButton from '../components/MenuButton'; import { loadGameSave } from '../utility/ActionsUtility'; import { useMyNavigate } from '../utility/useMyNavigate'; @@ -15,7 +15,7 @@ import { useMyNavigate } from '../utility/useMyNavigate'; export default function MainMenu() { const navigate = useMyNavigate(); const setOpenSettings = useSetRecoilState(openSettingsState); - const notifyReloadInterfaceDataEvent = useSetRecoilState(reloadInterfaceDataEventState); + const notifyReloadInterfaceDataEvent = useSetRecoilState(reloadInterfaceDataEventAtom); const setHideInterface = useSetRecoilState(hideInterfaceState); const { enqueueSnackbar } = useSnackbar(); const { t } = useTranslation(["translation"]); diff --git a/src/screens/QuickActions.tsx b/src/screens/QuickActions.tsx index e45884d..b006ab9 100644 --- a/src/screens/QuickActions.tsx +++ b/src/screens/QuickActions.tsx @@ -12,7 +12,7 @@ import { openHistoryState } from '../atoms/openHistoryState'; import { openLoadAlertState } from '../atoms/openLoadAlertState'; import { openSettingsState } from '../atoms/openSettingsState'; import { quickSaveState } from '../atoms/quickSaveState'; -import { reloadInterfaceDataEventState } from '../atoms/reloadInterfaceDataEventState'; +import { reloadInterfaceDataEventAtom } from '../atoms/reloadInterfaceDataEventAtom'; import { skipEnabledState } from '../atoms/skipEnabledState'; import TextMenuButton from '../components/TextMenuButton'; import { goBack, loadGameSave, saveGame } from '../utility/ActionsUtility'; @@ -22,7 +22,7 @@ export default function QuickActions() { const setOpenSettings = useSetRecoilState(openSettingsState); const setOpenHistory = useSetRecoilState(openHistoryState); const navigate = useMyNavigate(); - const notifyLoadEvent = useSetRecoilState(reloadInterfaceDataEventState); + const notifyLoadEvent = useSetRecoilState(reloadInterfaceDataEventAtom); const setOpenLoadAlert = useSetRecoilState(openLoadAlertState); const { t } = useTranslation(["translation"]); const [hideInterface, setHideInterface] = useRecoilState(hideInterfaceState); diff --git a/src/screens/QuickLoadAlert.tsx b/src/screens/QuickLoadAlert.tsx index 5746ba8..f28dbb3 100644 --- a/src/screens/QuickLoadAlert.tsx +++ b/src/screens/QuickLoadAlert.tsx @@ -7,14 +7,14 @@ import { useTranslation } from 'react-i18next'; import { useRecoilState, useSetRecoilState } from 'recoil'; import { openLoadAlertState } from '../atoms/openLoadAlertState'; import { quickSaveState } from '../atoms/quickSaveState'; -import { reloadInterfaceDataEventState } from '../atoms/reloadInterfaceDataEventState'; +import { reloadInterfaceDataEventAtom } from '../atoms/reloadInterfaceDataEventAtom'; import ModalDialogCustom from '../components/ModalDialog'; import { loadQuickSave } from '../utility/ActionsUtility'; import { useMyNavigate } from '../utility/useMyNavigate'; export default function QuickLoadAlert() { const navigate = useMyNavigate(); - const notifyLoadEvent = useSetRecoilState(reloadInterfaceDataEventState); + const notifyLoadEvent = useSetRecoilState(reloadInterfaceDataEventAtom); const [open, setOpen] = useRecoilState(openLoadAlertState); const { t } = useTranslation(["translation"]); const [quickSave, setQuickSave] = useRecoilState(quickSaveState) diff --git a/src/screens/Settings.tsx b/src/screens/Settings.tsx index 7cd97ff..2b637fe 100644 --- a/src/screens/Settings.tsx +++ b/src/screens/Settings.tsx @@ -27,7 +27,7 @@ import { openHistoryState } from '../atoms/openHistoryState'; import { openLoadAlertState } from '../atoms/openLoadAlertState'; import { openSettingsState } from '../atoms/openSettingsState'; import { quickSaveState } from '../atoms/quickSaveState'; -import { reloadInterfaceDataEventState } from '../atoms/reloadInterfaceDataEventState'; +import { reloadInterfaceDataEventAtom } from '../atoms/reloadInterfaceDataEventAtom'; import { skipEnabledState } from '../atoms/skipEnabledState'; import { typewriterDelayState } from '../atoms/typewriterDelayState'; import ModalDialogCustom from '../components/ModalDialog'; @@ -51,7 +51,7 @@ export default function Settings() { const setOpenHistory = useSetRecoilState(openHistoryState); const setOpenLoadAlert = useSetRecoilState(openLoadAlertState); const [hideInterface, setHideInterface] = useRecoilState(hideInterfaceState); - const notifyLoadEvent = useSetRecoilState(reloadInterfaceDataEventState); + const notifyLoadEvent = useSetRecoilState(reloadInterfaceDataEventAtom); const [quickSave, setQuickSave] = useRecoilState(quickSaveState) const { enqueueSnackbar } = useSnackbar(); const smScreen = useMediaQuery((theme: Theme) => theme.breakpoints.down('sm')); From a434d3c7aa6e3521da40e35adc1b6bd71c895573 Mon Sep 17 00:00:00 2001 From: Black Ram <67595890+BlackRam-oss@users.noreply.github.com> Date: Wed, 21 Aug 2024 00:10:00 +0200 Subject: [PATCH 2/6] update --- package-lock.json | 337 ++++++++++++++++++++++------------------ package.json | 18 +-- src/main.tsx | 10 +- src/screens/History.tsx | 4 +- 4 files changed, 199 insertions(+), 170 deletions(-) diff --git a/package-lock.json b/package-lock.json index 1ed2a71..a7e2315 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8,13 +8,13 @@ "name": "my-app", "version": "0.1.0", "dependencies": { - "@drincs/pixi-vn": "^0.6.14", + "@drincs/pixi-vn": "^0.6.16", "@emotion/react": "^11.13.0", "@emotion/styled": "^11.13.0", "@mui/icons-material": "^5.16.7", "@mui/joy": "^5.0.0-beta.28", - "framer-motion": "^11.3.24", - "i18next": "^23.12.2", + "framer-motion": "^11.3.28", + "i18next": "^23.14.0", "i18next-browser-languagedetector": "^8.0.0", "notistack": "^3.0.1", "react": "^18.3.1", @@ -23,7 +23,7 @@ "react-error-boundary": "^4.0.13", "react-i18next": "^15.0.1", "react-markdown": "^9.0.1", - "react-router-dom": "^6.26.0", + "react-router-dom": "^6.26.1", "recoil": "^0.7.7", "rehype-raw": "^7.0.0", "remark-gfm": "^4.0.0", @@ -31,17 +31,17 @@ "vite-plugin-checker": "^0.7.2" }, "devDependencies": { - "@types/react": "^18.3.3", + "@types/react": "^18.3.4", "@types/react-color": "^3.0.12", "@types/react-dom": "^18.3.0", - "@typescript-eslint/eslint-plugin": "^8.0.1", - "@typescript-eslint/parser": "^8.0.1", + "@typescript-eslint/eslint-plugin": "^8.2.0", + "@typescript-eslint/parser": "^8.2.0", "@vitejs/plugin-react": "^4.3.1", "eslint": "^8.57.0", "eslint-plugin-react-hooks": "^4.6.2", - "eslint-plugin-react-refresh": "^0.4.9", + "eslint-plugin-react-refresh": "^0.4.10", "typescript": "^5.5.4", - "vite": "^5.4.0", + "vite": "^5.4.2", "vite-plugin-pwa": "^0.20.1" } }, @@ -1804,15 +1804,16 @@ } }, "node_modules/@drincs/pixi-vn": { - "version": "0.6.14", - "resolved": "https://registry.npmjs.org/@drincs/pixi-vn/-/pixi-vn-0.6.14.tgz", - "integrity": "sha512-gnPgqHndvnknH149vPZgfcnuLBGudzhMNSbvgbDXSV1R0X6aY0pP7t8IhCkzNGKJc5vZYaczF5gvD7AaKW+MzA==", + "version": "0.6.16", + "resolved": "https://registry.npmjs.org/@drincs/pixi-vn/-/pixi-vn-0.6.16.tgz", + "integrity": "sha512-nzeON67/DytBLZdVjrALxZ6vG6+4I6b8eLQmxsJKAgB7wO/SsRsgFJpFxPy0HP/6GCn3jyJn8ZLuiD+qLV2BlA==", "license": "GPL-3.0", "dependencies": { "@pixi/devtools": "^2.0.1", + "@pixi/sound": "^6.0.1", "crypto-js": "^4.2.0", "deep-diff": "^1.0.2", - "pixi.js": "^8.3.2" + "pixi.js": "^8.3.3" }, "funding": { "url": "https://github.com/DRincs-Productions/pixi-vn?sponsor=1" @@ -2898,6 +2899,15 @@ "pixi.js": "^7 || ^8" } }, + "node_modules/@pixi/sound": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/@pixi/sound/-/sound-6.0.1.tgz", + "integrity": "sha512-hpFlQSScAR2L/CsEoIvDi7s1oGsu8y9Zd742Vd3982N+q3IF2vFuIfV9HN4ryjlGnhCT8yBlEgs1gp4G9Rt9TA==", + "license": "MIT", + "peerDependencies": { + "pixi.js": "^8.0.0" + } + }, "node_modules/@popperjs/core": { "version": "2.11.8", "resolved": "https://registry.npmjs.org/@popperjs/core/-/core-2.11.8.tgz", @@ -2908,9 +2918,9 @@ } }, "node_modules/@remix-run/router": { - "version": "1.19.0", - "resolved": "https://registry.npmjs.org/@remix-run/router/-/router-1.19.0.tgz", - "integrity": "sha512-zDICCLKEwbVYTS6TjYaWtHXxkdoUvD/QXvyVZjGCsWz5vyH7aFeONlPffPdW+Y/t6KT0MgXb2Mfjun9YpWN1dA==", + "version": "1.19.1", + "resolved": "https://registry.npmjs.org/@remix-run/router/-/router-1.19.1.tgz", + "integrity": "sha512-S45oynt/WH19bHbIXjtli6QmwNYvaz+vtnubvNpNDvUOoA/OWh6j1OikIP3G+v5GHdxyC6EXoChG3HgYGEUfcg==", "license": "MIT", "engines": { "node": ">=14.0.0" @@ -2986,192 +2996,208 @@ } }, "node_modules/@rollup/rollup-android-arm-eabi": { - "version": "4.18.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.18.1.tgz", - "integrity": "sha512-lncuC4aHicncmbORnx+dUaAgzee9cm/PbIqgWz1PpXuwc+sa1Ct83tnqUDy/GFKleLiN7ZIeytM6KJ4cAn1SxA==", + "version": "4.21.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.21.0.tgz", + "integrity": "sha512-WTWD8PfoSAJ+qL87lE7votj3syLavxunWhzCnx3XFxFiI/BA/r3X7MUM8dVrH8rb2r4AiO8jJsr3ZjdaftmnfA==", "cpu": [ "arm" ], + "license": "MIT", "optional": true, "os": [ "android" ] }, "node_modules/@rollup/rollup-android-arm64": { - "version": "4.18.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.18.1.tgz", - "integrity": "sha512-F/tkdw0WSs4ojqz5Ovrw5r9odqzFjb5LIgHdHZG65dFI1lWTWRVy32KDJLKRISHgJvqUeUhdIvy43fX41znyDg==", + "version": "4.21.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.21.0.tgz", + "integrity": "sha512-a1sR2zSK1B4eYkiZu17ZUZhmUQcKjk2/j9Me2IDjk1GHW7LB5Z35LEzj9iJch6gtUfsnvZs1ZNyDW2oZSThrkA==", "cpu": [ "arm64" ], + "license": "MIT", "optional": true, "os": [ "android" ] }, "node_modules/@rollup/rollup-darwin-arm64": { - "version": "4.18.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.18.1.tgz", - "integrity": "sha512-vk+ma8iC1ebje/ahpxpnrfVQJibTMyHdWpOGZ3JpQ7Mgn/3QNHmPq7YwjZbIE7km73dH5M1e6MRRsnEBW7v5CQ==", + "version": "4.21.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.21.0.tgz", + "integrity": "sha512-zOnKWLgDld/svhKO5PD9ozmL6roy5OQ5T4ThvdYZLpiOhEGY+dp2NwUmxK0Ld91LrbjrvtNAE0ERBwjqhZTRAA==", "cpu": [ "arm64" ], + "license": "MIT", "optional": true, "os": [ "darwin" ] }, "node_modules/@rollup/rollup-darwin-x64": { - "version": "4.18.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.18.1.tgz", - "integrity": "sha512-IgpzXKauRe1Tafcej9STjSSuG0Ghu/xGYH+qG6JwsAUxXrnkvNHcq/NL6nz1+jzvWAnQkuAJ4uIwGB48K9OCGA==", + "version": "4.21.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.21.0.tgz", + "integrity": "sha512-7doS8br0xAkg48SKE2QNtMSFPFUlRdw9+votl27MvT46vo44ATBmdZdGysOevNELmZlfd+NEa0UYOA8f01WSrg==", "cpu": [ "x64" ], + "license": "MIT", "optional": true, "os": [ "darwin" ] }, "node_modules/@rollup/rollup-linux-arm-gnueabihf": { - "version": "4.18.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.18.1.tgz", - "integrity": "sha512-P9bSiAUnSSM7EmyRK+e5wgpqai86QOSv8BwvkGjLwYuOpaeomiZWifEos517CwbG+aZl1T4clSE1YqqH2JRs+g==", + "version": "4.21.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.21.0.tgz", + "integrity": "sha512-pWJsfQjNWNGsoCq53KjMtwdJDmh/6NubwQcz52aEwLEuvx08bzcy6tOUuawAOncPnxz/3siRtd8hiQ32G1y8VA==", "cpu": [ "arm" ], + "license": "MIT", "optional": true, "os": [ "linux" ] }, "node_modules/@rollup/rollup-linux-arm-musleabihf": { - "version": "4.18.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.18.1.tgz", - "integrity": "sha512-5RnjpACoxtS+aWOI1dURKno11d7krfpGDEn19jI8BuWmSBbUC4ytIADfROM1FZrFhQPSoP+KEa3NlEScznBTyQ==", + "version": "4.21.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.21.0.tgz", + "integrity": "sha512-efRIANsz3UHZrnZXuEvxS9LoCOWMGD1rweciD6uJQIx2myN3a8Im1FafZBzh7zk1RJ6oKcR16dU3UPldaKd83w==", "cpu": [ "arm" ], + "license": "MIT", "optional": true, "os": [ "linux" ] }, "node_modules/@rollup/rollup-linux-arm64-gnu": { - "version": "4.18.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.18.1.tgz", - "integrity": "sha512-8mwmGD668m8WaGbthrEYZ9CBmPug2QPGWxhJxh/vCgBjro5o96gL04WLlg5BA233OCWLqERy4YUzX3bJGXaJgQ==", + "version": "4.21.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.21.0.tgz", + "integrity": "sha512-ZrPhydkTVhyeGTW94WJ8pnl1uroqVHM3j3hjdquwAcWnmivjAwOYjTEAuEDeJvGX7xv3Z9GAvrBkEzCgHq9U1w==", "cpu": [ "arm64" ], + "license": "MIT", "optional": true, "os": [ "linux" ] }, "node_modules/@rollup/rollup-linux-arm64-musl": { - "version": "4.18.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.18.1.tgz", - "integrity": "sha512-dJX9u4r4bqInMGOAQoGYdwDP8lQiisWb9et+T84l2WXk41yEej8v2iGKodmdKimT8cTAYt0jFb+UEBxnPkbXEQ==", + "version": "4.21.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.21.0.tgz", + "integrity": "sha512-cfaupqd+UEFeURmqNP2eEvXqgbSox/LHOyN9/d2pSdV8xTrjdg3NgOFJCtc1vQ/jEke1qD0IejbBfxleBPHnPw==", "cpu": [ "arm64" ], + "license": "MIT", "optional": true, "os": [ "linux" ] }, "node_modules/@rollup/rollup-linux-powerpc64le-gnu": { - "version": "4.18.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.18.1.tgz", - "integrity": "sha512-V72cXdTl4EI0x6FNmho4D502sy7ed+LuVW6Ym8aI6DRQ9hQZdp5sj0a2usYOlqvFBNKQnLQGwmYnujo2HvjCxQ==", + "version": "4.21.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.21.0.tgz", + "integrity": "sha512-ZKPan1/RvAhrUylwBXC9t7B2hXdpb/ufeu22pG2psV7RN8roOfGurEghw1ySmX/CmDDHNTDDjY3lo9hRlgtaHg==", "cpu": [ "ppc64" ], + "license": "MIT", "optional": true, "os": [ "linux" ] }, "node_modules/@rollup/rollup-linux-riscv64-gnu": { - "version": "4.18.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.18.1.tgz", - "integrity": "sha512-f+pJih7sxoKmbjghrM2RkWo2WHUW8UbfxIQiWo5yeCaCM0TveMEuAzKJte4QskBp1TIinpnRcxkquY+4WuY/tg==", + "version": "4.21.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.21.0.tgz", + "integrity": "sha512-H1eRaCwd5E8eS8leiS+o/NqMdljkcb1d6r2h4fKSsCXQilLKArq6WS7XBLDu80Yz+nMqHVFDquwcVrQmGr28rg==", "cpu": [ "riscv64" ], + "license": "MIT", "optional": true, "os": [ "linux" ] }, "node_modules/@rollup/rollup-linux-s390x-gnu": { - "version": "4.18.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.18.1.tgz", - "integrity": "sha512-qb1hMMT3Fr/Qz1OKovCuUM11MUNLUuHeBC2DPPAWUYYUAOFWaxInaTwTQmc7Fl5La7DShTEpmYwgdt2hG+4TEg==", + "version": "4.21.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.21.0.tgz", + "integrity": "sha512-zJ4hA+3b5tu8u7L58CCSI0A9N1vkfwPhWd/puGXwtZlsB5bTkwDNW/+JCU84+3QYmKpLi+XvHdmrlwUwDA6kqw==", "cpu": [ "s390x" ], + "license": "MIT", "optional": true, "os": [ "linux" ] }, "node_modules/@rollup/rollup-linux-x64-gnu": { - "version": "4.18.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.18.1.tgz", - "integrity": "sha512-7O5u/p6oKUFYjRbZkL2FLbwsyoJAjyeXHCU3O4ndvzg2OFO2GinFPSJFGbiwFDaCFc+k7gs9CF243PwdPQFh5g==", + "version": "4.21.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.21.0.tgz", + "integrity": "sha512-e2hrvElFIh6kW/UNBQK/kzqMNY5mO+67YtEh9OA65RM5IJXYTWiXjX6fjIiPaqOkBthYF1EqgiZ6OXKcQsM0hg==", "cpu": [ "x64" ], + "license": "MIT", "optional": true, "os": [ "linux" ] }, "node_modules/@rollup/rollup-linux-x64-musl": { - "version": "4.18.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.18.1.tgz", - "integrity": "sha512-pDLkYITdYrH/9Cv/Vlj8HppDuLMDUBmgsM0+N+xLtFd18aXgM9Nyqupb/Uw+HeidhfYg2lD6CXvz6CjoVOaKjQ==", + "version": "4.21.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.21.0.tgz", + "integrity": "sha512-1vvmgDdUSebVGXWX2lIcgRebqfQSff0hMEkLJyakQ9JQUbLDkEaMsPTLOmyccyC6IJ/l3FZuJbmrBw/u0A0uCQ==", "cpu": [ "x64" ], + "license": "MIT", "optional": true, "os": [ "linux" ] }, "node_modules/@rollup/rollup-win32-arm64-msvc": { - "version": "4.18.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.18.1.tgz", - "integrity": "sha512-W2ZNI323O/8pJdBGil1oCauuCzmVd9lDmWBBqxYZcOqWD6aWqJtVBQ1dFrF4dYpZPks6F+xCZHfzG5hYlSHZ6g==", + "version": "4.21.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.21.0.tgz", + "integrity": "sha512-s5oFkZ/hFcrlAyBTONFY1TWndfyre1wOMwU+6KCpm/iatybvrRgmZVM+vCFwxmC5ZhdlgfE0N4XorsDpi7/4XQ==", "cpu": [ "arm64" ], + "license": "MIT", "optional": true, "os": [ "win32" ] }, "node_modules/@rollup/rollup-win32-ia32-msvc": { - "version": "4.18.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.18.1.tgz", - "integrity": "sha512-ELfEX1/+eGZYMaCIbK4jqLxO1gyTSOIlZr6pbC4SRYFaSIDVKOnZNMdoZ+ON0mrFDp4+H5MhwNC1H/AhE3zQLg==", + "version": "4.21.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.21.0.tgz", + "integrity": "sha512-G9+TEqRnAA6nbpqyUqgTiopmnfgnMkR3kMukFBDsiyy23LZvUCpiUwjTRx6ezYCjJODXrh52rBR9oXvm+Fp5wg==", "cpu": [ "ia32" ], + "license": "MIT", "optional": true, "os": [ "win32" ] }, "node_modules/@rollup/rollup-win32-x64-msvc": { - "version": "4.18.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.18.1.tgz", - "integrity": "sha512-yjk2MAkQmoaPYCSu35RLJ62+dz358nE83VfTePJRp8CG7aMg25mEJYpXFiD+NcevhX8LxD5OP5tktPXnXN7GDw==", + "version": "4.21.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.21.0.tgz", + "integrity": "sha512-2jsCDZwtQvRhejHLfZ1JY6w6kEuEtfF9nzYsZxzSlNVKDX+DpsDJ+Rbjkm74nvg2rdx0gwBS+IMdvwJuq3S9pQ==", "cpu": [ "x64" ], + "license": "MIT", "optional": true, "os": [ "win32" @@ -3295,9 +3321,10 @@ "integrity": "sha512-5zvhXYtRNRluoE/jAp4GVsSduVUzNWKkOZrCDBWYtE7biZywwdC2AcEzg+cSMLFRfVgeAFqpfNabiPjxFddV1Q==" }, "node_modules/@types/react": { - "version": "18.3.3", - "resolved": "https://registry.npmjs.org/@types/react/-/react-18.3.3.tgz", - "integrity": "sha512-hti/R0pS0q1/xx+TsI73XIqk26eBsISZ2R0wUijXIngRK9R/e7Xw/cXVxQK7R5JjW+SV4zGcn5hXjudkN/pLIw==", + "version": "18.3.4", + "resolved": "https://registry.npmjs.org/@types/react/-/react-18.3.4.tgz", + "integrity": "sha512-J7W30FTdfCxDDjmfRM+/JqLHBIyl7xUIp9kwK637FGmY7+mkSFSe6L4jpZzhj5QMfLssSDP4/i75AKkrdC7/Jw==", + "license": "MIT", "dependencies": { "@types/prop-types": "*", "csstype": "^3.0.2" @@ -3358,17 +3385,17 @@ "integrity": "sha512-dqId9J8K/vGi5Zr7oo212BGii5m3q5Hxlkwy3WpYuKPklmBEvsbMYYyLxAQpSffdLl/gdW0XUpKWFvYmyoWCoQ==" }, "node_modules/@typescript-eslint/eslint-plugin": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.0.1.tgz", - "integrity": "sha512-5g3Y7GDFsJAnY4Yhvk8sZtFfV6YNF2caLzjrRPUBzewjPCaj0yokePB4LJSobyCzGMzjZZYFbwuzbfDHlimXbQ==", + "version": "8.2.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.2.0.tgz", + "integrity": "sha512-02tJIs655em7fvt9gps/+4k4OsKULYGtLBPJfOsmOq1+3cdClYiF0+d6mHu6qDnTcg88wJBkcPLpQhq7FyDz0A==", "dev": true, "license": "MIT", "dependencies": { "@eslint-community/regexpp": "^4.10.0", - "@typescript-eslint/scope-manager": "8.0.1", - "@typescript-eslint/type-utils": "8.0.1", - "@typescript-eslint/utils": "8.0.1", - "@typescript-eslint/visitor-keys": "8.0.1", + "@typescript-eslint/scope-manager": "8.2.0", + "@typescript-eslint/type-utils": "8.2.0", + "@typescript-eslint/utils": "8.2.0", + "@typescript-eslint/visitor-keys": "8.2.0", "graphemer": "^1.4.0", "ignore": "^5.3.1", "natural-compare": "^1.4.0", @@ -3392,16 +3419,16 @@ } }, "node_modules/@typescript-eslint/parser": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.0.1.tgz", - "integrity": "sha512-5IgYJ9EO/12pOUwiBKFkpU7rS3IU21mtXzB81TNwq2xEybcmAZrE9qwDtsb5uQd9aVO9o0fdabFyAmKveXyujg==", + "version": "8.2.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.2.0.tgz", + "integrity": "sha512-j3Di+o0lHgPrb7FxL3fdEy6LJ/j2NE8u+AP/5cQ9SKb+JLH6V6UHDqJ+e0hXBkHP1wn1YDFjYCS9LBQsZDlDEg==", "dev": true, "license": "BSD-2-Clause", "dependencies": { - "@typescript-eslint/scope-manager": "8.0.1", - "@typescript-eslint/types": "8.0.1", - "@typescript-eslint/typescript-estree": "8.0.1", - "@typescript-eslint/visitor-keys": "8.0.1", + "@typescript-eslint/scope-manager": "8.2.0", + "@typescript-eslint/types": "8.2.0", + "@typescript-eslint/typescript-estree": "8.2.0", + "@typescript-eslint/visitor-keys": "8.2.0", "debug": "^4.3.4" }, "engines": { @@ -3421,14 +3448,14 @@ } }, "node_modules/@typescript-eslint/scope-manager": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.0.1.tgz", - "integrity": "sha512-NpixInP5dm7uukMiRyiHjRKkom5RIFA4dfiHvalanD2cF0CLUuQqxfg8PtEUo9yqJI2bBhF+pcSafqnG3UBnRQ==", + "version": "8.2.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.2.0.tgz", + "integrity": "sha512-OFn80B38yD6WwpoHU2Tz/fTz7CgFqInllBoC3WP+/jLbTb4gGPTy9HBSTsbDWkMdN55XlVU0mMDYAtgvlUspGw==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/types": "8.0.1", - "@typescript-eslint/visitor-keys": "8.0.1" + "@typescript-eslint/types": "8.2.0", + "@typescript-eslint/visitor-keys": "8.2.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -3439,14 +3466,14 @@ } }, "node_modules/@typescript-eslint/type-utils": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.0.1.tgz", - "integrity": "sha512-+/UT25MWvXeDX9YaHv1IS6KI1fiuTto43WprE7pgSMswHbn1Jm9GEM4Txp+X74ifOWV8emu2AWcbLhpJAvD5Ng==", + "version": "8.2.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.2.0.tgz", + "integrity": "sha512-g1CfXGFMQdT5S+0PSO0fvGXUaiSkl73U1n9LTK5aRAFnPlJ8dLKkXr4AaLFvPedW8lVDoMgLLE3JN98ZZfsj0w==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/typescript-estree": "8.0.1", - "@typescript-eslint/utils": "8.0.1", + "@typescript-eslint/typescript-estree": "8.2.0", + "@typescript-eslint/utils": "8.2.0", "debug": "^4.3.4", "ts-api-utils": "^1.3.0" }, @@ -3464,9 +3491,9 @@ } }, "node_modules/@typescript-eslint/types": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.0.1.tgz", - "integrity": "sha512-PpqTVT3yCA/bIgJ12czBuE3iBlM3g4inRSC5J0QOdQFAn07TYrYEQBBKgXH1lQpglup+Zy6c1fxuwTk4MTNKIw==", + "version": "8.2.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.2.0.tgz", + "integrity": "sha512-6a9QSK396YqmiBKPkJtxsgZZZVjYQ6wQ/TlI0C65z7vInaETuC6HAHD98AGLC8DyIPqHytvNuS8bBVvNLKyqvQ==", "dev": true, "license": "MIT", "engines": { @@ -3478,14 +3505,14 @@ } }, "node_modules/@typescript-eslint/typescript-estree": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.0.1.tgz", - "integrity": "sha512-8V9hriRvZQXPWU3bbiUV4Epo7EvgM6RTs+sUmxp5G//dBGy402S7Fx0W0QkB2fb4obCF8SInoUzvTYtc3bkb5w==", + "version": "8.2.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.2.0.tgz", + "integrity": "sha512-kiG4EDUT4dImplOsbh47B1QnNmXSoUqOjWDvCJw/o8LgfD0yr7k2uy54D5Wm0j4t71Ge1NkynGhpWdS0dEIAUA==", "dev": true, "license": "BSD-2-Clause", "dependencies": { - "@typescript-eslint/types": "8.0.1", - "@typescript-eslint/visitor-keys": "8.0.1", + "@typescript-eslint/types": "8.2.0", + "@typescript-eslint/visitor-keys": "8.2.0", "debug": "^4.3.4", "globby": "^11.1.0", "is-glob": "^4.0.3", @@ -3507,16 +3534,16 @@ } }, "node_modules/@typescript-eslint/utils": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.0.1.tgz", - "integrity": "sha512-CBFR0G0sCt0+fzfnKaciu9IBsKvEKYwN9UZ+eeogK1fYHg4Qxk1yf/wLQkLXlq8wbU2dFlgAesxt8Gi76E8RTA==", + "version": "8.2.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.2.0.tgz", + "integrity": "sha512-O46eaYKDlV3TvAVDNcoDzd5N550ckSe8G4phko++OCSC1dYIb9LTc3HDGYdWqWIAT5qDUKphO6sd9RrpIJJPfg==", "dev": true, "license": "MIT", "dependencies": { "@eslint-community/eslint-utils": "^4.4.0", - "@typescript-eslint/scope-manager": "8.0.1", - "@typescript-eslint/types": "8.0.1", - "@typescript-eslint/typescript-estree": "8.0.1" + "@typescript-eslint/scope-manager": "8.2.0", + "@typescript-eslint/types": "8.2.0", + "@typescript-eslint/typescript-estree": "8.2.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -3530,13 +3557,13 @@ } }, "node_modules/@typescript-eslint/visitor-keys": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.0.1.tgz", - "integrity": "sha512-W5E+o0UfUcK5EgchLZsyVWqARmsM7v54/qEq6PY3YI5arkgmCzHiuk0zKSJJbm71V0xdRna4BGomkCTXz2/LkQ==", + "version": "8.2.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.2.0.tgz", + "integrity": "sha512-sbgsPMW9yLvS7IhCi8IpuK1oBmtbWUNP+hBdwl/I9nzqVsszGnNGti5r9dUtF5RLivHUFFIdRvLiTsPhzSyJ3Q==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/types": "8.0.1", + "@typescript-eslint/types": "8.2.0", "eslint-visitor-keys": "^3.4.3" }, "engines": { @@ -4662,9 +4689,9 @@ } }, "node_modules/eslint-plugin-react-refresh": { - "version": "0.4.9", - "resolved": "https://registry.npmjs.org/eslint-plugin-react-refresh/-/eslint-plugin-react-refresh-0.4.9.tgz", - "integrity": "sha512-QK49YrBAo5CLNLseZ7sZgvgTy21E6NEw22eZqc4teZfH8pxV3yXc9XXOYfUI6JNpw7mfHNkAeWtBxrTyykB6HA==", + "version": "0.4.10", + "resolved": "https://registry.npmjs.org/eslint-plugin-react-refresh/-/eslint-plugin-react-refresh-0.4.10.tgz", + "integrity": "sha512-I39s6G9We7ZxbCRxTTM5XX4KJV2cfWhFbHF4kTuL0ygdEVdQXtCNGqUQ43sBOCbTC/N6dEZXoQKFHr8gp1VHrQ==", "dev": true, "license": "MIT", "peerDependencies": { @@ -5064,9 +5091,9 @@ } }, "node_modules/framer-motion": { - "version": "11.3.24", - "resolved": "https://registry.npmjs.org/framer-motion/-/framer-motion-11.3.24.tgz", - "integrity": "sha512-kl0YI7HwAtyV0VOAWuU/rXoOS8+z5qSkMN6rZS+a9oe6fIha6SC3vjJN6u/hBpvjrg5MQNdSnqnjYxm0WYTX9g==", + "version": "11.3.28", + "resolved": "https://registry.npmjs.org/framer-motion/-/framer-motion-11.3.28.tgz", + "integrity": "sha512-dqhoawipEAjqdv32zbv72sOMJZjol7dROWn7t/FOq23WXJ40O4OUybgnO2ldnuS+3YquSn8xO/KKRavZ+TBVOQ==", "license": "MIT", "dependencies": { "tslib": "^2.4.0" @@ -5588,9 +5615,9 @@ } }, "node_modules/i18next": { - "version": "23.12.2", - "resolved": "https://registry.npmjs.org/i18next/-/i18next-23.12.2.tgz", - "integrity": "sha512-XIeh5V+bi8SJSWGL3jqbTEBW5oD6rbP5L+E7dVQh1MNTxxYef0x15rhJVcRb7oiuq4jLtgy2SD8eFlf6P2cmqg==", + "version": "23.14.0", + "resolved": "https://registry.npmjs.org/i18next/-/i18next-23.14.0.tgz", + "integrity": "sha512-Y5GL4OdA8IU2geRrt2+Uc1iIhsjICdHZzT9tNwQ3TVqdNzgxHToGCKf/TPRP80vTCAP6svg2WbbJL+Gx5MFQVA==", "funding": [ { "type": "individual", @@ -5605,6 +5632,7 @@ "url": "https://www.i18next.com/how-to/faq#i18next-is-awesome.-how-can-i-support-the-project" } ], + "license": "MIT", "dependencies": { "@babel/runtime": "^7.23.2" } @@ -7561,9 +7589,9 @@ } }, "node_modules/pixi.js": { - "version": "8.3.2", - "resolved": "https://registry.npmjs.org/pixi.js/-/pixi.js-8.3.2.tgz", - "integrity": "sha512-z9/aADIGV8IqCD/pd1WuzNQWAnNG229Uj/EvMrVtJMMGOzGGN5Qr6seMdjzoOJtTQsR+eKu8Ftr5KNFEfCsriw==", + "version": "8.3.3", + "resolved": "https://registry.npmjs.org/pixi.js/-/pixi.js-8.3.3.tgz", + "integrity": "sha512-dpucBKAqEm0K51MQKlXvyIJ40bcxniP82uz4ZPEQejGtPp0P+vueuG5DyArHCkC48mkVE2FEDvyYvBa45/JlQg==", "license": "MIT", "dependencies": { "@pixi/colord": "^2.9.6", @@ -7809,12 +7837,12 @@ } }, "node_modules/react-router": { - "version": "6.26.0", - "resolved": "https://registry.npmjs.org/react-router/-/react-router-6.26.0.tgz", - "integrity": "sha512-wVQq0/iFYd3iZ9H2l3N3k4PL8EEHcb0XlU2Na8nEwmiXgIUElEH6gaJDtUQxJ+JFzmIXaQjfdpcGWaM6IoQGxg==", + "version": "6.26.1", + "resolved": "https://registry.npmjs.org/react-router/-/react-router-6.26.1.tgz", + "integrity": "sha512-kIwJveZNwp7teQRI5QmwWo39A5bXRyqpH0COKKmPnyD2vBvDwgFXSqDUYtt1h+FEyfnE8eXr7oe0MxRzVwCcvQ==", "license": "MIT", "dependencies": { - "@remix-run/router": "1.19.0" + "@remix-run/router": "1.19.1" }, "engines": { "node": ">=14.0.0" @@ -7824,13 +7852,13 @@ } }, "node_modules/react-router-dom": { - "version": "6.26.0", - "resolved": "https://registry.npmjs.org/react-router-dom/-/react-router-dom-6.26.0.tgz", - "integrity": "sha512-RRGUIiDtLrkX3uYcFiCIxKFWMcWQGMojpYZfcstc63A1+sSnVgILGIm9gNUA6na3Fm1QuPGSBQH2EMbAZOnMsQ==", + "version": "6.26.1", + "resolved": "https://registry.npmjs.org/react-router-dom/-/react-router-dom-6.26.1.tgz", + "integrity": "sha512-veut7m41S1fLql4pLhxeSW3jlqs+4MtjRLj0xvuCEXsxusJCbs6I8yn9BxzzDX2XDgafrccY6hwjmd/bL54tFw==", "license": "MIT", "dependencies": { - "@remix-run/router": "1.19.0", - "react-router": "6.26.0" + "@remix-run/router": "1.19.1", + "react-router": "6.26.1" }, "engines": { "node": ">=14.0.0" @@ -8118,9 +8146,10 @@ } }, "node_modules/rollup": { - "version": "4.18.1", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.18.1.tgz", - "integrity": "sha512-Elx2UT8lzxxOXMpy5HWQGZqkrQOtrVDDa/bm9l10+U4rQnVzbL/LgZ4NOM1MPIDyHk69W4InuYDF5dzRh4Kw1A==", + "version": "4.21.0", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.21.0.tgz", + "integrity": "sha512-vo+S/lfA2lMS7rZ2Qoubi6I5hwZwzXeUIctILZLbHI+laNtvhhOIon2S1JksA5UEDQ7l3vberd0fxK44lTYjbQ==", + "license": "MIT", "dependencies": { "@types/estree": "1.0.5" }, @@ -8132,22 +8161,22 @@ "npm": ">=8.0.0" }, "optionalDependencies": { - "@rollup/rollup-android-arm-eabi": "4.18.1", - "@rollup/rollup-android-arm64": "4.18.1", - "@rollup/rollup-darwin-arm64": "4.18.1", - "@rollup/rollup-darwin-x64": "4.18.1", - "@rollup/rollup-linux-arm-gnueabihf": "4.18.1", - "@rollup/rollup-linux-arm-musleabihf": "4.18.1", - "@rollup/rollup-linux-arm64-gnu": "4.18.1", - "@rollup/rollup-linux-arm64-musl": "4.18.1", - "@rollup/rollup-linux-powerpc64le-gnu": "4.18.1", - "@rollup/rollup-linux-riscv64-gnu": "4.18.1", - "@rollup/rollup-linux-s390x-gnu": "4.18.1", - "@rollup/rollup-linux-x64-gnu": "4.18.1", - "@rollup/rollup-linux-x64-musl": "4.18.1", - "@rollup/rollup-win32-arm64-msvc": "4.18.1", - "@rollup/rollup-win32-ia32-msvc": "4.18.1", - "@rollup/rollup-win32-x64-msvc": "4.18.1", + "@rollup/rollup-android-arm-eabi": "4.21.0", + "@rollup/rollup-android-arm64": "4.21.0", + "@rollup/rollup-darwin-arm64": "4.21.0", + "@rollup/rollup-darwin-x64": "4.21.0", + "@rollup/rollup-linux-arm-gnueabihf": "4.21.0", + "@rollup/rollup-linux-arm-musleabihf": "4.21.0", + "@rollup/rollup-linux-arm64-gnu": "4.21.0", + "@rollup/rollup-linux-arm64-musl": "4.21.0", + "@rollup/rollup-linux-powerpc64le-gnu": "4.21.0", + "@rollup/rollup-linux-riscv64-gnu": "4.21.0", + "@rollup/rollup-linux-s390x-gnu": "4.21.0", + "@rollup/rollup-linux-x64-gnu": "4.21.0", + "@rollup/rollup-linux-x64-musl": "4.21.0", + "@rollup/rollup-win32-arm64-msvc": "4.21.0", + "@rollup/rollup-win32-ia32-msvc": "4.21.0", + "@rollup/rollup-win32-x64-msvc": "4.21.0", "fsevents": "~2.3.2" } }, @@ -9121,14 +9150,14 @@ } }, "node_modules/vite": { - "version": "5.4.0", - "resolved": "https://registry.npmjs.org/vite/-/vite-5.4.0.tgz", - "integrity": "sha512-5xokfMX0PIiwCMCMb9ZJcMyh5wbBun0zUzKib+L65vAZ8GY9ePZMXxFrHbr/Kyll2+LSCY7xtERPpxkBDKngwg==", + "version": "5.4.2", + "resolved": "https://registry.npmjs.org/vite/-/vite-5.4.2.tgz", + "integrity": "sha512-dDrQTRHp5C1fTFzcSaMxjk6vdpKvT+2/mIdE07Gw2ykehT49O0z/VHS3zZ8iV/Gh8BJJKHWOe5RjaNrW5xf/GA==", "license": "MIT", "dependencies": { "esbuild": "^0.21.3", - "postcss": "^8.4.40", - "rollup": "^4.13.0" + "postcss": "^8.4.41", + "rollup": "^4.20.0" }, "bin": { "vite": "bin/vite.js" diff --git a/package.json b/package.json index e34ab65..aa187b2 100644 --- a/package.json +++ b/package.json @@ -11,13 +11,13 @@ "preview": "vite preview" }, "dependencies": { - "@drincs/pixi-vn": "^0.6.14", + "@drincs/pixi-vn": "^0.6.16", "@emotion/react": "^11.13.0", "@emotion/styled": "^11.13.0", "@mui/icons-material": "^5.16.7", "@mui/joy": "^5.0.0-beta.28", - "framer-motion": "^11.3.24", - "i18next": "^23.12.2", + "framer-motion": "^11.3.28", + "i18next": "^23.14.0", "i18next-browser-languagedetector": "^8.0.0", "notistack": "^3.0.1", "react": "^18.3.1", @@ -26,7 +26,7 @@ "react-error-boundary": "^4.0.13", "react-i18next": "^15.0.1", "react-markdown": "^9.0.1", - "react-router-dom": "^6.26.0", + "react-router-dom": "^6.26.1", "recoil": "^0.7.7", "rehype-raw": "^7.0.0", "remark-gfm": "^4.0.0", @@ -34,17 +34,17 @@ "vite-plugin-checker": "^0.7.2" }, "devDependencies": { - "@types/react": "^18.3.3", + "@types/react": "^18.3.4", "@types/react-color": "^3.0.12", "@types/react-dom": "^18.3.0", - "@typescript-eslint/eslint-plugin": "^8.0.1", - "@typescript-eslint/parser": "^8.0.1", + "@typescript-eslint/eslint-plugin": "^8.2.0", + "@typescript-eslint/parser": "^8.2.0", "@vitejs/plugin-react": "^4.3.1", "eslint": "^8.57.0", "eslint-plugin-react-hooks": "^4.6.2", - "eslint-plugin-react-refresh": "^0.4.9", + "eslint-plugin-react-refresh": "^0.4.10", "typescript": "^5.5.4", - "vite": "^5.4.0", + "vite": "^5.4.2", "vite-plugin-pwa": "^0.20.1" }, "keywords": [ diff --git a/src/main.tsx b/src/main.tsx index ed51d8d..68cad24 100644 --- a/src/main.tsx +++ b/src/main.tsx @@ -1,4 +1,4 @@ -import { GameStepManager, GameWindowManager } from '@drincs/pixi-vn' +import { canvas, narration } from '@drincs/pixi-vn' import { createRoot } from 'react-dom/client' import App from './App' import './index.css' @@ -9,7 +9,7 @@ if (!body) { throw new Error('body element not found') } -GameWindowManager.initialize(body, 1920, 1080, { +canvas.initialize(body, 1920, 1080, { backgroundColor: "#303030" }).then(() => { // React setup with ReactDOM @@ -18,14 +18,14 @@ GameWindowManager.initialize(body, 1920, 1080, { throw new Error('root element not found') } - GameWindowManager.initializeHTMLLayout(root) - const reactRoot = createRoot(GameWindowManager.htmlLayout) + canvas.initializeHTMLLayout(root) + const reactRoot = createRoot(canvas.htmlLayout) reactRoot.render( ) }) -GameStepManager.gameEnd = async (props) => { +narration.onGameEnd = async (props) => { props.navigate("/") } diff --git a/src/screens/History.tsx b/src/screens/History.tsx index eb444e5..f6faa1e 100644 --- a/src/screens/History.tsx +++ b/src/screens/History.tsx @@ -1,4 +1,4 @@ -import { CharacterBaseModel, getCharacterById, getDialogueHistory } from '@drincs/pixi-vn'; +import { CharacterBaseModel, getCharacterById, narration } from '@drincs/pixi-vn'; import CheckIcon from '@mui/icons-material/Check'; import SearchRoundedIcon from "@mui/icons-material/SearchRounded"; import { Box, Chip, Input, Stack, Typography } from "@mui/joy"; @@ -69,7 +69,7 @@ export default function History() { }} > - {getDialogueHistory() + {narration.getNarrativeHistory() .map((step) => { let character = step.dialoge?.character ? getCharacterById(step.dialoge?.character) ?? new CharacterBaseModel(step.dialoge?.character, { name: t(step.dialoge?.character) }) : undefined return { From cc1838c2b92bcadb774abe67bd1d6d4c14860b0f Mon Sep 17 00:00:00 2001 From: Black Ram <67595890+BlackRam-oss@users.noreply.github.com> Date: Wed, 21 Aug 2024 11:43:37 +0200 Subject: [PATCH 3/6] update --- package-lock.json | 35 +++++++++++++++++++---------------- package.json | 4 ++-- src/screens/History.tsx | 2 +- src/screens/MainMenu.tsx | 2 +- 4 files changed, 23 insertions(+), 20 deletions(-) diff --git a/package-lock.json b/package-lock.json index a7e2315..3ad9bfc 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8,8 +8,8 @@ "name": "my-app", "version": "0.1.0", "dependencies": { - "@drincs/pixi-vn": "^0.6.16", - "@emotion/react": "^11.13.0", + "@drincs/pixi-vn": "^0.7.0", + "@emotion/react": "^11.13.3", "@emotion/styled": "^11.13.0", "@mui/icons-material": "^5.16.7", "@mui/joy": "^5.0.0-beta.28", @@ -1804,9 +1804,9 @@ } }, "node_modules/@drincs/pixi-vn": { - "version": "0.6.16", - "resolved": "https://registry.npmjs.org/@drincs/pixi-vn/-/pixi-vn-0.6.16.tgz", - "integrity": "sha512-nzeON67/DytBLZdVjrALxZ6vG6+4I6b8eLQmxsJKAgB7wO/SsRsgFJpFxPy0HP/6GCn3jyJn8ZLuiD+qLV2BlA==", + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/@drincs/pixi-vn/-/pixi-vn-0.7.0.tgz", + "integrity": "sha512-XnZkFv78s0e1oGcynWwjOzgdLLG/N53Cvns7ImA+xcLpjtTkph9a2CXx8BVRE6GQfRj5J/YsiXZJ/XvHN1QuMw==", "license": "GPL-3.0", "dependencies": { "@pixi/devtools": "^2.0.1", @@ -1868,14 +1868,15 @@ "integrity": "sha512-30FAj7/EoJ5mwVPOWhAyCX+FPfMDrVecJAM+Iw9NRoSl4BBAQeqj4cApHHUXOVvIPgLVDsCFoz/hGD+5QQD1GQ==" }, "node_modules/@emotion/react": { - "version": "11.13.0", - "resolved": "https://registry.npmjs.org/@emotion/react/-/react-11.13.0.tgz", - "integrity": "sha512-WkL+bw1REC2VNV1goQyfxjx1GYJkcc23CRQkXX+vZNLINyfI7o+uUn/rTGPt/xJ3bJHd5GcljgnxHf4wRw5VWQ==", + "version": "11.13.3", + "resolved": "https://registry.npmjs.org/@emotion/react/-/react-11.13.3.tgz", + "integrity": "sha512-lIsdU6JNrmYfJ5EbUCf4xW1ovy5wKQ2CkPRM4xogziOxH1nXxBSjpC9YqbFAP7circxMfYp+6x676BqWcEiixg==", + "license": "MIT", "dependencies": { "@babel/runtime": "^7.18.3", "@emotion/babel-plugin": "^11.12.0", "@emotion/cache": "^11.13.0", - "@emotion/serialize": "^1.3.0", + "@emotion/serialize": "^1.3.1", "@emotion/use-insertion-effect-with-fallbacks": "^1.1.0", "@emotion/utils": "^1.4.0", "@emotion/weak-memoize": "^0.4.0", @@ -1891,13 +1892,14 @@ } }, "node_modules/@emotion/serialize": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/@emotion/serialize/-/serialize-1.3.0.tgz", - "integrity": "sha512-jACuBa9SlYajnpIVXB+XOXnfJHyckDfe6fOpORIM6yhBDlqGuExvDdZYHDQGoDf3bZXGv7tNr+LpLjJqiEQ6EA==", + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/@emotion/serialize/-/serialize-1.3.1.tgz", + "integrity": "sha512-dEPNKzBPU+vFPGa+z3axPRn8XVDetYORmDC0wAiej+TNcOZE70ZMJa0X7JdeoM6q/nWTMZeLpN/fTnD9o8MQBA==", + "license": "MIT", "dependencies": { "@emotion/hash": "^0.9.2", "@emotion/memoize": "^0.9.0", - "@emotion/unitless": "^0.9.0", + "@emotion/unitless": "^0.10.0", "@emotion/utils": "^1.4.0", "csstype": "^3.0.2" } @@ -1930,9 +1932,10 @@ } }, "node_modules/@emotion/unitless": { - "version": "0.9.0", - "resolved": "https://registry.npmjs.org/@emotion/unitless/-/unitless-0.9.0.tgz", - "integrity": "sha512-TP6GgNZtmtFaFcsOgExdnfxLLpRDla4Q66tnenA9CktvVSdNKDvMVuUah4QvWPIpNjrWsGg3qeGo9a43QooGZQ==" + "version": "0.10.0", + "resolved": "https://registry.npmjs.org/@emotion/unitless/-/unitless-0.10.0.tgz", + "integrity": "sha512-dFoMUuQA20zvtVTuxZww6OHoJYgrzfKM1t52mVySDJnMSEa08ruEvdYQbhvyu6soU+NeLVd3yKfTfT0NeV6qGg==", + "license": "MIT" }, "node_modules/@emotion/use-insertion-effect-with-fallbacks": { "version": "1.1.0", diff --git a/package.json b/package.json index aa187b2..f9e1863 100644 --- a/package.json +++ b/package.json @@ -11,8 +11,8 @@ "preview": "vite preview" }, "dependencies": { - "@drincs/pixi-vn": "^0.6.16", - "@emotion/react": "^11.13.0", + "@drincs/pixi-vn": "^0.7.0", + "@emotion/react": "^11.13.3", "@emotion/styled": "^11.13.0", "@mui/icons-material": "^5.16.7", "@mui/joy": "^5.0.0-beta.28", diff --git a/src/screens/History.tsx b/src/screens/History.tsx index f6faa1e..9f37cb4 100644 --- a/src/screens/History.tsx +++ b/src/screens/History.tsx @@ -69,7 +69,7 @@ export default function History() { }} > - {narration.getNarrativeHistory() + {narration.narrativeHistory .map((step) => { let character = step.dialoge?.character ? getCharacterById(step.dialoge?.character) ?? new CharacterBaseModel(step.dialoge?.character, { name: t(step.dialoge?.character) }) : undefined return { diff --git a/src/screens/MainMenu.tsx b/src/screens/MainMenu.tsx index 4bfc5d3..c6bd6c3 100644 --- a/src/screens/MainMenu.tsx +++ b/src/screens/MainMenu.tsx @@ -45,7 +45,7 @@ export default function MainMenu() { > { - GameWindowManager.removeCanvasElements() + GameWindowManager.removeAll() navigate("/game") GameStepManager.callLabel(pixivnTestStartLabel, { navigate: navigate, From 8edc7f8fa1dc67301f67a6b24abfed1e2010fbfb Mon Sep 17 00:00:00 2001 From: Black Ram <67595890+BlackRam-oss@users.noreply.github.com> Date: Wed, 21 Aug 2024 11:53:20 +0200 Subject: [PATCH 4/6] onStepError --- src/main.tsx | 4 ++ src/values/translations/strings_en.json | 85 +++++++++++++------------ 2 files changed, 47 insertions(+), 42 deletions(-) diff --git a/src/main.tsx b/src/main.tsx index 68cad24..98c14ac 100644 --- a/src/main.tsx +++ b/src/main.tsx @@ -29,3 +29,7 @@ canvas.initialize(body, 1920, 1080, { narration.onGameEnd = async (props) => { props.navigate("/") } + +narration.onStepError = async (_error, { notify, t }) => { + notify(t("allert_error_occurred"), "error") +} diff --git a/src/values/translations/strings_en.json b/src/values/translations/strings_en.json index bd6bce1..70544a4 100644 --- a/src/values/translations/strings_en.json +++ b/src/values/translations/strings_en.json @@ -1,45 +1,46 @@ { "translation": { - "settings": "Settings" - , "settings_restricted" : "Prefs" - , "dialogues" : "Dialogues" - , "auto_forward_time" : "Auto Forward Time" - , "auto_forward_time_restricted" : "Auto" - , "auto_forward_time_description" : "Choose the time in seconds before the dialogue auto-forwards. If \"{{textSpeedName}}\" is enabled, the auto-forward will be executed after the typewriter effect is completed. (You can edit this value if \"{{autoName}}\" is enabled)" - , "display" : "Display" - , "fullscreen" : "Fullscreen" - , "fullscreen_description" : "Toggle fullscreen mode." - , "exit_fullscreen" : "Exit Fullscreen" - , "enter_fullscreen" : "Enter Fullscreen" - , "theme_mode" : "Theme Mode" - , "theme_mode_description" : "Choose between light, dark, or system theme mode." - , "primary_color" : "Primary Color" - , "primary_color_description" : "Choose the primary color for the theme." - , "solid_color" : "Solid Color" - , "solid_color_description" : "Choose the solid color for the theme. It can be black or white and will be contrasting with the primary color. So if the primary color is dark, the solid color will be white, and a the other way around." - , "example" : "Example" - , "return_main_menu" : "Return to Main Menu" - , "attention" : "Attention" - , "exit" : "Exit" - , "cancel" : "Cancel" - , "you_sure_to_return_main_menu" : "Are you sure you want to return to the main menu? All unsaved progress will be lost." - , "back" : "Back" - , "history" : "History" - , "skip" : "Skip" - , "save" : "Save" - , "load" : "Load" - , "quick_save_restricted" : "Q.Save" - , "quick_load_restricted" : "Q.Load" - , "confirm" : "Confirm" - , "you_sure_to_quick_load" : "Are you sure you want to load the quick save? All unsaved progress will be lost." - , "start" : "Start" - , "search" : "Search" - , "next" : "Next" - , "text_speed" : "Text Speed" - , "text_speed_description" : "Choose the speed of the typewriter effect. If is set to 0 ( off ) the text will appear instantly." - , "hide_interface" : "Hide Interface" - , "success_save" : "Save successful" - , "success_load" : "Load successful" - , "off" : "Off" + "allert_error_occurred": "An error occurred, please report it to the developer", + "attention": "Attention", + "auto_forward_time": "Auto Forward Time", + "auto_forward_time_description": "Choose the time in seconds before the dialogue auto-forwards. If \"{{textSpeedName}}\" is enabled, the auto-forward will be executed after the typewriter effect is completed. (You can edit this value if \"{{autoName}}\" is enabled)", + "auto_forward_time_restricted": "Auto", + "back": "Back", + "cancel": "Cancel", + "confirm": "Confirm", + "dialogues": "Dialogues", + "display": "Display", + "enter_fullscreen": "Enter Fullscreen", + "example": "Example", + "exit": "Exit", + "exit_fullscreen": "Exit Fullscreen", + "fullscreen": "Fullscreen", + "fullscreen_description": "Toggle fullscreen mode.", + "hide_interface": "Hide Interface", + "history": "History", + "load": "Load", + "next": "Next", + "off": "Off", + "primary_color": "Primary Color", + "primary_color_description": "Choose the primary color for the theme.", + "quick_load_restricted": "Q.Load", + "quick_save_restricted": "Q.Save", + "return_main_menu": "Return to Main Menu", + "save": "Save", + "search": "Search", + "settings": "Settings", + "settings_restricted": "Prefs", + "skip": "Skip", + "solid_color": "Solid Color", + "solid_color_description": "Choose the solid color for the theme. It can be black or white and will be contrasting with the primary color. So if the primary color is dark, the solid color will be white, and a the other way around.", + "start": "Start", + "success_load": "Load successful", + "success_save": "Save successful", + "text_speed": "Text Speed", + "text_speed_description": "Choose the speed of the typewriter effect. If is set to 0 ( off ) the text will appear instantly.", + "theme_mode": "Theme Mode", + "theme_mode_description": "Choose between light, dark, or system theme mode.", + "you_sure_to_quick_load": "Are you sure you want to load the quick save? All unsaved progress will be lost.", + "you_sure_to_return_main_menu": "Are you sure you want to return to the main menu? All unsaved progress will be lost." } -} +} \ No newline at end of file From 502b46245579b3eb4b103ac243cc02b5083182f5 Mon Sep 17 00:00:00 2001 From: Black Ram <67595890+BlackRam-oss@users.noreply.github.com> Date: Wed, 21 Aug 2024 12:22:16 +0200 Subject: [PATCH 5/6] gameEnd --- src/main.tsx | 5 +++-- src/screens/Settings.tsx | 4 ++-- src/utility/ActionsUtility.ts | 7 ++++++- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/src/main.tsx b/src/main.tsx index 98c14ac..f795d5c 100644 --- a/src/main.tsx +++ b/src/main.tsx @@ -2,6 +2,7 @@ import { canvas, narration } from '@drincs/pixi-vn' import { createRoot } from 'react-dom/client' import App from './App' import './index.css' +import { gameEnd } from './utility/ActionsUtility' // Canvas setup with PIXI const body = document.body @@ -26,8 +27,8 @@ canvas.initialize(body, 1920, 1080, { ) }) -narration.onGameEnd = async (props) => { - props.navigate("/") +narration.onGameEnd = async ({ navigate }) => { + gameEnd(navigate) } narration.onStepError = async (_error, { notify, t }) => { diff --git a/src/screens/Settings.tsx b/src/screens/Settings.tsx index 2b637fe..22d3038 100644 --- a/src/screens/Settings.tsx +++ b/src/screens/Settings.tsx @@ -33,7 +33,7 @@ import { typewriterDelayState } from '../atoms/typewriterDelayState'; import ModalDialogCustom from '../components/ModalDialog'; import SettingButton from '../components/SettingButton'; import { useEditColorProvider } from '../providers/ThemeProvider'; -import { loadGameSave, saveGame } from '../utility/ActionsUtility'; +import { gameEnd, loadGameSave, saveGame } from '../utility/ActionsUtility'; import { useMyNavigate } from '../utility/useMyNavigate'; export default function Settings() { @@ -476,7 +476,7 @@ export default function Settings() { color='danger' variant="outlined" onClick={() => { - navigate('/') + gameEnd(navigate) setOpen(false) setOpenYouSure(false) }} diff --git a/src/utility/ActionsUtility.ts b/src/utility/ActionsUtility.ts index 4b0391a..f921d44 100644 --- a/src/utility/ActionsUtility.ts +++ b/src/utility/ActionsUtility.ts @@ -1,4 +1,4 @@ -import { GameStepManager, getSaveJson, loadSaveJson } from "@drincs/pixi-vn"; +import { clearAllGameDatas, GameStepManager, getSaveJson, loadSaveJson } from "@drincs/pixi-vn"; export function saveGame() { const jsonString = getSaveJson() @@ -74,3 +74,8 @@ export async function loadRefreshSave(navigate: (path: string) => void) { navigate("/") } } + +export function gameEnd(navigate: (path: string) => void) { + clearAllGameDatas() + navigate('/') +} From 9cc277498887ade434f760129db4b061a1f5d7a2 Mon Sep 17 00:00:00 2001 From: Black Ram <67595890+BlackRam-oss@users.noreply.github.com> Date: Wed, 21 Aug 2024 14:32:06 +0200 Subject: [PATCH 6/6] useMyNavigate --- src/utility/useMyNavigate.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/utility/useMyNavigate.ts b/src/utility/useMyNavigate.ts index c8548f9..3625a59 100644 --- a/src/utility/useMyNavigate.ts +++ b/src/utility/useMyNavigate.ts @@ -1,5 +1,8 @@ import { NavigateFunction, NavigateOptions, To, useNavigate } from "react-router-dom"; +/** + * https://pixi-vn.web.app/advanced/intercept-events.html#back-and-forward-buttons + */ export function useMyNavigate(): NavigateFunction { const navigate = useNavigate();