mirror of
https://github.com/Redocly/redoc.git
synced 2024-11-14 04:46:34 +03:00
chore: codeowners
This commit is contained in:
parent
8f7e56c747
commit
8240404a55
2
.github/CODEOWNERS
vendored
Normal file
2
.github/CODEOWNERS
vendored
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
* @Redocly/keyboard-warriors
|
||||||
|
/docs/ @Redocly/technical-writers
|
|
@ -33,7 +33,7 @@
|
||||||
"start": "webpack serve --mode=development --env playground --hot --config demo/webpack.config.ts",
|
"start": "webpack serve --mode=development --env playground --hot --config demo/webpack.config.ts",
|
||||||
"start:prod": "webpack serve --env playground --mode=production --config demo/webpack.config.ts",
|
"start:prod": "webpack serve --env playground --mode=production --config demo/webpack.config.ts",
|
||||||
"start:benchmark": "webpack serve --mode=production --env.bench --config demo/webpack.config.ts",
|
"start:benchmark": "webpack serve --mode=production --env.bench --config demo/webpack.config.ts",
|
||||||
"test": "npm run lint && npm run unit && npm run license-check",
|
"test": "npm run unit && npm run license-check",
|
||||||
"unit": "jest --coverage",
|
"unit": "jest --coverage",
|
||||||
"e2e": "cypress run",
|
"e2e": "cypress run",
|
||||||
"e2e-ci": "cypress run --record",
|
"e2e-ci": "cypress run --record",
|
||||||
|
@ -49,7 +49,7 @@
|
||||||
"stats": "webpack --env production --env standalone --json --profile --mode=production > stats.json",
|
"stats": "webpack --env production --env standalone --json --profile --mode=production > stats.json",
|
||||||
"prettier": "prettier --write \"cli/index.ts\" \"src/**/*.{ts,tsx}\"",
|
"prettier": "prettier --write \"cli/index.ts\" \"src/**/*.{ts,tsx}\"",
|
||||||
"changelog": "conventional-changelog -p angular -i CHANGELOG.md -s -r 1",
|
"changelog": "conventional-changelog -p angular -i CHANGELOG.md -s -r 1",
|
||||||
"lint": "eslint 'src/**/*.{js,ts,tsx}' --cache",
|
"lint": "eslint --fix 'src/**/*.{js,ts,tsx}' --cache",
|
||||||
"benchmark": "node ./benchmark/benchmark.js",
|
"benchmark": "node ./benchmark/benchmark.js",
|
||||||
"start:demo": "webpack serve --hot --config demo/webpack.config.ts --mode=development",
|
"start:demo": "webpack serve --hot --config demo/webpack.config.ts --mode=development",
|
||||||
"compile:cli": "tsc custom.d.ts cli/index.ts --target es6 --module commonjs --types yargs",
|
"compile:cli": "tsc custom.d.ts cli/index.ts --target es6 --module commonjs --types yargs",
|
||||||
|
|
|
@ -26,9 +26,10 @@ export const RedocStandalone = function (props: RedocStandaloneProps) {
|
||||||
const normalizedOpts = new RedocNormalizedOptions(options);
|
const normalizedOpts = new RedocNormalizedOptions(options);
|
||||||
|
|
||||||
if (normalizedOpts.nonce !== undefined) {
|
if (normalizedOpts.nonce !== undefined) {
|
||||||
try {
|
try {
|
||||||
__webpack_nonce__ = normalizedOpts.nonce;
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||||
} catch { } // If we have exception, Webpack was not used to run this.
|
__webpack_nonce__ = normalizedOpts.nonce;
|
||||||
|
} catch {} // If we have exception, Webpack was not used to run this.
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|
|
@ -66,8 +66,11 @@ export const OperationBadge = styled.span.attrs((props: { type: string }) => ({
|
||||||
}
|
}
|
||||||
`;
|
`;
|
||||||
|
|
||||||
|
function menuItemActive(
|
||||||
function menuItemActive(depth, { theme }: { theme: ResolvedThemeInterface }, option: string): string {
|
depth,
|
||||||
|
{ theme }: { theme: ResolvedThemeInterface },
|
||||||
|
option: string,
|
||||||
|
): string {
|
||||||
if (depth > 1) {
|
if (depth > 1) {
|
||||||
return theme.sidebar.level1Items[option];
|
return theme.sidebar.level1Items[option];
|
||||||
} else if (depth === 1) {
|
} else if (depth === 1) {
|
||||||
|
@ -125,7 +128,9 @@ export const MenuItemLabel = styled.label.attrs((props: MenuItemLabelType) => ({
|
||||||
}))<MenuItemLabelType>`
|
}))<MenuItemLabelType>`
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
color: ${props =>
|
color: ${props =>
|
||||||
props.active ? menuItemActive(props.depth, props, 'activeTextColor') : props.theme.sidebar.textColor};
|
props.active
|
||||||
|
? menuItemActive(props.depth, props, 'activeTextColor')
|
||||||
|
: props.theme.sidebar.textColor};
|
||||||
margin: 0;
|
margin: 0;
|
||||||
padding: 12.5px ${props => props.theme.spacing.unit * 4}px;
|
padding: 12.5px ${props => props.theme.spacing.unit * 4}px;
|
||||||
${({ depth, type, theme }) =>
|
${({ depth, type, theme }) =>
|
||||||
|
@ -135,7 +140,9 @@ export const MenuItemLabel = styled.label.attrs((props: MenuItemLabelType) => ({
|
||||||
font-family: ${props => props.theme.typography.headings.fontFamily};
|
font-family: ${props => props.theme.typography.headings.fontFamily};
|
||||||
${props => menuItemDepth[props.depth]};
|
${props => menuItemDepth[props.depth]};
|
||||||
background-color: ${props =>
|
background-color: ${props =>
|
||||||
props.active ? menuItemActive(props.depth, props, 'activeBackgroundColor') : props.theme.sidebar.backgroundColor};
|
props.active
|
||||||
|
? menuItemActive(props.depth, props, 'activeBackgroundColor')
|
||||||
|
: props.theme.sidebar.backgroundColor};
|
||||||
|
|
||||||
${props => (props.deprecated && deprecatedCss) || ''};
|
${props => (props.deprecated && deprecatedCss) || ''};
|
||||||
|
|
||||||
|
|
|
@ -124,7 +124,7 @@ export class OperationModel implements IMenuItem {
|
||||||
// TODO: update getting pathInfo for overriding servers on path level
|
// TODO: update getting pathInfo for overriding servers on path level
|
||||||
this.servers = normalizeServers('', operationSpec.servers || operationSpec.pathServers || []);
|
this.servers = normalizeServers('', operationSpec.servers || operationSpec.pathServers || []);
|
||||||
} else {
|
} else {
|
||||||
this.operationHash = operationSpec.operationId && 'operation/' + operationSpec.operationId
|
this.operationHash = operationSpec.operationId && 'operation/' + operationSpec.operationId;
|
||||||
this.id =
|
this.id =
|
||||||
operationSpec.operationId !== undefined
|
operationSpec.operationId !== undefined
|
||||||
? (parent ? parent.id + '/' : '') + this.operationHash
|
? (parent ? parent.id + '/' : '') + this.operationHash
|
||||||
|
|
|
@ -141,7 +141,7 @@ const defaultTheme: ThemeInterface = {
|
||||||
groupItems: {
|
groupItems: {
|
||||||
activeBackgroundColor: theme => darken(0.1, theme.sidebar.backgroundColor),
|
activeBackgroundColor: theme => darken(0.1, theme.sidebar.backgroundColor),
|
||||||
activeTextColor: theme => theme.sidebar.activeTextColor,
|
activeTextColor: theme => theme.sidebar.activeTextColor,
|
||||||
textTransform: 'uppercase'
|
textTransform: 'uppercase',
|
||||||
},
|
},
|
||||||
level1Items: {
|
level1Items: {
|
||||||
activeBackgroundColor: theme => darken(0.05, theme.sidebar.backgroundColor),
|
activeBackgroundColor: theme => darken(0.05, theme.sidebar.backgroundColor),
|
||||||
|
|
Loading…
Reference in New Issue
Block a user