@stacksjs/search-engine 0.51.0 → 0.52.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/README.md CHANGED
@@ -45,7 +45,7 @@ pnpm test
45
45
 
46
46
  Please see our [releases](https://github.com/stacksjs/stacks/releases) page for more information on what has changed recently.
47
47
 
48
- ## 💪🏼 Contributing
48
+ ## 🚜 Contributing
49
49
 
50
50
  Please review the [Contributing Guide](https://github.com/stacksjs/contributing) for details.
51
51
 
@@ -1,8 +1,9 @@
1
1
  import { MeiliSearch } from 'meilisearch';
2
+ import type { SearchResponse } from 'meilisearch';
2
3
  interface SearchEngineOptions {
3
4
  host: string;
4
5
  apiKey: string;
5
6
  }
6
7
  declare function client(options?: SearchEngineOptions): MeiliSearch;
7
- declare function search(index: string, params: any): Promise<import("meilisearch").SearchResponse<Record<string, any>>>;
8
+ declare function search(index: string, params: any): Promise<SearchResponse<Record<string, any>>>;
8
9
  export { client, search, };
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { client as meilisearch, search } from './drivers/meilisearch';
1
+ import { client as meilisearch } from './drivers/meilisearch';
2
2
  export declare const totalPages: any;
3
3
  export declare const currentPage: any;
4
4
  export declare const filterName: any;
@@ -20,24 +20,3 @@ export declare const sorts: any;
20
20
  export declare function client(): typeof meilisearch | undefined;
21
21
  export declare function useSearchEngine(): typeof meilisearch | undefined;
22
22
  export declare function calculatePagination(): void;
23
- declare const _default: {
24
- useSearchEngine: typeof useSearchEngine;
25
- client: typeof client;
26
- search: typeof search;
27
- calculatePagination: typeof calculatePagination;
28
- currentPage: any;
29
- totalPages: any;
30
- filterName: any;
31
- filters: any;
32
- goToNextPage: any;
33
- goToPage: any;
34
- goToPrevPage: any;
35
- hits: any;
36
- index: any;
37
- searchFilters: any;
38
- searchParams: any;
39
- setTotalHits: any;
40
- sort: any;
41
- sorts: any;
42
- };
43
- export default _default;
package/dist/index.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  import { searchEngine } from "@stacksjs/config";
2
- import { client as meilisearch, search } from "./drivers/meilisearch.mjs";
2
+ import { client as meilisearch } from "./drivers/meilisearch.mjs";
3
3
  import { determineState } from "./helpers.mjs";
4
4
  const table = useStorage("table", determineState()).value;
5
5
  const totalHits = table.results?.estimatedTotalHits ?? 1;
@@ -47,23 +47,3 @@ export function calculatePagination() {
47
47
  allPages.push(page);
48
48
  pages.value = allPages;
49
49
  }
50
- export default {
51
- useSearchEngine,
52
- client,
53
- search,
54
- calculatePagination,
55
- currentPage,
56
- totalPages,
57
- filterName,
58
- filters,
59
- goToNextPage,
60
- goToPage,
61
- goToPrevPage,
62
- hits,
63
- index,
64
- searchFilters,
65
- searchParams,
66
- setTotalHits,
67
- sort,
68
- sorts
69
- };
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "@stacksjs/search-engine",
3
3
  "type": "module",
4
- "version": "0.51.0",
5
- "packageManager": "pnpm@7.26.3",
4
+ "version": "0.52.1",
5
+ "packageManager": "pnpm@8.5.1",
6
6
  "description": "The Stacks search engine integrations.",
7
7
  "author": "Chris Breuer",
8
8
  "license": "MIT",
@@ -29,7 +29,12 @@
29
29
  "headless",
30
30
  "stacks"
31
31
  ],
32
- "main": "dist/index.mjs",
32
+ "exports": {
33
+ ".": {
34
+ "types": "./dist/index.d.ts",
35
+ "import": "./dist/index.mjs"
36
+ }
37
+ },
33
38
  "module": "dist/index.mjs",
34
39
  "types": "dist/index.d.ts",
35
40
  "contributors": [
@@ -39,25 +44,21 @@
39
44
  "dist",
40
45
  "README.md"
41
46
  ],
42
- "engines": {
43
- "node": ">=v18.14.0",
44
- "pnpm": ">=7.26.3"
45
- },
46
47
  "peerDependencies": {
47
- "@vueuse/core": "^9.12.0",
48
- "meilisearch": "^0.30.0",
49
- "vue": "^3.2.47",
50
- "@stacksjs/cli": "0.51.0",
51
- "@stacksjs/config": "0.51.0"
48
+ "meilisearch": "^0.32.3"
49
+ },
50
+ "dependencies": {
51
+ "@stacksjs/cli": "0.52.1",
52
+ "@stacksjs/config": "0.52.1",
53
+ "@stacksjs/ui": "0.52.1"
52
54
  },
53
55
  "devDependencies": {
54
- "mkdist": "^1.1.0",
55
- "typescript": "^4.9.5",
56
- "@stacksjs/testing": "0.51.0"
56
+ "@stacksjs/development": "0.52.1",
57
+ "@stacksjs/types": "0.52.1"
57
58
  },
58
59
  "scripts": {
59
- "build": "mkdist -d",
60
- "dev": "mkdist -d",
60
+ "build": "unbuild",
61
+ "dev": "unbuild --stub",
61
62
  "typecheck": "tsc --noEmit"
62
63
  }
63
64
  }