@docusaurus/theme-classic 3.10.0 → 3.10.1-canary-6593

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/nprogress.css CHANGED
@@ -34,7 +34,8 @@
34
34
  right: 0;
35
35
  width: 100px;
36
36
  height: 100%;
37
- box-shadow: 0 0 10px var(--docusaurus-progress-bar-color),
37
+ box-shadow:
38
+ 0 0 10px var(--docusaurus-progress-bar-color),
38
39
  0 0 5px var(--docusaurus-progress-bar-color);
39
40
  opacity: 1;
40
41
  transform: rotate(3deg) translate(0, -4px);
@@ -17,7 +17,7 @@ import isInternalUrl from '@docusaurus/isInternalUrl';
17
17
  import Layout from '@theme/DocCard/Layout';
18
18
  function getFallbackEmojiIcon(item) {
19
19
  if (item.type === 'category') {
20
- return '🗃';
20
+ return '🗃️';
21
21
  }
22
22
  return isInternalUrl(item.href) ? '📄️' : '🔗';
23
23
  }
@@ -242,7 +242,9 @@ function DocSidebarItemCategoryCollapsible({
242
242
  aria-current={isCurrentPage ? 'page' : undefined}
243
243
  role={collapsible && !href ? 'button' : undefined}
244
244
  aria-expanded={collapsible && !href ? !collapsed : undefined}
245
- href={collapsible ? hrefWithSSRFallback ?? '#' : hrefWithSSRFallback}
245
+ href={
246
+ collapsible ? (hrefWithSSRFallback ?? '#') : hrefWithSSRFallback
247
+ }
246
248
  {...props}>
247
249
  <CategoryLinkLabel label={label} />
248
250
  </Link>
@@ -6,35 +6,25 @@
6
6
  */
7
7
  import React from 'react';
8
8
  import Translate from '@docusaurus/Translate';
9
- import {
10
- ErrorBoundaryError,
11
- ErrorBoundaryTryAgainButton,
12
- } from '@docusaurus/theme-common';
9
+ import { ErrorBoundaryError, ErrorBoundaryTryAgainButton, } from '@docusaurus/theme-common';
13
10
  import Heading from '@theme/Heading';
14
- export default function ErrorPageContent({error, tryAgain}) {
15
- return (
16
- <main className="container margin-vert--xl">
11
+ export default function ErrorPageContent({ error, tryAgain }) {
12
+ return (<main className="container margin-vert--xl">
17
13
  <div className="row">
18
14
  <div className="col col--6 col--offset-3">
19
15
  <Heading as="h1" className="hero__title">
20
- <Translate
21
- id="theme.ErrorPageContent.title"
22
- description="The title of the fallback page when the page crashed">
16
+ <Translate id="theme.ErrorPageContent.title" description="The title of the fallback page when the page crashed">
23
17
  This page crashed.
24
18
  </Translate>
25
19
  </Heading>
26
20
  <div className="margin-vert--lg">
27
- <ErrorBoundaryTryAgainButton
28
- onClick={tryAgain}
29
- className="button button--primary shadow--lw"
30
- />
21
+ <ErrorBoundaryTryAgainButton onClick={tryAgain} className="button button--primary shadow--lw"/>
31
22
  </div>
32
23
  <hr />
33
24
  <div className="margin-vert--md">
34
- <ErrorBoundaryError error={error} />
25
+ <ErrorBoundaryError error={error}/>
35
26
  </div>
36
27
  </div>
37
28
  </div>
38
- </main>
39
- );
29
+ </main>);
40
30
  }
@@ -10,4 +10,4 @@
10
10
  // Yet we declare it there so that we can register it in MDX
11
11
  // TODO later the mermaid theme should be able to register its MDX component
12
12
  // see https://github.com/facebook/docusaurus/pull/7490#issuecomment-1279117288
13
- export {default} from '@docusaurus/Noop';
13
+ export { default } from '@docusaurus/Noop';
@@ -8,4 +8,4 @@
8
8
  // If you swizzled this, it is your responsibility to provide an implementation
9
9
  // Tip: swizzle the SearchBar from the Algolia theme for inspiration:
10
10
  // npm run swizzle @docusaurus/theme-search-algolia SearchBar
11
- export {default} from '@docusaurus/Noop';
11
+ export { default } from '@docusaurus/Noop';
@@ -6,29 +6,27 @@
6
6
  */
7
7
  import siteConfig from '@generated/docusaurus.config';
8
8
  export default function prismIncludeLanguages(PrismObject) {
9
- const {
10
- themeConfig: {prism},
11
- } = siteConfig;
12
- const {additionalLanguages} = prism;
13
- // Prism components work on the Prism instance on the window, while prism-
14
- // react-renderer uses its own Prism instance. We temporarily mount the
15
- // instance onto window, import components to enhance it, then remove it to
16
- // avoid polluting global namespace.
17
- // You can mutate PrismObject: registering plugins, deleting languages... As
18
- // long as you don't re-assign it
19
- const PrismBefore = globalThis.Prism;
20
- globalThis.Prism = PrismObject;
21
- additionalLanguages.forEach((lang) => {
22
- if (lang === 'php') {
23
- // eslint-disable-next-line global-require
24
- require('prismjs/components/prism-markup-templating.js');
25
- }
26
- // eslint-disable-next-line global-require, import/no-dynamic-require
27
- require(`prismjs/components/prism-${lang}`);
28
- });
29
- // Clean up and eventually restore former globalThis.Prism object (if any)
30
- delete globalThis.Prism;
31
- if (typeof PrismBefore !== 'undefined') {
9
+ const { themeConfig: { prism }, } = siteConfig;
10
+ const { additionalLanguages } = prism;
11
+ // Prism components work on the Prism instance on the window, while prism-
12
+ // react-renderer uses its own Prism instance. We temporarily mount the
13
+ // instance onto window, import components to enhance it, then remove it to
14
+ // avoid polluting global namespace.
15
+ // You can mutate PrismObject: registering plugins, deleting languages... As
16
+ // long as you don't re-assign it
17
+ const PrismBefore = globalThis.Prism;
32
18
  globalThis.Prism = PrismObject;
33
- }
19
+ additionalLanguages.forEach((lang) => {
20
+ if (lang === 'php') {
21
+ // eslint-disable-next-line global-require
22
+ require('prismjs/components/prism-markup-templating.js');
23
+ }
24
+ // eslint-disable-next-line global-require, import/no-dynamic-require
25
+ require(`prismjs/components/prism-${lang}`);
26
+ });
27
+ // Clean up and eventually restore former globalThis.Prism object (if any)
28
+ delete globalThis.Prism;
29
+ if (typeof PrismBefore !== 'undefined') {
30
+ globalThis.Prism = PrismObject;
31
+ }
34
32
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@docusaurus/theme-classic",
3
- "version": "3.10.0",
3
+ "version": "3.10.1-canary-6593",
4
4
  "description": "Classic theme for Docusaurus",
5
5
  "main": "lib/index.js",
6
6
  "types": "src/theme-classic.d.ts",
@@ -14,33 +14,33 @@
14
14
  },
15
15
  "license": "MIT",
16
16
  "scripts": {
17
- "build": "tsc --build && node ../../admin/scripts/copyUntypedFiles.js && prettier --config ../../.prettierrc --write \"lib/theme/**/*.js\"",
17
+ "build": "tsc --build && node ../../admin/scripts/copyUntypedFiles.js && oxfmt \"lib/theme/**/*.js\"",
18
18
  "watch": "run-p -c copy:watch build:watch",
19
19
  "build:watch": "tsc --build --watch",
20
20
  "copy:watch": "node ../../admin/scripts/copyUntypedFiles.js --watch"
21
21
  },
22
22
  "dependencies": {
23
- "@docusaurus/core": "3.10.0",
24
- "@docusaurus/logger": "3.10.0",
25
- "@docusaurus/mdx-loader": "3.10.0",
26
- "@docusaurus/module-type-aliases": "3.10.0",
27
- "@docusaurus/plugin-content-blog": "3.10.0",
28
- "@docusaurus/plugin-content-docs": "3.10.0",
29
- "@docusaurus/plugin-content-pages": "3.10.0",
30
- "@docusaurus/theme-common": "3.10.0",
31
- "@docusaurus/theme-translations": "3.10.0",
32
- "@docusaurus/types": "3.10.0",
33
- "@docusaurus/utils": "3.10.0",
34
- "@docusaurus/utils-common": "3.10.0",
35
- "@docusaurus/utils-validation": "3.10.0",
36
- "@mdx-js/react": "^3.0.0",
23
+ "@docusaurus/core": "3.10.1-canary-6593",
24
+ "@docusaurus/logger": "3.10.1-canary-6593",
25
+ "@docusaurus/mdx-loader": "3.10.1-canary-6593",
26
+ "@docusaurus/module-type-aliases": "3.10.1-canary-6593",
27
+ "@docusaurus/plugin-content-blog": "3.10.1-canary-6593",
28
+ "@docusaurus/plugin-content-docs": "3.10.1-canary-6593",
29
+ "@docusaurus/plugin-content-pages": "3.10.1-canary-6593",
30
+ "@docusaurus/theme-common": "3.10.1-canary-6593",
31
+ "@docusaurus/theme-translations": "3.10.1-canary-6593",
32
+ "@docusaurus/types": "3.10.1-canary-6593",
33
+ "@docusaurus/utils": "3.10.1-canary-6593",
34
+ "@docusaurus/utils-common": "3.10.1-canary-6593",
35
+ "@docusaurus/utils-validation": "3.10.1-canary-6593",
36
+ "@mdx-js/react": "^3.1.1",
37
37
  "clsx": "^2.0.0",
38
38
  "copy-text-to-clipboard": "^3.2.0",
39
39
  "infima": "0.2.0-alpha.45",
40
40
  "lodash": "^4.17.21",
41
41
  "nprogress": "^0.2.0",
42
- "postcss": "^8.5.4",
43
- "prism-react-renderer": "^2.3.0",
42
+ "postcss": "^8.5.12",
43
+ "prism-react-renderer": "^2.4.1",
44
44
  "prismjs": "^1.29.0",
45
45
  "react-router-dom": "^5.3.4",
46
46
  "rtlcss": "^4.1.0",
@@ -49,17 +49,16 @@
49
49
  },
50
50
  "devDependencies": {
51
51
  "@types/nprogress": "^0.2.0",
52
- "@types/prismjs": "^1.26.0",
52
+ "@types/prismjs": "^1.26.6",
53
53
  "@types/rtlcss": "^3.5.1",
54
- "fs-extra": "^11.1.1",
55
- "utility-types": "^3.10.0"
54
+ "fs-extra": "^11.2.0"
56
55
  },
57
56
  "peerDependencies": {
58
- "react": "^18.0.0 || ^19.0.0",
59
- "react-dom": "^18.0.0 || ^19.0.0"
57
+ "react": "^19.2.5",
58
+ "react-dom": "^19.2.5"
60
59
  },
61
60
  "engines": {
62
- "node": ">=20.0"
61
+ "node": ">=24.14"
63
62
  },
64
- "gitHead": "0d98888a7645a5fb1330c905b75faf868f829f5c"
63
+ "gitHead": "958bdad4e51b2df8d29749d8a6455f39ff85a348"
65
64
  }
package/src/nprogress.css CHANGED
@@ -34,7 +34,8 @@
34
34
  right: 0;
35
35
  width: 100px;
36
36
  height: 100%;
37
- box-shadow: 0 0 10px var(--docusaurus-progress-bar-color),
37
+ box-shadow:
38
+ 0 0 10px var(--docusaurus-progress-bar-color),
38
39
  0 0 5px var(--docusaurus-progress-bar-color);
39
40
  opacity: 1;
40
41
  transform: rotate(3deg) translate(0, -4px);
package/src/options.ts CHANGED
@@ -150,8 +150,8 @@ const itemWithType = (type: string | RegExp | undefined) => {
150
150
  type instanceof RegExp
151
151
  ? Joi.string().required().regex(type)
152
152
  : type
153
- ? Joi.string().required().equal(type)
154
- : Joi.string().forbidden();
153
+ ? Joi.string().required().equal(type)
154
+ : Joi.string().forbidden();
155
155
  return Joi.object({
156
156
  type: typeSchema,
157
157
  })
@@ -27,7 +27,7 @@ function getFallbackEmojiIcon(
27
27
  item: PropSidebarItemLink | PropSidebarItemCategory,
28
28
  ): string {
29
29
  if (item.type === 'category') {
30
- return '🗃';
30
+ return '🗃️';
31
31
  }
32
32
  return isInternalUrl(item.href) ? '📄️' : '🔗';
33
33
  }
@@ -284,7 +284,9 @@ function DocSidebarItemCategoryCollapsible({
284
284
  aria-current={isCurrentPage ? 'page' : undefined}
285
285
  role={collapsible && !href ? 'button' : undefined}
286
286
  aria-expanded={collapsible && !href ? !collapsed : undefined}
287
- href={collapsible ? hrefWithSSRFallback ?? '#' : hrefWithSSRFallback}
287
+ href={
288
+ collapsible ? (hrefWithSSRFallback ?? '#') : hrefWithSSRFallback
289
+ }
288
290
  {...props}>
289
291
  <CategoryLinkLabel label={label} />
290
292
  </Link>