@garagem-ai/site-sdk 0.4.8 → 0.4.10
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 +17 -16
- package/dist/index.d.mts +50 -6
- package/dist/index.d.ts +50 -6
- package/dist/index.js +355 -4
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +350 -4
- package/dist/index.mjs.map +1 -1
- package/dist/react.d.mts +1 -1
- package/dist/react.d.ts +1 -1
- package/dist/react.js +1 -1
- package/dist/react.js.map +1 -1
- package/dist/react.mjs +1 -1
- package/dist/react.mjs.map +1 -1
- package/dist/{search-engine-D4EZkNrQ.d.mts → search-engine-t3SBrLHS.d.mts} +12 -0
- package/dist/{search-engine-D4EZkNrQ.d.ts → search-engine-t3SBrLHS.d.ts} +12 -0
- package/package.json +1 -1
- package/src/amenity-labels.ts +400 -0
- package/src/index.ts +13 -0
- package/src/react/styles/search-chrome-css.generated.ts +1 -1
- package/src/studio-contract.ts +9 -3
- package/src/types.ts +12 -0
package/dist/index.mjs
CHANGED
|
@@ -730,6 +730,342 @@ async function submitContactLead(input) {
|
|
|
730
730
|
});
|
|
731
731
|
}
|
|
732
732
|
|
|
733
|
+
// src/amenity-labels.ts
|
|
734
|
+
var LISTING_AMENITY_TITLES = {
|
|
735
|
+
unit: "Comodidades",
|
|
736
|
+
building: "Comodidades do condom\xEDnio"
|
|
737
|
+
};
|
|
738
|
+
var AMENITY_FALLBACK_LABELS = {
|
|
739
|
+
// ==================== PROPERTY FEATURES ====================
|
|
740
|
+
// Amenities
|
|
741
|
+
arCondicionado: "Ar condicionado",
|
|
742
|
+
banheira: "Banheira",
|
|
743
|
+
carregadorEletrico: "Carregador el\xE9trico",
|
|
744
|
+
churrasqueira: "Churrasqueira",
|
|
745
|
+
chuveiroGas: "Chuveiro a g\xE1s",
|
|
746
|
+
chuveiroEletrico: "Chuveiro el\xE9trico",
|
|
747
|
+
energiaSolar: "Energia solar",
|
|
748
|
+
fechaduraDigital: "Fechadura digital",
|
|
749
|
+
fechaduraEletronica: "Fechadura eletr\xF4nica",
|
|
750
|
+
geradorEletrico: "Gerador el\xE9trico",
|
|
751
|
+
gesso: "Gesso",
|
|
752
|
+
hidromassagem: "Hidromassagem",
|
|
753
|
+
lareira: "Lareira",
|
|
754
|
+
ofuro: "Ofur\xF4",
|
|
755
|
+
spa: "Spa",
|
|
756
|
+
painelSolar: "Painel solar",
|
|
757
|
+
portaoEletronico: "Port\xE3o eletr\xF4nico",
|
|
758
|
+
sistemaAlarme: "Sistema de alarme",
|
|
759
|
+
homeTheater: "Home theater",
|
|
760
|
+
adega: "Adega",
|
|
761
|
+
split: "Split",
|
|
762
|
+
arCentral: "Ar central",
|
|
763
|
+
esperaSplit: "Espera para split",
|
|
764
|
+
vistaMar: "Vista para o mar",
|
|
765
|
+
vistaPanoramica: "Vista panor\xE2mica",
|
|
766
|
+
aguaQuente: "\xC1gua quente",
|
|
767
|
+
reformado: "Reformado",
|
|
768
|
+
tvCabo: "TV a cabo",
|
|
769
|
+
gradeado: "Gradeado",
|
|
770
|
+
antenaParabolica: "Antena parab\xF3lica",
|
|
771
|
+
aquecimento: "Aquecimento",
|
|
772
|
+
aquecimentoEletrico: "Aquecimento el\xE9trico",
|
|
773
|
+
aquecimentoCentral: "Aquecimento central",
|
|
774
|
+
cercaEletrica: "Cerca el\xE9trica",
|
|
775
|
+
monitoramento: "Monitoramento",
|
|
776
|
+
vigiaInterno: "Vigia interno",
|
|
777
|
+
vigiaExterno: "Vigia externo",
|
|
778
|
+
alarme: "Alarme",
|
|
779
|
+
agua: "\xC1gua",
|
|
780
|
+
redeEsgoto: "Rede de esgoto",
|
|
781
|
+
pavimentacao: "Pavimenta\xE7\xE3o",
|
|
782
|
+
energiaEletrica: "Energia el\xE9trica",
|
|
783
|
+
// Furniture
|
|
784
|
+
mobiliado: "Mobiliado",
|
|
785
|
+
armarioEmbutido: "Arm\xE1rio embutido",
|
|
786
|
+
armarioEmbutidoQuarto: "Arm\xE1rio embutido quarto",
|
|
787
|
+
armarioCozinha: "Arm\xE1rio cozinha",
|
|
788
|
+
armarioBanheiro: "Arm\xE1rio banheiro",
|
|
789
|
+
cozinhaPlanejada: "Cozinha planejada",
|
|
790
|
+
fogao: "Fog\xE3o",
|
|
791
|
+
fornoPizza: "Forno de pizza",
|
|
792
|
+
freezer: "Freezer",
|
|
793
|
+
dormitorioComArmario: "Dormit\xF3rio com arm\xE1rio",
|
|
794
|
+
semiMobiliado: "Semi mobiliado",
|
|
795
|
+
salaArmarios: "Sala com arm\xE1rios",
|
|
796
|
+
// Structure
|
|
797
|
+
piscina: "Piscina",
|
|
798
|
+
piscinaAquecida: "Piscina aquecida",
|
|
799
|
+
piscinaCoberta: "Piscina coberta",
|
|
800
|
+
poco: "Po\xE7o",
|
|
801
|
+
pocoArtesiano: "Po\xE7o artesiano",
|
|
802
|
+
bar: "Bar",
|
|
803
|
+
jardim: "Jardim",
|
|
804
|
+
lago: "Lago",
|
|
805
|
+
lavabo: "Lavabo",
|
|
806
|
+
quintal: "Quintal",
|
|
807
|
+
solarium: "Solarium",
|
|
808
|
+
quartoServico: "Quarto de servi\xE7o",
|
|
809
|
+
varanda: "Varanda",
|
|
810
|
+
varandaFechadaVidro: "Varanda fechada com vidro",
|
|
811
|
+
varandaGourmet: "Varanda gourmet",
|
|
812
|
+
banheiroServico: "Banheiro de servi\xE7o",
|
|
813
|
+
areaServico: "\xC1rea de servi\xE7o",
|
|
814
|
+
cinema: "Cinema",
|
|
815
|
+
closet: "Closet",
|
|
816
|
+
cozinhaAmericana: "Cozinha americana",
|
|
817
|
+
cozinhaGourmet: "Cozinha gourmet",
|
|
818
|
+
despensa: "Despensa",
|
|
819
|
+
escritorio: "Escrit\xF3rio",
|
|
820
|
+
edicula: "Ed\xEDcula",
|
|
821
|
+
horta: "Horta",
|
|
822
|
+
sacada: "Sacada",
|
|
823
|
+
salaJantar: "Sala de jantar",
|
|
824
|
+
cozinha: "Cozinha",
|
|
825
|
+
banheiroSocial: "Banheiro social",
|
|
826
|
+
terraco: "Terra\xE7o",
|
|
827
|
+
copa: "Copa",
|
|
828
|
+
suiteMaster: "Su\xEDte master",
|
|
829
|
+
wcEmpregada: "WC empregada",
|
|
830
|
+
dependenciaEmpregada: "Depend\xEAncia de empregada",
|
|
831
|
+
dependenciadeEmpregada: "Depend\xEAncia empregada",
|
|
832
|
+
salaTv: "Sala de TV",
|
|
833
|
+
copaCozinha: "Copa cozinha",
|
|
834
|
+
sacadaComChurrasqueira: "Sacada com churrasqueira",
|
|
835
|
+
hallPrivativo: "Hall privativo",
|
|
836
|
+
estarIntimo: "Estar \xEDntimo",
|
|
837
|
+
livingHall: "Living hall",
|
|
838
|
+
piscinaInterna: "Piscina interna",
|
|
839
|
+
deck: "Deck",
|
|
840
|
+
jardimInverno: "Jardim de inverno",
|
|
841
|
+
rouparia: "Rouparia",
|
|
842
|
+
living: "Living",
|
|
843
|
+
familyRoom: "Family room",
|
|
844
|
+
salafitness: "Sala fitness",
|
|
845
|
+
salaEstar: "Sala de estar",
|
|
846
|
+
mezanino: "Mezanino",
|
|
847
|
+
pisoElevado: "Piso elevado",
|
|
848
|
+
entradaServicoIndependente: "Entrada de servi\xE7o independente",
|
|
849
|
+
forro: "Forro",
|
|
850
|
+
vitrine: "Vitrine",
|
|
851
|
+
banheiroAuxiliar: "Banheiro auxiliar",
|
|
852
|
+
gabinete: "Gabinete",
|
|
853
|
+
quadraTenisPrivativa: "Quadra de t\xEAnis privativa",
|
|
854
|
+
porao: "Por\xE3o",
|
|
855
|
+
sotao: "S\xF3t\xE3o",
|
|
856
|
+
patio: "P\xE1tio",
|
|
857
|
+
canaletasNoRodape: "Canaletas no rodap\xE9",
|
|
858
|
+
// Accessibility
|
|
859
|
+
barraApoioVaso: "Barra de apoio vaso",
|
|
860
|
+
barraApoioChuveiro: "Barra de apoio chuveiro",
|
|
861
|
+
entradaSemDegrau: "Entrada sem degrau",
|
|
862
|
+
rampasAcesso: "Rampas de acesso",
|
|
863
|
+
vagaDeficientes: "Vaga para deficientes",
|
|
864
|
+
// Flooring
|
|
865
|
+
cimentoQueimado: "Cimento queimado",
|
|
866
|
+
madeira: "Madeira",
|
|
867
|
+
pisoFrio: "Piso frio",
|
|
868
|
+
laminado: "Laminado",
|
|
869
|
+
vinilico: "Vin\xEDlico",
|
|
870
|
+
porcelanato: "Porcelanato",
|
|
871
|
+
// ==================== BUILDING FEATURES ====================
|
|
872
|
+
// Amenities
|
|
873
|
+
elevador: "Elevador",
|
|
874
|
+
bicicletario: "Biciclet\xE1rio",
|
|
875
|
+
carregadorEletronico: "Carregador eletr\xF4nico",
|
|
876
|
+
concierge: "Concierge",
|
|
877
|
+
coworking: "Coworking",
|
|
878
|
+
deposito: "Dep\xF3sito",
|
|
879
|
+
lavanderia: "Lavanderia",
|
|
880
|
+
petPlace: "Pet place",
|
|
881
|
+
recebimentoEncomendas: "Recebimento de encomendas",
|
|
882
|
+
salaReuniao: "Sala de reuni\xE3o",
|
|
883
|
+
salaoFestas: "Sal\xE3o de festas",
|
|
884
|
+
valet: "Valet",
|
|
885
|
+
garagemCoberta: "Garagem coberta",
|
|
886
|
+
elevadorServico: "Elevador de servi\xE7o",
|
|
887
|
+
// Leisure
|
|
888
|
+
academia: "Academia",
|
|
889
|
+
campoFutebol: "Campo de futebol",
|
|
890
|
+
espacoGourmet: "Espa\xE7o gourmet",
|
|
891
|
+
piscinaInfantil: "Piscina infantil",
|
|
892
|
+
pistaCaminhada: "Pista de caminhada",
|
|
893
|
+
playground: "Playground",
|
|
894
|
+
quadraPoliesportiva: "Quadra poliesportiva",
|
|
895
|
+
quadraTenis: "Quadra de t\xEAnis",
|
|
896
|
+
salaJogos: "Sala de jogos",
|
|
897
|
+
salaVapor: "Sala de vapor",
|
|
898
|
+
sauna: "Sauna",
|
|
899
|
+
// Security
|
|
900
|
+
circuitoTv: "Circuito fechado de TV",
|
|
901
|
+
controleAcessoEletronico: "Controle de acesso eletr\xF4nico",
|
|
902
|
+
interfone: "Interfone",
|
|
903
|
+
portaria24h: "Portaria 24h",
|
|
904
|
+
porteiroFisico: "Porteiro f\xEDsico",
|
|
905
|
+
seguranca24h: "Seguran\xE7a 24h",
|
|
906
|
+
segurancaPatrimonial: "Seguran\xE7a patrimonial",
|
|
907
|
+
condominioFechado: "Condom\xEDnio fechado",
|
|
908
|
+
// Accessibility
|
|
909
|
+
banheiroAcessivel: "Banheiro acess\xEDvel",
|
|
910
|
+
elevadorAcessivel: "Elevador acess\xEDvel",
|
|
911
|
+
pisoTatil: "Piso t\xE1til",
|
|
912
|
+
// ==================== CANONICAL HAS*/IS* KEYS ====================
|
|
913
|
+
has24hConcierge: "Portaria 24h",
|
|
914
|
+
has24hSecurity: "Seguran\xE7a 24h",
|
|
915
|
+
hasAccessRamps: "Rampas de acesso",
|
|
916
|
+
hasAccessibleBathroom: "Banheiro acess\xEDvel",
|
|
917
|
+
hasAccessibleElevator: "Elevador acess\xEDvel",
|
|
918
|
+
hasAirConditioning: "Ar condicionado",
|
|
919
|
+
hasAlarmSystem: "Sistema de alarme",
|
|
920
|
+
hasBalcony: "Varanda",
|
|
921
|
+
hasBikeStorage: "Biciclet\xE1rio",
|
|
922
|
+
hasBuiltInWardrobe: "Arm\xE1rio embutido",
|
|
923
|
+
hasCCTV: "CFTV",
|
|
924
|
+
hasCloset: "Closet",
|
|
925
|
+
hasConcierge: "Portaria",
|
|
926
|
+
hasControlledAccess: "Condom\xEDnio fechado",
|
|
927
|
+
hasCoworking: "Coworking",
|
|
928
|
+
hasDisabledParking: "Vaga para deficientes",
|
|
929
|
+
hasElectricCharger: "Carregador eletr\xF4nico",
|
|
930
|
+
hasElectronicGate: "Port\xE3o eletr\xF4nico",
|
|
931
|
+
hasElevator: "Elevador",
|
|
932
|
+
hasFireplace: "Lareira",
|
|
933
|
+
hasGarden: "Jardim",
|
|
934
|
+
hasGasShower: "Chuveiro a g\xE1s",
|
|
935
|
+
hasGenerator: "Gerador",
|
|
936
|
+
hasGourmetBalcony: "Varanda gourmet",
|
|
937
|
+
hasGourmetKitchen: "Cozinha gourmet",
|
|
938
|
+
hasGrill: "Churrasqueira",
|
|
939
|
+
hasGuestParking: "Estacionamento para visitantes",
|
|
940
|
+
hasGym: "Academia",
|
|
941
|
+
hasHeating: "Aquecimento",
|
|
942
|
+
hasHomeOffice: "Home office",
|
|
943
|
+
hasIntercom: "Interfone",
|
|
944
|
+
hasJacuzzi: "Hidromassagem",
|
|
945
|
+
hasKidsPool: "Piscina infantil",
|
|
946
|
+
hasLaundry: "Lavanderia",
|
|
947
|
+
hasMeetingRoom: "Sala de reuni\xE3o",
|
|
948
|
+
hasOffice: "Escrit\xF3rio",
|
|
949
|
+
hasOpenKitchen: "Cozinha americana",
|
|
950
|
+
hasPackageReceival: "Recebimento de encomendas",
|
|
951
|
+
hasPantry: "Despensa",
|
|
952
|
+
hasParkingGarage: "Garagem coberta",
|
|
953
|
+
hasPartySaloon: "Sal\xE3o de festas",
|
|
954
|
+
hasPetArea: "Pet place",
|
|
955
|
+
hasPipedGas: "G\xE1s encanado",
|
|
956
|
+
hasPlayground: "Playground",
|
|
957
|
+
hasPowderRoom: "Lavabo",
|
|
958
|
+
hasPrivatePool: "Piscina privativa",
|
|
959
|
+
hasSauna: "Sauna",
|
|
960
|
+
hasSecurity: "Seguran\xE7a",
|
|
961
|
+
hasServiceArea: "\xC1rea de servi\xE7o",
|
|
962
|
+
hasSolarPanel: "Painel solar",
|
|
963
|
+
hasSpa: "Spa",
|
|
964
|
+
hasSportsCourt: "Quadra de esportes",
|
|
965
|
+
hasStepFreeEntrance: "Entrada sem degrau",
|
|
966
|
+
hasStorage: "Dep\xF3sito",
|
|
967
|
+
hasSwimmingPool: "Piscina",
|
|
968
|
+
hasTennisCourt: "Quadra de t\xEAnis",
|
|
969
|
+
hasValetParking: "Valet",
|
|
970
|
+
homeOffice: "Home office",
|
|
971
|
+
isPetFriendly: "Pet friendly",
|
|
972
|
+
isFurnished: "Mobiliado",
|
|
973
|
+
isPartiallyFurnished: "Semi-mobiliado",
|
|
974
|
+
petFriendly: "Pet friendly",
|
|
975
|
+
piscinaPrivativa: "Piscina privativa",
|
|
976
|
+
pisoLaminado: "Piso laminado",
|
|
977
|
+
pisoMadeira: "Piso de madeira",
|
|
978
|
+
pisoPorcelanato: "Piso porcelanato",
|
|
979
|
+
quadraEsportes: "Quadra de esportes",
|
|
980
|
+
rooftop: "Rooftop",
|
|
981
|
+
suite: "Su\xEDte",
|
|
982
|
+
triplex: "Triplex",
|
|
983
|
+
duplex: "Duplex",
|
|
984
|
+
cobertura: "Cobertura",
|
|
985
|
+
forroGesso: "Forro de gesso",
|
|
986
|
+
gerador: "Gerador",
|
|
987
|
+
armariosCozinha: "Arm\xE1rios na cozinha",
|
|
988
|
+
armariosQuarto: "Arm\xE1rios nos quartos",
|
|
989
|
+
cftv: "CFTV"
|
|
990
|
+
};
|
|
991
|
+
function lookupLabel(id, options) {
|
|
992
|
+
const fromDictionary = options?.find((option) => option.id === id)?.label;
|
|
993
|
+
if (fromDictionary?.trim()) return fromDictionary.trim();
|
|
994
|
+
return AMENITY_FALLBACK_LABELS[id];
|
|
995
|
+
}
|
|
996
|
+
function labelAmenities(ids, dictionary) {
|
|
997
|
+
if (!ids?.length) return [];
|
|
998
|
+
const labels = [];
|
|
999
|
+
const seen = /* @__PURE__ */ new Set();
|
|
1000
|
+
for (const id of ids) {
|
|
1001
|
+
if (!id) continue;
|
|
1002
|
+
const label = lookupLabel(id, dictionary);
|
|
1003
|
+
if (!label || seen.has(label)) continue;
|
|
1004
|
+
seen.add(label);
|
|
1005
|
+
labels.push(label);
|
|
1006
|
+
}
|
|
1007
|
+
return labels.sort((a, b) => a.localeCompare(b, "pt-BR"));
|
|
1008
|
+
}
|
|
1009
|
+
function presentIds(ids) {
|
|
1010
|
+
return (ids ?? []).filter((id) => Boolean(id));
|
|
1011
|
+
}
|
|
1012
|
+
function buildingIdsFromMergedAmenities(listing, unitIds) {
|
|
1013
|
+
if (!listing.amenities || listing.propertyFeatures == null) return [];
|
|
1014
|
+
const unitCounts = /* @__PURE__ */ new Map();
|
|
1015
|
+
for (const id of unitIds) {
|
|
1016
|
+
unitCounts.set(id, (unitCounts.get(id) ?? 0) + 1);
|
|
1017
|
+
}
|
|
1018
|
+
return listing.amenities.filter((id) => {
|
|
1019
|
+
if (!id) return false;
|
|
1020
|
+
const count = unitCounts.get(id);
|
|
1021
|
+
if (count === void 0 || count === 0) return true;
|
|
1022
|
+
unitCounts.set(id, count - 1);
|
|
1023
|
+
return false;
|
|
1024
|
+
});
|
|
1025
|
+
}
|
|
1026
|
+
function unitAmenityIds(listing) {
|
|
1027
|
+
if (listing.propertyFeatures != null) {
|
|
1028
|
+
return presentIds(listing.propertyFeatures);
|
|
1029
|
+
}
|
|
1030
|
+
const building = new Set(
|
|
1031
|
+
listing.building?.amenities ?? listing.buildingAmenities ?? []
|
|
1032
|
+
);
|
|
1033
|
+
return (listing.amenities ?? []).filter((id) => id && !building.has(id));
|
|
1034
|
+
}
|
|
1035
|
+
function buildingAmenityIds(listing) {
|
|
1036
|
+
if (listing.building != null && listing.building.amenities != null) {
|
|
1037
|
+
return presentIds(listing.building.amenities);
|
|
1038
|
+
}
|
|
1039
|
+
if (listing.buildingAmenities != null) {
|
|
1040
|
+
return presentIds(listing.buildingAmenities);
|
|
1041
|
+
}
|
|
1042
|
+
return buildingIdsFromMergedAmenities(listing, unitAmenityIds(listing));
|
|
1043
|
+
}
|
|
1044
|
+
function listingAmenityGroups(listing, dictionary) {
|
|
1045
|
+
const groups = [];
|
|
1046
|
+
const unitIds = unitAmenityIds(listing);
|
|
1047
|
+
const unitLabels = labelAmenities(unitIds, dictionary?.propertyFeatures);
|
|
1048
|
+
if (unitLabels.length > 0) {
|
|
1049
|
+
groups.push({
|
|
1050
|
+
key: "unit",
|
|
1051
|
+
title: LISTING_AMENITY_TITLES.unit,
|
|
1052
|
+
labels: unitLabels
|
|
1053
|
+
});
|
|
1054
|
+
}
|
|
1055
|
+
const buildingLabels = labelAmenities(
|
|
1056
|
+
buildingAmenityIds(listing),
|
|
1057
|
+
dictionary?.buildingAmenities
|
|
1058
|
+
);
|
|
1059
|
+
if (buildingLabels.length > 0) {
|
|
1060
|
+
groups.push({
|
|
1061
|
+
key: "building",
|
|
1062
|
+
title: LISTING_AMENITY_TITLES.building,
|
|
1063
|
+
labels: buildingLabels
|
|
1064
|
+
});
|
|
1065
|
+
}
|
|
1066
|
+
return groups;
|
|
1067
|
+
}
|
|
1068
|
+
|
|
733
1069
|
// src/presentation.ts
|
|
734
1070
|
var SEARCH_CSS_VARS = {
|
|
735
1071
|
cardRadius: "--garagem-listing-card-radius",
|
|
@@ -1590,10 +1926,10 @@ var STUDIO_SDK_CONTRACT = {
|
|
|
1590
1926
|
/**
|
|
1591
1927
|
* Exact pin for generated Studio sites. Must be ≥ `selfInjectSince` so
|
|
1592
1928
|
* prompts that skip the layout chrome tag match the tarball v0 installs.
|
|
1593
|
-
* 0.4.
|
|
1594
|
-
*
|
|
1929
|
+
* 0.4.9 adds `listingAmenityGroups` so listing detail never prints
|
|
1930
|
+
* amenity ids.
|
|
1595
1931
|
*/
|
|
1596
|
-
minNpmVersion: "0.4.
|
|
1932
|
+
minNpmVersion: "0.4.9",
|
|
1597
1933
|
/** First release where ListingCard and ResultsSkeleton inject the sheet. */
|
|
1598
1934
|
selfInjectSince: "0.4.2",
|
|
1599
1935
|
chromeStrategy: "self-inject",
|
|
@@ -1625,7 +1961,8 @@ var STUDIO_SDK_CONTRACT = {
|
|
|
1625
1961
|
"expandVisitTimeSlots",
|
|
1626
1962
|
"isVisitSlotAllowed",
|
|
1627
1963
|
"STUDIO_DEFAULT_VISIT_SCHEDULE"
|
|
1628
|
-
]
|
|
1964
|
+
],
|
|
1965
|
+
amenityExports: ["listingAmenityGroups"]
|
|
1629
1966
|
};
|
|
1630
1967
|
var STUDIO_SITE_LAYOUT = {
|
|
1631
1968
|
maxWidthRem: "80rem",
|
|
@@ -1719,6 +2056,10 @@ function studioLeadInstruction() {
|
|
|
1719
2056
|
const names = STUDIO_SDK_CONTRACT.leadExports.join(", ");
|
|
1720
2057
|
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.`;
|
|
1721
2058
|
}
|
|
2059
|
+
function studioAmenityInstruction() {
|
|
2060
|
+
const names = STUDIO_SDK_CONTRACT.amenityExports.join(", ");
|
|
2061
|
+
return `Listing amenities: import ${names} from \`${STUDIO_SDK_PACKAGE}\`. Render \`listingAmenityGroups(listing)\` (optional second arg: \`getSearchUi().dictionary\`). Use the helper titles (\`Comodidades\` / \`Comodidades do condom\xEDnio\`). Labels are already alphabetical (pt-BR) \u2014 keep that order. Omit empty groups. Never print amenity ids, never invent a local label map, and never title a section "Comodidades da unidade".`;
|
|
2062
|
+
}
|
|
1722
2063
|
function studioChromeInstruction() {
|
|
1723
2064
|
const injectors = compareSemver(
|
|
1724
2065
|
STUDIO_SDK_CONTRACT.minNpmVersion,
|
|
@@ -1903,8 +2244,10 @@ function createGaragemClient(options = {}) {
|
|
|
1903
2244
|
};
|
|
1904
2245
|
}
|
|
1905
2246
|
export {
|
|
2247
|
+
AMENITY_FALLBACK_LABELS,
|
|
1906
2248
|
FORBIDDEN_SEARCH_QUERY_KEYS,
|
|
1907
2249
|
GaragemSdkError,
|
|
2250
|
+
LISTING_AMENITY_TITLES,
|
|
1908
2251
|
LeadSubmitError,
|
|
1909
2252
|
SEARCH_CSS_RECIPE,
|
|
1910
2253
|
SEARCH_CSS_VARS,
|
|
@@ -1949,6 +2292,8 @@ export {
|
|
|
1949
2292
|
isListingDetailPath,
|
|
1950
2293
|
isStudioPreviewHost,
|
|
1951
2294
|
isVisitSlotAllowed,
|
|
2295
|
+
labelAmenities,
|
|
2296
|
+
listingAmenityGroups,
|
|
1952
2297
|
listingBusinessLabel,
|
|
1953
2298
|
listingLocationLabel,
|
|
1954
2299
|
listingLookupKey,
|
|
@@ -1976,6 +2321,7 @@ export {
|
|
|
1976
2321
|
searchSortOptions,
|
|
1977
2322
|
serializeAppliedSearchQuery2 as serializeAppliedSearchQuery,
|
|
1978
2323
|
slotsForDate,
|
|
2324
|
+
studioAmenityInstruction,
|
|
1979
2325
|
studioChromeInstruction,
|
|
1980
2326
|
studioCodegenContractViolations,
|
|
1981
2327
|
studioDefaultLeadUi,
|