@azerion/bunosaurus-plugin-debug 0.0.0-stage → 4.0.0-canary-6927
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/README.md +6 -2
- package/lib/index.d.ts +8 -0
- package/lib/index.js +62 -0
- package/lib/theme/DebugConfig/index.d.ts +8 -0
- package/lib/theme/DebugConfig/index.js +18 -0
- package/lib/theme/DebugContent/index.d.ts +9 -0
- package/lib/theme/DebugContent/index.js +58 -0
- package/lib/theme/DebugGlobalData/index.d.ts +8 -0
- package/lib/theme/DebugGlobalData/index.js +18 -0
- package/lib/theme/DebugJsonView/index.d.ts +9 -0
- package/lib/theme/DebugJsonView/index.js +40 -0
- package/lib/theme/DebugJsonView/styles.module.css +110 -0
- package/lib/theme/DebugLayout/index.d.ts +10 -0
- package/lib/theme/DebugLayout/index.js +52 -0
- package/lib/theme/DebugLayout/styles.module.css +75 -0
- package/lib/theme/DebugRegistry/index.d.ts +8 -0
- package/lib/theme/DebugRegistry/index.js +28 -0
- package/lib/theme/DebugRegistry/styles.module.css +13 -0
- package/lib/theme/DebugRoutes/index.d.ts +8 -0
- package/lib/theme/DebugRoutes/index.js +35 -0
- package/lib/theme/DebugRoutes/styles.module.css +21 -0
- package/lib/theme/DebugSiteMetadata/index.d.ts +8 -0
- package/lib/theme/DebugSiteMetadata/index.js +41 -0
- package/lib/theme/DebugSiteMetadata/styles.module.css +26 -0
- package/package.json +35 -4
- package/src/index.ts +72 -0
- package/src/plugin-debug.d.ts +70 -0
- package/src/theme/DebugConfig/index.tsx +21 -0
- package/src/theme/DebugContent/index.tsx +77 -0
- package/src/theme/DebugGlobalData/index.tsx +21 -0
- package/src/theme/DebugJsonView/index.tsx +50 -0
- package/src/theme/DebugJsonView/styles.module.css +110 -0
- package/src/theme/DebugLayout/index.tsx +60 -0
- package/src/theme/DebugLayout/styles.module.css +75 -0
- package/src/theme/DebugRegistry/index.tsx +31 -0
- package/src/theme/DebugRegistry/styles.module.css +13 -0
- package/src/theme/DebugRoutes/index.tsx +38 -0
- package/src/theme/DebugRoutes/styles.module.css +21 -0
- package/src/theme/DebugSiteMetadata/index.tsx +44 -0
- package/src/theme/DebugSiteMetadata/styles.module.css +26 -0
|
@@ -0,0 +1,26 @@
|
|
|
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
|
+
.sectionTitle {
|
|
9
|
+
margin-top: 20px;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.listItem {
|
|
13
|
+
background-color: #242526;
|
|
14
|
+
padding: 10px;
|
|
15
|
+
border-radius: 4px;
|
|
16
|
+
margin-bottom: 20px;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.version {
|
|
20
|
+
float: right;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.name {
|
|
24
|
+
font-weight: 800;
|
|
25
|
+
color: #e06b6b;
|
|
26
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,37 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@azerion/bunosaurus-plugin-debug",
|
|
3
|
-
"version": "
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "4.0.0-canary-6927+e0f3c69e5",
|
|
4
|
+
"description": "Debug plugin for Docusaurus.",
|
|
5
|
+
"main": "lib/index.js",
|
|
6
|
+
"types": "src/plugin-debug.d.ts",
|
|
7
|
+
"scripts": {
|
|
8
|
+
"build": "tsc --build && copy-untyped-files && oxfmt \"lib/theme/**/*.js\"",
|
|
9
|
+
"watch": "run-p -c copy:watch build:watch",
|
|
10
|
+
"build:watch": "tsc --build --watch",
|
|
11
|
+
"copy:watch": "copy-untyped-files --watch"
|
|
12
|
+
},
|
|
13
|
+
"publishConfig": {
|
|
14
|
+
"access": "public"
|
|
15
|
+
},
|
|
16
|
+
"repository": {
|
|
17
|
+
"type": "git",
|
|
18
|
+
"url": "https://github.com/azerion/bunosaurus.git",
|
|
19
|
+
"directory": "packages/docusaurus-plugin-debug"
|
|
20
|
+
},
|
|
21
|
+
"license": "MIT",
|
|
22
|
+
"dependencies": {
|
|
23
|
+
"@docusaurus/core": "npm:@azerion/bunosaurus-core@4.0.0-canary-6927+e0f3c69e5",
|
|
24
|
+
"@docusaurus/module-type-aliases": "npm:@azerion/bunosaurus-module-type-aliases@4.0.0-canary-6927+e0f3c69e5",
|
|
25
|
+
"@docusaurus/types": "npm:@azerion/bunosaurus-types@4.0.0-canary-6927+e0f3c69e5",
|
|
26
|
+
"@docusaurus/utils": "npm:@azerion/bunosaurus-utils@4.0.0-canary-6927+e0f3c69e5",
|
|
27
|
+
"react-json-view-lite": "^2.5.0",
|
|
28
|
+
"tslib": "^2.8.1"
|
|
29
|
+
},
|
|
30
|
+
"peerDependencies": {
|
|
31
|
+
"react": "^19.3.0",
|
|
32
|
+
"react-dom": "^19.3.0"
|
|
33
|
+
},
|
|
34
|
+
"engines": {
|
|
35
|
+
"bun": ">=1.4.1"
|
|
36
|
+
}
|
|
37
|
+
}
|
package/src/index.ts
ADDED
|
@@ -0,0 +1,72 @@
|
|
|
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 {normalizeUrl} from '@docusaurus/utils';
|
|
9
|
+
import type {LoadContext, Plugin} from '@docusaurus/types';
|
|
10
|
+
|
|
11
|
+
export default function pluginDebug({
|
|
12
|
+
siteConfig: {baseUrl},
|
|
13
|
+
}: LoadContext): Plugin<undefined> {
|
|
14
|
+
return {
|
|
15
|
+
name: 'docusaurus-plugin-debug',
|
|
16
|
+
|
|
17
|
+
getThemePath() {
|
|
18
|
+
return '../lib/theme';
|
|
19
|
+
},
|
|
20
|
+
getTypeScriptThemePath() {
|
|
21
|
+
return '../src/theme';
|
|
22
|
+
},
|
|
23
|
+
|
|
24
|
+
async allContentLoaded({actions: {addRoute}, allContent}) {
|
|
25
|
+
// Home is config (duplicate for now)
|
|
26
|
+
addRoute({
|
|
27
|
+
path: normalizeUrl([baseUrl, '__docusaurus/debug']),
|
|
28
|
+
component: '@theme/DebugConfig',
|
|
29
|
+
exact: true,
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
addRoute({
|
|
33
|
+
path: normalizeUrl([baseUrl, '__docusaurus/debug/config']),
|
|
34
|
+
component: '@theme/DebugConfig',
|
|
35
|
+
exact: true,
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
addRoute({
|
|
39
|
+
path: normalizeUrl([baseUrl, '__docusaurus/debug/metadata']),
|
|
40
|
+
component: '@theme/DebugSiteMetadata',
|
|
41
|
+
exact: true,
|
|
42
|
+
});
|
|
43
|
+
|
|
44
|
+
addRoute({
|
|
45
|
+
path: normalizeUrl([baseUrl, '__docusaurus/debug/registry']),
|
|
46
|
+
component: '@theme/DebugRegistry',
|
|
47
|
+
exact: true,
|
|
48
|
+
});
|
|
49
|
+
|
|
50
|
+
addRoute({
|
|
51
|
+
path: normalizeUrl([baseUrl, '__docusaurus/debug/routes']),
|
|
52
|
+
component: '@theme/DebugRoutes',
|
|
53
|
+
exact: true,
|
|
54
|
+
});
|
|
55
|
+
|
|
56
|
+
addRoute({
|
|
57
|
+
path: normalizeUrl([baseUrl, '__docusaurus/debug/content']),
|
|
58
|
+
component: '@theme/DebugContent',
|
|
59
|
+
exact: true,
|
|
60
|
+
props: {
|
|
61
|
+
allContent,
|
|
62
|
+
},
|
|
63
|
+
});
|
|
64
|
+
|
|
65
|
+
addRoute({
|
|
66
|
+
path: normalizeUrl([baseUrl, '__docusaurus/debug/globalData']),
|
|
67
|
+
component: '@theme/DebugGlobalData',
|
|
68
|
+
exact: true,
|
|
69
|
+
});
|
|
70
|
+
},
|
|
71
|
+
};
|
|
72
|
+
}
|
|
@@ -0,0 +1,70 @@
|
|
|
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
|
+
/// <reference types="@docusaurus/module-type-aliases" />
|
|
9
|
+
|
|
10
|
+
declare module '@docusaurus/plugin-debug' {
|
|
11
|
+
import type {LoadContext, Plugin} from '@docusaurus/types';
|
|
12
|
+
|
|
13
|
+
export default function pluginDebug(context: LoadContext): Plugin<undefined>;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
declare module '@theme/DebugConfig' {
|
|
17
|
+
import type {ReactNode} from 'react';
|
|
18
|
+
|
|
19
|
+
export default function DebugMetadata(): ReactNode;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
declare module '@theme/DebugContent' {
|
|
23
|
+
import type {ReactNode} from 'react';
|
|
24
|
+
import type {AllContent} from '@docusaurus/types';
|
|
25
|
+
|
|
26
|
+
export interface Props {
|
|
27
|
+
readonly allContent: AllContent;
|
|
28
|
+
}
|
|
29
|
+
export default function DebugContent(props: Props): ReactNode;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
declare module '@theme/DebugGlobalData' {
|
|
33
|
+
import type {ReactNode} from 'react';
|
|
34
|
+
|
|
35
|
+
export default function DebugGlobalData(): ReactNode;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
declare module '@theme/DebugJsonView' {
|
|
39
|
+
import type {ReactNode} from 'react';
|
|
40
|
+
|
|
41
|
+
export interface Props {
|
|
42
|
+
readonly src: unknown;
|
|
43
|
+
readonly collapseDepth?: number;
|
|
44
|
+
}
|
|
45
|
+
export default function DebugJsonView(props: Props): ReactNode;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
declare module '@theme/DebugLayout' {
|
|
49
|
+
import type {ReactNode} from 'react';
|
|
50
|
+
|
|
51
|
+
export default function DebugLayout(props: {children: ReactNode}): ReactNode;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
declare module '@theme/DebugRegistry' {
|
|
55
|
+
import type {ReactNode} from 'react';
|
|
56
|
+
|
|
57
|
+
export default function DebugRegistry(): ReactNode;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
declare module '@theme/DebugRoutes' {
|
|
61
|
+
import type {ReactNode} from 'react';
|
|
62
|
+
|
|
63
|
+
export default function DebugRoutes(): ReactNode;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
declare module '@theme/DebugSiteMetadata' {
|
|
67
|
+
import type {ReactNode} from 'react';
|
|
68
|
+
|
|
69
|
+
export default function DebugSiteMetadata(): ReactNode;
|
|
70
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
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 type {ReactNode} from 'react';
|
|
9
|
+
import useDocusaurusContext from '@docusaurus/useDocusaurusContext';
|
|
10
|
+
import DebugLayout from '@theme/DebugLayout';
|
|
11
|
+
import DebugJsonView from '@theme/DebugJsonView';
|
|
12
|
+
|
|
13
|
+
export default function DebugMetadata(): ReactNode {
|
|
14
|
+
const {siteConfig} = useDocusaurusContext();
|
|
15
|
+
return (
|
|
16
|
+
<DebugLayout>
|
|
17
|
+
<h2>Site config</h2>
|
|
18
|
+
<DebugJsonView src={siteConfig} collapseDepth={3} />
|
|
19
|
+
</DebugLayout>
|
|
20
|
+
);
|
|
21
|
+
}
|
|
@@ -0,0 +1,77 @@
|
|
|
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 type {ReactNode} from 'react';
|
|
9
|
+
|
|
10
|
+
import DebugLayout from '@theme/DebugLayout';
|
|
11
|
+
import DebugJsonView from '@theme/DebugJsonView';
|
|
12
|
+
import type {Props} from '@theme/DebugContent';
|
|
13
|
+
|
|
14
|
+
function PluginInstanceContent({
|
|
15
|
+
pluginId,
|
|
16
|
+
pluginInstanceContent,
|
|
17
|
+
}: {
|
|
18
|
+
pluginId: string;
|
|
19
|
+
pluginInstanceContent: unknown;
|
|
20
|
+
}) {
|
|
21
|
+
return (
|
|
22
|
+
<section style={{marginBottom: 30}}>
|
|
23
|
+
<code>{pluginId}</code>
|
|
24
|
+
<DebugJsonView src={pluginInstanceContent} collapseDepth={2} />
|
|
25
|
+
</section>
|
|
26
|
+
);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
function PluginContent({
|
|
30
|
+
pluginName,
|
|
31
|
+
pluginContent,
|
|
32
|
+
}: {
|
|
33
|
+
pluginName: string;
|
|
34
|
+
pluginContent: {[pluginId: string]: unknown};
|
|
35
|
+
}) {
|
|
36
|
+
return (
|
|
37
|
+
<section style={{marginBottom: 60}}>
|
|
38
|
+
<h3>{pluginName}</h3>
|
|
39
|
+
<div>
|
|
40
|
+
{Object.entries(pluginContent)
|
|
41
|
+
// Filter plugin instances with no content
|
|
42
|
+
.filter(([, pluginInstanceContent]) => !!pluginInstanceContent)
|
|
43
|
+
.map(([pluginId, pluginInstanceContent]) => (
|
|
44
|
+
<PluginInstanceContent
|
|
45
|
+
key={pluginId}
|
|
46
|
+
pluginId={pluginId}
|
|
47
|
+
pluginInstanceContent={pluginInstanceContent}
|
|
48
|
+
/>
|
|
49
|
+
))}
|
|
50
|
+
</div>
|
|
51
|
+
</section>
|
|
52
|
+
);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export default function DebugContent({allContent}: Props): ReactNode {
|
|
56
|
+
return (
|
|
57
|
+
<DebugLayout>
|
|
58
|
+
<h2>Plugin content</h2>
|
|
59
|
+
<div>
|
|
60
|
+
{Object.entries(allContent)
|
|
61
|
+
// Filter plugins with no content
|
|
62
|
+
.filter(([, pluginContent]) =>
|
|
63
|
+
Object.values(pluginContent).some(
|
|
64
|
+
(instanceContent) => !!instanceContent,
|
|
65
|
+
),
|
|
66
|
+
)
|
|
67
|
+
.map(([pluginName, pluginContent]) => (
|
|
68
|
+
<PluginContent
|
|
69
|
+
key={pluginName}
|
|
70
|
+
pluginName={pluginName}
|
|
71
|
+
pluginContent={pluginContent}
|
|
72
|
+
/>
|
|
73
|
+
))}
|
|
74
|
+
</div>
|
|
75
|
+
</DebugLayout>
|
|
76
|
+
);
|
|
77
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
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 type {ReactNode} from 'react';
|
|
9
|
+
import useGlobalData from '@docusaurus/useGlobalData';
|
|
10
|
+
import DebugLayout from '@theme/DebugLayout';
|
|
11
|
+
import DebugJsonView from '@theme/DebugJsonView';
|
|
12
|
+
|
|
13
|
+
export default function DebugMetadata(): ReactNode {
|
|
14
|
+
const globalData = useGlobalData();
|
|
15
|
+
return (
|
|
16
|
+
<DebugLayout>
|
|
17
|
+
<h2>Global data</h2>
|
|
18
|
+
<DebugJsonView src={globalData} collapseDepth={3} />
|
|
19
|
+
</DebugLayout>
|
|
20
|
+
);
|
|
21
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
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 type {ReactNode} from 'react';
|
|
9
|
+
import {
|
|
10
|
+
JsonView,
|
|
11
|
+
defaultStyles,
|
|
12
|
+
type Props as JsonViewProps,
|
|
13
|
+
} from 'react-json-view-lite';
|
|
14
|
+
import type {Props} from '@theme/DebugJsonView';
|
|
15
|
+
import styles from './styles.module.css';
|
|
16
|
+
|
|
17
|
+
const paraisoStyles: JsonViewProps['style'] = {
|
|
18
|
+
clickableLabel: defaultStyles.clickableLabel,
|
|
19
|
+
noQuotesForStringValues: false,
|
|
20
|
+
container: styles.containerParaiso!,
|
|
21
|
+
basicChildStyle: styles.basicElementParaiso!,
|
|
22
|
+
label: styles.labelParaiso!,
|
|
23
|
+
nullValue: styles.nullValueParaiso!,
|
|
24
|
+
undefinedValue: styles.undefinedValueParaiso!,
|
|
25
|
+
stringValue: styles.stringValueParaiso!,
|
|
26
|
+
booleanValue: styles.booleanValueParaiso!,
|
|
27
|
+
numberValue: styles.numberValueParaiso!,
|
|
28
|
+
otherValue: styles.otherValueParaiso!,
|
|
29
|
+
punctuation: styles.punctuationParaiso!,
|
|
30
|
+
collapseIcon: styles.collapseIconParaiso!,
|
|
31
|
+
expandIcon: styles.expandIconParaiso!,
|
|
32
|
+
collapsedContent: styles.collapseContentParaiso!,
|
|
33
|
+
childFieldsContainer: styles.childFieldsContainerParaiso!,
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
export default function DebugJsonView({src, collapseDepth}: Props): ReactNode {
|
|
37
|
+
return (
|
|
38
|
+
<JsonView
|
|
39
|
+
data={src as object}
|
|
40
|
+
shouldExpandNode={(idx, value) => {
|
|
41
|
+
if (Array.isArray(value)) {
|
|
42
|
+
return value.length < 5;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
return collapseDepth !== undefined && idx < collapseDepth;
|
|
46
|
+
}}
|
|
47
|
+
style={paraisoStyles}
|
|
48
|
+
/>
|
|
49
|
+
);
|
|
50
|
+
}
|
|
@@ -0,0 +1,110 @@
|
|
|
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
|
+
.containerParaiso {
|
|
9
|
+
font-family: monospace;
|
|
10
|
+
cursor: default;
|
|
11
|
+
background-color: rgb(41 42 43);
|
|
12
|
+
position: relative;
|
|
13
|
+
margin-top: 10px;
|
|
14
|
+
padding: 10px;
|
|
15
|
+
border-radius: 4px;
|
|
16
|
+
font-size: 13px;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.basicElementParaiso {
|
|
20
|
+
color: white;
|
|
21
|
+
padding: 3px 5px 3px 20px;
|
|
22
|
+
border-left: 1px solid rgb(79 66 76);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.labelParaiso {
|
|
26
|
+
color: rgb(231 233 219);
|
|
27
|
+
letter-spacing: 0.5px;
|
|
28
|
+
margin-right: 3px;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.nullValueParaiso {
|
|
32
|
+
display: inline-block;
|
|
33
|
+
color: rgb(254 196 24);
|
|
34
|
+
font-size: 11px;
|
|
35
|
+
font-weight: bold;
|
|
36
|
+
background-color: rgb(79 66 76);
|
|
37
|
+
padding: 1px 2px;
|
|
38
|
+
border-radius: 3px;
|
|
39
|
+
text-transform: uppercase;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.undefinedValueParaiso {
|
|
43
|
+
color: rgb(141 134 135);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.stringValueParaiso {
|
|
47
|
+
color: rgb(249 155 21);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.booleanValueParaiso {
|
|
51
|
+
color: rgb(129 91 164);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.numberValueParaiso {
|
|
55
|
+
color: rgb(233 107 168);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.otherValueParaiso {
|
|
59
|
+
color: white;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.punctuationParaiso {
|
|
63
|
+
color: white;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.expandIconParaiso {
|
|
67
|
+
display: inline-block;
|
|
68
|
+
color: rgb(129 91 164);
|
|
69
|
+
font-size: 22px;
|
|
70
|
+
vertical-align: baseline;
|
|
71
|
+
margin-right: 3px;
|
|
72
|
+
line-height: 10px;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.collapseIconParaiso::after {
|
|
76
|
+
content: '\25BE';
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.collapseIconParaiso {
|
|
80
|
+
display: inline-block;
|
|
81
|
+
color: rgb(6 182 239);
|
|
82
|
+
font-size: 22px;
|
|
83
|
+
vertical-align: baseline;
|
|
84
|
+
margin-right: 3px;
|
|
85
|
+
line-height: 10px;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.expandIconParaiso::after {
|
|
89
|
+
content: '\25B8';
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
.collapseContentParaiso {
|
|
93
|
+
color: rgb(249 155 21);
|
|
94
|
+
font-size: 18px;
|
|
95
|
+
line-height: 10px;
|
|
96
|
+
cursor: pointer;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
.collapseContentParaiso::after {
|
|
100
|
+
content: '...';
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
/*
|
|
104
|
+
Overrides default ul style from Infima
|
|
105
|
+
See https://github.com/AnyRoad/react-json-view-lite/issues/38
|
|
106
|
+
*/
|
|
107
|
+
.childFieldsContainerParaiso {
|
|
108
|
+
margin: 0;
|
|
109
|
+
padding: 0;
|
|
110
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
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 type {ReactNode} from 'react';
|
|
9
|
+
import Head from '@docusaurus/Head';
|
|
10
|
+
import Link from '@docusaurus/Link';
|
|
11
|
+
import styles from './styles.module.css';
|
|
12
|
+
|
|
13
|
+
function DebugNavLink({to, children}: {to: string; children: ReactNode}) {
|
|
14
|
+
return (
|
|
15
|
+
<Link
|
|
16
|
+
className={styles.navlink}
|
|
17
|
+
isNavLink
|
|
18
|
+
to={to}
|
|
19
|
+
exact
|
|
20
|
+
activeStyle={{
|
|
21
|
+
backgroundColor: '#363739',
|
|
22
|
+
}}>
|
|
23
|
+
{children}
|
|
24
|
+
</Link>
|
|
25
|
+
);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export default function DebugLayout({
|
|
29
|
+
children,
|
|
30
|
+
}: {
|
|
31
|
+
children: ReactNode;
|
|
32
|
+
}): ReactNode {
|
|
33
|
+
return (
|
|
34
|
+
<>
|
|
35
|
+
<Head>
|
|
36
|
+
<html lang="en" />
|
|
37
|
+
<title>Docusaurus debug panel</title>
|
|
38
|
+
<meta name="robots" content="noindex" />
|
|
39
|
+
</Head>
|
|
40
|
+
|
|
41
|
+
<div>
|
|
42
|
+
<nav className={styles.nav}>
|
|
43
|
+
<DebugNavLink to="/__docusaurus/debug">Config</DebugNavLink>
|
|
44
|
+
<DebugNavLink to="/__docusaurus/debug/metadata">
|
|
45
|
+
Metadata
|
|
46
|
+
</DebugNavLink>
|
|
47
|
+
<DebugNavLink to="/__docusaurus/debug/registry">
|
|
48
|
+
Registry
|
|
49
|
+
</DebugNavLink>
|
|
50
|
+
<DebugNavLink to="/__docusaurus/debug/routes">Routes</DebugNavLink>
|
|
51
|
+
<DebugNavLink to="/__docusaurus/debug/content">Content</DebugNavLink>
|
|
52
|
+
<DebugNavLink to="/__docusaurus/debug/globalData">
|
|
53
|
+
Global data
|
|
54
|
+
</DebugNavLink>
|
|
55
|
+
</nav>
|
|
56
|
+
<main className={styles.container}>{children}</main>
|
|
57
|
+
</div>
|
|
58
|
+
</>
|
|
59
|
+
);
|
|
60
|
+
}
|
|
@@ -0,0 +1,75 @@
|
|
|
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
|
+
.container {
|
|
9
|
+
padding: 20px;
|
|
10
|
+
padding-top: 80px;
|
|
11
|
+
overflow-x: hidden;
|
|
12
|
+
background-color: #18191a;
|
|
13
|
+
color: white;
|
|
14
|
+
min-height: 100vh;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.container code {
|
|
18
|
+
color: white;
|
|
19
|
+
background-color: #444950;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.nav {
|
|
23
|
+
position: fixed;
|
|
24
|
+
display: flex;
|
|
25
|
+
justify-content: space-evenly;
|
|
26
|
+
align-items: center;
|
|
27
|
+
height: 3.75rem;
|
|
28
|
+
background-color: #242526;
|
|
29
|
+
width: 100%;
|
|
30
|
+
z-index: 1;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.navlink {
|
|
34
|
+
color: white;
|
|
35
|
+
font-weight: 500;
|
|
36
|
+
font-size: clamp(12px, 4vw, 16px);
|
|
37
|
+
text-align: center;
|
|
38
|
+
border-radius: 4px;
|
|
39
|
+
padding: 6px;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.navlink:hover {
|
|
43
|
+
text-decoration: none;
|
|
44
|
+
background-color: #292a2b;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.active {
|
|
48
|
+
background-color: #363739;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
@media screen and (width >= 800px) {
|
|
52
|
+
.nav {
|
|
53
|
+
flex-direction: column;
|
|
54
|
+
justify-content: flex-start;
|
|
55
|
+
align-items: center;
|
|
56
|
+
height: 100vh;
|
|
57
|
+
width: 200px;
|
|
58
|
+
float: left;
|
|
59
|
+
background-color: #18191a;
|
|
60
|
+
border-right: 1px solid #606770;
|
|
61
|
+
padding-top: 20px;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.navlink {
|
|
65
|
+
width: 80%;
|
|
66
|
+
margin-top: 20px;
|
|
67
|
+
text-align: left;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.container {
|
|
71
|
+
padding-top: 40px;
|
|
72
|
+
float: right;
|
|
73
|
+
width: calc(100% - 200px);
|
|
74
|
+
}
|
|
75
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
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 type {ReactNode} from 'react';
|
|
9
|
+
import registry from '@generated/registry';
|
|
10
|
+
import DebugLayout from '@theme/DebugLayout';
|
|
11
|
+
import styles from './styles.module.css';
|
|
12
|
+
|
|
13
|
+
export default function DebugRegistry(): ReactNode {
|
|
14
|
+
return (
|
|
15
|
+
<DebugLayout>
|
|
16
|
+
<h2>Registry</h2>
|
|
17
|
+
<ul className="clean-list">
|
|
18
|
+
{Object.entries(registry).map(([chunkName, [, aliasedPath]]) => (
|
|
19
|
+
<li key={chunkName} className={styles.listItem}>
|
|
20
|
+
<div style={{marginBottom: '10px'}}>
|
|
21
|
+
Chunk Name: <code>{chunkName}</code>
|
|
22
|
+
</div>
|
|
23
|
+
<div>
|
|
24
|
+
Aliased Path: <code>{aliasedPath}</code>
|
|
25
|
+
</div>
|
|
26
|
+
</li>
|
|
27
|
+
))}
|
|
28
|
+
</ul>
|
|
29
|
+
</DebugLayout>
|
|
30
|
+
);
|
|
31
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
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
|
+
.listItem {
|
|
9
|
+
background-color: #242526;
|
|
10
|
+
padding: 10px;
|
|
11
|
+
border-radius: 4px;
|
|
12
|
+
margin-bottom: 20px;
|
|
13
|
+
}
|