@marvalt/wparser 0.1.48 → 0.1.49

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.esm.js CHANGED
@@ -2436,8 +2436,11 @@ const Heading = ({ block, children, context }) => {
2436
2436
  const spacingClass = getHeadingSpacing(context.spacingConfig || context.registry.spacingConfig, level);
2437
2437
  // Extract text color if specified, otherwise fall back to heading var (set by dstyler) or inherit
2438
2438
  const textColor = extractTextColor(block, context);
2439
+ const isFallbackHeadingColor = !textColor;
2439
2440
  const textColorClass = textColor || 'text-[var(--dstyler-color-heading)]';
2440
- return (jsxRuntimeExports.jsx(Tag, { className: buildClassName('font-bold', textColorClass, sizeClass, textAlign, spacingClass), children: children ?? content }));
2441
+ // Inline style ensures heading color wins over inherited parent text classes
2442
+ const inlineStyle = isFallbackHeadingColor ? { color: 'var(--dstyler-color-heading)' } : undefined;
2443
+ return (jsxRuntimeExports.jsx(Tag, { className: buildClassName('font-bold', textColorClass, sizeClass, textAlign, spacingClass), style: inlineStyle, children: children ?? content }));
2441
2444
  };
2442
2445
  const Image = ({ block, context }) => {
2443
2446
  const imageAttrs = getImageAttributes(block);