boardgame-core/src/index.ts

75 lines
1.7 KiB
TypeScript
Raw Normal View History

/**
* boardgame-core
* Preact Signals
*/
// Core types
export type { IGameContext } from "./core/game";
export { createGameCommandRegistry, createPromptDef } from "./core/game";
export type { GameHost, GameHostStatus, GameModule } from "./core/game-host";
export { createGameHost } from "./core/game-host";
2026-04-04 00:54:19 +08:00
export type { Part } from "./core/part";
export { flip, flipTo, roll } from "./core/part";
export { createParts, createPartsFromTable } from "./core/part-factory";
export type { Region, RegionAxis } from "./core/region";
export {
createRegion,
createRegionAxis,
applyAlign,
shuffle,
moveToRegion,
} from "./core/region";
2026-04-01 17:34:21 +08:00
// Utils
export type {
Command,
CommandDef,
CommandResult,
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";
2026-04-02 08:58:11 +08:00
export type { MutableSignal } from "./utils/mutable-signal";
export { mutableSignal } from "./utils/mutable-signal";
export type { RNG, ReadonlyRNG } from "./utils/rng";
export { createRNG, Mulberry32RNG } from "./utils/rng";
2026-04-08 09:28:44 +08:00
export type { MiddlewareChain } from "./utils/middleware";
export { createMiddlewareChain } from "./utils/middleware";
2026-04-17 17:27:46 +08:00
export * from "@preact/signals-core";