@docusaurus/theme-common 0.0.0-5332 → 0.0.0-5333

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/index.d.ts CHANGED
@@ -23,4 +23,5 @@ export { duplicates, uniq } from './utils/jsUtils';
23
23
  export { usePrismTheme } from './hooks/usePrismTheme';
24
24
  export { useDocsPreferredVersion } from './contexts/docsPreferredVersion';
25
25
  export { processAdmonitionProps } from './utils/admonitionUtils';
26
+ export { ErrorBoundaryTryAgainButton } from './utils/errorBoundaryUtils';
26
27
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAMH,OAAO,EACL,cAAc,EACd,KAAK,WAAW,EAChB,KAAK,eAAe,EACpB,KAAK,MAAM,EACX,KAAK,UAAU,EACf,KAAK,UAAU,EACf,KAAK,iBAAiB,EACtB,KAAK,YAAY,EACjB,KAAK,MAAM,EACX,KAAK,UAAU,EACf,KAAK,cAAc,EACnB,KAAK,eAAe,GACrB,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EAAC,iBAAiB,EAAE,eAAe,EAAC,MAAM,sBAAsB,CAAC;AAExE,OAAO,EAAC,0BAA0B,EAAC,MAAM,qBAAqB,CAAC;AAE/D,OAAO,EACL,yBAAyB,EACzB,sBAAsB,GACvB,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EAAC,aAAa,EAAC,MAAM,uBAAuB,CAAC;AAEpD,OAAO,EAAC,cAAc,EAAE,WAAW,EAAC,MAAM,0BAA0B,CAAC;AAErE,OAAO,EAAC,eAAe,EAAC,MAAM,yBAAyB,CAAC;AAExD,OAAO,EACL,yBAAyB,EACzB,QAAQ,EACR,WAAW,EACX,gBAAgB,EAChB,iBAAiB,GAClB,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EAAC,YAAY,EAAE,qBAAqB,EAAC,MAAM,uB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AM,0BAA0B,CAAC;AAErE,OAAO,EAAC,eAAe,EAAC,MAAM,yBAAyB,CAAC;AAExD,OAAO,EACL,yBAAyB,EACzB,QAAQ,EACR,WAAW,EACX,gBAAgB,EAChB,iBAAiB,GAClB,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EAAC,YAAY,EAAE,qBAAqB,EAAC,MAAM,uBAAuB,CAAC;AAE1E,OAAO,EAAC,YAAY,EAAE,KAAK,SAAS,EAAC,MAAM,sBAAsB,CAAC;AAElE,OAAO,EACL,yBAAyB,EACzB,KAAK,4BAA4B,GAClC,MAAM,wCAAwC,CAAC;AAEhD,OAAO,EAAC,aAAa,EAAC,MAAM,uBAAuB,CAAC;AAOpD,OAAO,EACL,sBAAsB,EACtB,iBAAiB,EACjB,KAAK,cAAc,GACpB,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EAAC,wBAAwB,EAAC,MAAM,qBAAqB,CAAC;AAE7D,OAAO,EAAC,mBAAmB,EAAC,MAAM,qBAAqB,CAAC;AAExD,OAAO,EAAC,UAAU,EAAE,IAAI,EAAC,MAAM,iBAAiB,CAAC;AAEjD,OAAO,EAAC,aAAa,EAAC,MAAM,uBAAuB,CAAC;AAEpD,OAAO,EAAC,uBAAuB,EAAC,MAAM,iCAAiC,CAAC;AAExE,OAAO,EAAC,sBAAsB,EAAC,MAAM,yBAAyB,CAAC;AAE/D,OAAO,EAAC,2BAA2B,EAAC,MAAM,4BAA4B,CAAC"}
package/lib/index.js CHANGED
@@ -30,4 +30,5 @@ export { duplicates, uniq } from './utils/jsUtils';
30
30
  export { usePrismTheme } from './hooks/usePrismTheme';
31
31
  export { useDocsPreferredVersion } from './contexts/docsPreferredVersion';
32
32
  export { processAdmonitionProps } from './utils/admonitionUtils';
33
+ export { ErrorBoundaryTryAgainButton } from './utils/errorBoundaryUtils';
33
34
  //# sourceMappingURL=index.js.map
