@garagem-ai/site-sdk 0.4.6 → 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 +14 -6
- package/dist/index.d.mts +23 -3
- package/dist/index.d.ts +23 -3
- package/dist/index.js +41 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +37 -3
- package/dist/index.mjs.map +1 -1
- package/dist/react.d.mts +5 -2
- package/dist/react.d.ts +5 -2
- package/dist/react.js +7 -5
- package/dist/react.js.map +1 -1
- package/dist/react.mjs +7 -5
- package/dist/react.mjs.map +1 -1
- package/package.json +1 -1
- package/src/index.ts +4 -0
- package/src/react/search-chrome.tsx +4 -2
- package/src/react/search-page.tsx +5 -2
- package/src/react/search.css +0 -6
- package/src/react/styles/search-chrome-css.generated.ts +2 -2
- package/src/studio-contract.ts +43 -3
package/README.md
CHANGED
|
@@ -269,16 +269,24 @@ import { SearchPage, ResultsSkeleton } from "@garagem-ai/site-sdk/react";
|
|
|
269
269
|
|
|
270
270
|
export default function ImoveisPage() {
|
|
271
271
|
return (
|
|
272
|
-
<
|
|
273
|
-
<
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
272
|
+
<main className="w-full pt-4 pb-12">
|
|
273
|
+
<div className="mx-auto w-full max-w-site px-4">
|
|
274
|
+
<Suspense fallback={<ResultsSkeleton />}>
|
|
275
|
+
<SearchPage
|
|
276
|
+
as="div"
|
|
277
|
+
siteId={process.env.NEXT_PUBLIC_GARAGEM_SITE_ID!}
|
|
278
|
+
variant="toolbar"
|
|
279
|
+
/>
|
|
280
|
+
</Suspense>
|
|
281
|
+
</div>
|
|
282
|
+
</main>
|
|
278
283
|
);
|
|
279
284
|
}
|
|
280
285
|
```
|
|
281
286
|
|
|
287
|
+
SearchPage fills its parent. Constrain width with `.max-w-site` and
|
|
288
|
+
`--site-max-width` (`STUDIO_SITE_LAYOUT` — Editor default `80rem` / `px-4`).
|
|
289
|
+
|
|
282
290
|
`variant` is `toolbar` (default), `dialog`, or `sidebar`. Customize with
|
|
283
291
|
CSS variables (`SEARCH_CSS_VARS` / `SEARCH_CSS_RECIPE` in `globals.css`),
|
|
284
292
|
`classNames`, `icons`, and `data-slot`. Home and search should share
|
package/dist/index.d.mts
CHANGED
|
@@ -359,9 +359,10 @@ declare const STUDIO_SDK_CONTRACT: {
|
|
|
359
359
|
/**
|
|
360
360
|
* Exact pin for generated Studio sites. Must be ≥ `selfInjectSince` so
|
|
361
361
|
* prompts that skip the layout chrome tag match the tarball v0 installs.
|
|
362
|
-
* 0.4.
|
|
362
|
+
* 0.4.7 lets SearchPage fill the site wrapper (`as="div"`) with no
|
|
363
|
+
* nested 80rem inset and no padding on the search slot.
|
|
363
364
|
*/
|
|
364
|
-
readonly minNpmVersion: "0.4.
|
|
365
|
+
readonly minNpmVersion: "0.4.7";
|
|
365
366
|
/** First release where ListingCard and ResultsSkeleton inject the sheet. */
|
|
366
367
|
readonly selfInjectSince: "0.4.2";
|
|
367
368
|
readonly chromeStrategy: "self-inject";
|
|
@@ -382,6 +383,25 @@ declare const STUDIO_SDK_CONTRACT: {
|
|
|
382
383
|
readonly leadExports: readonly ["getLeadUi", "submitVisitLead", "submitContactLead", "slotsForDate", "expandVisitSchedule", "expandVisitTimeSlots", "isVisitSlotAllowed", "STUDIO_DEFAULT_VISIT_SCHEDULE"];
|
|
383
384
|
};
|
|
384
385
|
type StudioSdkContract = typeof STUDIO_SDK_CONTRACT;
|
|
386
|
+
/**
|
|
387
|
+
* Global Studio content width. Mirrors Editor default `7xl` / `px-4`
|
|
388
|
+
* without the Marca picker — v0 sites are not `@garagem/ui`.
|
|
389
|
+
* Rem options match packages/ui `MAX_WIDTH_REM` so a later
|
|
390
|
+
* “make it wider” chat only edits `--site-max-width`.
|
|
391
|
+
*/
|
|
392
|
+
declare const STUDIO_SITE_LAYOUT: {
|
|
393
|
+
readonly maxWidthRem: "80rem";
|
|
394
|
+
readonly maxWidthRemOptions: readonly ["64rem", "80rem", "120rem", "160rem", "240rem"];
|
|
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\"";
|
|
400
|
+
readonly wrapperClassName: "mx-auto w-full max-w-site px-4";
|
|
401
|
+
};
|
|
402
|
+
declare function studioSiteWidthCss(): string;
|
|
403
|
+
declare function studioLayoutInstruction(): string;
|
|
404
|
+
declare function studioSearchLandmarkInstruction(): string;
|
|
385
405
|
declare function hasShowcaseLeadsPostUrl(text: string): boolean;
|
|
386
406
|
declare function coerceNpmVersion(raw: unknown): string | null;
|
|
387
407
|
declare function compareSemver(a: string, b: string): number;
|
|
@@ -504,4 +524,4 @@ interface GaragemClient {
|
|
|
504
524
|
*/
|
|
505
525
|
declare function createGaragemClient(options?: CreateGaragemClientOptions): GaragemClient;
|
|
506
526
|
|
|
507
|
-
export { AppliedSearchChange, AppliedSearchQuery, CmsCollection, CmsEntriesResult, CmsEntry, type ContactLeadInput, type CreateGaragemClientOptions, type FetchLike, type GaragemClient, GaragemSdkError, type GetCmsCollectionOptions, type GetCmsCollectionsOptions, type GetCmsEntriesOptions, type GetCmsEntryOptions, type GetLeadUiOptions, type GetListingOptions, type GetListingsOptions, type GetSearchUiOptions, type GetSimilarListingsOptions, type GetSiteOptions, type HHmm, type LeadContact, type LeadField, type LeadFieldId, LeadSubmitError, type LeadSubmitErrorCode, type LeadSubmitResult, type LeadUi, ListingDetail, ListingFilters, ListingsResult, type LocationFilterInput, QueryListingsFilters, type QueryListingsOptions, QueryListingsParams, QueryListingsResult, RequestNextOptions, type ResolvePublicSiteIdOptions, SEARCH_CSS_RECIPE, SEARCH_CSS_VARS, STUDIO_DEFAULT_VISIT_SCHEDULE, STUDIO_SDK_CONTRACT, STUDIO_SDK_PACKAGE, type SearchListingsOptions, SearchListingsParams, SearchListingsResult, SearchPathFilters, SearchUi, SearchUiDictionary, SimilarListingsResult, Site, type StudioSdkContract, VISIT_TIME_ZONE, type VisitHours, type VisitLeadInput, type VisitSchedule, type VisitScheduleConfig, coerceNpmVersion, compareSemver, composeSearchPublicHref, composeSearchPublicPath, createGaragemClient, expandVisitSchedule, expandVisitTimeSlots, formatAreaM2, formatGroupedInteger, formatListingPrice, getCmsCollection, getCmsCollections, getCmsEntries, getCmsEntry, getLeadUi, getListing, getListings, getSearchUi, getSimilarListings, getSite, hasShowcaseLeadsPostUrl, isStudioPreviewHost, isVisitSlotAllowed, listingBusinessLabel, listingLookupKey, listingPublicPath, mergeAppliedSearchQueryIntoSearch, normalizeVisitDate, normalizeVisitTime, parseAppliedSearchQuery, parseGroupedInteger, parseReactSdkNamedImports, parseSearchPublicPath, pathFiltersToQueryFilters, pathLocationToFilterInput, queryListings, reduceAppliedSearchQuery, resolvePublicSiteId, searchListings, serializeAppliedSearchQuery, slotsForDate, studioChromeInstruction, studioCodegenContractViolations, studioDefaultLeadUi, studioLeadInstruction, studioSdkPinInstruction, submitContactLead, submitVisitLead, unavailableReactImports };
|
|
527
|
+
export { AppliedSearchChange, AppliedSearchQuery, CmsCollection, CmsEntriesResult, CmsEntry, type ContactLeadInput, type CreateGaragemClientOptions, type FetchLike, type GaragemClient, GaragemSdkError, type GetCmsCollectionOptions, type GetCmsCollectionsOptions, type GetCmsEntriesOptions, type GetCmsEntryOptions, type GetLeadUiOptions, type GetListingOptions, type GetListingsOptions, type GetSearchUiOptions, type GetSimilarListingsOptions, type GetSiteOptions, type HHmm, type LeadContact, type LeadField, type LeadFieldId, LeadSubmitError, type LeadSubmitErrorCode, type LeadSubmitResult, type LeadUi, ListingDetail, ListingFilters, ListingsResult, type LocationFilterInput, QueryListingsFilters, type QueryListingsOptions, QueryListingsParams, QueryListingsResult, RequestNextOptions, type ResolvePublicSiteIdOptions, SEARCH_CSS_RECIPE, SEARCH_CSS_VARS, STUDIO_DEFAULT_VISIT_SCHEDULE, STUDIO_SDK_CONTRACT, STUDIO_SDK_PACKAGE, STUDIO_SITE_LAYOUT, type SearchListingsOptions, SearchListingsParams, SearchListingsResult, SearchPathFilters, SearchUi, SearchUiDictionary, SimilarListingsResult, Site, type StudioSdkContract, VISIT_TIME_ZONE, type VisitHours, type VisitLeadInput, type VisitSchedule, type VisitScheduleConfig, coerceNpmVersion, compareSemver, composeSearchPublicHref, composeSearchPublicPath, createGaragemClient, expandVisitSchedule, expandVisitTimeSlots, formatAreaM2, formatGroupedInteger, formatListingPrice, getCmsCollection, getCmsCollections, getCmsEntries, getCmsEntry, getLeadUi, getListing, getListings, getSearchUi, getSimilarListings, getSite, hasShowcaseLeadsPostUrl, isStudioPreviewHost, isVisitSlotAllowed, listingBusinessLabel, listingLookupKey, listingPublicPath, mergeAppliedSearchQueryIntoSearch, normalizeVisitDate, normalizeVisitTime, parseAppliedSearchQuery, parseGroupedInteger, parseReactSdkNamedImports, parseSearchPublicPath, pathFiltersToQueryFilters, pathLocationToFilterInput, queryListings, reduceAppliedSearchQuery, resolvePublicSiteId, searchListings, serializeAppliedSearchQuery, slotsForDate, studioChromeInstruction, studioCodegenContractViolations, studioDefaultLeadUi, studioLayoutInstruction, studioLeadInstruction, studioSdkPinInstruction, studioSearchLandmarkInstruction, studioSiteWidthCss, submitContactLead, submitVisitLead, unavailableReactImports };
|
package/dist/index.d.ts
CHANGED
|
@@ -359,9 +359,10 @@ declare const STUDIO_SDK_CONTRACT: {
|
|
|
359
359
|
/**
|
|
360
360
|
* Exact pin for generated Studio sites. Must be ≥ `selfInjectSince` so
|
|
361
361
|
* prompts that skip the layout chrome tag match the tarball v0 installs.
|
|
362
|
-
* 0.4.
|
|
362
|
+
* 0.4.7 lets SearchPage fill the site wrapper (`as="div"`) with no
|
|
363
|
+
* nested 80rem inset and no padding on the search slot.
|
|
363
364
|
*/
|
|
364
|
-
readonly minNpmVersion: "0.4.
|
|
365
|
+
readonly minNpmVersion: "0.4.7";
|
|
365
366
|
/** First release where ListingCard and ResultsSkeleton inject the sheet. */
|
|
366
367
|
readonly selfInjectSince: "0.4.2";
|
|
367
368
|
readonly chromeStrategy: "self-inject";
|
|
@@ -382,6 +383,25 @@ declare const STUDIO_SDK_CONTRACT: {
|
|
|
382
383
|
readonly leadExports: readonly ["getLeadUi", "submitVisitLead", "submitContactLead", "slotsForDate", "expandVisitSchedule", "expandVisitTimeSlots", "isVisitSlotAllowed", "STUDIO_DEFAULT_VISIT_SCHEDULE"];
|
|
383
384
|
};
|
|
384
385
|
type StudioSdkContract = typeof STUDIO_SDK_CONTRACT;
|
|
386
|
+
/**
|
|
387
|
+
* Global Studio content width. Mirrors Editor default `7xl` / `px-4`
|
|
388
|
+
* without the Marca picker — v0 sites are not `@garagem/ui`.
|
|
389
|
+
* Rem options match packages/ui `MAX_WIDTH_REM` so a later
|
|
390
|
+
* “make it wider” chat only edits `--site-max-width`.
|
|
391
|
+
*/
|
|
392
|
+
declare const STUDIO_SITE_LAYOUT: {
|
|
393
|
+
readonly maxWidthRem: "80rem";
|
|
394
|
+
readonly maxWidthRemOptions: readonly ["64rem", "80rem", "120rem", "160rem", "240rem"];
|
|
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\"";
|
|
400
|
+
readonly wrapperClassName: "mx-auto w-full max-w-site px-4";
|
|
401
|
+
};
|
|
402
|
+
declare function studioSiteWidthCss(): string;
|
|
403
|
+
declare function studioLayoutInstruction(): string;
|
|
404
|
+
declare function studioSearchLandmarkInstruction(): string;
|
|
385
405
|
declare function hasShowcaseLeadsPostUrl(text: string): boolean;
|
|
386
406
|
declare function coerceNpmVersion(raw: unknown): string | null;
|
|
387
407
|
declare function compareSemver(a: string, b: string): number;
|
|
@@ -504,4 +524,4 @@ interface GaragemClient {
|
|
|
504
524
|
*/
|
|
505
525
|
declare function createGaragemClient(options?: CreateGaragemClientOptions): GaragemClient;
|
|
506
526
|
|
|
507
|
-
export { AppliedSearchChange, AppliedSearchQuery, CmsCollection, CmsEntriesResult, CmsEntry, type ContactLeadInput, type CreateGaragemClientOptions, type FetchLike, type GaragemClient, GaragemSdkError, type GetCmsCollectionOptions, type GetCmsCollectionsOptions, type GetCmsEntriesOptions, type GetCmsEntryOptions, type GetLeadUiOptions, type GetListingOptions, type GetListingsOptions, type GetSearchUiOptions, type GetSimilarListingsOptions, type GetSiteOptions, type HHmm, type LeadContact, type LeadField, type LeadFieldId, LeadSubmitError, type LeadSubmitErrorCode, type LeadSubmitResult, type LeadUi, ListingDetail, ListingFilters, ListingsResult, type LocationFilterInput, QueryListingsFilters, type QueryListingsOptions, QueryListingsParams, QueryListingsResult, RequestNextOptions, type ResolvePublicSiteIdOptions, SEARCH_CSS_RECIPE, SEARCH_CSS_VARS, STUDIO_DEFAULT_VISIT_SCHEDULE, STUDIO_SDK_CONTRACT, STUDIO_SDK_PACKAGE, type SearchListingsOptions, SearchListingsParams, SearchListingsResult, SearchPathFilters, SearchUi, SearchUiDictionary, SimilarListingsResult, Site, type StudioSdkContract, VISIT_TIME_ZONE, type VisitHours, type VisitLeadInput, type VisitSchedule, type VisitScheduleConfig, coerceNpmVersion, compareSemver, composeSearchPublicHref, composeSearchPublicPath, createGaragemClient, expandVisitSchedule, expandVisitTimeSlots, formatAreaM2, formatGroupedInteger, formatListingPrice, getCmsCollection, getCmsCollections, getCmsEntries, getCmsEntry, getLeadUi, getListing, getListings, getSearchUi, getSimilarListings, getSite, hasShowcaseLeadsPostUrl, isStudioPreviewHost, isVisitSlotAllowed, listingBusinessLabel, listingLookupKey, listingPublicPath, mergeAppliedSearchQueryIntoSearch, normalizeVisitDate, normalizeVisitTime, parseAppliedSearchQuery, parseGroupedInteger, parseReactSdkNamedImports, parseSearchPublicPath, pathFiltersToQueryFilters, pathLocationToFilterInput, queryListings, reduceAppliedSearchQuery, resolvePublicSiteId, searchListings, serializeAppliedSearchQuery, slotsForDate, studioChromeInstruction, studioCodegenContractViolations, studioDefaultLeadUi, studioLeadInstruction, studioSdkPinInstruction, submitContactLead, submitVisitLead, unavailableReactImports };
|
|
527
|
+
export { AppliedSearchChange, AppliedSearchQuery, CmsCollection, CmsEntriesResult, CmsEntry, type ContactLeadInput, type CreateGaragemClientOptions, type FetchLike, type GaragemClient, GaragemSdkError, type GetCmsCollectionOptions, type GetCmsCollectionsOptions, type GetCmsEntriesOptions, type GetCmsEntryOptions, type GetLeadUiOptions, type GetListingOptions, type GetListingsOptions, type GetSearchUiOptions, type GetSimilarListingsOptions, type GetSiteOptions, type HHmm, type LeadContact, type LeadField, type LeadFieldId, LeadSubmitError, type LeadSubmitErrorCode, type LeadSubmitResult, type LeadUi, ListingDetail, ListingFilters, ListingsResult, type LocationFilterInput, QueryListingsFilters, type QueryListingsOptions, QueryListingsParams, QueryListingsResult, RequestNextOptions, type ResolvePublicSiteIdOptions, SEARCH_CSS_RECIPE, SEARCH_CSS_VARS, STUDIO_DEFAULT_VISIT_SCHEDULE, STUDIO_SDK_CONTRACT, STUDIO_SDK_PACKAGE, STUDIO_SITE_LAYOUT, type SearchListingsOptions, SearchListingsParams, SearchListingsResult, SearchPathFilters, SearchUi, SearchUiDictionary, SimilarListingsResult, Site, type StudioSdkContract, VISIT_TIME_ZONE, type VisitHours, type VisitLeadInput, type VisitSchedule, type VisitScheduleConfig, coerceNpmVersion, compareSemver, composeSearchPublicHref, composeSearchPublicPath, createGaragemClient, expandVisitSchedule, expandVisitTimeSlots, formatAreaM2, formatGroupedInteger, formatListingPrice, getCmsCollection, getCmsCollections, getCmsEntries, getCmsEntry, getLeadUi, getListing, getListings, getSearchUi, getSimilarListings, getSite, hasShowcaseLeadsPostUrl, isStudioPreviewHost, isVisitSlotAllowed, listingBusinessLabel, listingLookupKey, listingPublicPath, mergeAppliedSearchQueryIntoSearch, normalizeVisitDate, normalizeVisitTime, parseAppliedSearchQuery, parseGroupedInteger, parseReactSdkNamedImports, parseSearchPublicPath, pathFiltersToQueryFilters, pathLocationToFilterInput, queryListings, reduceAppliedSearchQuery, resolvePublicSiteId, searchListings, serializeAppliedSearchQuery, slotsForDate, studioChromeInstruction, studioCodegenContractViolations, studioDefaultLeadUi, studioLayoutInstruction, studioLeadInstruction, studioSdkPinInstruction, studioSearchLandmarkInstruction, studioSiteWidthCss, submitContactLead, submitVisitLead, unavailableReactImports };
|
package/dist/index.js
CHANGED
|
@@ -29,6 +29,7 @@ __export(src_exports, {
|
|
|
29
29
|
STUDIO_DEFAULT_VISIT_SCHEDULE: () => STUDIO_DEFAULT_VISIT_SCHEDULE,
|
|
30
30
|
STUDIO_SDK_CONTRACT: () => STUDIO_SDK_CONTRACT,
|
|
31
31
|
STUDIO_SDK_PACKAGE: () => STUDIO_SDK_PACKAGE,
|
|
32
|
+
STUDIO_SITE_LAYOUT: () => STUDIO_SITE_LAYOUT,
|
|
32
33
|
TOOLBAR_PRIMARY_FILTER_IDS: () => TOOLBAR_PRIMARY_FILTER_IDS,
|
|
33
34
|
VISIT_TIME_ZONE: () => VISIT_TIME_ZONE,
|
|
34
35
|
applyPathFilter: () => applyPathFilter,
|
|
@@ -95,8 +96,11 @@ __export(src_exports, {
|
|
|
95
96
|
studioChromeInstruction: () => studioChromeInstruction,
|
|
96
97
|
studioCodegenContractViolations: () => studioCodegenContractViolations,
|
|
97
98
|
studioDefaultLeadUi: () => studioDefaultLeadUi,
|
|
99
|
+
studioLayoutInstruction: () => studioLayoutInstruction,
|
|
98
100
|
studioLeadInstruction: () => studioLeadInstruction,
|
|
99
101
|
studioSdkPinInstruction: () => studioSdkPinInstruction,
|
|
102
|
+
studioSearchLandmarkInstruction: () => studioSearchLandmarkInstruction,
|
|
103
|
+
studioSiteWidthCss: () => studioSiteWidthCss,
|
|
100
104
|
submitContactLead: () => submitContactLead,
|
|
101
105
|
submitVisitLead: () => submitVisitLead,
|
|
102
106
|
toListingCardModel: () => toListingCardModel,
|
|
@@ -1698,9 +1702,10 @@ var STUDIO_SDK_CONTRACT = {
|
|
|
1698
1702
|
/**
|
|
1699
1703
|
* Exact pin for generated Studio sites. Must be ≥ `selfInjectSince` so
|
|
1700
1704
|
* prompts that skip the layout chrome tag match the tarball v0 installs.
|
|
1701
|
-
* 0.4.
|
|
1705
|
+
* 0.4.7 lets SearchPage fill the site wrapper (`as="div"`) with no
|
|
1706
|
+
* nested 80rem inset and no padding on the search slot.
|
|
1702
1707
|
*/
|
|
1703
|
-
minNpmVersion: "0.4.
|
|
1708
|
+
minNpmVersion: "0.4.7",
|
|
1704
1709
|
/** First release where ListingCard and ResultsSkeleton inject the sheet. */
|
|
1705
1710
|
selfInjectSince: "0.4.2",
|
|
1706
1711
|
chromeStrategy: "self-inject",
|
|
@@ -1734,6 +1739,35 @@ var STUDIO_SDK_CONTRACT = {
|
|
|
1734
1739
|
"STUDIO_DEFAULT_VISIT_SCHEDULE"
|
|
1735
1740
|
]
|
|
1736
1741
|
};
|
|
1742
|
+
var STUDIO_SITE_LAYOUT = {
|
|
1743
|
+
maxWidthRem: "80rem",
|
|
1744
|
+
maxWidthRemOptions: ["64rem", "80rem", "120rem", "160rem", "240rem"],
|
|
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"',
|
|
1750
|
+
wrapperClassName: "mx-auto w-full max-w-site px-4"
|
|
1751
|
+
};
|
|
1752
|
+
function studioSiteWidthCss() {
|
|
1753
|
+
return `:root {
|
|
1754
|
+
--site-max-width: ${STUDIO_SITE_LAYOUT.maxWidthRem};
|
|
1755
|
+
}
|
|
1756
|
+
.max-w-site {
|
|
1757
|
+
max-width: var(--site-max-width);
|
|
1758
|
+
}`;
|
|
1759
|
+
}
|
|
1760
|
+
function studioLayoutInstruction() {
|
|
1761
|
+
const scale = STUDIO_SITE_LAYOUT.maxWidthRemOptions.join(", ");
|
|
1762
|
+
return `Content width (hard rule). In \`app/globals.css\` keep brand tokens and add:
|
|
1763
|
+
\`\`\`css
|
|
1764
|
+
${studioSiteWidthCss()}
|
|
1765
|
+
\`\`\`
|
|
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.`;
|
|
1767
|
+
}
|
|
1768
|
+
function studioSearchLandmarkInstruction() {
|
|
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.`;
|
|
1770
|
+
}
|
|
1737
1771
|
var REACT_SDK_NAMED_IMPORT_RE = /(?:^|[\n;])\s*import\s+(?!type\b)(?:type\s+)?\{([^}]+)\}\s+from\s+['"]@garagem-ai\/site-sdk\/react['"]/g;
|
|
1738
1772
|
var SHOWCASE_LEADS_POST_URL_RE = /\/api\/sites\/[^\s"']*\/leads(?!\/ui)/;
|
|
1739
1773
|
function hasShowcaseLeadsPostUrl(text) {
|
|
@@ -1802,7 +1836,7 @@ function studioChromeInstruction() {
|
|
|
1802
1836
|
STUDIO_SDK_CONTRACT.minNpmVersion,
|
|
1803
1837
|
STUDIO_SDK_CONTRACT.selfInjectSince
|
|
1804
1838
|
) >= 0 ? "`SearchPage`, `ListingCard`, and `ResultsSkeleton`" : "`SearchPage`";
|
|
1805
|
-
return `Search chrome CSS is injected by ${injectors} (JS \`<style>\` tag). Never \`import "@garagem-ai/site-sdk/react/search.css"\` \u2014 v0 preview cannot load npm CSS. Do not copy SDK layout into the app. Theme via CSS variables in \`app/globals.css\` (\`SEARCH_CSS_RECIPE\` / \`--garagem-*\`), \`classNames\`, and \`data-slot\`.`;
|
|
1839
|
+
return `Search chrome CSS is injected by ${injectors} (JS \`<style>\` tag). Never \`import "@garagem-ai/site-sdk/react/search.css"\` \u2014 v0 preview cannot load npm CSS. Do not copy SDK card/toolbar layout into the app. Theme via CSS variables in \`app/globals.css\` (\`SEARCH_CSS_RECIPE\` / \`--garagem-*\`), \`classNames\`, and \`data-slot\`.`;
|
|
1806
1840
|
}
|
|
1807
1841
|
function studioCodegenContractViolations(text) {
|
|
1808
1842
|
const violations = [];
|
|
@@ -1991,6 +2025,7 @@ function createGaragemClient(options = {}) {
|
|
|
1991
2025
|
STUDIO_DEFAULT_VISIT_SCHEDULE,
|
|
1992
2026
|
STUDIO_SDK_CONTRACT,
|
|
1993
2027
|
STUDIO_SDK_PACKAGE,
|
|
2028
|
+
STUDIO_SITE_LAYOUT,
|
|
1994
2029
|
TOOLBAR_PRIMARY_FILTER_IDS,
|
|
1995
2030
|
VISIT_TIME_ZONE,
|
|
1996
2031
|
applyPathFilter,
|
|
@@ -2057,8 +2092,11 @@ function createGaragemClient(options = {}) {
|
|
|
2057
2092
|
studioChromeInstruction,
|
|
2058
2093
|
studioCodegenContractViolations,
|
|
2059
2094
|
studioDefaultLeadUi,
|
|
2095
|
+
studioLayoutInstruction,
|
|
2060
2096
|
studioLeadInstruction,
|
|
2061
2097
|
studioSdkPinInstruction,
|
|
2098
|
+
studioSearchLandmarkInstruction,
|
|
2099
|
+
studioSiteWidthCss,
|
|
2062
2100
|
submitContactLead,
|
|
2063
2101
|
submitVisitLead,
|
|
2064
2102
|
toListingCardModel,
|