@rageshpikalmunde/rp-image-editor-react 1.6.0 → 1.6.1

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 +74 -0
  3. package/package.json +22 -9
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 rpragesh
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 ADDED
@@ -0,0 +1,74 @@
1
+ # @rageshpikalmunde/rp-image-editor-react
2
+
3
+ React image editor and annotation component for [`@rageshpikalmunde/rp-image-editor`](https://www.npmjs.com/package/@rageshpikalmunde/rp-image-editor): crop, rotate, draw, text, arrows, shapes, callouts, filters and multi-image editing. Accessible (WCAG 2.2 AA), mobile-ready, TypeScript.
4
+
5
+ [Live demo](https://rpragesh.github.io/image-editor/) · [React guide](https://rpragesh.github.io/image-editor/react-image-editor/) · [React example on StackBlitz](https://stackblitz.com/github/rpragesh/image-editor/tree/main/examples/react) · [API reference](https://rpragesh.github.io/image-editor/api/) · [Full docs](https://github.com/rpragesh/image-editor#readme)
6
+
7
+ [![rp-image-editor: multi-image editing, crop, arrows and filters](https://rpragesh.github.io/image-editor/demo.gif)](https://rpragesh.github.io/image-editor/)
8
+
9
+ ## Install
10
+
11
+ ```bash
12
+ npm install @rageshpikalmunde/rp-image-editor @rageshpikalmunde/rp-image-editor-react
13
+ ```
14
+
15
+ Works with React 17 and newer (Vite, CRA, Next.js, Ionic React).
16
+
17
+ ## Open the editor as a modal
18
+
19
+ ```tsx
20
+ import { useRpImageEditor } from '@rageshpikalmunde/rp-image-editor-react';
21
+
22
+ export function PhotoUpload() {
23
+ const { openEditor } = useRpImageEditor();
24
+
25
+ async function onFile(e: React.ChangeEvent<HTMLInputElement>) {
26
+ const file = e.target.files?.[0];
27
+ if (!file) return;
28
+ const result = await openEditor(file, { exportFormat: 'jpeg' });
29
+ if (result) upload(result.file); // also result.blob and result.base64
30
+ }
31
+
32
+ return <input type="file" accept="image/*" onChange={onFile} />;
33
+ }
34
+ ```
35
+
36
+ `openEditor` resolves with the edited image when the user clicks Apply, or `null` if they close the editor.
37
+
38
+ ## Edit several images at once
39
+
40
+ ```tsx
41
+ const { openMultiEditor } = useRpImageEditor();
42
+
43
+ const results = await openMultiEditor(files, { exportFormat: 'jpeg' });
44
+ // [{ index, edited, result }] for every image, or null if closed
45
+ ```
46
+
47
+ A thumbnail strip switches between images, each keeps its own undo history, and Close asks before discarding edits.
48
+
49
+ ## Inline editor
50
+
51
+ ```tsx
52
+ import { RpImageEditorComponent } from '@rageshpikalmunde/rp-image-editor-react';
53
+
54
+ <RpImageEditorComponent
55
+ image={file}
56
+ config={{ language: 'de' }}
57
+ onImageEdited={(result) => upload(result.file)}
58
+ style={{ height: 600 }}
59
+ />
60
+ ```
61
+
62
+ Passing `onImageEdited` shows the editor's Apply button.
63
+
64
+ ## Next.js
65
+
66
+ The editor needs the browser (DOM and canvas). Call `openEditor` from an event handler, or load `RpImageEditorComponent` with `next/dynamic` and `ssr: false`.
67
+
68
+ ## Configuration
69
+
70
+ Every option of the core package works here: themes, 15 languages, which tools to show, crop ratios, filter presets, export format and quality. See the [configuration docs](https://github.com/rpragesh/image-editor/blob/main/packages/core/README.md#configuration).
71
+
72
+ ## License
73
+
74
+ MIT © Ragesh Pikalmunde
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@rageshpikalmunde/rp-image-editor-react",
3
- "version": "1.6.0",
4
- "description": "React wrapper for rp-image-editor with crop, annotation, filters, and native-resolution export support",
3
+ "version": "1.6.1",
4
+ "description": "React image editor and annotation component (rp-image-editor): crop, rotate, draw, text, shapes, callouts, filters and multi-image editing. Accessible and mobile-ready.",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",
7
7
  "types": "dist/types/index.d.ts",
@@ -23,20 +23,24 @@
23
23
  "clean": "rm -rf dist"
24
24
  },
25
25
  "keywords": [
26
- "image-editor",
27
26
  "react-image-editor",
28
27
  "react-photo-editor",
28
+ "react-image-crop",
29
+ "react-image-annotation",
30
+ "image-editor",
31
+ "photo-editor",
29
32
  "image-annotation",
33
+ "image-cropper",
30
34
  "screenshot-annotation",
31
- "crop",
32
- "draw",
33
- "shapes",
34
- "callout",
35
+ "multi-image",
36
+ "image-filters",
37
+ "accessible",
35
38
  "fabricjs",
36
39
  "react",
37
40
  "ionic",
38
41
  "ionic-react",
39
- "capacitor"
42
+ "capacitor",
43
+ "typescript"
40
44
  ],
41
45
  "author": "Ragesh Pikalmunde",
42
46
  "license": "MIT",
@@ -44,7 +48,7 @@
44
48
  "access": "public"
45
49
  },
46
50
  "dependencies": {
47
- "@rageshpikalmunde/rp-image-editor": "^1.6.0"
51
+ "@rageshpikalmunde/rp-image-editor": "^1.6.1"
48
52
  },
49
53
  "peerDependencies": {
50
54
  "react": ">=17.0.0",
@@ -55,5 +59,14 @@
55
59
  "react-dom": "^18.2.0",
56
60
  "@types/react": "^18.2.0",
57
61
  "typescript": "~5.3.0"
62
+ },
63
+ "homepage": "https://rpragesh.github.io/image-editor/react-image-editor/",
64
+ "repository": {
65
+ "type": "git",
66
+ "url": "https://github.com/rpragesh/image-editor.git",
67
+ "directory": "packages/react"
68
+ },
69
+ "bugs": {
70
+ "url": "https://github.com/rpragesh/image-editor/issues"
58
71
  }
59
72
  }