instantsearch.js 4.50.0 → 4.50.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.
Files changed (153) hide show
  1. package/cjs/lib/templating/prepareTemplateProps.js +1 -2
  2. package/cjs/lib/version.js +1 -1
  3. package/cjs/widgets/hits/hits.js +3 -4
  4. package/cjs/widgets/infinite-hits/infinite-hits.js +3 -4
  5. package/dist/instantsearch.development.d.ts +1 -1
  6. package/dist/instantsearch.development.js +25 -18
  7. package/dist/instantsearch.development.js.map +1 -1
  8. package/dist/instantsearch.production.d.ts +1 -1
  9. package/dist/instantsearch.production.min.d.ts +1 -1
  10. package/dist/instantsearch.production.min.js +2 -2
  11. package/dist/instantsearch.production.min.js.map +1 -1
  12. package/es/components/Answers/Answers.d.ts +3 -3
  13. package/es/components/Breadcrumb/Breadcrumb.d.ts +3 -3
  14. package/es/components/ClearRefinements/ClearRefinements.d.ts +3 -3
  15. package/es/components/CurrentRefinements/CurrentRefinements.d.ts +2 -2
  16. package/es/components/GeoSearchControls/GeoSearchButton.d.ts +1 -1
  17. package/es/components/GeoSearchControls/GeoSearchControls.d.ts +1 -1
  18. package/es/components/GeoSearchControls/GeoSearchToggle.d.ts +1 -1
  19. package/es/components/Highlight/Highlight.d.ts +2 -2
  20. package/es/components/Hits/Hits.d.ts +3 -3
  21. package/es/components/InfiniteHits/InfiniteHits.d.ts +3 -3
  22. package/es/components/MenuSelect/MenuSelect.d.ts +4 -4
  23. package/es/components/Pagination/Pagination.d.ts +3 -3
  24. package/es/components/Panel/Panel.d.ts +3 -3
  25. package/es/components/PoweredBy/PoweredBy.d.ts +2 -2
  26. package/es/components/QueryRuleCustomData/QueryRuleCustomData.d.ts +3 -3
  27. package/es/components/RangeInput/RangeInput.d.ts +3 -3
  28. package/es/components/RefinementList/RefinementList.d.ts +7 -7
  29. package/es/components/RefinementList/RefinementListItem.d.ts +1 -1
  30. package/es/components/RelevantSort/RelevantSort.d.ts +3 -3
  31. package/es/components/ReverseHighlight/ReverseHighlight.d.ts +2 -2
  32. package/es/components/ReverseSnippet/ReverseSnippet.d.ts +2 -2
  33. package/es/components/SearchBox/SearchBox.d.ts +5 -5
  34. package/es/components/Selector/Selector.d.ts +3 -3
  35. package/es/components/Slider/Rheostat.d.ts +6 -6
  36. package/es/components/Slider/Slider.d.ts +2 -2
  37. package/es/components/Snippet/Snippet.d.ts +2 -2
  38. package/es/components/Stats/Stats.d.ts +3 -3
  39. package/es/components/Template/Template.d.ts +1 -1
  40. package/es/components/ToggleRefinement/ToggleRefinement.d.ts +3 -3
  41. package/es/components/VoiceSearch/VoiceSearch.d.ts +3 -3
  42. package/es/connectors/answers/connectAnswers.d.ts +4 -4
  43. package/es/connectors/autocomplete/connectAutocomplete.d.ts +4 -4
  44. package/es/connectors/breadcrumb/connectBreadcrumb.d.ts +5 -5
  45. package/es/connectors/clear-refinements/connectClearRefinements.d.ts +4 -4
  46. package/es/connectors/configure/connectConfigure.d.ts +5 -5
  47. package/es/connectors/configure-related-items/connectConfigureRelatedItems.d.ts +5 -5
  48. package/es/connectors/current-refinements/connectCurrentRefinements.d.ts +6 -6
  49. package/es/connectors/dynamic-widgets/connectDynamicWidgets.d.ts +4 -4
  50. package/es/connectors/geo-search/connectGeoSearch.d.ts +6 -6
  51. package/es/connectors/hierarchical-menu/connectHierarchicalMenu.d.ts +5 -5
  52. package/es/connectors/hits/connectHits.d.ts +4 -4
  53. package/es/connectors/hits-per-page/connectHitsPerPage.d.ts +6 -6
  54. package/es/connectors/infinite-hits/connectInfiniteHits.d.ts +8 -8
  55. package/es/connectors/menu/connectMenu.d.ts +5 -5
  56. package/es/connectors/numeric-menu/connectNumericMenu.d.ts +6 -6
  57. package/es/connectors/pagination/connectPagination.d.ts +4 -4
  58. package/es/connectors/powered-by/connectPoweredBy.d.ts +4 -4
  59. package/es/connectors/query-rules/connectQueryRules.d.ts +7 -7
  60. package/es/connectors/range/connectRange.d.ts +8 -8
  61. package/es/connectors/rating-menu/connectRatingMenu.d.ts +6 -6
  62. package/es/connectors/refinement-list/connectRefinementList.d.ts +5 -5
  63. package/es/connectors/relevant-sort/connectRelevantSort.d.ts +5 -5
  64. package/es/connectors/search-box/connectSearchBox.d.ts +4 -4
  65. package/es/connectors/sort-by/connectSortBy.d.ts +5 -5
  66. package/es/connectors/stats/connectStats.d.ts +4 -4
  67. package/es/connectors/toggle-refinement/connectToggleRefinement.d.ts +9 -9
  68. package/es/connectors/toggle-refinement/types.d.ts +5 -5
  69. package/es/connectors/voice-search/connectVoiceSearch.d.ts +4 -4
  70. package/es/helpers/components/Highlight.d.ts +1 -1
  71. package/es/helpers/components/ReverseHighlight.d.ts +1 -1
  72. package/es/helpers/components/ReverseSnippet.d.ts +1 -1
  73. package/es/helpers/components/Snippet.d.ts +1 -1
  74. package/es/helpers/highlight.d.ts +1 -1
  75. package/es/helpers/reverseHighlight.d.ts +1 -1
  76. package/es/helpers/reverseSnippet.d.ts +1 -1
  77. package/es/helpers/snippet.d.ts +1 -1
  78. package/es/index.d.ts +1 -1
  79. package/es/lib/InstantSearch.d.ts +3 -3
  80. package/es/lib/createHelpers.d.ts +1 -1
  81. package/es/lib/insights/listener.d.ts +1 -1
  82. package/es/lib/routers/history.d.ts +3 -3
  83. package/es/lib/suit.d.ts +2 -2
  84. package/es/lib/templating/prepareTemplateProps.d.ts +2 -2
  85. package/es/lib/templating/prepareTemplateProps.js +1 -2
  86. package/es/lib/utils/checkIndexUiState.d.ts +1 -1
  87. package/es/lib/utils/createConcurrentSafePromise.d.ts +2 -2
  88. package/es/lib/utils/createSendEventForFacet.d.ts +4 -4
  89. package/es/lib/utils/createSendEventForHits.d.ts +6 -6
  90. package/es/lib/utils/debounce.d.ts +2 -2
  91. package/es/lib/utils/defer.d.ts +2 -2
  92. package/es/lib/utils/documentation.d.ts +2 -2
  93. package/es/lib/utils/escapeFacetValue.d.ts +1 -1
  94. package/es/lib/utils/geo-search.d.ts +1 -1
  95. package/es/lib/utils/getRefinements.d.ts +6 -6
  96. package/es/lib/utils/logger.d.ts +2 -2
  97. package/es/lib/utils/range.d.ts +1 -1
  98. package/es/lib/utils/safelyRunOnBrowser.d.ts +2 -2
  99. package/es/lib/utils/toArray.d.ts +1 -1
  100. package/es/lib/version.d.ts +1 -1
  101. package/es/lib/version.js +1 -1
  102. package/es/lib/voiceSearchHelper/types.d.ts +5 -5
  103. package/es/middlewares/createInsightsMiddleware.d.ts +3 -3
  104. package/es/middlewares/createRouterMiddleware.d.ts +1 -1
  105. package/es/types/component.d.ts +1 -1
  106. package/es/types/connector.d.ts +4 -4
  107. package/es/types/insights.d.ts +5 -5
  108. package/es/types/middleware.d.ts +4 -4
  109. package/es/types/render-state.d.ts +5 -5
  110. package/es/types/results.d.ts +16 -16
  111. package/es/types/router.d.ts +2 -2
  112. package/es/types/templates.d.ts +5 -5
  113. package/es/types/ui-state.d.ts +4 -4
  114. package/es/types/utils.d.ts +6 -6
  115. package/es/types/widget-factory.d.ts +2 -2
  116. package/es/types/widget.d.ts +23 -23
  117. package/es/widgets/analytics/analytics.d.ts +4 -4
  118. package/es/widgets/answers/answers.d.ts +4 -4
  119. package/es/widgets/breadcrumb/breadcrumb.d.ts +4 -4
  120. package/es/widgets/clear-refinements/clear-refinements.d.ts +4 -4
  121. package/es/widgets/configure/configure.d.ts +2 -2
  122. package/es/widgets/configure-related-items/configure-related-items.d.ts +2 -2
  123. package/es/widgets/current-refinements/current-refinements.d.ts +3 -3
  124. package/es/widgets/dynamic-widgets/dynamic-widgets.d.ts +2 -2
  125. package/es/widgets/geo-search/createHTMLMarker.d.ts +1 -1
  126. package/es/widgets/geo-search/geo-search.d.ts +7 -7
  127. package/es/widgets/hierarchical-menu/hierarchical-menu.d.ts +6 -6
  128. package/es/widgets/hits/hits.d.ts +4 -4
  129. package/es/widgets/hits/hits.js +3 -4
  130. package/es/widgets/hits-per-page/hits-per-page.d.ts +3 -3
  131. package/es/widgets/index/index.d.ts +5 -5
  132. package/es/widgets/infinite-hits/infinite-hits.d.ts +4 -4
  133. package/es/widgets/infinite-hits/infinite-hits.js +3 -4
  134. package/es/widgets/menu/menu.d.ts +6 -6
  135. package/es/widgets/menu-select/menu-select.d.ts +4 -4
  136. package/es/widgets/numeric-menu/numeric-menu.d.ts +6 -6
  137. package/es/widgets/pagination/pagination.d.ts +4 -4
  138. package/es/widgets/panel/panel.d.ts +9 -9
  139. package/es/widgets/places/places.d.ts +6 -6
  140. package/es/widgets/powered-by/powered-by.d.ts +3 -3
  141. package/es/widgets/query-rule-context/query-rule-context.d.ts +2 -2
  142. package/es/widgets/query-rule-custom-data/query-rule-custom-data.d.ts +4 -4
  143. package/es/widgets/range-input/range-input.d.ts +4 -4
  144. package/es/widgets/range-slider/range-slider.d.ts +4 -4
  145. package/es/widgets/rating-menu/rating-menu.d.ts +6 -6
  146. package/es/widgets/refinement-list/refinement-list.d.ts +10 -10
  147. package/es/widgets/relevant-sort/relevant-sort.d.ts +4 -4
  148. package/es/widgets/search-box/search-box.d.ts +4 -4
  149. package/es/widgets/sort-by/sort-by.d.ts +4 -4
  150. package/es/widgets/stats/stats.d.ts +5 -5
  151. package/es/widgets/toggle-refinement/toggle-refinement.d.ts +4 -4
  152. package/es/widgets/voice-search/voice-search.d.ts +5 -5
  153. package/package.json +6 -5
