@marvalt/wparser 0.1.71 → 0.1.72
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.
- package/dist/index.cjs +8 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.esm.js +8 -2
- package/dist/index.esm.js.map +1 -1
- package/dist/utils/blockExtractors.d.ts +1 -0
- package/dist/utils/blockExtractors.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1886,12 +1886,18 @@ function extractAlignment(block) {
|
|
|
1886
1886
|
}
|
|
1887
1887
|
/**
|
|
1888
1888
|
* Extract overlay color from cover block
|
|
1889
|
+
* Checks both customOverlayColor (hex) and overlayColor (theme color name)
|
|
1889
1890
|
*/
|
|
1890
1891
|
function extractOverlayColor(block) {
|
|
1891
1892
|
const attrs = block.attributes || {};
|
|
1893
|
+
// Priority: customOverlayColor (hex) > overlayColor (theme color name)
|
|
1894
|
+
const customOverlayColor = attrs['customOverlayColor'];
|
|
1895
|
+
if (typeof customOverlayColor === 'string' && customOverlayColor.trim()) {
|
|
1896
|
+
return customOverlayColor.trim();
|
|
1897
|
+
}
|
|
1892
1898
|
const overlayColor = attrs['overlayColor'];
|
|
1893
|
-
if (typeof overlayColor === 'string') {
|
|
1894
|
-
return overlayColor;
|
|
1899
|
+
if (typeof overlayColor === 'string' && overlayColor.trim()) {
|
|
1900
|
+
return overlayColor.trim();
|
|
1895
1901
|
}
|
|
1896
1902
|
return null;
|
|
1897
1903
|
}
|