@garagem-ai/site-sdk 0.5.1 → 0.5.3

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.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { R as RequestNextOptions, L as ListingFilters, Q as QueryListingsParams, S as SearchListingsParams, C as CmsCollection, a as CmsEntriesResult, b as CmsEntry, c as ListingDetail, d as ListingsResult, e as SearchUi, f as SimilarListingsResult, g as Site, h as QueryListingsResult, i as SearchListingsResult, j as SearchPathFilters, k as SearchUiDictionary, l as QueryListingsFilters, A as AppliedSearchQuery, m as AppliedSearchChange } from './search-engine-4ocM0UPk.js';
2
- export { n as AMENITY_FALLBACK_LABELS, o as AmenityLabelDictionary, p as AmenityLabelOption, q as CmsEntryStatus, r as CmsFieldDefinition, s as CmsFieldType, t as CmsSeoData, F as FORBIDDEN_SEARCH_QUERY_KEYS, u as LISTING_AMENITY_TITLES, v as LISTING_DESCRIPTION_CLAMP, w as Listing, x as ListingAmenityGroup, y as ListingAmenityGroupKey, z as ListingAmenitySource, B as ListingBreadcrumbCrumb, D as ListingBusinessType, E as ListingCardModel, G as ListingDescriptionPreview, H as ListingDetailFieldsModel, I as ListingDetailFieldsSource, J as ListingDetailModel, K as ListingFact, M as ListingLocation, N as ListingLocationBlock, O as ListingMedia, P as ListingMediaOverlay, T as ListingPriceVisibility, U as ListingPropertySummary, V as ListingValue, W as LocationNameTables, X as QueryListingsLocation, Y as SEARCH_EMPTY_COPY, Z as SEARCH_SORT_RELEVANCE, _ as SearchChromeModel, $ as SearchPathLocation, a0 as SearchUiFilter, a1 as SearchUiOption, a2 as TOOLBAR_PRIMARY_FILTER_IDS, a3 as applyPathFilter, a4 as buildQueryListingsParams, a5 as canonicalizeSearchHref, a6 as clearStagedPathFilters, a7 as countFacetChoices, a8 as countOptionLabel, a9 as displayPathLocation, aa as hrefForAppliedChange, ab as hrefForPathFilters, ac as hrefWithExplicitPage, ad as isListingDetailPath, ae as labelAmenities, af as listingAmenityGroups, ag as listingBreadcrumb, ah as listingDescriptionPreview, ai as listingDetailFieldsModel, aj as listingDetailModel, ak as listingFacts, al as listingLocationBlock, am as listingLocationLabel, an as listingMapsHref, ao as listingMediaOverlays, ap as listingValues, aq as paginationPages, ar as pathFilterHasOption, as as pathFilterValue, at as publicSearchHref, au as rangeDraftFromPath, av as readPublicSearch, aw as searchChromeModel, ax as searchHrefUsesLegacyFilterQuery, ay as searchResultsHeading, az as searchSortOptions, aA as toListingCardModel, aB as toolbarFilterIds, aC as visibleSearchFilters } from './search-engine-4ocM0UPk.js';
1
+ import { R as RequestNextOptions, L as ListingFilters, Q as QueryListingsParams, S as SearchListingsParams, C as CmsCollection, a as CmsEntriesResult, b as CmsEntry, c as ListingDetail, d as ListingsResult, e as SearchUi, f as SimilarListingsResult, g as Site, h as QueryListingsResult, i as SearchListingsResult, j as ListingLocation, k as ListingMedia, l as ListingBusinessType, m as ListingPriceVisibility, n as Listing, o as SearchPathFilters, p as SearchUiDictionary, q as QueryListingsFilters, A as AppliedSearchQuery, r as AppliedSearchChange } from './search-engine-CkbO77G8.js';
2
+ export { s as CmsEntryStatus, t as CmsFieldDefinition, u as CmsFieldType, v as CmsSeoData, F as FORBIDDEN_SEARCH_QUERY_KEYS, w as ListingPropertySummary, x as LocationNameTables, y as QueryListingsLocation, z as SEARCH_EMPTY_COPY, B as SEARCH_SORT_RELEVANCE, D as SearchChromeModel, E as SearchPathLocation, G as SearchUiFilter, H as SearchUiOption, T as TOOLBAR_PRIMARY_FILTER_IDS, I as applyPathFilter, J as buildQueryListingsParams, K as canonicalizeSearchHref, M as clearStagedPathFilters, N as countFacetChoices, O as countOptionLabel, P as displayPathLocation, U as hrefForAppliedChange, V as hrefForPathFilters, W as hrefWithExplicitPage, X as isListingDetailPath, Y as paginationPages, Z as pathFilterHasOption, _ as pathFilterValue, $ as publicSearchHref, a0 as rangeDraftFromPath, a1 as readPublicSearch, a2 as searchChromeModel, a3 as searchHrefUsesLegacyFilterQuery, a4 as searchResultsHeading, a5 as searchSortOptions, a6 as toolbarFilterIds, a7 as visibleSearchFilters } from './search-engine-CkbO77G8.js';
3
3
 
4
4
  /** Custom fetch implementation. Defaults to the global `fetch`. */
5
5
  type FetchLike = typeof fetch;
@@ -258,6 +258,52 @@ declare function getLeadUi(options: GetLeadUiOptions): Promise<LeadUi>;
258
258
  declare function submitVisitLead(input: VisitLeadInput): Promise<LeadSubmitResult>;
259
259
  declare function submitContactLead(input: ContactLeadInput): Promise<LeadSubmitResult>;
260
260
 
