proto imports

This commit is contained in:
tresabhi committed 2026-09-27 17:19:39 -05:00
1 parent 127c55ec93
commit 593ae760e7
42 files changed
+102 -100

No files matched your search

+1 -1
View File
@@ -7,7 +7,7 @@ description: Apply the user's persistent repository boundaries whenever working
Apply these boundaries to all work in the user's repositories: Apply these boundaries to all work in the user's repositories:
- Never run any Git command or invoke Git through a shell, script, or tool. This includes read-only commands such as status, diff, and log. Use ordinary file inspection and editing tools instead. - Read-only Git commands are allowed when useful, including status, diff, log, and show. Do not run Git commands that modify repository state.
- Never edit `bun.lock`, including regenerating or formatting it. When dependency manifests change, leave the lockfile alone; the user will update it by running `bun install`. - Never edit `bun.lock`, including regenerating or formatting it. When dependency manifests change, leave the lockfile alone; the user will update it by running `bun install`.
These are firm constraints, not preferences to revisit for a task. Continue useful work within them and explain any limitation if a requested result would require crossing either boundary. These are firm constraints, not preferences to revisit for a task. Continue useful work within them and explain any limitation if a requested result would require crossing either boundary.
+2 -1
View File
@@ -1,5 +1,6 @@
import { asset, Reviews, Video, youtubers } from "@blitzkit/core"; import { asset, youtubers } from "@blitzkit/core";
import locales from "@blitzkit/i18n/locales.json"; import locales from "@blitzkit/i18n/locales.json";
import { Reviews, Video } from "@blitzkit/protos";
import { google } from "googleapis"; import { google } from "googleapis";
import { cloneDeep, uniqBy } from "lodash-es"; import { cloneDeep, uniqBy } from "lodash-es";
import { AssetUploader } from "./core/github/assetUploader"; import { AssetUploader } from "./core/github/assetUploader";
@@ -1,4 +1,5 @@
import { alias, Avatar } from "@blitzkit/core"; import { alias } from "@blitzkit/core";
import { Avatar } from "@blitzkit/protos";
import { Cross1Icon, DownloadIcon } from "@radix-ui/react-icons"; import { Cross1Icon, DownloadIcon } from "@radix-ui/react-icons";
import { useRef } from "react"; import { useRef } from "react";
import { useIntersection } from "../hooks/useIntersection"; import { useIntersection } from "../hooks/useIntersection";
@@ -1,4 +1,5 @@
import { type TankDefinition, tankIcon } from "@blitzkit/core"; import { tankIcon } from "@blitzkit/core";
import type { TankDefinition } from "@blitzkit/protos";
import { useEffect, useRef } from "react"; import { useEffect, useRef } from "react";
import { Vector2 } from "three"; import { Vector2 } from "three";
import { useLocale } from "../../hooks/useLocale"; import { useLocale } from "../../hooks/useLocale";
@@ -1,4 +1,4 @@
import type { Consumable } from "@blitzkit/core"; import type { Consumable } from "@blitzkit/protos";
import { Flex, type FlexProps } from "@radix-ui/themes"; import { Flex, type FlexProps } from "@radix-ui/themes";
import { ConsumableButton } from "./ModuleButtons/ConsumableButton"; import { ConsumableButton } from "./ModuleButtons/ConsumableButton";
@@ -1,9 +1,9 @@
import type { EquipmentPreset } from '@blitzkit/core'; import type { EquipmentPreset } from "@blitzkit/protos";
import { Flex } from '@radix-ui/themes'; import { Flex } from "@radix-ui/themes";
import { chunk, cloneDeep } from 'lodash-es'; import { chunk, cloneDeep } from "lodash-es";
import type { EquipmentMatrix } from '../../stores/duel'; import type { EquipmentMatrix } from "../../stores/duel";
import { EquipmentButton } from '../ModuleButtons/EquipmentButton'; import { EquipmentButton } from "../ModuleButtons/EquipmentButton";
import './index.css'; import "./index.css";
interface EquipmentManagerProps { interface EquipmentManagerProps {
preset: EquipmentPreset; preset: EquipmentPreset;
+2 -6
View File
@@ -1,10 +1,6 @@
import { import { alias, SEARCH_KEYS, TIER_ROMAN_NUMERALS } from "@blitzkit/core";
alias,
SEARCH_KEYS,
TankDefinition,
TIER_ROMAN_NUMERALS,
} from "@blitzkit/core";
import { literals } from "@blitzkit/i18n"; import { literals } from "@blitzkit/i18n";
import { TankDefinition } from "@blitzkit/protos";
import { import {
ArrowRightIcon, ArrowRightIcon,
EyeOpenIcon, EyeOpenIcon,
@@ -1,12 +1,12 @@
import { import { TIER_ROMAN_NUMERALS } from "@blitzkit/core";
TIER_ROMAN_NUMERALS, import type {
type EngineDefinition, EngineDefinition,
type GunDefinition, GunDefinition,
type ShellDefinition, ShellDefinition,
type TankDefinition, TankDefinition,
type TrackDefinition, TrackDefinition,
type TurretDefinition, TurretDefinition,
} from "@blitzkit/core"; } from "@blitzkit/protos";
import { DropdownMenu, Flex } from "@radix-ui/themes"; import { DropdownMenu, Flex } from "@radix-ui/themes";
import { useState } from "react"; import { useState } from "react";
import { useLocale } from "../hooks/useLocale"; import { useLocale } from "../hooks/useLocale";
@@ -1,4 +1,5 @@
import { TankDefinition, formatCompact } from "@blitzkit/core"; import { formatCompact } from "@blitzkit/core";
import { TankDefinition } from "@blitzkit/protos";
import { Table } from "@radix-ui/themes"; import { Table } from "@radix-ui/themes";
import { memo } from "react"; import { memo } from "react";
import { awaitableAverageDefinitions } from "../../core/awaitables/averageDefinitions"; import { awaitableAverageDefinitions } from "../../core/awaitables/averageDefinitions";
@@ -1,8 +1,5 @@
import { import { isExplosive, resolvePenetrationCoefficient } from "@blitzkit/core";
ShellType, import { ShellType } from "@blitzkit/protos";
isExplosive,
resolvePenetrationCoefficient,
} from "@blitzkit/core";
import { useThree } from "@react-three/fiber"; import { useThree } from "@react-three/fiber";
import { useCallback } from "react"; import { useCallback } from "react";
import { import {
@@ -1,4 +1,5 @@
import { type TankDefinition, tankIcon, TankType } from "@blitzkit/core"; import { tankIcon } from "@blitzkit/core";
import { type TankDefinition, TankType } from "@blitzkit/protos";
import { Box, Flex } from "@radix-ui/themes"; import { Box, Flex } from "@radix-ui/themes";
import { useLocale } from "../hooks/useLocale"; import { useLocale } from "../hooks/useLocale";
import { classIcons } from "./ClassIcon"; import { classIcons } from "./ClassIcon";
@@ -2,8 +2,8 @@ import {
normalizeBoundingBox, normalizeBoundingBox,
resolveDpm, resolveDpm,
unionBoundingBox, unionBoundingBox,
type TankDefinition,
} from "@blitzkit/core"; } from "@blitzkit/core";
import type { TankDefinition } from "@blitzkit/protos";
import { useMemo } from "react"; import { useMemo } from "react";
import { api } from "../../../api/dynamic"; import { api } from "../../../api/dynamic";
import { resolveReload } from "../../../core/blitzkit/resolveReload"; import { resolveReload } from "../../../core/blitzkit/resolveReload";
@@ -1,4 +1,4 @@
import { type TankDefinition } from "@blitzkit/core"; import type { TankDefinition } from "@blitzkit/protos";
import { CaretRightIcon } from "@radix-ui/react-icons"; import { CaretRightIcon } from "@radix-ui/react-icons";
import { useLocale } from "../../../hooks/useLocale"; import { useLocale } from "../../../hooks/useLocale";
import { TankFilters } from "../../../stores/tankFilters"; import { TankFilters } from "../../../stores/tankFilters";
@@ -1,5 +1,5 @@
import type { AssaultRanges } from "@blitzkit/core";
import { literals } from "@blitzkit/i18n"; import { literals } from "@blitzkit/i18n";
import type { AssaultRanges } from "@blitzkit/protos";
import { Box, Flex, Text } from "@radix-ui/themes"; import { Box, Flex, Text } from "@radix-ui/themes";
import { clamp } from "three/src/math/MathUtils.js"; import { clamp } from "three/src/math/MathUtils.js";
import { import {
@@ -68,7 +68,7 @@ export function AssaultRangesVisualizer({ ranges: _ranges, stats }: Props) {
> >
{literals(strings.common.units.hp, { {literals(strings.common.units.hp, {
value: Math.round( value: Math.round(
stats.damageWithoutAssault * range.factor stats.damageWithoutAssault * range.factor,
), ),
})} })}
</Text> </Text>
@@ -1,5 +1,6 @@
import { CREW_MEMBER_NAMES, CrewType } from "@blitzkit/core"; import { CREW_MEMBER_NAMES } from "@blitzkit/core";
import { literals } from "@blitzkit/i18n"; import { literals } from "@blitzkit/i18n";
import { CrewType } from "@blitzkit/protos";
import { AccessibilityIcon, InfoCircledIcon } from "@radix-ui/react-icons"; import { AccessibilityIcon, InfoCircledIcon } from "@radix-ui/react-icons";
import { Flex, Heading, IconButton, Popover, Text } from "@radix-ui/themes"; import { Flex, Heading, IconButton, Popover, Text } from "@radix-ui/themes";
import { Fragment } from "react/jsx-runtime"; import { Fragment } from "react/jsx-runtime";
@@ -1,16 +1,18 @@
import { import {
alias, alias,
EngineDefinition,
formatCompact, formatCompact,
GunDefinition,
ModuleType,
tankIcon, tankIcon,
TIER_ROMAN_NUMERALS, TIER_ROMAN_NUMERALS,
} from "@blitzkit/core";
import {
EngineDefinition,
GunDefinition,
ModuleType,
TrackDefinition, TrackDefinition,
TurretDefinition, TurretDefinition,
type TankDefinition, type TankDefinition,
type Unlock, type Unlock,
} from "@blitzkit/core"; } from "@blitzkit/protos";
import { import {
Button, Button,
ChevronDownIcon, ChevronDownIcon,
@@ -1,5 +1,5 @@
import { ShellType } from "@blitzkit/core";
import { literals } from "@blitzkit/i18n/src/literals"; import { literals } from "@blitzkit/i18n/src/literals";
import { ShellType } from "@blitzkit/protos";
import { import {
Button, Button,
Flex, Flex,
@@ -1,9 +1,5 @@
import { import { alias, TIER_ROMAN_NUMERALS } from "@blitzkit/core";
alias, import { TankPriceType, TankType } from "@blitzkit/protos";
TankPriceType,
TankType,
TIER_ROMAN_NUMERALS,
} from "@blitzkit/core";
import { Box, Flex } from "@radix-ui/themes"; import { Box, Flex } from "@radix-ui/themes";
import { Var } from "../../../core/radix/var"; import { Var } from "../../../core/radix/var";
import { useLocale } from "../../../hooks/useLocale"; import { useLocale } from "../../../hooks/useLocale";
@@ -1,5 +1,6 @@
import { alias, TankType } from "@blitzkit/core"; import { alias } from "@blitzkit/core";
import { literals } from "@blitzkit/i18n/src/literals"; import { literals } from "@blitzkit/i18n/src/literals";
import { TankType } from "@blitzkit/protos";
import { CaretLeftIcon, CaretRightIcon, PlusIcon } from "@radix-ui/react-icons"; import { CaretLeftIcon, CaretRightIcon, PlusIcon } from "@radix-ui/react-icons";
import { Flex, Heading, IconButton, ScrollArea, Text } from "@radix-ui/themes"; import { Flex, Heading, IconButton, ScrollArea, Text } from "@radix-ui/themes";
import { Fragment, useEffect, useMemo, useRef, useState } from "react"; import { Fragment, useEffect, useMemo, useRef, useState } from "react";
@@ -1,12 +1,14 @@
import { import {
formatCompositeStat, formatCompositeStat,
TankClass,
TankDefinition,
TankType,
type CompositeStats, type CompositeStats,
type CompositeStatsKey, type CompositeStatsKey,
} from "@blitzkit/core"; } from "@blitzkit/core";
import strings from "@blitzkit/i18n/strings/en.json"; import strings from "@blitzkit/i18n/strings/en.json";
import {
TankClass,
TankDefinition,
TankType,
} from "@blitzkit/protos";
import { amberDark, blueDark } from "@radix-ui/colors"; import { amberDark, blueDark } from "@radix-ui/colors";
import { Flex, Text, type FlexProps } from "@radix-ui/themes"; import { Flex, Text, type FlexProps } from "@radix-ui/themes";
import { times } from "lodash-es"; import { times } from "lodash-es";
@@ -1,4 +1,4 @@
import type { TankDefinition } from "@blitzkit/core"; import type { TankDefinition } from "@blitzkit/protos";
import { Box } from "@radix-ui/themes"; import { Box } from "@radix-ui/themes";
import { import {
useCallback, useCallback,
@@ -1,8 +1,5 @@
import { import { normalizeAngleRad } from "@blitzkit/core";
normalizeAngleRad, import type { PitchLimits, YawLimits } from "@blitzkit/protos";
type PitchLimits,
type YawLimits,
} from "@blitzkit/core";
import { clamp } from "lodash-es"; import { clamp } from "lodash-es";
import { degToRad } from "three/src/math/MathUtils.js"; import { degToRad } from "three/src/math/MathUtils.js";
@@ -1,6 +1,6 @@
import type { Vector3 as BlitzkitVector3 } from '@blitzkit/core'; import type { Vector3 as BlitzkitVector3 } from "@blitzkit/protos";
import { Vector3 as THREEVector3 } from 'three'; import { Vector3 as THREEVector3 } from "three";
import { rotateDavaVector } from './rotateDavaVector'; import { rotateDavaVector } from "./rotateDavaVector";
export function correctZYTuple(tuple: BlitzkitVector3) { export function correctZYTuple(tuple: BlitzkitVector3) {
return rotateDavaVector(new THREEVector3(tuple.x, tuple.y, -tuple.z)); return rotateDavaVector(new THREEVector3(tuple.x, tuple.y, -tuple.z));
@@ -1,9 +1,9 @@
import type { GunDefinition } from '@blitzkit/core'; import type { GunDefinition } from "@blitzkit/protos";
export function resolveReload(gun: GunDefinition) { export function resolveReload(gun: GunDefinition) {
if (gun.gun_type!.$case === 'regular') { if (gun.gun_type!.$case === "regular") {
return gun.gun_type!.value.reload; return gun.gun_type!.value.reload;
} else if (gun.gun_type!.$case === 'auto_loader') { } else if (gun.gun_type!.$case === "auto_loader") {
return ( return (
gun.gun_type!.value.clip_reload + gun.gun_type!.value.clip_reload +
(gun.gun_type!.value.shell_count - 1) * gun.gun_type!.value.intra_clip (gun.gun_type!.value.shell_count - 1) * gun.gun_type!.value.intra_clip
@@ -1,4 +1,4 @@
import type { Armor } from '@blitzkit/core'; import type { Armor } from "@blitzkit/protos";
export function resolveArmor(armor: Armor, index: number) { export function resolveArmor(armor: Armor, index: number) {
const spaced = armor.spaced?.includes(index) ?? false; const spaced = armor.spaced?.includes(index) ?? false;
@@ -1,15 +1,18 @@
import { import {
CrewType,
degressiveStat, degressiveStat,
isExplosive, isExplosive,
normalizeBoundingBox, normalizeBoundingBox,
progressiveStat, progressiveStat,
resolveDpm, resolveDpm,
resolvePenetrationCoefficient, resolvePenetrationCoefficient,
ShellType,
sum, sum,
TankClass,
unionBoundingBox, unionBoundingBox,
} from "@blitzkit/core";
import { coefficient } from "@blitzkit/core/src/blitzkit/coefficient";
import {
CrewType,
ShellType,
TankClass,
type EngineDefinition, type EngineDefinition,
type EquipmentDefinitions, type EquipmentDefinitions,
type GunDefinition, type GunDefinition,
@@ -19,8 +22,7 @@ import {
type TankDefinition, type TankDefinition,
type TrackDefinition, type TrackDefinition,
type TurretDefinition, type TurretDefinition,
} from "@blitzkit/core"; } from "@blitzkit/protos";
import { coefficient } from "@blitzkit/core/src/blitzkit/coefficient";
import type { EquipmentMatrix } from "../../stores/duel"; import type { EquipmentMatrix } from "../../stores/duel";
import { defaultEqualizer } from "./tankToDuelMember"; import { defaultEqualizer } from "./tankToDuelMember";
@@ -1,7 +1,7 @@
import type { ProvisionDefinitions, TankDefinition } from '@blitzkit/core'; import type { ProvisionDefinitions, TankDefinition } from "@blitzkit/protos";
import { uniqueId } from 'lodash-es'; import { uniqueId } from "lodash-es";
import type { CompareMember } from '../../stores/compareEphemeral'; import type { CompareMember } from "../../stores/compareEphemeral";
import { tankToDuelMember } from './tankToDuelMember'; import { tankToDuelMember } from "./tankToDuelMember";
export function tankToCompareMember( export function tankToCompareMember(
tank: TankDefinition, tank: TankDefinition,
@@ -1,5 +1,5 @@
import { EquipmentPreset } from '@blitzkit/core'; import { EquipmentPreset } from "@blitzkit/protos";
import type { EquipmentMatrix } from '../stores/duel'; import type { EquipmentMatrix } from "../stores/duel";
export function useAppliedEquipments( export function useAppliedEquipments(
matrix: EquipmentMatrix, matrix: EquipmentMatrix,
@@ -7,6 +7,6 @@ export function useAppliedEquipments(
) { ) {
const flatMatrix = matrix.flat(); const flatMatrix = matrix.flat();
return preset.slots.map( return preset.slots.map(
(options, index) => options[flatMatrix[index] == 1 ? 'right' : 'left'], (options, index) => options[flatMatrix[index] == 1 ? "right" : "left"],
); );
} }
@@ -1,4 +1,4 @@
import { TankDefinition } from "@blitzkit/core"; import { TankDefinition } from "@blitzkit/protos";
import { sumBy } from "lodash-es"; import { sumBy } from "lodash-es";
import { useMemo } from "react"; import { useMemo } from "react";
import { api } from "../api/dynamic"; import { api } from "../api/dynamic";
@@ -1,10 +1,5 @@
import { import { I_HAT, J_HAT, K_HAT } from "@blitzkit/core";
I_HAT, import { TrackDefinition, TurretDefinition } from "@blitzkit/protos";
J_HAT,
K_HAT,
TrackDefinition,
TurretDefinition,
} from "@blitzkit/core";
import { invalidate } from "@react-three/fiber"; import { invalidate } from "@react-three/fiber";
import type { QuicklimeEvent } from "quicklime"; import type { QuicklimeEvent } from "quicklime";
import { type RefObject, useEffect } from "react"; import { type RefObject, useEffect } from "react";
@@ -1,4 +1,4 @@
import { EquipmentDefinitions } from "@blitzkit/core"; import { EquipmentDefinitions } from "@blitzkit/protos";
import { api } from "../../../api/dynamic"; import { api } from "../../../api/dynamic";
export { getStaticPaths } from "../_index"; export { getStaticPaths } from "../_index";
@@ -1,4 +1,4 @@
import { Gallery } from "@blitzkit/core"; import { Gallery } from "@blitzkit/protos";
import { api } from "../../../api/dynamic"; import { api } from "../../../api/dynamic";
export { getStaticPaths } from "../_index"; export { getStaticPaths } from "../_index";
@@ -1,4 +1,4 @@
import { MapDefinitions } from "@blitzkit/core"; import { MapDefinitions } from "@blitzkit/protos";
import { api } from "../../../api/dynamic"; import { api } from "../../../api/dynamic";
export { getStaticPaths } from "../_index"; export { getStaticPaths } from "../_index";
@@ -1,4 +1,4 @@
import { SkillDefinitions } from "@blitzkit/core"; import { SkillDefinitions } from "@blitzkit/protos";
import { api } from "../../../api/dynamic"; import { api } from "../../../api/dynamic";
export { getStaticPaths } from "../_index"; export { getStaticPaths } from "../_index";
@@ -1,5 +1,6 @@
import { fetchGlossary, type Avatar } from "@blitzkit/core"; import { fetchGlossary } from "@blitzkit/core";
import locales from "@blitzkit/i18n/locales.json"; import locales from "@blitzkit/i18n/locales.json";
import type { Avatar } from "@blitzkit/protos";
import type { APIContext, GetStaticPathsItem } from "astro"; import type { APIContext, GetStaticPathsItem } from "astro";
import { extname } from "path"; import { extname } from "path";
import { mixStaticPaths } from "../../../../astro/mixStaticPaths"; import { mixStaticPaths } from "../../../../astro/mixStaticPaths";
@@ -1,11 +1,13 @@
import { import {
alias, alias,
GunDefinition,
TankDefinition,
TIER_ROMAN_NUMERALS, TIER_ROMAN_NUMERALS,
TurretDefinition,
} from "@blitzkit/core"; } from "@blitzkit/core";
import { literals } from "@blitzkit/i18n"; import { literals } from "@blitzkit/i18n";
import {
GunDefinition,
TankDefinition,
TurretDefinition,
} from "@blitzkit/protos";
import { CaretRightIcon, CaretUpIcon, UpdateIcon } from "@radix-ui/react-icons"; import { CaretRightIcon, CaretUpIcon, UpdateIcon } from "@radix-ui/react-icons";
import { import {
Box, Box,
+1 -1
View File
@@ -1,4 +1,4 @@
import type { TankDefinition } from "@blitzkit/core"; import type { TankDefinition } from "@blitzkit/protos";
import { times } from "lodash-es"; import { times } from "lodash-es";
import { Soapstone } from "soapstone"; import { Soapstone } from "soapstone";
+1 -1
View File
@@ -2,7 +2,7 @@ import type {
GunDefinition, GunDefinition,
TankDefinition, TankDefinition,
TurretDefinition, TurretDefinition,
} from "@blitzkit/core"; } from "@blitzkit/protos";
import { Soapstone } from "soapstone"; import { Soapstone } from "soapstone";
export interface Mixer { export interface Mixer {
+1 -1
View File
@@ -1,4 +1,4 @@
import type { Samples } from "@blitzkit/core"; import type { Samples } from "@blitzkit/protos";
import { Soapstone } from "soapstone"; import { Soapstone } from "soapstone";
export interface Performance { export interface Performance {
@@ -1,4 +1,5 @@
import { createDefaultProvisions, type TankDefinition } from "@blitzkit/core"; import { createDefaultProvisions } from "@blitzkit/core";
import type { TankDefinition } from "@blitzkit/protos";
import { api } from "../api/dynamic"; import { api } from "../api/dynamic";
import { createTankStatus } from "./createTankStatus"; import { createTankStatus } from "./createTankStatus";
import type { TankState } from "./tankState"; import type { TankState } from "./tankState";
@@ -1,4 +1,4 @@
import type { TankDefinition } from "@blitzkit/core"; import type { TankDefinition } from "@blitzkit/protos";
export function hasUpgrades(tank: TankDefinition) { export function hasUpgrades(tank: TankDefinition) {
return ( return (
@@ -1,4 +1,8 @@
import type { Equalizer, GunDefinition, ShellDefinition } from "@blitzkit/core"; import type {
Equalizer,
GunDefinition,
ShellDefinition,
} from "@blitzkit/protos";
import { characteristics } from "../config/characteristics"; import { characteristics } from "../config/characteristics";
export type Characteristic = { export type Characteristic = {