package/lib/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/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,4BAA4B,CAAC"}
@@ -0,0 +1,9 @@
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
+ import { type ComponentProps } from 'react';
8
+ export declare function ErrorBoundaryTryAgainButton(props: ComponentProps<'button'>): JSX.Element;
9
+ //# sourceMappingURL=errorBoundaryUtils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"errorBoundaryUtils.d.ts","sourceRoot":"","sources":["../../src/utils/errorBoundaryUtils.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAc,EAAC,KAAK,cAAc,EAAC,MAAM,OAAO,CAAC;AAGjD,wBAAgB,2BAA2B,CACzC,KAAK,EAAE,cAAc,CAAC,QAAQ,CAAC,GAC9B,GAAG,CAAC,OAAO,CAUb"}
@@ -0,0 +1,16 @@
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
+ import React from 'react';
8
+ import Translate from '@docusaurus/Translate';
9
+ export function ErrorBoundaryTryAgainButton(props) {
10
+ return (<button type="button" {...props}>
11
+ <Translate id="theme.ErrorPageContent.tryAgain" description="The label of the button to try again rendering when the React error boundary captures an error">
12
+ Try again
13
+ </Translate>
14
+ </button>);
15
+ }
16
+ //# sourceMappingURL=errorBoundaryUtils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"errorBoundaryUtils.js","sourceRoot":"","sources":["../../src/utils/errorBoundaryUtils.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAA4B,MAAM,OAAO,CAAC;AACjD,OAAO,SAAS,MAAM,uBAAuB,CAAC;AAE9C,MAAM,UAAU,2BAA2B,CACzC,KAA+B;IAE/B,OAAO,CACL,CAAC,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,IAAI,KAAK,CAAC,CAC9B;MAAA,CAAC,SAAS,CACR,EAAE,CAAC,iCAAiC,CACpC,WAAW,CAAC,gGAAgG,CAC5G;;MACF,EAAE,SAAS,CACb;IAAA,EAAE,MAAM,CAAC,CACV,CAAC;AACJ,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@docusaurus/theme-common",
3
- "version": "0.0.0-5332",
3
+ "version": "0.0.0-5333",
4
4
  "description": "Common code for Docusaurus themes.",
5
5
  "main": "./lib/index.js",
6
6
  "types": "./lib/index.d.ts",
@@ -30,12 +30,12 @@
30
30
  },
31
31
  "license": "MIT",
32
32
  "dependencies": {
33
- "@docusaurus/mdx-loader": "0.0.0-5332",
34
- "@docusaurus/module-type-aliases": "0.0.0-5332",
35
- "@docusaurus/plugin-content-blog": "0.0.0-5332",
36
- "@docusaurus/plugin-content-docs": "0.0.0-5332",
37
- "@docusaurus/plugin-content-pages": "0.0.0-5332",
38
- "@docusaurus/utils": "0.0.0-5332",
33
+ "@docusaurus/mdx-loader": "0.0.0-5333",
34
+ "@docusaurus/module-type-aliases": "0.0.0-5333",
35
+ "@docusaurus/plugin-content-blog": "0.0.0-5333",
36
+ "@docusaurus/plugin-content-docs": "0.0.0-5333",
37
+ "@docusaurus/plugin-content-pages": "0.0.0-5333",
38
+ "@docusaurus/utils": "0.0.0-5333",
39
39
  "@types/history": "^4.7.11",
40
40
  "@types/react": "*",
41
41
  "@types/react-router-config": "*",
@@ -46,8 +46,8 @@
46
46
  "utility-types": "^3.10.0"
47
47
  },
48
48
  "devDependencies": {
49
- "@docusaurus/core": "0.0.0-5332",
50
- "@docusaurus/types": "0.0.0-5332",
49
+ "@docusaurus/core": "0.0.0-5333",
50
+ "@docusaurus/types": "0.0.0-5333",
51
51
  "fs-extra": "^10.1.0",
52
52
  "lodash": "^4.17.21"
53
53
  },
@@ -58,5 +58,5 @@
58
58
  "engines": {
59
59
  "node": ">=16.14"
60
60
  },
61
- "gitHead": "87c793e511060b3753659e150782f38b25694aec"
61
+ "gitHead": "48a61fb7cc6ea72249f5c859c3068ea46e8d2625"
62
62
  }
package/src/index.ts CHANGED
@@ -80,3 +80,5 @@ export {usePrismTheme} from './hooks/usePrismTheme';
80
80
  export {useDocsPreferredVersion} from './contexts/docsPreferredVersion';
81
81
 
82
82
  export {processAdmonitionProps} from './utils/admonitionUtils';
83
+
84
+ export {ErrorBoundaryTryAgainButton} from './utils/errorBoundaryUtils';
@@ -0,0 +1,23 @@
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
+
8
+ import React, {type ComponentProps} from 'react';
9
+ import Translate from '@docusaurus/Translate';
10
+
11
+ export function ErrorBoundaryTryAgainButton(
12
+ props: ComponentProps<'button'>,
13
+ ): JSX.Element {
14
+ return (
15
+ <button type="button" {...props}>
16
+ <Translate
17
+ id="theme.ErrorPageContent.tryAgain"
18
+ description="The label of the button to try again rendering when the React error boundary captures an error">
19
+ Try again
20
+ </Translate>
21
+ </button>
22
+ );
23
+ }