@garagem-ai/site-sdk 0.5.2 → 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/README.md +16 -25
- package/dist/index.d.mts +202 -28
- package/dist/index.d.ts +202 -28
- package/dist/index.js +41 -44
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +40 -42
- package/dist/index.mjs.map +1 -1
- package/dist/react.d.mts +2 -60
- package/dist/react.d.ts +2 -60
- package/dist/react.js +150 -862
- package/dist/react.js.map +1 -1
- package/dist/react.mjs +122 -820
- package/dist/react.mjs.map +1 -1
- package/dist/{search-engine-4ocM0UPk.d.mts → search-engine-CkbO77G8.d.mts} +11 -181
- package/dist/{search-engine-4ocM0UPk.d.ts → search-engine-CkbO77G8.d.ts} +11 -181
- package/package.json +4 -9
- package/src/amenity-labels.ts +9 -2
- package/src/fetchers.ts +2 -1
- package/src/index.ts +1 -2
- package/src/internal/url.ts +1 -0
- package/src/listing-detail.ts +2 -1
- package/src/presentation.ts +1 -24
- package/src/react/index.ts +0 -11
- package/src/react/staged-filters-mirror.ts +38 -0
- package/src/react/types.ts +0 -30
- package/src/react/use-public-search.ts +30 -10
- package/src/search-engine.ts +3 -0
- package/src/studio-contract.ts +35 -20
- package/src/types.ts +10 -0
- package/src/react/cn.ts +0 -3
- package/src/react/listing-card.tsx +0 -98
- package/src/react/listing-detail-fields.tsx +0 -119
- package/src/react/search-chrome.tsx +0 -29
- package/src/react/search.css +0 -214
- package/src/react/styles/index.ts +0 -1
- package/src/react/styles/search-chrome-css.generated.ts +0 -5
- package/src/react/styles/search-chrome-styles.tsx +0 -31
package/dist/react.d.mts
CHANGED
|
@@ -1,30 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { w as Listing, E as ListingCardModel, e as SearchUi, j as SearchPathFilters, A as AppliedSearchQuery, W as LocationNameTables, I as ListingDetailFieldsSource, o as AmenityLabelDictionary } from './search-engine-4ocM0UPk.mjs';
|
|
1
|
+
import { e as SearchUi, n as Listing, o as SearchPathFilters, A as AppliedSearchQuery, x as LocationNameTables } from './search-engine-CkbO77G8.mjs';
|
|
3
2
|
|
|
4
|
-
type ListingCardClassNames = {
|
|
5
|
-
root?: string;
|
|
6
|
-
media?: string;
|
|
7
|
-
badge?: string;
|
|
8
|
-
body?: string;
|
|
9
|
-
price?: string;
|
|
10
|
-
title?: string;
|
|
11
|
-
location?: string;
|
|
12
|
-
features?: string;
|
|
13
|
-
cta?: string;
|
|
14
|
-
};
|
|
15
|
-
type ListingCardSlots = {
|
|
16
|
-
media?: ReactNode;
|
|
17
|
-
badge?: ReactNode;
|
|
18
|
-
cta?: ReactNode;
|
|
19
|
-
};
|
|
20
|
-
type ListingCardProps = {
|
|
21
|
-
listing: Listing | ListingCardModel;
|
|
22
|
-
href?: string;
|
|
23
|
-
className?: string;
|
|
24
|
-
classNames?: ListingCardClassNames;
|
|
25
|
-
slots?: ListingCardSlots;
|
|
26
|
-
style?: CSSProperties;
|
|
27
|
-
};
|
|
28
3
|
type SiteIdInput = string | Promise<string> | (() => string | Promise<string>);
|
|
29
4
|
type UsePublicSearchOptions = {
|
|
30
5
|
siteId: SiteIdInput;
|
|
@@ -58,39 +33,6 @@ type PublicSearchState = {
|
|
|
58
33
|
locationNames: LocationNameTables | null;
|
|
59
34
|
};
|
|
60
35
|
|
|
61
|
-
declare function ListingCard({ listing, href, className, classNames, slots, style, }: ListingCardProps): ReactElement;
|
|
62
|
-
|
|
63
|
-
type ListingDetailFieldsClassNames = {
|
|
64
|
-
root?: string;
|
|
65
|
-
facts?: string;
|
|
66
|
-
fact?: string;
|
|
67
|
-
values?: string;
|
|
68
|
-
value?: string;
|
|
69
|
-
amenityGroup?: string;
|
|
70
|
-
amenityTitle?: string;
|
|
71
|
-
amenityList?: string;
|
|
72
|
-
amenityLabel?: string;
|
|
73
|
-
};
|
|
74
|
-
type ListingDetailFieldsProps = {
|
|
75
|
-
listing: ListingDetailFieldsSource;
|
|
76
|
-
dictionary?: AmenityLabelDictionary | null;
|
|
77
|
-
className?: string;
|
|
78
|
-
classNames?: ListingDetailFieldsClassNames;
|
|
79
|
-
style?: CSSProperties;
|
|
80
|
-
};
|
|
81
|
-
/**
|
|
82
|
-
* Renders listing facts, values, and amenities. Omits empty rows so JSX
|
|
83
|
-
* never prints `undefined`. Theme via `data-slot` / classNames — do not
|
|
84
|
-
* reimplement these blocks in generated pages.
|
|
85
|
-
*/
|
|
86
|
-
declare function ListingDetailFields({ listing, dictionary, className, classNames, style, }: ListingDetailFieldsProps): ReactElement | null;
|
|
87
|
-
|
|
88
|
-
declare function SearchChromeStyles(): ReactElement | null;
|
|
89
|
-
|
|
90
|
-
declare function ResultsSkeleton({ className, }: {
|
|
91
|
-
className?: string;
|
|
92
|
-
}): ReactElement;
|
|
93
|
-
|
|
94
36
|
declare function usePublicSearch(options: UsePublicSearchOptions): PublicSearchState;
|
|
95
37
|
|
|
96
|
-
export {
|
|
38
|
+
export { type PublicSearchState, type SiteIdInput, type UsePublicSearchOptions, usePublicSearch };
|
package/dist/react.d.ts
CHANGED
|
@@ -1,30 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { w as Listing, E as ListingCardModel, e as SearchUi, j as SearchPathFilters, A as AppliedSearchQuery, W as LocationNameTables, I as ListingDetailFieldsSource, o as AmenityLabelDictionary } from './search-engine-4ocM0UPk.js';
|
|
1
|
+
import { e as SearchUi, n as Listing, o as SearchPathFilters, A as AppliedSearchQuery, x as LocationNameTables } from './search-engine-CkbO77G8.js';
|
|
3
2
|
|
|
4
|
-
type ListingCardClassNames = {
|
|
5
|
-
root?: string;
|
|
6
|
-
media?: string;
|
|
7
|
-
badge?: string;
|
|
8
|
-
body?: string;
|
|
9
|
-
price?: string;
|
|
10
|
-
title?: string;
|
|
11
|
-
location?: string;
|
|
12
|
-
features?: string;
|
|
13
|
-
cta?: string;
|
|
14
|
-
};
|
|
15
|
-
type ListingCardSlots = {
|
|
16
|
-
media?: ReactNode;
|
|
17
|
-
badge?: ReactNode;
|
|
18
|
-
cta?: ReactNode;
|
|
19
|
-
};
|
|
20
|
-
type ListingCardProps = {
|
|
21
|
-
listing: Listing | ListingCardModel;
|
|
22
|
-
href?: string;
|
|
23
|
-
className?: string;
|
|
24
|
-
classNames?: ListingCardClassNames;
|
|
25
|
-
slots?: ListingCardSlots;
|
|
26
|
-
style?: CSSProperties;
|
|
27
|
-
};
|
|
28
3
|
type SiteIdInput = string | Promise<string> | (() => string | Promise<string>);
|
|
29
4
|
type UsePublicSearchOptions = {
|
|
30
5
|
siteId: SiteIdInput;
|
|
@@ -58,39 +33,6 @@ type PublicSearchState = {
|
|
|
58
33
|
locationNames: LocationNameTables | null;
|
|
59
34
|
};
|
|
60
35
|
|
|
61
|
-
declare function ListingCard({ listing, href, className, classNames, slots, style, }: ListingCardProps): ReactElement;
|
|
62
|
-
|
|
63
|
-
type ListingDetailFieldsClassNames = {
|
|
64
|
-
root?: string;
|
|
65
|
-
facts?: string;
|
|
66
|
-
fact?: string;
|
|
67
|
-
values?: string;
|
|
68
|
-
value?: string;
|
|
69
|
-
amenityGroup?: string;
|
|
70
|
-
amenityTitle?: string;
|
|
71
|
-
amenityList?: string;
|
|
72
|
-
amenityLabel?: string;
|
|
73
|
-
};
|
|
74
|
-
type ListingDetailFieldsProps = {
|
|
75
|
-
listing: ListingDetailFieldsSource;
|
|
76
|
-
dictionary?: AmenityLabelDictionary | null;
|
|
77
|
-
className?: string;
|
|
78
|
-
classNames?: ListingDetailFieldsClassNames;
|
|
79
|
-
style?: CSSProperties;
|
|
80
|
-
};
|
|
81
|
-
/**
|
|
82
|
-
* Renders listing facts, values, and amenities. Omits empty rows so JSX
|
|
83
|
-
* never prints `undefined`. Theme via `data-slot` / classNames — do not
|
|
84
|
-
* reimplement these blocks in generated pages.
|
|
85
|
-
*/
|
|
86
|
-
declare function ListingDetailFields({ listing, dictionary, className, classNames, style, }: ListingDetailFieldsProps): ReactElement | null;
|
|
87
|
-
|
|
88
|
-
declare function SearchChromeStyles(): ReactElement | null;
|
|
89
|
-
|
|
90
|
-
declare function ResultsSkeleton({ className, }: {
|
|
91
|
-
className?: string;
|
|
92
|
-
}): ReactElement;
|
|
93
|
-
|
|
94
36
|
declare function usePublicSearch(options: UsePublicSearchOptions): PublicSearchState;
|
|
95
37
|
|
|
96
|
-
export {
|
|
38
|
+
export { type PublicSearchState, type SiteIdInput, type UsePublicSearchOptions, usePublicSearch };
|