refactor: migrate names-generator (#1285)

* refactor: migrate names-generator

* Update src/types/global.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update src/modules/index.ts

* fix: failing builds after merge

* chore: update biome version to 2.3.13 and adjust name validation regex for ASCII characters

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
Marc Emmanuel 2026-01-27 19:29:37 +01:00 committed by GitHub
parent 9db40a5230
commit 260ccd76a3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 775 additions and 369 deletions

View file

@ -39,4 +39,5 @@ export interface PackedGraph {
};
rivers: River[];
features: PackedGraphFeature[];
cultures: any[];
}

View file

@ -1,4 +1,5 @@
import type { Selection } from "d3";
import type { NameBase } from "../modules/names-generator";
import type { PackedGraph } from "./PackedGraph";
declare global {
@ -12,9 +13,11 @@ declare global {
var ERROR: boolean;
var heightmapTemplates: any;
var Names: any;
var nameBases: NameBase[];
var pointsInput: HTMLInputElement;
var heightExponentInput: HTMLInputElement;
var mapName: HTMLInputElement;
var rivers: Selection<SVGElement, unknown, null, undefined>;
var oceanLayers: Selection<SVGGElement, unknown, null, undefined>;
@ -28,4 +31,12 @@ declare global {
icons: string[][];
cost: number[];
};
var tip: (
message: string,
autoHide?: boolean,
type?: "info" | "warning" | "error",
) => void;
var locked: (settingId: string) => boolean;
var unlock: (settingId: string) => void;
}