@garagem-ai/site-sdk 0.4.6 → 0.4.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.
- package/README.md +14 -6
- package/dist/index.d.mts +19 -3
- package/dist/index.d.ts +19 -3
- package/dist/index.js +37 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +33 -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 +39 -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">
|
|
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,21 @@ 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
|
+
readonly wrapperClassName: "mx-auto w-full max-w-site px-4";
|
|
397
|
+
};
|
|
398
|
+
declare function studioSiteWidthCss(): string;
|
|
399
|
+
declare function studioLayoutInstruction(): string;
|
|
400
|
+
declare function studioSearchLandmarkInstruction(): string;
|
|
385
401
|
declare function hasShowcaseLeadsPostUrl(text: string): boolean;
|
|
386
402
|
declare function coerceNpmVersion(raw: unknown): string | null;
|
|
387
403
|
declare function compareSemver(a: string, b: string): number;
|
|
@@ -504,4 +520,4 @@ interface GaragemClient {
|
|
|
504
520
|
*/
|
|
505
521
|
declare function createGaragemClient(options?: CreateGaragemClientOptions): GaragemClient;
|
|
506
522
|
|
|
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 };
|
|
523
|
+
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,21 @@ 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
|
+
readonly wrapperClassName: "mx-auto w-full max-w-site px-4";
|
|
397
|
+
};
|
|
398
|
+
declare function studioSiteWidthCss(): string;
|
|
399
|
+
declare function studioLayoutInstruction(): string;
|
|
400
|
+
declare function studioSearchLandmarkInstruction(): string;
|
|
385
401
|
declare function hasShowcaseLeadsPostUrl(text: string): boolean;
|
|
386
402
|
declare function coerceNpmVersion(raw: unknown): string | null;
|
|
387
403
|
declare function compareSemver(a: string, b: string): number;
|
|
@@ -504,4 +520,4 @@ interface GaragemClient {
|
|
|
504
520
|
*/
|
|
505
521
|
declare function createGaragemClient(options?: CreateGaragemClientOptions): GaragemClient;
|
|
506
522
|
|
|
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 };
|
|
523
|
+
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,31 @@ 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
|
+
wrapperClassName: "mx-auto w-full max-w-site px-4"
|
|
1747
|
+
};
|
|
1748
|
+
function studioSiteWidthCss() {
|
|
1749
|
+
return `:root {
|
|
1750
|
+
--site-max-width: ${STUDIO_SITE_LAYOUT.maxWidthRem};
|
|
1751
|
+
}
|
|
1752
|
+
.max-w-site {
|
|
1753
|
+
max-width: var(--site-max-width);
|
|
1754
|
+
}`;
|
|
1755
|
+
}
|
|
1756
|
+
function studioLayoutInstruction() {
|
|
1757
|
+
const scale = STUDIO_SITE_LAYOUT.maxWidthRemOptions.join(", ");
|
|
1758
|
+
return `Content width (hard rule). In \`app/globals.css\` keep brand tokens and add:
|
|
1759
|
+
\`\`\`css
|
|
1760
|
+
${studioSiteWidthCss()}
|
|
1761
|
+
\`\`\`
|
|
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.`;
|
|
1763
|
+
}
|
|
1764
|
+
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.`;
|
|
1766
|
+
}
|
|
1737
1767
|
var REACT_SDK_NAMED_IMPORT_RE = /(?:^|[\n;])\s*import\s+(?!type\b)(?:type\s+)?\{([^}]+)\}\s+from\s+['"]@garagem-ai\/site-sdk\/react['"]/g;
|
|
1738
1768
|
var SHOWCASE_LEADS_POST_URL_RE = /\/api\/sites\/[^\s"']*\/leads(?!\/ui)/;
|
|
1739
1769
|
function hasShowcaseLeadsPostUrl(text) {
|
|
@@ -1802,7 +1832,7 @@ function studioChromeInstruction() {
|
|
|
1802
1832
|
STUDIO_SDK_CONTRACT.minNpmVersion,
|
|
1803
1833
|
STUDIO_SDK_CONTRACT.selfInjectSince
|
|
1804
1834
|
) >= 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\`.`;
|
|
1835
|
+
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
1836
|
}
|
|
1807
1837
|
function studioCodegenContractViolations(text) {
|
|
1808
1838
|
const violations = [];
|
|
@@ -1991,6 +2021,7 @@ function createGaragemClient(options = {}) {
|
|
|
1991
2021
|
STUDIO_DEFAULT_VISIT_SCHEDULE,
|
|
1992
2022
|
STUDIO_SDK_CONTRACT,
|
|
1993
2023
|
STUDIO_SDK_PACKAGE,
|
|
2024
|
+
STUDIO_SITE_LAYOUT,
|
|
1994
2025
|
TOOLBAR_PRIMARY_FILTER_IDS,
|
|
1995
2026
|
VISIT_TIME_ZONE,
|
|
1996
2027
|
applyPathFilter,
|
|
@@ -2057,8 +2088,11 @@ function createGaragemClient(options = {}) {
|
|
|
2057
2088
|
studioChromeInstruction,
|
|
2058
2089
|
studioCodegenContractViolations,
|
|
2059
2090
|
studioDefaultLeadUi,
|
|
2091
|
+
studioLayoutInstruction,
|
|
2060
2092
|
studioLeadInstruction,
|
|
2061
2093
|
studioSdkPinInstruction,
|
|
2094
|
+
studioSearchLandmarkInstruction,
|
|
2095
|
+
studioSiteWidthCss,
|
|
2062
2096
|
submitContactLead,
|
|
2063
2097
|
submitVisitLead,
|
|
2064
2098
|
toListingCardModel,
|