@mapfirst.ai/react 0.1.1 → 0.1.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/dist/index.d.mts CHANGED
@@ -1,8 +1,24 @@
1
1
  import * as _mapfirst_ai_core from '@mapfirst.ai/core';
2
2
  import { PropertyType, PriceLevel, BaseMapFirstOptions, MapFirstCore, MapState, Property, MapLibreNamespace, MarkerOptions, GoogleMapsNamespace, MapboxNamespace, LeafletNamespace } from '@mapfirst.ai/core';
3
- export { ActiveLocation, ApiFiltersResponse, BaseMapFirstOptions, Environment, FilterSchema, FilterState, GoogleMapsNamespace, LeafletAdapter, MapBounds, MapFirstCore, MapFirstOptions, MapLibreNamespace, MapState, MapStateCallbacks, MapStateUpdate, MapboxNamespace, Price, PriceLevel, PropertiesFetchError, Property, PropertyType, TripAdvisorImage, TripAdvisorImageResponse, ViewState, convertToApiFilters, fetchImages, fetchProperties, isWebGLSupported, processApiFilters } from '@mapfirst.ai/core';
3
+ export { ActiveLocation, ApiFiltersResponse, BaseMapFirstOptions, Environment, FilterSchema, FilterState, GoogleMapsNamespace, LeafletAdapter, LeafletNamespace, MapBounds, MapFirstCore, MapFirstOptions, MapLibreNamespace, MapState, MapStateCallbacks, MapStateUpdate, MapboxNamespace, Price, PriceLevel, PropertiesFetchError, Property, PropertyType, TripAdvisorImage, TripAdvisorImageResponse, ViewState, convertToApiFilters, fetchImages, fetchProperties, isWebGLSupported, processApiFilters } from '@mapfirst.ai/core';
4
4
  import * as React$1 from 'react';
5
- import React__default, { FunctionComponent, ReactNode, CSSProperties } from 'react';
5
+ import React__default, { CSSProperties, FunctionComponent, ReactNode } from 'react';
6
+
7
+ interface IconProps$1 {
8
+ className?: string;
9
+ style?: CSSProperties;
10
+ }
11
+ interface IconsContextValue {
12
+ CloseIcon: React__default.FC<IconProps$1>;
13
+ EditIcon: React__default.FC<IconProps$1>;
14
+ NextIcon: React__default.FC<IconProps$1>;
15
+ SearchIcon: React__default.FC<IconProps$1>;
16
+ }
17
+ declare const IconsProvider: React__default.FC<{
18
+ value?: Partial<IconsContextValue>;
19
+ children: React__default.ReactNode;
20
+ }>;
21
+ declare const useIcons: () => IconsContextValue;
6
22
 
