mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-21 02:37:05 +02:00
proto imports
This commit is contained in:
1 parent
127c55ec93
commit
593ae760e7
42 files changed
+102
-100
No files matched your search
@@ -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:
|
||||
|
||||
- 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`.
|
||||
|
||||
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.
|
||||
@@ -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 { Reviews, Video } from "@blitzkit/protos";
|
||||
import { google } from "googleapis";
|
||||
import { cloneDeep, uniqBy } from "lodash-es";
|
||||
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 { useRef } from "react";
|
||||
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 { Vector2 } from "three";
|
||||
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 { ConsumableButton } from "./ModuleButtons/ConsumableButton";
|
||||
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import type { EquipmentPreset } from '@blitzkit/core';
|
||||
import { Flex } from '@radix-ui/themes';
|
||||
import { chunk, cloneDeep } from 'lodash-es';
|
||||
import type { EquipmentMatrix } from '../../stores/duel';
|
||||
import { EquipmentButton } from '../ModuleButtons/EquipmentButton';
|
||||
import './index.css';
|
||||
import type { EquipmentPreset } from "@blitzkit/protos";
|
||||
import { Flex } from "@radix-ui/themes";
|
||||
import { chunk, cloneDeep } from "lodash-es";
|
||||
import type { EquipmentMatrix } from "../../stores/duel";
|
||||
import { EquipmentButton } from "../ModuleButtons/EquipmentButton";
|
||||
import "./index.css";
|
||||
|
||||
interface EquipmentManagerProps {
|
||||
preset: EquipmentPreset;
|
||||
|
||||
@@ -1,10 +1,6 @@
|
||||
import {
|
||||
alias,
|
||||
SEARCH_KEYS,
|
||||
TankDefinition,
|
||||
TIER_ROMAN_NUMERALS,
|
||||
} from "@blitzkit/core";
|
||||
import { alias, SEARCH_KEYS, TIER_ROMAN_NUMERALS } from "@blitzkit/core";
|
||||
import { literals } from "@blitzkit/i18n";
|
||||
import { TankDefinition } from "@blitzkit/protos";
|
||||
import {
|
||||
ArrowRightIcon,
|
||||
EyeOpenIcon,
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
import {
|
||||
TIER_ROMAN_NUMERALS,
|
||||
type EngineDefinition,
|
||||
type GunDefinition,
|
||||
type ShellDefinition,
|
||||
type TankDefinition,
|
||||
type TrackDefinition,
|
||||
type TurretDefinition,
|
||||
} from "@blitzkit/core";
|
||||
import { TIER_ROMAN_NUMERALS } from "@blitzkit/core";
|
||||
import type {
|
||||
EngineDefinition,
|
||||
GunDefinition,
|
||||
ShellDefinition,
|
||||
TankDefinition,
|
||||
TrackDefinition,
|
||||
TurretDefinition,
|
||||
} from "@blitzkit/protos";
|
||||
import { DropdownMenu, Flex } from "@radix-ui/themes";
|
||||
import { useState } from "react";
|
||||
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 { memo } from "react";
|
||||
import { awaitableAverageDefinitions } from "../../core/awaitables/averageDefinitions";
|
||||
|
||||
@@ -1,8 +1,5 @@
|
||||
import {
|
||||
ShellType,
|
||||
isExplosive,
|
||||
resolvePenetrationCoefficient,
|
||||
} from "@blitzkit/core";
|
||||
import { isExplosive, resolvePenetrationCoefficient } from "@blitzkit/core";
|
||||
import { ShellType } from "@blitzkit/protos";
|
||||
import { useThree } from "@react-three/fiber";
|
||||
import { useCallback } from "react";
|
||||
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 { useLocale } from "../hooks/useLocale";
|
||||
import { classIcons } from "./ClassIcon";
|
||||
|
||||
@@ -2,8 +2,8 @@ import {
|
||||
normalizeBoundingBox,
|
||||
resolveDpm,
|
||||
unionBoundingBox,
|
||||
type TankDefinition,
|
||||
} from "@blitzkit/core";
|
||||
import type { TankDefinition } from "@blitzkit/protos";
|
||||
import { useMemo } from "react";
|
||||
import { api } from "../../../api/dynamic";
|
||||
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 { useLocale } from "../../../hooks/useLocale";
|
||||
import { TankFilters } from "../../../stores/tankFilters";
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
import type { AssaultRanges } from "@blitzkit/core";
|
||||
import { literals } from "@blitzkit/i18n";
|
||||
import type { AssaultRanges } from "@blitzkit/protos";
|
||||
import { Box, Flex, Text } from "@radix-ui/themes";
|
||||
import { clamp } from "three/src/math/MathUtils.js";
|
||||
import {
|
||||
@@ -68,7 +68,7 @@ export function AssaultRangesVisualizer({ ranges: _ranges, stats }: Props) {
|
||||
>
|
||||
{literals(strings.common.units.hp, {
|
||||
value: Math.round(
|
||||
stats.damageWithoutAssault * range.factor
|
||||
stats.damageWithoutAssault * range.factor,
|
||||
),
|
||||
})}
|
||||
</Text>
|
||||
|
||||
+2
-1
@@ -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 { CrewType } from "@blitzkit/protos";
|
||||
import { AccessibilityIcon, InfoCircledIcon } from "@radix-ui/react-icons";
|
||||
import { Flex, Heading, IconButton, Popover, Text } from "@radix-ui/themes";
|
||||
import { Fragment } from "react/jsx-runtime";
|
||||
|
||||
+6
-4
@@ -1,16 +1,18 @@
|
||||
import {
|
||||
alias,
|
||||
EngineDefinition,
|
||||
formatCompact,
|
||||
GunDefinition,
|
||||
ModuleType,
|
||||
tankIcon,
|
||||
TIER_ROMAN_NUMERALS,
|
||||
} from "@blitzkit/core";
|
||||
import {
|
||||
EngineDefinition,
|
||||
GunDefinition,
|
||||
ModuleType,
|
||||
TrackDefinition,
|
||||
TurretDefinition,
|
||||
type TankDefinition,
|
||||
type Unlock,
|
||||
} from "@blitzkit/core";
|
||||
} from "@blitzkit/protos";
|
||||
import {
|
||||
Button,
|
||||
ChevronDownIcon,
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
import { ShellType } from "@blitzkit/core";
|
||||
import { literals } from "@blitzkit/i18n/src/literals";
|
||||
import { ShellType } from "@blitzkit/protos";
|
||||
import {
|
||||
Button,
|
||||
Flex,
|
||||
|
||||
@@ -1,9 +1,5 @@
|
||||
import {
|
||||
alias,
|
||||
TankPriceType,
|
||||
TankType,
|
||||
TIER_ROMAN_NUMERALS,
|
||||
} from "@blitzkit/core";
|
||||
import { alias, TIER_ROMAN_NUMERALS } from "@blitzkit/core";
|
||||
import { TankPriceType, TankType } from "@blitzkit/protos";
|
||||
import { Box, Flex } from "@radix-ui/themes";
|
||||
import { Var } from "../../../core/radix/var";
|
||||
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 { TankType } from "@blitzkit/protos";
|
||||
import { CaretLeftIcon, CaretRightIcon, PlusIcon } from "@radix-ui/react-icons";
|
||||
import { Flex, Heading, IconButton, ScrollArea, Text } from "@radix-ui/themes";
|
||||
import { Fragment, useEffect, useMemo, useRef, useState } from "react";
|
||||
|
||||
@@ -1,12 +1,14 @@
|
||||
import {
|
||||
formatCompositeStat,
|
||||
TankClass,
|
||||
TankDefinition,
|
||||
TankType,
|
||||
type CompositeStats,
|
||||
type CompositeStatsKey,
|
||||
} from "@blitzkit/core";
|
||||
import strings from "@blitzkit/i18n/strings/en.json";
|
||||
import {
|
||||
TankClass,
|
||||
TankDefinition,
|
||||
TankType,
|
||||
} from "@blitzkit/protos";
|
||||
import { amberDark, blueDark } from "@radix-ui/colors";
|
||||
import { Flex, Text, type FlexProps } from "@radix-ui/themes";
|
||||
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 {
|
||||
useCallback,
|
||||
|
||||
@@ -1,8 +1,5 @@
|
||||
import {
|
||||
normalizeAngleRad,
|
||||
type PitchLimits,
|
||||
type YawLimits,
|
||||
} from "@blitzkit/core";
|
||||
import { normalizeAngleRad } from "@blitzkit/core";
|
||||
import type { PitchLimits, YawLimits } from "@blitzkit/protos";
|
||||
import { clamp } from "lodash-es";
|
||||
import { degToRad } from "three/src/math/MathUtils.js";
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import type { Vector3 as BlitzkitVector3 } from '@blitzkit/core';
|
||||
import { Vector3 as THREEVector3 } from 'three';
|
||||
import { rotateDavaVector } from './rotateDavaVector';
|
||||
import type { Vector3 as BlitzkitVector3 } from "@blitzkit/protos";
|
||||
import { Vector3 as THREEVector3 } from "three";
|
||||
import { rotateDavaVector } from "./rotateDavaVector";
|
||||
|
||||
export function correctZYTuple(tuple: BlitzkitVector3) {
|
||||
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) {
|
||||
if (gun.gun_type!.$case === 'regular') {
|
||||
if (gun.gun_type!.$case === "regular") {
|
||||
return gun.gun_type!.value.reload;
|
||||
} else if (gun.gun_type!.$case === 'auto_loader') {
|
||||
} else if (gun.gun_type!.$case === "auto_loader") {
|
||||
return (
|
||||
gun.gun_type!.value.clip_reload +
|
||||
(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) {
|
||||
const spaced = armor.spaced?.includes(index) ?? false;
|
||||
|
||||
@@ -1,15 +1,18 @@
|
||||
import {
|
||||
CrewType,
|
||||
degressiveStat,
|
||||
isExplosive,
|
||||
normalizeBoundingBox,
|
||||
progressiveStat,
|
||||
resolveDpm,
|
||||
resolvePenetrationCoefficient,
|
||||
ShellType,
|
||||
sum,
|
||||
TankClass,
|
||||
unionBoundingBox,
|
||||
} from "@blitzkit/core";
|
||||
import { coefficient } from "@blitzkit/core/src/blitzkit/coefficient";
|
||||
import {
|
||||
CrewType,
|
||||
ShellType,
|
||||
TankClass,
|
||||
type EngineDefinition,
|
||||
type EquipmentDefinitions,
|
||||
type GunDefinition,
|
||||
@@ -19,8 +22,7 @@ import {
|
||||
type TankDefinition,
|
||||
type TrackDefinition,
|
||||
type TurretDefinition,
|
||||
} from "@blitzkit/core";
|
||||
import { coefficient } from "@blitzkit/core/src/blitzkit/coefficient";
|
||||
} from "@blitzkit/protos";
|
||||
import type { EquipmentMatrix } from "../../stores/duel";
|
||||
import { defaultEqualizer } from "./tankToDuelMember";
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import type { ProvisionDefinitions, TankDefinition } from '@blitzkit/core';
|
||||
import { uniqueId } from 'lodash-es';
|
||||
import type { CompareMember } from '../../stores/compareEphemeral';
|
||||
import { tankToDuelMember } from './tankToDuelMember';
|
||||
import type { ProvisionDefinitions, TankDefinition } from "@blitzkit/protos";
|
||||
import { uniqueId } from "lodash-es";
|
||||
import type { CompareMember } from "../../stores/compareEphemeral";
|
||||
import { tankToDuelMember } from "./tankToDuelMember";
|
||||
|
||||
export function tankToCompareMember(
|
||||
tank: TankDefinition,
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { EquipmentPreset } from '@blitzkit/core';
|
||||
import type { EquipmentMatrix } from '../stores/duel';
|
||||
import { EquipmentPreset } from "@blitzkit/protos";
|
||||
import type { EquipmentMatrix } from "../stores/duel";
|
||||
|
||||
export function useAppliedEquipments(
|
||||
matrix: EquipmentMatrix,
|
||||
@@ -7,6 +7,6 @@ export function useAppliedEquipments(
|
||||
) {
|
||||
const flatMatrix = matrix.flat();
|
||||
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 { useMemo } from "react";
|
||||
import { api } from "../api/dynamic";
|
||||
|
||||
@@ -1,10 +1,5 @@
|
||||
import {
|
||||
I_HAT,
|
||||
J_HAT,
|
||||
K_HAT,
|
||||
TrackDefinition,
|
||||
TurretDefinition,
|
||||
} from "@blitzkit/core";
|
||||
import { I_HAT, J_HAT, K_HAT } from "@blitzkit/core";
|
||||
import { TrackDefinition, TurretDefinition } from "@blitzkit/protos";
|
||||
import { invalidate } from "@react-three/fiber";
|
||||
import type { QuicklimeEvent } from "quicklime";
|
||||
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";
|
||||
|
||||
export { getStaticPaths } from "../_index";
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Gallery } from "@blitzkit/core";
|
||||
import { Gallery } from "@blitzkit/protos";
|
||||
import { api } from "../../../api/dynamic";
|
||||
|
||||
export { getStaticPaths } from "../_index";
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { MapDefinitions } from "@blitzkit/core";
|
||||
import { MapDefinitions } from "@blitzkit/protos";
|
||||
import { api } from "../../../api/dynamic";
|
||||
|
||||
export { getStaticPaths } from "../_index";
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { SkillDefinitions } from "@blitzkit/core";
|
||||
import { SkillDefinitions } from "@blitzkit/protos";
|
||||
import { api } from "../../../api/dynamic";
|
||||
|
||||
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 type { Avatar } from "@blitzkit/protos";
|
||||
import type { APIContext, GetStaticPathsItem } from "astro";
|
||||
import { extname } from "path";
|
||||
import { mixStaticPaths } from "../../../../astro/mixStaticPaths";
|
||||
|
||||
@@ -1,11 +1,13 @@
|
||||
import {
|
||||
alias,
|
||||
GunDefinition,
|
||||
TankDefinition,
|
||||
TIER_ROMAN_NUMERALS,
|
||||
TurretDefinition,
|
||||
} from "@blitzkit/core";
|
||||
import { literals } from "@blitzkit/i18n";
|
||||
import {
|
||||
GunDefinition,
|
||||
TankDefinition,
|
||||
TurretDefinition,
|
||||
} from "@blitzkit/protos";
|
||||
import { CaretRightIcon, CaretUpIcon, UpdateIcon } from "@radix-ui/react-icons";
|
||||
import {
|
||||
Box,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { TankDefinition } from "@blitzkit/core";
|
||||
import type { TankDefinition } from "@blitzkit/protos";
|
||||
import { times } from "lodash-es";
|
||||
import { Soapstone } from "soapstone";
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@ import type {
|
||||
GunDefinition,
|
||||
TankDefinition,
|
||||
TurretDefinition,
|
||||
} from "@blitzkit/core";
|
||||
} from "@blitzkit/protos";
|
||||
import { Soapstone } from "soapstone";
|
||||
|
||||
export interface Mixer {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { Samples } from "@blitzkit/core";
|
||||
import type { Samples } from "@blitzkit/protos";
|
||||
import { Soapstone } from "soapstone";
|
||||
|
||||
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 { createTankStatus } from "./createTankStatus";
|
||||
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) {
|
||||
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";
|
||||
|
||||
export type Characteristic = {
|
||||
|
||||
Reference in new issue
Block a user