@@ -1,7 +1,7 @@
1
- declare type BrowserCallback<TReturn> = (params: {
1
+ type BrowserCallback<TReturn> = (params: {
2
2
  window: typeof window;
3
3
  }) => TReturn;
4
- declare type SafelyRunOnBrowserOptions<TReturn> = {
4
+ type SafelyRunOnBrowserOptions<TReturn> = {
5
5
  /**
6
6
  * Fallback to run on server environments.
7
7
  */
@@ -1,3 +1,3 @@
1
- declare type ToArray<T> = T extends unknown[] ? T : T[];
1
+ type ToArray<T> = T extends unknown[] ? T : T[];
2
2
  export declare function toArray<T>(value: T): ToArray<T>;
3
3
  export {};
@@ -1,2 +1,2 @@
1
- declare const _default: "4.50.0";
1
+ declare const _default: "4.50.1";
2
2
  export default _default;
package/es/lib/version.js CHANGED
@@ -1 +1 @@
1
- export default '4.50.0';
1
+ export default '4.50.1';
@@ -1,17 +1,17 @@
1
- export declare type Status = 'initial' | 'askingPermission' | 'waiting' | 'recognizing' | 'finished' | 'error';
2
- export declare type VoiceListeningState = {
1
+ export type Status = 'initial' | 'askingPermission' | 'waiting' | 'recognizing' | 'finished' | 'error';
2
+ export type VoiceListeningState = {
3
3
  status: Status;
4
4
  transcript: string;
5
5
  isSpeechFinal: boolean;
6
6
  errorCode?: string;
7
7
  };
8
- export declare type VoiceSearchHelperParams = {
8
+ export type VoiceSearchHelperParams = {
9
9
  searchAsYouSpeak: boolean;
10
10
  language?: string;
11
11
  onQueryChange: (query: string) => void;
12
12
  onStateChange: () => void;
13
13
  };
14
- export declare type VoiceSearchHelper = {
14
+ export type VoiceSearchHelper = {
15
15
  getState: () => VoiceListeningState;
16
16
  isBrowserSupported: () => boolean;
17
17
  isListening: () => boolean;
@@ -19,4 +19,4 @@ export declare type VoiceSearchHelper = {
19
19
  stopListening: () => void;
20
20
  dispose: () => void;
21
21
  };
22
- export declare type CreateVoiceSearchHelper = (params: VoiceSearchHelperParams) => VoiceSearchHelper;
22
+ export type CreateVoiceSearchHelper = (params: VoiceSearchHelperParams) => VoiceSearchHelper;
@@ -1,5 +1,5 @@
1
1
  import type { InsightsClient, InsightsClientMethod, InternalMiddleware, Hit } from '../types';
2
- export declare type InsightsEvent = {
2
+ export type InsightsEvent = {
3
3
  insightsMethod?: InsightsClientMethod;
4
4
  payload: any;
5
5
  widgetType: string;
@@ -7,7 +7,7 @@ export declare type InsightsEvent = {
7
7
  hits?: Hit[];
8
8
  attribute?: string;
9
9
  };
10
- export declare type InsightsProps<TInsightsClient extends null | InsightsClient = InsightsClient | null> = {
10
+ export type InsightsProps<TInsightsClient extends null | InsightsClient = InsightsClient | null> = {
11
11
  insightsClient: TInsightsClient;
12
12
  insightsInitParams?: {
13
13
  userHasOptedOut?: boolean;
@@ -17,5 +17,5 @@ export declare type InsightsProps<TInsightsClient extends null | InsightsClient
17
17
  };
18
18
  onEvent?: (event: InsightsEvent, insightsClient: TInsightsClient) => void;
19
19
  };
20
- export declare type CreateInsightsMiddleware = typeof createInsightsMiddleware;
20
+ export type CreateInsightsMiddleware = typeof createInsightsMiddleware;
21
21
  export declare function createInsightsMiddleware<TInsightsClient extends null | InsightsClient>(props: InsightsProps<TInsightsClient>): InternalMiddleware;
@@ -1,5 +1,5 @@
1
1
  import type { Router, StateMapping, UiState, InternalMiddleware } from '../types';
2
- export declare type RouterProps<TUiState extends UiState = UiState, TRouteState = TUiState> = {
2
+ export type RouterProps<TUiState extends UiState = UiState, TRouteState = TUiState> = {
3
3
  router?: Router<TRouteState>;
4
4
  stateMapping?: StateMapping<TUiState, TRouteState>;
5
5
  };
@@ -1,3 +1,3 @@
1
- export declare type ComponentCSSClasses<TCSSClasses> = Required<{
1
+ export type ComponentCSSClasses<TCSSClasses> = Required<{
2
2
  [className in keyof TCSSClasses]: string;
3
3
  }>;
@@ -7,7 +7,7 @@ import type { UnknownWidgetParams, Widget, WidgetDescription } from './widget';
7
7
  * The base renderer options. All render functions receive
8
8
  * the options below plus the specific options per connector.
9
9
  */
10
- export declare type RendererOptions<TWidgetParams> = {
10
+ export type RendererOptions<TWidgetParams> = {
11
11
  /**
12
12
  * The original widget params. Useful as you may
13
13
  * need them while using the render function.
@@ -34,7 +34,7 @@ export declare type RendererOptions<TWidgetParams> = {
34
34
  /**
35
35
  * The render function.
36
36
  */
37
- export declare type Renderer<TRenderState, TWidgetParams> = (
37
+ export type Renderer<TRenderState, TWidgetParams> = (
38
38
  /**
39
39
  * The base render options plus the specific options of the widget.
40
40
  */
@@ -46,12 +46,12 @@ isFirstRender: boolean) => void;
46
46
  /**
47
47
  * The called function when unmounting a widget.
48
48
  */
49
- export declare type Unmounter = () => void;
49
+ export type Unmounter = () => void;
50
50
  /**
51
51
  * The connector handles the business logic and exposes
52
52
  * a simplified API to the rendering function.
53
53
  */
54
- export declare type Connector<TWidgetDescription extends WidgetDescription, TConnectorParams extends UnknownWidgetParams> = <TWidgetParams extends UnknownWidgetParams>(
54
+ export type Connector<TWidgetDescription extends WidgetDescription, TConnectorParams extends UnknownWidgetParams> = <TWidgetParams extends UnknownWidgetParams>(
55
55
  /**
56
56
  * The render function.
57
57
  */
@@ -1,20 +1,20 @@
1
1
  import type { InsightsMethodMap, InsightsClient as _InsightsClient } from 'search-insights';
2
2
  export type { Init as InsightsInit, AddAlgoliaAgent as InsightsAddAlgoliaAgent, SetUserToken as InsightsSetUserToken, GetUserToken as InsightsGetUserToken, OnUserTokenChange as InsightsOnUserTokenChange, } from 'search-insights';
3
- export declare type InsightsClientMethod = keyof InsightsMethodMap;
4
- export declare type InsightsClientPayload = {
3
+ export type InsightsClientMethod = keyof InsightsMethodMap;
4
+ export type InsightsClientPayload = {
5
5
  eventName: string;
6
6
  queryID: string;
7
7
  index: string;
8
8
  objectIDs: string[];
9
9
  positions?: number[];
10
10
  };
11
- declare type QueueItemMap = {
11
+ type QueueItemMap = {
12
12
  [MethodName in keyof InsightsMethodMap]: [
13
13
  methodName: MethodName,
14
14
  ...args: InsightsMethodMap[MethodName]
15
15
  ];
16
16
  };
17
- declare type QueueItem = QueueItemMap[keyof QueueItemMap];
18
- export declare type InsightsClient = _InsightsClient & {
17
+ type QueueItem = QueueItemMap[keyof QueueItemMap];
18
+ export type InsightsClient = _InsightsClient & {
19
19
  queue?: QueueItem[];
20
20
  };
@@ -1,7 +1,7 @@
1
1
  import type InstantSearch from '../lib/InstantSearch';
2
2
  import type { UiState } from './ui-state';
3
3
  import type { AtLeastOne } from './utils';
4
- export declare type MiddlewareDefinition<TUiState extends UiState = UiState> = {
4
+ export type MiddlewareDefinition<TUiState extends UiState = UiState> = {
5
5
  onStateChange(options: {
6
6
  uiState: TUiState;
7
7
  }): void;
@@ -9,8 +9,8 @@ export declare type MiddlewareDefinition<TUiState extends UiState = UiState> = {
9
9
  started(): void;
10
10
  unsubscribe(): void;
11
11
  };
12
- export declare type MiddlewareOptions = {
12
+ export type MiddlewareOptions = {
13
13
  instantSearchInstance: InstantSearch;
14
14
  };
15
- export declare type InternalMiddleware<TUiState extends UiState = UiState> = (options: MiddlewareOptions) => MiddlewareDefinition<TUiState>;
16
- export declare type Middleware = (options: MiddlewareOptions) => AtLeastOne<MiddlewareDefinition>;
15
+ export type InternalMiddleware<TUiState extends UiState = UiState> = (options: MiddlewareOptions) => MiddlewareDefinition<TUiState>;
16
+ export type Middleware = (options: MiddlewareOptions) => AtLeastOne<MiddlewareDefinition>;
@@ -25,13 +25,13 @@ import type { ToggleRefinementWidgetDescription } from '../connectors/toggle-ref
25
25
  import type { VoiceSearchWidgetDescription } from '../connectors/voice-search/connectVoiceSearch';
26
26
  import type { AnalyticsWidgetDescription } from '../widgets/analytics/analytics';
27
27
  import type { PlacesWidgetDescription } from '../widgets/places/places';
28
- declare type ConnectorRenderStates = AnswersWidgetDescription['indexRenderState'] & AutocompleteWidgetDescription['indexRenderState'] & BreadcrumbWidgetDescription['indexRenderState'] & ClearRefinementsWidgetDescription['indexRenderState'] & ConfigureWidgetDescription['indexRenderState'] & CurrentRefinementsWidgetDescription['indexRenderState'] & GeoSearchWidgetDescription['indexRenderState'] & HierarchicalMenuWidgetDescription['indexRenderState'] & HitsWidgetDescription['indexRenderState'] & HitsPerPageWidgetDescription['indexRenderState'] & InfiniteHitsWidgetDescription['indexRenderState'] & MenuWidgetDescription['indexRenderState'] & NumericMenuWidgetDescription['indexRenderState'] & PaginationWidgetDescription['indexRenderState'] & PoweredByWidgetDescription['indexRenderState'] & QueryRulesWidgetDescription['indexRenderState'] & RangeWidgetDescription['indexRenderState'] & RatingMenuWidgetDescription['indexRenderState'] & RefinementListWidgetDescription['indexRenderState'] & RelevantSortWidgetDescription['indexRenderState'] & SearchBoxWidgetDescription['indexRenderState'] & SortByWidgetDescription['indexRenderState'] & StatsWidgetDescription['indexRenderState'] & ToggleRefinementWidgetDescription['indexRenderState'] & VoiceSearchWidgetDescription['indexRenderState'];
29
- declare type WidgetRenderStates = AnalyticsWidgetDescription['indexRenderState'] & PlacesWidgetDescription['indexRenderState'];
30
- export declare type IndexRenderState = Partial<ConnectorRenderStates & WidgetRenderStates>;
31
- export declare type RenderState = {
28
+ type ConnectorRenderStates = AnswersWidgetDescription['indexRenderState'] & AutocompleteWidgetDescription['indexRenderState'] & BreadcrumbWidgetDescription['indexRenderState'] & ClearRefinementsWidgetDescription['indexRenderState'] & ConfigureWidgetDescription['indexRenderState'] & CurrentRefinementsWidgetDescription['indexRenderState'] & GeoSearchWidgetDescription['indexRenderState'] & HierarchicalMenuWidgetDescription['indexRenderState'] & HitsWidgetDescription['indexRenderState'] & HitsPerPageWidgetDescription['indexRenderState'] & InfiniteHitsWidgetDescription['indexRenderState'] & MenuWidgetDescription['indexRenderState'] & NumericMenuWidgetDescription['indexRenderState'] & PaginationWidgetDescription['indexRenderState'] & PoweredByWidgetDescription['indexRenderState'] & QueryRulesWidgetDescription['indexRenderState'] & RangeWidgetDescription['indexRenderState'] & RatingMenuWidgetDescription['indexRenderState'] & RefinementListWidgetDescription['indexRenderState'] & RelevantSortWidgetDescription['indexRenderState'] & SearchBoxWidgetDescription['indexRenderState'] & SortByWidgetDescription['indexRenderState'] & StatsWidgetDescription['indexRenderState'] & ToggleRefinementWidgetDescription['indexRenderState'] & VoiceSearchWidgetDescription['indexRenderState'];
29
+ type WidgetRenderStates = AnalyticsWidgetDescription['indexRenderState'] & PlacesWidgetDescription['indexRenderState'];
30
+ export type IndexRenderState = Partial<ConnectorRenderStates & WidgetRenderStates>;
31
+ export type RenderState = {
32
32
  [indexId: string]: IndexRenderState;
33
33
  };
34
- export declare type WidgetRenderState<TWidgetRenderState, TWidgetParams> = TWidgetRenderState & {
34
+ export type WidgetRenderState<TWidgetRenderState, TWidgetParams> = TWidgetRenderState & {
35
35
  widgetParams: TWidgetParams;
36
36
  };
37
37
  export {};
@@ -1,22 +1,22 @@
1
1
  import type { PlainSearchParameters, SearchForFacetValues, SearchResults } from 'algoliasearch-helper';
2
- export declare type HitAttributeHighlightResult = {
2
+ export type HitAttributeHighlightResult = {
3
3
  value: string;
4
4
  matchLevel: 'none' | 'partial' | 'full';
5
5
  matchedWords: string[];
6
6
  fullyHighlighted?: boolean;
7
7
  };
8
- export declare type HitHighlightResult = {
8
+ export type HitHighlightResult = {
9
9
  [attribute: string]: HitAttributeHighlightResult | HitAttributeHighlightResult[] | HitHighlightResult[] | HitHighlightResult;
10
10
  };
11
- export declare type HitAttributeSnippetResult = Pick<HitAttributeHighlightResult, 'value' | 'matchLevel'>;
12
- export declare type HitSnippetResult = {
11
+ export type HitAttributeSnippetResult = Pick<HitAttributeHighlightResult, 'value' | 'matchLevel'>;
12
+ export type HitSnippetResult = {
13
13
  [attribute: string]: HitAttributeSnippetResult[] | HitSnippetResult[] | HitAttributeSnippetResult | HitSnippetResult;
14
14
  };
15
- export declare type GeoLoc = {
15
+ export type GeoLoc = {
16
16
  lat: number;
17
17
  lng: number;
18
18
  };
19
- export declare type AlgoliaHit<THit extends BaseHit = Record<string, any>> = {
19
+ export type AlgoliaHit<THit extends BaseHit = Record<string, any>> = {
20
20
  objectID: string;
21
21
  _highlightResult?: HitHighlightResult;
22
22
  _snippetResult?: HitSnippetResult;
@@ -40,32 +40,32 @@ export declare type AlgoliaHit<THit extends BaseHit = Record<string, any>> = {
40
40
  _distinctSeqID?: number;
41
41
  _geoloc?: GeoLoc;
42
42
  } & THit;
43
- export declare type BaseHit = Record<string, unknown>;
44
- export declare type Hit<THit extends BaseHit = Record<string, any>> = {
43
+ export type BaseHit = Record<string, unknown>;
44
+ export type Hit<THit extends BaseHit = Record<string, any>> = {
45
45
  __position: number;
46
46
  __queryID?: string;
47
47
  } & AlgoliaHit<THit>;
48
48
  /**
49
49
  * @deprecated use Hit[] directly instead
50
50
  */
51
- export declare type Hits = Hit[];
52
- export declare type EscapedHits<THit = Hit> = THit[] & {
51
+ export type Hits = Hit[];
52
+ export type EscapedHits<THit = Hit> = THit[] & {
53
53
  __escaped: boolean;
54
54
  };
55
- export declare type FacetHit = SearchForFacetValues.Hit;
56
- export declare type FacetRefinement = {
55
+ export type FacetHit = SearchForFacetValues.Hit;
56
+ export type FacetRefinement = {
57
57
  value: string;
58
58
  type: 'conjunctive' | 'disjunctive' | 'exclude';
59
59
  };
60
- export declare type NumericRefinement = {
60
+ export type NumericRefinement = {
61
61
  value: number[];
62
62
  type: 'numeric';
63
63
  operator: string;
64
64
  };
65
- export declare type Refinement = FacetRefinement | NumericRefinement;
66
- declare type InitialResult = {
65
+ export type Refinement = FacetRefinement | NumericRefinement;
66
+ type InitialResult = {
67
67
  state: PlainSearchParameters;
68
68
  results: SearchResults['_rawResults'];
69
69
  };
70
- export declare type InitialResults = Record<string, InitialResult>;
70
+ export type InitialResults = Record<string, InitialResult>;
71
71
  export {};
@@ -3,7 +3,7 @@ import type { UiState } from './ui-state';
3
3
  * The router is the part that saves and reads the object from the storage.
4
4
  * Usually this is the URL.
5
5
  */
6
- export declare type Router<TRouteState = UiState> = {
6
+ export type Router<TRouteState = UiState> = {
7
7
  /**
8
8
  * onUpdate Sets an event listener that is triggered when the storage is updated.
9
9
  * The function should accept a callback to trigger when the update happens.
@@ -37,7 +37,7 @@ export declare type Router<TRouteState = UiState> = {
37
37
  * should be valid for any UiState:
38
38
  * `UiState = routeToState(stateToRoute(UiState))`.
39
39
  */
40
- export declare type StateMapping<TUiState = UiState, TRouteState = TUiState> = {
40
+ export type StateMapping<TUiState = UiState, TRouteState = TUiState> = {
41
41
  /**
42
42
  * Transforms a UI state representation into a route object.
43
43
  * It receives an object that contains the UI state of all the widgets in the page.
@@ -2,8 +2,8 @@ import type { VNode } from 'preact';
2
2
  import type { Highlight, ReverseHighlight, ReverseSnippet, Snippet } from '../helpers/components';
3
3
  import type { html } from 'htm/preact';
4
4
  import type { BuiltInBindEventForHits, CustomBindEventForHits, SendEventForHits } from '../lib/utils';
5
- export declare type Template<TTemplateData = void> = string | ((data: TTemplateData, params: TemplateParams) => VNode | VNode[] | string);
6
- export declare type TemplateParams = {
5
+ export type Template<TTemplateData = void> = string | ((data: TTemplateData, params: TemplateParams) => VNode | VNode[] | string);
6
+ export type TemplateParams = {
7
7
  html: typeof html;
8
8
  components: {
9
9
  Highlight: typeof Highlight;
@@ -20,9 +20,9 @@ interface TemplateWithBindEventParams extends TemplateParams {
20
20
  (...args: Parameters<CustomBindEventForHits>): ReturnType<CustomBindEventForHits>;
21
21
  sendEvent: SendEventForHits;
22
22
  }
23
- export declare type TemplateWithBindEvent<TTemplateData = void> = string | ((data: TTemplateData, params: TemplateWithBindEventParams) => VNode | VNode[] | string);
24
- export declare type Templates = {
23
+ export type TemplateWithBindEvent<TTemplateData = void> = string | ((data: TTemplateData, params: TemplateWithBindEventParams) => VNode | VNode[] | string);
24
+ export type Templates = {
25
25
  [key: string]: Template<any> | TemplateWithBindEvent<any> | undefined;
26
26
  };
27
- export declare type HoganHelpers<TKeys extends string = string> = Record<TKeys, (text: string, render: (value: string) => string) => string>;
27
+ export type HoganHelpers<TKeys extends string = string> = Record<TKeys, (text: string, render: (value: string) => string) => string>;
28
28
  export {};
@@ -16,10 +16,10 @@ import type { SortByWidgetDescription } from '../connectors/sort-by/connectSortB
16
16
  import type { ToggleRefinementWidgetDescription } from '../connectors/toggle-refinement/connectToggleRefinement';
17
17
  import type { VoiceSearchWidgetDescription } from '../connectors/voice-search/connectVoiceSearch';
18
18
  import type { PlacesWidgetDescription } from '../widgets/places/places';
19
- declare type ConnectorUiStates = AutocompleteWidgetDescription['indexUiState'] & ConfigureWidgetDescription['indexUiState'] & GeoSearchWidgetDescription['indexUiState'] & HierarchicalMenuWidgetDescription['indexUiState'] & HitsPerPageWidgetDescription['indexUiState'] & InfiniteHitsWidgetDescription['indexUiState'] & MenuWidgetDescription['indexUiState'] & NumericMenuWidgetDescription['indexUiState'] & PaginationWidgetDescription['indexUiState'] & RangeWidgetDescription['indexUiState'] & RatingMenuWidgetDescription['indexUiState'] & RefinementListWidgetDescription['indexUiState'] & RelevantSortWidgetDescription['indexUiState'] & SearchBoxWidgetDescription['indexUiState'] & SortByWidgetDescription['indexUiState'] & ToggleRefinementWidgetDescription['indexUiState'] & VoiceSearchWidgetDescription['indexUiState'];
20
- declare type WidgetUiStates = PlacesWidgetDescription['indexUiState'];
21
- export declare type IndexUiState = Partial<ConnectorUiStates & WidgetUiStates>;
22
- export declare type UiState = {
19
+ type ConnectorUiStates = AutocompleteWidgetDescription['indexUiState'] & ConfigureWidgetDescription['indexUiState'] & GeoSearchWidgetDescription['indexUiState'] & HierarchicalMenuWidgetDescription['indexUiState'] & HitsPerPageWidgetDescription['indexUiState'] & InfiniteHitsWidgetDescription['indexUiState'] & MenuWidgetDescription['indexUiState'] & NumericMenuWidgetDescription['indexUiState'] & PaginationWidgetDescription['indexUiState'] & RangeWidgetDescription['indexUiState'] & RatingMenuWidgetDescription['indexUiState'] & RefinementListWidgetDescription['indexUiState'] & RelevantSortWidgetDescription['indexUiState'] & SearchBoxWidgetDescription['indexUiState'] & SortByWidgetDescription['indexUiState'] & ToggleRefinementWidgetDescription['indexUiState'] & VoiceSearchWidgetDescription['indexUiState'];
20
+ type WidgetUiStates = PlacesWidgetDescription['indexUiState'];
21
+ export type IndexUiState = Partial<ConnectorUiStates & WidgetUiStates>;
22
+ export type UiState = {
23
23
  [indexId: string]: IndexUiState;
24
24
  };
25
25
  export {};
@@ -1,16 +1,16 @@
1
- export declare type HighlightedParts = {
1
+ export type HighlightedParts = {
2
2
  value: string;
3
3
  isHighlighted: boolean;
4
4
  };
5
- export declare type AtLeastOne<TTarget, TMapped = {
5
+ export type AtLeastOne<TTarget, TMapped = {
6
6
  [Key in keyof TTarget]: Pick<TTarget, Key>;
7
7
  }> = Partial<TTarget> & TMapped[keyof TMapped];
8
- export declare type Expand<T> = T extends infer O ? {
8
+ export type Expand<T> = T extends infer O ? {
9
9
  [K in keyof O]: O[K];
10
10
  } : never;
11
- export declare type RequiredKeys<TObject, TKeys extends keyof TObject> = Expand<Required<Pick<TObject, TKeys>> & Omit<TObject, TKeys>>;
12
- export declare type Awaited<T> = T extends PromiseLike<infer U> ? Awaited<U> : T;
11
+ export type RequiredKeys<TObject, TKeys extends keyof TObject> = Expand<Required<Pick<TObject, TKeys>> & Omit<TObject, TKeys>>;
12
+ export type Awaited<T> = T extends PromiseLike<infer U> ? Awaited<U> : T;
13
13
  /**
14
14
  * Make certain keys of an object optional.
15
15
  */
16
- export declare type PartialKeys<TObj, TKeys extends keyof TObj> = Omit<TObj, TKeys> & Partial<Pick<TObj, TKeys>>;
16
+ export type PartialKeys<TObj, TKeys extends keyof TObj> = Omit<TObj, TKeys> & Partial<Pick<TObj, TKeys>>;
@@ -2,13 +2,13 @@ import type { UnknownWidgetParams, Widget, WidgetDescription } from './widget';
2
2
  /**
3
3
  * The function that creates a new widget.
4
4
  */
5
- export declare type WidgetFactory<TWidgetDescription extends WidgetDescription, TConnectorParams extends UnknownWidgetParams, TWidgetParams extends UnknownWidgetParams> = (
5
+ export type WidgetFactory<TWidgetDescription extends WidgetDescription, TConnectorParams extends UnknownWidgetParams, TWidgetParams extends UnknownWidgetParams> = (
6
6
  /**
7
7
  * The params of the widget.
8
8
  */
9
9
  widgetParams: TWidgetParams & TConnectorParams) => Widget<TWidgetDescription & {
10
10
  widgetParams: TConnectorParams;
11
11
  }>;
12
- export declare type UnknownWidgetFactory = WidgetFactory<{
12
+ export type UnknownWidgetFactory = WidgetFactory<{
13
13
  $$type: string;
14
14
  }, any, any>;
@@ -4,12 +4,12 @@ import type { InstantSearch } from './instantsearch';
4
4
  import type { IndexUiState, UiState } from './ui-state';
5
5
  import type { IndexRenderState, WidgetRenderState } from './render-state';
6
6
  import type { Expand, RequiredKeys } from './utils';
7
- export declare type ScopedResult = {
7
+ export type ScopedResult = {
8
8
  indexId: string;
9
9
  results: SearchResults;
10
10
  helper: Helper;
11
11
  };
12
- declare type SharedRenderOptions = {
12
+ type SharedRenderOptions = {
13
13
  instantSearchInstance: InstantSearch;
14
14
  parent: IndexWidget;
15
15
  templatesConfig: Record<string, unknown>;
@@ -26,32 +26,32 @@ declare type SharedRenderOptions = {
26
26
  error: InstantSearch['error'];
27
27
  createURL(state: SearchParameters): string;
28
28
  };
29
- export declare type InitOptions = SharedRenderOptions & {
29
+ export type InitOptions = SharedRenderOptions & {
30
30
  uiState: UiState;
31
31
  results?: undefined;
32
32
  };
33
- export declare type RenderOptions = SharedRenderOptions & {
33
+ export type RenderOptions = SharedRenderOptions & {
34
34
  results: SearchResults;
35
35
  };
36
- export declare type DisposeOptions = {
36
+ export type DisposeOptions = {
37
37
  helper: Helper;
38
38
  state: SearchParameters;
39
39
  parent: IndexWidget;
40
40
  };
41
- export declare type BuiltinTypes = 'ais.analytics' | 'ais.answers' | 'ais.autocomplete' | 'ais.breadcrumb' | 'ais.clearRefinements' | 'ais.configure' | 'ais.configureRelatedItems' | 'ais.currentRefinements' | 'ais.dynamicWidgets' | 'ais.geoSearch' | 'ais.hierarchicalMenu' | 'ais.hits' | 'ais.hitsPerPage' | 'ais.index' | 'ais.infiniteHits' | 'ais.menu' | 'ais.numericMenu' | 'ais.pagination' | 'ais.places' | 'ais.poweredBy' | 'ais.queryRules' | 'ais.range' | 'ais.rangeSlider' | 'ais.rangeInput' | 'ais.ratingMenu' | 'ais.refinementList' | 'ais.searchBox' | 'ais.relevantSort' | 'ais.sortBy' | 'ais.stats' | 'ais.toggleRefinement' | 'ais.voiceSearch';
42
- export declare type BuiltinWidgetTypes = 'ais.analytics' | 'ais.answers' | 'ais.autocomplete' | 'ais.breadcrumb' | 'ais.clearRefinements' | 'ais.configure' | 'ais.configureRelatedItems' | 'ais.currentRefinements' | 'ais.dynamicWidgets' | 'ais.geoSearch' | 'ais.hierarchicalMenu' | 'ais.hits' | 'ais.hitsPerPage' | 'ais.index' | 'ais.infiniteHits' | 'ais.menu' | 'ais.menuSelect' | 'ais.numericMenu' | 'ais.pagination' | 'ais.places' | 'ais.poweredBy' | 'ais.queryRuleCustomData' | 'ais.queryRuleContext' | 'ais.rangeInput' | 'ais.rangeSlider' | 'ais.ratingMenu' | 'ais.refinementList' | 'ais.searchBox' | 'ais.relevantSort' | 'ais.sortBy' | 'ais.stats' | 'ais.toggleRefinement' | 'ais.voiceSearch';
43
- export declare type UnknownWidgetParams = NonNullable<object>;
44
- export declare type WidgetParams = {
41
+ export type BuiltinTypes = 'ais.analytics' | 'ais.answers' | 'ais.autocomplete' | 'ais.breadcrumb' | 'ais.clearRefinements' | 'ais.configure' | 'ais.configureRelatedItems' | 'ais.currentRefinements' | 'ais.dynamicWidgets' | 'ais.geoSearch' | 'ais.hierarchicalMenu' | 'ais.hits' | 'ais.hitsPerPage' | 'ais.index' | 'ais.infiniteHits' | 'ais.menu' | 'ais.numericMenu' | 'ais.pagination' | 'ais.places' | 'ais.poweredBy' | 'ais.queryRules' | 'ais.range' | 'ais.rangeSlider' | 'ais.rangeInput' | 'ais.ratingMenu' | 'ais.refinementList' | 'ais.searchBox' | 'ais.relevantSort' | 'ais.sortBy' | 'ais.stats' | 'ais.toggleRefinement' | 'ais.voiceSearch';
42
+ export type BuiltinWidgetTypes = 'ais.analytics' | 'ais.answers' | 'ais.autocomplete' | 'ais.breadcrumb' | 'ais.clearRefinements' | 'ais.configure' | 'ais.configureRelatedItems' | 'ais.currentRefinements' | 'ais.dynamicWidgets' | 'ais.geoSearch' | 'ais.hierarchicalMenu' | 'ais.hits' | 'ais.hitsPerPage' | 'ais.index' | 'ais.infiniteHits' | 'ais.menu' | 'ais.menuSelect' | 'ais.numericMenu' | 'ais.pagination' | 'ais.places' | 'ais.poweredBy' | 'ais.queryRuleCustomData' | 'ais.queryRuleContext' | 'ais.rangeInput' | 'ais.rangeSlider' | 'ais.ratingMenu' | 'ais.refinementList' | 'ais.searchBox' | 'ais.relevantSort' | 'ais.sortBy' | 'ais.stats' | 'ais.toggleRefinement' | 'ais.voiceSearch';
43
+ export type UnknownWidgetParams = NonNullable<object>;
44
+ export type WidgetParams = {
45
45
  widgetParams?: UnknownWidgetParams;
46
46
  };
47
- export declare type WidgetDescription = {
47
+ export type WidgetDescription = {
48
48
  $$type: string;
49
49
  $$widgetType?: string;
50
50
  renderState?: Record<string, unknown>;
51
51
  indexRenderState?: Record<string, unknown>;
52
52
  indexUiState?: Record<string, unknown>;
53
53
  };
54
- declare type RequiredWidgetLifeCycle<TWidgetDescription extends WidgetDescription> = {
54
+ type RequiredWidgetLifeCycle<TWidgetDescription extends WidgetDescription> = {
55
55
  /**
56
56
  * Identifier for connectors and widgets.
57
57
  */
@@ -70,19 +70,19 @@ declare type RequiredWidgetLifeCycle<TWidgetDescription extends WidgetDescriptio
70
70
  */
71
71
  dispose?: (options: DisposeOptions) => SearchParameters | void;
72
72
  };
73
- declare type RequiredWidgetType<TWidgetDescription extends WidgetDescription> = {
73
+ type RequiredWidgetType<TWidgetDescription extends WidgetDescription> = {
74
74
  /**
75
75
  * Identifier for widgets.
76
76
  */
77
77
  $$widgetType: TWidgetDescription['$$widgetType'];
78
78
  };
79
- declare type WidgetType<TWidgetDescription extends WidgetDescription> = TWidgetDescription extends RequiredKeys<WidgetDescription, '$$widgetType'> ? RequiredWidgetType<TWidgetDescription> : {
79
+ type WidgetType<TWidgetDescription extends WidgetDescription> = TWidgetDescription extends RequiredKeys<WidgetDescription, '$$widgetType'> ? RequiredWidgetType<TWidgetDescription> : {
80
80
  /**
81
81
  * Identifier for widgets.
82
82
  */
83
83
  $$widgetType?: string;
84
84
  };
85
- declare type RequiredUiStateLifeCycle<TWidgetDescription extends WidgetDescription> = {
85
+ type RequiredUiStateLifeCycle<TWidgetDescription extends WidgetDescription> = {
86
86
  /**
87
87
  * This function is required for a widget to be taken in account for routing.
88
88
  * It will derive a uiState for this widget based on the existing uiState and
@@ -117,8 +117,8 @@ declare type RequiredUiStateLifeCycle<TWidgetDescription extends WidgetDescripti
117
117
  uiState: Expand<Partial<TWidgetDescription['indexUiState'] & IndexUiState>>;
118
118
  }) => SearchParameters;
119
119
  };
120
- declare type UiStateLifeCycle<TWidgetDescription extends WidgetDescription> = TWidgetDescription extends RequiredKeys<WidgetDescription, 'indexUiState'> ? RequiredUiStateLifeCycle<TWidgetDescription> : Partial<RequiredUiStateLifeCycle<TWidgetDescription>>;
121
- declare type RequiredRenderStateLifeCycle<TWidgetDescription extends WidgetDescription & WidgetParams> = {
120
+ type UiStateLifeCycle<TWidgetDescription extends WidgetDescription> = TWidgetDescription extends RequiredKeys<WidgetDescription, 'indexUiState'> ? RequiredUiStateLifeCycle<TWidgetDescription> : Partial<RequiredUiStateLifeCycle<TWidgetDescription>>;
121
+ type RequiredRenderStateLifeCycle<TWidgetDescription extends WidgetDescription & WidgetParams> = {
122
122
  /**
123
123
  * Returns the render state of the current widget to pass to the render function.
124
124
  */
@@ -129,24 +129,24 @@ declare type RequiredRenderStateLifeCycle<TWidgetDescription extends WidgetDescr
129
129
  */
130
130
  getRenderState: (renderState: Expand<IndexRenderState & Partial<TWidgetDescription['indexRenderState']>>, renderOptions: InitOptions | RenderOptions) => IndexRenderState & TWidgetDescription['indexRenderState'];
131
131
  };
132
- declare type RenderStateLifeCycle<TWidgetDescription extends WidgetDescription & WidgetParams> = TWidgetDescription extends RequiredKeys<WidgetDescription, 'renderState' | 'indexRenderState'> & WidgetParams ? RequiredRenderStateLifeCycle<TWidgetDescription> : Partial<RequiredRenderStateLifeCycle<TWidgetDescription>>;
133
- export declare type Widget<TWidgetDescription extends WidgetDescription & WidgetParams = {
132
+ type RenderStateLifeCycle<TWidgetDescription extends WidgetDescription & WidgetParams> = TWidgetDescription extends RequiredKeys<WidgetDescription, 'renderState' | 'indexRenderState'> & WidgetParams ? RequiredRenderStateLifeCycle<TWidgetDescription> : Partial<RequiredRenderStateLifeCycle<TWidgetDescription>>;
133
+ export type Widget<TWidgetDescription extends WidgetDescription & WidgetParams = {
134
134
  $$type: string;
135
135
  }> = Expand<RequiredWidgetLifeCycle<TWidgetDescription> & WidgetType<TWidgetDescription> & UiStateLifeCycle<TWidgetDescription> & RenderStateLifeCycle<TWidgetDescription>>;
136
- export declare type TransformItemsMetadata = {
136
+ export type TransformItemsMetadata = {
137
137
  results?: SearchResults;
138
138
  };
139
139
  /**
140
140
  * Transforms the given items.
141
141
  */
142
- export declare type TransformItems<TItem, TMetadata = TransformItemsMetadata> = (items: TItem[], metadata: TMetadata) => TItem[];
143
- declare type SortByDirection<TCriterion extends string> = TCriterion | `${TCriterion}:asc` | `${TCriterion}:desc`;
142
+ export type TransformItems<TItem, TMetadata = TransformItemsMetadata> = (items: TItem[], metadata: TMetadata) => TItem[];
143
+ type SortByDirection<TCriterion extends string> = TCriterion | `${TCriterion}:asc` | `${TCriterion}:desc`;
144
144
  /**
145
145
  * Transforms the given items.
146
146
  */
147
- export declare type SortBy<TItem> = ((a: TItem, b: TItem) => number) | Array<SortByDirection<'count' | 'name' | 'isRefined'>>;
147
+ export type SortBy<TItem> = ((a: TItem, b: TItem) => number) | Array<SortByDirection<'count' | 'name' | 'isRefined'>>;
148
148
  /**
149
149
  * Creates the URL for the given value.
150
150
  */
151
- export declare type CreateURL<TValue> = (value: TValue) => string;
151
+ export type CreateURL<TValue> = (value: TValue) => string;
152
152
  export {};
@@ -1,6 +1,6 @@
1
1
  import type { SearchParameters, SearchResults } from 'algoliasearch-helper';
2
2
  import type { WidgetFactory, WidgetRenderState } from '../../types';
3
- export declare type AnalyticsWidgetParamsPushFunction = (
3
+ export type AnalyticsWidgetParamsPushFunction = (
4
4
  /**
5
5
  * Contains the search parameters, serialized as a query string.
6
6
  */
@@ -13,7 +13,7 @@ state: SearchParameters,
13
13
  * The last received results.
14
14
  */
15
15
  results: SearchResults) => void;
16
- export declare type AnalyticsWidgetParams = {
16
+ export type AnalyticsWidgetParams = {
17
17
  /**
18
18
  * A function that is called every time the query or refinements changes. You
19
19
  * need to add the logic to push the data to your analytics platform.
@@ -48,7 +48,7 @@ export declare type AnalyticsWidgetParams = {
48
48
  */
49
49
  pushPagination?: boolean;
50
50
  };
51
- export declare type AnalyticsWidgetDescription = {
51
+ export type AnalyticsWidgetDescription = {
52
52
  $$type: 'ais.analytics';
53
53
  $$widgetType: 'ais.analytics';
54
54
  renderState: Record<string, unknown>;
@@ -56,6 +56,6 @@ export declare type AnalyticsWidgetDescription = {
56
56
  analytics: WidgetRenderState<Record<string, unknown>, AnalyticsWidgetParams>;
57
57
  };
58
58
  };
59
- export declare type AnalyticsWidget = WidgetFactory<AnalyticsWidgetDescription, AnalyticsWidgetParams, AnalyticsWidgetParams>;
59
+ export type AnalyticsWidget = WidgetFactory<AnalyticsWidgetDescription, AnalyticsWidgetParams, AnalyticsWidgetParams>;
60
60
  declare const analytics: AnalyticsWidget;
61
61
  export default analytics;
@@ -1,7 +1,7 @@
1
1
 
2
2
  import type { WidgetFactory, Template, Hit } from '../../types';
3
3
  import type { AnswersConnectorParams, AnswersWidgetDescription } from '../../connectors/answers/connectAnswers';
4
- export declare type AnswersTemplates = Partial<{
4
+ export type AnswersTemplates = Partial<{
5
5
  /**
6
6
  * Template to use for the header. This template will receive an object containing `hits` and `isLoading`.
7
7
  */
@@ -18,7 +18,7 @@ export declare type AnswersTemplates = Partial<{
18
18
  */
19
19
  item: Template<Hit>;
20
20
  }>;
21
- export declare type AnswersCSSClasses = Partial<{
21
+ export type AnswersCSSClasses = Partial<{
22
22
  /**
23
23
  * CSS class to add to the root element of the widget.
24
24
  */
@@ -44,7 +44,7 @@ export declare type AnswersCSSClasses = Partial<{
44
44
  */
45
45
  item: string | string[];
46
46
  }>;
47
- export declare type AnswersWidgetParams = {
47
+ export type AnswersWidgetParams = {
48
48
  /**
49
49
  * CSS Selector or HTMLElement to insert the widget.
50
50
  */
@@ -58,7 +58,7 @@ export declare type AnswersWidgetParams = {
58
58
  */
59
59
  cssClasses?: AnswersCSSClasses;
60
60
  };
61
- export declare type AnswersWidget = WidgetFactory<AnswersWidgetDescription & {
61
+ export type AnswersWidget = WidgetFactory<AnswersWidgetDescription & {
62
62
  $$widgetType: 'ais.answers';
63
63
  }, AnswersConnectorParams, AnswersWidgetParams>;
64
64
  declare const answersWidget: AnswersWidget;
@@ -1,7 +1,7 @@
1
1
 
2
2
  import type { BreadcrumbWidgetDescription, BreadcrumbConnectorParams } from '../../connectors/breadcrumb/connectBreadcrumb';
3
3
  import type { WidgetFactory, Template } from '../../types';
4
- export declare type BreadcrumbCSSClasses = Partial<{
4
+ export type BreadcrumbCSSClasses = Partial<{
5
5
  /**
6
6
  * CSS class to add to the root element of the widget.
7
7
  */
@@ -31,7 +31,7 @@ export declare type BreadcrumbCSSClasses = Partial<{
31
31
  */
32
32
  link: string | string[];
33
33
  }>;
34
- export declare type BreadcrumbTemplates = Partial<{
34
+ export type BreadcrumbTemplates = Partial<{
35
35
  /**
36
36
  * Label of the breadcrumb's first element.
37
37
  */
@@ -41,7 +41,7 @@ export declare type BreadcrumbTemplates = Partial<{
41
41
  */
42
42
  separator: Template;
43
43
  }>;
44
- export declare type BreadcrumbWidgetParams = {
44
+ export type BreadcrumbWidgetParams = {
45
45
  /**
46
46
  * CSS Selector or HTMLElement to insert the widget.
47
47
  */
@@ -55,7 +55,7 @@ export declare type BreadcrumbWidgetParams = {
55
55
  */
56
56
  cssClasses?: BreadcrumbCSSClasses;
57
57
  };
58
- export declare type BreadcrumbWidget = WidgetFactory<BreadcrumbWidgetDescription & {
58
+ export type BreadcrumbWidget = WidgetFactory<BreadcrumbWidgetDescription & {
59
59
  $$widgetType: 'ais.breadcrumb';
60
60
  }, BreadcrumbConnectorParams, BreadcrumbWidgetParams>;
61
61
  declare const breadcrumb: BreadcrumbWidget;