@garagem-ai/site-sdk 0.4.7 → 0.4.8

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/README.md CHANGED
@@ -269,7 +269,7 @@ import { SearchPage, ResultsSkeleton } from "@garagem-ai/site-sdk/react";
269
269
 
270
270
  export default function ImoveisPage() {
271
271
  return (
272
- <main className="w-full">
272
+ <main className="w-full pt-4 pb-12">
273
273
  <div className="mx-auto w-full max-w-site px-4">
274
274
  <Suspense fallback={<ResultsSkeleton />}>
275
275
  <SearchPage
package/dist/index.d.mts CHANGED
@@ -393,6 +393,10 @@ declare const STUDIO_SITE_LAYOUT: {
393
393
  readonly maxWidthRem: "80rem";
394
394
  readonly maxWidthRemOptions: readonly ["64rem", "80rem", "120rem", "160rem", "240rem"];
395
395
  readonly surfaceClassName: "w-full";
396
+ /** Editor search `<main>` default. Designs may change the spacing values. */
397
+ readonly searchMainClassName: "w-full pt-4 pb-12";
398
+ /** Opt out of default search spacing — flush against the header on purpose. */
399
+ readonly searchFlushMarker: "data-studio-search-spacing=\"flush\"";
396
400
  readonly wrapperClassName: "mx-auto w-full max-w-site px-4";
397
401
  };
398
402
  declare function studioSiteWidthCss(): string;
package/dist/index.d.ts CHANGED
@@ -393,6 +393,10 @@ declare const STUDIO_SITE_LAYOUT: {
393
393
  readonly maxWidthRem: "80rem";
394
394
  readonly maxWidthRemOptions: readonly ["64rem", "80rem", "120rem", "160rem", "240rem"];
395
395
  readonly surfaceClassName: "w-full";
396
+ /** Editor search `<main>` default. Designs may change the spacing values. */
397
+ readonly searchMainClassName: "w-full pt-4 pb-12";
398
+ /** Opt out of default search spacing — flush against the header on purpose. */
399
+ readonly searchFlushMarker: "data-studio-search-spacing=\"flush\"";
396
400
  readonly wrapperClassName: "mx-auto w-full max-w-site px-4";
397
401
  };
398
402
  declare function studioSiteWidthCss(): string;
package/dist/index.js CHANGED
@@ -1743,6 +1743,10 @@ var STUDIO_SITE_LAYOUT = {
1743
1743
  maxWidthRem: "80rem",
1744
1744
  maxWidthRemOptions: ["64rem", "80rem", "120rem", "160rem", "240rem"],
1745
1745
  surfaceClassName: "w-full",
1746
+ /** Editor search `<main>` default. Designs may change the spacing values. */
1747
+ searchMainClassName: "w-full pt-4 pb-12",
1748
+ /** Opt out of default search spacing — flush against the header on purpose. */
1749
+ searchFlushMarker: 'data-studio-search-spacing="flush"',
1746
1750
  wrapperClassName: "mx-auto w-full max-w-site px-4"
1747
1751
  };
1748
1752
  function studioSiteWidthCss() {
@@ -1759,10 +1763,10 @@ function studioLayoutInstruction() {
1759
1763
  \`\`\`css
1760
1764
  ${studioSiteWidthCss()}
1761
1765
  \`\`\`
1762
- Every page section is two layers: (1) surface \u2014 \`section\` / header / footer \`${STUDIO_SITE_LAYOUT.surfaceClassName}\`, background to the viewport edges, no max-width class and no horizontal padding; (2) wrapper \u2014 one child \`${STUDIO_SITE_LAYOUT.wrapperClassName}\`. Header and footer use that same inner wrapper. Components fill the wrapper (\`w-full\`). Never nest a second max-width container with extra horizontal padding. ${studioSearchLandmarkInstruction()} Do not use \`ml-auto\` on the content wrapper. To make the site narrower or wider, change ONLY \`--site-max-width\` in \`app/globals.css\` (allowed: ${scale}; default ${STUDIO_SITE_LAYOUT.maxWidthRem}). Do not edit wrapper class names, padding, or per-page containers.`;
1766
+ Every page section is two layers: (1) surface \u2014 \`section\` / header / footer \`${STUDIO_SITE_LAYOUT.surfaceClassName}\`, background to the viewport edges, no max-width class and no horizontal padding; (2) wrapper \u2014 one child \`${STUDIO_SITE_LAYOUT.wrapperClassName}\`. Header and footer use that same inner wrapper. Components fill the wrapper (\`w-full\`). Never nest a second max-width container with extra horizontal padding. ${studioSearchLandmarkInstruction()} Do not use \`ml-auto\` on the content wrapper. To make the site narrower or wider, change ONLY \`--site-max-width\` in \`app/globals.css\` (allowed: ${scale}; default ${STUDIO_SITE_LAYOUT.maxWidthRem}). Do not edit wrapper class names or horizontal padding. Full-bleed image surfaces (home hero, listing gallery) stay flush with the header \u2014 do not add vertical padding there.`;
1763
1767
  }
1764
1768
  function studioSearchLandmarkInstruction() {
1765
- return `Search at \`/imoveis\` (hard rule). The page landmark is \`<main className="${STUDIO_SITE_LAYOUT.surfaceClassName}">\` with one child \`${STUDIO_SITE_LAYOUT.wrapperClassName}\`. Pass \`as="div"\` to \`SearchPage\` so it is not a second main. Do not wrap \`SearchPage\` in \`<section>\`. The wrapper has no extra vertical padding class.`;
1769
+ return `Search at \`/imoveis\` (hard rule). The page landmark is \`<main className="${STUDIO_SITE_LAYOUT.searchMainClassName}">\` with one child \`${STUDIO_SITE_LAYOUT.wrapperClassName}\`. Pass \`as="div"\` to \`SearchPage\` so it is not a second main. Do not wrap \`SearchPage\` in \`<section>\`. Do not put vertical padding on SearchPage. \`pt-4 pb-12\` is the default on that search \`<main>\` \u2014 change those values if the design needs it. Flush search (glued to the header) is allowed only with \`${STUDIO_SITE_LAYOUT.searchFlushMarker}\` on that \`<main>\`. Never add that vertical padding to home heroes or listing galleries.`;
1766
1770
  }
1767
1771
  var REACT_SDK_NAMED_IMPORT_RE = /(?:^|[\n;])\s*import\s+(?!type\b)(?:type\s+)?\{([^}]+)\}\s+from\s+['"]@garagem-ai\/site-sdk\/react['"]/g;
1768
1772
  var SHOWCASE_LEADS_POST_URL_RE = /\/api\/sites\/[^\s"']*\/leads(?!\/ui)/;