mirror of
https://github.com/Sendouc/sendou.ink.git
synced 2026-09-30 07:12:36 -05:00
Upgrade deps
This commit is contained in:
@@ -38,16 +38,16 @@ export function AbilitiesSelector({
|
||||
|
||||
onChange(abilitiesClone);
|
||||
};
|
||||
const onButtonClick = (ability: typeof abilities[number]) => {
|
||||
const onButtonClick = (ability: (typeof abilities)[number]) => {
|
||||
onChange(addAbility({ oldAbilities: selectedAbilities, ability }));
|
||||
};
|
||||
|
||||
const [draggingAbility, setDraggingAbility] = React.useState<
|
||||
typeof abilities[number] | undefined
|
||||
(typeof abilities)[number] | undefined
|
||||
>();
|
||||
|
||||
const onDragStart =
|
||||
(ability: typeof abilities[number]) => (event: React.DragEvent) => {
|
||||
(ability: (typeof abilities)[number]) => (event: React.DragEvent) => {
|
||||
setDraggingAbility(ability);
|
||||
event.dataTransfer.setData("text/plain", JSON.stringify(ability));
|
||||
};
|
||||
@@ -62,7 +62,7 @@ export function AbilitiesSelector({
|
||||
event.preventDefault();
|
||||
const ability = JSON.parse(
|
||||
event.dataTransfer.getData("text/plain")
|
||||
) as typeof abilities[number];
|
||||
) as (typeof abilities)[number];
|
||||
|
||||
onChange(
|
||||
addAbility({
|
||||
@@ -125,7 +125,7 @@ export function AbilitiesSelector({
|
||||
const canPlaceAbilityAtSlot = (
|
||||
rowIndex: number,
|
||||
abilityIndex: number,
|
||||
ability?: typeof abilities[number]
|
||||
ability?: (typeof abilities)[number]
|
||||
) => {
|
||||
if (!ability) {
|
||||
return false;
|
||||
@@ -162,7 +162,7 @@ function addAbility({
|
||||
atAbilityIndex,
|
||||
}: {
|
||||
oldAbilities: BuildAbilitiesTupleWithUnknown;
|
||||
ability: typeof abilities[number];
|
||||
ability: (typeof abilities)[number];
|
||||
atRowIndex?: number;
|
||||
atAbilityIndex?: number;
|
||||
}): BuildAbilitiesTupleWithUnknown {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import clsx from "clsx";
|
||||
import type * as React from "react";
|
||||
import * as React from "react";
|
||||
import { AlertIcon } from "./icons/Alert";
|
||||
import { ErrorIcon } from "./icons/Error";
|
||||
import { CheckmarkIcon } from "./icons/Checkmark";
|
||||
|
||||
@@ -251,12 +251,12 @@ export function WeaponCombobox({
|
||||
| "clearsInputOnFocus"
|
||||
| "fullWidth"
|
||||
> & {
|
||||
initialWeaponId?: typeof mainWeaponIds[number];
|
||||
initialWeaponId?: (typeof mainWeaponIds)[number];
|
||||
weaponIdsToOmit?: Set<MainWeaponId>;
|
||||
}) {
|
||||
const { t } = useTranslation("weapons");
|
||||
|
||||
const idToWeapon = (id: typeof mainWeaponIds[number]) => ({
|
||||
const idToWeapon = (id: (typeof mainWeaponIds)[number]) => ({
|
||||
value: String(id),
|
||||
label: t(`MAIN_${id}`),
|
||||
imgPath: mainWeaponImageUrl(id),
|
||||
@@ -305,7 +305,7 @@ export function GearCombobox({
|
||||
? clothesGearIds
|
||||
: shoesGearIds;
|
||||
|
||||
const idToGear = (id: typeof ids[number]) => ({
|
||||
const idToGear = (id: (typeof ids)[number]) => ({
|
||||
value: String(id),
|
||||
label: t(`${translationPrefix}_${id}` as any),
|
||||
imgPath: gearImageUrl(gearType, id),
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import clsx from "clsx";
|
||||
import type * as React from "react";
|
||||
import * as React from "react";
|
||||
|
||||
export function Details({
|
||||
children,
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import clsx from "clsx";
|
||||
import type * as React from "react";
|
||||
import * as React from "react";
|
||||
|
||||
export function FormMessage({
|
||||
children,
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import clsx from "clsx";
|
||||
import type * as React from "react";
|
||||
import * as React from "react";
|
||||
|
||||
export const Main = ({
|
||||
children,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type * as React from "react";
|
||||
import * as React from "react";
|
||||
import { useIsMounted } from "~/hooks/useIsMounted";
|
||||
|
||||
export function RelativeTime({
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { NavLink } from "@remix-run/react";
|
||||
import type { LinkProps } from "@remix-run/react";
|
||||
import clsx from "clsx";
|
||||
import type * as React from "react";
|
||||
import * as React from "react";
|
||||
|
||||
export function SubNav({ children }: { children: React.ReactNode }) {
|
||||
return (
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import clsx from "clsx";
|
||||
import type * as React from "react";
|
||||
import * as React from "react";
|
||||
|
||||
// shares styles with SubNav.tsx
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { useSearchParams } from "@remix-run/react";
|
||||
import type * as React from "react";
|
||||
import * as React from "react";
|
||||
import { useTranslation } from "~/hooks/useTranslation";
|
||||
import { languages } from "~/modules/i18n";
|
||||
import { LinkButton } from "../Button";
|
||||
|
||||
@@ -257,7 +257,7 @@ export interface Team {
|
||||
deletedAt: number | null;
|
||||
}
|
||||
|
||||
export type MemberRole = typeof TEAM_MEMBER_ROLES[number];
|
||||
export type MemberRole = (typeof TEAM_MEMBER_ROLES)[number];
|
||||
|
||||
export interface TeamMember {
|
||||
teamId: number;
|
||||
|
||||
@@ -117,7 +117,7 @@ export interface SubWeaponParams {
|
||||
DirectDamage?: number;
|
||||
}
|
||||
|
||||
type SpecialWeaponParamsObject = typeof weaponParams["specialWeapons"];
|
||||
type SpecialWeaponParamsObject = (typeof weaponParams)["specialWeapons"];
|
||||
export type SpecialWeaponParams = SpecialWeaponParamsObject[SpecialWeaponId] & {
|
||||
overwrites?: Overwrites;
|
||||
};
|
||||
@@ -148,7 +148,7 @@ export interface StatFunctionInput {
|
||||
hasTacticooler: boolean;
|
||||
}
|
||||
|
||||
export type InkConsumeType = typeof INK_CONSUME_TYPES[number];
|
||||
export type InkConsumeType = (typeof INK_CONSUME_TYPES)[number];
|
||||
|
||||
export const INK_CONSUME_TYPES = [
|
||||
"NORMAL",
|
||||
@@ -169,7 +169,7 @@ export interface FullInkTankOption {
|
||||
type: InkConsumeType;
|
||||
}
|
||||
|
||||
export type DamageType = typeof DAMAGE_TYPE[number];
|
||||
export type DamageType = (typeof DAMAGE_TYPE)[number];
|
||||
|
||||
export interface Damage {
|
||||
value: number;
|
||||
@@ -253,6 +253,6 @@ export interface AnalyzedBuild {
|
||||
};
|
||||
}
|
||||
|
||||
export type SpecialEffectType = typeof SPECIAL_EFFECTS[number]["type"];
|
||||
export type SpecialEffectType = (typeof SPECIAL_EFFECTS)[number]["type"];
|
||||
|
||||
export type AbilityValuesKeys = keyof typeof abilityValues;
|
||||
|
||||
@@ -135,7 +135,7 @@ export function applySpecialEffects({
|
||||
ldeIntensity,
|
||||
}: {
|
||||
abilityPoints: AbilityPoints;
|
||||
effects: Array<typeof SPECIAL_EFFECTS[number]["type"]>;
|
||||
effects: Array<(typeof SPECIAL_EFFECTS)[number]["type"]>;
|
||||
ldeIntensity: number;
|
||||
}): AbilityPoints {
|
||||
const result: AbilityPoints = new Map(abilityPoints);
|
||||
@@ -164,7 +164,7 @@ function effectObjToValuesArr({
|
||||
effectObj,
|
||||
ldeIntensity,
|
||||
}: {
|
||||
effectObj: typeof SPECIAL_EFFECTS[number];
|
||||
effectObj: (typeof SPECIAL_EFFECTS)[number];
|
||||
ldeIntensity: number;
|
||||
}) {
|
||||
if (typeof effectObj.values === "function") {
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
import type { IMAGE_TYPES } from "./upload-constants";
|
||||
|
||||
export type ImageUploadType = typeof IMAGE_TYPES[number];
|
||||
export type ImageUploadType = (typeof IMAGE_TYPES)[number];
|
||||
|
||||
@@ -111,7 +111,10 @@ export const damageTypePriorityList = [
|
||||
"SPLATANA_HORIZONTAL_DIRECT",
|
||||
"SPLATANA_HORIZONTAL",
|
||||
] as const;
|
||||
assertType<typeof damageTypePriorityList[number], typeof DAMAGE_TYPE[number]>();
|
||||
assertType<
|
||||
(typeof damageTypePriorityList)[number],
|
||||
(typeof DAMAGE_TYPE)[number]
|
||||
>();
|
||||
|
||||
function validatedDamageTypeFromSearchParams({
|
||||
searchParams,
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import type { DAMAGE_RECEIVERS } from "./calculator-constants";
|
||||
|
||||
export type DamageReceiver = typeof DAMAGE_RECEIVERS[number];
|
||||
export type DamageReceiver = (typeof DAMAGE_RECEIVERS)[number];
|
||||
|
||||
export type HitPoints = Record<DamageReceiver, number>;
|
||||
|
||||
@@ -51,7 +51,7 @@ export const languages = [
|
||||
},
|
||||
] as const;
|
||||
|
||||
export type LanguageCode = typeof languages[number]["code"];
|
||||
export type LanguageCode = (typeof languages)[number]["code"];
|
||||
|
||||
export const config = {
|
||||
supportedLngs: languages.map((lang) => lang.code),
|
||||
|
||||
@@ -7,20 +7,20 @@ import type {
|
||||
specialWeaponIds,
|
||||
} from "./weapon-ids";
|
||||
|
||||
export type ModeShort = typeof modes[number]["short"];
|
||||
export type ModeShort = (typeof modes)[number]["short"];
|
||||
export type RankedModeShort = "SZ" | "TC" | "RM" | "CB";
|
||||
|
||||
export type StageId = typeof stageIds[number];
|
||||
export type StageId = (typeof stageIds)[number];
|
||||
|
||||
export type ModeWithStage = { mode: ModeShort; stageId: StageId };
|
||||
|
||||
export type Ability = typeof abilities[number]["name"];
|
||||
export type AbilityWithUnknown = typeof abilities[number]["name"] | "UNKNOWN";
|
||||
export type AbilityType = typeof abilities[number]["type"];
|
||||
export type Ability = (typeof abilities)[number]["name"];
|
||||
export type AbilityWithUnknown = (typeof abilities)[number]["name"] | "UNKNOWN";
|
||||
export type AbilityType = (typeof abilities)[number]["type"];
|
||||
|
||||
export type MainWeaponId = typeof mainWeaponIds[number];
|
||||
export type SubWeaponId = typeof subWeaponIds[number];
|
||||
export type SpecialWeaponId = typeof specialWeaponIds[number];
|
||||
export type MainWeaponId = (typeof mainWeaponIds)[number];
|
||||
export type SubWeaponId = (typeof subWeaponIds)[number];
|
||||
export type SpecialWeaponId = (typeof specialWeaponIds)[number];
|
||||
|
||||
export type BuildAbilitiesTuple = [
|
||||
head: [main: Ability, s1: Ability, s2: Ability, s3: Ability],
|
||||
|
||||
@@ -241,11 +241,7 @@ function Fonts() {
|
||||
return (
|
||||
<>
|
||||
<link rel="preconnect" href="https://fonts.googleapis.com" />
|
||||
<link
|
||||
rel="preconnect"
|
||||
href="https://fonts.gstatic.com"
|
||||
crossOrigin="true"
|
||||
/>
|
||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossOrigin="" />
|
||||
<link
|
||||
href="https://fonts.googleapis.com/css2?family=Lexend:wght@400;600;700&display=swap"
|
||||
rel="stylesheet"
|
||||
|
||||
@@ -30,7 +30,7 @@ const PROGRAMMERS = ["DoubleCookies", "ElementUser", "remmycat"] as const;
|
||||
|
||||
const TRANSLATORS: Array<{
|
||||
translators: Array<string>;
|
||||
language: typeof languages[number]["code"];
|
||||
language: (typeof languages)[number]["code"];
|
||||
}> = [
|
||||
{
|
||||
translators: ["Frederik"],
|
||||
|
||||
@@ -71,7 +71,7 @@ const newBuildActionSchema = z.object({
|
||||
z
|
||||
.number()
|
||||
.refine((val) =>
|
||||
mainWeaponIds.includes(val as typeof mainWeaponIds[number])
|
||||
mainWeaponIds.includes(val as (typeof mainWeaponIds)[number])
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -82,14 +82,16 @@ const newBuildActionSchema = z.object({
|
||||
actualNumber,
|
||||
z
|
||||
.number()
|
||||
.refine((val) => headGearIds.includes(val as typeof headGearIds[number]))
|
||||
.refine((val) =>
|
||||
headGearIds.includes(val as (typeof headGearIds)[number])
|
||||
)
|
||||
),
|
||||
"CLOTHES[value]": z.preprocess(
|
||||
actualNumber,
|
||||
z
|
||||
.number()
|
||||
.refine((val) =>
|
||||
clothesGearIds.includes(val as typeof clothesGearIds[number])
|
||||
clothesGearIds.includes(val as (typeof clothesGearIds)[number])
|
||||
)
|
||||
),
|
||||
"SHOES[value]": z.preprocess(
|
||||
@@ -97,7 +99,7 @@ const newBuildActionSchema = z.object({
|
||||
z
|
||||
.number()
|
||||
.refine((val) =>
|
||||
shoesGearIds.includes(val as typeof shoesGearIds[number])
|
||||
shoesGearIds.includes(val as (typeof shoesGearIds)[number])
|
||||
)
|
||||
),
|
||||
abilities: z.preprocess(
|
||||
|
||||
@@ -112,7 +112,7 @@ const userEditActionSchema = z
|
||||
z
|
||||
.number()
|
||||
.refine((val) =>
|
||||
mainWeaponIds.includes(val as typeof mainWeaponIds[number])
|
||||
mainWeaponIds.includes(val as (typeof mainWeaponIds)[number])
|
||||
)
|
||||
)
|
||||
.max(USER.WEAPON_POOL_MAX_SIZE)
|
||||
|
||||
@@ -118,5 +118,5 @@ export type SendouRouteHandle = {
|
||||
}) => Breadcrumb | Array<Breadcrumb> | undefined;
|
||||
|
||||
/** The name of a navItem that is active on this route. See nav-items.json */
|
||||
navItemName?: typeof navItems[number]["name"];
|
||||
navItemName?: (typeof navItems)[number]["name"];
|
||||
};
|
||||
|
||||
@@ -179,12 +179,12 @@ export const badgeUrl = ({
|
||||
export const articlePreviewUrl = (slug: string) =>
|
||||
`/static-assets/img/article-previews/${slug}.png`;
|
||||
|
||||
export const navIconUrl = (navItem: typeof navItems[number]["name"]) =>
|
||||
export const navIconUrl = (navItem: (typeof navItems)[number]["name"]) =>
|
||||
`/static-assets/img/layout/${navItem}`;
|
||||
export const gearImageUrl = (gearType: GearType, gearSplId: number) =>
|
||||
`/static-assets/img/gear/${gearType.toLowerCase()}/${gearSplId}`;
|
||||
export const weaponCategoryUrl = (
|
||||
category: typeof weaponCategories[number]["name"]
|
||||
category: (typeof weaponCategories)[number]["name"]
|
||||
) => `/static-assets/img/weapon-categories/${category}`;
|
||||
export const mainWeaponImageUrl = (mainWeaponSplId: MainWeaponId) =>
|
||||
`/static-assets/img/main-weapons/${mainWeaponSplId}`;
|
||||
|
||||
562
package-lock.json
generated
562
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
26
package.json
26
package.json
@@ -38,8 +38,8 @@
|
||||
"@remix-run/node": "^1.9.0",
|
||||
"@remix-run/react": "^1.9.0",
|
||||
"@remix-run/serve": "^1.9.0",
|
||||
"@tldraw/tldraw": "^1.26.3",
|
||||
"aws-sdk": "^2.1290.0",
|
||||
"@tldraw/tldraw": "^1.27.0",
|
||||
"aws-sdk": "^2.1299.0",
|
||||
"better-sqlite3": "^8.0.1",
|
||||
"clsx": "^1.2.1",
|
||||
"compressorjs": "^1.1.1",
|
||||
@@ -69,36 +69,36 @@
|
||||
"remix-auth-oauth2": "^1.5.0",
|
||||
"remix-i18next": "^4.1.1",
|
||||
"slugify": "^1.6.5",
|
||||
"swr": "^2.0.0",
|
||||
"swr": "^2.0.1",
|
||||
"tiny-invariant": "^1.3.1",
|
||||
"zod": "^3.20.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@playwright/test": "^1.29.1",
|
||||
"@playwright/test": "^1.29.2",
|
||||
"@remix-run/dev": "^1.9.0",
|
||||
"@remix-run/eslint-config": "^1.9.0",
|
||||
"@types/better-sqlite3": "^7.6.3",
|
||||
"@types/i18next-fs-backend": "^1.1.2",
|
||||
"@types/node-cron": "^3.0.7",
|
||||
"@types/prettier": "^2.7.2",
|
||||
"@types/react": "^18.0.26",
|
||||
"@types/react": "^18.0.27",
|
||||
"@types/react-dom": "^18.0.10",
|
||||
"@typescript-eslint/eslint-plugin": "^5.47.1",
|
||||
"@typescript-eslint/parser": "^5.47.1",
|
||||
"@typescript-eslint/eslint-plugin": "^5.48.2",
|
||||
"@typescript-eslint/parser": "^5.48.2",
|
||||
"cross-env": "^7.0.3",
|
||||
"dotenv": "^16.0.3",
|
||||
"eslint": "^8.30.0",
|
||||
"eslint-plugin-react": "^7.31.11",
|
||||
"eslint": "^8.32.0",
|
||||
"eslint-plugin-react": "^7.32.1",
|
||||
"eslint-plugin-react-hooks": "^4.6.0",
|
||||
"ley": "^0.8.1",
|
||||
"prettier": "2.8.1",
|
||||
"stylelint": "^14.16.0",
|
||||
"prettier": "2.8.3",
|
||||
"stylelint": "^14.16.1",
|
||||
"stylelint-config-idiomatic-order": "^9.0.0",
|
||||
"stylelint-config-prettier": "^9.0.4",
|
||||
"stylelint-config-standard": "^29.0.0",
|
||||
"stylelint-order": "^5.0.0",
|
||||
"stylelint-order": "^6.0.1",
|
||||
"ts-node": "^10.9.1",
|
||||
"tsconfig-paths": "^4.1.1",
|
||||
"tsconfig-paths": "^4.1.2",
|
||||
"tsm": "^2.3.0",
|
||||
"typescript": "^4.9.4",
|
||||
"uvu": "^0.5.6"
|
||||
|
||||
@@ -28,9 +28,9 @@ import {
|
||||
|
||||
const CURRENT_SEASON = 2;
|
||||
|
||||
type MainWeapon = typeof weapons[number];
|
||||
type SubWeapon = typeof subWeapons[number];
|
||||
type SpecialWeapon = typeof specialWeapons[number];
|
||||
type MainWeapon = (typeof weapons)[number];
|
||||
type SubWeapon = (typeof subWeapons)[number];
|
||||
type SpecialWeapon = (typeof specialWeapons)[number];
|
||||
type TranslationArray = Array<{ language: string; key: string; value: string }>;
|
||||
|
||||
async function main() {
|
||||
|
||||
@@ -54,7 +54,7 @@ async function main() {
|
||||
stages.map((_, i) => {
|
||||
const codeName = codeNames[
|
||||
i
|
||||
] as keyof typeof langDict["CommonMsg/VS/VSStageName"];
|
||||
] as keyof (typeof langDict)["CommonMsg/VS/VSStageName"];
|
||||
invariant(codeName);
|
||||
|
||||
return [`STAGE_${i}`, langDict["CommonMsg/VS/VSStageName"][codeName]];
|
||||
|
||||
Reference in New Issue
Block a user