mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-25 03:29:51 +01:00
fix: port to core 5
This commit is contained in:
1 parent
3d23ea1497
commit
7249c3be9e
24 files changed
+41
-53
No files matched your search
@@ -1,5 +1,4 @@
|
|||||||
import { Region } from '@blitzkit/core';
|
import { Region, searchCurrentRatingPlayers } from '@blitzkit/core';
|
||||||
import { searchCurrentRatingPlayers } from '@blitzkit/core/src/blitz/searchCurrentRatingPlayers';
|
|
||||||
import { NextResponse } from 'next/server';
|
import { NextResponse } from 'next/server';
|
||||||
|
|
||||||
export async function GET(
|
export async function GET(
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
import {
|
import {
|
||||||
BlitzkitResponse,
|
BlitzkitResponse,
|
||||||
BlitzkitResponseError,
|
BlitzkitResponseError,
|
||||||
|
isValidBlitzId,
|
||||||
tankDefinitions,
|
tankDefinitions,
|
||||||
TankVotes,
|
TankVotes,
|
||||||
usersDatabase,
|
usersDatabase,
|
||||||
} from '@blitzkit/core';
|
} from '@blitzkit/core';
|
||||||
import { isValidBlitzId } from '@blitzkit/core/src/blitz/isValidBlitzId';
|
|
||||||
import { NextRequest, NextResponse } from 'next/server';
|
import { NextRequest, NextResponse } from 'next/server';
|
||||||
|
|
||||||
export async function GET(
|
export async function GET(
|
||||||
|
|||||||
@@ -1,13 +1,13 @@
|
|||||||
import {
|
import {
|
||||||
BlitzkitResponse,
|
BlitzkitResponse,
|
||||||
BlitzkitResponseError,
|
BlitzkitResponseError,
|
||||||
|
isValidBlitzId,
|
||||||
StarsInt,
|
StarsInt,
|
||||||
TANK_VOTE_CATEGORIES,
|
TANK_VOTE_CATEGORIES,
|
||||||
tankDefinitions,
|
tankDefinitions,
|
||||||
TankVoteCategory,
|
TankVoteCategory,
|
||||||
usersDatabase,
|
usersDatabase,
|
||||||
} from '@blitzkit/core';
|
} from '@blitzkit/core';
|
||||||
import { isValidBlitzId } from '@blitzkit/core/src/blitz/isValidBlitzId';
|
|
||||||
import { NextRequest, NextResponse } from 'next/server';
|
import { NextRequest, NextResponse } from 'next/server';
|
||||||
|
|
||||||
export async function GET(
|
export async function GET(
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
export * from '../../../website/src/core/blitzkit/tankCharacteristics';
|
|
||||||
export * from './assertSecret';
|
export * from './assertSecret';
|
||||||
export * from './asset';
|
export * from './asset';
|
||||||
export * from './availableProvisions';
|
export * from './availableProvisions';
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { context } from '@blitzkit/core/src/blitzkit/context';
|
import { context } from '@blitzkit/core';
|
||||||
|
|
||||||
export function withCORSProxy(url: string) {
|
export function withCORSProxy(url: string) {
|
||||||
return context === 'website'
|
return context === 'website'
|
||||||
|
|||||||
@@ -6,7 +6,6 @@ export * from './imgur';
|
|||||||
export * from './math';
|
export * from './math';
|
||||||
export * from './patreon';
|
export * from './patreon';
|
||||||
export * from './protobuf';
|
export * from './protobuf';
|
||||||
export * from './radix';
|
|
||||||
export * from './statistics';
|
export * from './statistics';
|
||||||
export * from './streams';
|
export * from './streams';
|
||||||
export * from './types';
|
export * from './types';
|
||||||
@@ -1 +0,0 @@
|
|||||||
export * from './var';
|
|
||||||
@@ -1,8 +1,4 @@
|
|||||||
{
|
{
|
||||||
"extends": "../../tsconfig.json",
|
"extends": "../../tsconfig.json",
|
||||||
"include": [
|
"include": ["src/**/*", "../website/src/core/radix/var.ts"]
|
||||||
"src/**/*",
|
|
||||||
"../website/src/core/blitzkit/filterTank.ts",
|
|
||||||
"../website/src/core/blitzkit/tankCharacteristics.ts"
|
|
||||||
, "../scripts/src/core/blitz/writeDVPL.ts" ]
|
|
||||||
}
|
}
|
||||||
@@ -1,6 +1,7 @@
|
|||||||
import { asset, TankCharacteristics } from '@blitzkit/core';
|
import { asset } from '@blitzkit/core';
|
||||||
import { Flex, Heading, IconButton, Table } from '@radix-ui/themes';
|
import { Flex, Heading, IconButton, Table } from '@radix-ui/themes';
|
||||||
import { StickyColumnHeaderCell } from '../../../../components/StickyColumnHeaderCell';
|
import { StickyColumnHeaderCell } from '../../../../components/StickyColumnHeaderCell';
|
||||||
|
import { TankCharacteristics } from '../../../../core/blitzkit/tankCharacteristics';
|
||||||
import * as CompareEphemeral from '../../../../stores/compareEphemeral';
|
import * as CompareEphemeral from '../../../../stores/compareEphemeral';
|
||||||
import { CompareRow } from './CompareRow';
|
import { CompareRow } from './CompareRow';
|
||||||
import { CompareSectionTitle } from './CompareSectionTitle';
|
import { CompareSectionTitle } from './CompareSectionTitle';
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
import { TankCharacteristics, Var } from '@blitzkit/core';
|
|
||||||
import {
|
import {
|
||||||
CaretLeftIcon,
|
CaretLeftIcon,
|
||||||
CaretRightIcon,
|
CaretRightIcon,
|
||||||
@@ -6,6 +5,8 @@ import {
|
|||||||
} from '@radix-ui/react-icons';
|
} from '@radix-ui/react-icons';
|
||||||
import { Flex, IconButton, Table, Text } from '@radix-ui/themes';
|
import { Flex, IconButton, Table, Text } from '@radix-ui/themes';
|
||||||
import { StickyRowHeaderCell } from '../../../../components/StickyRowHeaderCell';
|
import { StickyRowHeaderCell } from '../../../../components/StickyRowHeaderCell';
|
||||||
|
import { TankCharacteristics } from '../../../../core/blitzkit/tankCharacteristics';
|
||||||
|
import { Var } from '../../../../core/radix/var';
|
||||||
import * as CompareEphemeral from '../../../../stores/compareEphemeral';
|
import * as CompareEphemeral from '../../../../stores/compareEphemeral';
|
||||||
import * as ComparePersistent from '../../../../stores/comparePersistent';
|
import * as ComparePersistent from '../../../../stores/comparePersistent';
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,4 @@
|
|||||||
import {
|
import {
|
||||||
TankCharacteristics,
|
|
||||||
Var,
|
|
||||||
asset,
|
asset,
|
||||||
availableProvisions,
|
availableProvisions,
|
||||||
checkConsumableProvisionInclusivity,
|
checkConsumableProvisionInclusivity,
|
||||||
@@ -22,6 +20,8 @@ import { ModuleManager } from '../../../../components/ModuleManager';
|
|||||||
import { ProvisionsManager } from '../../../../components/ProvisionsManager';
|
import { ProvisionsManager } from '../../../../components/ProvisionsManager';
|
||||||
import { StickyColumnHeaderCell } from '../../../../components/StickyColumnHeaderCell';
|
import { StickyColumnHeaderCell } from '../../../../components/StickyColumnHeaderCell';
|
||||||
import { StickyTableRoot } from '../../../../components/StickyTableRoot';
|
import { StickyTableRoot } from '../../../../components/StickyTableRoot';
|
||||||
|
import { TankCharacteristics } from '../../../../core/blitzkit/tankCharacteristics';
|
||||||
|
import { Var } from '../../../../core/radix/var';
|
||||||
import * as CompareEphemeral from '../../../../stores/compareEphemeral';
|
import * as CompareEphemeral from '../../../../stores/compareEphemeral';
|
||||||
import { EquipmentMatrix } from '../../../../stores/duel';
|
import { EquipmentMatrix } from '../../../../stores/duel';
|
||||||
import { Body } from './Body';
|
import { Body } from './Body';
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { Var } from '@blitzkit/core';
|
|
||||||
import { useEffect, useRef } from 'react';
|
import { useEffect, useRef } from 'react';
|
||||||
|
import { Var } from '../../../../../core/radix/var';
|
||||||
import { insertionMarkers } from './constants';
|
import { insertionMarkers } from './constants';
|
||||||
|
|
||||||
export function InsertionMarker({ index }: { index: number }) {
|
export function InsertionMarker({ index }: { index: number }) {
|
||||||
|
|||||||
@@ -6,7 +6,6 @@ import {
|
|||||||
modelDefinitions,
|
modelDefinitions,
|
||||||
provisionDefinitions,
|
provisionDefinitions,
|
||||||
skillDefinitions,
|
skillDefinitions,
|
||||||
tankCharacteristics,
|
|
||||||
tankDefinitions,
|
tankDefinitions,
|
||||||
} from '@blitzkit/core';
|
} from '@blitzkit/core';
|
||||||
import { PlusIcon } from '@radix-ui/react-icons';
|
import { PlusIcon } from '@radix-ui/react-icons';
|
||||||
@@ -14,6 +13,7 @@ import { Box, Flex, Heading, IconButton, Text } from '@radix-ui/themes';
|
|||||||
import { usePathname, useRouter, useSearchParams } from 'next/navigation';
|
import { usePathname, useRouter, useSearchParams } from 'next/navigation';
|
||||||
import { use, useCallback, useEffect, useMemo, useState } from 'react';
|
import { use, useCallback, useEffect, useMemo, useState } from 'react';
|
||||||
import { PageWrapper } from '../../../components/PageWrapper';
|
import { PageWrapper } from '../../../components/PageWrapper';
|
||||||
|
import { tankCharacteristics } from '../../../core/blitzkit/tankCharacteristics';
|
||||||
import { tankToCompareMember } from '../../../core/blitzkit/tankToCompareMember';
|
import { tankToCompareMember } from '../../../core/blitzkit/tankToCompareMember';
|
||||||
import * as CompareEphemeral from '../../../stores/compareEphemeral';
|
import * as CompareEphemeral from '../../../stores/compareEphemeral';
|
||||||
import { CompareTable } from './components/CompareTable';
|
import { CompareTable } from './components/CompareTable';
|
||||||
|
|||||||
@@ -19,7 +19,6 @@ import {
|
|||||||
REGIONS,
|
REGIONS,
|
||||||
searchCurrentRatingPlayers,
|
searchCurrentRatingPlayers,
|
||||||
UNLOCALIZED_REGION_NAMES,
|
UNLOCALIZED_REGION_NAMES,
|
||||||
Var,
|
|
||||||
} from '@blitzkit/core';
|
} from '@blitzkit/core';
|
||||||
import { blackA, orangeDark } from '@radix-ui/colors';
|
import { blackA, orangeDark } from '@radix-ui/colors';
|
||||||
import { MagnifyingGlassIcon } from '@radix-ui/react-icons';
|
import { MagnifyingGlassIcon } from '@radix-ui/react-icons';
|
||||||
@@ -38,6 +37,7 @@ import { debounce, range } from 'lodash';
|
|||||||
import { ChangeEvent, useEffect, useRef, useState } from 'react';
|
import { ChangeEvent, useEffect, useRef, useState } from 'react';
|
||||||
import { create } from 'zustand';
|
import { create } from 'zustand';
|
||||||
import { PageWrapper } from '../../../components/PageWrapper';
|
import { PageWrapper } from '../../../components/PageWrapper';
|
||||||
|
import { Var } from '../../../core/radix/var';
|
||||||
import { PageTurner } from './components/PageTurner';
|
import { PageTurner } from './components/PageTurner';
|
||||||
|
|
||||||
const ROWS_PER_PAGE = Math.floor(100 / 3);
|
const ROWS_PER_PAGE = Math.floor(100 / 3);
|
||||||
|
|||||||
@@ -7,7 +7,6 @@ import {
|
|||||||
isExplosive,
|
isExplosive,
|
||||||
provisionDefinitions,
|
provisionDefinitions,
|
||||||
resolvePenetrationCoefficient,
|
resolvePenetrationCoefficient,
|
||||||
tankCharacteristics,
|
|
||||||
} from '@blitzkit/core';
|
} from '@blitzkit/core';
|
||||||
import { AccessibilityIcon, InfoCircledIcon } from '@radix-ui/react-icons';
|
import { AccessibilityIcon, InfoCircledIcon } from '@radix-ui/react-icons';
|
||||||
import {
|
import {
|
||||||
@@ -25,6 +24,7 @@ import { Fragment, use, useEffect, useRef, useState } from 'react';
|
|||||||
import { lerp } from 'three/src/math/MathUtils';
|
import { lerp } from 'three/src/math/MathUtils';
|
||||||
import { Ad, AdType } from '../../../../../../components/Ad';
|
import { Ad, AdType } from '../../../../../../components/Ad';
|
||||||
import { applyPitchYawLimits } from '../../../../../../core/blitz/applyPitchYawLimits';
|
import { applyPitchYawLimits } from '../../../../../../core/blitz/applyPitchYawLimits';
|
||||||
|
import { tankCharacteristics } from '../../../../../../core/blitzkit/tankCharacteristics';
|
||||||
import { useAdExempt } from '../../../../../../hooks/useAdExempt';
|
import { useAdExempt } from '../../../../../../hooks/useAdExempt';
|
||||||
import { useEquipment } from '../../../../../../hooks/useEquipment';
|
import { useEquipment } from '../../../../../../hooks/useEquipment';
|
||||||
import { useTankModelDefinition } from '../../../../../../hooks/useTankModelDefinition';
|
import { useTankModelDefinition } from '../../../../../../hooks/useTankModelDefinition';
|
||||||
|
|||||||
@@ -1,9 +1,10 @@
|
|||||||
import { resolveNearPenetration, tankDefinitions, Var } from '@blitzkit/core';
|
import { resolveNearPenetration, tankDefinitions } from '@blitzkit/core';
|
||||||
import { Box, Flex, Heading, Text } from '@radix-ui/themes';
|
import { Box, Flex, Heading, Text } from '@radix-ui/themes';
|
||||||
import { Suspense, use, useEffect, useMemo, useRef, useState } from 'react';
|
import { Suspense, use, useEffect, useMemo, useRef, useState } from 'react';
|
||||||
import { ThicknessRange } from '../../../../../../components/Armor/components/StaticArmor';
|
import { ThicknessRange } from '../../../../../../components/Armor/components/StaticArmor';
|
||||||
import { classIcons } from '../../../../../../components/ClassIcon';
|
import { classIcons } from '../../../../../../components/ClassIcon';
|
||||||
import { NAVBAR_HEIGHT } from '../../../../../../components/Navbar/index.css';
|
import { NAVBAR_HEIGHT } from '../../../../../../components/Navbar/index.css';
|
||||||
|
import { Var } from '../../../../../../core/radix/var';
|
||||||
import { useFullScreen } from '../../../../../../hooks/useFullScreen';
|
import { useFullScreen } from '../../../../../../hooks/useFullScreen';
|
||||||
import * as Duel from '../../../../../../stores/duel';
|
import * as Duel from '../../../../../../stores/duel';
|
||||||
import { TankSandbox } from './TankSandbox';
|
import { TankSandbox } from './TankSandbox';
|
||||||
@@ -20,8 +21,8 @@ export function HeroSection() {
|
|||||||
protagonist.treeType === 'collector'
|
protagonist.treeType === 'collector'
|
||||||
? 'blue'
|
? 'blue'
|
||||||
: protagonist.treeType === 'premium'
|
: protagonist.treeType === 'premium'
|
||||||
? 'amber'
|
? 'amber'
|
||||||
: undefined;
|
: undefined;
|
||||||
const awaitedTankDefinitions = use(tankDefinitions);
|
const awaitedTankDefinitions = use(tankDefinitions);
|
||||||
const thicknessRange = useMemo(() => {
|
const thicknessRange = useMemo(() => {
|
||||||
const entries = Object.values(awaitedTankDefinitions);
|
const entries = Object.values(awaitedTankDefinitions);
|
||||||
|
|||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
import { StarsInt } from '@blitzkit/core/src/blitzkit/votes';
|
import { StarsInt } from '@blitzkit/core';
|
||||||
import { Flex, Text, TextProps } from '@radix-ui/themes';
|
import { Flex, Text, TextProps } from '@radix-ui/themes';
|
||||||
import { times } from 'lodash';
|
import { times } from 'lodash';
|
||||||
import { PartialStar } from './components/PartialStar';
|
import { PartialStar } from './components/PartialStar';
|
||||||
|
|||||||
+1
-2
@@ -1,5 +1,4 @@
|
|||||||
import { BlitzkitResponse } from '@blitzkit/core/src/blitzkit/unwrapBlitzkitResponse';
|
import { BlitzkitResponse, StarsInt } from '@blitzkit/core';
|
||||||
import { StarsInt } from '@blitzkit/core/src/blitzkit/votes';
|
|
||||||
import { PaperPlaneIcon } from '@radix-ui/react-icons';
|
import { PaperPlaneIcon } from '@radix-ui/react-icons';
|
||||||
import {
|
import {
|
||||||
AlertDialog,
|
AlertDialog,
|
||||||
|
|||||||
@@ -1,9 +1,10 @@
|
|||||||
import { reviews, Var, youtubers } from '@blitzkit/core';
|
import { reviews, youtubers } from '@blitzkit/core';
|
||||||
import { Box, Flex, Heading, Text } from '@radix-ui/themes';
|
import { Box, Flex, Heading, Text } from '@radix-ui/themes';
|
||||||
import { use } from 'react';
|
import { use } from 'react';
|
||||||
import { Link } from '../../../../../components/Link';
|
import { Link } from '../../../../../components/Link';
|
||||||
import { PageWrapper } from '../../../../../components/PageWrapper';
|
import { PageWrapper } from '../../../../../components/PageWrapper';
|
||||||
import { VerifiedIcon } from '../../../../../components/VerifiedIcon';
|
import { VerifiedIcon } from '../../../../../components/VerifiedIcon';
|
||||||
|
import { Var } from '../../../../../core/radix/var';
|
||||||
import * as Duel from '../../../../../stores/duel';
|
import * as Duel from '../../../../../stores/duel';
|
||||||
|
|
||||||
export function VideoSection() {
|
export function VideoSection() {
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { TankDefinition } from '@blitzkit/core/src/blitzkit/tankDefinitions';
|
import { TankDefinition } from '@blitzkit/core';
|
||||||
import { TankFilters } from '../../stores/tankFilters';
|
import { TankFilters } from '../../stores/tankFilters';
|
||||||
|
|
||||||
export function filterTank(filters: TankFilters, tank: TankDefinition) {
|
export function filterTank(filters: TankFilters, tank: TankDefinition) {
|
||||||
|
|||||||
@@ -1,26 +1,24 @@
|
|||||||
import {
|
import {
|
||||||
EquipmentDefinitions,
|
coefficient,
|
||||||
ModelDefinition,
|
degressiveStat,
|
||||||
ProvisionDefinitions,
|
|
||||||
} from '@blitzkit/core';
|
|
||||||
import { resolveNearPenetration } from '@blitzkit/core/src/blitz/resolveNearPenetration';
|
|
||||||
import { coefficient } from '@blitzkit/core/src/blitzkit/coefficient';
|
|
||||||
import { degressiveStat } from '@blitzkit/core/src/blitzkit/degressiveStat';
|
|
||||||
import { isExplosive } from '@blitzkit/core/src/blitzkit/isExplosive';
|
|
||||||
import { normalizeBoundingBox } from '@blitzkit/core/src/blitzkit/normalizeBoundingBox';
|
|
||||||
import { progressiveStat } from '@blitzkit/core/src/blitzkit/progressiveStat';
|
|
||||||
import { resolveDpm } from '@blitzkit/core/src/blitzkit/resolveDpm';
|
|
||||||
import { resolvePenetrationCoefficient } from '@blitzkit/core/src/blitzkit/resolvePenetrationCoefficient';
|
|
||||||
import { sum } from '@blitzkit/core/src/blitzkit/sum';
|
|
||||||
import {
|
|
||||||
EngineDefinition,
|
EngineDefinition,
|
||||||
|
EquipmentDefinitions,
|
||||||
GunDefinition,
|
GunDefinition,
|
||||||
|
isExplosive,
|
||||||
|
ModelDefinition,
|
||||||
|
normalizeBoundingBox,
|
||||||
|
progressiveStat,
|
||||||
|
ProvisionDefinitions,
|
||||||
|
resolveDpm,
|
||||||
|
resolveNearPenetration,
|
||||||
|
resolvePenetrationCoefficient,
|
||||||
ShellDefinition,
|
ShellDefinition,
|
||||||
|
sum,
|
||||||
TankDefinition,
|
TankDefinition,
|
||||||
TrackDefinition,
|
TrackDefinition,
|
||||||
TurretDefinition,
|
TurretDefinition,
|
||||||
} from '@blitzkit/core/src/blitzkit/tankDefinitions';
|
unionBoundingBox,
|
||||||
import { unionBoundingBox } from '@blitzkit/core/src/blitzkit/unionBoundingBox';
|
} from '@blitzkit/core';
|
||||||
import { EquipmentMatrix } from '../../stores/duel';
|
import { EquipmentMatrix } from '../../stores/duel';
|
||||||
|
|
||||||
export type TankCharacteristics = ReturnType<typeof tankCharacteristics>;
|
export type TankCharacteristics = ReturnType<typeof tankCharacteristics>;
|
||||||
|
|||||||
File renamed without changes.
@@ -1,8 +1,8 @@
|
|||||||
import { TankVotes } from '@blitzkit/core';
|
|
||||||
import {
|
import {
|
||||||
BlitzkitResponse,
|
BlitzkitResponse,
|
||||||
|
TankVotes,
|
||||||
unwrapBlitzkitResponse,
|
unwrapBlitzkitResponse,
|
||||||
} from '@blitzkit/core/src/blitzkit/unwrapBlitzkitResponse';
|
} from '@blitzkit/core';
|
||||||
import { useEffect, useState } from 'react';
|
import { useEffect, useState } from 'react';
|
||||||
import * as App from '../stores/app';
|
import * as App from '../stores/app';
|
||||||
|
|
||||||
|
|||||||
@@ -7,10 +7,5 @@
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"include": [
|
"include": ["src/**/*", ".next/types/**/*.ts"]
|
||||||
"src/**/*",
|
|
||||||
".next/types/**/*.ts",
|
|
||||||
"../bot/src/core/blitzkit/resolveAncestry.ts",
|
|
||||||
"../bot/src/core/blitzkit/buildTechTreeLine.ts"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
Reference in new issue
Block a user