261
+ /**
262
+ * Portuguese labels for listing amenity ids. Tenant search-ui dictionary
263
+ * wins; this map is the default-catalog fallback so generated Studio pages
264
+ * never print camelCase keys.
265
+ */
266
+ declare const LISTING_AMENITY_TITLES: {
267
+ readonly unit: "Comodidades";
268
+ readonly building: "Comodidades do condomínio";
269
+ };
270
+ type AmenityLabelOption = {
271
+ id: string;
272
+ label: string;
273
+ };
274
+ type AmenityLabelDictionary = {
275
+ propertyFeatures?: AmenityLabelOption[];
276
+ buildingAmenities?: AmenityLabelOption[];
277
+ amenitySectionTitles?: {
278
+ unit?: string;
279
+ building?: string;
280
+ };
281
+ };
282
+ type ListingAmenityGroupKey = keyof typeof LISTING_AMENITY_TITLES;
283
+ type ListingAmenityGroup = {
284
+ key: ListingAmenityGroupKey;
285
+ title: string;
286
+ labels: string[];
287
+ };
288
+ type ListingAmenitySource = {
289
+ amenities?: string[] | null;
290
+ propertyFeatures?: string[] | null;
291
+ /** Condo amenity ids, even when `building` is null (no buildingId). */
292
+ buildingAmenities?: string[] | null;
293
+ building?: {
294
+ amenities?: string[] | null;
295
+ } | null;
296
+ };
297
+ /**
298
+ * Default tenant ids + canonical `has*` / `is*` keys seen on public listings.
299
+ * Aligned with DEFAULT_PROPERTY_FEATURES and DEFAULT_BUILDING_FEATURES from
300
+ * Foundation's field-definitions.ts so generated Studio pages never need a
301
+ * dictionary for standard amenities.
302
+ */
303
+ declare const AMENITY_FALLBACK_LABELS: Record<string, string>;
304
+ declare function labelAmenities(ids: readonly string[] | null | undefined, dictionary?: AmenityLabelOption[]): string[];
305
+ declare function listingAmenityGroups(listing: ListingAmenitySource, dictionary?: AmenityLabelDictionary): ListingAmenityGroup[];
306
+
261
307
  /** Public listing URLs. Prefer `listing.path` from the API; fallback is `/imoveis/id-{listingCode}`. */
262
308
  declare function listingLookupKey(raw: string): string;
