@blocklet/editor 2.4.73 → 2.4.75
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.
|
@@ -360,7 +360,13 @@ function SimpleImageComponent({ src, altText = '', width, height, }) {
|
|
|
360
360
|
const [loaded, setLoaded] = useState(false);
|
|
361
361
|
const imageRef = useRef(null);
|
|
362
362
|
useMediumZoom(imageRef);
|
|
363
|
-
|
|
363
|
+
const renderSkeleton = () => {
|
|
364
|
+
if (typeof width === 'number' && typeof height === 'number' && width > 0 && height > 0) {
|
|
365
|
+
return (_jsx(Box, { sx: { position: 'relative', height: 0, pt: `${100 / (width / height)}%` }, children: _jsx(Skeleton, { variant: "rectangular", animation: "wave", sx: { position: 'absolute', top: 0, left: 0, width: '100%', height: '100%', borderRadius: 1 } }) }));
|
|
366
|
+
}
|
|
367
|
+
return _jsx(Skeleton, { variant: "rectangular", animation: "wave", sx: { width: 300, height: 200, borderRadius: 1 } });
|
|
368
|
+
};
|
|
369
|
+
return (_jsxs(_Fragment, { children: [!loaded && renderSkeleton(), _jsx(Box, { sx: {
|
|
364
370
|
p: 1,
|
|
365
371
|
border: 1,
|
|
366
372
|
borderColor: 'divider',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@blocklet/editor",
|
|
3
|
-
"version": "2.4.
|
|
3
|
+
"version": "2.4.75",
|
|
4
4
|
"main": "lib/index.js",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -24,11 +24,11 @@
|
|
|
24
24
|
]
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@blocklet/code-editor": "^0.5.
|
|
27
|
+
"@blocklet/code-editor": "^0.5.16",
|
|
28
28
|
"@blocklet/embed": "^0.2.5",
|
|
29
|
-
"@blocklet/js-sdk": "^1.16.
|
|
30
|
-
"@blocklet/pages-kit": "^0.6.
|
|
31
|
-
"@blocklet/pages-kit-runtime": "^0.6.
|
|
29
|
+
"@blocklet/js-sdk": "^1.16.51",
|
|
30
|
+
"@blocklet/pages-kit": "^0.6.66",
|
|
31
|
+
"@blocklet/pages-kit-runtime": "^0.6.66",
|
|
32
32
|
"@excalidraw/excalidraw": "^0.18.0",
|
|
33
33
|
"@iconify/iconify": "^3.1.1",
|
|
34
34
|
"@iconify/icons-tabler": "^1.2.95",
|
|
@@ -70,7 +70,7 @@
|
|
|
70
70
|
"ufo": "^1.5.4",
|
|
71
71
|
"url-join": "^4.0.1",
|
|
72
72
|
"zustand": "^4.5.5",
|
|
73
|
-
"@blocklet/pdf": "2.4.
|
|
73
|
+
"@blocklet/pdf": "2.4.75"
|
|
74
74
|
},
|
|
75
75
|
"devDependencies": {
|
|
76
76
|
"@babel/core": "^7.25.2",
|