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