pixedi 1.3.0 → 1.5.0
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.
- package/CHANGELOG.md +8 -0
- package/README.md +10 -7
- package/README.npm.md +10 -7
- package/dist/lib/index.js +874 -742
- package/dist/lib/index.umd.js +3 -3
- package/dist/widget/pixedi-widget.js +6 -6
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/README.md
CHANGED
|
@@ -88,18 +88,21 @@ function AppBase64() {
|
|
|
88
88
|
|
|
89
89
|
| Prop | Type | Description |
|
|
90
90
|
| ---------- | -------------------------------------------------- | --------------------------------------------------------------------------------------------- |
|
|
91
|
-
| `image` | `string`
|
|
91
|
+
| `image` | `string \| Blob` | URL, base64 data URI, or `Blob` of the image to edit. |
|
|
92
92
|
| `onSave` | `(image: Blob \| string) => void \| Promise<void>` | Called when the user clicks Save. Receives the edited image as a `Blob` or a base64 data URI. |
|
|
93
93
|
| `onBack` | `() => void` | Called when the user clicks Back/Cancel. |
|
|
94
|
+
| `theme` | `"light" \| "dark"` | UI color theme. Defaults to `"light"`. |
|
|
94
95
|
| `settings` | `Settings` | Optional editor settings (see below). |
|
|
95
96
|
|
|
96
97
|
### Settings
|
|
97
98
|
|
|
98
|
-
| Setting | Type
|
|
99
|
-
| ------------ |
|
|
100
|
-
| `
|
|
101
|
-
| `
|
|
102
|
-
| `
|
|
99
|
+
| Setting | Type | Default | Description |
|
|
100
|
+
| ------------ | ------------------------------------------------------------------------------ | ---------------------------------------------------------- | ----------------------------------------------------------------------------------------------- |
|
|
101
|
+
| `tools` | `Array<"resize" \| "crop" \| "presetCrop" \| "flip" \| "rotate" \| "filters">` | `["resize","crop","presetCrop","flip","rotate","filters"]` | Tools to show in the sidebar. Use an empty array to disable editing. |
|
|
102
|
+
| `infobar` | `boolean` | `false` | Show the image info panel below the canvas. |
|
|
103
|
+
| `quality` | `number` | `0.85` | Output compression quality (`0`–`1`) for JPEG/WebP. |
|
|
104
|
+
| `saveAsWEBP` | `boolean` | `false` | Encode the final image as WebP. |
|
|
105
|
+
| `exportAs` | `"blob" \| "base64"` | `"blob"` | Pass the result to `onSave` as a `Blob` or as a base64 data URI (`data:<mimeType>;base64,...`). |
|
|
103
106
|
|
|
104
107
|
## Widget CDN
|
|
105
108
|
|
|
@@ -108,7 +111,7 @@ For non-React environments, use the standalone UMD widget from a CDN. See [`READ
|
|
|
108
111
|
Pin to a specific version in production:
|
|
109
112
|
|
|
110
113
|
```html
|
|
111
|
-
<script src="https://cdn.jsdelivr.net/npm/pixedi@1.0
|
|
114
|
+
<script src="https://cdn.jsdelivr.net/npm/pixedi@1.3.0/dist/widget/pixedi-widget.js"></script>
|
|
112
115
|
```
|
|
113
116
|
|
|
114
117
|
For the latest version (use only for testing):
|
package/README.npm.md
CHANGED
|
@@ -88,18 +88,21 @@ function AppBase64() {
|
|
|
88
88
|
|
|
89
89
|
| Prop | Type | Description |
|
|
90
90
|
| ---------- | -------------------------------------------------- | --------------------------------------------------------------------------------------------- |
|
|
91
|
-
| `image` | `string`
|
|
91
|
+
| `image` | `string \| Blob` | URL, base64 data URI, or `Blob` of the image to edit. |
|
|
92
92
|
| `onSave` | `(image: Blob \| string) => void \| Promise<void>` | Called when the user clicks Save. Receives the edited image as a `Blob` or a base64 data URI. |
|
|
93
93
|
| `onBack` | `() => void` | Called when the user clicks Back/Cancel. |
|
|
94
|
+
| `theme` | `"light" \| "dark"` | UI color theme. Defaults to `"light"`. |
|
|
94
95
|
| `settings` | `Settings` | Optional editor settings (see below). |
|
|
95
96
|
|
|
96
97
|
### Settings
|
|
97
98
|
|
|
98
|
-
| Setting | Type
|
|
99
|
-
| ------------ |
|
|
100
|
-
| `
|
|
101
|
-
| `
|
|
102
|
-
| `
|
|
99
|
+
| Setting | Type | Default | Description |
|
|
100
|
+
| ------------ | ------------------------------------------------------------------------------ | ---------------------------------------------------------- | ----------------------------------------------------------------------------------------------- |
|
|
101
|
+
| `tools` | `Array<"resize" \| "crop" \| "presetCrop" \| "flip" \| "rotate" \| "filters">` | `["resize","crop","presetCrop","flip","rotate","filters"]` | Tools to show in the sidebar. Use an empty array to disable editing. |
|
|
102
|
+
| `infobar` | `boolean` | `false` | Show the image info panel below the canvas. |
|
|
103
|
+
| `quality` | `number` | `0.85` | Output compression quality (`0`–`1`) for JPEG/WebP. |
|
|
104
|
+
| `saveAsWEBP` | `boolean` | `false` | Encode the final image as WebP. |
|
|
105
|
+
| `exportAs` | `"blob" \| "base64"` | `"blob"` | Pass the result to `onSave` as a `Blob` or as a base64 data URI (`data:<mimeType>;base64,...`). |
|
|
103
106
|
|
|
104
107
|
## Widget CDN
|
|
105
108
|
|
|
@@ -108,7 +111,7 @@ For non-React environments, use the standalone UMD widget from a CDN. See [`READ
|
|
|
108
111
|
Pin to a specific version in production:
|
|
109
112
|
|
|
110
113
|
```html
|
|
111
|
-
<script src="https://cdn.jsdelivr.net/npm/pixedi@1.0
|
|
114
|
+
<script src="https://cdn.jsdelivr.net/npm/pixedi@1.3.0/dist/widget/pixedi-widget.js"></script>
|
|
112
115
|
```
|
|
113
116
|
|
|
114
117
|
For the latest version (use only for testing):
|