boardgame-core/src/index.ts

28 lines
1.2 KiB
TypeScript

/**
* boardgame-core
* 基于 Preact Signals 的桌游状态管理库
*/
// Core types
export type { IGameContext } from './core/game';
export { createGameContext, createGameCommandRegistry } from './core/game';
export type { Part } from './core/part';
export { flip, flipTo, roll } from './core/part';
export type { Region, RegionAxis } from './core/region';
export { applyAlign, shuffle, RegionEntity } from './core/region';
// Utils
export type { Command, CommandSchema, CommandParamSchema, CommandOptionSchema, CommandFlagSchema } from './utils/command';
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';
export type { Entity } from './utils/entity';
export { createEntityCollection, entity } from './utils/entity';
export type { RNG } from './utils/rng';
export { createRNG, Mulberry32RNG } from './utils/rng';