boardgame-core/src/index.ts

28 lines
1.3 KiB
TypeScript

/**
* boardgame-core
* 基于 Preact Signals 的桌游状态管理库
*/
// Core types
export type { Context, GameContextInstance, GameQueueState } from './core/context';
export { GameContext, createGameContext } from './core/context';
export type { Part } from './core/part';
export { flip, flipTo, roll } from './core/part';
export type { Region, RegionAxis } from './core/region';
export { applyAlign, shuffle } 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, EntityAccessor } from './utils/entity';
export { createEntityCollection } from './utils/entity';
export type { RNG } from './utils/rng';
export { createRNG, Mulberry32RNG } from './utils/rng';