@rubixstudios/payload-typesense 1.6.12 → 1.7.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.
- package/README.md +76 -120
- package/dist/components/HeadlessSearchInput.d.ts.map +1 -1
- package/dist/components/HeadlessSearchInput.js +174 -142
- package/dist/components/ThemeProvider.d.ts +3 -3
- package/dist/components/ThemeProvider.d.ts.map +1 -1
- package/dist/components/ThemeProvider.js +6 -5
- package/dist/components/icons/clockIcon.d.ts +2 -0
- package/dist/components/icons/clockIcon.d.ts.map +1 -0
- package/dist/components/icons/clockIcon.js +16 -0
- package/dist/components/icons/collectionIcon.d.ts +2 -0
- package/dist/components/icons/collectionIcon.d.ts.map +1 -0
- package/dist/components/icons/collectionIcon.js +16 -0
- package/dist/components/icons/errorIcon.d.ts +2 -0
- package/dist/components/icons/errorIcon.d.ts.map +1 -0
- package/dist/components/icons/errorIcon.js +16 -0
- package/dist/components/icons/index.d.ts +6 -0
- package/dist/components/icons/index.d.ts.map +1 -0
- package/dist/components/icons/index.js +5 -0
- package/dist/components/icons/noResultsIcon.d.ts +6 -0
- package/dist/components/icons/noResultsIcon.d.ts.map +1 -0
- package/dist/components/icons/noResultsIcon.js +19 -0
- package/dist/components/icons/searchIcon.d.ts +6 -0
- package/dist/components/icons/searchIcon.d.ts.map +1 -0
- package/dist/components/icons/searchIcon.js +16 -0
- package/dist/components/index.d.ts +2 -1
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/index.js +2 -1
- package/dist/components/render/Header.d.ts +3 -3
- package/dist/components/render/Header.d.ts.map +1 -1
- package/dist/components/render/Header.js +29 -26
- package/dist/components/render/NoResults.d.ts +3 -3
- package/dist/components/render/NoResults.d.ts.map +1 -1
- package/dist/components/render/NoResults.js +34 -37
- package/dist/components/render/ResultError.d.ts +3 -3
- package/dist/components/render/ResultError.d.ts.map +1 -1
- package/dist/components/render/ResultError.js +27 -26
- package/dist/components/render/Results.d.ts +4 -4
- package/dist/components/render/Results.d.ts.map +1 -1
- package/dist/components/render/Results.js +140 -136
- package/dist/components/themes/hooks.d.ts +2 -40
- package/dist/components/themes/hooks.d.ts.map +1 -1
- package/dist/components/themes/hooks.js +33 -82
- package/dist/components/themes/themes.d.ts.map +1 -1
- package/dist/components/themes/themes.js +16 -20
- package/dist/components/themes/types.d.ts.map +1 -1
- package/dist/components/themes/utils.d.ts +2 -14
- package/dist/components/themes/utils.d.ts.map +1 -1
- package/dist/components/themes/utils.js +24 -37
- package/dist/endpoints/handler/createAdvancedSearch.d.ts +1 -1
- package/dist/endpoints/handler/createAdvancedSearch.d.ts.map +1 -1
- package/dist/endpoints/handler/createAdvancedSearch.js +72 -8
- package/dist/endpoints/handler/createCollections.d.ts +1 -1
- package/dist/endpoints/handler/createCollections.d.ts.map +1 -1
- package/dist/endpoints/handler/createCollections.js +8 -8
- package/dist/endpoints/handler/createSearch.d.ts +1 -1
- package/dist/endpoints/handler/createSearch.d.ts.map +1 -1
- package/dist/endpoints/handler/createSearch.js +45 -44
- package/dist/endpoints/handler/createSuggest.d.ts +1 -1
- package/dist/endpoints/handler/createSuggest.d.ts.map +1 -1
- package/dist/endpoints/handler/createSuggest.js +26 -11
- package/dist/endpoints/health.d.ts +2 -2
- package/dist/endpoints/health.d.ts.map +1 -1
- package/dist/endpoints/health.js +58 -52
- package/dist/endpoints/search.d.ts +2 -9
- package/dist/endpoints/search.d.ts.map +1 -1
- package/dist/endpoints/search.js +17 -16
- package/dist/{utils → hooks}/useDebounce.d.ts.map +1 -1
- package/dist/{utils → hooks}/useDebounce.js +2 -2
- package/dist/{utils → hooks}/useSearch.d.ts.map +1 -1
- package/dist/hooks/useSearch.js +93 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +38 -32
- package/dist/lib/cache.d.ts.map +1 -1
- package/dist/lib/cache.js +54 -25
- package/dist/lib/client.d.ts +1 -1
- package/dist/lib/client.d.ts.map +1 -1
- package/dist/lib/client.js +35 -31
- package/dist/lib/headlessSearch.d.ts +24 -20
- package/dist/lib/headlessSearch.d.ts.map +1 -1
- package/dist/lib/hooks.d.ts +3 -11
- package/dist/lib/hooks.d.ts.map +1 -1
- package/dist/lib/hooks.js +12 -45
- package/dist/lib/initialization.d.ts +1 -1
- package/dist/lib/initialization.d.ts.map +1 -1
- package/dist/lib/initialization.js +51 -49
- package/dist/lib/schema-mapper.d.ts +3 -6
- package/dist/lib/schema-mapper.d.ts.map +1 -1
- package/dist/lib/schema-mapper.js +82 -84
- package/dist/lib/validation.d.ts +26 -34
- package/dist/lib/validation.d.ts.map +1 -1
- package/dist/lib/validation.js +48 -58
- package/dist/types.d.ts +154 -127
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +1 -1
- package/dist/utils/buildError.d.ts +1 -1
- package/dist/utils/buildError.d.ts.map +1 -1
- package/dist/utils/buildError.js +2 -2
- package/dist/utils/ensureCollection.d.ts +2 -2
- package/dist/utils/ensureCollection.d.ts.map +1 -1
- package/dist/utils/ensureCollection.js +103 -23
- package/dist/utils/extractText.d.ts.map +1 -1
- package/dist/utils/extractText.js +11 -8
- package/dist/utils/getCacheStats.d.ts.map +1 -1
- package/dist/utils/getCacheStats.js +1 -8
- package/dist/utils/getCollectionInfo.d.ts.map +1 -1
- package/dist/utils/getCollectionInfo.js +1 -1
- package/dist/utils/{getAllCollections.d.ts → getCollections.d.ts} +2 -2
- package/dist/utils/getCollections.d.ts.map +1 -0
- package/dist/utils/getCollections.js +140 -0
- package/dist/utils/keyboard.d.ts +4 -4
- package/dist/utils/keyboard.d.ts.map +1 -1
- package/dist/utils/keyboard.js +20 -22
- package/dist/utils/sortResults.d.ts +3 -0
- package/dist/utils/sortResults.d.ts.map +1 -0
- package/dist/utils/sortResults.js +73 -0
- package/dist/utils/testConnection.d.ts.map +1 -1
- package/dist/utils/vectorSearch.d.ts +3 -2
- package/dist/utils/vectorSearch.d.ts.map +1 -1
- package/dist/utils/vectorSearch.js +9 -7
- package/package.json +14 -14
- package/dist/utils/getAllCollections.d.ts.map +0 -1
- package/dist/utils/getAllCollections.js +0 -103
- package/dist/utils/useSearch.js +0 -66
- /package/dist/{utils → hooks}/useDebounce.d.ts +0 -0
- /package/dist/{utils → hooks}/useSearch.d.ts +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ThemeProvider.d.ts","sourceRoot":"","sources":["../../src/components/ThemeProvider.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"ThemeProvider.d.ts","sourceRoot":"","sources":["../../src/components/ThemeProvider.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAiB,KAAK,SAAS,EAAO,MAAM,OAAO,CAAA;AAG1D,OAAO,EAAE,KAAK,WAAW,EAAE,KAAK,iBAAiB,EAAE,MAAM,mBAAmB,CAAA;AAE5E,UAAU,kBAAkB;IAC1B,QAAQ,EAAE,SAAS,CAAA;IACnB,MAAM,EAAE,WAAW,CAAA;CACpB;AAID,wBAAgB,aAAa,CAAC,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,kBAAkB,+BAIrE;AAED,wBAAgB,QAAQ,IAAI,iBAAiB,CAQ5C"}
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
3
|
import { createContext, use } from 'react';
|
|
4
4
|
import { useThemeConfig } from './themes/hooks.js';
|
|
5
5
|
const ThemeContext = /*#__PURE__*/ createContext(null);
|
|
6
6
|
export function ThemeProvider({ children, config }) {
|
|
7
|
-
const
|
|
8
|
-
return /*#__PURE__*/
|
|
9
|
-
value:
|
|
10
|
-
|
|
7
|
+
const value = useThemeConfig(config);
|
|
8
|
+
return /*#__PURE__*/ _jsx(ThemeContext, {
|
|
9
|
+
value: value,
|
|
10
|
+
children: children
|
|
11
|
+
});
|
|
11
12
|
}
|
|
12
13
|
export function useTheme() {
|
|
13
14
|
const context = use(ThemeContext);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"clockIcon.d.ts","sourceRoot":"","sources":["../../../src/components/icons/clockIcon.tsx"],"names":[],"mappings":"AAAA,eAAO,MAAM,SAAS,mCAarB,CAAA"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
export const ClockIcon = ()=>/*#__PURE__*/ _jsx("svg", {
|
|
3
|
+
"aria-hidden": "true",
|
|
4
|
+
fill: "currentColor",
|
|
5
|
+
style: {
|
|
6
|
+
height: '12px',
|
|
7
|
+
marginRight: '4px',
|
|
8
|
+
width: '12px'
|
|
9
|
+
},
|
|
10
|
+
viewBox: "0 0 20 20",
|
|
11
|
+
children: /*#__PURE__*/ _jsx("path", {
|
|
12
|
+
clipRule: "evenodd",
|
|
13
|
+
d: "M10 18a8 8 0 100-16 8 8 0 000 16zm1-12a1 1 0 10-2 0v4a1 1 0 00.293.707l2.828 2.829a1 1 0 101.415-1.415L11 9.586V6z",
|
|
14
|
+
fillRule: "evenodd"
|
|
15
|
+
})
|
|
16
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"collectionIcon.d.ts","sourceRoot":"","sources":["../../../src/components/icons/collectionIcon.tsx"],"names":[],"mappings":"AAAA,eAAO,MAAM,cAAc,mCAa1B,CAAA"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
export const CollectionIcon = ()=>/*#__PURE__*/ _jsx("svg", {
|
|
3
|
+
"aria-hidden": "true",
|
|
4
|
+
fill: "currentColor",
|
|
5
|
+
style: {
|
|
6
|
+
height: '12px',
|
|
7
|
+
marginRight: '4px',
|
|
8
|
+
width: '12px'
|
|
9
|
+
},
|
|
10
|
+
viewBox: "0 0 20 20",
|
|
11
|
+
children: /*#__PURE__*/ _jsx("path", {
|
|
12
|
+
clipRule: "evenodd",
|
|
13
|
+
d: "M3 4a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1zm0 4a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1zm0 4a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1zm0 4a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1z",
|
|
14
|
+
fillRule: "evenodd"
|
|
15
|
+
})
|
|
16
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"errorIcon.d.ts","sourceRoot":"","sources":["../../../src/components/icons/errorIcon.tsx"],"names":[],"mappings":"AAAA,eAAO,MAAM,SAAS,mCAarB,CAAA"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
export const ErrorIcon = ()=>/*#__PURE__*/ _jsx("svg", {
|
|
3
|
+
"aria-hidden": "true",
|
|
4
|
+
fill: "currentColor",
|
|
5
|
+
style: {
|
|
6
|
+
flexShrink: 0,
|
|
7
|
+
height: '20px',
|
|
8
|
+
width: '20px'
|
|
9
|
+
},
|
|
10
|
+
viewBox: "0 0 20 20",
|
|
11
|
+
children: /*#__PURE__*/ _jsx("path", {
|
|
12
|
+
clipRule: "evenodd",
|
|
13
|
+
d: "M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7 4a1 1 0 11-2 0 1 1 0 012 0zm-1-9a1 1 0 00-1 1v4a1 1 0 102 0V6a1 1 0 00-1-1z",
|
|
14
|
+
fillRule: "evenodd"
|
|
15
|
+
})
|
|
16
|
+
});
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { ClockIcon } from './clockIcon.js';
|
|
2
|
+
export { CollectionIcon } from './collectionIcon.js';
|
|
3
|
+
export { ErrorIcon } from './errorIcon.js';
|
|
4
|
+
export { NoResultsIcon } from './noResultsIcon.js';
|
|
5
|
+
export { SearchIcon } from './searchIcon.js';
|
|
6
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/icons/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAA;AAC1C,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAA;AACpD,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAA;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAA;AAClD,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"noResultsIcon.d.ts","sourceRoot":"","sources":["../../../src/components/icons/noResultsIcon.tsx"],"names":[],"mappings":"AAAA,KAAK,KAAK,GAAG;IACX,KAAK,CAAC,EAAE,MAAM,CAAA;CACf,CAAA;AAED,eAAO,MAAM,aAAa,cAAgC,KAAK,gCAoB9D,CAAA"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
export const NoResultsIcon = ({ color = 'currentColor' })=>/*#__PURE__*/ _jsx("svg", {
|
|
3
|
+
"aria-hidden": "true",
|
|
4
|
+
fill: "none",
|
|
5
|
+
stroke: "currentColor",
|
|
6
|
+
style: {
|
|
7
|
+
color,
|
|
8
|
+
height: '48px',
|
|
9
|
+
marginBottom: '12px',
|
|
10
|
+
width: '48px'
|
|
11
|
+
},
|
|
12
|
+
viewBox: "0 0 24 24",
|
|
13
|
+
children: /*#__PURE__*/ _jsx("path", {
|
|
14
|
+
d: "M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z",
|
|
15
|
+
strokeLinecap: "round",
|
|
16
|
+
strokeLinejoin: "round",
|
|
17
|
+
strokeWidth: 1
|
|
18
|
+
})
|
|
19
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"searchIcon.d.ts","sourceRoot":"","sources":["../../../src/components/icons/searchIcon.tsx"],"names":[],"mappings":"AAAA,KAAK,KAAK,GAAG;IACX,KAAK,CAAC,EAAE,MAAM,CAAA;CACf,CAAA;AAED,eAAO,MAAM,UAAU,cAAgC,KAAK,gCAa3D,CAAA"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
export const SearchIcon = ({ color = 'currentColor' })=>/*#__PURE__*/ _jsx("svg", {
|
|
3
|
+
"aria-hidden": "true",
|
|
4
|
+
fill: "currentColor",
|
|
5
|
+
style: {
|
|
6
|
+
color,
|
|
7
|
+
height: '16px',
|
|
8
|
+
width: '16px'
|
|
9
|
+
},
|
|
10
|
+
viewBox: "0 0 20 20",
|
|
11
|
+
children: /*#__PURE__*/ _jsx("path", {
|
|
12
|
+
clipRule: "evenodd",
|
|
13
|
+
d: "M8 4a4 4 0 100 8 4 4 0 000-8zM2 8a6 6 0 1110.89 3.476l4.817 4.817a1 1 0 01-1.414 1.414l-4.816-4.816A6 6 0 012 8z",
|
|
14
|
+
fillRule: "evenodd"
|
|
15
|
+
})
|
|
16
|
+
});
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
export type { HeadlessSearchInputProps } from '../lib/headlessSearch.js';
|
|
2
2
|
export type { BaseSearchInputProps, HealthCheckResponse, SearchResponse, SearchResult, SearchResultProps, TypesenseSearchConfig, } from '../types.js';
|
|
3
3
|
export { default as HeadlessSearchInput } from './HeadlessSearchInput.js';
|
|
4
|
+
export { ClockIcon, CollectionIcon, ErrorIcon, NoResultsIcon, SearchIcon } from './icons/index.js';
|
|
4
5
|
export { RenderedHeader, RenderedNoResults, RenderedResult, RenderedResultError, } from './render/index.js';
|
|
5
|
-
export { ThemeProvider } from './ThemeProvider.js';
|
|
6
|
+
export { ThemeProvider, useTheme } from './ThemeProvider.js';
|
|
6
7
|
export * from './themes/index.js';
|
|
7
8
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,wBAAwB,EAAE,MAAM,0BAA0B,CAAA;AACxE,YAAY,EACV,oBAAoB,EACpB,mBAAmB,EACnB,cAAc,EACd,YAAY,EACZ,iBAAiB,EACjB,qBAAqB,GACtB,MAAM,aAAa,CAAA;AACpB,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,0BAA0B,CAAA;AACzE,OAAO,EACL,cAAc,EACd,iBAAiB,EACjB,cAAc,EACd,mBAAmB,GACpB,MAAM,mBAAmB,CAAA;AAC1B,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,wBAAwB,EAAE,MAAM,0BAA0B,CAAA;AACxE,YAAY,EACV,oBAAoB,EACpB,mBAAmB,EACnB,cAAc,EACd,YAAY,EACZ,iBAAiB,EACjB,qBAAqB,GACtB,MAAM,aAAa,CAAA;AACpB,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,0BAA0B,CAAA;AACzE,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,SAAS,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAClG,OAAO,EACL,cAAc,EACd,iBAAiB,EACjB,cAAc,EACd,mBAAmB,GACpB,MAAM,mBAAmB,CAAA;AAC1B,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAA;AAC5D,cAAc,mBAAmB,CAAA"}
|
package/dist/components/index.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export { default as HeadlessSearchInput } from './HeadlessSearchInput.js';
|
|
2
|
+
export { ClockIcon, CollectionIcon, ErrorIcon, NoResultsIcon, SearchIcon } from './icons/index.js';
|
|
2
3
|
export { RenderedHeader, RenderedNoResults, RenderedResult, RenderedResultError } from './render/index.js';
|
|
3
|
-
export { ThemeProvider } from './ThemeProvider.js';
|
|
4
|
+
export { ThemeProvider, useTheme } from './ThemeProvider.js';
|
|
4
5
|
export * from './themes/index.js';
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { type ThemeContextValue } from '../themes/types.js';
|
|
3
|
-
|
|
3
|
+
type Props = {
|
|
4
4
|
found: number;
|
|
5
5
|
resultsHeaderClassName?: string;
|
|
6
6
|
themeConfig: ThemeContextValue;
|
|
7
|
-
}
|
|
8
|
-
export declare const RenderedHeader: ({ found, resultsHeaderClassName, themeConfig
|
|
7
|
+
};
|
|
8
|
+
export declare const RenderedHeader: ({ found, resultsHeaderClassName, themeConfig }: Props) => React.JSX.Element;
|
|
9
9
|
export {};
|
|
10
10
|
//# sourceMappingURL=Header.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Header.d.ts","sourceRoot":"","sources":["../../../src/components/render/Header.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"Header.d.ts","sourceRoot":"","sources":["../../../src/components/render/Header.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAGzB,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,oBAAoB,CAAA;AAE3D,KAAK,KAAK,GAAG;IACX,KAAK,EAAE,MAAM,CAAA;IACb,sBAAsB,CAAC,EAAE,MAAM,CAAA;IAC/B,WAAW,EAAE,iBAAiB,CAAA;CAC/B,CAAA;AAED,eAAO,MAAM,cAAc,mDAAyD,KAAK,sBA8BxF,CAAA"}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
1
2
|
import React from 'react';
|
|
2
|
-
|
|
3
|
+
import { SearchIcon } from '../icons/index.js';
|
|
4
|
+
export const RenderedHeader = ({ found, resultsHeaderClassName = '', themeConfig })=>/*#__PURE__*/ _jsx("div", {
|
|
3
5
|
className: resultsHeaderClassName,
|
|
4
6
|
style: {
|
|
5
7
|
alignItems: 'center',
|
|
@@ -12,29 +14,30 @@ export const RenderedHeader = ({ found, resultsHeaderClassName = '', themeConfig
|
|
|
12
14
|
fontWeight: themeConfig.theme.typography.fontWeightMedium,
|
|
13
15
|
justifyContent: 'space-between',
|
|
14
16
|
padding: themeConfig.theme.spacing.headerPadding
|
|
15
|
-
}
|
|
16
|
-
}, /*#__PURE__*/ React.createElement("div", {
|
|
17
|
-
style: {
|
|
18
|
-
alignItems: 'center',
|
|
19
|
-
display: 'flex',
|
|
20
|
-
gap: '8px'
|
|
21
|
-
}
|
|
22
|
-
}, /*#__PURE__*/ React.createElement("svg", {
|
|
23
|
-
fill: "currentColor",
|
|
24
|
-
style: {
|
|
25
|
-
color: themeConfig.theme.colors.metaText,
|
|
26
|
-
height: '16px',
|
|
27
|
-
width: '16px'
|
|
28
17
|
},
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
18
|
+
children: /*#__PURE__*/ _jsxs("div", {
|
|
19
|
+
style: {
|
|
20
|
+
alignItems: 'center',
|
|
21
|
+
display: 'flex',
|
|
22
|
+
gap: '8px'
|
|
23
|
+
},
|
|
24
|
+
children: [
|
|
25
|
+
/*#__PURE__*/ _jsx(SearchIcon, {
|
|
26
|
+
color: themeConfig.theme.colors.metaText
|
|
27
|
+
}),
|
|
28
|
+
/*#__PURE__*/ _jsxs("span", {
|
|
29
|
+
style: {
|
|
30
|
+
color: themeConfig.theme.colors.headerText,
|
|
31
|
+
fontSize: themeConfig.theme.typography.fontSizeSm,
|
|
32
|
+
fontWeight: themeConfig.theme.typography.fontWeightMedium
|
|
33
|
+
},
|
|
34
|
+
children: [
|
|
35
|
+
found,
|
|
36
|
+
" result",
|
|
37
|
+
found !== 1 ? 's' : '',
|
|
38
|
+
" found"
|
|
39
|
+
]
|
|
40
|
+
})
|
|
41
|
+
]
|
|
42
|
+
})
|
|
43
|
+
});
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { type ThemeContextValue } from '../themes/types.js';
|
|
3
|
-
|
|
3
|
+
type Props = {
|
|
4
4
|
noResultsClassName?: string;
|
|
5
5
|
query: string;
|
|
6
6
|
themeConfig: ThemeContextValue;
|
|
7
|
-
}
|
|
8
|
-
export declare const RenderedNoResults: ({ noResultsClassName, query: _query, themeConfig, }:
|
|
7
|
+
};
|
|
8
|
+
export declare const RenderedNoResults: ({ noResultsClassName, query: _query, themeConfig, }: Props) => React.JSX.Element;
|
|
9
9
|
export {};
|
|
10
10
|
//# sourceMappingURL=NoResults.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NoResults.d.ts","sourceRoot":"","sources":["../../../src/components/render/NoResults.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"NoResults.d.ts","sourceRoot":"","sources":["../../../src/components/render/NoResults.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAGzB,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,oBAAoB,CAAA;AAE3D,KAAK,KAAK,GAAG;IACX,kBAAkB,CAAC,EAAE,MAAM,CAAA;IAC3B,KAAK,EAAE,MAAM,CAAA;IACb,WAAW,EAAE,iBAAiB,CAAA;CAC/B,CAAA;AAED,eAAO,MAAM,iBAAiB,wDAI3B,KAAK,sBAqCP,CAAA"}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
1
2
|
import React from 'react';
|
|
2
|
-
|
|
3
|
+
import { NoResultsIcon } from '../icons/index.js';
|
|
4
|
+
export const RenderedNoResults = ({ noResultsClassName = '', query: _query, themeConfig })=>/*#__PURE__*/ _jsx("div", {
|
|
3
5
|
className: noResultsClassName,
|
|
4
6
|
style: {
|
|
5
7
|
color: themeConfig.theme.colors.noResultsText,
|
|
@@ -7,40 +9,35 @@ export const RenderedNoResults = ({ noResultsClassName = '', query: _query, them
|
|
|
7
9
|
fontSize: themeConfig.theme.typography.fontSizeSm,
|
|
8
10
|
padding: '40px 20px',
|
|
9
11
|
textAlign: 'center'
|
|
10
|
-
}
|
|
11
|
-
}, /*#__PURE__*/ React.createElement("div", {
|
|
12
|
-
style: {
|
|
13
|
-
alignItems: 'center',
|
|
14
|
-
display: 'flex',
|
|
15
|
-
flexDirection: 'column'
|
|
16
|
-
}
|
|
17
|
-
}, /*#__PURE__*/ React.createElement("svg", {
|
|
18
|
-
fill: "none",
|
|
19
|
-
stroke: "currentColor",
|
|
20
|
-
style: {
|
|
21
|
-
color: themeConfig.theme.colors.metaText,
|
|
22
|
-
height: '48px',
|
|
23
|
-
marginBottom: '12px',
|
|
24
|
-
width: '48px'
|
|
25
12
|
},
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
13
|
+
children: /*#__PURE__*/ _jsxs("div", {
|
|
14
|
+
style: {
|
|
15
|
+
alignItems: 'center',
|
|
16
|
+
display: 'flex',
|
|
17
|
+
flexDirection: 'column'
|
|
18
|
+
},
|
|
19
|
+
children: [
|
|
20
|
+
/*#__PURE__*/ _jsx(NoResultsIcon, {
|
|
21
|
+
color: themeConfig.theme.colors.metaText
|
|
22
|
+
}),
|
|
23
|
+
/*#__PURE__*/ _jsx("h3", {
|
|
24
|
+
style: {
|
|
25
|
+
color: themeConfig.theme.colors.titleText,
|
|
26
|
+
fontSize: themeConfig.theme.typography.fontSizeSm,
|
|
27
|
+
fontWeight: themeConfig.theme.typography.fontWeightMedium,
|
|
28
|
+
margin: 0,
|
|
29
|
+
marginBottom: '4px'
|
|
30
|
+
},
|
|
31
|
+
children: "No results found"
|
|
32
|
+
}),
|
|
33
|
+
/*#__PURE__*/ _jsx("p", {
|
|
34
|
+
style: {
|
|
35
|
+
color: themeConfig.theme.colors.descriptionText,
|
|
36
|
+
fontSize: themeConfig.theme.typography.fontSizeSm,
|
|
37
|
+
margin: 0
|
|
38
|
+
},
|
|
39
|
+
children: "Try searching for something else"
|
|
40
|
+
})
|
|
41
|
+
]
|
|
42
|
+
})
|
|
43
|
+
});
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { type ThemeContextValue } from '../themes/types.js';
|
|
3
|
-
|
|
3
|
+
type Props = {
|
|
4
4
|
error: string;
|
|
5
5
|
errorClassName?: string;
|
|
6
6
|
themeConfig: ThemeContextValue;
|
|
7
|
-
}
|
|
8
|
-
export declare const RenderedResultError: ({ error, errorClassName, themeConfig
|
|
7
|
+
};
|
|
8
|
+
export declare const RenderedResultError: ({ error, errorClassName, themeConfig }: Props) => React.JSX.Element;
|
|
9
9
|
export {};
|
|
10
10
|
//# sourceMappingURL=ResultError.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ResultError.d.ts","sourceRoot":"","sources":["../../../src/components/render/ResultError.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"ResultError.d.ts","sourceRoot":"","sources":["../../../src/components/render/ResultError.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAGzB,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,oBAAoB,CAAA;AAE3D,KAAK,KAAK,GAAG;IACX,KAAK,EAAE,MAAM,CAAA;IACb,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,WAAW,EAAE,iBAAiB,CAAA;CAC/B,CAAA;AAED,eAAO,MAAM,mBAAmB,2CAAiD,KAAK,sBAuCrF,CAAA"}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
1
2
|
import React from 'react';
|
|
2
|
-
|
|
3
|
+
import { ErrorIcon } from '../icons/index.js';
|
|
4
|
+
export const RenderedResultError = ({ error, errorClassName = '', themeConfig })=>/*#__PURE__*/ _jsxs("div", {
|
|
3
5
|
className: errorClassName,
|
|
4
6
|
style: {
|
|
5
7
|
alignItems: 'center',
|
|
@@ -11,29 +13,28 @@ export const RenderedResultError = ({ error, errorClassName = '', themeConfig })
|
|
|
11
13
|
fontSize: themeConfig.theme.typography.fontSizeSm,
|
|
12
14
|
gap: '8px',
|
|
13
15
|
padding: '16px'
|
|
14
|
-
}
|
|
15
|
-
}, /*#__PURE__*/ React.createElement("svg", {
|
|
16
|
-
fill: "currentColor",
|
|
17
|
-
style: {
|
|
18
|
-
flexShrink: 0,
|
|
19
|
-
height: '20px',
|
|
20
|
-
width: '20px'
|
|
21
16
|
},
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
17
|
+
children: [
|
|
18
|
+
/*#__PURE__*/ _jsx(ErrorIcon, {}),
|
|
19
|
+
/*#__PURE__*/ _jsxs("div", {
|
|
20
|
+
children: [
|
|
21
|
+
/*#__PURE__*/ _jsx("h3", {
|
|
22
|
+
style: {
|
|
23
|
+
fontSize: themeConfig.theme.typography.fontSizeSm,
|
|
24
|
+
fontWeight: themeConfig.theme.typography.fontWeightMedium,
|
|
25
|
+
margin: 0
|
|
26
|
+
},
|
|
27
|
+
children: "Search Error"
|
|
28
|
+
}),
|
|
29
|
+
/*#__PURE__*/ _jsx("p", {
|
|
30
|
+
style: {
|
|
31
|
+
color: themeConfig.theme.colors.errorText,
|
|
32
|
+
fontSize: themeConfig.theme.typography.fontSizeSm,
|
|
33
|
+
margin: 0
|
|
34
|
+
},
|
|
35
|
+
children: error
|
|
36
|
+
})
|
|
37
|
+
]
|
|
38
|
+
})
|
|
39
|
+
]
|
|
40
|
+
});
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import { type SearchResult } from '../../types.js';
|
|
3
2
|
import { type ThemeContextValue } from '../themes/types.js';
|
|
4
|
-
|
|
3
|
+
type Props = {
|
|
5
4
|
index: number;
|
|
6
5
|
onResultClick: (result: SearchResult) => void;
|
|
6
|
+
onResultHover?: (result: SearchResult) => void;
|
|
7
7
|
renderDate?: boolean;
|
|
8
8
|
result: SearchResult;
|
|
9
9
|
resultItemClassName?: string;
|
|
10
10
|
resultsContainerClassName?: string;
|
|
11
11
|
themeConfig: ThemeContextValue;
|
|
12
|
-
}
|
|
13
|
-
export declare function RenderedResult({ index, onResultClick, renderDate, result, resultItemClassName, resultsContainerClassName, themeConfig, }:
|
|
12
|
+
};
|
|
13
|
+
export declare function RenderedResult({ index, onResultClick, onResultHover, renderDate, result, resultItemClassName, resultsContainerClassName, themeConfig, }: Props): import("react").JSX.Element;
|
|
14
14
|
export {};
|
|
15
15
|
//# sourceMappingURL=Results.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Results.d.ts","sourceRoot":"","sources":["../../../src/components/render/Results.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"Results.d.ts","sourceRoot":"","sources":["../../../src/components/render/Results.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAElD,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,oBAAoB,CAAA;AAE3D,KAAK,KAAK,GAAG;IACX,KAAK,EAAE,MAAM,CAAA;IACb,aAAa,EAAE,CAAC,MAAM,EAAE,YAAY,KAAK,IAAI,CAAA;IAC7C,aAAa,CAAC,EAAE,CAAC,MAAM,EAAE,YAAY,KAAK,IAAI,CAAA;IAC9C,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,MAAM,EAAE,YAAY,CAAA;IACpB,mBAAmB,CAAC,EAAE,MAAM,CAAA;IAC5B,yBAAyB,CAAC,EAAE,MAAM,CAAA;IAClC,WAAW,EAAE,iBAAiB,CAAA;CAC/B,CAAA;AAED,wBAAgB,cAAc,CAAC,EAC7B,KAAK,EACL,aAAa,EACb,aAAa,EACb,UAAiB,EACjB,MAAM,EACN,mBAAwB,EACxB,yBAA8B,EAC9B,WAAW,GACZ,EAAE,KAAK,+BAkJP"}
|