open-index/open-npm huggingface dataset:
npm package: @shahata5/editor-whiteboard
Description: A modular, type-safe, mobile-friendly whiteboard React component with draggable, resizable, and rotatable areas, live-editable sidepanel, and prompt-based generation.
Latest version: 1.0.6

# Editor Whiteboard React Component

A modular, type-safe, mobile-friendly whiteboard React component with draggable, resizable, and rotatable areas, live-editable sidepanel, and prompt-based generation.

## Install

```
npm install @shahata5/editor-whiteboard
```

## Usage

```tsx
import { Editor, EditorImplementation, ObjectLocation, ObjectDataPair } from '@shahata5/editor-whiteboard';

const editorImpl: EditorImplementation = {
  getObjectLocations: () => [...],
  generateFromPrompt: async (prompt) => ({ component: ... , width: 375, height: 667 }),
  setObjectLocation: (id, newLocation) => { ... },
  getObjectData: (id) => [...],
  setObjectData: (id, data) => { ... },
};

export default function App() {
  return <Editor editorImpl={editorImpl} />;
}
```

## API

### `<Editor editorImpl={...} />`

- `editorImpl: EditorImplementation` (**required**):
  - `getObjectLocations(): ObjectLocation[]` — Return all area locations.
  - `generateFromPrompt(prompt: string): Promise<{ component: React.FC, width: number, height: number }>` — Generate board from prompt.
  - `setObjectLocation(id: string, newLocation: ObjectLocation): void` — Update area location.
  - `getObjectData(id: string): ObjectDataPair[]` — Get key/value data for area.
  - `setObjectData(id: string, data: ObjectDataPair[]): void` — Set key/value data for area.

### Types

- `ObjectLocation`: `{ id: string, top: number, left: number, width: number, height: number, zIndex: number, rotation: number }`
- `ObjectDataPair`: `{ key: string, value: string }`
- `EditorImplementation`: see above

## Peer Dependencies

- `react` >= 18
- `react-dom` >= 18
npm package: @shaheerkochai/core
Description: This is the core package of our project. It provides essential theming functionality and components for managing the application's visual appearance.
Latest version: 0.2.0

# Core Package

This is the core package of our project. It provides essential theming functionality and components for managing the application's visual appearance.

## Features

1. Theme Provider

   - A component that wraps your application and provides theme context to all child components.

2. useTheme Hook

   - A custom hook that allows components to access and utilize the current theme.

3. ThemeSwitcher
   - A component that enables users to switch between different themes in the application.