No description
Introduces the presentational primitives of the upcoming visual-mode authoring surface, scoped so they can be dropped into an existing editor without touching form-mode logic. T16 — BlockCard (visual-builder/BlockCard.tsx): Single primitive-block renderer. Pure controlled component — no own state, no DnD. Props take node + index + isSelected + isExpanded + onSelect/onToggleExpand/onRemove + depth. Color-codes by kind: - blue: state primitives (seed/add/multiply/add-direction/set-capture-flag) - emerald: mechanic primitives (absorb/reflect/modify-range/block-move/ override-promotion) - violet: advanced/trigger primitives (auras + all on-* hooks + conditional) Accessible: role='article', keyboard-focusable, Enter toggles expand, Space selects, Delete/Backspace removes. Indent visually clamped at depth 3. Delegates parameter editing to ParamField when expanded. T17 — PreviewPane (visual-builder/preview/): Tabbed live preview with role=tablist semantics. Three sub-views: - NarrativeView — renders narrate(descriptor) in a semantic <pre role='region'> for assistive tech - JsonView — pretty-printed JSON with copy-to-clipboard (Sonner toast) - BoardDiagramView — 8×8 SVG highlighting on-moved-onto-square filter squares and add-aura radii; shows 'No board effect' placeholder when the descriptor has no positional primitives All sub-views memoized on descriptor identity. BoardDiagramView tolerates in-edit malformed descriptors via structural unknown casts so the preview doesn't throw during authoring. Wave 3 will add BlockList (dnd-kit wrap around BlockCard) and VisualBuilderPane (composition shell + palette + preview). |
||
|---|---|---|
| .github/workflows | ||
| .sisyphus | ||
| docs | ||
| packages | ||
| scripts | ||
| .gitignore | ||
| eslint.config.js | ||
| lefthook.yml | ||
| LICENSE | ||
| package.json | ||
| playwright.config.ts | ||
| README.md | ||
| tsconfig.base.json | ||
| tsconfig.json | ||
| vitest.workspace.ts | ||
@paratype
A Doorenbos-style Rete II rules engine for TypeScript games, with an authoritative WebSocket chess demo.
Packages
packages/rete— Rete II engine corepackages/chess— Browser chess demo (React + Vite)packages/server— Authoritative Bun WebSocket server
Docs
- SPEC.md — Engine specification
- PHASES.md — Development phases & perf budgets
- RULES.md — Chess rule presets
- PROTOCOL.md — WebSocket message protocol
Getting Started
bun install && bun run check