@garagem-ai/site-sdk 0.4.11 → 0.4.13
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 +29 -25
- package/dist/index.d.mts +9 -129
- package/dist/index.d.ts +9 -129
- package/dist/index.js +44 -15
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +43 -15
- package/dist/index.mjs.map +1 -1
- package/dist/react.d.mts +28 -2
- package/dist/react.d.ts +28 -2
- package/dist/react.js +645 -109
- package/dist/react.js.map +1 -1
- package/dist/react.mjs +649 -114
- package/dist/react.mjs.map +1 -1
- package/dist/{search-engine-B83s_fVd.d.mts → search-engine-1O4sKtKb.d.mts} +141 -1
- package/dist/{search-engine-B83s_fVd.d.ts → search-engine-1O4sKtKb.d.ts} +141 -1
- package/package.json +1 -1
- package/src/index.ts +7 -0
- package/src/listing-detail-fields.ts +59 -0
- package/src/listing-detail.ts +27 -5
- package/src/react/index.ts +5 -0
- package/src/react/listing-detail-fields.tsx +119 -0
- package/src/react/search-page.tsx +7 -0
- package/src/react/styles/search-chrome-css.generated.ts +1 -1
- package/src/react/types.ts +1 -0
- package/src/studio-contract.ts +9 -10
|
@@ -378,6 +378,146 @@ interface RequestNextOptions {
|
|
|
378
378
|
tags?: string[];
|
|
379
379
|
}
|
|
380
380
|
|
|
381
|
+
/**
|
|
382
|
+
* Portuguese labels for listing amenity ids. Tenant search-ui dictionary
|
|
383
|
+
* wins; this map is the default-catalog fallback so generated Studio pages
|
|
384
|
+
* never print camelCase keys.
|
|
385
|
+
*/
|
|
386
|
+
declare const LISTING_AMENITY_TITLES: {
|
|
387
|
+
readonly unit: "Comodidades";
|
|
388
|
+
readonly building: "Comodidades do condomínio";
|
|
389
|
+
};
|
|
390
|
+
type AmenityLabelOption = {
|
|
391
|
+
id: string;
|
|
392
|
+
label: string;
|
|
393
|
+
};
|
|
394
|
+
type AmenityLabelDictionary = {
|
|
395
|
+
propertyFeatures?: AmenityLabelOption[];
|
|
396
|
+
buildingAmenities?: AmenityLabelOption[];
|
|
397
|
+
};
|
|
398
|
+
type ListingAmenityGroupKey = keyof typeof LISTING_AMENITY_TITLES;
|
|
399
|
+
type ListingAmenityGroup = {
|
|
400
|
+
key: ListingAmenityGroupKey;
|
|
401
|
+
title: string;
|
|
402
|
+
labels: string[];
|
|
403
|
+
};
|
|
404
|
+
type ListingAmenitySource = {
|
|
405
|
+
amenities?: string[] | null;
|
|
406
|
+
propertyFeatures?: string[] | null;
|
|
407
|
+
/** Condo amenity ids, even when `building` is null (no buildingId). */
|
|
408
|
+
buildingAmenities?: string[] | null;
|
|
409
|
+
building?: {
|
|
410
|
+
amenities?: string[] | null;
|
|
411
|
+
} | null;
|
|
412
|
+
};
|
|
413
|
+
/**
|
|
414
|
+
* Default tenant ids + canonical `has*` / `is*` keys seen on public listings.
|
|
415
|
+
* Aligned with DEFAULT_PROPERTY_FEATURES and DEFAULT_BUILDING_FEATURES from
|
|
416
|
+
* Foundation's field-definitions.ts so generated Studio pages never need a
|
|
417
|
+
* dictionary for standard amenities.
|
|
418
|
+
*/
|
|
419
|
+
declare const AMENITY_FALLBACK_LABELS: Record<string, string>;
|
|
420
|
+
declare function labelAmenities(ids: readonly string[] | null | undefined, dictionary?: AmenityLabelOption[]): string[];
|
|
421
|
+
declare function listingAmenityGroups(listing: ListingAmenitySource, dictionary?: AmenityLabelDictionary): ListingAmenityGroup[];
|
|
422
|
+
|
|
423
|
+
declare const LISTING_DESCRIPTION_CLAMP = 280;
|
|
424
|
+
/** Visible listing fact. The number / area / floor is `text` — never omit it. */
|
|
425
|
+
type ListingFact = {
|
|
426
|
+
key: string;
|
|
427
|
+
label: string;
|
|
428
|
+
text: string;
|
|
429
|
+
};
|
|
430
|
+
/** Visible listing amount. Price, condomínio and IPTU are `text`. */
|
|
431
|
+
type ListingValue = {
|
|
432
|
+
key: string;
|
|
433
|
+
label: string;
|
|
434
|
+
text: string;
|
|
435
|
+
};
|
|
436
|
+
type ListingBreadcrumbCrumb = {
|
|
437
|
+
label: string;
|
|
438
|
+
href: string;
|
|
439
|
+
};
|
|
440
|
+
type ListingLocationBlock = {
|
|
441
|
+
label: string;
|
|
442
|
+
mapsHref: string | null;
|
|
443
|
+
};
|
|
444
|
+
type ListingDescriptionPreview = {
|
|
445
|
+
text: string;
|
|
446
|
+
truncated: boolean;
|
|
447
|
+
toggleLabel: string | null;
|
|
448
|
+
};
|
|
449
|
+
type ListingMediaOverlay = {
|
|
450
|
+
key: "video" | "tour";
|
|
451
|
+
hash: "video" | "tour";
|
|
452
|
+
title: string;
|
|
453
|
+
href: string;
|
|
454
|
+
embedSrc: string;
|
|
455
|
+
};
|
|
456
|
+
type ListingDetailModel = {
|
|
457
|
+
breadcrumb: ListingBreadcrumbCrumb[];
|
|
458
|
+
values: ListingValue[];
|
|
459
|
+
facts: ListingFact[];
|
|
460
|
+
location: ListingLocationBlock | null;
|
|
461
|
+
/** Complete description string — never a sliced preview. */
|
|
462
|
+
description: string | null;
|
|
463
|
+
descriptionTruncated: boolean;
|
|
464
|
+
descriptionToggleLabel: string | null;
|
|
465
|
+
mediaOverlays: ListingMediaOverlay[];
|
|
466
|
+
};
|
|
467
|
+
declare function listingValues(listing: {
|
|
468
|
+
price?: number | null;
|
|
469
|
+
priceVisibility?: string | null;
|
|
470
|
+
property?: {
|
|
471
|
+
condoFee?: number | null;
|
|
472
|
+
propertyTax?: number | null;
|
|
473
|
+
} | null;
|
|
474
|
+
}): ListingValue[];
|
|
475
|
+
declare function listingFacts(listing: {
|
|
476
|
+
property?: {
|
|
477
|
+
totalArea?: number | null;
|
|
478
|
+
usableArea?: number | null;
|
|
479
|
+
bedrooms?: number | null;
|
|
480
|
+
suites?: number | null;
|
|
481
|
+
parkingSpaces?: number | null;
|
|
482
|
+
rooms?: number | null;
|
|
483
|
+
floor?: number | string | null;
|
|
484
|
+
} | null;
|
|
485
|
+
}): ListingFact[];
|
|
486
|
+
declare function listingMapsHref(location: ListingLocation | null | undefined): string | null;
|
|
487
|
+
declare function listingLocationBlock(listing: {
|
|
488
|
+
location?: ListingLocation | null;
|
|
489
|
+
} | null | undefined): ListingLocationBlock | null;
|
|
490
|
+
declare function listingBreadcrumb(listing: {
|
|
491
|
+
path?: string | null;
|
|
492
|
+
listingCode?: string | null;
|
|
493
|
+
id?: string | null;
|
|
494
|
+
}): ListingBreadcrumbCrumb[];
|
|
495
|
+
declare function listingDescriptionPreview(description: string | null | undefined, expanded?: boolean): ListingDescriptionPreview | null;
|
|
496
|
+
declare function listingMediaOverlays(listing: {
|
|
497
|
+
media?: ListingMedia[] | null;
|
|
498
|
+
}): ListingMediaOverlay[];
|
|
499
|
+
declare function listingDetailModel(listing: Pick<ListingDetail, "id" | "listingCode" | "path" | "price" | "priceVisibility" | "description"> & {
|
|
500
|
+
property?: ListingDetail["property"] | null;
|
|
501
|
+
location?: ListingLocation | null;
|
|
502
|
+
media?: ListingMedia[] | null;
|
|
503
|
+
}, options?: {
|
|
504
|
+
descriptionExpanded?: boolean;
|
|
505
|
+
}): ListingDetailModel;
|
|
506
|
+
|
|
507
|
+
type ListingDetailFieldsModel = {
|
|
508
|
+
facts: ListingFact[];
|
|
509
|
+
values: ListingValue[];
|
|
510
|
+
amenityGroups: ListingAmenityGroup[];
|
|
511
|
+
};
|
|
512
|
+
type ListingDetailFieldsSource = ListingAmenitySource & Pick<ListingDetail, "price" | "priceVisibility"> & {
|
|
513
|
+
property?: ListingDetail["property"] | null;
|
|
514
|
+
};
|
|
515
|
+
/**
|
|
516
|
+
* Facts, values, and amenity groups that are safe to render: every row has
|
|
517
|
+
* a real label and text. Missing condo/IPTU/empty facts never appear.
|
|
518
|
+
*/
|
|
519
|
+
declare function listingDetailFieldsModel(listing: ListingDetailFieldsSource, dictionary?: AmenityLabelDictionary): ListingDetailFieldsModel;
|
|
520
|
+
|
|
381
521
|
/** Fields every listing card must have — no JSX. */
|
|
382
522
|
type ListingCardModel = {
|
|
383
523
|
href: string;
|
|
@@ -484,4 +624,4 @@ declare function searchResultsHeading(pathFilters: SearchPathFilters, dictionary
|
|
|
484
624
|
declare function hrefWithExplicitPage(href: string, page: number): string;
|
|
485
625
|
declare function paginationPages(currentPage: number, totalPages: number, padding: number): number[];
|
|
486
626
|
|
|
487
|
-
export {
|
|
627
|
+
export { type SearchUiOption as $, type AppliedSearchQuery as A, type ListingBreadcrumbCrumb as B, type CmsCollection as C, type ListingBusinessType as D, type ListingCardModel as E, FORBIDDEN_SEARCH_QUERY_KEYS as F, type ListingDescriptionPreview as G, type ListingDetailFieldsModel as H, type ListingDetailFieldsSource as I, type ListingDetailModel as J, type ListingFact as K, type ListingFilters as L, type ListingLocation as M, type ListingLocationBlock as N, type ListingMedia as O, type ListingMediaOverlay as P, type QueryListingsParams as Q, type RequestNextOptions as R, type SearchListingsParams as S, type ListingPriceVisibility as T, type ListingPropertySummary as U, type ListingValue as V, type LocationNameTables as W, type QueryListingsLocation as X, SEARCH_SORT_RELEVANCE as Y, type SearchPathLocation as Z, type SearchUiFilter as _, type CmsEntriesResult as a, TOOLBAR_PRIMARY_FILTER_IDS as a0, applyPathFilter as a1, buildQueryListingsParams as a2, canonicalizeSearchHref as a3, clearStagedPathFilters as a4, countFacetChoices as a5, countOptionLabel as a6, displayPathLocation as a7, hrefForAppliedChange as a8, hrefForPathFilters as a9, hrefWithExplicitPage as aa, isListingDetailPath as ab, labelAmenities as ac, listingAmenityGroups as ad, listingBreadcrumb as ae, listingDescriptionPreview as af, listingDetailFieldsModel as ag, listingDetailModel as ah, listingFacts as ai, listingLocationBlock as aj, listingLocationLabel as ak, listingMapsHref as al, listingMediaOverlays as am, listingValues as an, paginationPages as ao, pathFilterHasOption as ap, pathFilterValue as aq, publicSearchHref as ar, readPublicSearch as as, searchHrefUsesLegacyFilterQuery as at, searchResultsHeading as au, searchSortOptions as av, toListingCardModel as aw, toolbarFilterIds as ax, visibleSearchFilters as ay, type CmsEntry as b, type ListingDetail as c, type ListingsResult as d, type SearchUi as e, type SimilarListingsResult as f, type Site as g, type QueryListingsResult as h, type SearchListingsResult as i, type SearchPathFilters as j, type SearchUiDictionary as k, type QueryListingsFilters as l, type AppliedSearchChange as m, AMENITY_FALLBACK_LABELS as n, type AmenityLabelDictionary as o, type AmenityLabelOption as p, type CmsEntryStatus as q, type CmsFieldDefinition as r, type CmsFieldType as s, type CmsSeoData as t, LISTING_AMENITY_TITLES as u, LISTING_DESCRIPTION_CLAMP as v, type Listing as w, type ListingAmenityGroup as x, type ListingAmenityGroupKey as y, type ListingAmenitySource as z };
|
|
@@ -378,6 +378,146 @@ interface RequestNextOptions {
|
|
|
378
378
|
tags?: string[];
|
|
379
379
|
}
|
|
380
380
|
|
|
381
|
+
/**
|
|
382
|
+
* Portuguese labels for listing amenity ids. Tenant search-ui dictionary
|
|
383
|
+
* wins; this map is the default-catalog fallback so generated Studio pages
|
|
384
|
+
* never print camelCase keys.
|
|
385
|
+
*/
|
|
386
|
+
declare const LISTING_AMENITY_TITLES: {
|
|
387
|
+
readonly unit: "Comodidades";
|
|
388
|
+
readonly building: "Comodidades do condomínio";
|
|
389
|
+
};
|
|
390
|
+
type AmenityLabelOption = {
|
|
391
|
+
id: string;
|
|
392
|
+
label: string;
|
|
393
|
+
};
|
|
394
|
+
type AmenityLabelDictionary = {
|
|
395
|
+
propertyFeatures?: AmenityLabelOption[];
|
|
396
|
+
buildingAmenities?: AmenityLabelOption[];
|
|
397
|
+
};
|
|
398
|
+
type ListingAmenityGroupKey = keyof typeof LISTING_AMENITY_TITLES;
|
|
399
|
+
type ListingAmenityGroup = {
|
|
400
|
+
key: ListingAmenityGroupKey;
|
|
401
|
+
title: string;
|
|
402
|
+
labels: string[];
|
|
403
|
+
};
|
|
404
|
+
type ListingAmenitySource = {
|
|
405
|
+
amenities?: string[] | null;
|
|
406
|
+
propertyFeatures?: string[] | null;
|
|
407
|
+
/** Condo amenity ids, even when `building` is null (no buildingId). */
|
|
408
|
+
buildingAmenities?: string[] | null;
|
|
409
|
+
building?: {
|
|
410
|
+
amenities?: string[] | null;
|
|
411
|
+
} | null;
|
|
412
|
+
};
|
|
413
|
+
/**
|
|
414
|
+
* Default tenant ids + canonical `has*` / `is*` keys seen on public listings.
|
|
415
|
+
* Aligned with DEFAULT_PROPERTY_FEATURES and DEFAULT_BUILDING_FEATURES from
|
|
416
|
+
* Foundation's field-definitions.ts so generated Studio pages never need a
|
|
417
|
+
* dictionary for standard amenities.
|
|
418
|
+
*/
|
|
419
|
+
declare const AMENITY_FALLBACK_LABELS: Record<string, string>;
|
|
420
|
+
declare function labelAmenities(ids: readonly string[] | null | undefined, dictionary?: AmenityLabelOption[]): string[];
|
|
421
|
+
declare function listingAmenityGroups(listing: ListingAmenitySource, dictionary?: AmenityLabelDictionary): ListingAmenityGroup[];
|
|
422
|
+
|
|
423
|
+
declare const LISTING_DESCRIPTION_CLAMP = 280;
|
|
424
|
+
/** Visible listing fact. The number / area / floor is `text` — never omit it. */
|
|
425
|
+
type ListingFact = {
|
|
426
|
+
key: string;
|
|
427
|
+
label: string;
|
|
428
|
+
text: string;
|
|
429
|
+
};
|
|
430
|
+
/** Visible listing amount. Price, condomínio and IPTU are `text`. */
|
|
431
|
+
type ListingValue = {
|
|
432
|
+
key: string;
|
|
433
|
+
label: string;
|
|
434
|
+
text: string;
|
|
435
|
+
};
|
|
436
|
+
type ListingBreadcrumbCrumb = {
|
|
437
|
+
label: string;
|
|
438
|
+
href: string;
|
|
439
|
+
};
|
|
440
|
+
type ListingLocationBlock = {
|
|
441
|
+
label: string;
|
|
442
|
+
mapsHref: string | null;
|
|
443
|
+
};
|
|
444
|
+
type ListingDescriptionPreview = {
|
|
445
|
+
text: string;
|
|
446
|
+
truncated: boolean;
|
|
447
|
+
toggleLabel: string | null;
|
|
448
|
+
};
|
|
449
|
+
type ListingMediaOverlay = {
|
|
450
|
+
key: "video" | "tour";
|
|
451
|
+
hash: "video" | "tour";
|
|
452
|
+
title: string;
|
|
453
|
+
href: string;
|
|
454
|
+
embedSrc: string;
|
|
455
|
+
};
|
|
456
|
+
type ListingDetailModel = {
|
|
457
|
+
breadcrumb: ListingBreadcrumbCrumb[];
|
|
458
|
+
values: ListingValue[];
|
|
459
|
+
facts: ListingFact[];
|
|
460
|
+
location: ListingLocationBlock | null;
|
|
461
|
+
/** Complete description string — never a sliced preview. */
|
|
462
|
+
description: string | null;
|
|
463
|
+
descriptionTruncated: boolean;
|
|
464
|
+
descriptionToggleLabel: string | null;
|
|
465
|
+
mediaOverlays: ListingMediaOverlay[];
|
|
466
|
+
};
|
|
467
|
+
declare function listingValues(listing: {
|
|
468
|
+
price?: number | null;
|
|
469
|
+
priceVisibility?: string | null;
|
|
470
|
+
property?: {
|
|
471
|
+
condoFee?: number | null;
|
|
472
|
+
propertyTax?: number | null;
|
|
473
|
+
} | null;
|
|
474
|
+
}): ListingValue[];
|
|
475
|
+
declare function listingFacts(listing: {
|
|
476
|
+
property?: {
|
|
477
|
+
totalArea?: number | null;
|
|
478
|
+
usableArea?: number | null;
|
|
479
|
+
bedrooms?: number | null;
|
|
480
|
+
suites?: number | null;
|
|
481
|
+
parkingSpaces?: number | null;
|
|
482
|
+
rooms?: number | null;
|
|
483
|
+
floor?: number | string | null;
|
|
484
|
+
} | null;
|
|
485
|
+
}): ListingFact[];
|
|
486
|
+
declare function listingMapsHref(location: ListingLocation | null | undefined): string | null;
|
|
487
|
+
declare function listingLocationBlock(listing: {
|
|
488
|
+
location?: ListingLocation | null;
|
|
489
|
+
} | null | undefined): ListingLocationBlock | null;
|
|
490
|
+
declare function listingBreadcrumb(listing: {
|
|
491
|
+
path?: string | null;
|
|
492
|
+
listingCode?: string | null;
|
|
493
|
+
id?: string | null;
|
|
494
|
+
}): ListingBreadcrumbCrumb[];
|
|
495
|
+
declare function listingDescriptionPreview(description: string | null | undefined, expanded?: boolean): ListingDescriptionPreview | null;
|
|
496
|
+
declare function listingMediaOverlays(listing: {
|
|
497
|
+
media?: ListingMedia[] | null;
|
|
498
|
+
}): ListingMediaOverlay[];
|
|
499
|
+
declare function listingDetailModel(listing: Pick<ListingDetail, "id" | "listingCode" | "path" | "price" | "priceVisibility" | "description"> & {
|
|
500
|
+
property?: ListingDetail["property"] | null;
|
|
501
|
+
location?: ListingLocation | null;
|
|
502
|
+
media?: ListingMedia[] | null;
|
|
503
|
+
}, options?: {
|
|
504
|
+
descriptionExpanded?: boolean;
|
|
505
|
+
}): ListingDetailModel;
|
|
506
|
+
|
|
507
|
+
type ListingDetailFieldsModel = {
|
|
508
|
+
facts: ListingFact[];
|
|
509
|
+
values: ListingValue[];
|
|
510
|
+
amenityGroups: ListingAmenityGroup[];
|
|
511
|
+
};
|
|
512
|
+
type ListingDetailFieldsSource = ListingAmenitySource & Pick<ListingDetail, "price" | "priceVisibility"> & {
|
|
513
|
+
property?: ListingDetail["property"] | null;
|
|
514
|
+
};
|
|
515
|
+
/**
|
|
516
|
+
* Facts, values, and amenity groups that are safe to render: every row has
|
|
517
|
+
* a real label and text. Missing condo/IPTU/empty facts never appear.
|
|
518
|
+
*/
|
|
519
|
+
declare function listingDetailFieldsModel(listing: ListingDetailFieldsSource, dictionary?: AmenityLabelDictionary): ListingDetailFieldsModel;
|
|
520
|
+
|
|
381
521
|
/** Fields every listing card must have — no JSX. */
|
|
382
522
|
type ListingCardModel = {
|
|
383
523
|
href: string;
|
|
@@ -484,4 +624,4 @@ declare function searchResultsHeading(pathFilters: SearchPathFilters, dictionary
|
|
|
484
624
|
declare function hrefWithExplicitPage(href: string, page: number): string;
|
|
485
625
|
declare function paginationPages(currentPage: number, totalPages: number, padding: number): number[];
|
|
486
626
|
|
|
487
|
-
export {
|
|
627
|
+
export { type SearchUiOption as $, type AppliedSearchQuery as A, type ListingBreadcrumbCrumb as B, type CmsCollection as C, type ListingBusinessType as D, type ListingCardModel as E, FORBIDDEN_SEARCH_QUERY_KEYS as F, type ListingDescriptionPreview as G, type ListingDetailFieldsModel as H, type ListingDetailFieldsSource as I, type ListingDetailModel as J, type ListingFact as K, type ListingFilters as L, type ListingLocation as M, type ListingLocationBlock as N, type ListingMedia as O, type ListingMediaOverlay as P, type QueryListingsParams as Q, type RequestNextOptions as R, type SearchListingsParams as S, type ListingPriceVisibility as T, type ListingPropertySummary as U, type ListingValue as V, type LocationNameTables as W, type QueryListingsLocation as X, SEARCH_SORT_RELEVANCE as Y, type SearchPathLocation as Z, type SearchUiFilter as _, type CmsEntriesResult as a, TOOLBAR_PRIMARY_FILTER_IDS as a0, applyPathFilter as a1, buildQueryListingsParams as a2, canonicalizeSearchHref as a3, clearStagedPathFilters as a4, countFacetChoices as a5, countOptionLabel as a6, displayPathLocation as a7, hrefForAppliedChange as a8, hrefForPathFilters as a9, hrefWithExplicitPage as aa, isListingDetailPath as ab, labelAmenities as ac, listingAmenityGroups as ad, listingBreadcrumb as ae, listingDescriptionPreview as af, listingDetailFieldsModel as ag, listingDetailModel as ah, listingFacts as ai, listingLocationBlock as aj, listingLocationLabel as ak, listingMapsHref as al, listingMediaOverlays as am, listingValues as an, paginationPages as ao, pathFilterHasOption as ap, pathFilterValue as aq, publicSearchHref as ar, readPublicSearch as as, searchHrefUsesLegacyFilterQuery as at, searchResultsHeading as au, searchSortOptions as av, toListingCardModel as aw, toolbarFilterIds as ax, visibleSearchFilters as ay, type CmsEntry as b, type ListingDetail as c, type ListingsResult as d, type SearchUi as e, type SimilarListingsResult as f, type Site as g, type QueryListingsResult as h, type SearchListingsResult as i, type SearchPathFilters as j, type SearchUiDictionary as k, type QueryListingsFilters as l, type AppliedSearchChange as m, AMENITY_FALLBACK_LABELS as n, type AmenityLabelDictionary as o, type AmenityLabelOption as p, type CmsEntryStatus as q, type CmsFieldDefinition as r, type CmsFieldType as s, type CmsSeoData as t, LISTING_AMENITY_TITLES as u, LISTING_DESCRIPTION_CLAMP as v, type Listing as w, type ListingAmenityGroup as x, type ListingAmenityGroupKey as y, type ListingAmenitySource as z };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@garagem-ai/site-sdk",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.13",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Typed, runtime-agnostic SDK for building custom real estate sites against the Garagem platform. Drop into any Next.js (or other JS) project to fetch listings, sites and CMS data.",
|
|
6
6
|
"main": "./dist/index.js",
|
package/src/index.ts
CHANGED
|
@@ -140,12 +140,19 @@ export {
|
|
|
140
140
|
listingValues,
|
|
141
141
|
type ListingBreadcrumbCrumb,
|
|
142
142
|
type ListingDescriptionPreview,
|
|
143
|
+
type ListingDetailModel,
|
|
143
144
|
type ListingFact,
|
|
144
145
|
type ListingLocationBlock,
|
|
145
146
|
type ListingMediaOverlay,
|
|
146
147
|
type ListingValue,
|
|
147
148
|
} from "./listing-detail";
|
|
148
149
|
|
|
150
|
+
export {
|
|
151
|
+
listingDetailFieldsModel,
|
|
152
|
+
type ListingDetailFieldsModel,
|
|
153
|
+
type ListingDetailFieldsSource,
|
|
154
|
+
} from "./listing-detail-fields";
|
|
155
|
+
|
|
149
156
|
export {
|
|
150
157
|
toListingCardModel,
|
|
151
158
|
listingLocationLabel,
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import {
|
|
2
|
+
listingAmenityGroups,
|
|
3
|
+
type AmenityLabelDictionary,
|
|
4
|
+
type ListingAmenityGroup,
|
|
5
|
+
type ListingAmenitySource,
|
|
6
|
+
} from "./amenity-labels";
|
|
7
|
+
import { listingFacts, listingValues } from "./listing-detail";
|
|
8
|
+
import type { ListingFact, ListingValue } from "./listing-detail";
|
|
9
|
+
import type { ListingDetail } from "./types";
|
|
10
|
+
|
|
11
|
+
function visibleText(value: string | null | undefined): string | null {
|
|
12
|
+
if (typeof value !== "string") return null;
|
|
13
|
+
const trimmed = value.trim();
|
|
14
|
+
if (!trimmed || trimmed === "undefined" || trimmed === "null") return null;
|
|
15
|
+
return trimmed;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
function visibleRows<T extends { label: string; text: string }>(
|
|
19
|
+
rows: readonly T[]
|
|
20
|
+
): T[] {
|
|
21
|
+
return rows.filter((row) => {
|
|
22
|
+
const label = visibleText(row.label);
|
|
23
|
+
const text = visibleText(row.text);
|
|
24
|
+
return label != null && text != null;
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export type ListingDetailFieldsModel = {
|
|
29
|
+
facts: ListingFact[];
|
|
30
|
+
values: ListingValue[];
|
|
31
|
+
amenityGroups: ListingAmenityGroup[];
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
export type ListingDetailFieldsSource = ListingAmenitySource &
|
|
35
|
+
Pick<ListingDetail, "price" | "priceVisibility"> & {
|
|
36
|
+
property?: ListingDetail["property"] | null;
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* Facts, values, and amenity groups that are safe to render: every row has
|
|
41
|
+
* a real label and text. Missing condo/IPTU/empty facts never appear.
|
|
42
|
+
*/
|
|
43
|
+
export function listingDetailFieldsModel(
|
|
44
|
+
listing: ListingDetailFieldsSource,
|
|
45
|
+
dictionary?: AmenityLabelDictionary
|
|
46
|
+
): ListingDetailFieldsModel {
|
|
47
|
+
return {
|
|
48
|
+
facts: visibleRows(listingFacts(listing)),
|
|
49
|
+
values: visibleRows(listingValues(listing)),
|
|
50
|
+
amenityGroups: listingAmenityGroups(listing, dictionary)
|
|
51
|
+
.map((group) => ({
|
|
52
|
+
...group,
|
|
53
|
+
labels: group.labels
|
|
54
|
+
.map((label) => visibleText(label))
|
|
55
|
+
.filter((label): label is string => label != null),
|
|
56
|
+
}))
|
|
57
|
+
.filter((group) => group.labels.length > 0),
|
|
58
|
+
};
|
|
59
|
+
}
|
package/src/listing-detail.ts
CHANGED
|
@@ -22,7 +22,9 @@ const BREADCRUMB_LABELS: Record<string, string> = {
|
|
|
22
22
|
sale: "Venda",
|
|
23
23
|
};
|
|
24
24
|
|
|
25
|
+
/** Visible listing fact. The number / area / floor is `text` — never omit it. */
|
|
25
26
|
export type ListingFact = { key: string; label: string; text: string };
|
|
27
|
+
/** Visible listing amount. Price, condomínio and IPTU are `text`. */
|
|
26
28
|
export type ListingValue = { key: string; label: string; text: string };
|
|
27
29
|
export type ListingBreadcrumbCrumb = { label: string; href: string };
|
|
28
30
|
export type ListingLocationBlock = { label: string; mapsHref: string | null };
|
|
@@ -39,6 +41,18 @@ export type ListingMediaOverlay = {
|
|
|
39
41
|
embedSrc: string;
|
|
40
42
|
};
|
|
41
43
|
|
|
44
|
+
export type ListingDetailModel = {
|
|
45
|
+
breadcrumb: ListingBreadcrumbCrumb[];
|
|
46
|
+
values: ListingValue[];
|
|
47
|
+
facts: ListingFact[];
|
|
48
|
+
location: ListingLocationBlock | null;
|
|
49
|
+
/** Complete description string — never a sliced preview. */
|
|
50
|
+
description: string | null;
|
|
51
|
+
descriptionTruncated: boolean;
|
|
52
|
+
descriptionToggleLabel: string | null;
|
|
53
|
+
mediaOverlays: ListingMediaOverlay[];
|
|
54
|
+
};
|
|
55
|
+
|
|
42
56
|
function finiteNumber(value: unknown): number | null {
|
|
43
57
|
if (typeof value === "number" && Number.isFinite(value)) return value;
|
|
44
58
|
if (typeof value === "string" && value.trim() !== "") {
|
|
@@ -342,16 +356,24 @@ export function listingDetailModel(
|
|
|
342
356
|
media?: ListingMedia[] | null;
|
|
343
357
|
},
|
|
344
358
|
options?: { descriptionExpanded?: boolean }
|
|
345
|
-
) {
|
|
359
|
+
): ListingDetailModel {
|
|
360
|
+
const text = listing.description?.trim() ?? "";
|
|
361
|
+
const description = text || null;
|
|
362
|
+
const truncated =
|
|
363
|
+
description != null && description.length > LISTING_DESCRIPTION_CLAMP;
|
|
364
|
+
const expanded = options?.descriptionExpanded === true;
|
|
346
365
|
return {
|
|
347
366
|
breadcrumb: listingBreadcrumb(listing),
|
|
348
367
|
values: listingValues(listing),
|
|
349
368
|
facts: listingFacts(listing),
|
|
350
369
|
location: listingLocationBlock(listing),
|
|
351
|
-
description
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
370
|
+
description,
|
|
371
|
+
descriptionTruncated: truncated,
|
|
372
|
+
descriptionToggleLabel: truncated
|
|
373
|
+
? expanded
|
|
374
|
+
? "Ler menos"
|
|
375
|
+
: "Ler mais"
|
|
376
|
+
: null,
|
|
355
377
|
mediaOverlays: listingMediaOverlays(listing),
|
|
356
378
|
};
|
|
357
379
|
}
|
package/src/react/index.ts
CHANGED
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
3
|
export { ListingCard } from "./listing-card";
|
|
4
|
+
export { ListingDetailFields } from "./listing-detail-fields";
|
|
5
|
+
export type {
|
|
6
|
+
ListingDetailFieldsClassNames,
|
|
7
|
+
ListingDetailFieldsProps,
|
|
8
|
+
} from "./listing-detail-fields";
|
|
4
9
|
export { SearchPage } from "./search-page";
|
|
5
10
|
export { SearchChromeStyles } from "./styles";
|
|
6
11
|
export { SearchPagination } from "./search-pagination";
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import type { CSSProperties, ReactElement } from "react";
|
|
4
|
+
|
|
5
|
+
import type { AmenityLabelDictionary } from "../amenity-labels";
|
|
6
|
+
import {
|
|
7
|
+
listingDetailFieldsModel,
|
|
8
|
+
type ListingDetailFieldsSource,
|
|
9
|
+
} from "../listing-detail-fields";
|
|
10
|
+
import { cn } from "./cn";
|
|
11
|
+
|
|
12
|
+
export type ListingDetailFieldsClassNames = {
|
|
13
|
+
root?: string;
|
|
14
|
+
facts?: string;
|
|
15
|
+
fact?: string;
|
|
16
|
+
values?: string;
|
|
17
|
+
value?: string;
|
|
18
|
+
amenityGroup?: string;
|
|
19
|
+
amenityTitle?: string;
|
|
20
|
+
amenityList?: string;
|
|
21
|
+
amenityLabel?: string;
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
export type ListingDetailFieldsProps = {
|
|
25
|
+
listing: ListingDetailFieldsSource;
|
|
26
|
+
dictionary?: AmenityLabelDictionary | null;
|
|
27
|
+
className?: string;
|
|
28
|
+
classNames?: ListingDetailFieldsClassNames;
|
|
29
|
+
style?: CSSProperties;
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Renders listing facts, values, and amenities. Omits empty rows so JSX
|
|
34
|
+
* never prints `undefined`. Theme via `data-slot` / classNames — do not
|
|
35
|
+
* reimplement these blocks in generated pages.
|
|
36
|
+
*/
|
|
37
|
+
export function ListingDetailFields({
|
|
38
|
+
listing,
|
|
39
|
+
dictionary,
|
|
40
|
+
className,
|
|
41
|
+
classNames,
|
|
42
|
+
style,
|
|
43
|
+
}: ListingDetailFieldsProps): ReactElement | null {
|
|
44
|
+
const model = listingDetailFieldsModel(listing, dictionary ?? undefined);
|
|
45
|
+
if (
|
|
46
|
+
model.facts.length === 0 &&
|
|
47
|
+
model.values.length === 0 &&
|
|
48
|
+
model.amenityGroups.length === 0
|
|
49
|
+
) {
|
|
50
|
+
return null;
|
|
51
|
+
}
|
|
52
|
+
return (
|
|
53
|
+
<div
|
|
54
|
+
data-slot="listing-detail-fields"
|
|
55
|
+
className={cn(className, classNames?.root)}
|
|
56
|
+
style={style}
|
|
57
|
+
>
|
|
58
|
+
{model.facts.length > 0 ? (
|
|
59
|
+
<ul data-slot="listing-facts" className={classNames?.facts}>
|
|
60
|
+
{model.facts.map((fact) => (
|
|
61
|
+
<li
|
|
62
|
+
key={fact.key}
|
|
63
|
+
data-slot="listing-fact"
|
|
64
|
+
data-key={fact.key}
|
|
65
|
+
className={classNames?.fact}
|
|
66
|
+
>
|
|
67
|
+
<span data-slot="listing-fact-label">{fact.label}</span>
|
|
68
|
+
<span data-slot="listing-fact-text">{fact.text}</span>
|
|
69
|
+
</li>
|
|
70
|
+
))}
|
|
71
|
+
</ul>
|
|
72
|
+
) : null}
|
|
73
|
+
{model.values.length > 0 ? (
|
|
74
|
+
<dl data-slot="listing-values" className={classNames?.values}>
|
|
75
|
+
{model.values.map((value) => (
|
|
76
|
+
<div
|
|
77
|
+
key={value.key}
|
|
78
|
+
data-slot="listing-value"
|
|
79
|
+
data-key={value.key}
|
|
80
|
+
className={classNames?.value}
|
|
81
|
+
>
|
|
82
|
+
<dt data-slot="listing-value-label">{value.label}</dt>
|
|
83
|
+
<dd data-slot="listing-value-text">{value.text}</dd>
|
|
84
|
+
</div>
|
|
85
|
+
))}
|
|
86
|
+
</dl>
|
|
87
|
+
) : null}
|
|
88
|
+
{model.amenityGroups.map((group) => (
|
|
89
|
+
<section
|
|
90
|
+
key={group.key}
|
|
91
|
+
data-slot="listing-amenities"
|
|
92
|
+
data-key={group.key}
|
|
93
|
+
className={classNames?.amenityGroup}
|
|
94
|
+
>
|
|
95
|
+
<h2
|
|
96
|
+
data-slot="listing-amenities-title"
|
|
97
|
+
className={classNames?.amenityTitle}
|
|
98
|
+
>
|
|
99
|
+
{group.title}
|
|
100
|
+
</h2>
|
|
101
|
+
<ul
|
|
102
|
+
data-slot="listing-amenities-list"
|
|
103
|
+
className={classNames?.amenityList}
|
|
104
|
+
>
|
|
105
|
+
{group.labels.map((label) => (
|
|
106
|
+
<li
|
|
107
|
+
key={label}
|
|
108
|
+
data-slot="listing-amenity-label"
|
|
109
|
+
className={classNames?.amenityLabel}
|
|
110
|
+
>
|
|
111
|
+
{label}
|
|
112
|
+
</li>
|
|
113
|
+
))}
|
|
114
|
+
</ul>
|
|
115
|
+
</section>
|
|
116
|
+
))}
|
|
117
|
+
</div>
|
|
118
|
+
);
|
|
119
|
+
}
|
|
@@ -31,6 +31,9 @@ import type {
|
|
|
31
31
|
import { SearchChromeStyles } from "./styles";
|
|
32
32
|
import { usePublicSearch } from "./use-public-search";
|
|
33
33
|
|
|
34
|
+
export const SEARCH_EMPTY_COPY =
|
|
35
|
+
"Nenhum imóvel encontrado. Ajuste a busca ou os filtros.";
|
|
36
|
+
|
|
34
37
|
export type SearchPageProps = {
|
|
35
38
|
siteId: SiteIdInput;
|
|
36
39
|
baseUrl?: string;
|
|
@@ -316,6 +319,10 @@ export function SearchPage({
|
|
|
316
319
|
|
|
317
320
|
const results: ReactNode = search.loading ? (
|
|
318
321
|
<ResultsSkeleton className={classNames?.skeleton ?? classNames?.grid} />
|
|
322
|
+
) : search.listings.length === 0 ? (
|
|
323
|
+
<p data-slot="search-empty" className={classNames?.empty}>
|
|
324
|
+
{SEARCH_EMPTY_COPY}
|
|
325
|
+
</p>
|
|
319
326
|
) : (
|
|
320
327
|
<>
|
|
321
328
|
<div data-slot="search-grid" className={classNames?.grid}>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/* Generated by scripts/build-search-chrome-css.mjs — do not edit. */
|
|
2
2
|
/* eslint-disable */
|
|
3
3
|
/* prettier-ignore */
|
|
4
|
-
export const SEARCH_CHROME_CSS_VERSION = "0.4.
|
|
4
|
+
export const SEARCH_CHROME_CSS_VERSION = "0.4.13";
|
|
5
5
|
export const SEARCH_CHROME_CSS = ":root{--garagem-listing-card-radius:0.75rem;--garagem-listing-card-gap:1.5rem;--garagem-listing-price-size:1.125rem;--garagem-listing-media-ratio:4 / 3;--garagem-search-control-height:2.75rem;--garagem-search-icon-size:1.25rem;--garagem-search-radius:var(--radius,0.75rem);--garagem-skeleton:var(--muted,#e7e5e4)}[data-slot=\"search-heading\"]{display:flex;min-width:0;align-items:baseline;gap:0.375rem;font-size:1.25rem;font-weight:600}[data-slot=\"search-heading-count\"]{flex-shrink:0}[data-slot=\"search-heading-title\"]{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:inherit;font-weight:inherit}[data-slot=\"search-query-sort\"]{display:flex;flex-direction:column;gap:1rem}@media (min-width:1024px){[data-slot=\"search-query-sort\"]{flex-direction:row;align-items:flex-end}}[data-slot=\"search-query\"]{flex:1;min-width:0}[data-slot=\"search-query-input\"],[data-slot=\"search-sort-trigger\"],[data-slot=\"search-toolbar-trigger\"],[data-slot=\"search-filters-trigger\"]{min-height:var(--garagem-search-control-height)}[data-slot=\"search-query-field\"]{position:relative}[data-slot=\"search-query-input\"]{width:100%;border-radius:var(--garagem-search-radius);border:1px solid var(--border,#e4e4e7);background:var(--background,#fff);padding:0.5rem 5.5rem 0.5rem 1rem;outline:none}[data-slot=\"search-query-actions\"]{position:absolute;top:50%;right:0.35rem;display:flex;transform:translateY(-50%);align-items:center;gap:0.15rem}[data-slot=\"search-icon-button\"]{display:inline-flex;height:2.25rem;width:2.25rem;cursor:pointer;align-items:center;justify-content:center;border:0;border-radius:999px;background:var(--primary,#111);color:var(--primary-foreground,#fff)}[data-slot=\"search-icon-button\"][data-kind=\"clear\"]{background:transparent;color:var(--muted-foreground,#737373)}[data-slot=\"search-icon\"]{width:var(--garagem-search-icon-size);height:var(--garagem-search-icon-size);display:block}[data-slot=\"search-sort\"]{display:flex;flex-direction:column;gap:0.25rem}[data-slot=\"search-sort-trigger\"]{appearance:none;cursor:pointer;border-radius:var(--garagem-search-radius);border:1px solid var(--border,#e4e4e7);background:var(--background,#fff);padding:0.5rem 2.25rem 0.5rem 0.75rem;background-image:url(\"data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%23737373' stroke-width='2' viewBox='0 0 24 24'><path d='m6 9 6 6 6-6'/></svg>\");background-repeat:no-repeat;background-position:right 0.65rem center}[data-slot=\"search-toolbar\"]{display:flex;flex-wrap:wrap;align-items:flex-end;gap:0.5rem}[data-slot=\"search-toolbar-trigger\"],[data-slot=\"search-filters-trigger\"]{cursor:pointer;border-radius:var(--garagem-search-radius);border:1px solid var(--border,#e4e4e7);background:var(--background,#fff);padding:0.5rem 0.75rem;font-size:0.875rem}[data-slot=\"search-popover\"]{position:absolute;z-index:30;margin-top:0.5rem;width:18rem;border-radius:0.75rem;border:1px solid var(--border,#e4e4e7);background:var(--background,#fff);padding:1rem;box-shadow:0 10px 30px rgb(0 0 0 / 0.12);animation:garagem-search-in 140ms ease-out}[data-slot=\"search-grid\"],[data-slot=\"search-skeleton\"]{display:grid;grid-template-columns:1fr;gap:var(--garagem-listing-card-gap)}@media (min-width:640px){[data-slot=\"search-grid\"],[data-slot=\"search-skeleton\"]{grid-template-columns:repeat(2,minmax(0,1fr))}}@media (min-width:1024px){[data-slot=\"search-grid\"],[data-slot=\"search-skeleton\"]{grid-template-columns:repeat(3,minmax(0,1fr))}}[data-slot=\"listing-card\"]{overflow:hidden;border-radius:var(--garagem-listing-card-radius);border:1px solid var(--border,#e4e4e7);background:var(--card,var(--background,#fff))}[data-slot=\"listing-card-price-row\"]{display:inline-flex;align-items:baseline;gap:0.25rem}[data-slot=\"listing-card-price\"]{font-size:var(--garagem-listing-price-size);font-weight:600}[data-slot=\"listing-card-period\"]{font-size:0.75rem;color:var(--muted-foreground,#737373)}[data-slot=\"search-checkbox\"]{appearance:none;width:1.15rem;height:1.15rem;flex-shrink:0;cursor:pointer;border:1px solid var(--primary,#111);border-radius:0.25rem;background:var(--background,#fff)}[data-slot=\"search-checkbox\"]:checked{background-color:var(--primary,#111);background-image:url(\"data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3'><path d='M5 12l5 5L20 7'/></svg>\");background-repeat:no-repeat;background-position:center;background-size:0.8rem}[data-slot=\"search-scroll\"]{max-height:12rem;overflow:auto;scrollbar-width:thin;scrollbar-color:var(--muted-foreground,#a1a1aa) transparent}[data-slot=\"search-range-apply\"]{display:inline-flex;min-height:2.5rem;cursor:pointer;align-items:center;justify-content:center;border:0;border-radius:var(--garagem-search-radius);background:var(--primary,#111);color:var(--primary-foreground,#fff);padding:0 0.75rem;font-size:0.75rem;font-weight:600}[data-slot=\"search-sheet\"]{position:fixed;inset:0;z-index:40}[data-slot=\"search-sheet-overlay\"]{position:absolute;inset:0;border:0;cursor:pointer;background:rgb(0 0 0 / 0.4);animation:garagem-search-fade 160ms ease-out}[data-slot=\"search-sheet-panel\"]{position:absolute;top:0;right:0;display:flex;height:100dvh;width:min(22rem,100%);flex-direction:column;background:var(--background,#fff);animation:garagem-search-sheet 180ms ease-out}[data-slot=\"search-sheet-body\"]{min-height:0;flex:1;overflow:auto;padding:1.5rem 1.5rem 0;scrollbar-width:thin}[data-slot=\"search-sheet-footer\"]{display:flex;gap:0.5rem;border-top:1px solid var(--border,#e4e4e7);padding:1rem 1.5rem}[data-slot=\"search-apply-bar\"]{display:flex;width:100%;gap:0.5rem}[data-slot=\"search-apply-bar\"] > button{min-height:2.5rem;flex:1;cursor:pointer;border-radius:var(--garagem-search-radius);padding:0 1rem}[data-slot=\"search-apply-bar\"] > button[data-kind=\"clear\"]{border:1px solid var(--border,#e4e4e7);background:transparent}[data-slot=\"search-apply-bar\"] > button[data-kind=\"apply\"]{border:0;background:var(--primary,#111);color:var(--primary-foreground,#fff);font-weight:600}[data-slot=\"search-pagination\"]{margin-top:2.5rem;display:flex;justify-content:center}[data-slot=\"search-pagination\"] ul{display:flex;flex-wrap:wrap;justify-content:center;gap:0.25rem;padding:0;margin:0;list-style:none}[data-slot=\"search-pagination-item\"]{display:inline-flex;width:2.25rem;height:2.25rem;align-items:center;justify-content:center;border:1px solid var(--border,#e4e4e7);border-radius:0.375rem;font-size:0.75rem;font-weight:500}@media (min-width:768px){[data-slot=\"search-pagination-item\"]{width:2.5rem;height:2.5rem}}[data-slot=\"search-pagination-item\"] a,[data-slot=\"search-pagination-item\"] span{display:flex;width:100%;height:100%;align-items:center;justify-content:center;color:inherit;text-decoration:none}[data-slot=\"search-pagination-item\"][data-current=\"true\"]{background:var(--primary,#111);color:var(--primary-foreground,#fff)}[data-slot=\"search-pagination-item\"][data-disabled=\"true\"]{cursor:not-allowed;color:var(--muted-foreground,#737373)}[data-slot=\"search-toolbar-item\"]{position:relative}[data-slot=\"search-body\"]{margin-top:2rem;display:flex;flex-direction:column;gap:1.5rem}[data-slot=\"search-label\"]{margin-bottom:0.25rem;display:block;font-size:0.875rem;color:var(--muted-foreground,#737373)}[data-slot=\"search-sheet-title\"]{padding:1.5rem 1.5rem 0;font-size:1.125rem;font-weight:600}[data-slot=\"search-layout\"]{display:grid;gap:2rem}[data-slot=\"search-sidebar\"]{display:none}[data-slot=\"search-layout\"] > div > [data-slot=\"search-filters-trigger\"]{margin-bottom:1rem}@media (min-width:1024px){[data-slot=\"search-layout\"]{grid-template-columns:280px minmax(0,1fr)}[data-slot=\"search-sidebar\"]{display:block;position:sticky;top:1.5rem;align-self:start}[data-slot=\"search-layout\"] > div > [data-slot=\"search-filters-trigger\"]{display:none}}[data-slot=\"listing-card-link\"]{display:block;color:inherit;text-decoration:none;cursor:pointer}[data-slot=\"listing-card-media\"]{position:relative;width:100%;overflow:hidden;background:var(--muted,#f5f5f4);aspect-ratio:var(--garagem-listing-media-ratio)}[data-slot=\"listing-card-media\"] img{height:100%;width:100%;object-fit:cover;transition:transform 0.3s}[data-slot=\"listing-card\"]:hover [data-slot=\"listing-card-media\"] img{transform:scale(1.05)}@media (prefers-reduced-motion:reduce){[data-slot=\"listing-card-media\"] img{transition:none}[data-slot=\"listing-card\"]:hover [data-slot=\"listing-card-media\"] img{transform:none}}[data-slot=\"listing-card-empty\"]{display:flex;height:100%;width:100%;align-items:center;justify-content:center;font-size:0.75rem;color:var(--muted-foreground,#737373)}[data-slot=\"listing-card-cta\"]{margin-top:0.75rem}[data-slot=\"search-filters\"]{display:flex;flex-direction:column;gap:1.25rem}[data-slot=\"search-filter\"]{margin:0;padding:0;border:0;font-size:0.875rem}[data-slot=\"search-filter\"] legend{margin-bottom:0.5rem;padding:0;color:var(--muted-foreground,#737373)}[data-slot=\"search-range-row\"]{display:flex;align-items:flex-end;gap:0.5rem}[data-slot=\"search-range-side\"]{min-width:0;flex:1}[data-slot=\"search-range-side\"] > span:first-child{margin-bottom:0.25rem;display:block;font-size:0.75rem;color:var(--muted-foreground,#737373)}[data-slot=\"search-range-affix\"]{position:relative;display:block}[data-slot=\"search-range-prefix\"]{pointer-events:none;position:absolute;inset-block:0;left:0;display:flex;align-items:center;padding-left:0.75rem;color:var(--muted-foreground,#737373)}[data-slot=\"search-range-input\"]{min-height:2.5rem;width:100%;border-radius:var(--garagem-search-radius);border:1px solid var(--border,#e4e4e7);background:var(--background,#fff);padding:0 0.75rem}[data-slot=\"search-range-affix\"] [data-slot=\"search-range-input\"]{padding-left:2.5rem}[data-slot=\"search-count-group\"]{display:flex;flex-wrap:wrap;gap:0.375rem}[data-slot=\"search-count-choice\"]{min-height:2.5rem;cursor:pointer;border-radius:var(--garagem-search-radius);border:1px solid var(--border,#e4e4e7);background:var(--background,#fff);padding:0 0.75rem;font-size:0.875rem}[data-slot=\"search-count-choice\"][data-selected=\"true\"]{border-color:var(--primary,#111);background:color-mix(in srgb,var(--primary,#111) 10%,transparent)}[data-slot=\"search-enum-list\"],[data-slot=\"search-scroll\"]{display:flex;flex-direction:column;gap:0.375rem}[data-slot=\"search-enum-option\"]{display:flex;cursor:pointer;align-items:center;gap:0.5rem}[data-slot=\"listing-card-badge\"]{position:absolute;left:0.75rem;top:0.75rem;border-radius:999px;background:color-mix(in srgb,var(--background,#fff) 90%,transparent);padding:0.25rem 0.5rem;font-size:0.75rem;font-weight:500}[data-slot=\"listing-card-body\"]{padding:1rem}[data-slot=\"listing-card-title\"]{display:-webkit-box;margin-top:0.25rem;overflow:hidden;-webkit-box-orient:vertical;-webkit-line-clamp:1;font-size:0.875rem;font-weight:500}[data-slot=\"listing-card-location\"]{margin-top:0.125rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:0.75rem;color:var(--muted-foreground,#737373)}[data-slot=\"listing-card-features\"]{display:flex;flex-wrap:wrap;margin-top:0.75rem;gap:0.25rem 1rem;padding:0;list-style:none;font-size:0.75rem;color:var(--muted-foreground,#737373)}[data-slot=\"search-skeleton-block\"]{animation:garagem-search-pulse 1.2s ease-in-out infinite;background:var(--garagem-skeleton);border-radius:0.375rem}[data-slot=\"search-skeleton-card\"]{overflow:hidden;border-radius:var(--garagem-listing-card-radius);border:1px solid var(--border,#e4e4e7)}[data-slot=\"search-skeleton-body\"]{display:flex;flex-direction:column;gap:0.5rem;padding:1rem}[data-slot=\"search-skeleton-block\"][data-kind=\"media\"]{aspect-ratio:var(--garagem-listing-media-ratio)}[data-slot=\"search-skeleton-block\"][data-kind=\"line-lg\"]{height:1.25rem;width:50%}[data-slot=\"search-skeleton-block\"][data-kind=\"line-md\"]{height:1rem;width:75%}[data-slot=\"search-skeleton-block\"][data-kind=\"line-sm\"]{height:0.75rem;width:66.666667%}[data-slot=\"search-skeleton-block\"][data-kind=\"detail-media\"]{max-width:45rem;aspect-ratio:4 / 3}[data-slot=\"search-skeleton-block\"][data-kind=\"detail-title\"]{width:66.666667%;height:2rem;margin-top:1.5rem}@media (prefers-reduced-motion:reduce){[data-slot=\"search-popover\"],[data-slot=\"search-sheet-overlay\"],[data-slot=\"search-sheet-panel\"],[data-slot=\"search-skeleton-block\"]{animation:none}}@keyframes garagem-search-in{from{opacity:0;transform:translateY(-4px) scale(0.98)}to{opacity:1;transform:none}}@keyframes garagem-search-fade{from{opacity:0}to{opacity:1}}@keyframes garagem-search-sheet{from{transform:translateX(100%)}to{transform:none}}@keyframes garagem-search-pulse{50%{opacity:0.55}}";
|