@byline/richtext-lexical 1.6.2 → 1.7.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.
|
@@ -43,8 +43,8 @@ const InlineImageModal = ({ isOpen, collection, data: dataFromProps, onSubmit, o
|
|
|
43
43
|
const pickedThumbUrl = useMemo(()=>{
|
|
44
44
|
if (!pickedImage?.storageUrl) return null;
|
|
45
45
|
if ('image/svg+xml' === pickedImage.mimeType) return pickedImage.storageUrl;
|
|
46
|
-
|
|
47
|
-
return pickedImage.storageUrl;
|
|
46
|
+
const thumbVariant = pickedImage.variants?.find((v)=>'thumbnail' === v.name);
|
|
47
|
+
return thumbVariant?.storageUrl ?? pickedImage.storageUrl;
|
|
48
48
|
}, [
|
|
49
49
|
pickedImage
|
|
50
50
|
]);
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"private": false,
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "MPL-2.0",
|
|
6
|
-
"version": "1.
|
|
6
|
+
"version": "1.7.0",
|
|
7
7
|
"engines": {
|
|
8
8
|
"node": ">=20.9.0"
|
|
9
9
|
},
|
|
@@ -71,9 +71,9 @@
|
|
|
71
71
|
"npm-run-all": "^4.1.5",
|
|
72
72
|
"prism-react-renderer": "^2.4.1",
|
|
73
73
|
"react-error-boundary": "^6.1.1",
|
|
74
|
-
"@byline/
|
|
75
|
-
"@byline/core": "1.
|
|
76
|
-
"@byline/
|
|
74
|
+
"@byline/client": "1.7.0",
|
|
75
|
+
"@byline/core": "1.7.0",
|
|
76
|
+
"@byline/ui": "1.7.0"
|
|
77
77
|
},
|
|
78
78
|
"peerDependencies": {
|
|
79
79
|
"react": "^19.0.0",
|
|
@@ -94,10 +94,8 @@ export const InlineImageModal: React.FC<InlineImageModalProps> = ({
|
|
|
94
94
|
const pickedThumbUrl: string | null = useMemo(() => {
|
|
95
95
|
if (!pickedImage?.storageUrl) return null
|
|
96
96
|
if (pickedImage.mimeType === 'image/svg+xml') return pickedImage.storageUrl
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
}
|
|
100
|
-
return pickedImage.storageUrl
|
|
97
|
+
const thumbVariant = pickedImage.variants?.find((v) => v.name === 'thumbnail')
|
|
98
|
+
return thumbVariant?.storageUrl ?? pickedImage.storageUrl
|
|
101
99
|
}, [pickedImage])
|
|
102
100
|
|
|
103
101
|
const pickedTitle: string | null = useMemo(() => {
|