react-color-palette-wheel 0.0.1 → 0.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +44 -62
  3. package/package.json +23 -1
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Milles Dyson Schroeder
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,73 +1,55 @@
1
- # React + TypeScript + Vite
1
+ # 🎨 React Color Palette Wheel
2
2
 
3
- This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.
3
+ A professional, lightweight, and fully typed color wheel component for React. Inspired by tools like Adobe Color, this library allows color selection based on **Chromatic Harmonies** (Triad, Complementary, Analogous, etc.) with geometric precision.
4
4
 
5
- Currently, two official plugins are available:
5
+ ![npm bundle size](https://img.shields.io/bundlephobia/minzip/react-color-palette-wheel)
6
+ ![npm version](https://img.shields.io/npm/v/react-color-palette-wheel)
7
+ ![license](https://img.shields.io/npm/l/react-color-palette-wheel)
6
8
 
7
- - [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react) uses [Babel](https://babeljs.io/) (or [oxc](https://oxc.rs) when used in [rolldown-vite](https://vite.dev/guide/rolldown)) for Fast Refresh
8
- - [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh
9
+ ## Highlights
9
10
 
10
- ## React Compiler
11
+ * **Ultra Lightweight:** Only **~16.4kB** (packed).
12
+ * **Mathematical Harmonies:** Precise algorithms for complex color schemes.
13
+ * **TypeScript:** Native type definitions (`.d.ts`) included.
14
+ * **Performance:** Optimized Canvas rendering.
15
+ * **Zero Config:** Works out of the box with sensible defaults.
11
16
 
12
- The React Compiler is not enabled on this template because of its impact on dev & build performances. To add it, see [this documentation](https://react.dev/learn/react-compiler/installation).
17
+ ## 📦 Installation
13
18
 
14
- ## Expanding the ESLint configuration
19
+ ```bash
20
+ npm install react-color-palette-wheel
21
+ # or
22
+ yarn add react-color-palette-wheel
15
23
 
16
- If you are developing a production application, we recommend updating the configuration to enable type-aware lint rules:
17
-
18
- ```js
19
- export default defineConfig([
20
- globalIgnores(['dist']),
21
- {
22
- files: ['**/*.{ts,tsx}'],
23
- extends: [
24
- // Other configs...
25
-
26
- // Remove tseslint.configs.recommended and replace with this
27
- tseslint.configs.recommendedTypeChecked,
28
- // Alternatively, use this for stricter rules
29
- tseslint.configs.strictTypeChecked,
30
- // Optionally, add this for stylistic rules
31
- tseslint.configs.stylisticTypeChecked,
32
-
33
- // Other configs...
34
- ],
35
- languageOptions: {
36
- parserOptions: {
37
- project: ['./tsconfig.node.json', './tsconfig.app.json'],
38
- tsconfigRootDir: import.meta.dirname,
39
- },
40
- // other options...
41
- },
42
- },
43
- ])
44
24
  ```
45
25
 
46
- You can also install [eslint-plugin-react-x](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-x) and [eslint-plugin-react-dom](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-dom) for React-specific lint rules:
26
+ ## 🚀 Basic Usage
27
+
28
+ ```ts
29
+ import { useState } from 'react';
30
+ import { ColorWheel, HarmonyType, CursorData } from 'react-color-palette-wheel';
31
+
32
+ function App() {
33
+ const [colors, setColors] = useState<CursorData[]>([]);
34
+
35
+ return (
36
+ <div>
37
+ <h1>Harmony Selector</h1>
38
+
39
+ <ColorWheel
40
+ radius={250} // Wheel radius (Total diameter: 500px)
41
+ harmony={HarmonyType.Triad} // Harmony type (e.g., Triad)
42
+ onChange={setColors} // Callback with selected colors
43
+ />
44
+ </div>
45
+ );
46
+ }
47
+ ```
47
48
 
48
- ```js
49
- // eslint.config.js
50
- import reactX from 'eslint-plugin-react-x'
51
- import reactDom from 'eslint-plugin-react-dom'
49
+ ## 🛠️ Build Details
50
+ * **Formats:** ESM (.es.js) and UMD (.umd.js).
51
+ * **Size:** ~16kB (Minified + Gzipped).
52
+ * **Typing:** Full TypeScript support.
52
53
 
53
- export default defineConfig([
54
- globalIgnores(['dist']),
55
- {
56
- files: ['**/*.{ts,tsx}'],
57
- extends: [
58
- // Other configs...
59
- // Enable lint rules for React
60
- reactX.configs['recommended-typescript'],
61
- // Enable lint rules for React DOM
62
- reactDom.configs.recommended,
63
- ],
64
- languageOptions: {
65
- parserOptions: {
66
- project: ['./tsconfig.node.json', './tsconfig.app.json'],
67
- tsconfigRootDir: import.meta.dirname,
68
- },
69
- // other options...
70
- },
71
- },
72
- ])
73
- ```
54
+ ## 📄 License
55
+ MIT
package/package.json CHANGED
@@ -1,7 +1,29 @@
1
1
  {
2
2
  "name": "react-color-palette-wheel",
3
- "version": "0.0.1",
3
+ "version": "0.0.2",
4
4
  "type": "module",
5
+ "license": "MIT",
6
+ "repository": {
7
+ "type": "git",
8
+ "url": "git+https://github.com/MillesDyson/color-palette-generator.git"
9
+ },
10
+ "homepage": "https://github.com/MillesDyson/color-palette-generator",
11
+ "bugs": {
12
+ "url": "https://github.com/MillesDyson/color-palette-generator/issues"
13
+ },
14
+ "keywords": [
15
+ "react",
16
+ "color",
17
+ "palette",
18
+ "wheel",
19
+ "color-palette",
20
+ "color-palette-generator"
21
+ ],
22
+ "author": {
23
+ "name": "Milles Dyson",
24
+ "email": "millesdyson@gmail.com",
25
+ "url": "https://github.com/MillesDyson"
26
+ },
5
27
  "scripts": {
6
28
  "dev": "vite",
7
29
  "build": "tsc -b && vite build",