redoc 2.0.0 → 2.1.0
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/CHANGELOG.md +32 -4
- package/README.md +23 -28
- package/bundles/{0a6ad30060afff00cb34.worker.js.LICENSE.txt → 756674defce81e90acea.worker.js.LICENSE.txt} +1 -1
- package/bundles/756674defce81e90acea.worker.js.map +1 -0
- package/bundles/redoc.browser.lib.js +211 -199
- package/bundles/redoc.browser.lib.js.LICENSE.txt +1 -1
- package/bundles/redoc.browser.lib.js.map +1 -1
- package/bundles/redoc.lib.js +211 -199
- package/bundles/redoc.lib.js.LICENSE.txt +1 -1
- package/bundles/redoc.lib.js.map +1 -1
- package/bundles/redoc.standalone.js +267 -253
- package/bundles/redoc.standalone.js.LICENSE.txt +1 -3
- package/bundles/redoc.standalone.js.map +1 -1
- package/package.json +23 -24
- package/typings/common-elements/fields.d.ts +6 -2
- package/typings/common-elements/panels.d.ts +0 -1
- package/typings/common-elements/samples.d.ts +3 -1
- package/typings/components/DropdownOrLabel/DropdownOrLabel.d.ts +1 -1
- package/typings/components/Endpoint/styled.elements.d.ts +1 -1
- package/typings/components/Markdown/Markdown.d.ts +1 -1
- package/typings/components/Parameters/Parameters.d.ts +1 -0
- package/typings/components/Responses/styled.elements.d.ts +3 -1
- package/typings/components/SchemaDefinition/SchemaDefinition.d.ts +1 -0
- package/typings/components/SideMenu/styled.elements.d.ts +2 -3
- package/typings/services/MenuBuilder.d.ts +5 -0
- package/typings/services/OpenAPIParser.d.ts +1 -1
- package/typings/services/models/RequestBody.d.ts +2 -2
- package/typings/services/models/Response.d.ts +1 -1
- package/typings/services/types.d.ts +8 -8
- package/typings/styled-components.d.ts +2 -5
- package/typings/theme.d.ts +4 -4
- package/typings/types/index.d.ts +1 -1
- package/typings/types/open-api.d.ts +5 -5
- package/typings/types/open-api.ts +1 -1
- package/bundles/0a6ad30060afff00cb34.worker.js.map +0 -1
- /package/typings/components/Fields/{FieldContstraints.d.ts → FieldConstraints.d.ts} +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "redoc",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.1.0",
|
|
4
4
|
"description": "ReDoc",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -44,15 +44,14 @@
|
|
|
44
44
|
"bundle:standalone": "webpack --env production --env standalone --mode=production",
|
|
45
45
|
"bundle:lib": "webpack --mode=production && npm run declarations",
|
|
46
46
|
"bundle:browser": "webpack --env production --env browser --mode=production",
|
|
47
|
-
"bundle": "npm run bundle:clean && npm run bundle:lib && npm run bundle:browser && npm run bundle:standalone
|
|
47
|
+
"bundle": "npm run bundle:clean && npm run bundle:lib && npm run bundle:browser && npm run bundle:standalone",
|
|
48
48
|
"declarations": "tsc --emitDeclarationOnly -p tsconfig.lib.json && cp -R src/types typings/",
|
|
49
49
|
"stats": "webpack --env production --env standalone --json --profile --mode=production > stats.json",
|
|
50
|
-
"prettier": "prettier --write \"
|
|
50
|
+
"prettier": "prettier --write \"src/**/*.{ts,tsx}\"",
|
|
51
51
|
"changelog": "conventional-changelog -p angular -i CHANGELOG.md -s -r 1",
|
|
52
52
|
"lint": "eslint --fix 'src/**/*.{js,ts,tsx}' --cache",
|
|
53
53
|
"benchmark": "node ./benchmark/benchmark.js",
|
|
54
54
|
"start:demo": "webpack serve --hot --config demo/webpack.config.ts --mode=development",
|
|
55
|
-
"compile:cli": "tsc custom.d.ts cli/index.ts --target es6 --module commonjs --types yargs",
|
|
56
55
|
"build:demo": "webpack --mode=production --config demo/webpack.config.ts",
|
|
57
56
|
"publish-cdn": "scripts/publish-cdn.sh",
|
|
58
57
|
"deploy:demo": "aws s3 sync demo/dist s3://production-redoc-demo --acl=public-read",
|
|
@@ -62,9 +61,9 @@
|
|
|
62
61
|
"pre-commit": "pretty-quick --staged && npm run lint"
|
|
63
62
|
},
|
|
64
63
|
"devDependencies": {
|
|
65
|
-
"@cypress/webpack-preprocessor": "^5.
|
|
64
|
+
"@cypress/webpack-preprocessor": "^5.17.1",
|
|
66
65
|
"@hot-loader/react-dom": "^17.0.2",
|
|
67
|
-
"@size-limit/preset-app": "^
|
|
66
|
+
"@size-limit/preset-app": "^8.2.6",
|
|
68
67
|
"@types/chai": "^4.2.18",
|
|
69
68
|
"@types/dompurify": "^2.2.2",
|
|
70
69
|
"@types/enzyme": "^3.10.5",
|
|
@@ -83,21 +82,21 @@
|
|
|
83
82
|
"@types/styled-components": "^5.1.1",
|
|
84
83
|
"@types/tapable": "^2.2.2",
|
|
85
84
|
"@types/webpack": "^5.28.0",
|
|
86
|
-
"@types/webpack-env": "^1.
|
|
85
|
+
"@types/webpack-env": "^1.18.0",
|
|
87
86
|
"@types/yargs": "^17.0.0",
|
|
88
87
|
"@typescript-eslint/eslint-plugin": "^4.26.0",
|
|
89
88
|
"@typescript-eslint/parser": "^4.26.0",
|
|
90
89
|
"@wojtekmaj/enzyme-adapter-react-17": "^0.6.1",
|
|
91
90
|
"beautify-benchmark": "^0.2.4",
|
|
92
|
-
"conventional-changelog-cli": "^
|
|
91
|
+
"conventional-changelog-cli": "^3.0.0",
|
|
93
92
|
"copy-webpack-plugin": "^9.0.0",
|
|
94
93
|
"core-js": "^3.13.1",
|
|
95
|
-
"coveralls": "^3.1.
|
|
94
|
+
"coveralls": "^3.1.1",
|
|
96
95
|
"css-loader": "^5.2.6",
|
|
97
|
-
"cypress": "^
|
|
96
|
+
"cypress": "^12.17.1",
|
|
98
97
|
"enzyme": "^3.11.0",
|
|
99
98
|
"enzyme-to-json": "^3.6.2",
|
|
100
|
-
"esbuild-loader": "^
|
|
99
|
+
"esbuild-loader": "^3.0.1",
|
|
101
100
|
"eslint": "^7.27.0",
|
|
102
101
|
"eslint-plugin-import": "^2.23.4",
|
|
103
102
|
"eslint-plugin-react": "^7.25.1",
|
|
@@ -119,29 +118,30 @@
|
|
|
119
118
|
"react-hot-loader": "^4.13.0",
|
|
120
119
|
"rimraf": "^3.0.2",
|
|
121
120
|
"shelljs": "^0.8.4",
|
|
122
|
-
"size-limit": "^
|
|
121
|
+
"size-limit": "^8.2.6",
|
|
122
|
+
"style-loader": "^3.3.1",
|
|
123
123
|
"styled-components": "^5.3.0",
|
|
124
124
|
"ts-jest": "^27.0.2",
|
|
125
|
-
"ts-
|
|
126
|
-
"ts-node": "^10.0.0",
|
|
125
|
+
"ts-node": "^10.9.1",
|
|
127
126
|
"tslib": "^2.4.0",
|
|
128
|
-
"typescript": "
|
|
127
|
+
"typescript": "^4.8.4",
|
|
129
128
|
"unfetch": "^4.2.0",
|
|
130
|
-
"
|
|
131
|
-
"webpack
|
|
132
|
-
"webpack-
|
|
129
|
+
"url": "^0.11.1",
|
|
130
|
+
"webpack": "^5.88.2",
|
|
131
|
+
"webpack-cli": "^5.1.4",
|
|
132
|
+
"webpack-dev-server": "^4.15.1",
|
|
133
133
|
"webpack-node-externals": "^3.0.0",
|
|
134
134
|
"workerize-loader": "github:redocly/workerize-loader#webpack-5-dist"
|
|
135
135
|
},
|
|
136
136
|
"peerDependencies": {
|
|
137
137
|
"core-js": "^3.1.4",
|
|
138
138
|
"mobx": "^6.0.4",
|
|
139
|
-
"react": "^16.8.4 || ^17.0.0",
|
|
140
|
-
"react-dom": "^16.8.4 || ^17.0.0",
|
|
141
|
-
"styled-components": "^4.1.1 || ^5.1.1"
|
|
139
|
+
"react": "^16.8.4 || ^17.0.0 || ^18.0.0",
|
|
140
|
+
"react-dom": "^16.8.4 || ^17.0.0 || ^18.0.0",
|
|
141
|
+
"styled-components": "^4.1.1 || ^5.1.1 || ^6.0.5"
|
|
142
142
|
},
|
|
143
143
|
"dependencies": {
|
|
144
|
-
"@redocly/openapi-core": "^1.0.0-
|
|
144
|
+
"@redocly/openapi-core": "^1.0.0-rc.2",
|
|
145
145
|
"classnames": "^2.3.1",
|
|
146
146
|
"decko": "^1.2.0",
|
|
147
147
|
"dompurify": "^2.2.8",
|
|
@@ -151,7 +151,7 @@
|
|
|
151
151
|
"mark.js": "^8.11.1",
|
|
152
152
|
"marked": "^4.0.15",
|
|
153
153
|
"mobx-react": "^7.2.0",
|
|
154
|
-
"openapi-sampler": "^1.3.
|
|
154
|
+
"openapi-sampler": "^1.3.1",
|
|
155
155
|
"path-browserify": "^1.0.1",
|
|
156
156
|
"perfect-scrollbar": "^1.5.5",
|
|
157
157
|
"polished": "^4.1.3",
|
|
@@ -160,7 +160,6 @@
|
|
|
160
160
|
"react-tabs": "^3.2.2",
|
|
161
161
|
"slugify": "~1.4.7",
|
|
162
162
|
"stickyfill": "^1.1.1",
|
|
163
|
-
"style-loader": "^3.3.1",
|
|
164
163
|
"swagger2openapi": "^7.0.6",
|
|
165
164
|
"url-template": "^2.0.8"
|
|
166
165
|
},
|
|
@@ -6,8 +6,12 @@ export declare const TypePrefix: import("styled-components").StyledComponent<"sp
|
|
|
6
6
|
export declare const TypeName: import("styled-components").StyledComponent<"span", import("../theme").ResolvedThemeInterface, {}, never>;
|
|
7
7
|
export declare const TypeTitle: import("styled-components").StyledComponent<"span", import("../theme").ResolvedThemeInterface, {}, never>;
|
|
8
8
|
export declare const TypeFormat: import("styled-components").StyledComponent<"span", import("../theme").ResolvedThemeInterface, {}, never>;
|
|
9
|
-
export declare const RequiredLabel: import("styled-components").StyledComponent<"
|
|
10
|
-
|
|
9
|
+
export declare const RequiredLabel: import("styled-components").StyledComponent<"span", import("../theme").ResolvedThemeInterface, {
|
|
10
|
+
as: string;
|
|
11
|
+
}, "as">;
|
|
12
|
+
export declare const PropertyLabel: import("styled-components").StyledComponent<"span", import("../theme").ResolvedThemeInterface, {
|
|
13
|
+
as: string;
|
|
14
|
+
}, "as">;
|
|
11
15
|
export declare const RecursiveLabel: import("styled-components").StyledComponent<"span", import("../theme").ResolvedThemeInterface, {}, never>;
|
|
12
16
|
export declare const PatternLabel: import("styled-components").StyledComponent<"span", import("../theme").ResolvedThemeInterface, {}, never>;
|
|
13
17
|
export declare const ExampleValue: import("styled-components").StyledComponent<"span", import("../theme").ResolvedThemeInterface, {}, never>;
|
|
@@ -1,3 +1,5 @@
|
|
|
1
1
|
export declare const SampleControls: import("styled-components").StyledComponent<"div", import("../theme").ResolvedThemeInterface, {}, never>;
|
|
2
2
|
export declare const SampleControlsWrap: import("styled-components").StyledComponent<"div", import("../theme").ResolvedThemeInterface, {}, never>;
|
|
3
|
-
export declare const StyledPre: import("styled-components").StyledComponent<"
|
|
3
|
+
export declare const StyledPre: import("styled-components").StyledComponent<"div", import("../theme").ResolvedThemeInterface, {
|
|
4
|
+
as: string;
|
|
5
|
+
}, "as">;
|
|
@@ -2,7 +2,7 @@ import * as React from 'react';
|
|
|
2
2
|
import { StyledComponent } from 'styled-components';
|
|
3
3
|
import { DropdownProps } from '../../common-elements/Dropdown';
|
|
4
4
|
export interface DropdownOrLabelProps extends DropdownProps {
|
|
5
|
-
Label?: StyledComponent<any, any,
|
|
5
|
+
Label?: StyledComponent<any, any, Record<string, any>, never>;
|
|
6
6
|
Dropdown?: StyledComponent<React.NamedExoticComponent<DropdownProps>, any, {
|
|
7
7
|
fullWidth?: boolean | undefined;
|
|
8
8
|
}, never>;
|
|
@@ -5,7 +5,7 @@ export declare const EndpointInfo: import("styled-components").StyledComponent<"
|
|
|
5
5
|
inverted?: boolean | undefined;
|
|
6
6
|
}, never>;
|
|
7
7
|
export declare const HttpVerb: import("styled-components").StyledComponent<"span", import("../../theme").ResolvedThemeInterface, {
|
|
8
|
-
className: string
|
|
8
|
+
className: `http-verb ${string}`;
|
|
9
9
|
} & {
|
|
10
10
|
type: string;
|
|
11
11
|
compact?: boolean | undefined;
|
|
@@ -7,7 +7,7 @@ export interface BaseMarkdownProps {
|
|
|
7
7
|
sanitize?: boolean;
|
|
8
8
|
source: string;
|
|
9
9
|
}
|
|
10
|
-
export
|
|
10
|
+
export type MarkdownProps = BaseMarkdownProps & StylingMarkdownProps & {
|
|
11
11
|
source: string;
|
|
12
12
|
className?: string;
|
|
13
13
|
'data-role'?: string;
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
export declare const StyledResponseTitle: import("styled-components").StyledComponent<import("react").NamedExoticComponent<import("./ResponseTitle").ResponseTitleProps>, import("../../theme").ResolvedThemeInterface, {}, never>;
|
|
3
3
|
export declare const ResponseDetailsWrap: import("styled-components").StyledComponent<"div", import("../../theme").ResolvedThemeInterface, {}, never>;
|
|
4
|
-
export declare const HeadersCaption: import("styled-components").StyledComponent<"
|
|
4
|
+
export declare const HeadersCaption: import("styled-components").StyledComponent<"h5", import("../../theme").ResolvedThemeInterface, {
|
|
5
|
+
as: string;
|
|
6
|
+
}, "as">;
|
|
5
7
|
export declare const Code: import("styled-components").StyledComponent<"strong", import("../../theme").ResolvedThemeInterface, {}, never>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ResolvedThemeInterface } from '../../styled-components';
|
|
2
2
|
export declare const OperationBadge: import("styled-components").StyledComponent<"span", ResolvedThemeInterface, {
|
|
3
|
-
className: string
|
|
3
|
+
className: `operation-type ${string}`;
|
|
4
4
|
} & {
|
|
5
5
|
type: string;
|
|
6
6
|
}, "className">;
|
|
@@ -21,9 +21,8 @@ export interface MenuItemLabelType {
|
|
|
21
21
|
type?: string;
|
|
22
22
|
}
|
|
23
23
|
export declare const MenuItemLabel: import("styled-components").StyledComponent<"label", ResolvedThemeInterface, {
|
|
24
|
-
role: "menuitem";
|
|
25
24
|
className: string;
|
|
26
|
-
} & MenuItemLabelType, "className"
|
|
25
|
+
} & MenuItemLabelType, "className">;
|
|
27
26
|
export declare const MenuItemTitle: import("styled-components").StyledComponent<"span", ResolvedThemeInterface, {
|
|
28
27
|
width?: string | undefined;
|
|
29
28
|
}, never>;
|
|
@@ -41,4 +41,9 @@ export declare class MenuBuilder {
|
|
|
41
41
|
* collects tags and maps each tag to list of operations belonging to this tag
|
|
42
42
|
*/
|
|
43
43
|
static getTagsWithOperations(parser: OpenAPIParser, spec: OpenAPISpec): TagsInfoMap;
|
|
44
|
+
static getTagRelatedSchema({ parser, tag, parent, }: {
|
|
45
|
+
parser: OpenAPIParser;
|
|
46
|
+
tag: TagInfo;
|
|
47
|
+
parent: GroupModel;
|
|
48
|
+
}): GroupModel[];
|
|
44
49
|
}
|
|
@@ -12,7 +12,7 @@ export declare class OpenAPIParser {
|
|
|
12
12
|
spec: OpenAPISpec;
|
|
13
13
|
private readonly allowMergeRefs;
|
|
14
14
|
constructor(spec: OpenAPISpec, specUrl?: string, options?: RedocNormalizedOptions);
|
|
15
|
-
validate(spec:
|
|
15
|
+
validate(spec: Record<string, any>): void;
|
|
16
16
|
/**
|
|
17
17
|
* get spec part by JsonPointer ($ref)
|
|
18
18
|
*/
|
|
@@ -2,7 +2,7 @@ import type { OpenAPIRequestBody, Referenced } from '../../types';
|
|
|
2
2
|
import type { OpenAPIParser } from '../OpenAPIParser';
|
|
3
3
|
import type { RedocNormalizedOptions } from '../RedocNormalizedOptions';
|
|
4
4
|
import { MediaContentModel } from './MediaContent';
|
|
5
|
-
|
|
5
|
+
type RequestBodyProps = {
|
|
6
6
|
parser: OpenAPIParser;
|
|
7
7
|
infoOrRef: Referenced<OpenAPIRequestBody>;
|
|
8
8
|
options: RedocNormalizedOptions;
|
|
@@ -10,7 +10,7 @@ declare type RequestBodyProps = {
|
|
|
10
10
|
};
|
|
11
11
|
export declare class RequestBodyModel {
|
|
12
12
|
description: string;
|
|
13
|
-
required
|
|
13
|
+
required?: boolean;
|
|
14
14
|
content?: MediaContentModel;
|
|
15
15
|
constructor({ parser, infoOrRef, options, isEvent }: RequestBodyProps);
|
|
16
16
|
}
|
|
@@ -3,7 +3,7 @@ import type { OpenAPIParser } from '../OpenAPIParser';
|
|
|
3
3
|
import type { RedocNormalizedOptions } from '../RedocNormalizedOptions';
|
|
4
4
|
import { FieldModel } from './Field';
|
|
5
5
|
import { MediaContentModel } from './MediaContent';
|
|
6
|
-
|
|
6
|
+
type ResponseProps = {
|
|
7
7
|
parser: OpenAPIParser;
|
|
8
8
|
code: string;
|
|
9
9
|
defaultAsError: boolean;
|
|
@@ -35,7 +35,7 @@ export interface LabelsConfig {
|
|
|
35
35
|
requestSamples: string;
|
|
36
36
|
responseSamples: string;
|
|
37
37
|
}
|
|
38
|
-
export
|
|
38
|
+
export type LabelsConfigRaw = Partial<LabelsConfig>;
|
|
39
39
|
export interface MDXComponentMeta {
|
|
40
40
|
component: React.ComponentType;
|
|
41
41
|
propsSelector: (store?: AppStore) => any;
|
|
@@ -48,12 +48,12 @@ export interface MarkdownHeading {
|
|
|
48
48
|
items?: MarkdownHeading[];
|
|
49
49
|
description?: string;
|
|
50
50
|
}
|
|
51
|
-
export
|
|
52
|
-
export
|
|
51
|
+
export type ContentItemModel = GroupModel | OperationModel;
|
|
52
|
+
export type TagInfo = OpenAPITag & {
|
|
53
53
|
operations: ExtendedOpenAPIOperation[];
|
|
54
54
|
used?: boolean;
|
|
55
55
|
};
|
|
56
|
-
export
|
|
56
|
+
export type ExtendedOpenAPIOperation = {
|
|
57
57
|
pointer: string;
|
|
58
58
|
pathName: string;
|
|
59
59
|
httpVerb: string;
|
|
@@ -61,13 +61,13 @@ export declare type ExtendedOpenAPIOperation = {
|
|
|
61
61
|
pathServers: Array<OpenAPIServer> | undefined;
|
|
62
62
|
isWebhook: boolean;
|
|
63
63
|
} & OpenAPIOperation;
|
|
64
|
-
export
|
|
64
|
+
export type TagsInfoMap = Record<string, TagInfo>;
|
|
65
65
|
export interface TagGroup {
|
|
66
66
|
name: string;
|
|
67
67
|
tags: string[];
|
|
68
68
|
}
|
|
69
|
-
export
|
|
70
|
-
export
|
|
69
|
+
export type MenuItemGroupType = 'group' | 'tag' | 'section' | 'schema';
|
|
70
|
+
export type MenuItemType = MenuItemGroupType | 'operation';
|
|
71
71
|
export interface IMenuItem {
|
|
72
72
|
id: string;
|
|
73
73
|
absoluteIdx?: number;
|
|
@@ -100,7 +100,7 @@ export declare enum SideNavStyleEnum {
|
|
|
100
100
|
PathOnly = "path-only",
|
|
101
101
|
IdOnly = "id-only"
|
|
102
102
|
}
|
|
103
|
-
export
|
|
103
|
+
export type MergedOpenAPISchema = OpenAPISchema & {
|
|
104
104
|
'x-refsStack'?: string[];
|
|
105
105
|
'x-parentRefs'?: string[];
|
|
106
106
|
'x-circular-ref'?: boolean;
|
|
@@ -1,12 +1,9 @@
|
|
|
1
1
|
import * as styledComponents from 'styled-components';
|
|
2
2
|
import type { ResolvedThemeInterface } from './theme';
|
|
3
3
|
export type { ResolvedThemeInterface };
|
|
4
|
-
declare const styled: styledComponents.ThemedStyledInterface<ResolvedThemeInterface>, css: styledComponents.ThemedCssFunction<ResolvedThemeInterface>, createGlobalStyle: <P extends object = {}>(first: TemplateStringsArray | styledComponents.CSSObject | styledComponents.InterpolationFunction<styledComponents.ThemedStyledProps<P, ResolvedThemeInterface>>, ...interpolations: styledComponents.Interpolation<styledComponents.ThemedStyledProps<P, ResolvedThemeInterface>>[]) => styledComponents.GlobalStyleComponent<P, ResolvedThemeInterface>, keyframes:
|
|
5
|
-
(strings: TemplateStringsArray | styledComponents.CSSKeyframes, ...interpolations: styledComponents.SimpleInterpolation[]): styledComponents.Keyframes;
|
|
6
|
-
(strings: string[] | TemplateStringsArray, ...interpolations: styledComponents.SimpleInterpolation[]): styledComponents.Keyframes;
|
|
7
|
-
}, ThemeProvider: styledComponents.BaseThemeProviderComponent<ResolvedThemeInterface, ResolvedThemeInterface>;
|
|
4
|
+
declare const styled: styledComponents.ThemedStyledInterface<ResolvedThemeInterface>, css: styledComponents.ThemedCssFunction<ResolvedThemeInterface>, createGlobalStyle: <P extends object = {}>(first: TemplateStringsArray | styledComponents.CSSObject | styledComponents.InterpolationFunction<styledComponents.ThemedStyledProps<P, ResolvedThemeInterface>>, ...interpolations: styledComponents.Interpolation<styledComponents.ThemedStyledProps<P, ResolvedThemeInterface>>[]) => styledComponents.GlobalStyleComponent<P, ResolvedThemeInterface>, keyframes: (strings: TemplateStringsArray | styledComponents.CSSKeyframes, ...interpolations: styledComponents.SimpleInterpolation[]) => styledComponents.Keyframes, ThemeProvider: styledComponents.BaseThemeProviderComponent<ResolvedThemeInterface, ResolvedThemeInterface>;
|
|
8
5
|
export declare const media: {
|
|
9
|
-
lessThan(breakpoint: any, print?: boolean
|
|
6
|
+
lessThan(breakpoint: any, print?: boolean, extra?: string): (...args: any[]) => styledComponents.FlattenInterpolation<styledComponents.ThemedStyledProps<object, ResolvedThemeInterface>>;
|
|
10
7
|
greaterThan(breakpoint: any): (...args: any[]) => styledComponents.FlattenInterpolation<styledComponents.ThemedStyledProps<object, ResolvedThemeInterface>>;
|
|
11
8
|
between(firstBreakpoint: any, secondBreakpoint: any): (...args: any[]) => styledComponents.FlattenInterpolation<styledComponents.ThemedStyledProps<object, ResolvedThemeInterface>>;
|
|
12
9
|
};
|
package/typings/theme.d.ts
CHANGED
|
@@ -155,9 +155,9 @@ export interface ResolvedThemeInterface {
|
|
|
155
155
|
};
|
|
156
156
|
extensionsHook?: (name: string, props: any) => string;
|
|
157
157
|
}
|
|
158
|
-
export
|
|
159
|
-
export
|
|
160
|
-
export
|
|
158
|
+
export type primitive = string | number | boolean | undefined | null;
|
|
159
|
+
export type AdvancedThemeDeep<T> = T extends primitive ? T | ((theme: ResolvedThemeInterface) => T) : AdvancedThemeObject<T>;
|
|
160
|
+
export type AdvancedThemeObject<T> = {
|
|
161
161
|
[P in keyof T]?: AdvancedThemeDeep<T[P]>;
|
|
162
162
|
};
|
|
163
|
-
export
|
|
163
|
+
export type ThemeInterface = AdvancedThemeObject<ResolvedThemeInterface>;
|
package/typings/types/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export * from './open-api';
|
|
2
|
-
export
|
|
2
|
+
export type Omit<T, K extends keyof T> = Pick<T, Exclude<keyof T, K>>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Omit } from './index';
|
|
1
|
+
import type { Omit } from './index';
|
|
2
2
|
export interface OpenAPISpec {
|
|
3
3
|
openapi: string;
|
|
4
4
|
info: OpenAPIInfo;
|
|
@@ -41,7 +41,7 @@ export interface OpenAPIRef {
|
|
|
41
41
|
summary?: string;
|
|
42
42
|
description?: string;
|
|
43
43
|
}
|
|
44
|
-
export
|
|
44
|
+
export type Referenced<T> = OpenAPIRef | T;
|
|
45
45
|
export interface OpenAPIPath {
|
|
46
46
|
summary?: string;
|
|
47
47
|
description?: string;
|
|
@@ -185,8 +185,8 @@ export interface OpenAPIEncoding {
|
|
|
185
185
|
explode: boolean;
|
|
186
186
|
allowReserved: boolean;
|
|
187
187
|
}
|
|
188
|
-
export
|
|
189
|
-
export
|
|
188
|
+
export type OpenAPIParameterLocation = 'query' | 'header' | 'path' | 'cookie';
|
|
189
|
+
export type OpenAPIParameterStyle = 'matrix' | 'label' | 'form' | 'simple' | 'spaceDelimited' | 'pipeDelimited' | 'deepObject';
|
|
190
190
|
export interface OpenAPIRequestBody {
|
|
191
191
|
description?: string;
|
|
192
192
|
required?: boolean;
|
|
@@ -219,7 +219,7 @@ export interface OpenAPIResponse extends Pick<OpenAPIRequestBody, 'description'
|
|
|
219
219
|
export interface OpenAPILink {
|
|
220
220
|
$ref?: string;
|
|
221
221
|
}
|
|
222
|
-
export
|
|
222
|
+
export type OpenAPIHeader = Omit<OpenAPIParameter, 'in' | 'name'>;
|
|
223
223
|
export interface OpenAPICallback {
|
|
224
224
|
[name: string]: OpenAPIPath;
|
|
225
225
|
}
|