@blocklet/editor 2.4.83 → 2.4.85

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.
@@ -363,7 +363,7 @@ function SimpleImageComponent({ src, altText = '', width, height, }) {
363
363
  useMediumZoom(imageRef);
364
364
  const renderSkeleton = () => {
365
365
  if (hasFixedSize) {
366
- return (_jsx(Box, { sx: { position: 'relative', height: 0, pt: `${100 / (width / height)}%`, maxWidth: width }, children: _jsx(Skeleton, { variant: "rectangular", animation: "wave", sx: { position: 'absolute', top: 0, left: 0, width: '100%', height: '100%', borderRadius: 1 } }) }));
366
+ return (_jsx(Box, { sx: { position: 'relative', height: 0, pt: `${100 / (width / height)}%`, maxWidth: width, mx: 'auto' }, children: _jsx(Skeleton, { variant: "rectangular", animation: "wave", sx: { position: 'absolute', top: 0, left: 0, width: '100%', height: '100%', borderRadius: 1 } }) }));
367
367
  }
368
368
  return _jsx(Skeleton, { variant: "rectangular", animation: "wave", sx: { width: 300, height: 200, borderRadius: 1 } });
369
369
  };
@@ -372,8 +372,8 @@ function SimpleImageComponent({ src, altText = '', width, height, }) {
372
372
  border: 1,
373
373
  borderColor: 'divider',
374
374
  borderRadius: 2,
375
- visibility: loaded ? 'visible' : 'hidden',
376
- ...(hasFixedSize && { maxWidth: width }),
375
+ display: loaded ? 'block' : 'none',
376
+ ...(hasFixedSize && { maxWidth: width, mx: 'auto' }),
377
377
  }, children: _jsx(Box, { component: "img", src: src, alt: altText || '', onLoad: () => {
378
378
  setLoaded(true);
379
379
  }, sx: { width, height }, ref: imageRef }) })] }));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blocklet/editor",
3
- "version": "2.4.83",
3
+ "version": "2.4.85",
4
4
  "main": "lib/index.js",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -71,7 +71,7 @@
71
71
  "ufo": "^1.5.4",
72
72
  "url-join": "^4.0.1",
73
73
  "zustand": "^4.5.5",
74
- "@blocklet/pdf": "2.4.83"
74
+ "@blocklet/pdf": "2.4.85"
75
75
  },
76
76
  "devDependencies": {
77
77
  "@babel/core": "^7.25.2",