New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

@reactchessts/chess-ts

Package Overview
Dependencies
Maintainers
0
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@reactchessts/chess-ts

A modern React TypeScript chess development toolkit

latest
Source
npmnpm
Version
0.1.0
Version published
Maintainers
0
Created
Source

ChessTs

A modern React TypeScript chess development toolkit. This project provides a fully-featured chess game implementation with a beautiful and responsive UI.

Features

  • Full chess rules implementation
  • Legal move validation
  • Move history tracking
  • Game state management
  • Draw detection (threefold repetition, fifty-move rule, insufficient material)
  • Responsive design
  • Drag-and-drop and click-to-move support
  • Keyboard navigation
  • Accessibility features

Installation

npm install chess-ts

Usage

import { ChessBoard, ChessProvider, PieceProvider } from 'chess-ts';

function App() {
  return (
    <ChessProvider>
      <PieceProvider>
        <ChessBoard />
      </PieceProvider>
    </ChessProvider>
  );
}

Components

ChessBoard

The main chess board component that handles piece rendering and move validation.

interface BoardProps {
  onPieceDrop?: (source: string, target: string, piece: string) => boolean;
  orientation?: 'white' | 'black';
  customSquareStyles?: Record<string, CSSProperties>;
}

ChessProvider

Provides chess game state and methods through React Context.

const { 
  position,
  turn,
  isCheck,
  isCheckmate,
  isStalemate,
  isDraw,
  history,
  makeMove,
  undo,
  reset
} = useChess();

PieceProvider

Manages chess piece themes and SVG assets.

Development

# Install dependencies
npm install

# Start development server
npm run dev

# Build for production
npm run build

# Run tests
npm test

Contributing

  • Fork the repository
  • Create your feature branch (git checkout -b feature/amazing-feature)
  • Commit your changes (git commit -m 'Add some amazing feature')
  • Push to the branch (git push origin feature/amazing-feature)
  • Open a Pull Request

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgments

  • chess.js for chess logic
  • React and TypeScript communities
  • Contributors and users of this project

Keywords

react

FAQs

Package last updated on 17 Feb 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts