@garagem-ai/site-sdk 0.4.14 → 0.5.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/react.d.mts CHANGED
@@ -1,35 +1,6 @@
1
1
  import { ReactNode, CSSProperties, ReactElement } from 'react';
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, _ as SearchUiFilter } from './search-engine-1O4sKtKb.mjs';
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';
3
3
 
4
- type SearchPageVariant = "toolbar" | "dialog" | "sidebar";
5
- type SearchPageClassNames = {
6
- root?: string;
7
- header?: string;
8
- heading?: string;
9
- headingCount?: string;
10
- headingTitle?: string;
11
- toolbar?: string;
12
- toolbarTrigger?: string;
13
- popover?: string;
14
- query?: string;
15
- sort?: string;
16
- icon?: string;
17
- sidebar?: string;
18
- dialog?: string;
19
- dialogOverlay?: string;
20
- dialogPanel?: string;
21
- grid?: string;
22
- card?: string;
23
- pagination?: string;
24
- applyBar?: string;
25
- skeleton?: string;
26
- empty?: string;
27
- checkbox?: string;
28
- };
29
- type SearchPageIcons = {
30
- search?: ReactNode;
31
- clear?: ReactNode;
32
- };
33
4
  type ListingCardClassNames = {
34
5
  root?: string;
35
6
  media?: string;
@@ -114,79 +85,12 @@ type ListingDetailFieldsProps = {
114
85
  */
115
86
  declare function ListingDetailFields({ listing, dictionary, className, classNames, style, }: ListingDetailFieldsProps): ReactElement | null;
116
87
 
117
- type SearchPageProps = {
118
- siteId: SiteIdInput;
119
- baseUrl?: string;
120
- variant?: SearchPageVariant;
121
- /** Landmark element. Studio search pages pass `"div"` so the route owns `<main>`. */
122
- as?: "main" | "div";
123
- className?: string;
124
- classNames?: SearchPageClassNames;
125
- heading?: ReactNode;
126
- icons?: SearchPageIcons;
127
- listingCard?: typeof ListingCard;
128
- };
129
- declare function SearchPage({ siteId, baseUrl, variant, as: Root, className, classNames, heading, icons, listingCard: Card, }: SearchPageProps): ReactElement;
130
-
131
88
  declare function SearchChromeStyles(): ReactElement | null;
132
89
 
133
- type SearchPaginationProps = {
134
- page: number;
135
- totalPages: number;
136
- hrefForPage: (page: number) => string;
137
- onNavigate?: (href: string) => void;
138
- className?: string;
139
- };
140
- declare function SearchPagination({ page, totalPages, hrefForPage, onNavigate, className, }: SearchPaginationProps): ReactElement | null;
141
-
142
- type SearchQueryFormProps = {
143
- value: string;
144
- onChange: (value: string) => void;
145
- onSubmit: () => void;
146
- onClear: () => void;
147
- className?: string;
148
- iconClassName?: string;
149
- searchIcon?: ReactNode;
150
- clearIcon?: ReactNode;
151
- };
152
- declare function SearchQueryForm({ value, onChange, onSubmit, onClear, className, iconClassName, searchIcon, clearIcon, }: SearchQueryFormProps): ReactElement;
153
-
154
- type RangeCommitSource = "blur" | "enter" | "apply";
155
- type FilterPanelProps = {
156
- filters: SearchUiFilter[];
157
- pathFilters: SearchPathFilters;
158
- onChange: (filterId: string, value: unknown) => void;
159
- rangeDraft: Record<string, {
160
- min: string;
161
- max: string;
162
- }>;
163
- onRangePatch: (filterId: string, side: "min" | "max", value: string) => void;
164
- onRangeCommit: (filterId: string, source?: RangeCommitSource) => void;
165
- };
166
- declare function FilterPanel({ filters, pathFilters, onChange, rangeDraft, onRangePatch, onRangeCommit, }: FilterPanelProps): ReactElement;
167
- declare function rangeDraftFromPath(pathFilters: SearchPathFilters): Record<string, {
168
- min: string;
169
- max: string;
170
- }>;
171
-
172
- type SearchSortSelectProps = {
173
- value: string;
174
- onChange: (sort: string | null) => void;
175
- sorts?: Array<{
176
- id: string;
177
- label: string;
178
- }>;
179
- className?: string;
180
- };
181
- declare function SearchSortSelect({ value, onChange, sorts, className, }: SearchSortSelectProps): ReactElement;
182
90
  declare function ResultsSkeleton({ className, }: {
183
91
  className?: string;
184
92
  }): ReactElement;
185
- declare function SearchPageFallback({ className, as: Root, }: {
186
- className?: string;
187
- as?: "main" | "div";
188
- }): ReactElement;
189
93
 
190
94
  declare function usePublicSearch(options: UsePublicSearchOptions): PublicSearchState;
191
95
 
192
- export { FilterPanel, ListingCard, type ListingCardClassNames, type ListingCardProps, type ListingCardSlots, ListingDetailFields, type ListingDetailFieldsClassNames, type ListingDetailFieldsProps, type PublicSearchState, ResultsSkeleton, SearchChromeStyles, SearchPage, type SearchPageClassNames, SearchPageFallback, type SearchPageIcons, type SearchPageProps, type SearchPageVariant, SearchPagination, SearchQueryForm, SearchSortSelect, type SiteIdInput, type UsePublicSearchOptions, rangeDraftFromPath, usePublicSearch };
96
+ export { ListingCard, type ListingCardClassNames, type ListingCardProps, type ListingCardSlots, ListingDetailFields, type ListingDetailFieldsClassNames, type ListingDetailFieldsProps, type PublicSearchState, ResultsSkeleton, SearchChromeStyles, type SiteIdInput, type UsePublicSearchOptions, usePublicSearch };
package/dist/react.d.ts CHANGED
@@ -1,35 +1,6 @@
1
1
  import { ReactNode, CSSProperties, ReactElement } from 'react';
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, _ as SearchUiFilter } from './search-engine-1O4sKtKb.js';
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';
3
3
 
4
- type SearchPageVariant = "toolbar" | "dialog" | "sidebar";
5
- type SearchPageClassNames = {
6
- root?: string;
7
- header?: string;
8
- heading?: string;
9
- headingCount?: string;
10
- headingTitle?: string;
11
- toolbar?: string;
12
- toolbarTrigger?: string;
13
- popover?: string;
14
- query?: string;
15
- sort?: string;
16
- icon?: string;
17
- sidebar?: string;
18
- dialog?: string;
19
- dialogOverlay?: string;
20
- dialogPanel?: string;
21
- grid?: string;
22
- card?: string;
23
- pagination?: string;
24
- applyBar?: string;
25
- skeleton?: string;
26
- empty?: string;
27
- checkbox?: string;
28
- };
29
- type SearchPageIcons = {
30
- search?: ReactNode;
31
- clear?: ReactNode;
32
- };
33
4
  type ListingCardClassNames = {
34
5
  root?: string;
35
6
  media?: string;
@@ -114,79 +85,12 @@ type ListingDetailFieldsProps = {
114
85
  */
115
86
  declare function ListingDetailFields({ listing, dictionary, className, classNames, style, }: ListingDetailFieldsProps): ReactElement | null;
116
87
 
117
- type SearchPageProps = {
118
- siteId: SiteIdInput;
119
- baseUrl?: string;
120
- variant?: SearchPageVariant;
121
- /** Landmark element. Studio search pages pass `"div"` so the route owns `<main>`. */
122
- as?: "main" | "div";
123
- className?: string;
124
- classNames?: SearchPageClassNames;
125
- heading?: ReactNode;
126
- icons?: SearchPageIcons;
127
- listingCard?: typeof ListingCard;
128
- };
129
- declare function SearchPage({ siteId, baseUrl, variant, as: Root, className, classNames, heading, icons, listingCard: Card, }: SearchPageProps): ReactElement;
130
-
131
88
  declare function SearchChromeStyles(): ReactElement | null;
132
89
 
133
- type SearchPaginationProps = {
134
- page: number;
135
- totalPages: number;
136
- hrefForPage: (page: number) => string;
137
- onNavigate?: (href: string) => void;
138
- className?: string;
139
- };
140
- declare function SearchPagination({ page, totalPages, hrefForPage, onNavigate, className, }: SearchPaginationProps): ReactElement | null;
141
-
142
- type SearchQueryFormProps = {
143
- value: string;
144
- onChange: (value: string) => void;
145
- onSubmit: () => void;
146
- onClear: () => void;
147
- className?: string;
148
- iconClassName?: string;
149
- searchIcon?: ReactNode;
150
- clearIcon?: ReactNode;
151
- };
152
- declare function SearchQueryForm({ value, onChange, onSubmit, onClear, className, iconClassName, searchIcon, clearIcon, }: SearchQueryFormProps): ReactElement;
153
-
154
- type RangeCommitSource = "blur" | "enter" | "apply";
155
- type FilterPanelProps = {
156
- filters: SearchUiFilter[];
157
- pathFilters: SearchPathFilters;
158
- onChange: (filterId: string, value: unknown) => void;
159
- rangeDraft: Record<string, {
160
- min: string;
161
- max: string;
162
- }>;
163
- onRangePatch: (filterId: string, side: "min" | "max", value: string) => void;
164
- onRangeCommit: (filterId: string, source?: RangeCommitSource) => void;
165
- };
166
- declare function FilterPanel({ filters, pathFilters, onChange, rangeDraft, onRangePatch, onRangeCommit, }: FilterPanelProps): ReactElement;
167
- declare function rangeDraftFromPath(pathFilters: SearchPathFilters): Record<string, {
168
- min: string;
169
- max: string;
170
- }>;
171
-
172
- type SearchSortSelectProps = {
173
- value: string;
174
- onChange: (sort: string | null) => void;
175
- sorts?: Array<{
176
- id: string;
177
- label: string;
178
- }>;
179
- className?: string;
180
- };
181
- declare function SearchSortSelect({ value, onChange, sorts, className, }: SearchSortSelectProps): ReactElement;
182
90
  declare function ResultsSkeleton({ className, }: {
183
91
  className?: string;
184
92
  }): ReactElement;
185
- declare function SearchPageFallback({ className, as: Root, }: {
186
- className?: string;
187
- as?: "main" | "div";
188
- }): ReactElement;
189
93
 
190
94
  declare function usePublicSearch(options: UsePublicSearchOptions): PublicSearchState;
191
95
 
192
- export { FilterPanel, ListingCard, type ListingCardClassNames, type ListingCardProps, type ListingCardSlots, ListingDetailFields, type ListingDetailFieldsClassNames, type ListingDetailFieldsProps, type PublicSearchState, ResultsSkeleton, SearchChromeStyles, SearchPage, type SearchPageClassNames, SearchPageFallback, type SearchPageIcons, type SearchPageProps, type SearchPageVariant, SearchPagination, SearchQueryForm, SearchSortSelect, type SiteIdInput, type UsePublicSearchOptions, rangeDraftFromPath, usePublicSearch };
96
+ export { ListingCard, type ListingCardClassNames, type ListingCardProps, type ListingCardSlots, ListingDetailFields, type ListingDetailFieldsClassNames, type ListingDetailFieldsProps, type PublicSearchState, ResultsSkeleton, SearchChromeStyles, type SiteIdInput, type UsePublicSearchOptions, usePublicSearch };