@garagem-ai/site-sdk 0.14.0 → 0.14.1
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.mts +30 -22
- package/dist/index.d.ts +30 -22
- package/dist/index.js +26 -23
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +26 -23
- 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.map +1 -1
- package/dist/react.mjs.map +1 -1
- package/dist/{types-photo-search-CokmqLjn.d.mts → types-photo-search--3fBk3Cs.d.mts} +2 -3
- package/dist/{types-photo-search-CokmqLjn.d.ts → types-photo-search--3fBk3Cs.d.ts} +2 -3
- package/package.json +1 -1
- package/src/analytics-document.ts +3 -3
- package/src/search-engine.ts +2 -3
- package/src/studio-contract.ts +24 -21
|
@@ -890,9 +890,8 @@ type LocationNameTables = {
|
|
|
890
890
|
* locations request failed: do not 404 the search. A path with no location
|
|
891
891
|
* (`/imoveis`, `/imoveis/venda`, `/imoveis/4-quartos`) is a normal search.
|
|
892
892
|
*
|
|
893
|
-
* Studio prompts
|
|
894
|
-
*
|
|
895
|
-
* export.
|
|
893
|
+
* Studio prompts call this helper. It has been on the npm tarball since
|
|
894
|
+
* 0.13.4, and the Studio pin (`minNpmVersion`) includes that release.
|
|
896
895
|
*/
|
|
897
896
|
declare function unknownSearchLocation(location: SearchPathFilters["location"] | null | undefined, tables: LocationNameTables | null | undefined): boolean;
|
|
898
897
|
declare function displayPathLocation(location: SearchPathFilters["location"], values?: LocationNameTables | null): SearchPathFilters["location"] | null;
|
|
@@ -890,9 +890,8 @@ type LocationNameTables = {
|
|
|
890
890
|
* locations request failed: do not 404 the search. A path with no location
|
|
891
891
|
* (`/imoveis`, `/imoveis/venda`, `/imoveis/4-quartos`) is a normal search.
|
|
892
892
|
*
|
|
893
|
-
* Studio prompts
|
|
894
|
-
*
|
|
895
|
-
* export.
|
|
893
|
+
* Studio prompts call this helper. It has been on the npm tarball since
|
|
894
|
+
* 0.13.4, and the Studio pin (`minNpmVersion`) includes that release.
|
|
896
895
|
*/
|
|
897
896
|
declare function unknownSearchLocation(location: SearchPathFilters["location"] | null | undefined, tables: LocationNameTables | null | undefined): boolean;
|
|
898
897
|
declare function displayPathLocation(location: SearchPathFilters["location"], values?: LocationNameTables | null): SearchPathFilters["location"] | null;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@garagem-ai/site-sdk",
|
|
3
|
-
"version": "0.14.
|
|
3
|
+
"version": "0.14.1",
|
|
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",
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* A visit is a location, a listing, or a static page. Filter paths and
|
|
3
3
|
* `page` greater than 1 are the crawl space Studio's catch-all answers.
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
4
|
+
* The pinned tarball exports `isAnalyticsDocumentUrl` (since 0.13.6), so
|
|
5
|
+
* Studio prompts may name it. `analyticsDocumentGuardSource()` is the same
|
|
6
|
+
* check pasted into the generated client, which does not import the helper.
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
9
|
const FILTER_SEGMENT_SOURCE =
|
package/src/search-engine.ts
CHANGED
|
@@ -136,9 +136,8 @@ function locationTableHasSlug(
|
|
|
136
136
|
* locations request failed: do not 404 the search. A path with no location
|
|
137
137
|
* (`/imoveis`, `/imoveis/venda`, `/imoveis/4-quartos`) is a normal search.
|
|
138
138
|
*
|
|
139
|
-
* Studio prompts
|
|
140
|
-
*
|
|
141
|
-
* export.
|
|
139
|
+
* Studio prompts call this helper. It has been on the npm tarball since
|
|
140
|
+
* 0.13.4, and the Studio pin (`minNpmVersion`) includes that release.
|
|
142
141
|
*/
|
|
143
142
|
export function unknownSearchLocation(
|
|
144
143
|
location: SearchPathFilters["location"] | null | undefined,
|
package/src/studio-contract.ts
CHANGED
|
@@ -17,9 +17,11 @@ export const STUDIO_SDK_CONTRACT = {
|
|
|
17
17
|
/**
|
|
18
18
|
* Exact pin for generated Studio sites. Must match a tarball already on
|
|
19
19
|
* npm — v0 installs this version. After a later changeset publishes, bump
|
|
20
|
-
* this and move that
|
|
21
|
-
* `
|
|
22
|
-
* prompt-safe lists.
|
|
20
|
+
* this and move names that tarball newly exports out of
|
|
21
|
+
* `optionalReactExports` / `unpublishedSearchExports` /
|
|
22
|
+
* `unpublishedPhoneExports` into the prompt-safe lists. Names that stay
|
|
23
|
+
* forbidden after they ship (`searchChromeModel`, `rangeDraftFromPath`)
|
|
24
|
+
* do not move. Do not bump here until that tarball is on npm.
|
|
23
25
|
* Phone mask helpers shipped in 0.6.0. Map search
|
|
24
26
|
* (`useMapSearch`, `searchListingsInBounds`) shipped in 0.9.0 — 0.7.0
|
|
25
27
|
* does not export them. Property registration shipped in 0.10.0.
|
|
@@ -28,10 +30,12 @@ export const STUDIO_SDK_CONTRACT = {
|
|
|
28
30
|
* 0.12.0. Analytics catalog events (`trackListingView` plus the search
|
|
29
31
|
* and lead emitters) shipped in 0.13.0. `property_search` sends a city
|
|
30
32
|
* or neighborhood only when the site's location table knows it, as of
|
|
31
|
-
* 0.13.2.
|
|
32
|
-
*
|
|
33
|
+
* 0.13.2. Development cards (`model.unitCount`, "A partir de" on a
|
|
34
|
+
* public price) shipped in 0.14.0. Search filter helpers
|
|
35
|
+
* (`visibleSearchFilters` / `toolbarFilterIds`) shipped in 0.4.12 and
|
|
36
|
+
* remain on this pin.
|
|
33
37
|
*/
|
|
34
|
-
minNpmVersion: "0.
|
|
38
|
+
minNpmVersion: "0.14.0",
|
|
35
39
|
/** Historical: older tarballs inject card CSS when those components mount. */
|
|
36
40
|
selfInjectSince: "0.4.2",
|
|
37
41
|
chromeStrategy: "app-owned" as const,
|
|
@@ -133,8 +137,9 @@ export const STUDIO_SDK_CONTRACT = {
|
|
|
133
137
|
/**
|
|
134
138
|
* Names already on the pinned npm tarball (`minNpmVersion`) — safe for
|
|
135
139
|
* Studio prompts and completeness. Includes `visibleSearchFilters` +
|
|
136
|
-
* `toolbarFilterIds` (shipped in 0.4.12)
|
|
137
|
-
*
|
|
140
|
+
* `toolbarFilterIds` (shipped in 0.4.12) and `unknownSearchLocation`
|
|
141
|
+
* (shipped in 0.13.4). Do not confuse with `unpublishedSearchExports`
|
|
142
|
+
* (`searchChromeModel`, …).
|
|
138
143
|
*/
|
|
139
144
|
searchExports: [
|
|
140
145
|
"searchResultsHeading",
|
|
@@ -145,22 +150,18 @@ export const STUDIO_SDK_CONTRACT = {
|
|
|
145
150
|
"hrefWithExplicitPage",
|
|
146
151
|
"countOptionLabel",
|
|
147
152
|
"countFacetChoices",
|
|
153
|
+
"unknownSearchLocation",
|
|
148
154
|
] as const,
|
|
149
155
|
/**
|
|
150
|
-
*
|
|
151
|
-
* `
|
|
152
|
-
*
|
|
153
|
-
*
|
|
156
|
+
* Exported by the pinned tarball, and still forbidden in prompts.
|
|
157
|
+
* `searchChromeModel` is retired bundled chrome — the prompt names
|
|
158
|
+
* `visibleSearchFilters` and `toolbarFilterIds` instead. `rangeDraftFromPath`
|
|
159
|
+
* stays unnamed; price and area drafts stay local state. Helpers the pin
|
|
160
|
+
* allows (`unknownSearchLocation`, `isAnalyticsDocumentUrl`) are not here.
|
|
154
161
|
*/
|
|
155
162
|
unpublishedSearchExports: [
|
|
156
163
|
"searchChromeModel",
|
|
157
164
|
"rangeDraftFromPath",
|
|
158
|
-
// `unknownSearchLocation` is in git. Prompts inline the same check with
|
|
159
|
-
// `parseSearchPublicPath` + `locationsPath` until this name is on the pin.
|
|
160
|
-
"unknownSearchLocation",
|
|
161
|
-
// In git. The installed client inlines the check. Naming it in a prompt
|
|
162
|
-
// makes v0 import it from the pinned tarball, which does not export it.
|
|
163
|
-
"isAnalyticsDocumentUrl",
|
|
164
165
|
] as const,
|
|
165
166
|
/**
|
|
166
167
|
* maps.fndn.ai helpers (static map, street view, boundaries, travel
|
|
@@ -248,10 +249,12 @@ export const STUDIO_SDK_CONTRACT = {
|
|
|
248
249
|
/**
|
|
249
250
|
* Listing-view analytics. Search and lead catalog events need no prompt:
|
|
250
251
|
* `usePublicSearch` and the lead helpers emit them from `analyticsSince`.
|
|
251
|
-
*
|
|
252
|
-
*
|
|
252
|
+
* `isAnalyticsDocumentUrl` shipped in 0.13.6 and is prompt-safe on this
|
|
253
|
+
* pin (it is not a search import). Below `analyticsSince`,
|
|
254
|
+
* `studioListingViewInstruction` prints nothing and
|
|
255
|
+
* `studioCodegenContractViolations` flags these names.
|
|
253
256
|
*/
|
|
254
|
-
analyticsExports: ["trackListingView"] as const,
|
|
257
|
+
analyticsExports: ["trackListingView", "isAnalyticsDocumentUrl"] as const,
|
|
255
258
|
analyticsSince: "0.13.0",
|
|
256
259
|
/**
|
|
257
260
|
* Development cards (`model.unitCount`, "A partir de" on `priceLabel`).
|