263
309
  declare function listingPublicPath(listing: {
@@ -266,22 +312,149 @@ declare function listingPublicPath(listing: {
266
312
  id?: string | null;
267
313
  }): string;
268
314
 
315
+ declare const LISTING_DESCRIPTION_CLAMP = 280;
316
+ /** Visible listing fact. The number / area / floor is `text` — never omit it. */
317
+ type ListingFact = {
318
+ key: string;
319
+ label: string;
320
+ text: string;
321
+ };
322
+ /** Visible listing amount. Price, condomínio and IPTU are `text`. */
323
+ type ListingValue = {
324
+ key: string;
325
+ label: string;
326
+ text: string;
327
+ };
328
+ type ListingBreadcrumbCrumb = {
329
+ label: string;
330
+ href: string;
331
+ };
332
+ type ListingLocationBlock = {
333
+ label: string;
334
+ mapsHref: string | null;
335
+ };
336
+ type ListingDescriptionPreview = {
337
+ text: string;
338
+ truncated: boolean;
339
+ toggleLabel: string | null;
340
+ };
341
+ type ListingMediaOverlay = {
342
+ key: "video" | "tour";
343
+ hash: "video" | "tour";
344
+ title: string;
345
+ href: string;
346
+ embedSrc: string;
347
+ };
348
+ type ListingDetailModel = {
349
+ breadcrumb: ListingBreadcrumbCrumb[];
350
+ values: ListingValue[];
351
+ facts: ListingFact[];
352
+ location: ListingLocationBlock | null;
353
+ /** Complete description string — never a sliced preview. */
354
+ description: string | null;
355
+ descriptionTruncated: boolean;
356
+ descriptionToggleLabel: string | null;
357
+ mediaOverlays: ListingMediaOverlay[];
358
+ };
359
+ declare function listingValues(listing: {
360
+ price?: number | null;
361
+ priceVisibility?: string | null;
362
+ propertyTaxLabel?: string | null;
363
+ property?: {
364
+ condoFee?: number | null;
365
+ propertyTax?: number | null;
366
+ } | null;
367
+ }): ListingValue[];
368
+ declare function listingFacts(listing: {
369
+ property?: {
370
+ totalArea?: number | null;
371
+ usableArea?: number | null;
372
+ bedrooms?: number | null;
373
+ suites?: number | null;
374
+ parkingSpaces?: number | null;
375
+ rooms?: number | null;
376
+ floor?: number | string | null;
377
+ } | null;
378
+ }): ListingFact[];
379
+ declare function listingMapsHref(location: ListingLocation | null | undefined): string | null;
380
+ declare function listingLocationBlock(listing: {
381
+ location?: ListingLocation | null;
382
+ } | null | undefined): ListingLocationBlock | null;
383
+ declare function listingBreadcrumb(listing: {
384
+ path?: string | null;
385
+ listingCode?: string | null;
386
+ id?: string | null;
387
+ }): ListingBreadcrumbCrumb[];
388
+ declare function listingDescriptionPreview(description: string | null | undefined, expanded?: boolean): ListingDescriptionPreview | null;
389
+ declare function listingMediaOverlays(listing: {
390
+ media?: ListingMedia[] | null;
391
+ }): ListingMediaOverlay[];
392
+ declare function listingDetailModel(listing: Pick<ListingDetail, "id" | "listingCode" | "path" | "price" | "priceVisibility" | "description"> & {
393
+ property?: ListingDetail["property"] | null;
394
+ location?: ListingLocation | null;
395
+ media?: ListingMedia[] | null;
396
+ }, options?: {
397
+ descriptionExpanded?: boolean;
398
+ }): ListingDetailModel;
399
+
400
+ type ListingDetailFieldsModel = {
401
+ facts: ListingFact[];
402
+ values: ListingValue[];
403
+ amenityGroups: ListingAmenityGroup[];
404
+ };
405
+ type ListingDetailFieldsSource = ListingAmenitySource & Pick<ListingDetail, "price" | "priceVisibility"> & {
406
+ property?: ListingDetail["property"] | null;
407
+ };
269
408
  /**
270
- * Presentation helpers with no UI framework.
271
- * React / React Native / Flutter adapters consume these formatters and
272
- * CSS custom-property names; they must not live inside JSX.
409
+ * Facts, values, and amenity groups that are safe to render: every row has
410
+ * a real label and text. Missing condo/IPTU/empty facts never appear.
273
411
  */
274
- declare const SEARCH_CSS_VARS: {
275
- readonly cardRadius: "--garagem-listing-card-radius";
276
- readonly cardGap: "--garagem-listing-card-gap";
277
- readonly priceSize: "--garagem-listing-price-size";
278
- readonly mediaRatio: "--garagem-listing-media-ratio";
279
- readonly controlHeight: "--garagem-search-control-height";
280
- readonly iconSize: "--garagem-search-icon-size";
281
- readonly skeleton: "--garagem-skeleton";
412
+ declare function listingDetailFieldsModel(listing: ListingDetailFieldsSource, dictionary?: AmenityLabelDictionary): ListingDetailFieldsModel;
413
+
414
+ /** Fields every listing card must have — no JSX. */
415
+ type ListingCardModel = {
416
+ href: string;
417
+ title: string;
418
+ businessType: ListingBusinessType;
419
+ businessLabel: string;
420
+ priceVisibility: ListingPriceVisibility;
421
+ price: number | null;
422
+ priceLabel: string;
423
+ pricePeriod: string | null;
424
+ locationLabel: string;
425
+ propertyType: string | null;
426
+ coverSrc: string | null;
427
+ coverAlt: string;
428
+ bedrooms: number | null;
429
+ bathrooms: number | null;
430
+ parkingSpaces: number | null;
431
+ areaM2: number | null;
282
432
  };
283
- /** Paste into generated `globals.css` to override tokens. Layout lives in the chrome artifact. */
284
- declare const SEARCH_CSS_RECIPE: string;
433
+ declare function listingLocationLabel(location: {
434
+ neighborhood?: string | null;
435
+ city?: string | null;
436
+ state?: string | null;
437
+ }): string;
438
+ declare function toListingCardModel(listing: Pick<Listing, "id" | "listingCode" | "path" | "title" | "businessType" | "price" | "priceVisibility" | "coverImage"> & {
439
+ property?: {
440
+ type?: string | null;
441
+ bedrooms?: number | null;
442
+ bathrooms?: number | null;
443
+ parkingSpaces?: number | null;
444
+ usableArea?: number | null;
445
+ totalArea?: number | null;
446
+ };
447
+ location?: {
448
+ neighborhood?: string | null;
449
+ city?: string | null;
450
+ state?: string | null;
451
+ };
452
+ }): ListingCardModel;
453
+
454
+ /**
455
+ * Presentation helpers with no UI framework.
456
+ * Adapters consume these formatters; they must not live inside JSX.
457
+ */
285
458
  declare function formatListingPrice(amount: number | null | undefined, locale?: string, currency?: string): string;
286
459
  /** Input mask: `499000` → `"499.000"` (no currency symbol). */
287
460
  declare function formatGroupedInteger(value: string | number | null | undefined, locale?: string): string;
@@ -355,31 +528,31 @@ declare const STUDIO_SDK_CONTRACT: {
355
528
  * 0.4.12 (`visibleSearchFilters` / `toolbarFilterIds` are on that pin).
356
529
  */
357
530
  readonly minNpmVersion: "0.4.12";
358
- /** First release where ListingCard and ResultsSkeleton inject card CSS. */
531
+ /** Historical: older tarballs inject card CSS when those components mount. */
359
532
  readonly selfInjectSince: "0.4.2";
360
- readonly chromeStrategy: "self-inject";
361
- readonly reactExports: readonly ["usePublicSearch", "ListingCard", "ResultsSkeleton"];
533
+ readonly chromeStrategy: "app-owned";
534
+ readonly reactExports: readonly ["usePublicSearch"];
362
535
  /**
363
- * Names that exist in git / the unpublished patch. Completeness treats an
536
+ * Names that exist in git / unpublished patches. Completeness treats an
364
537
  * import as `sdk-export-mismatch` when the generated pin is older than
365
538
  * `since`. Studio prompts must not mention these names at all (even as
366
539
  * “never import”) — v0 copies the identifier and the preview ESM loader
367
540
  * throws FatalRendererError.
368
541
  */
369
- readonly optionalReactExports: {
370
- readonly SearchChromeStyles: "0.4.1";
371
- readonly ListingDetailFields: "0.4.13";
372
- };
542
+ readonly optionalReactExports: Record<string, string>;
373
543
  /**
374
- * Former `/react` chrome. Completeness flags imports as mismatch (not in
375
- * `reactExports`). Prompts must not mention these names at all — v0 copies
376
- * identifiers even inside “never import”.
544
+ * Former `/react` chrome (including card/skeleton inject). Completeness
545
+ * flags imports as mismatch (not in `reactExports`). Prompts must not
546
+ * mention these names at all — v0 copies identifiers even inside
547
+ * “never import”.
377
548
  */
378
- readonly retiredReactExports: readonly ["SearchPage", "SearchQueryForm", "SearchSortSelect", "FilterPanel", "SearchPagination", "SearchPageFallback"];
549
+ readonly retiredReactExports: readonly ["SearchPage", "SearchQueryForm", "SearchSortSelect", "FilterPanel", "SearchPagination", "SearchPageFallback", "ListingCard", "ResultsSkeleton", "SearchChromeStyles", "ListingDetailFields"];
379
550
  readonly forbiddenImports: readonly ["@garagem-ai/site-sdk/react/search.css"];
380
551
  readonly leadStrategy: "visit-default";
381
552
  readonly leadExports: readonly ["getLeadUi", "submitVisitLead", "submitContactLead", "slotsForDate", "expandVisitSchedule", "expandVisitTimeSlots", "isVisitSlotAllowed", "STUDIO_DEFAULT_VISIT_SCHEDULE"];
382
553
  readonly listingDetailExports: readonly ["listingDetailModel", "getSimilarListings"];
554
+ /** Main-package card helpers — markup stays in the generated app. */
555
+ readonly listingCardExports: readonly ["toListingCardModel", "listingPublicPath", "formatAreaM2", "listingBusinessLabel", "formatListingPrice"];
383
556
  readonly amenityExports: readonly ["listingAmenityGroups"];
384
557
  /**
385
558
  * Names already on the pinned npm tarball (`minNpmVersion` / 0.4.12) —
@@ -423,6 +596,7 @@ declare function parseReactSdkNamedImports(source: string): string[];
423
596
  declare function unavailableReactImports(source: string, pin: string): string[];
424
597
  declare function studioSdkPinInstruction(): string;
425
598
  declare function studioLeadInstruction(): string;
599
+ declare function studioListingCardInstruction(): string;
426
600
  declare function studioListingDetailInstruction(): string;
427
601
  declare function studioAmenityInstruction(): string;
428
602
  declare function studioSearchInstruction(): string;
@@ -541,4 +715,4 @@ interface GaragemClient {
541
715
  */
542
716
  declare function createGaragemClient(options?: CreateGaragemClientOptions): GaragemClient;
543
717
 
544
- 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, studioAmenityInstruction, studioChromeInstruction, studioCodegenContractViolations, studioDefaultLeadUi, studioLayoutInstruction, studioLeadInstruction, studioListingDetailInstruction, studioSdkPinInstruction, studioSearchInstruction, studioSearchLandmarkInstruction, studioSiteWidthCss, submitContactLead, submitVisitLead, unavailableReactImports };
718
+ export { AMENITY_FALLBACK_LABELS, type AmenityLabelDictionary, type AmenityLabelOption, 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, LISTING_AMENITY_TITLES, LISTING_DESCRIPTION_CLAMP, type LeadContact, type LeadField, type LeadFieldId, LeadSubmitError, type LeadSubmitErrorCode, type LeadSubmitResult, type LeadUi, Listing, type ListingAmenityGroup, type ListingAmenityGroupKey, type ListingAmenitySource, type ListingBreadcrumbCrumb, ListingBusinessType, type ListingCardModel, type ListingDescriptionPreview, ListingDetail, type ListingDetailFieldsModel, type ListingDetailFieldsSource, type ListingDetailModel, type ListingFact, ListingFilters, ListingLocation, type ListingLocationBlock, ListingMedia, type ListingMediaOverlay, ListingPriceVisibility, type ListingValue, ListingsResult, type LocationFilterInput, QueryListingsFilters, type QueryListingsOptions, QueryListingsParams, QueryListingsResult, RequestNextOptions, type ResolvePublicSiteIdOptions, 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, labelAmenities, listingAmenityGroups, listingBreadcrumb, listingBusinessLabel, listingDescriptionPreview, listingDetailFieldsModel, listingDetailModel, listingFacts, listingLocationBlock, listingLocationLabel, listingLookupKey, listingMapsHref, listingMediaOverlays, listingPublicPath, listingValues, mergeAppliedSearchQueryIntoSearch, normalizeVisitDate, normalizeVisitTime, parseAppliedSearchQuery, parseGroupedInteger, parseReactSdkNamedImports, parseSearchPublicPath, pathFiltersToQueryFilters, pathLocationToFilterInput, queryListings, reduceAppliedSearchQuery, resolvePublicSiteId, searchListings, serializeAppliedSearchQuery, slotsForDate, studioAmenityInstruction, studioChromeInstruction, studioCodegenContractViolations, studioDefaultLeadUi, studioLayoutInstruction, studioLeadInstruction, studioListingCardInstruction, studioListingDetailInstruction, studioSdkPinInstruction, studioSearchInstruction, studioSearchLandmarkInstruction, studioSiteWidthCss, submitContactLead, submitVisitLead, toListingCardModel, unavailableReactImports };
package/dist/index.js CHANGED
@@ -26,8 +26,6 @@ __export(src_exports, {
26
26
  LISTING_AMENITY_TITLES: () => LISTING_AMENITY_TITLES,
27
27
  LISTING_DESCRIPTION_CLAMP: () => LISTING_DESCRIPTION_CLAMP,
28
28
  LeadSubmitError: () => LeadSubmitError,
29
- SEARCH_CSS_RECIPE: () => SEARCH_CSS_RECIPE,
30
- SEARCH_CSS_VARS: () => SEARCH_CSS_VARS,
31
29
  SEARCH_EMPTY_COPY: () => SEARCH_EMPTY_COPY,
32
30
  SEARCH_SORT_RELEVANCE: () => SEARCH_SORT_RELEVANCE,
33
31
  STUDIO_DEFAULT_VISIT_SCHEDULE: () => STUDIO_DEFAULT_VISIT_SCHEDULE,
@@ -116,6 +114,7 @@ __export(src_exports, {
116
114
  studioDefaultLeadUi: () => studioDefaultLeadUi,
117
115
  studioLayoutInstruction: () => studioLayoutInstruction,
118
116
  studioLeadInstruction: () => studioLeadInstruction,
117
+ studioListingCardInstruction: () => studioListingCardInstruction,
119
118
  studioListingDetailInstruction: () => studioListingDetailInstruction,
120
119
  studioSdkPinInstruction: () => studioSdkPinInstruction,
121
120
  studioSearchInstruction: () => studioSearchInstruction,
@@ -146,6 +145,7 @@ function listingPublicPath(listing) {
146
145
 
147
146
  // src/internal/url.ts
148
147
  var DEFAULT_BASE_URL = "https://app.garagem.ai";
148
+ var DEFAULT_RESOLVE_BASE_URL = "https://cdn.fndn.ai/site";
149
149
  function normalizeBaseUrl(baseUrl) {
150
150
  const url = baseUrl ?? DEFAULT_BASE_URL;
151
151
  return url.endsWith("/") ? url.slice(0, -1) : url;
@@ -245,7 +245,7 @@ async function getSite(options) {
245
245
  "getSite: provide only one of `siteId` or `domain`, not both."
246
246
  );
247
247
  }
248
- const base = normalizeBaseUrl(baseUrl);
248
+ const base = normalizeBaseUrl(baseUrl ?? DEFAULT_RESOLVE_BASE_URL);
249
249
  const params = new URLSearchParams();
250
250
  if (siteId) params.set("siteId", siteId);
251
251
  if (domain) params.set("domain", domain);
@@ -1180,7 +1180,7 @@ function listingAmenityGroups(listing, dictionary) {
1180
1180
  if (unitLabels.length > 0) {
1181
1181
  groups.push({
1182
1182
  key: "unit",
1183
- title: LISTING_AMENITY_TITLES.unit,
1183
+ title: dictionary?.amenitySectionTitles?.unit ?? LISTING_AMENITY_TITLES.unit,
1184
1184
  labels: unitLabels
1185
1185
  });
1186
1186
  }
@@ -1191,7 +1191,7 @@ function listingAmenityGroups(listing, dictionary) {
1191
1191
  if (buildingLabels.length > 0) {
1192
1192
  groups.push({
1193
1193
  key: "building",
1194
- title: LISTING_AMENITY_TITLES.building,
1194
+ title: dictionary?.amenitySectionTitles?.building ?? LISTING_AMENITY_TITLES.building,
1195
1195
  labels: buildingLabels
1196
1196
  });
1197
1197
  }
@@ -1199,25 +1199,6 @@ function listingAmenityGroups(listing, dictionary) {
1199
1199
  }
1200
1200
 
1201
1201
  // src/presentation.ts
1202
- var SEARCH_CSS_VARS = {
1203
- cardRadius: "--garagem-listing-card-radius",
1204
- cardGap: "--garagem-listing-card-gap",
1205
- priceSize: "--garagem-listing-price-size",
1206
- mediaRatio: "--garagem-listing-media-ratio",
1207
- controlHeight: "--garagem-search-control-height",
1208
- iconSize: "--garagem-search-icon-size",
1209
- skeleton: "--garagem-skeleton"
1210
- };
1211
- var SEARCH_CSS_RECIPE = `:root {
1212
- ${SEARCH_CSS_VARS.cardRadius}: 0.75rem;
1213
- ${SEARCH_CSS_VARS.cardGap}: 1.5rem;
1214
- ${SEARCH_CSS_VARS.priceSize}: 1.125rem;
1215
- ${SEARCH_CSS_VARS.mediaRatio}: 4 / 3;
1216
- ${SEARCH_CSS_VARS.controlHeight}: 2.75rem;
1217
- ${SEARCH_CSS_VARS.iconSize}: 1.25rem;
1218
- ${SEARCH_CSS_VARS.skeleton}: var(--muted, #e7e5e4);
1219
- }
1220
- `;
1221
1202
  function formatListingPrice(amount, locale = "pt-BR", currency = "BRL") {
1222
1203
  if (amount == null) return "Sob consulta";
1223
1204
  try {
@@ -1293,6 +1274,7 @@ var DEFAULT_MAX_PRICE = 1e9;
1293
1274
  var DEFAULT_MIN_AREA = 0;
1294
1275
  var DEFAULT_MAX_AREA = 1e5;
1295
1276
  var SORT_URL_TOKENS = [
1277
+ "recentes",
1296
1278
  "preco-asc",
1297
1279
  "preco-desc",
1298
1280
  "area-asc",
@@ -1932,6 +1914,8 @@ function currentSearchHref(pathname, search) {
1932
1914
  return qs ? `${path}?${qs}` : path;
1933
1915
  }
1934
1916
  function canonicalizeSearchHref(pathname, search, dictionary) {
1917
+ if (pathname.includes("/api/v0-preview/")) return null;
1918
+ if (isListingDetailPath(pathname)) return null;
1935
1919
  const { pathFilters, applied } = readPublicSearch(
1936
1920
  pathname,
1937
1921
  search,
@@ -2207,7 +2191,7 @@ function listingValues(listing) {
2207
2191
  if (propertyTax != null) {
2208
2192
  values.push({
2209
2193
  key: "propertyTax",
2210
- label: "IPTU",
2194
+ label: listing.propertyTaxLabel?.trim() || "IPTU",
2211
2195
  text: formatListingPrice(propertyTax)
2212
2196
  });
2213
2197
  }
@@ -2376,25 +2360,23 @@ var STUDIO_SDK_CONTRACT = {
2376
2360
  * 0.4.12 (`visibleSearchFilters` / `toolbarFilterIds` are on that pin).
2377
2361
  */
2378
2362
  minNpmVersion: "0.4.12",
2379
- /** First release where ListingCard and ResultsSkeleton inject card CSS. */
2363
+ /** Historical: older tarballs inject card CSS when those components mount. */
2380
2364
  selfInjectSince: "0.4.2",
2381
- chromeStrategy: "self-inject",
2382
- reactExports: ["usePublicSearch", "ListingCard", "ResultsSkeleton"],
2365
+ chromeStrategy: "app-owned",
2366
+ reactExports: ["usePublicSearch"],
2383
2367
  /**
2384
- * Names that exist in git / the unpublished patch. Completeness treats an
2368
+ * Names that exist in git / unpublished patches. Completeness treats an
2385
2369
  * import as `sdk-export-mismatch` when the generated pin is older than
2386
2370
  * `since`. Studio prompts must not mention these names at all (even as
2387
2371
  * “never import”) — v0 copies the identifier and the preview ESM loader
2388
2372
  * throws FatalRendererError.
2389
2373
  */
2390
- optionalReactExports: {
2391
- SearchChromeStyles: "0.4.1",
2392
- ListingDetailFields: "0.4.13"
2393
- },
2374
+ optionalReactExports: {},
2394
2375
  /**
2395
- * Former `/react` chrome. Completeness flags imports as mismatch (not in
2396
- * `reactExports`). Prompts must not mention these names at all — v0 copies
2397
- * identifiers even inside “never import”.
2376
+ * Former `/react` chrome (including card/skeleton inject). Completeness
2377
+ * flags imports as mismatch (not in `reactExports`). Prompts must not
2378
+ * mention these names at all — v0 copies identifiers even inside
2379
+ * “never import”.
2398
2380
  */
2399
2381
  retiredReactExports: [
2400
2382
  "SearchPage",
@@ -2402,7 +2384,11 @@ var STUDIO_SDK_CONTRACT = {
2402
2384
  "SearchSortSelect",
2403
2385
  "FilterPanel",
2404
2386
  "SearchPagination",
2405
- "SearchPageFallback"
2387
+ "SearchPageFallback",
2388
+ "ListingCard",
2389
+ "ResultsSkeleton",
2390
+ "SearchChromeStyles",
2391
+ "ListingDetailFields"
2406
2392
  ],
2407
2393
  forbiddenImports: ["@garagem-ai/site-sdk/react/search.css"],
2408
2394
  leadStrategy: "visit-default",
@@ -2417,6 +2403,14 @@ var STUDIO_SDK_CONTRACT = {
2417
2403
  "STUDIO_DEFAULT_VISIT_SCHEDULE"
2418
2404
  ],
2419
2405
  listingDetailExports: ["listingDetailModel", "getSimilarListings"],
2406
+ /** Main-package card helpers — markup stays in the generated app. */
2407
+ listingCardExports: [
2408
+ "toListingCardModel",
2409
+ "listingPublicPath",
2410
+ "formatAreaM2",
2411
+ "listingBusinessLabel",
2412
+ "formatListingPrice"
2413
+ ],
2420
2414
  amenityExports: ["listingAmenityGroups"],
2421
2415
  /**
2422
2416
  * Names already on the pinned npm tarball (`minNpmVersion` / 0.4.12) —
@@ -2470,7 +2464,7 @@ ${studioSiteWidthCss()}
2470
2464
  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.`;
2471
2465
  }
2472
2466
  function studioSearchLandmarkInstruction() {
2473
- return `Search at \`/imoveis\` (hard rule). The page landmark is \`<main className="${STUDIO_SITE_LAYOUT.searchMainClassName}">\` with one child \`${STUDIO_SITE_LAYOUT.wrapperClassName}\`. Wire the catalog with \`usePublicSearch\` from \`${STUDIO_SDK_PACKAGE}/react\` inside \`<Suspense fallback={<ResultsSkeleton />}>\`. Do not wrap the search UI in \`<section>\` or a second max-width. The page owns the SEO heading as \`<div data-slot="search-heading">\`: count \`<span data-slot="search-heading-count">\` FIRST, then \`<h1 data-slot="search-heading-title">\` \u2014 never put the count inside the H1 and never put the h1 first. \`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.`;
2467
+ return `Search at \`/imoveis\` (hard rule). The page landmark is \`<main className="${STUDIO_SITE_LAYOUT.searchMainClassName}">\` with one child \`${STUDIO_SITE_LAYOUT.wrapperClassName}\`. Wire the catalog with \`usePublicSearch\` from \`${STUDIO_SDK_PACKAGE}/react\` inside \`<Suspense>\` whose fallback is the site listing-card-skeleton module. Do not wrap the search UI in \`<section>\` or a second max-width. The page owns the SEO heading as \`<div data-slot="search-heading">\`: count \`<span data-slot="search-heading-count">\` FIRST, then \`<h1 data-slot="search-heading-title">\` \u2014 never put the count inside the H1 and never put the h1 first. \`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.`;
2474
2468
  }
2475
2469
  var REACT_SDK_NAMED_IMPORT_RE = /(?:^|[\n;])\s*import\s+(?!type\b)(?:type\s+)?\{([^}]+)\}\s+from\s+['"]@garagem-ai\/site-sdk\/react['"]/g;
2476
2470
  var SHOWCASE_LEADS_POST_URL_RE = /\/api\/sites\/[^\s"']*\/leads(?!\/ui)/;
@@ -2535,20 +2529,24 @@ function studioLeadInstruction() {
2535
2529
  const names = STUDIO_SDK_CONTRACT.leadExports.join(", ");
2536
2530
  return `Listing-detail visit/contact leads: import ${names} from \`${STUDIO_SDK_PACKAGE}\` (the main package, not \`/react\`). Call \`submitVisitLead\` / \`submitContactLead\` \u2014 never concatenate a leads webhook URL and never POST the Showcase demo leads route.`;
2537
2531
  }
2532
+ function studioListingCardInstruction() {
2533
+ const names = STUDIO_SDK_CONTRACT.listingCardExports.join(", ");
2534
+ return `Listing card (site-wide). WRITE \`components/garagem/listing-card.tsx\` \u2014 one module for home, search results, and similar listings. Do not invent a second card. From \`${STUDIO_SDK_PACKAGE}\` import ${names}. \`const model = toListingCardModel(listing)\`. href is \`model.href\` / \`listingPublicPath(listing)\` \u2014 never \`listing.id\` or \`property.id\`. Skip the card or omit the link when href is empty (no \`href=""\`, no \`href="#"\`). Must show title (\`model.title\`) and price (\`model.priceLabel\` \u2014 \u201CSob consulta\u201D when private; \`model.pricePeriod\` \u201C/m\xEAs\u201D when present, omit when null). Photo: \`model.coverSrc\` as img \`src\`, alt \`model.coverAlt\`; skip the img when cover is missing; an empty-photo block is allowed; never Unsplash, \`/placeholder.svg\`, or invented \`?query=\` images. Show when present, omit the line when missing: \`locationLabel\` (else \`propertyType\`), \`listingBusinessLabel\` / \`model.businessLabel\`, bedrooms, bathrooms, parkingSpaces, area via \`formatAreaM2\`. Never interpolate the listing object as a React child. Design is free (grid vs carousel vs mosaic; radius is site \`--radius\`). WRITE \`components/garagem/listing-card-skeleton.tsx\` for the search \`<Suspense>\` fallback \u2014 it should suggest the card surface, never the text \u201CCarregando im\xF3veis\u2026\u201D. Do not \`if (search.loading) return\` that skeleton inside the search client.`;
2535
+ }
2538
2536
  function studioListingDetailInstruction() {
2539
2537
  const names = STUDIO_SDK_CONTRACT.listingDetailExports.join(", ");
2540
- return `Listing detail: import ${names} from \`${STUDIO_SDK_PACKAGE}\` and \`ListingCard\` from \`${STUDIO_SDK_PACKAGE}/react\`. Render \`listingDetailModel\` leaves: \`model.facts[].label\` / \`.text\`, \`model.values[].label\` / \`.text\`, \`model.location.label\` / \`model.location.mapsHref\`, breadcrumb \`.href\` (search prefixes of \`listing.path\`). \`model.description\` is the complete string \u2014 do not slice. Never interpolate \`model.location\`, \`model.facts\`, \`model.values\`, \`model.breadcrumb\`, or \`model.mediaOverlays\` as a React child. Video/tour: \`model.mediaOverlays\` as hash links (\`#video\` / \`#tour\`) and a fullscreen overlay that closes with browser back; omit when empty. Similar listings: \`getSimilarListings({ siteId, listingId, baseUrl })\` + \`ListingCard\`; hide the section when empty. Do not invent a local recommendation loop.`;
2538
+ return `Listing detail: import ${names} from \`${STUDIO_SDK_PACKAGE}\`. Render \`listingDetailModel\` leaves: \`model.facts[].label\` / \`.text\`, \`model.values[].label\` / \`.text\`, \`model.location.label\` / \`model.location.mapsHref\`, breadcrumb \`.href\` (search prefixes of \`listing.path\`). The pre\xE7o / sob consulta entry is the primary value; condom\xEDnio and IPTU are secondary and omitted when missing. \`model.description\` is the complete string \u2014 do not slice. A collapsed disclosure uses a container (max-height or overflow), not a cut of the string. Never interpolate \`model.location\`, \`model.facts\`, \`model.values\`, \`model.breadcrumb\`, or \`model.mediaOverlays\` as a React child. Video/tour: \`model.mediaOverlays\` as hash links (\`#video\` / \`#tour\`); player src is \`embedSrc\`; fullscreen overlay closes with browser back; omit when that overlay is absent. Do not key the page on \`location.hash\`. Similar listings: \`getSimilarListings({ siteId, listingId, baseUrl })\` plus the site listing-card module; hide the section when empty. Do not invent a local recommendation loop.`;
2541
2539
  }
2542
2540
  function studioAmenityInstruction() {
2543
- return `Listing amenities: Portuguese labels from \`listingAmenityGroups(listing)\` (optional dictionary from \`getSearchUi()\`). Each group is \`{ title, labels: string[] }\` \u2014 render \`group.labels.map((label) => \u2026)\` and hide a group when \`group.labels.length === 0\`. Titles: \`Comodidades\` / \`Comodidades do condom\xEDnio\`. Never print amenity ids, never invent a local label map, and never title a section "Comodidades da unidade".`;
2541
+ return `Listing amenities: Portuguese labels from \`listingAmenityGroups(listing, dictionary)\` (pass the dictionary from \`getSearchUi()\` so section titles follow Campos). Each group is \`{ title, labels: string[] }\` \u2014 render \`group.title\` and \`group.labels.map((label) => \u2026)\` and hide a group when \`group.labels.length === 0\`. Do not hardcode section titles. Never print amenity ids, never invent a local label map, and never title a section "Comodidades da unidade".`;
2544
2542
  }
2545
2543
  function studioSearchInstruction() {
2546
2544
  const reactNames = STUDIO_SDK_CONTRACT.reactExports.join(", ");
2547
2545
  const libNames = STUDIO_SDK_CONTRACT.searchExports.join(", ");
2548
- return `Search: import ${reactNames} from \`${STUDIO_SDK_PACKAGE}/react\`. From \`${STUDIO_SDK_PACKAGE}\` import ${libNames}. Call \`const search = usePublicSearch({ siteId, baseUrl: GARAGEM_API_BASE })\` in a client component inside \`<Suspense>\` (\`useSearchParams\`). Compose the page UI in the app \u2014 do not paste a canonical search TSX. Required chrome (design is free; omit none): query (\`qDraft\` / \`setQDraft\` / form \`preventDefault\` + \`submitQuery\`), heading (count span FIRST then h1 from \`searchResultsHeading(search.pathFilters, search.schema?.dictionary, search.locationNames)\` \u2014 never \`searchResultsHeading({})\`), toolbar (\`toolbarFilterIds\` + \`applyFilter\`; range \u201CAtualizar\u201D on that toolbar item only) vs sheet (\`visibleSearchFilters\` extras, \`stageFilter\`, one footer \`applyStaged\`), sort (\`searchSortOptions\` + \`setSort\`), grid (\`listings.map\` + \`ListingCard\`; \`ResultsSkeleton\` is only the Suspense fallback), pagination (\`paginationPages\` + \`hrefWithExplicitPage\`). Never interpolate \`schema\`, \`pathFilters\`, or a filter object as a React child. \`queryListings\` key is \`params\`. The URL is the document. Empty copy: ${JSON.stringify(SEARCH_EMPTY_COPY)}`;
2546
+ return `Search: import ${reactNames} from \`${STUDIO_SDK_PACKAGE}/react\`. From \`${STUDIO_SDK_PACKAGE}\` import ${libNames}. Call \`const search = usePublicSearch({ siteId, baseUrl: GARAGEM_API_BASE })\` in a client component inside \`<Suspense>\` (\`useSearchParams\`). Compose the page UI in the app \u2014 do not paste a canonical search TSX. Required chrome (design is free; omit none): query (\`qDraft\` / \`setQDraft\` / form \`preventDefault\` + \`submitQuery\`), heading (count span FIRST then h1 from \`searchResultsHeading(search.pathFilters, search.schema?.dictionary, search.locationNames)\` \u2014 never \`searchResultsHeading({})\`), toolbar (\`toolbarFilterIds\` + \`applyFilter\`; range \u201CAtualizar\u201D on that toolbar item only) vs sheet (\`visibleSearchFilters\` extras, \`stageFilter\`, one footer \`applyStaged\`), sort (\`searchSortOptions\` + \`setSort\`; first option id is \`""\` / \u201CMais relevantes\u201D \u2014 map **only** that empty id to Select sentinel \`"relevancia"\` (\`opt.id || "relevancia"\`), never \`SelectItem value=""\` and never give \u201CMais recentes\u201D (\`id: "recentes"\`, \`?ordenar=recentes\`) that sentinel; on change \`setSort(id === "relevancia" ? "" : id)\` so recentes stays recentes. Closed trigger shows the option \`.label\`, never \`{search.applied.sort}\`), grid (\`listings.map\` + the site listing-card module; listing-card-skeleton is only the Suspense fallback; do not \`throw\` in that chrome), pagination (\`paginationPages\` + \`hrefWithExplicitPage\`). Never interpolate \`schema\`, \`pathFilters\`, or a filter object as a React child. \`queryListings\` key is \`params\`. The URL is the document. Count text is \`{search.total}\` only. Heading is one row; font size lives on the container and the span and h1 use \`font-size: inherit\`. Sort trigger shows the option label (\u201CMais relevantes\u201D when \`ordenar\` is absent), chevron at the end, same height as the toolbar controls. Toolbar ranges open a Popover form (not DropdownMenu \u2014 Menu typeahead swallows digit keys) whose submit calls \`applyFilter\`; the popup clips and the two inputs stay inside (\`min-w-0\`, no \`w-64\`). Reset min/max drafts when the popover opens and when the applied path range changes. The sheet omits toolbar ids (price, bedrooms) so Pre\xE7o is never a heading without inputs. Sheet DialogContent uses \`h-[min(640px,85dvh)]\` (not max-h alone) so the body ScrollArea can move. Tipo de im\xF3vel, caracter\xEDsticas and comodidades each use a nested ScrollArea with \`h-56 overflow-hidden\` (viewport \`h-full\`). Area is two inputs in schema order with no \u201CAplicar\u201D; the footer stages then applyStaged. Never read \`staged[filter.id]\` \u2014 path keys are \`bedrooms\` / \`listingType\` / \`bathrooms\`. Bedrooms Select reads \`pathFilters.bedrooms\` so \`/imoveis/4-quartos\` checks \`"4"\` and shows the same trigger dot as price. Bathrooms and parking pressed state uses \`pathFilterHasOption\`. Limpar keeps location plus toolbar price and bedrooms via \`clearStagedPathFilters\` and \`toolbarFilterIds\`; do not call \`clearStaged\` for that button. It enables only when staged has a path filter other than location and those kept toolbar ids. Each multi-select \`stageFilter\` value is one option id, never a concatenated slug; \`checked\` uses \`pathFilterHasOption\`. Listing type does not pass the clicked id: no path value shows every checkbox checked, unchecking one stages the other option's id, and the last box stays checked. Price inputs use formatGroupedInteger. The closed price and bedrooms triggers keep the filter label plus a dot when set \u2014 never the literal range. Empty price calls applyFilter(id, undefined); never send 0 or 1000000000. Area is a plain integer (not that mask). The results button stageFilter property_area_total with both drafts, then applyStaged. Never send 0 or 100000. Count buttons pass the option id (\`"2"\`), never the label \`"2+"\`. Property type, features, and amenities render in pt-BR label order. Do not set \`[data-slot="search-sort"] { flex-direction: column }\` in a \`<style>\` tag; that selector is row so the chevron sits beside the label. Empty copy: ${JSON.stringify(SEARCH_EMPTY_COPY)}`;
2549
2547
  }
2550
2548
  function studioChromeInstruction() {
2551
- return `ListingCard and ResultsSkeleton inject card/skeleton CSS (JS \`<style>\` tag). Never \`import "${STUDIO_SDK_CONTRACT.forbiddenImports[0]}"\` \u2014 v0 preview cannot load npm CSS. Do not copy SDK card layout into the app. Theme cards via CSS variables in \`app/globals.css\` (\`SEARCH_CSS_RECIPE\` / \`--garagem-*\`). Search chrome (query, toolbar, sort, filters, pagination) is app-owned \u2014 theme with the site tokens, not an SDK stylesheet.`;
2549
+ return `Card, skeleton, and search chrome markup are app-owned. Never \`import "${STUDIO_SDK_CONTRACT.forbiddenImports[0]}"\` \u2014 v0 preview cannot load npm CSS. Do not mount an SDK stylesheet. Theme with site tokens and \`--radius\` in \`app/globals.css\`.`;
2552
2550
  }
2553
2551
  function mentionsExportName(text, name) {
2554
2552
  return new RegExp(`\\b${name}\\b`).test(text);
@@ -2747,8 +2745,6 @@ function createGaragemClient(options = {}) {
2747
2745
  LISTING_AMENITY_TITLES,
2748
2746
  LISTING_DESCRIPTION_CLAMP,
2749
2747
  LeadSubmitError,
2750
- SEARCH_CSS_RECIPE,
2751
- SEARCH_CSS_VARS,
2752
2748
  SEARCH_EMPTY_COPY,
2753
2749
  SEARCH_SORT_RELEVANCE,
2754
2750
  STUDIO_DEFAULT_VISIT_SCHEDULE,
@@ -2837,6 +2833,7 @@ function createGaragemClient(options = {}) {
2837
2833
  studioDefaultLeadUi,
2838
2834
  studioLayoutInstruction,
2839
2835
  studioLeadInstruction,
2836
+ studioListingCardInstruction,
2840
2837
  studioListingDetailInstruction,
2841
2838
  studioSdkPinInstruction,
2842
2839
  studioSearchInstruction,