@algolia/autocomplete-shared 1.11.0 → 1.12.0

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.
@@ -0,0 +1,4 @@
1
+ import type { SearchResponse as ClientSearchResponse } from '@algolia/client-search';
2
+ export declare type SearchResponse<TObject> = ClientSearchResponse<TObject> & {
3
+ _automaticInsights?: true;
4
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -42,7 +42,6 @@ export declare type GetFormProps<TEvent = Event> = (props: {
42
42
  };
43
43
  export declare type GetLabelProps = (props?: {
44
44
  [key: string]: unknown;
45
- sourceIndex?: number;
46
45
  }) => {
47
46
  htmlFor: string;
48
47
  id: string;
@@ -81,7 +80,7 @@ export declare type GetPanelProps<TMouseEvent> = (props?: {
81
80
  };
82
81
  export declare type GetListProps = (props?: {
83
82
  [key: string]: unknown;
84
- sourceIndex?: number;
83
+ source: InternalAutocompleteSource<any>;
85
84
  }) => {
86
85
  role: 'listbox';
87
86
  'aria-labelledby': string;
@@ -1,7 +1,8 @@
1
1
  import type { FacetHit, Hit } from '@algolia/client-search';
2
2
  import type { MaybePromise } from '../MaybePromise';
3
- import type { SearchForFacetValuesResponse, SearchResponse } from '../preset-algolia/algoliasearch';
3
+ import type { SearchForFacetValuesResponse } from '../preset-algolia/algoliasearch';
4
4
  import type { RequesterDescription } from '../preset-algolia/createRequester';
5
+ import type { SearchResponse } from '../SearchResponse';
5
6
  import { AutocompleteScopeApi, BaseItem } from './AutocompleteApi';
6
7
  import { GetSourcesParams } from './AutocompleteOptions';
7
8
  import { AutocompleteState } from './AutocompleteState';
@@ -10,6 +10,7 @@ export * from './isEqual';
10
10
  export * from './MaybePromise';
11
11
  export * from './noop';
12
12
  export * from './safelyRunOnBrowser';
13
+ export * from './SearchResponse';
13
14
  export * from './UserAgent';
14
15
  export * from './userAgents';
15
16
  export * from './version';
package/dist/esm/index.js CHANGED
@@ -10,6 +10,7 @@ export * from './isEqual';
10
10
  export * from './MaybePromise';
11
11
  export * from './noop';
12
12
  export * from './safelyRunOnBrowser';
13
+ export * from './SearchResponse';
13
14
  export * from './UserAgent';
14
15
  export * from './userAgents';
15
16
  export * from './version';
@@ -1,6 +1,6 @@
1
1
  import * as ClientSearch from '@algolia/client-search';
2
2
  import type * as AlgoliaSearch from 'algoliasearch/lite';
3
- declare type AnyToUnknown<TSubject> = (any extends TSubject ? true : false) extends true ? unknown : TSubject;
3
+ declare type AnyToUnknown<TSubject> = (0 extends 1 & TSubject ? true : false) extends true ? unknown : TSubject;
4
4
  declare type SearchClientShape = {
5
5
  search: unknown;
6
6
  };
@@ -1,5 +1,6 @@
1
+ import type { SearchResponse } from '../SearchResponse';
1
2
  import { UserAgent } from '../UserAgent';
2
- import { MultipleQueriesQuery, SearchClient, SearchForFacetValuesResponse, SearchResponse } from './algoliasearch';
3
+ import { MultipleQueriesQuery, SearchClient, SearchForFacetValuesResponse } from './algoliasearch';
3
4
  export interface SearchParams {
4
5
  /**
5
6
  * The initialized Algolia search client.
@@ -1 +1 @@
1
- export declare const version = "1.11.0";
1
+ export declare const version = "1.12.0";
@@ -1 +1 @@
1
- export var version = '1.11.0';
1
+ export var version = '1.12.0';
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@algolia/autocomplete-shared",
3
3
  "description": "Shared utils for Autocomplete packages.",
4
- "version": "1.11.0",
4
+ "version": "1.12.0",
5
5
  "license": "MIT",
6
6
  "homepage": "https://github.com/algolia/autocomplete",
7
7
  "repository": "algolia/autocomplete",