@haklex/rich-plugin-image-editor 0.61.0 → 0.62.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.
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { ImageEditPrivacy } from '@haklex/rich-editor/plugins';
|
|
2
2
|
import { FC } from 'react';
|
|
3
3
|
export interface ImageEditModalPluginProps {
|
|
4
|
+
allowKeepOriginal?: boolean;
|
|
4
5
|
privacy?: ImageEditPrivacy;
|
|
5
6
|
}
|
|
6
7
|
export declare const ImageEditModalPlugin: FC<ImageEditModalPluginProps>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ImageEditModalPlugin.d.ts","sourceRoot":"","sources":["../src/ImageEditModalPlugin.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAEV,gBAAgB,EAEjB,MAAM,6BAA6B,CAAC;AAQrC,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAOhC,MAAM,WAAW,yBAAyB;IACxC,OAAO,CAAC,EAAE,gBAAgB,CAAC;CAC5B;AAED,eAAO,MAAM,oBAAoB,EAAE,EAAE,CAAC,yBAAyB,
|
|
1
|
+
{"version":3,"file":"ImageEditModalPlugin.d.ts","sourceRoot":"","sources":["../src/ImageEditModalPlugin.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAEV,gBAAgB,EAEjB,MAAM,6BAA6B,CAAC;AAQrC,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAOhC,MAAM,WAAW,yBAAyB;IACxC,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,OAAO,CAAC,EAAE,gBAAgB,CAAC;CAC5B;AAED,eAAO,MAAM,oBAAoB,EAAE,EAAE,CAAC,yBAAyB,CA6E9D,CAAC"}
|
package/dist/index.mjs
CHANGED
|
@@ -1077,13 +1077,15 @@ var ImageEditModal = ({ file, onCancel, onConfirm }) => {
|
|
|
1077
1077
|
};
|
|
1078
1078
|
//#endregion
|
|
1079
1079
|
//#region src/ImageEditModalPlugin.tsx
|
|
1080
|
-
var ImageEditModalPlugin = ({ privacy }) => {
|
|
1080
|
+
var ImageEditModalPlugin = ({ allowKeepOriginal, privacy }) => {
|
|
1081
1081
|
const preprocess = useImagePreprocess();
|
|
1082
1082
|
const portalTheme = usePortalTheme();
|
|
1083
1083
|
const portalThemeRef = useRef(portalTheme);
|
|
1084
1084
|
portalThemeRef.current = portalTheme;
|
|
1085
1085
|
const privacyRef = useRef(privacy);
|
|
1086
1086
|
privacyRef.current = privacy;
|
|
1087
|
+
const allowKeepOriginalRef = useRef(allowKeepOriginal);
|
|
1088
|
+
allowKeepOriginalRef.current = allowKeepOriginal;
|
|
1087
1089
|
useEffect(() => {
|
|
1088
1090
|
if (!preprocess) return;
|
|
1089
1091
|
const edit = (file) => new Promise((resolve) => {
|
|
@@ -1113,6 +1115,9 @@ var ImageEditModalPlugin = ({ privacy }) => {
|
|
|
1113
1115
|
});
|
|
1114
1116
|
});
|
|
1115
1117
|
const capability = {
|
|
1118
|
+
get allowKeepOriginal() {
|
|
1119
|
+
return allowKeepOriginalRef.current;
|
|
1120
|
+
},
|
|
1116
1121
|
edit,
|
|
1117
1122
|
get privacy() {
|
|
1118
1123
|
return privacyRef.current;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@haklex/rich-plugin-image-editor",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.62.0",
|
|
4
4
|
"description": "Pre-upload image edit modal plugin (crop + annotate)",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -37,9 +37,9 @@
|
|
|
37
37
|
"vite": "^8.3.5"
|
|
38
38
|
},
|
|
39
39
|
"peerDependencies": {
|
|
40
|
-
"@haklex/rich-editor": "^0.
|
|
41
|
-
"@haklex/rich-editor-ui": "^0.
|
|
42
|
-
"@haklex/rich-style-token": "^0.
|
|
40
|
+
"@haklex/rich-editor": "^0.62.0",
|
|
41
|
+
"@haklex/rich-editor-ui": "^0.62.0",
|
|
42
|
+
"@haklex/rich-style-token": "^0.62.0",
|
|
43
43
|
"lucide-react": "^1.0.0",
|
|
44
44
|
"react": ">=19",
|
|
45
45
|
"react-dom": ">=19"
|