patch da code

This commit is contained in:
tresabhi committed 2026-05-15 18:43:08 -05:00
1 parent b298874f0d
commit a00411919d
80 files changed
+131 -112

No files matched your search

@@ -1,6 +1,6 @@
---
import type { CollectionEntry } from "astro:content";
import { api } from "../core/api/dynamic";
import { api } from "../api/dynamic";
import ApiDescription from "./ApiDescription.astro";
import { ApiTester } from "./ApiTester";
@@ -14,7 +14,7 @@ import {
type Symbol,
type TypeNode,
} from "typescript";
import { api } from "../core/api/dynamic";
import { api } from "../api/dynamic";
import { Code } from "./Code";
import HighlightedCodeBlock from "./HighlightedCodeBlock.astro";
import { Link } from "./Link";
@@ -2,10 +2,10 @@ import { literals } from "@blitzkit/i18n";
import type { Avatar } from "@protos/blitzkit/avatar";
import { Grade } from "@protos/game/proto/legacy/blitz_static_standard_grades_enum";
import { DownloadIcon, StarFilledIcon } from "@radix-ui/react-icons";
import type { Color } from "../../core/ui/color";
import { useGameStrings } from "../../hooks/useGameStrings";
import { useStrings } from "../../hooks/useStrings";
import type { PropsWithSkeleton } from "../../types/propsWithSkeleton";
import type { Color } from "../../ui/color";
import { Badge } from "../Badge";
import { Button } from "../Button";
import { Dialog } from "../Dialog";
@@ -1,6 +1,6 @@
import fuzzysort from "fuzzysort";
import { useMemo } from "react";
import { api } from "../../core/api/dynamic";
import { api } from "../../api/dynamic";
import { useAwait } from "../../hooks/useAwait";
import { useGameStrings } from "../../hooks/useGameStrings";
import { useLocale } from "../../hooks/useLocale";
@@ -1,6 +1,6 @@
import type { ComponentProps } from "react";
import { classNames } from "../../core/ui/classNames";
import type { Color } from "../../core/ui/color";
import { classNames } from "../../ui/classNames";
import type { Color } from "../../ui/color";
import { LIGHT_TEXT_COLORS } from "../Button";
import styles from "./index.module.css";
@@ -1,6 +1,6 @@
import type { ComponentProps } from "react";
import { classNames } from "../../core/ui/classNames";
import type { Color } from "../../core/ui/color";
import { classNames } from "../../ui/classNames";
import type { Color } from "../../ui/color";
import styles from "./index.module.css";
export interface ButtonProps extends ComponentProps<"button"> {
@@ -1,6 +1,6 @@
---
import { ExclamationTriangleIcon } from "@radix-ui/react-icons";
import { api } from "../core/api/dynamic";
import { api } from "../api/dynamic";
import { Heading } from "./Heading";
import { Section } from "./Section";
import { Text } from "./Text";
@@ -1,5 +1,5 @@
import type { ComponentProps } from "react";
import { classNames } from "../../core/ui/classNames";
import { classNames } from "../../ui/classNames";
import styles from "./index.module.css";
export interface CodeProps extends ComponentProps<"code"> {
@@ -1,5 +1,5 @@
---
import type { Color } from "../core/ui/color";
import type { Color } from "../ui/color";
interface Props {
color: Color;
@@ -1,6 +1,6 @@
---
import * as colors from "@radix-ui/colors";
import type { Color } from "../core/ui/color";
import type { Color } from "../ui/color";
interface Props {
color: Color | AlphaOnlyColor;
@@ -1,7 +1,7 @@
---
import { DiscordLogoIcon, GitHubLogoIcon } from "@radix-ui/react-icons";
import packageJson from "../../../../package.json";
import { api } from "../core/api/dynamic";
import { api } from "../api/dynamic";
import { BlitzKitIcon } from "../icons/BlitzKit";
import { Code } from "./Code";
import { Link } from "./Link";
@@ -1,4 +1,4 @@
import { classNames } from "../../core/ui/classNames";
import { classNames } from "../../ui/classNames";
import { Text, type TextProps } from "../Text";
import "./index.css";
@@ -1,6 +1,6 @@
---
import { api } from "../core/api/dynamic";
import { tools } from "../core/tools/tools";
import { api } from "../api/dynamic";
import { tools } from "../config/tools";
import { Heading } from "./Heading";
import { Section } from "./Section";
import ToolCard from "./ToolCard.astro";
@@ -1,6 +1,6 @@
---
import { api } from "../core/api/dynamic";
import { tools } from "../core/tools/tools";
import { api } from "../api/dynamic";
import { tools } from "../config/tools";
import { Heading } from "./Heading";
import { Section } from "./Section";
import ToolCard from "./ToolCard.astro";
@@ -1,6 +1,6 @@
---
import { MagnifyingGlassIcon } from "@radix-ui/react-icons";
import { api } from "../core/api/dynamic";
import { api } from "../api/dynamic";
import { BlitzKitIcon } from "../icons/BlitzKit";
import { Code } from "./Code";
import { Text } from "./Text";
@@ -1,6 +1,6 @@
---
import { api } from "../core/api/dynamic";
import { tools } from "../core/tools/tools";
import { api } from "../api/dynamic";
import { tools } from "../config/tools";
import { Heading } from "./Heading";
import { Section } from "./Section";
import ToolCard from "./ToolCard.astro";
@@ -1,6 +1,6 @@
---
import { api } from "../core/api/dynamic";
import { tools } from "../core/tools/tools";
import { api } from "../api/dynamic";
import { tools } from "../config/tools";
import { Heading } from "./Heading";
import { HomeTanksPopular } from "./HomeTanksPopular";
import { Section } from "./Section";
@@ -1,4 +1,4 @@
import { api } from "../../core/api/dynamic";
import { api } from "../../api/dynamic";
import { useAwait } from "../../hooks/useAwait";
import {
LocaleProvider,
@@ -1,6 +1,6 @@
---
import { api } from "../core/api/dynamic";
import { tools } from "../core/tools/tools";
import { api } from "../api/dynamic";
import { tools } from "../config/tools";
import { Heading } from "./Heading";
import { Section } from "./Section";
import ToolCard from "./ToolCard.astro";
@@ -1,4 +1,4 @@
import { classNames } from "../../core/ui/classNames";
import { classNames } from "../../ui/classNames";
import { Button, type ButtonProps } from "../Button";
import styles from "./index.module.css";
@@ -1,4 +1,4 @@
import { classNames } from "../../core/ui/classNames";
import { classNames } from "../../ui/classNames";
import { Skeleton, type SkeletonProps } from "../Skeleton";
import "./index.css";
@@ -1,6 +1,6 @@
import type { ComponentProps } from "react";
import { classNames } from "../../core/ui/classNames";
import type { Color } from "../../core/ui/color";
import { classNames } from "../../ui/classNames";
import type { Color } from "../../ui/color";
import styles from "./index.module.css";
export interface LinkProps extends ComponentProps<"a"> {
@@ -1,6 +1,6 @@
import type { ComponentProps, FunctionComponent } from "react";
import Markdown from "react-markdown";
import { classNames } from "../../core/ui/classNames";
import { classNames } from "../../ui/classNames";
import { Code } from "../Code";
import { Text } from "../Text";
import styles from "./index.module.css";
@@ -2,8 +2,8 @@ import { formatCompact } from "@blitzkit/core";
import type { StandardPrice } from "@protos/game/proto/legacy/blitz_static_standard_price";
import type { StandardSinglePrice } from "@protos/game/proto/legacy/blitz_static_standard_single_price";
import type { ComponentProps } from "react";
import { classNames } from "../../core/ui/classNames";
import { useLocale } from "../../hooks/useLocale";
import { classNames } from "../../ui/classNames";
import { Text } from "../Text";
import styles from "./index.module.css";
@@ -1,6 +1,6 @@
import { useEffect, useRef, type ComponentProps } from "react";
import { clamp } from "three/src/math/MathUtils.js";
import { classNames } from "../../core/ui/classNames";
import { classNames } from "../../ui/classNames";
import styles from "./index.module.css";
interface ScrollerProps extends ComponentProps<"div"> {}
@@ -1,6 +1,6 @@
import type { ComponentProps } from "react";
import { classNames } from "../../core/ui/classNames";
import type { Space } from "../../types/space";
import { classNames } from "../../ui/classNames";
import styles from "./index.module.css";
export interface SectionProps extends ComponentProps<"div"> {
@@ -1,5 +1,5 @@
import type { ComponentProps } from "react";
import { classNames } from "../../core/ui/classNames";
import { classNames } from "../../ui/classNames";
import styles from "./index.module.css";
export interface SkeletonProps extends ComponentProps<"div"> {}
@@ -1,5 +1,5 @@
import { api } from "../../core/api/dynamic";
import { clientUnmounted } from "../../core/game/unmounted";
import { api } from "../../api/dynamic";
import { clientUnmounted } from "../../game/unmounted";
import { useAwait } from "../../hooks/useAwait";
import { useGameStrings } from "../../hooks/useGameStrings";
import { useLocale } from "../../hooks/useLocale";
@@ -1,6 +1,6 @@
import type { CharacteristicOutput } from "../core/tankopedia/characteristics";
import type { CharacteristicRenderConfig } from "../core/tankopedia/characteristicsOrder";
import { renderCharacteristic } from "../hooks/useCharacteristicRenderer";
import type { CharacteristicOutput } from "../tankopedia/characteristics";
import type { CharacteristicRenderConfig } from "../tankopedia/characteristicsOrder";
interface Props {
characteristic: CharacteristicOutput;
@@ -4,6 +4,10 @@ import type { StandardPrice } from "@protos/game/proto/legacy/blitz_static_stand
import type { UpgradeLine } from "@protos/game/proto/legacy/blitz_static_tank_upgrade_line";
import type { StageParameters } from "@protos/game/proto/legacy/blitz_static_tank_upgrade_single_stage";
import { useMemo } from "react";
import {
alternativeLines,
isAlternativeLine,
} from "../../config/alternativeLines";
import { useProtagonist } from "../../hooks/useProtagonist";
import { useStrings } from "../../hooks/useStrings";
import { useUpgradePreset } from "../../hooks/useUpgradePreset";
@@ -46,9 +50,14 @@ function Line({ name, lines }: LineProps) {
const combinedLines = useMemo(() => {
const names: string[] = [name];
for (const key in mergeLines) {
if (mergeLines[key] === name && lines.some((line) => line.name === key)) {
names.push(key);
for (const originalLine in alternativeLines) {
const alternativeLine = alternativeLines[originalLine];
if (
originalLine === name &&
lines.some((line) => line.name === alternativeLine)
) {
names.push(alternativeLine);
}
}
@@ -57,7 +66,7 @@ function Line({ name, lines }: LineProps) {
return (
<div className={styles.line}>
{!(name in mergeLines) &&
{!isAlternativeLine(name) &&
combinedLines.map((name) => (
<LineInner key={name} name={name} lines={lines} />
))}
@@ -173,7 +182,7 @@ function LineElement({ index, lineName, stage }: LineElementProps) {
{/* {stage.display_name} */}
<Text lowContrast size="minor" className={styles.tier}>
{lineName in mergeLines
{isAlternativeLine(lineName)
? strings.tanks.loadout.alternative
: romanize(stage.number)}
</Text>
@@ -1,6 +1,6 @@
import type { ComponentProps } from "react";
import { classNames } from "../../core/ui/classNames";
import type { ColorWithBW } from "../../core/ui/color";
import { classNames } from "../../ui/classNames";
import type { ColorWithBW } from "../../ui/color";
import styles from "./index.module.css";
export interface TextProps extends ComponentProps<"span"> {
@@ -7,7 +7,7 @@ import {
type ComponentProps,
type ReactNode,
} from "react";
import { classNames } from "../../core/ui/classNames";
import { classNames } from "../../ui/classNames";
import styles from "./index.module.css";
export interface TextFieldProps extends ComponentProps<"input"> {
@@ -1,6 +1,6 @@
---
import { api } from "../core/api/dynamic";
import type { Tool } from "../core/tools/tools";
import { api } from "../api/dynamic";
import type { Tool } from "../config/tools";
import { Heading } from "./Heading";
import { Text } from "./Text";
@@ -1,7 +1,7 @@
---
import { CaretRightIcon } from "@radix-ui/react-icons";
import { api } from "../core/api/dynamic";
import { type Tool } from "../core/tools/tools";
import { api } from "../api/dynamic";
import { type Tool } from "../config/tools";
import { Button } from "./Button";
import { LinkI18n } from "./LinkI18n";
import { Text } from "./Text";