mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-23 11:39:50 +02:00
fix: types
This commit is contained in:
1 parent
9ae8b0ac49
commit
3c80a43435
255 files changed
+797
-838
No files matched your search
@@ -10,6 +10,7 @@ import {
|
||||
import { Html } from '@react-three/drei';
|
||||
import { useRef } from 'react';
|
||||
import { radToDeg } from 'three/src/math/MathUtils';
|
||||
import { resolveArmorIndex } from '../../../core/blitzkit/resolveArmorIndex';
|
||||
import * as App from '../../../stores/app';
|
||||
import * as Duel from '../../../stores/duel';
|
||||
import * as TankopediaEphemeral from '../../../stores/tankopediaEphemeral';
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import { J_HAT, K_HAT } from '@blitzkit/core';
|
||||
import { Box, Flex, Text } from '@radix-ui/themes';
|
||||
import { Html } from '@react-three/drei';
|
||||
import { useFrame } from '@react-three/fiber';
|
||||
|
||||
@@ -2,6 +2,12 @@ import { normalizeAngleRad } from '@blitzkit/core/src/math/normalizeAngleRad';
|
||||
import { ThreeEvent, useThree } from '@react-three/fiber';
|
||||
import { memo, useRef } from 'react';
|
||||
import { Group, Plane, Vector2, Vector3 } from 'three';
|
||||
import { applyPitchYawLimits } from '../../../core/blitz/applyPitchYawLimits';
|
||||
import { correctZYTuple } from '../../../core/blitz/correctZYTuple';
|
||||
import { hasEquipment } from '../../../core/blitzkit/hasEquipment';
|
||||
import { modelTransformEvent } from '../../../core/blitzkit/modelTransform';
|
||||
import { nameToArmorId } from '../../../core/blitzkit/nameToArmorId';
|
||||
import { resolveArmor } from '../../../core/blitzkit/resolveThickness';
|
||||
import { useArmor } from '../../../hooks/useArmor';
|
||||
import { useModel } from '../../../hooks/useModel';
|
||||
import { useTankModelDefinition } from '../../../hooks/useTankModelDefinition';
|
||||
|
||||
@@ -15,6 +15,13 @@ import {
|
||||
Quaternion,
|
||||
Vector3,
|
||||
} from 'three';
|
||||
import { unrotateDavaVector } from '../../../core/blitz/unrotateDavaVector';
|
||||
import { jsxTree } from '../../../core/blitzkit/jsxTree';
|
||||
import {
|
||||
ModelTransformEventData,
|
||||
modelTransformEvent,
|
||||
} from '../../../core/blitzkit/modelTransform';
|
||||
import { discardClippingPlane } from '../../../core/three/discardClippingPlane';
|
||||
import * as TankopediaEphemeral from '../../../stores/tankopediaEphemeral';
|
||||
import { ArmorType } from './SpacedArmorScene';
|
||||
import {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { TankClass } from '@blitzkit/core';
|
||||
import { ComponentProps, ReactNode } from 'react';
|
||||
import { TankClass } from '../Tanks';
|
||||
import { ClassHeavy } from './components/ClassHeavy';
|
||||
import { ClassLight } from './components/ClassLight';
|
||||
import { ClassMedium } from './components/ClassMedium';
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import { EquipmentPreset } from '@blitzkit/core/src/blitzkit/equipmentDefinitions';
|
||||
import { Flex } from '@radix-ui/themes';
|
||||
import { cloneDeep } from 'lodash';
|
||||
import { EquipmentMatrix } from '../stores/duel';
|
||||
import { EquipmentButton } from './ModuleButtons/EquipmentButton';
|
||||
|
||||
interface EquipmentManagerProps {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { gameDefinitions } from '@blitzkit/core';
|
||||
import { Code } from '@radix-ui/themes';
|
||||
import { use } from 'react';
|
||||
import { gameDefinitions } from '../../../core/blitzkit/gameDefinitions';
|
||||
|
||||
export function WoTBVersion() {
|
||||
const awaitedGameDefinitions = use(gameDefinitions);
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
import { DropdownMenu, Flex } from '@radix-ui/themes';
|
||||
import { useState } from 'react';
|
||||
import {
|
||||
EngineDefinition,
|
||||
GunDefinition,
|
||||
ShellDefinition,
|
||||
TankDefinition,
|
||||
TIER_ROMAN_NUMERALS,
|
||||
TrackDefinition,
|
||||
TurretDefinition,
|
||||
} from '../core/blitzkit/tankDefinitions';
|
||||
import { TIER_ROMAN_NUMERALS } from '../core/blitzkit/tankDefinitions/constants';
|
||||
} from '@blitzkit/core';
|
||||
import { DropdownMenu, Flex } from '@radix-ui/themes';
|
||||
import { useState } from 'react';
|
||||
import { ModuleButton } from './ModuleButtons/ModuleButton';
|
||||
|
||||
interface ModuleManagerProps {
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import { idToRegion } from '@blitzkit/core';
|
||||
import { Text } from '@radix-ui/themes';
|
||||
import { use, useMemo } from 'react';
|
||||
import { getAccountInfo } from '../../../core/blitz/getAccountInfo';
|
||||
import * as App from '../../../stores/app';
|
||||
|
||||
export function WargamingAccountName() {
|
||||
|
||||
@@ -29,7 +29,7 @@ export function WargamingLoginButton({ children, ...props }: ButtonProps) {
|
||||
href={
|
||||
typeof window !== 'undefined'
|
||||
? `https://api.worldoftanks.${region}/wot/auth/login/?application_id=${assertSecret(
|
||||
process.env.WARGAMING_APPLICATION_ID,
|
||||
process.env.NEXT_PUBLIC_WARGAMING_APPLICATION_ID,
|
||||
)}&redirect_uri=${encodeURIComponent(
|
||||
`${location.origin}/auth/wargaming?return=${location.origin}${location.pathname}`,
|
||||
)}`
|
||||
|
||||
@@ -275,7 +275,10 @@ export function Navbar() {
|
||||
position: 'relative',
|
||||
borderRadius: 'var(--radius-2)',
|
||||
overflow: 'hidden',
|
||||
backgroundImage: `url(${imgur(tool.image, { format: 'jpeg', size: ImgurSize.MediumThumbnail })})`,
|
||||
backgroundImage: `url(${imgur(tool.image, {
|
||||
format: 'jpeg',
|
||||
size: ImgurSize.MediumThumbnail,
|
||||
})})`,
|
||||
backgroundSize: 'cover',
|
||||
backgroundPosition: 'center',
|
||||
aspectRatio: '2 / 1',
|
||||
@@ -295,7 +298,10 @@ export function Navbar() {
|
||||
<Box
|
||||
flexGrow="1"
|
||||
style={{
|
||||
backgroundImage: `url(${imgur(tool.image, { format: 'jpeg', size: ImgurSize.MediumThumbnail })})`,
|
||||
backgroundImage: `url(${imgur(tool.image, {
|
||||
format: 'jpeg',
|
||||
size: ImgurSize.MediumThumbnail,
|
||||
})})`,
|
||||
backgroundSize: 'cover',
|
||||
backgroundPosition: 'center',
|
||||
}}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { Flex, FlexProps, Theme } from '@radix-ui/themes';
|
||||
import { ComponentProps } from 'react';
|
||||
import { RadixSize } from '../../packages/website/src/stores/embedState';
|
||||
import { RadixSize } from '../stores/embedState';
|
||||
|
||||
type PageWrapperProps = FlexProps & {
|
||||
color?: ComponentProps<typeof Theme>['accentColor'];
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { TankDefinition } from '@blitzkit/core';
|
||||
import { tankIcon } from '@blitzkit/core/src/blitzkit/tankIcon';
|
||||
import { classIcons } from '../../packages/website/src/components/ClassIcon';
|
||||
import { TankDefinition } from '../core/blitzkit/tankDefinitions';
|
||||
import { classIcons } from './ClassIcon';
|
||||
import { ExperimentIcon } from './ExperimentIcon';
|
||||
import { Link } from './Link';
|
||||
import { StickyRowHeaderCell } from './StickyRowHeaderCell';
|
||||
|
||||
@@ -1,18 +1,20 @@
|
||||
import {
|
||||
CompositeStatsKey,
|
||||
previewCompositeStat,
|
||||
TankDefinition,
|
||||
} from '@blitzkit/core';
|
||||
import strings from '@blitzkit/core/lang/en-US.json';
|
||||
import { amberDark, blueDark } from '@radix-ui/colors';
|
||||
import { Flex, Text } from '@radix-ui/themes';
|
||||
import { times } from 'lodash';
|
||||
import { ReactNode } from 'react';
|
||||
import { ClassHeavy } from '../../packages/website/src/components/ClassIcon/components/ClassHeavy';
|
||||
import { ClassLight } from '../../packages/website/src/components/ClassIcon/components/ClassLight';
|
||||
import { ClassMedium } from '../../packages/website/src/components/ClassIcon/components/ClassMedium';
|
||||
import { ClassTankDestroyer } from '../../packages/website/src/components/ClassIcon/components/ClassTankDestroyer';
|
||||
import { useEmbedStateCurry } from '../../packages/website/src/stores/embedState/utilities';
|
||||
import { breakdownConfig } from '../app/tools/embed/configurations/breakdown';
|
||||
import { toRadiusVar } from '../app/tools/embed/utilities';
|
||||
import { TankDefinition } from '../core/blitzkit/tankDefinitions';
|
||||
import { previewCompositeStat } from '../core/statistics/compositeStats';
|
||||
import { CompositeStatsKey } from '../core/statistics/compositeStats/constants';
|
||||
import strings from '../lang/en-US.json';
|
||||
import { useEmbedStateCurry } from '../stores/embedState/utilities';
|
||||
import { ClassHeavy } from './ClassIcon/components/ClassHeavy';
|
||||
import { ClassLight } from './ClassIcon/components/ClassLight';
|
||||
import { ClassMedium } from './ClassIcon/components/ClassMedium';
|
||||
import { ClassTankDestroyer } from './ClassIcon/components/ClassTankDestroyer';
|
||||
|
||||
interface BreakdownEmbedWrapperProps {
|
||||
children: ReactNode;
|
||||
|
||||
Reference in new issue
Block a user