boardgame-core/src/index.ts

34 lines
1.7 KiB
TypeScript
Raw Normal View History

/**
* boardgame-core
* Preact Signals
*/
// Core types
2026-04-02 10:48:20 +08:00
export type { IGameContext } from './core/game';
2026-04-04 18:29:33 +08:00
export { createGameContext, createGameCommandRegistry, registerGameCommand } from './core/game';
2026-04-04 14:05:23 +08:00
export type { GameHost, GameHostStatus, GameModule } from './core/game';
2026-04-04 11:06:41 +08:00
export { createGameHost, createGameModule } from './core/game';
2026-04-04 00:54:19 +08:00
2026-04-01 17:34:21 +08:00
export type { Part } from './core/part';
2026-04-03 17:56:35 +08:00
export { flip, flipTo, roll, findPartById, isCellOccupied, getPartAtPosition, isCellOccupiedByRegion, getPartAtPositionInRegion } from './core/part';
export type { PartTemplate, PartPool } from './core/part-factory';
2026-04-04 18:42:21 +08:00
export { createPart, createParts, createPartPool, mergePartPools, createPartsFromTable } from './core/part-factory';
2026-04-01 17:34:21 +08:00
export type { Region, RegionAxis } from './core/region';
2026-04-04 18:29:33 +08:00
export { createRegion, applyAlign, shuffle, moveToRegion } from './core/region';
2026-04-01 17:34:21 +08:00
// Utils
2026-04-03 15:11:55 +08:00
export type { Command, CommandResult, CommandSchema, CommandParamSchema, CommandOptionSchema, CommandFlagSchema } from './utils/command';
2026-04-02 00:14:43 +08:00
export { parseCommand, parseCommandSchema, validateCommand, parseCommandWithSchema, applyCommandSchema } from './utils/command';
export type { CommandRunner, CommandRunnerHandler, CommandRunnerContext, PromptEvent, CommandRunnerEvents } from './utils/command';
export { createCommandRegistry, registerCommand, unregisterCommand, hasCommand, getCommand, runCommand, runCommandParsed, createCommandRunnerContext, type CommandRegistry, type CommandRunnerContextExport } from './utils/command';
2026-04-02 08:58:11 +08:00
2026-04-03 14:17:36 +08:00
export type { MutableSignal } from './utils/mutable-signal';
export { mutableSignal, createEntityCollection } from './utils/mutable-signal';
2026-04-01 17:34:21 +08:00
export type { RNG } from './utils/rng';
export { createRNG, Mulberry32RNG } from './utils/rng';