@getcoherent/cli 0.3.11 → 0.3.12
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.js +11 -3
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -4520,7 +4520,7 @@ WIDTH CONSISTENCY (CRITICAL \u2014 prevents visual mismatch between header and c
|
|
|
4520
4520
|
- ALL page content MUST use the same width constraint: wrap the outermost element in <main className="mx-auto max-w-7xl px-4 sm:px-6 lg:px-8 py-6">.
|
|
4521
4521
|
- Landing/marketing pages: each <section> is full-width for backgrounds, but inner content uses "mx-auto max-w-6xl" or similar.
|
|
4522
4522
|
- NEVER use max-w-4xl or smaller for the page wrapper \u2014 it makes the page look narrower than the header.
|
|
4523
|
-
-
|
|
4523
|
+
- NEVER add inner centering wrappers like <div className="max-w-4xl mx-auto"> inside the page. All content (title, cards, forms) must flow within the same max-w-7xl container so everything aligns to the same left edge.
|
|
4524
4524
|
- NEVER have page content at full width while header/footer are constrained \u2014 this looks broken.
|
|
4525
4525
|
|
|
4526
4526
|
PAGE CONTENT (CRITICAL \u2014 prevents empty or duplicate pages):
|
|
@@ -7182,8 +7182,16 @@ function enforceWidthWrapper(code, route) {
|
|
|
7182
7182
|
if (!isAuthPage) {
|
|
7183
7183
|
const before = result;
|
|
7184
7184
|
result = result.replace(
|
|
7185
|
-
/(<div\s+className="[^"]
|
|
7186
|
-
"$
|
|
7185
|
+
/(<div\s+className="[^"]*)\bmax-w-(xs|sm|md|lg|xl|2xl|3xl|4xl|5xl|6xl)\b/g,
|
|
7186
|
+
"$1"
|
|
7187
|
+
);
|
|
7188
|
+
result = result.replace(
|
|
7189
|
+
/(<div\s+className="[^"]*)\bmx-auto\b/g,
|
|
7190
|
+
"$1"
|
|
7191
|
+
);
|
|
7192
|
+
result = result.replace(
|
|
7193
|
+
/className="([^"]*)"/g,
|
|
7194
|
+
(_, classes) => `className="${classes.replace(/\s{2,}/g, " ").trim()}"`
|
|
7187
7195
|
);
|
|
7188
7196
|
if (result !== before) didFix = true;
|
|
7189
7197
|
}
|