7
23
  type Filter = {
8
24
  id: string;
@@ -55,6 +71,8 @@ interface SmartFilterProps {
55
71
  beforeContent?: ReactNode;
56
72
  /** Fine-grained style overrides for every visual part of the component. */
57
73
  styles?: SmartFilterStyles;
74
+ /** Custom icon components to replace the SDK defaults. */
75
+ customIcons?: Partial<IconsContextValue>;
58
76
  /** @deprecated Use `styles.container` instead. */
59
77
  style?: CSSProperties;
60
78
  /** @deprecated Use `styles.container` instead. */
@@ -182,7 +200,7 @@ type InitialRequestBody = {
182
200
  type SmartFilter = {
183
201
  id: string;
184
202
  label: string;
185
- type: "amenity" | "hotelStyle" | "priceRange" | "minRating" | "starRating" | "primary_type" | "transformed_query" | "selected_restaurant_price_levels";
203
+ type: "amenity" | "hotelStyle" | "features" | "goodFor" | "meals" | "specialDiets" | "priceRange" | "minRating" | "starRating" | "primary_type" | "transformed_query" | "selected_restaurant_price_levels";
186
204
  value: string;
187
205
  numericValue?: number;
188
206
  priceRange?: {
@@ -310,4 +328,4 @@ declare function useMapFirst(options: BaseMapFirstOptions): {
310
328
  }) => void;
311
329
  };
312
330
 
313
- export { Chip, type ChipProps, CloseIcon, EditIcon, type Filter, FilterChips, type FilterChipsProps, type IconProps, type Locale, MinRatingFilterChip, NextIcon, PriceRangeFilterChip, type PriceRangeValue, RestaurantPriceLevelChip, type RestaurantPriceLevelChipProps, SearchIcon, SmartFilter$1 as SmartFilter, type SmartFilterProps, type SmartFilterStyles, StarIcon, TransformedQueryChip, type TransformedQueryChipProps, createMinRatingFilterLabel, createPriceRangeFilterLabel, formatRatingValue, renderStars, useFilterScroll, useMapFirst, useTranslation };
331
+ export { Chip, type ChipProps, CloseIcon, EditIcon, type Filter, FilterChips, type FilterChipsProps, type IconProps$1 as IconProps, type IconsContextValue, IconsProvider, type Locale, MinRatingFilterChip, NextIcon, PriceRangeFilterChip, type PriceRangeValue, RestaurantPriceLevelChip, type RestaurantPriceLevelChipProps, SearchIcon, SmartFilter$1 as SmartFilter, type SmartFilterProps, type SmartFilterStyles, StarIcon, TransformedQueryChip, type TransformedQueryChipProps, createMinRatingFilterLabel, createPriceRangeFilterLabel, formatRatingValue, renderStars, useFilterScroll, useIcons, useMapFirst, useTranslation };
package/dist/index.d.ts CHANGED
@@ -1,8 +1,24 @@
1
1
  import * as _mapfirst_ai_core from '@mapfirst.ai/core';
2
2
  import { PropertyType, PriceLevel, BaseMapFirstOptions, MapFirstCore, MapState, Property, MapLibreNamespace, MarkerOptions, GoogleMapsNamespace, MapboxNamespace, LeafletNamespace } from '@mapfirst.ai/core';
3
- export { ActiveLocation, ApiFiltersResponse, BaseMapFirstOptions, Environment, FilterSchema, FilterState, GoogleMapsNamespace, LeafletAdapter, MapBounds, MapFirstCore, MapFirstOptions, MapLibreNamespace, MapState, MapStateCallbacks, MapStateUpdate, MapboxNamespace, Price, PriceLevel, PropertiesFetchError, Property, PropertyType, TripAdvisorImage, TripAdvisorImageResponse, ViewState, convertToApiFilters, fetchImages, fetchProperties, isWebGLSupported, processApiFilters } from '@mapfirst.ai/core';
3
+ export { ActiveLocation, ApiFiltersResponse, BaseMapFirstOptions, Environment, FilterSchema, FilterState, GoogleMapsNamespace, LeafletAdapter, LeafletNamespace, MapBounds, MapFirstCore, MapFirstOptions, MapLibreNamespace, MapState, MapStateCallbacks, MapStateUpdate, MapboxNamespace, Price, PriceLevel, PropertiesFetchError, Property, PropertyType, TripAdvisorImage, TripAdvisorImageResponse, ViewState, convertToApiFilters, fetchImages, fetchProperties, isWebGLSupported, processApiFilters } from '@mapfirst.ai/core';
4
4
  import * as React$1 from 'react';
5
- import React__default, { FunctionComponent, ReactNode, CSSProperties } from 'react';
5
+ import React__default, { CSSProperties, FunctionComponent, ReactNode } from 'react';
6
+
7
+ interface IconProps$1 {
8
+ className?: string;
9
+ style?: CSSProperties;
10
+ }
11
+ interface IconsContextValue {
12
+ CloseIcon: React__default.FC<IconProps$1>;
13
+ EditIcon: React__default.FC<IconProps$1>;
14
+ NextIcon: React__default.FC<IconProps$1>;
15
+ SearchIcon: React__default.FC<IconProps$1>;
16
+ }
17
+ declare const IconsProvider: React__default.FC<{
18
+ value?: Partial<IconsContextValue>;
19
+ children: React__default.ReactNode;
20
+ }>;
21
+ declare const useIcons: () => IconsContextValue;
6
22
 
7
23
  type Filter = {
8
24
  id: string;
@@ -55,6 +71,8 @@ interface SmartFilterProps {
55
71
  beforeContent?: ReactNode;
56
72
  /** Fine-grained style overrides for every visual part of the component. */
57
73
  styles?: SmartFilterStyles;
74
+ /** Custom icon components to replace the SDK defaults. */
75
+ customIcons?: Partial<IconsContextValue>;
58
76
  /** @deprecated Use `styles.container` instead. */
59
77
  style?: CSSProperties;
60
78
  /** @deprecated Use `styles.container` instead. */
@@ -182,7 +200,7 @@ type InitialRequestBody = {
182
200
  type SmartFilter = {
183
201
  id: string;
184
202
  label: string;
185
- type: "amenity" | "hotelStyle" | "priceRange" | "minRating" | "starRating" | "primary_type" | "transformed_query" | "selected_restaurant_price_levels";
203
+ type: "amenity" | "hotelStyle" | "features" | "goodFor" | "meals" | "specialDiets" | "priceRange" | "minRating" | "starRating" | "primary_type" | "transformed_query" | "selected_restaurant_price_levels";
186
204
  value: string;
187
205
  numericValue?: number;
188
206
  priceRange?: {
@@ -310,4 +328,4 @@ declare function useMapFirst(options: BaseMapFirstOptions): {
310
328
  }) => void;
311
329
  };
312
330
 
313
- export { Chip, type ChipProps, CloseIcon, EditIcon, type Filter, FilterChips, type FilterChipsProps, type IconProps, type Locale, MinRatingFilterChip, NextIcon, PriceRangeFilterChip, type PriceRangeValue, RestaurantPriceLevelChip, type RestaurantPriceLevelChipProps, SearchIcon, SmartFilter$1 as SmartFilter, type SmartFilterProps, type SmartFilterStyles, StarIcon, TransformedQueryChip, type TransformedQueryChipProps, createMinRatingFilterLabel, createPriceRangeFilterLabel, formatRatingValue, renderStars, useFilterScroll, useMapFirst, useTranslation };
331
+ export { Chip, type ChipProps, CloseIcon, EditIcon, type Filter, FilterChips, type FilterChipsProps, type IconProps$1 as IconProps, type IconsContextValue, IconsProvider, type Locale, MinRatingFilterChip, NextIcon, PriceRangeFilterChip, type PriceRangeValue, RestaurantPriceLevelChip, type RestaurantPriceLevelChipProps, SearchIcon, SmartFilter$1 as SmartFilter, type SmartFilterProps, type SmartFilterStyles, StarIcon, TransformedQueryChip, type TransformedQueryChipProps, createMinRatingFilterLabel, createPriceRangeFilterLabel, formatRatingValue, renderStars, useFilterScroll, useIcons, useMapFirst, useTranslation };