migrate to soapstone

This commit is contained in:
tresabhi committed 2026-09-27 17:04:15 -05:00
1 parent e5b44d4eb8
commit 127c55ec93
25 files changed
+61 -188

No files matched your search

+13
View File
@@ -0,0 +1,13 @@
---
name: repo-boundaries
description: Apply the user's persistent repository boundaries whenever working in their projects.
---
# Repo Boundaries
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.
- 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.
@@ -0,0 +1,3 @@
interface:
display_name: "Repo Boundaries"
short_description: "Respect repository editing boundaries"
-1
View File
@@ -13,7 +13,6 @@ If you intend to contribute to the code, note that you may need to check out sen
| [packages/core](packages/core) | | | Mutual internal code shared between all other packages. | | [packages/core](packages/core) | | | Mutual internal code shared between all other packages. |
| [packages/i18n](packages/i18n) | | [Crowdin](https://crowdin.com/project/blitzkrieg) | Translations served as JSON shared across all other packages, including some utility code. | | [packages/i18n](packages/i18n) | | [Crowdin](https://crowdin.com/project/blitzkrieg) | Translations served as JSON shared across all other packages, including some utility code. |
| [packages/scripts](packages/scripts) | | | CLI utilities for the development and deployment of BlitzKit services. | | [packages/scripts](packages/scripts) | | | CLI utilities for the development and deployment of BlitzKit services. |
| [packages/varuna](packages/varuna) | Varuna | [NPM](https://www.npmjs.com/package/varuna) | React and Astro-oriented state management library, awaiting separation from BlitzKit. Unavailable from NPM at this time. |
| [packages/website](packages/website) | BlitzKit | https://blitzkit.app | The BlitzKit website provides a wide range of tools, APIs, and interconnects all other services. | | [packages/website](packages/website) | BlitzKit | https://blitzkit.app | The BlitzKit website provides a wide range of tools, APIs, and interconnects all other services. |
## Submodules ## Submodules
+9 -12
View File
@@ -93,15 +93,6 @@
"yaml": "^2.8.1", "yaml": "^2.8.1",
}, },
}, },
"packages/varuna": {
"name": "varuna",
"dependencies": {
"@types/lodash-es": "^4.17.12",
"immer": "^10.1.3",
"lodash-es": "^4.17.21",
"react": "^19.1.1",
},
},
"packages/website": { "packages/website": {
"name": "@blitzkit/website", "name": "@blitzkit/website",
"dependencies": { "dependencies": {
@@ -141,12 +132,12 @@
"react-dom": "^19.2.4", "react-dom": "^19.2.4",
"react-error-boundary": "^6.1.3", "react-error-boundary": "^6.1.3",
"react-promise-suspense": "^0.3.4", "react-promise-suspense": "^0.3.4",
"soapstone": "^1.0.0",
"three": "^0.180.0", "three": "^0.180.0",
"three-stdlib": "^2.36.0", "three-stdlib": "^2.36.0",
"transliteration": "^2.6.1", "transliteration": "^2.6.1",
"typescript": "^5.9.3", "typescript": "^5.9.3",
"urlon": "^3.1.0", "urlon": "^3.1.0",
"varuna": "workspace:*",
"vite": "^7.1.9", "vite": "^7.1.9",
}, },
}, },
@@ -2162,6 +2153,8 @@
"smol-toml": ["[email protected]", "", {}, "sha512-rInDH6lCNiEyn3+hH8KVGFdbjc099j47+OSgbMrfDYX1CmXLfdKd7qi6IfcWj2wFxvSVkuI46M+wPGYfEOEj6g=="], "smol-toml": ["[email protected]", "", {}, "sha512-rInDH6lCNiEyn3+hH8KVGFdbjc099j47+OSgbMrfDYX1CmXLfdKd7qi6IfcWj2wFxvSVkuI46M+wPGYfEOEj6g=="],
"soapstone": ["[email protected]", "", { "dependencies": { "immer": "^11.1.8", "lodash-es": "^4.18.1", "react": "^19.2.7" }, "peerDependencies": { "typescript": "^5" } }, "sha512-Jlf8aCY9aCvgQR3y/aGhkXyC7vAox05J+dply+0wm567UIOYlCiwSR1MhAkZIRIXtOnoUERBrVz4mDYBrQYBDA=="],
"socks": ["[email protected]", "", { "dependencies": { "ip-address": "^10.0.1", "smart-buffer": "^4.2.0" } }, "sha512-HLpt+uLy/pxB+bum/9DzAgiKS8CX1EvbWxI4zlmgGCExImLdiad2iCwXT5Z4c9c3Eq8rP2318mPW2c+QbtjK8A=="], "socks": ["[email protected]", "", { "dependencies": { "ip-address": "^10.0.1", "smart-buffer": "^4.2.0" } }, "sha512-HLpt+uLy/pxB+bum/9DzAgiKS8CX1EvbWxI4zlmgGCExImLdiad2iCwXT5Z4c9c3Eq8rP2318mPW2c+QbtjK8A=="],
"socks-proxy-agent": ["[email protected]", "", { "dependencies": { "agent-base": "^6.0.2", "debug": "^4.3.3", "socks": "^2.6.2" } }, "sha512-Fgl0YPZ902wEsAyiQ+idGd1A7rSFx/ayC1CQVMw5P+EQx2V0SgpGtf6OKFhVjPflPUl9YMmEOnmfjCdMUsygww=="], "socks-proxy-agent": ["[email protected]", "", { "dependencies": { "agent-base": "^6.0.2", "debug": "^4.3.3", "socks": "^2.6.2" } }, "sha512-Fgl0YPZ902wEsAyiQ+idGd1A7rSFx/ayC1CQVMw5P+EQx2V0SgpGtf6OKFhVjPflPUl9YMmEOnmfjCdMUsygww=="],
@@ -2392,8 +2385,6 @@
"uzip-module": ["[email protected]", "", {}, "sha512-AMqwWZaknLM77G+VPYNZLEruMGWGzyigPK3/Whg99B3S6vGHuqsyl5ZrOv1UUF3paGK1U6PM0cnayioaryg/fA=="], "uzip-module": ["[email protected]", "", {}, "sha512-AMqwWZaknLM77G+VPYNZLEruMGWGzyigPK3/Whg99B3S6vGHuqsyl5ZrOv1UUF3paGK1U6PM0cnayioaryg/fA=="],
"varuna": ["varuna@workspace:packages/varuna"],
"vfile": ["[email protected]", "", { "dependencies": { "@types/unist": "^3.0.0", "vfile-message": "^4.0.0" } }, "sha512-KzIbH/9tXat2u30jf+smMwFCsno4wHVdNmzFyL+T/L3UGqqk6JKfVqOFOZEpZSHADH1k40ab6NUIXZq422ov3Q=="], "vfile": ["[email protected]", "", { "dependencies": { "@types/unist": "^3.0.0", "vfile-message": "^4.0.0" } }, "sha512-KzIbH/9tXat2u30jf+smMwFCsno4wHVdNmzFyL+T/L3UGqqk6JKfVqOFOZEpZSHADH1k40ab6NUIXZq422ov3Q=="],
"vfile-location": ["[email protected]", "", { "dependencies": { "@types/unist": "^3.0.0", "vfile": "^6.0.0" } }, "sha512-5yXvWDEgqeiYiBe1lbxYF7UMAIm/IcopxMHrMQDq3nvKcjPKIhZklUKL+AE7J7uApI4kwe2snsK+eI6UTj9EHg=="], "vfile-location": ["[email protected]", "", { "dependencies": { "@types/unist": "^3.0.0", "vfile": "^6.0.0" } }, "sha512-5yXvWDEgqeiYiBe1lbxYF7UMAIm/IcopxMHrMQDq3nvKcjPKIhZklUKL+AE7J7uApI4kwe2snsK+eI6UTj9EHg=="],
@@ -2692,6 +2683,12 @@
"simple-swizzle/is-arrayish": ["[email protected]", "", {}, "sha512-m6UrgzFVUYawGBh1dUsWR5M2Clqic9RVXC/9f8ceNlv2IcO9j9J/z8UoCLPqtsPBFNzEpfR3xftohbfqDx8EQA=="], "simple-swizzle/is-arrayish": ["[email protected]", "", {}, "sha512-m6UrgzFVUYawGBh1dUsWR5M2Clqic9RVXC/9f8ceNlv2IcO9j9J/z8UoCLPqtsPBFNzEpfR3xftohbfqDx8EQA=="],
"soapstone/immer": ["[email protected]", "", {}, "sha512-EQyQtLiYW029lyoczMl/Hh4Xu7cDecSc58JRYpHyL4tIAu3eqd1yJzQX04d2BZHDkzFFvm6qJEJWOtfDSWAXbQ=="],
"soapstone/lodash-es": ["[email protected]", "", {}, "sha512-J8xewKD/Gk22OZbhpOVSwcs60zhd95ESDwezOFuA3/099925PdHJ7OFHNTGtajL3AlZkykD32HykiMo+BIBI8A=="],
"soapstone/react": ["[email protected]", "", {}, "sha512-E8LUcbtBWt20bbl2YoHfx4ZDBdxVTfOKtCZn9cDSJ4l6/nuoApcpIBcj47t2wZoVX8g2ZHuMHbiShgCR1T5Sog=="],
"source-map-support/source-map": ["[email protected]", "", {}, "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g=="], "source-map-support/source-map": ["[email protected]", "", {}, "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g=="],
"stats-gl/three": ["[email protected]", "", {}, "sha512-FQK+LEpYc0fBD+J8g6oSEyyNzjp+Q7Ks1C568WWaoMRLW+TkNNWmenWeGgJjV105Gd+p/2ql1ZcjYvNiPZBhuQ=="], "stats-gl/three": ["[email protected]", "", {}, "sha512-FQK+LEpYc0fBD+J8g6oSEyyNzjp+Q7Ks1C568WWaoMRLW+TkNNWmenWeGgJjV105Gd+p/2ql1ZcjYvNiPZBhuQ=="],
-11
View File
@@ -1,11 +0,0 @@
{
"name": "varuna",
"type": "module",
"main": "src/index.ts",
"dependencies": {
"@types/lodash-es": "^4.17.12",
"immer": "^10.1.3",
"lodash-es": "^4.17.21",
"react": "^19.1.1"
}
}
-125
View File
@@ -1,125 +0,0 @@
import { produce } from "immer";
import { debounce, merge } from "lodash-es";
import { useEffect, useRef, useState } from "react";
export class Varuna<Type, Arguments = void> {
private listeners = new Set<(state: Type) => void>();
private initialized = false;
private _initial?: Type;
private _state?: Type;
constructor(
private creator: Type | ((...args: Arguments[]) => Type),
private persistence?: string
) {
if (typeof creator !== "function") this.initialize(creator);
}
private initialize(initial: Type) {
let data = initial;
if (this.persistence && typeof localStorage !== "undefined") {
const dehydrated = localStorage.getItem(this.persistence);
if (dehydrated) {
const rehydrated = JSON.parse(dehydrated) as unknown;
data = merge(data, rehydrated);
}
window.addEventListener("beforeunload", this.store.bind(this));
}
this.initialized = true;
this._initial = data;
this._state = data;
}
useInitialization(...args: Arguments[]) {
const initializedThisMount = useRef(false);
if (initializedThisMount.current) return;
if (typeof this.creator !== "function") {
throw new Error("Provider must be used with a function creator");
}
this.initialize((this.creator as (...args: Arguments[]) => Type)(...args));
initializedThisMount.current = true;
}
private dispatch() {
const state = this.state;
this.listeners.forEach((callback) => callback(state));
}
on<Slice>(slicer: (state: Type) => Slice, callback: (state: Slice) => void) {
let last = slicer(this.state);
function listener(state: Type) {
const next = slicer(state);
if (next !== last) {
callback(next);
last = next;
}
}
this.listeners.add(listener);
return () => {
this.listeners.delete(listener);
};
}
mutate(mutator: (state: Type) => void) {
this.set(produce(this.state, mutator));
}
private assertInitialized() {
if (!this.initialized) {
throw new Error("Varuna store used before initialization");
}
}
get state() {
this.assertInitialized();
return this._state as Type;
}
set(state: Type) {
this.assertInitialized();
this._state = state;
this.dispatch();
this.storeDeferred();
}
get initial() {
this.assertInitialized();
return this._initial as Type;
}
use<Slice = Type>(
slicer: (state: Type) => Slice = (state) => state as unknown as Slice
) {
return this.useDeferred(slicer, slicer(this.state));
}
useDeferred<Slice = Type>(slicer: (state: Type) => Slice, initial: Slice) {
const instance = this;
const [slice, setSlice] = useState(initial);
useEffect(() => {
setSlice(slicer(instance.state));
return instance.on(slicer, setSlice);
}, []);
return slice;
}
store() {
localStorage.setItem(this.persistence!, JSON.stringify(this.state));
}
storeDeferred = debounce(this.store.bind(this), 500);
}
-3
View File
@@ -1,3 +0,0 @@
{
"extends": "../../tsconfig.json"
}
+1 -1
View File
@@ -45,12 +45,12 @@
"react-dom": "^19.2.4", "react-dom": "^19.2.4",
"react-error-boundary": "^6.1.3", "react-error-boundary": "^6.1.3",
"react-promise-suspense": "^0.3.4", "react-promise-suspense": "^0.3.4",
"soapstone": "^1.0.0",
"three": "^0.180.0", "three": "^0.180.0",
"three-stdlib": "^2.36.0", "three-stdlib": "^2.36.0",
"transliteration": "^2.6.1", "transliteration": "^2.6.1",
"typescript": "^5.9.3", "typescript": "^5.9.3",
"urlon": "^3.1.0", "urlon": "^3.1.0",
"varuna": "workspace:*",
"vite": "^7.1.9" "vite": "^7.1.9"
} }
} }
+2 -2
View File
@@ -1,4 +1,4 @@
import { Varuna } from "varuna"; import { Soapstone } from "soapstone";
export interface WargamingLogin { export interface WargamingLogin {
token: string; token: string;
@@ -14,7 +14,7 @@ export interface App {
}; };
} }
export const App = new Varuna<App>( export const App = new Soapstone<App>(
{ {
developerMode: false, developerMode: false,
policiesAgreementIndex: -1, policiesAgreementIndex: -1,
@@ -1,4 +1,4 @@
import { Varuna } from "varuna"; import { Soapstone } from "soapstone";
import type { DuelMember } from "./duel"; import type { DuelMember } from "./duel";
export interface CompareMember extends DuelMember { export interface CompareMember extends DuelMember {
@@ -15,9 +15,9 @@ export interface CompareEphemeral {
}; };
} }
export const CompareEphemeral = new Varuna< export const CompareEphemeral = new Soapstone<
CompareEphemeral, CompareEphemeral,
Record<string, number> [Record<string, number>]
>((crewSkills) => ({ >((crewSkills) => ({
crewSkills, crewSkills,
equalize: false, equalize: false,
@@ -1,4 +1,4 @@
import { Varuna } from "varuna"; import { Soapstone } from "soapstone";
export type DeltaMode = "none" | "percentage" | "absolute"; export type DeltaMode = "none" | "percentage" | "absolute";
@@ -6,7 +6,7 @@ export interface ComparePersistent {
deltaMode: DeltaMode; deltaMode: DeltaMode;
} }
export const ComparePersistent = new Varuna<ComparePersistent>( export const ComparePersistent = new Soapstone<ComparePersistent>(
{ deltaMode: "none" }, { deltaMode: "none" },
"compare-2" "compare-2"
); );
@@ -1,9 +1,9 @@
import { type IndividualTankStats } from "@blitzkit/core"; import { type IndividualTankStats } from "@blitzkit/core";
import { Varuna } from "varuna"; import { Soapstone } from "soapstone";
type EmbedBreakdown = Record<number, IndividualTankStats[]>; type EmbedBreakdown = Record<number, IndividualTankStats[]>;
export const EmbedBreakdown = new Varuna<EmbedBreakdown>( export const EmbedBreakdown = new Soapstone<EmbedBreakdown>(
{}, {},
"embed-breakdown-2" "embed-breakdown-2"
); );
@@ -1,5 +1,5 @@
import * as radixColors from "@radix-ui/colors"; import * as radixColors from "@radix-ui/colors";
import { Varuna } from "varuna"; import { Soapstone } from "soapstone";
import { import {
type EmbedConfigItemType, type EmbedConfigItemType,
EmbedItemType, EmbedItemType,
@@ -103,6 +103,6 @@ export type EmbedConfigItem = (
export type EmbedStateStore = Record<string, EmbedConfigItem["default"]>; export type EmbedStateStore = Record<string, EmbedConfigItem["default"]>;
export const EmbedState = new Varuna<EmbedStateStore, EmbedStateStore>( export const EmbedState = new Soapstone<EmbedStateStore, [EmbedStateStore]>(
(data) => data (data) => data
); );
+2 -2
View File
@@ -1,7 +1,7 @@
import { Varuna } from "varuna"; import { Soapstone } from "soapstone";
interface Gallery { interface Gallery {
search?: string; search?: string;
} }
export const Gallery = new Varuna<Gallery>({}); export const Gallery = new Soapstone<Gallery>({});
+2 -2
View File
@@ -1,6 +1,6 @@
import type { TankDefinition } from "@blitzkit/core"; import type { TankDefinition } from "@blitzkit/core";
import { times } from "lodash-es"; import { times } from "lodash-es";
import { Varuna } from "varuna"; import { Soapstone } from "soapstone";
export enum GuessState { export enum GuessState {
Correct, Correct,
@@ -18,7 +18,7 @@ export interface Guess {
tiers: number[]; tiers: number[];
} }
export const Guess = new Varuna<Guess, TankDefinition>((tank) => ({ export const Guess = new Soapstone<Guess, [TankDefinition]>((tank) => ({
tank, tank,
guessState: GuessState.NotGuessed, guessState: GuessState.NotGuessed,
totalGuesses: 0, totalGuesses: 0,
+2 -2
View File
@@ -3,7 +3,7 @@ import type {
TankDefinition, TankDefinition,
TurretDefinition, TurretDefinition,
} from "@blitzkit/core"; } from "@blitzkit/core";
import { Varuna } from "varuna"; import { Soapstone } from "soapstone";
export interface Mixer { export interface Mixer {
hull: TankDefinition; hull: TankDefinition;
@@ -18,4 +18,4 @@ export interface Mixer {
}; };
} }
export const Mixer = new Varuna<Mixer, Mixer>((data) => data); export const Mixer = new Soapstone<Mixer, [Mixer]>((data) => data);
+2 -2
View File
@@ -1,5 +1,5 @@
import type { Samples } from "@blitzkit/core"; import type { Samples } from "@blitzkit/core";
import { Varuna } from "varuna"; import { Soapstone } from "soapstone";
export interface Performance { export interface Performance {
playerCountPeriod: PlayerCountPeriod; playerCountPeriod: PlayerCountPeriod;
@@ -7,6 +7,6 @@ export interface Performance {
export type PlayerCountPeriod = keyof Samples; export type PlayerCountPeriod = keyof Samples;
export const Performance = new Varuna<Performance>({ export const Performance = new Soapstone<Performance>({
playerCountPeriod: "total", playerCountPeriod: "total",
}); });
+2 -2
View File
@@ -1,4 +1,4 @@
import { Varuna } from "varuna"; import { Soapstone } from "soapstone";
export interface PlaylistEntry { export interface PlaylistEntry {
id: number; id: number;
@@ -11,4 +11,4 @@ export interface Playlist {
list?: PlaylistEntry[]; list?: PlaylistEntry[];
} }
export const Playlist = new Varuna<Playlist>({}, "playlist"); export const Playlist = new Soapstone<Playlist>({}, "playlist");
+2 -2
View File
@@ -3,7 +3,7 @@ import type {
IndividualTankStats, IndividualTankStats,
Region, Region,
} from "@blitzkit/core"; } from "@blitzkit/core";
import { Varuna } from "varuna"; import { Soapstone } from "soapstone";
interface SessionBase { interface SessionBase {
columns: CompositeStatsKey[]; columns: CompositeStatsKey[];
@@ -25,7 +25,7 @@ interface SessionNotTracking extends SessionBase {
type Session = SessionTracking | SessionNotTracking; type Session = SessionTracking | SessionNotTracking;
export const Session = new Varuna<Session>( export const Session = new Soapstone<Session>(
{ {
columns: [ columns: [
"cumulative_battles", "cumulative_battles",
+2 -2
View File
@@ -5,7 +5,7 @@ import type {
TankClass, TankClass,
TankType, TankType,
} from "@blitzkit/protos"; } from "@blitzkit/protos";
import { Varuna } from "varuna"; import { Soapstone } from "soapstone";
export interface TankFilters { export interface TankFilters {
tiers: number[]; tiers: number[];
@@ -26,7 +26,7 @@ export interface TankFilters {
showUnowned: boolean; showUnowned: boolean;
} }
export const TankFilters = new Varuna<TankFilters>({ export const TankFilters = new Soapstone<TankFilters>({
tiers: [], tiers: [],
nations: [], nations: [],
classes: [], classes: [],
@@ -1,5 +1,5 @@
import type en from "@blitzkit/i18n/strings/en.json"; import type en from "@blitzkit/i18n/strings/en.json";
import { Varuna } from "varuna"; import { Soapstone } from "soapstone";
export type TankPerformanceSortType = export type TankPerformanceSortType =
keyof typeof en.website.tools.performance.table.stats; keyof typeof en.website.tools.performance.table.stats;
@@ -9,7 +9,7 @@ export interface TankPerformanceSort {
direction: -1 | 1; direction: -1 | 1;
} }
export const TankPerformanceSort = new Varuna<TankPerformanceSort>({ export const TankPerformanceSort = new Soapstone<TankPerformanceSort>({
type: "winrate", type: "winrate",
direction: -1, direction: -1,
}); });
+2 -2
View File
@@ -5,7 +5,7 @@ import type {
TankDefinition, TankDefinition,
} from "@blitzkit/protos"; } from "@blitzkit/protos";
import type { Vector3 } from "three"; import type { Vector3 } from "three";
import { Varuna } from "varuna"; import { Soapstone } from "soapstone";
import { api } from "../api/dynamic"; import { api } from "../api/dynamic";
import type { ArmorType } from "../components/SpacedArmorScene"; import type { ArmorType } from "../components/SpacedArmorScene";
import type { ExternalModuleVariant } from "../components/SpacedArmorSceneComponent"; import type { ExternalModuleVariant } from "../components/SpacedArmorSceneComponent";
@@ -117,7 +117,7 @@ interface Tankopedia {
const skills = await api.skills(); const skills = await api.skills();
const models = await api.models(); const models = await api.models();
export const Tankopedia = new Varuna<Tankopedia, TankDefinition>((tank) => ({ export const Tankopedia = new Soapstone<Tankopedia, [TankDefinition]>((tank) => ({
disturbed: false, disturbed: false,
revealed: false, revealed: false,
@@ -1,5 +1,5 @@
import type en from "@blitzkit/i18n/strings/en.json"; import type en from "@blitzkit/i18n/strings/en.json";
import { Varuna } from "varuna"; import { Soapstone } from "soapstone";
export type TankopediaSortBy = keyof typeof en.website.common.tank_search.sort; export type TankopediaSortBy = keyof typeof en.website.common.tank_search.sort;
export type TankopediaSortDirection = "ascending" | "descending"; export type TankopediaSortDirection = "ascending" | "descending";
@@ -23,7 +23,7 @@ export interface TankopediaPersistent {
}; };
} }
export const TankopediaPersistent = new Varuna<TankopediaPersistent>( export const TankopediaPersistent = new Soapstone<TankopediaPersistent>(
{ {
hideTankModelUnderArmor: false, hideTankModelUnderArmor: false,
wireframe: false, wireframe: false,
@@ -1,4 +1,4 @@
import { Varuna } from 'varuna'; import { Soapstone } from 'soapstone';
import { import {
type TankopediaSortBy, type TankopediaSortBy,
type TankopediaSortDirection, type TankopediaSortDirection,
@@ -9,7 +9,7 @@ export interface TankSort {
direction: TankopediaSortDirection; direction: TankopediaSortDirection;
} }
export const TankSort = new Varuna<TankSort>({ export const TankSort = new Soapstone<TankSort>({
by: 'meta.none', by: 'meta.none',
direction: 'descending', direction: 'descending',
}); });
+2 -2
View File
@@ -1,5 +1,5 @@
import { enableMapSet } from "immer"; import { enableMapSet } from "immer";
import { Varuna } from "varuna"; import { Soapstone } from "soapstone";
import { tierListRows } from "../components/TierList/Table/constants"; import { tierListRows } from "../components/TierList/Table/constants";
export interface TierList { export interface TierList {
@@ -8,7 +8,7 @@ export interface TierList {
placedTanks: Set<number>; placedTanks: Set<number>;
} }
export const TierList = new Varuna<TierList>({ export const TierList = new Soapstone<TierList>({
dragging: false, dragging: false,
rows: tierListRows.map((row) => ({ name: row.name, tanks: [] })), rows: tierListRows.map((row) => ({ name: row.name, tanks: [] })),
placedTanks: new Set(), placedTanks: new Set(),