piral-search 0.15.11 → 0.15.12-beta.5528

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/esm/types.d.ts CHANGED
@@ -94,7 +94,7 @@ export interface SearchResultProps {
94
94
  */
95
95
  children?: ReactNode;
96
96
  }
97
- export declare type SearchResultType = string | ReactElement<any> | AnyComponent<SearchResultComponentProps>;
97
+ export type SearchResultType = string | ReactElement<any> | AnyComponent<SearchResultComponentProps>;
98
98
  export interface SearchProvider {
99
99
  (options: SearchOptions, api: PiletApi): Promise<SearchResultType | Array<SearchResultType>>;
100
100
  }
package/lib/types.d.ts CHANGED
@@ -94,7 +94,7 @@ export interface SearchResultProps {
94
94
  */
95
95
  children?: ReactNode;
96
96
  }
97
- export declare type SearchResultType = string | ReactElement<any> | AnyComponent<SearchResultComponentProps>;
97
+ export type SearchResultType = string | ReactElement<any> | AnyComponent<SearchResultComponentProps>;
98
98
  export interface SearchProvider {
99
99
  (options: SearchOptions, api: PiletApi): Promise<SearchResultType | Array<SearchResultType>>;
100
100
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "piral-search",
3
- "version": "0.15.11",
3
+ "version": "0.15.12-beta.5528",
4
4
  "description": "Plugin for centralizing search in Piral.",
5
5
  "keywords": [
6
6
  "piral",
@@ -62,12 +62,12 @@
62
62
  },
63
63
  "devDependencies": {
64
64
  "@types/react": "^18.0.0",
65
- "piral-core": "^0.15.11",
65
+ "piral-core": "0.15.12-beta.5528",
66
66
  "react": "^18.0.0"
67
67
  },
68
68
  "peerDependencies": {
69
69
  "piral-core": "0.14.x || 0.15.x",
70
70
  "react": ">=16.8.0"
71
71
  },
72
- "gitHead": "513cd05c0234dd02fdc95abb8f391e307f309fea"
72
+ "gitHead": "6d97a2baca7ae3e5fb19a754ba55d44b40ed137e"
73
73
  }
@@ -4,6 +4,7 @@ import { createSearchApi } from './create';
4
4
  function createMockContainer() {
5
5
  const state = create(() => ({
6
6
  registry: {
7
+ wrappers: {},
7
8
  extensions: {},
8
9
  },
9
10
  }));
@@ -14,11 +15,18 @@ function createMockContainer() {
14
15
  emit: jest.fn(),
15
16
  defineActions() {},
16
17
  state,
18
+ readState(cb) {
19
+ return cb(state.getState());
20
+ },
17
21
  dispatch(update) {
18
22
  state.setState(update(state.getState()));
19
23
  },
20
24
  } as any,
21
- api: {} as any,
25
+ api: {
26
+ meta: {
27
+ name: '',
28
+ },
29
+ } as any,
22
30
  };
23
31
  }
24
32