@seqera/docusaurus-theme-seqera 1.0.25 → 1.0.26
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/lib/getSwizzleConfig.js +0 -9
- package/lib/theme/SearchPage/generalUtils.d.ts +4 -0
- package/lib/theme/SearchPage/generalUtils.js +19 -0
- package/lib/theme/SearchPage/index.d.ts +1 -0
- package/lib/theme/SearchPage/index.js +836 -0
- package/lib/theme/SearchPage/styles.module.css +325 -0
- package/lib/theme/SearchPage/useSearchPage.d.ts +7 -0
- package/lib/theme/SearchPage/useSearchPage.js +68 -0
- package/package.json +3 -1
- package/src/getSwizzleConfig.ts +0 -10
- package/src/theme/SearchPage/generalUtils.ts +20 -0
- package/src/theme/SearchPage/index.tsx +943 -0
- package/src/theme/SearchPage/styles.module.css +325 -0
- package/src/theme/SearchPage/useSearchPage.ts +67 -0
- package/src/theme-seqera.d.ts +3 -0
- package/lib/theme/SearchBar.d.ts +0 -1
- package/lib/theme/SearchBar.js +0 -5
- package/src/theme/SearchBar.tsx +0 -8
package/lib/getSwizzleConfig.js
CHANGED
|
@@ -372,15 +372,6 @@ function getSwizzleConfig() {
|
|
|
372
372
|
},
|
|
373
373
|
description: 'The global 404 page of your site, meant to be ejected and customized',
|
|
374
374
|
},
|
|
375
|
-
SearchBar: {
|
|
376
|
-
actions: {
|
|
377
|
-
eject: 'safe',
|
|
378
|
-
wrap: 'safe',
|
|
379
|
-
},
|
|
380
|
-
// TODO how to describe this one properly?
|
|
381
|
-
// By default it's an empty placeholder for the user to fill
|
|
382
|
-
description: 'The search bar component of your site, appearing in the navbar.',
|
|
383
|
-
},
|
|
384
375
|
SkipToContent: {
|
|
385
376
|
actions: {
|
|
386
377
|
eject: 'safe',
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/
|
|
7
|
+
// Source: https://github.com/facebook/docusaurus/blob/a308fb7c81832cca354192fe2984f52749441249/packages/docusaurus-theme-common/src/utils/generalUtils.ts
|
|
8
|
+
// Context: https://github.com/typesense/docusaurus-theme-search-typesense/issues/27#issuecomment-1415757477
|
|
9
|
+
import useDocusaurusContext from '@docusaurus/useDocusaurusContext';
|
|
10
|
+
/**
|
|
11
|
+
* Formats the page's title based on relevant site config and other contexts.
|
|
12
|
+
*/
|
|
13
|
+
export function useTitleFormatter(title) {
|
|
14
|
+
const {siteConfig} = useDocusaurusContext();
|
|
15
|
+
const {title: siteTitle, titleDelimiter} = siteConfig;
|
|
16
|
+
return title?.trim().length
|
|
17
|
+
? `${title.trim()} ${titleDelimiter} ${siteTitle}`
|
|
18
|
+
: siteTitle;
|
|
19
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function SearchPage(): JSX.Element;
|