@marvalt/wparser 0.1.19 → 0.1.20

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.
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,sBAAsB,CAAC;AACrC,cAAc,wBAAwB,CAAC;AACvC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,mBAAmB,CAAC;AAClC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,yBAAyB,CAAC;AACxC,cAAc,yBAAyB,CAAC;AACxC,cAAc,0BAA0B,CAAC;AACzC,OAAO,EAAE,2BAA2B,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAC7F,cAAc,qBAAqB,CAAC;AACpC,cAAc,kBAAkB,CAAC;AACjC,cAAc,wBAAwB,CAAC;AACvC,cAAc,yBAAyB,CAAC;AACxC,OAAO,EACL,2BAA2B,EAC3B,8BAA8B,EAC9B,6BAA6B,EAC7B,iCAAiC,EACjC,+BAA+B,EAC/B,+BAA+B,EAC/B,oBAAoB,GACrB,MAAM,yBAAyB,CAAC;AACjC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,6BAA6B,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,sBAAsB,CAAC;AACrC,cAAc,wBAAwB,CAAC;AACvC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,mBAAmB,CAAC;AAClC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,yBAAyB,CAAC;AACxC,cAAc,yBAAyB,CAAC;AACxC,cAAc,0BAA0B,CAAC;AACzC,OAAO,EAAE,2BAA2B,EAAE,oBAAoB,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAClH,cAAc,qBAAqB,CAAC;AACpC,cAAc,kBAAkB,CAAC;AACjC,cAAc,wBAAwB,CAAC;AACvC,cAAc,yBAAyB,CAAC;AACxC,OAAO,EACL,2BAA2B,EAC3B,8BAA8B,EAC9B,6BAA6B,EAC7B,iCAAiC,EACjC,+BAA+B,EAC/B,+BAA+B,EAC/B,oBAAoB,GACrB,MAAM,yBAAyB,CAAC;AACjC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,6BAA6B,CAAC"}
package/dist/index.esm.js CHANGED
@@ -1909,7 +1909,7 @@ const ButtonBlock = ({ block }) => {
1909
1909
  // Handle internal vs external links
1910
1910
  const isExternal = url && (url.startsWith('http://') || url.startsWith('https://'));
1911
1911
  const linkProps = isExternal ? { target: '_blank', rel: 'noopener noreferrer' } : {};
1912
- return (jsxRuntimeExports.jsx("a", { href: url || '#', className: "inline-flex items-center justify-center rounded-md bg-primary px-6 py-3 text-white font-medium hover:bg-primary/90 transition-colors", ...linkProps, children: buttonText }));
1912
+ return (jsxRuntimeExports.jsx("a", { href: url || '#', className: "inline-flex items-center justify-center rounded-md bg-primary px-6 py-3 text-primary-foreground font-medium hover:bg-primary/90 transition-colors", ...linkProps, children: buttonText }));
1913
1913
  };
1914
1914
  const Cover = ({ block, children }) => {
1915
1915
  const attrs = block.attributes || {};
@@ -1985,28 +1985,17 @@ const MediaText = ({ block, children, context }) => {
1985
1985
  // Content is all other children
1986
1986
  const contentElements = childrenArray.filter((_, index) => index !== mediaBlockIndex);
1987
1987
  // Build alignment classes - ensure proper container width
1988
- // For 'wide', check if we're inside a constrained group context
1989
- // If innerBlocks contain a group with constrained layout, the parent likely has constrained layout too
1990
- // In that case, use w-full to fill the parent container (which is already boxed)
1991
- // Otherwise, use max-w-7xl for standalone wide blocks
1988
+ // For 'wide', media-text blocks are typically inside constrained groups (which use 'container' class)
1989
+ // So we should use 'w-full' to fill the parent container, not apply another max-width
1990
+ // Only use 'max-w-7xl' for truly standalone wide blocks (rare case)
1992
1991
  let alignClass;
1993
1992
  if (align === 'full') {
1994
1993
  alignClass = 'w-full';
1995
1994
  }
1996
1995
  else if (align === 'wide') {
1997
- // Check if media-text content is wrapped in a constrained group
1998
- // This indicates the block is in a constrained layout context
1999
- // In that case, fill the parent container (which is already boxed) rather than applying another container
2000
- const hasConstrainedGroup = innerBlocks.some((b) => {
2001
- if (b.name === 'core/group') {
2002
- const groupLayout = b.attributes?.layout;
2003
- return groupLayout?.type === 'constrained';
2004
- }
2005
- return false;
2006
- });
2007
- // If we have a constrained group in innerBlocks, use w-full to fill parent container
2008
- // Otherwise, use max-w-7xl for standalone wide blocks
2009
- alignClass = hasConstrainedGroup ? 'w-full' : 'max-w-7xl mx-auto';
1996
+ // Default to w-full for wide blocks (they're usually inside constrained containers)
1997
+ // This ensures they fill the parent container which is already boxed
1998
+ alignClass = 'w-full';
2010
1999
  }
2011
2000
  else {
2012
2001
  // Default to contained width (not full width)