@docusaurus/theme-classic 0.0.0-4652 → 0.0.0-4655

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.
@@ -8,14 +8,14 @@ import React from 'react';
8
8
  export default function IconLanguage({width = 20, height = 20, ...props}) {
9
9
  return (
10
10
  <svg
11
- viewBox="0 0 20 20"
11
+ viewBox="0 0 24 24"
12
12
  width={width}
13
13
  height={height}
14
- aria-hidden="true"
14
+ aria-hidden
15
15
  {...props}>
16
16
  <path
17
17
  fill="currentColor"
18
- d="M19.753 10.909c-.624-1.707-2.366-2.726-4.661-2.726-.09 0-.176.002-.262.006l-.016-2.063 3.525-.607c.115-.019.133-.119.109-.231-.023-.111-.167-.883-.188-.976-.027-.131-.102-.127-.207-.109-.104.018-3.25.461-3.25.461l-.013-2.078c-.001-.125-.069-.158-.194-.156l-1.025.016c-.105.002-.164.049-.162.148l.033 2.307s-3.061.527-3.144.543c-.084.014-.17.053-.151.143.019.09.19 1.094.208 1.172.018.08.072.129.188.107l2.924-.504.035 2.018c-1.077.281-1.801.824-2.256 1.303-.768.807-1.207 1.887-1.207 2.963 0 1.586.971 2.529 2.328 2.695 3.162.387 5.119-3.06 5.769-4.715 1.097 1.506.256 4.354-2.094 5.98-.043.029-.098.129-.033.207l.619.756c.08.096.206.059.256.023 2.51-1.73 3.661-4.515 2.869-6.683zm-7.386 3.188c-.966-.121-.944-.914-.944-1.453 0-.773.327-1.58.876-2.156a3.21 3.21 0 011.229-.799l.082 4.277a2.773 2.773 0 01-1.243.131zm2.427-.553l.046-4.109c.084-.004.166-.01.252-.01.773 0 1.494.145 1.885.361.391.217-1.023 2.713-2.183 3.758zm-8.95-7.668a.196.196 0 00-.196-.145h-1.95a.194.194 0 00-.194.144L.008 16.916c-.017.051-.011.076.062.076h1.733c.075 0 .099-.023.114-.072l1.008-3.318h3.496l1.008 3.318c.016.049.039.072.113.072h1.734c.072 0 .078-.025.062-.076-.014-.05-3.083-9.741-3.494-11.04zm-2.618 6.318l1.447-5.25 1.447 5.25H3.226z"
18
+ d="M12.87 15.07l-2.54-2.51.03-.03c1.74-1.94 2.98-4.17 3.71-6.53H17V4h-7V2H8v2H1v1.99h11.17C11.5 7.92 10.44 9.75 9 11.35 8.07 10.32 7.3 9.19 6.69 8h-2c.73 1.63 1.73 3.17 2.98 4.56l-5.09 5.02L4 19l5-5 3.11 3.11.76-2.04zM18.5 10h-2L12 22h2l1.12-3h4.75L21 22h2l-4.5-12zm-2.62 7l1.62-4.33L19.12 17h-3.24z"
19
19
  />
20
20
  </svg>
21
21
  );
@@ -30,8 +30,22 @@ const MDXComponents = {
30
30
  return <Head {...props}>{unwrappedChildren}</Head>;
31
31
  },
32
32
  code: (props) => {
33
+ const inlineElements = [
34
+ 'a',
35
+ 'b',
36
+ 'big',
37
+ 'i',
38
+ 'span',
39
+ 'em',
40
+ 'strong',
41
+ 'sup',
42
+ 'sub',
43
+ 'small',
44
+ ];
33
45
  const shouldBeInline = React.Children.toArray(props.children).every(
34
- (el) => typeof el === 'string' && !el.includes('\n'),
46
+ (el) =>
47
+ (typeof el === 'string' && !el.includes('\n')) ||
48
+ (React.isValidElement(el) && inlineElements.includes(el.props.mdxType)),
35
49
  );
36
50
  return shouldBeInline ? <code {...props} /> : <CodeBlock {...props} />;
37
51
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@docusaurus/theme-classic",
3
- "version": "0.0.0-4652",
3
+ "version": "0.0.0-4655",
4
4
  "description": "Classic theme for Docusaurus",
5
5
  "main": "lib/index.js",
6
6
  "types": "src/theme-classic.d.ts",
@@ -21,15 +21,15 @@
21
21
  "format:lib-next": "prettier --config ../../.prettierrc --write \"lib-next/**/*.{js,ts,jsx,tsc}\""
22
22
  },
23
23
  "dependencies": {
24
- "@docusaurus/core": "0.0.0-4652",
25
- "@docusaurus/plugin-content-blog": "0.0.0-4652",
26
- "@docusaurus/plugin-content-docs": "0.0.0-4652",
27
- "@docusaurus/plugin-content-pages": "0.0.0-4652",
28
- "@docusaurus/theme-common": "0.0.0-4652",
29
- "@docusaurus/theme-translations": "0.0.0-4652",
30
- "@docusaurus/utils": "0.0.0-4652",
31
- "@docusaurus/utils-common": "0.0.0-4652",
32
- "@docusaurus/utils-validation": "0.0.0-4652",
24
+ "@docusaurus/core": "0.0.0-4655",
25
+ "@docusaurus/plugin-content-blog": "0.0.0-4655",
26
+ "@docusaurus/plugin-content-docs": "0.0.0-4655",
27
+ "@docusaurus/plugin-content-pages": "0.0.0-4655",
28
+ "@docusaurus/theme-common": "0.0.0-4655",
29
+ "@docusaurus/theme-translations": "0.0.0-4655",
30
+ "@docusaurus/utils": "0.0.0-4655",
31
+ "@docusaurus/utils-common": "0.0.0-4655",
32
+ "@docusaurus/utils-validation": "0.0.0-4655",
33
33
  "@mdx-js/react": "^1.6.22",
34
34
  "clsx": "^1.1.1",
35
35
  "copy-text-to-clipboard": "^3.0.1",
@@ -42,8 +42,8 @@
42
42
  "rtlcss": "^3.3.0"
43
43
  },
44
44
  "devDependencies": {
45
- "@docusaurus/module-type-aliases": "0.0.0-4652",
46
- "@docusaurus/types": "0.0.0-4652",
45
+ "@docusaurus/module-type-aliases": "0.0.0-4655",
46
+ "@docusaurus/types": "0.0.0-4655",
47
47
  "@types/mdx-js__react": "^1.5.5",
48
48
  "@types/prismjs": "^1.26.0",
49
49
  "@types/rtlcss": "^3.1.2",
@@ -59,5 +59,5 @@
59
59
  "engines": {
60
60
  "node": ">=14"
61
61
  },
62
- "gitHead": "d209242d5fccd0a33f2bd8daba0378de890426ed"
62
+ "gitHead": "9f0edee4694adaf8c8a6e11ef83991519e1f4b90"
63
63
  }
@@ -15,14 +15,14 @@ export default function IconLanguage({
15
15
  }: Props): JSX.Element {
16
16
  return (
17
17
  <svg
18
- viewBox="0 0 20 20"
18
+ viewBox="0 0 24 24"
19
19
  width={width}
20
20
  height={height}
21
- aria-hidden="true"
21
+ aria-hidden
22
22
  {...props}>
23
23
  <path
24
24
  fill="currentColor"
25
- d="M19.753 10.909c-.624-1.707-2.366-2.726-4.661-2.726-.09 0-.176.002-.262.006l-.016-2.063 3.525-.607c.115-.019.133-.119.109-.231-.023-.111-.167-.883-.188-.976-.027-.131-.102-.127-.207-.109-.104.018-3.25.461-3.25.461l-.013-2.078c-.001-.125-.069-.158-.194-.156l-1.025.016c-.105.002-.164.049-.162.148l.033 2.307s-3.061.527-3.144.543c-.084.014-.17.053-.151.143.019.09.19 1.094.208 1.172.018.08.072.129.188.107l2.924-.504.035 2.018c-1.077.281-1.801.824-2.256 1.303-.768.807-1.207 1.887-1.207 2.963 0 1.586.971 2.529 2.328 2.695 3.162.387 5.119-3.06 5.769-4.715 1.097 1.506.256 4.354-2.094 5.98-.043.029-.098.129-.033.207l.619.756c.08.096.206.059.256.023 2.51-1.73 3.661-4.515 2.869-6.683zm-7.386 3.188c-.966-.121-.944-.914-.944-1.453 0-.773.327-1.58.876-2.156a3.21 3.21 0 011.229-.799l.082 4.277a2.773 2.773 0 01-1.243.131zm2.427-.553l.046-4.109c.084-.004.166-.01.252-.01.773 0 1.494.145 1.885.361.391.217-1.023 2.713-2.183 3.758zm-8.95-7.668a.196.196 0 00-.196-.145h-1.95a.194.194 0 00-.194.144L.008 16.916c-.017.051-.011.076.062.076h1.733c.075 0 .099-.023.114-.072l1.008-3.318h3.496l1.008 3.318c.016.049.039.072.113.072h1.734c.072 0 .078-.025.062-.076-.014-.05-3.083-9.741-3.494-11.04zm-2.618 6.318l1.447-5.25 1.447 5.25H3.226z"
25
+ d="M12.87 15.07l-2.54-2.51.03-.03c1.74-1.94 2.98-4.17 3.71-6.53H17V4h-7V2H8v2H1v1.99h11.17C11.5 7.92 10.44 9.75 9 11.35 8.07 10.32 7.3 9.19 6.69 8h-2c.73 1.63 1.73 3.17 2.98 4.56l-5.09 5.02L4 19l5-5 3.11 3.11.76-2.04zM18.5 10h-2L12 22h2l1.12-3h4.75L21 22h2l-4.5-12zm-2.62 7l1.62-4.33L19.12 17h-3.24z"
26
26
  />
27
27
  </svg>
28
28
  );
@@ -37,8 +37,22 @@ const MDXComponents: MDXComponentsObject = {
37
37
  return <Head {...props}>{unwrappedChildren}</Head>;
38
38
  },
39
39
  code: (props) => {
40
+ const inlineElements = [
41
+ 'a',
42
+ 'b',
43
+ 'big',
44
+ 'i',
45
+ 'span',
46
+ 'em',
47
+ 'strong',
48
+ 'sup',
49
+ 'sub',
50
+ 'small',
51
+ ];
40
52
  const shouldBeInline = React.Children.toArray(props.children).every(
41
- (el) => typeof el === 'string' && !el.includes('\n'),
53
+ (el) =>
54
+ (typeof el === 'string' && !el.includes('\n')) ||
55
+ (React.isValidElement(el) && inlineElements.includes(el.props.mdxType)),
42
56
  );
43
57
 
44
58
  return shouldBeInline ? <code {...props} /> : <CodeBlock {...props} />;