@stacksjs/search-engine 0.58.62 → 0.58.64
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.js +1 -3
- package/package.json +1 -1
- package/src/index.ts +5 -5
package/dist/index.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
// src/index.ts
|
|
3
|
-
import {searchEngine} from "@stacksjs/config";
|
|
4
3
|
import {useStorage} from "@stacksjs/utils";
|
|
5
4
|
|
|
6
5
|
// src/helpers.ts
|
|
@@ -19,8 +18,7 @@ function determineState() {
|
|
|
19
18
|
|
|
20
19
|
// src/index.ts
|
|
21
20
|
function client() {
|
|
22
|
-
|
|
23
|
-
return meilisearch;
|
|
21
|
+
return "wip-search-me";
|
|
24
22
|
}
|
|
25
23
|
function useSearchEngine() {
|
|
26
24
|
return client();
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { searchEngine } from '@stacksjs/config'
|
|
2
1
|
import type { UiEngine } from '@stacksjs/ui'
|
|
3
2
|
import { useStorage } from '@stacksjs/utils'
|
|
4
3
|
|
|
@@ -33,8 +32,9 @@ export const sort = computed(() => table.sort)
|
|
|
33
32
|
export const sorts = computed(() => table.sorts)
|
|
34
33
|
|
|
35
34
|
export function client() {
|
|
36
|
-
if (searchEngine.driver === 'meilisearch')
|
|
37
|
-
|
|
35
|
+
// if (searchEngine.driver === 'meilisearch')
|
|
36
|
+
// return meilisearch
|
|
37
|
+
return 'wip-search-me'
|
|
38
38
|
}
|
|
39
39
|
|
|
40
40
|
export function useSearchEngine() {
|
|
@@ -55,8 +55,8 @@ export function calculatePagination() {
|
|
|
55
55
|
from = 1
|
|
56
56
|
|
|
57
57
|
let to = from + offset * 2
|
|
58
|
-
if (to >= lastPage)
|
|
59
|
-
to = lastPage
|
|
58
|
+
if (to >= (lastPage as number))
|
|
59
|
+
to = lastPage as number
|
|
60
60
|
|
|
61
61
|
const allPages = []
|
|
62
62
|
for (let page = from; page <= to; page++)
|