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 CHANGED
@@ -2,6 +2,14 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file.
4
4
 
5
+ ## 1.5.0
6
+
7
+ - Add SurfaceTool component.
8
+
9
+ ## 1.4.0
10
+
11
+ - Add tooltip component.
12
+
5
13
  ## 1.3.0
6
14
 
7
15
  - Refactor sidebar.
package/README.md CHANGED
@@ -88,18 +88,21 @@ function AppBase64() {
88
88
 
89
89
  | Prop | Type | Description |
90
90
  | ---------- | -------------------------------------------------- | --------------------------------------------------------------------------------------------- |
91
- | `image` | `string` | URL or base64 data URI of the image to edit. |
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 | Default | Description |
99
- | ------------ | -------------------- | -------- | ----------------------------------------------------------------------------------------------- |
100
- | `quality` | `number` | `0.85` | Output compression quality (`0`–`1`) for JPEG/WebP. |
101
- | `saveAsWEBP` | `boolean` | `false` | Encode the final image as WebP. |
102
- | `exportAs` | `"blob" \| "base64"` | `"blob"` | Pass the result to `onSave` as a `Blob` or as a base64 data URI (`data:<mimeType>;base64,...`). |
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.6/dist/widget/pixedi-widget.js"></script>
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` | URL or base64 data URI of the image to edit. |
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 | Default | Description |
99
- | ------------ | -------------------- | -------- | ----------------------------------------------------------------------------------------------- |
100
- | `quality` | `number` | `0.85` | Output compression quality (`0`–`1`) for JPEG/WebP. |
101
- | `saveAsWEBP` | `boolean` | `false` | Encode the final image as WebP. |
102
- | `exportAs` | `"blob" \| "base64"` | `"blob"` | Pass the result to `onSave` as a `Blob` or as a base64 data URI (`data:<mimeType>;base64,...`). |
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.6/dist/widget/pixedi-widget.js"></script>
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):