@morphika/andami 0.1.6 → 0.1.7

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.
@@ -208,6 +208,7 @@ function buildBlockAlignOverrideRules(
208
208
  rules.push("width:100%!important");
209
209
  } else {
210
210
  rules.push("width:auto!important");
211
+ rules.push("max-width:100%!important");
211
212
  }
212
213
  }
213
214
 
@@ -281,7 +281,7 @@ export default function SectionV2Renderer({ section, pageEnterAnimation }: Secti
281
281
  const alignStyles = hasBlockAlignment(blockLayout) ? getBlockAlignmentStyles(blockLayout) : undefined;
282
282
  const hasHAlign = blockLayout?.align_h && blockLayout.align_h !== "left";
283
283
  return (
284
- <div key={block._key} className={`blk-wrap-${block._key}`} style={{ ...(!hasHAlign ? { width: "100%" } : {}), minWidth: 0, ...alignStyles }}>
284
+ <div key={block._key} className={`blk-wrap-${block._key}`} style={{ ...(!hasHAlign ? { width: "100%" } : { width: "auto", maxWidth: "100%" }), minWidth: 0, ...alignStyles }}>
285
285
  <BlockRenderer
286
286
  block={block}
287
287
  columnEnterAnimation={col.enter_animation}
@@ -85,7 +85,10 @@ export default function TextBlockRenderer({ block }: { block: TextBlock }) {
85
85
  const { className, style } = getTextBlockStyles(block);
86
86
 
87
87
  return (
88
- <div className={`${className} space-y-[0.75em]`} style={style}>
88
+ <div
89
+ className={`${className} space-y-[0.75em]`}
90
+ style={{ overflowWrap: "break-word", wordBreak: "break-word", minWidth: 0, ...style }}
91
+ >
89
92
  <PortableText value={block.text} />
90
93
  </div>
91
94
  );
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@morphika/andami",
3
- "version": "0.1.6",
3
+ "version": "0.1.7",
4
4
  "description": "Visual Page Builder — core library. A reusable website builder with visual editing, CMS integration, and asset management.",
5
5
  "type": "module",
6
6
  "license": "MIT",
package/styles/base.css CHANGED
@@ -57,6 +57,17 @@ body {
57
57
  overflow-x: clip;
58
58
  }
59
59
 
60
+ /* Prevent text overflow in grid columns on narrow viewports */
61
+ [data-site] p,
62
+ [data-site] h1,
63
+ [data-site] h2,
64
+ [data-site] h3,
65
+ [data-site] h4,
66
+ [data-site] span {
67
+ overflow-wrap: break-word;
68
+ word-break: break-word;
69
+ }
70
+
60
71
  [data-custom-cursor] {
61
72
  cursor: none;
62
73
  }