@redneckz/wildless-cms-uni-blocks 0.14.110 → 0.14.111
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.
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { clearImage, deleteEmptyProps, traversePageBlocks } from '../utils.js';
|
|
2
|
+
|
|
3
|
+
export const description = 'v0.14.111';
|
|
4
|
+
|
|
5
|
+
export default traversePageBlocks(adjustClearBlock);
|
|
6
|
+
|
|
7
|
+
function adjustClearBlock(block) {
|
|
8
|
+
if (block?.content) {
|
|
9
|
+
block.content = deleteEmptyProps(block?.content);
|
|
10
|
+
block.content = clearImage(block.content);
|
|
11
|
+
}
|
|
12
|
+
}
|
package/bin/utils.js
CHANGED
|
@@ -70,6 +70,16 @@ export function clearIcon(obj, prop = 'icon') {
|
|
|
70
70
|
}
|
|
71
71
|
}
|
|
72
72
|
|
|
73
|
+
export function clearImage(obj) {
|
|
74
|
+
const image = obj?.image;
|
|
75
|
+
if (!image?.src && !image?.icon) {
|
|
76
|
+
deleteProp(obj, 'image');
|
|
77
|
+
deleteProp(obj, 'iconVersion');
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
return obj;
|
|
81
|
+
}
|
|
82
|
+
|
|
73
83
|
export const traversePageBlocks =
|
|
74
84
|
(...handlers) =>
|
|
75
85
|
(uniPath, content, parent) => {
|
package/bundle/bundle.umd.js
CHANGED
|
@@ -5796,7 +5796,7 @@
|
|
|
5796
5796
|
return (jsx("div", { className: "flex items-end absolute bottom-0 right-0 h-full pointer-events-none", children: jsx(LikeControl, { className: "rounded-tl-3xl sticky bottom-0 pointer-events-auto" }) }));
|
|
5797
5797
|
}
|
|
5798
5798
|
|
|
5799
|
-
const packageVersion = "0.14.
|
|
5799
|
+
const packageVersion = "0.14.110";
|
|
5800
5800
|
|
|
5801
5801
|
exports.Blocks = Blocks;
|
|
5802
5802
|
exports.ContentPage = ContentPage;
|