diff --git a/package-lock.json b/package-lock.json index 857656ef..e8c3af6c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8,16 +8,16 @@ "name": "iron-fellowship", "version": "2.0.0", "dependencies": { - "@emotion/react": "^11.10.5", - "@emotion/styled": "^11.10.5", + "@emotion/react": "^11.11.1", + "@emotion/styled": "^11.11.0", "@fontsource/bebas-neue": "^5.0.12", "@fontsource/rubik": "^4.5.13", "@fontsource/staatliches": "^4.5.9", "@hocuspocus/transformer": "^2.4.0", "@iconify-icons/game-icons": "^1.2.1", - "@mui/icons-material": "^5.11.0", - "@mui/lab": "^5.0.0-alpha.115", - "@mui/material": "^5.11.3", + "@mui/icons-material": "^5.14.15", + "@mui/lab": "^5.0.0-alpha.150", + "@mui/material": "^5.14.15", "@tiptap/extension-collaboration": "^2.0.3", "@tiptap/extension-collaboration-cursor": "^2.0.3", "@tiptap/extension-placeholder": "^2.0.0-beta.218", @@ -365,9 +365,9 @@ } }, "node_modules/@babel/runtime": { - "version": "7.23.1", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.23.1.tgz", - "integrity": "sha512-hC2v6p8ZSI/W0HUzh3V8C5g+NwSKzKPtJwSpTjwl0o297GP9+ZLQSkdvHz46CM3LqyoXxq+5G9komY+eSqSO0g==", + "version": "7.23.2", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.23.2.tgz", + "integrity": "sha512-mM8eg4yl5D6i3lu2QKPuPH4FArvJ8KhTofbE7jwMUv9KX5mBvwPAqnV3MlyBNqdp9RyRKP6Yck8TrfYrPvX3bg==", "dependencies": { "regenerator-runtime": "^0.14.0" }, @@ -1605,14 +1605,14 @@ } }, "node_modules/@mui/base": { - "version": "5.0.0-beta.15", - "resolved": "https://registry.npmjs.org/@mui/base/-/base-5.0.0-beta.15.tgz", - "integrity": "sha512-Xtom3YSdi0iwYPtyVRFUEGoRwi6IHWixPwifDKaK+4PkEPtUWMU5YOIJfTsmC59ri+dFvA3oBNSiTPUGGrklZw==", + "version": "5.0.0-beta.21", + "resolved": "https://registry.npmjs.org/@mui/base/-/base-5.0.0-beta.21.tgz", + "integrity": "sha512-eTKWx3WV/nwmRUK4z4K1MzlMyWCsi3WJ3RtV4DiXZeRh4qd4JCyp1Zzzi8Wv9xM4dEBmqQntFoei716PzwmFfA==", "dependencies": { - "@babel/runtime": "^7.22.15", + "@babel/runtime": "^7.23.2", "@floating-ui/react-dom": "^2.0.2", - "@mui/types": "^7.2.4", - "@mui/utils": "^5.14.9", + "@mui/types": "^7.2.7", + "@mui/utils": "^5.14.15", "@popperjs/core": "^2.11.8", "clsx": "^2.0.0", "prop-types": "^15.8.1" @@ -1636,20 +1636,20 @@ } }, "node_modules/@mui/core-downloads-tracker": { - "version": "5.14.12", - "resolved": "https://registry.npmjs.org/@mui/core-downloads-tracker/-/core-downloads-tracker-5.14.12.tgz", - "integrity": "sha512-WZhCkKqhrXaSVBzoC6LNcVkIawS000OOt7gmnp4g9HhyvN0PSclRXc/JrkC7EwfzUAZJh+hiK2LaVsbtOpNuOg==", + "version": "5.14.15", + "resolved": "https://registry.npmjs.org/@mui/core-downloads-tracker/-/core-downloads-tracker-5.14.15.tgz", + "integrity": "sha512-ZCDzBWtCKjAYAlKKM3PA/jG/3uVIDT9ZitOtVixIVmTCQyc5jSV1qhJX8+qIGz4RQZ9KLzPWO2tXd0O5hvzouQ==", "funding": { "type": "opencollective", "url": "https://opencollective.com/mui" } }, "node_modules/@mui/icons-material": { - "version": "5.14.9", - "resolved": "https://registry.npmjs.org/@mui/icons-material/-/icons-material-5.14.9.tgz", - "integrity": "sha512-xTRQbDsogsJo7tY5Og8R9zbuG2q+KIPVIM6JQoKxtJlz9DPOw1u0T2fGrvwD+XAOVifQf6epNMcGCDLfJAz4Nw==", + "version": "5.14.15", + "resolved": "https://registry.npmjs.org/@mui/icons-material/-/icons-material-5.14.15.tgz", + "integrity": "sha512-Dqu21vN/mVNzebJ+ofnKG+CeJYIhHuDs5+0fMEpdpzRt6UojelzdrEkNv+XkO0e1JMclzeXIRx404FirK/CFRw==", "dependencies": { - "@babel/runtime": "^7.22.15" + "@babel/runtime": "^7.23.2" }, "engines": { "node": ">=12.0.0" @@ -1670,15 +1670,15 @@ } }, "node_modules/@mui/lab": { - "version": "5.0.0-alpha.144", - "resolved": "https://registry.npmjs.org/@mui/lab/-/lab-5.0.0-alpha.144.tgz", - "integrity": "sha512-CS/mBxfX9eSsrvatYBNphYCSCM4tIAIb4jZ3LiX1vSZ32DjRlNi+2U56+ObnBaVTjMMYdegMsT38uxYHSVXszA==", - "dependencies": { - "@babel/runtime": "^7.22.15", - "@mui/base": "5.0.0-beta.15", - "@mui/system": "^5.14.9", - "@mui/types": "^7.2.4", - "@mui/utils": "^5.14.9", + "version": "5.0.0-alpha.150", + "resolved": "https://registry.npmjs.org/@mui/lab/-/lab-5.0.0-alpha.150.tgz", + "integrity": "sha512-WmIQhIQh+Ur/atqt/s2AGVRjD29Bo4M8JYtJprL9Px6l/xOkjZQdRDXoBMpIJpiGIPWBxcnSFjnlJwgxjwAQWw==", + "dependencies": { + "@babel/runtime": "^7.23.2", + "@mui/base": "5.0.0-beta.21", + "@mui/system": "^5.14.15", + "@mui/types": "^7.2.7", + "@mui/utils": "^5.14.15", "@mui/x-tree-view": "6.0.0-alpha.1", "clsx": "^2.0.0", "prop-types": "^15.8.1" @@ -1693,7 +1693,7 @@ "peerDependencies": { "@emotion/react": "^11.5.0", "@emotion/styled": "^11.3.0", - "@mui/material": "^5.0.0", + "@mui/material": ">=5.10.11", "@types/react": "^17.0.0 || ^18.0.0", "react": "^17.0.0 || ^18.0.0", "react-dom": "^17.0.0 || ^18.0.0" @@ -1711,17 +1711,17 @@ } }, "node_modules/@mui/material": { - "version": "5.14.12", - "resolved": "https://registry.npmjs.org/@mui/material/-/material-5.14.12.tgz", - "integrity": "sha512-EelF2L46VcVqhg3KjzIGBBpOtcBgRh0MMy9Efuk6Do81QdcZsFC9RebCVAflo5jIdbHiBmxBs5/l5Q9NjONozg==", - "dependencies": { - "@babel/runtime": "^7.23.1", - "@mui/base": "5.0.0-beta.18", - "@mui/core-downloads-tracker": "^5.14.12", - "@mui/system": "^5.14.12", - "@mui/types": "^7.2.5", - "@mui/utils": "^5.14.12", - "@types/react-transition-group": "^4.4.6", + "version": "5.14.15", + "resolved": "https://registry.npmjs.org/@mui/material/-/material-5.14.15.tgz", + "integrity": "sha512-Gq65rHjvLzkxmhG8bvag851Oqsmru7qkUb/cCI2xu7dQzmY345f9xJRJi72sRGjhaqHXWeRKw/yIwp/7oQoeXg==", + "dependencies": { + "@babel/runtime": "^7.23.2", + "@mui/base": "5.0.0-beta.21", + "@mui/core-downloads-tracker": "^5.14.15", + "@mui/system": "^5.14.15", + "@mui/types": "^7.2.7", + "@mui/utils": "^5.14.15", + "@types/react-transition-group": "^4.4.7", "clsx": "^2.0.0", "csstype": "^3.1.2", "prop-types": "^15.8.1", @@ -1754,44 +1754,13 @@ } } }, - "node_modules/@mui/material/node_modules/@mui/base": { - "version": "5.0.0-beta.18", - "resolved": "https://registry.npmjs.org/@mui/base/-/base-5.0.0-beta.18.tgz", - "integrity": "sha512-e9ZCy/ndhyt5MTshAS3qAUy/40UiO0jX+kAo6a+XirrPJE+rrQW+mKPSI0uyp+5z4Vh+z0pvNoJ2S2gSrNz3BQ==", - "dependencies": { - "@babel/runtime": "^7.23.1", - "@floating-ui/react-dom": "^2.0.2", - "@mui/types": "^7.2.5", - "@mui/utils": "^5.14.12", - "@popperjs/core": "^2.11.8", - "clsx": "^2.0.0", - "prop-types": "^15.8.1" - }, - "engines": { - "node": ">=12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/mui" - }, - "peerDependencies": { - "@types/react": "^17.0.0 || ^18.0.0", - "react": "^17.0.0 || ^18.0.0", - "react-dom": "^17.0.0 || ^18.0.0" - }, - "peerDependenciesMeta": { - "@types/react": { - "optional": true - } - } - }, "node_modules/@mui/private-theming": { - "version": "5.14.12", - "resolved": "https://registry.npmjs.org/@mui/private-theming/-/private-theming-5.14.12.tgz", - "integrity": "sha512-TWwm+9+BgHFpoR3w04FG+IqID4ALa74A27RuKq2CEaWgxliBZB24EVeI6djfjFt5t4FYmIb8BMw2ZJEir7YjLQ==", + "version": "5.14.15", + "resolved": "https://registry.npmjs.org/@mui/private-theming/-/private-theming-5.14.15.tgz", + "integrity": "sha512-V2Xh+Tu6A07NoSpup0P9m29GwvNMYl5DegsGWqlOTJyAV7cuuVjmVPqxgvL8xBng4R85xqIQJRMjtYYktoPNuQ==", "dependencies": { - "@babel/runtime": "^7.23.1", - "@mui/utils": "^5.14.12", + "@babel/runtime": "^7.23.2", + "@mui/utils": "^5.14.15", "prop-types": "^15.8.1" }, "engines": { @@ -1812,11 +1781,11 @@ } }, "node_modules/@mui/styled-engine": { - "version": "5.14.12", - "resolved": "https://registry.npmjs.org/@mui/styled-engine/-/styled-engine-5.14.12.tgz", - "integrity": "sha512-bocxt1nDmXfB3gpLfCCmFCyJ7sVmscFs+PuheO210QagZwHVp47UIRT1AiswLDYSQo1ZqmVGn7KLEJEYK0d4Xw==", + "version": "5.14.15", + "resolved": "https://registry.npmjs.org/@mui/styled-engine/-/styled-engine-5.14.15.tgz", + "integrity": "sha512-mbOjRf867BysNpexe5Z/P8s3bWzDPNowmKhi7gtNDP/LPEeqAfiDSuC4WPTXmtvse1dCl30Nl755OLUYuoi7Mw==", "dependencies": { - "@babel/runtime": "^7.23.1", + "@babel/runtime": "^7.23.2", "@emotion/cache": "^11.11.0", "csstype": "^3.1.2", "prop-types": "^15.8.1" @@ -1843,15 +1812,15 @@ } }, "node_modules/@mui/system": { - "version": "5.14.12", - "resolved": "https://registry.npmjs.org/@mui/system/-/system-5.14.12.tgz", - "integrity": "sha512-6DXfjjLhW0/ia5qU3Crke7j+MnfDbMBOHlLIrqbrEqNs0AuSBv8pXniEGb+kqO0H804NJreRTEJRjCngwOX5CA==", - "dependencies": { - "@babel/runtime": "^7.23.1", - "@mui/private-theming": "^5.14.12", - "@mui/styled-engine": "^5.14.12", - "@mui/types": "^7.2.5", - "@mui/utils": "^5.14.12", + "version": "5.14.15", + "resolved": "https://registry.npmjs.org/@mui/system/-/system-5.14.15.tgz", + "integrity": "sha512-zr0Gdk1RgKiEk+tCMB900LaOpEC8NaGvxtkmMdL/CXgkqQZSVZOt2PQsxJWaw7kE4YVkIe4VukFVc43qcq9u3w==", + "dependencies": { + "@babel/runtime": "^7.23.2", + "@mui/private-theming": "^5.14.15", + "@mui/styled-engine": "^5.14.15", + "@mui/types": "^7.2.7", + "@mui/utils": "^5.14.15", "clsx": "^2.0.0", "csstype": "^3.1.2", "prop-types": "^15.8.1" @@ -1882,9 +1851,9 @@ } }, "node_modules/@mui/types": { - "version": "7.2.5", - "resolved": "https://registry.npmjs.org/@mui/types/-/types-7.2.5.tgz", - "integrity": "sha512-S2BwfNczr7VwS6ki8GoAXJyARoeSJDLuxOEPs3vEMyTALlf9PrdHv+sluX7kk3iKrCg/ML2mIWwapZvWbkMCQA==", + "version": "7.2.7", + "resolved": "https://registry.npmjs.org/@mui/types/-/types-7.2.7.tgz", + "integrity": "sha512-sofpWmcBqOlTzRbr1cLQuUDKaUYVZTw8ENQrtL39TECRNENEzwgnNPh6WMfqMZlMvf1Aj9DLg74XPjnLr0izUQ==", "peerDependencies": { "@types/react": "^17.0.0 || ^18.0.0" }, @@ -1895,12 +1864,12 @@ } }, "node_modules/@mui/utils": { - "version": "5.14.12", - "resolved": "https://registry.npmjs.org/@mui/utils/-/utils-5.14.12.tgz", - "integrity": "sha512-RFNXnhKQlzIkIUig6mmv0r5VbtjPdWoaBPYicq25LETdZux59HAqoRdWw15T7lp3c7gXOoE8y67+hTB8C64m2g==", + "version": "5.14.15", + "resolved": "https://registry.npmjs.org/@mui/utils/-/utils-5.14.15.tgz", + "integrity": "sha512-QBfHovAvTa0J1jXuYDaXGk+Yyp7+Fm8GSqx6nK2JbezGqzCFfirNdop/+bL9Flh/OQ/64PeXcW4HGDdOge+n3A==", "dependencies": { - "@babel/runtime": "^7.23.1", - "@types/prop-types": "^15.7.7", + "@babel/runtime": "^7.23.2", + "@types/prop-types": "^15.7.8", "prop-types": "^15.8.1", "react-is": "^18.2.0" }, @@ -2800,9 +2769,9 @@ } }, "node_modules/@types/react-transition-group": { - "version": "4.4.6", - "resolved": "https://registry.npmjs.org/@types/react-transition-group/-/react-transition-group-4.4.6.tgz", - "integrity": "sha512-VnCdSxfcm08KjsJVQcfBmhEQAPnLB8G08hAxn39azX1qYBQ/5RVQuoHuKIcfKOdncuaUvEpFKFzEvbtIMsfVew==", + "version": "4.4.8", + "resolved": "https://registry.npmjs.org/@types/react-transition-group/-/react-transition-group-4.4.8.tgz", + "integrity": "sha512-QmQ22q+Pb+HQSn04NL3HtrqHwYMf4h3QKArOy5F8U5nEVMaihBs3SR10WiOM1iwPz5jIo8x/u11al+iEGZZrvg==", "dependencies": { "@types/react": "*" } diff --git a/package.json b/package.json index 7f6dcb41..7755f4f1 100644 --- a/package.json +++ b/package.json @@ -9,16 +9,16 @@ "preview": "vite preview" }, "dependencies": { - "@emotion/react": "^11.10.5", - "@emotion/styled": "^11.10.5", + "@emotion/react": "^11.11.1", + "@emotion/styled": "^11.11.0", "@fontsource/bebas-neue": "^5.0.12", "@fontsource/rubik": "^4.5.13", "@fontsource/staatliches": "^4.5.9", "@hocuspocus/transformer": "^2.4.0", "@iconify-icons/game-icons": "^1.2.1", - "@mui/icons-material": "^5.11.0", - "@mui/lab": "^5.0.0-alpha.115", - "@mui/material": "^5.11.3", + "@mui/icons-material": "^5.14.15", + "@mui/lab": "^5.0.0-alpha.150", + "@mui/material": "^5.14.15", "@tiptap/extension-collaboration": "^2.0.3", "@tiptap/extension-collaboration-cursor": "^2.0.3", "@tiptap/extension-placeholder": "^2.0.0-beta.218", diff --git a/src/components/features/charactersAndCampaigns/CustomMovesSection/CustomMoveDialog.tsx b/src/components/features/charactersAndCampaigns/CustomMovesSection/CustomMoveDialog.tsx index c626d68d..3108d3d3 100644 --- a/src/components/features/charactersAndCampaigns/CustomMovesSection/CustomMoveDialog.tsx +++ b/src/components/features/charactersAndCampaigns/CustomMovesSection/CustomMoveDialog.tsx @@ -434,14 +434,17 @@ export function CustomMoveDialog(props: CustomMoveDialogProps) { oracle.Title.Standard} renderInput={(params) => ( )} value={getOraclesFromIds(form.values.oracleIds)} + //@ts-ignore onChange={(evt, value) => { const ids = Array.isArray(value) ? value.map((oracle) => oracle.$id) diff --git a/src/components/features/charactersAndCampaigns/CustomTrack.tsx b/src/components/features/charactersAndCampaigns/CustomTrack.tsx index 07204065..0d58300c 100644 --- a/src/components/features/charactersAndCampaigns/CustomTrack.tsx +++ b/src/components/features/charactersAndCampaigns/CustomTrack.tsx @@ -4,6 +4,7 @@ import { Theme, ToggleButton, ToggleButtonGroup, + ToggleButtonProps, Typography, } from "@mui/material"; import { CustomTrack as ICustomTrack } from "types/CustomTrackSettings.type"; @@ -17,6 +18,35 @@ export interface CustomTrackProps { loading?: boolean; } +const FakeToggleButton = (props: ToggleButtonProps) => { + const { children, className } = props; + + return ( + ({ + borderStyle: "solid", + borderColor: theme.palette.divider, + borderWidth: 1, + borderLeftWidth: 0, + px: 0.5, + display: "flex", + alignItems: "center", + justifyContent: "center", + bgcolor: theme.palette.grey[500], + color: theme.palette.darkGrey.contrastText, + })} + > + theme.fontFamilyTitle} + variant={"subtitle1"} + > + {children} + + + ); +}; + export function CustomTrack(props: CustomTrackProps) { const { sx, customTrack, value, onChange, disabled, loading } = props; return ( @@ -85,28 +115,9 @@ export function CustomTrack(props: CustomTrackProps) { {cell.value} ) : ( - ({ - borderStyle: "solid", - borderColor: theme.palette.divider, - borderWidth: 1, - borderLeftWidth: 0, - px: 0.5, - display: "flex", - alignItems: "center", - justifyContent: "center", - bgcolor: theme.palette.grey[500], - color: theme.palette.darkGrey.contrastText, - })} - > - theme.fontFamilyTitle} - variant={"subtitle1"} - > - {cell.value} - - + + {cell.value} + ) )} diff --git a/src/components/features/worlds/Lore/LoreTagsAutocomplete.tsx b/src/components/features/worlds/Lore/LoreTagsAutocomplete.tsx index 7b93a208..e570c4c0 100644 --- a/src/components/features/worlds/Lore/LoreTagsAutocomplete.tsx +++ b/src/components/features/worlds/Lore/LoreTagsAutocomplete.tsx @@ -21,16 +21,20 @@ export function LoreTagsAutocomplete(props: LoreTagsAutocompleteProps) { return ( option.inputValue} + //@ts-ignore isOptionEqualToValue={(option, value) => option.inputValue === value.inputValue } + //@ts-ignore filterOptions={(options, params) => { const filtered = filter(options, params); const { inputValue } = params; // Suggest the creation of a new value const isExisting = options.some( + //@ts-ignore (option) => inputValue === option.title ); if (inputValue !== "" && !isExisting) { @@ -43,12 +47,16 @@ export function LoreTagsAutocomplete(props: LoreTagsAutocompleteProps) { options={mappedTagList} includeInputInList noOptionsText={"Type a name for your new tag"} + //@ts-ignore renderOption={(props, option) =>
  • {option.title}
  • } value={tags?.map((tag) => ({ title: tag, inputValue: tag })) ?? []} + //@ts-ignore onChange={(evt, newValue) => handleTagsChange(newValue)} renderInput={(params) => } + //@ts-ignore renderTags={(value, getTagProps) => value.map((option, index) => ( + //@ts-ignore )) } diff --git a/src/components/features/worlds/NPCSection/OpenNPC.tsx b/src/components/features/worlds/NPCSection/OpenNPC.tsx index f4b7c07a..f19b2e5a 100644 --- a/src/components/features/worlds/NPCSection/OpenNPC.tsx +++ b/src/components/features/worlds/NPCSection/OpenNPC.tsx @@ -399,12 +399,15 @@ export function OpenNPC(props: OpenNPCProps) { {!isStarforged && ( locations[locationId]?.name ?? "" } autoHighlight value={npc.lastLocationId ?? null} + //@ts-ignore onChange={(evt, value) => handleUpdateNPC({ lastLocationId: value ?? "" }) } @@ -417,10 +420,13 @@ export function OpenNPC(props: OpenNPCProps) { {isStarforged && ( sectors[sectorId]?.name ?? ""} autoHighlight value={npc.lastSectorId ?? null} + //@ts-ignore onChange={(evt, value) => handleUpdateNPC({ lastSectorId: value ?? "" }) } diff --git a/src/components/features/worlds/SectorSection/SectorRegionAutocomplete.tsx b/src/components/features/worlds/SectorSection/SectorRegionAutocomplete.tsx index 5f9fe95d..2e57f485 100644 --- a/src/components/features/worlds/SectorSection/SectorRegionAutocomplete.tsx +++ b/src/components/features/worlds/SectorSection/SectorRegionAutocomplete.tsx @@ -37,11 +37,14 @@ export function SectorRegionAutocomplete() { return (
  • {option}
  • } value={currentRegion ?? null} + //@ts-ignore onChange={(evt, newValue) => updateRegion(newValue ?? undefined).catch(() => {}) } diff --git a/src/hooks/useDataswornId.ts b/src/hooks/useDataswornId.ts index b8bda241..2461412d 100644 --- a/src/hooks/useDataswornId.ts +++ b/src/hooks/useDataswornId.ts @@ -1,5 +1,6 @@ import { GAME_SYSTEMS } from "types/GameSystems.type"; import { useGameSystemValue } from "./useGameSystemValue"; +import { encodeContents } from "functions/dataswornIdEncoder"; export function useDataswornId() { const systemPrefix = useGameSystemValue({ @@ -9,13 +10,17 @@ export function useDataswornId() { return { getId: (prefix: string, value: string) => { - return `${systemPrefix}/${prefix}/${value}`; + return `${systemPrefix}/${encodeContents(prefix)}/${encodeContents( + value + )}`; }, getCustomIdPrefix: (prefix: string) => { - return `${systemPrefix}/${prefix}/custom`; + return `${systemPrefix}/${encodeContents(prefix)}/custom`; }, getCustomId: (prefix: string, value: string) => { - return `${systemPrefix}/${prefix}/custom/${value}`; + return `${systemPrefix}/${encodeContents(prefix)}/custom/${encodeContents( + value + )}`; }, }; }