@docusaurus/theme-search-algolia 2.4.0 → 3.0.0-alpha.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.
@@ -27,6 +27,7 @@ import {
27
27
  useSearchResultUrlProcessor,
28
28
  } from '@docusaurus/theme-search-algolia/client';
29
29
  import Layout from '@theme/Layout';
30
+ import Heading from '@theme/Heading';
30
31
  import styles from './styles.module.css';
31
32
  // Very simple pluralization: probably good enough for now
32
33
  function useDocumentsFoundPlural() {
@@ -305,7 +306,7 @@ function SearchPageContent() {
305
306
  </Head>
306
307
 
307
308
  <div className="container margin-vert--lg">
308
- <h1>{getTitle()}</h1>
309
+ <Heading as="h1">{getTitle()}</Heading>
309
310
 
310
311
  <form className="row" onSubmit={(e) => e.preventDefault()}>
311
312
  <div
@@ -354,10 +355,8 @@ function SearchPageContent() {
354
355
  'text--right',
355
356
  styles.searchLogoColumn,
356
357
  )}>
357
- <a
358
- target="_blank"
359
- rel="noopener noreferrer"
360
- href="https://www.algolia.com/"
358
+ <Link
359
+ to="https://www.algolia.com/"
361
360
  aria-label={translate({
362
361
  id: 'theme.SearchPage.algoliaLabel',
363
362
  message: 'Search by Algolia',
@@ -379,7 +378,7 @@ function SearchPageContent() {
379
378
  />
380
379
  </g>
381
380
  </svg>
382
- </a>
381
+ </Link>
383
382
  </div>
384
383
  </div>
385
384
 
@@ -388,9 +387,9 @@ function SearchPageContent() {
388
387
  {searchResultState.items.map(
389
388
  ({title, url, summary, breadcrumbs}, i) => (
390
389
  <article key={i} className={styles.searchResultItem}>
391
- <h2 className={styles.searchResultItemHeading}>
390
+ <Heading as="h2" className={styles.searchResultItemHeading}>
392
391
  <Link to={url} dangerouslySetInnerHTML={{__html: title}} />
393
- </h2>
392
+ </Heading>
394
393
 
395
394
  {breadcrumbs.length > 0 && (
396
395
  <nav aria-label="breadcrumbs">
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@docusaurus/theme-search-algolia",
3
- "version": "2.4.0",
3
+ "version": "3.0.0-alpha.0",
4
4
  "description": "Algolia search component for Docusaurus.",
5
5
  "main": "lib/index.js",
6
6
  "sideEffects": [
@@ -33,32 +33,32 @@
33
33
  "copy:watch": "node ../../admin/scripts/copyUntypedFiles.js --watch"
34
34
  },
35
35
  "dependencies": {
36
- "@docsearch/react": "^3.1.1",
37
- "@docusaurus/core": "2.4.0",
38
- "@docusaurus/logger": "2.4.0",
39
- "@docusaurus/plugin-content-docs": "2.4.0",
40
- "@docusaurus/theme-common": "2.4.0",
41
- "@docusaurus/theme-translations": "2.4.0",
42
- "@docusaurus/utils": "2.4.0",
43
- "@docusaurus/utils-validation": "2.4.0",
44
- "algoliasearch": "^4.13.1",
45
- "algoliasearch-helper": "^3.10.0",
36
+ "@docsearch/react": "^3.3.3",
37
+ "@docusaurus/core": "3.0.0-alpha.0",
38
+ "@docusaurus/logger": "3.0.0-alpha.0",
39
+ "@docusaurus/plugin-content-docs": "3.0.0-alpha.0",
40
+ "@docusaurus/theme-common": "3.0.0-alpha.0",
41
+ "@docusaurus/theme-translations": "3.0.0-alpha.0",
42
+ "@docusaurus/utils": "3.0.0-alpha.0",
43
+ "@docusaurus/utils-validation": "3.0.0-alpha.0",
44
+ "algoliasearch": "^4.15.0",
45
+ "algoliasearch-helper": "^3.12.0",
46
46
  "clsx": "^1.2.1",
47
- "eta": "^2.0.0",
48
- "fs-extra": "^10.1.0",
47
+ "eta": "^2.0.1",
48
+ "fs-extra": "^11.1.0",
49
49
  "lodash": "^4.17.21",
50
- "tslib": "^2.4.0",
50
+ "tslib": "^2.5.0",
51
51
  "utility-types": "^3.10.0"
52
52
  },
53
53
  "devDependencies": {
54
- "@docusaurus/module-type-aliases": "2.4.0"
54
+ "@docusaurus/module-type-aliases": "3.0.0-alpha.0"
55
55
  },
56
56
  "peerDependencies": {
57
- "react": "^16.8.4 || ^17.0.0",
58
- "react-dom": "^16.8.4 || ^17.0.0"
57
+ "react": "^18.0.0",
58
+ "react-dom": "^18.0.0"
59
59
  },
60
60
  "engines": {
61
61
  "node": ">=16.14"
62
62
  },
63
- "gitHead": "898b85ef134cc43bf3b1209aad0ca8cdcfb214c5"
63
+ "gitHead": "7327f7ff880ed97ad7855744e59c9c55d467a950"
64
64
  }
@@ -31,7 +31,7 @@ import {
31
31
  useSearchResultUrlProcessor,
32
32
  } from '@docusaurus/theme-search-algolia/client';
33
33
  import Layout from '@theme/Layout';
34
-
34
+ import Heading from '@theme/Heading';
35
35
  import styles from './styles.module.css';
36
36
 
37
37
  // Very simple pluralization: probably good enough for now
@@ -372,7 +372,7 @@ function SearchPageContent(): JSX.Element {
372
372
  </Head>
373
373
 
374
374
  <div className="container margin-vert--lg">
375
- <h1>{getTitle()}</h1>
375
+ <Heading as="h1">{getTitle()}</Heading>
376
376
 
377
377
  <form className="row" onSubmit={(e) => e.preventDefault()}>
378
378
  <div
@@ -421,10 +421,8 @@ function SearchPageContent(): JSX.Element {
421
421
  'text--right',
422
422
  styles.searchLogoColumn,
423
423
  )}>
424
- <a
425
- target="_blank"
426
- rel="noopener noreferrer"
427
- href="https://www.algolia.com/"
424
+ <Link
425
+ to="https://www.algolia.com/"
428
426
  aria-label={translate({
429
427
  id: 'theme.SearchPage.algoliaLabel',
430
428
  message: 'Search by Algolia',
@@ -446,7 +444,7 @@ function SearchPageContent(): JSX.Element {
446
444
  />
447
445
  </g>
448
446
  </svg>
449
- </a>
447
+ </Link>
450
448
  </div>
451
449
  </div>
452
450
 
@@ -455,9 +453,9 @@ function SearchPageContent(): JSX.Element {
455
453
  {searchResultState.items.map(
456
454
  ({title, url, summary, breadcrumbs}, i) => (
457
455
  <article key={i} className={styles.searchResultItem}>
458
- <h2 className={styles.searchResultItemHeading}>
456
+ <Heading as="h2" className={styles.searchResultItemHeading}>
459
457
  <Link to={url} dangerouslySetInnerHTML={{__html: title}} />
460
- </h2>
458
+ </Heading>
461
459
 
462
460
  {breadcrumbs.length > 0 && (
463
461
  <nav aria-label="breadcrumbs">