-
Notifications
You must be signed in to change notification settings - Fork 120
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
243 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,38 +1,28 @@ | ||
import type { | ||
RegisterSearchButtonProps, | ||
RegisterSearchBoxProps, | ||
} from '@orama/searchbox' | ||
import { OramaClient } from '@oramacloud/client' | ||
import '@orama/searchbox/dist/index.css' | ||
|
||
const oramaInstance = new OramaClient({ | ||
// The search endpoint for the Orama index | ||
endpoint: 'https://cloud.orama.run/v1/indexes/tanstack-dev-ur0ppd', | ||
// The public API key for performing search. This is commit-safe. | ||
api_key: 'xqfn8QcuImADRGPIlhWTo9cT5UNiqPDj', | ||
}) | ||
|
||
export const searchBoxParams: RegisterSearchBoxProps = { | ||
oramaInstance, | ||
colorScheme: 'system', | ||
backdrop: true, | ||
export const searchBoxParams = { | ||
index: { | ||
api_key: 'xqfn8QcuImADRGPIlhWTo9cT5UNiqPDj', | ||
endpoint: 'https://cloud.orama.run/v1/indexes/tanstack-dev-ur0ppd', | ||
}, | ||
colorScheme: 'system' as 'light' | 'dark' | 'system', | ||
facetProperty: 'category', | ||
resultsMap: { | ||
resultMap: { | ||
description: 'content', | ||
section: 'category', | ||
}, | ||
|
||
themeConfig: { | ||
light: {}, | ||
dark: { | ||
'--backdrop-bg-color': '#0d103591', | ||
colors: { | ||
light: {}, | ||
dark: { | ||
'--backdrop-background-color-primary': 'rgba(0, 0, 0, 0.7)', | ||
}, | ||
}, | ||
}, | ||
searchMode: 'hybrid', | ||
searchParams: { | ||
threshold: 0, | ||
}, | ||
} | ||
|
||
export const searchButtonParams: RegisterSearchButtonProps = { | ||
export const searchButtonParams = { | ||
colorScheme: 'system', | ||
fullWidth: true, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.