2026-03-31 18:01:57 +08:00
|
|
|
/**
|
|
|
|
|
* boardgame-core
|
|
|
|
|
* 基于 Preact Signals 的桌游状态管理库
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
// Core types
|
2026-04-01 17:34:21 +08:00
|
|
|
export type { Context } from './core/context';
|
|
|
|
|
export { GameContext, createGameContext } from './core/context';
|
2026-03-31 18:01:57 +08:00
|
|
|
|
2026-04-01 17:34:21 +08:00
|
|
|
export type { Part } from './core/part';
|
|
|
|
|
export { flip, flipTo, roll } from './core/part';
|
2026-03-31 18:01:57 +08:00
|
|
|
|
2026-04-01 17:34:21 +08:00
|
|
|
export type { Region, RegionAxis } from './core/region';
|
|
|
|
|
export { applyAlign, shuffle } from './core/region';
|
2026-03-31 18:01:57 +08:00
|
|
|
|
2026-04-01 22:20:38 +08:00
|
|
|
export type { RuleContext, RuleState, RuleDef, RuleRegistry } from './core/rule';
|
|
|
|
|
export { createRule, dispatchCommand } from './core/rule';
|
2026-03-31 18:01:57 +08:00
|
|
|
|
2026-04-01 17:34:21 +08:00
|
|
|
// Utils
|
2026-04-01 18:54:02 +08:00
|
|
|
export type { Command, CommandSchema, CommandParamSchema, CommandOptionSchema, CommandFlagSchema } from './utils/command';
|
2026-04-02 00:14:43 +08:00
|
|
|
export { parseCommand, parseCommandSchema, validateCommand, parseCommandWithSchema, applyCommandSchema } from './utils/command';
|
2026-03-31 18:01:57 +08:00
|
|
|
|
2026-04-02 08:58:11 +08:00
|
|
|
export type { CommandRunner, CommandRunnerHandler, CommandRegistry, CommandRunnerContext } from './utils/command';
|
|
|
|
|
export { createCommandRegistry, registerCommand, unregisterCommand, hasCommand, getCommand, runCommand, createCommandRunnerContext } from './utils/command';
|
|
|
|
|
|
2026-04-01 17:34:21 +08:00
|
|
|
export type { Entity, EntityAccessor } from './utils/entity';
|
|
|
|
|
export { createEntityCollection } from './utils/entity';
|
2026-03-31 18:01:57 +08:00
|
|
|
|
2026-04-01 17:34:21 +08:00
|
|
|
export type { RNG } from './utils/rng';
|
|
|
|
|
export { createRNG, Mulberry32RNG } from './utils/rng';
|