docusaurus-theme-openapi-docs 1.6.0 → 1.6.1
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/markdown/utils.js +1 -1
- package/lib/theme/ApiTabs/index.js +7 -8
- package/lib/theme/ApiTabs/styles.module.css +5 -6
- package/lib-next/markdown/utils.js +1 -1
- package/lib-next/theme/ApiTabs/index.js +7 -8
- package/lib-next/theme/ApiTabs/styles.module.css +5 -6
- package/package.json +3 -3
- package/src/markdown/utils.ts +1 -1
- package/src/theme/ApiTabs/index.js +7 -8
- package/src/theme/ApiTabs/styles.module.css +5 -6
package/lib/markdown/utils.js
CHANGED
|
@@ -188,12 +188,12 @@ function ApiTabsComponent(props) {
|
|
|
188
188
|
)}
|
|
189
189
|
>
|
|
190
190
|
{values.map(({ value, label, attributes }) => {
|
|
191
|
-
const
|
|
191
|
+
const responseStatusStyle =
|
|
192
192
|
parseInt(value) >= 400
|
|
193
|
-
? styles.
|
|
193
|
+
? styles.responseStatusDanger
|
|
194
194
|
: parseInt(value) >= 200 && parseInt(value) < 300
|
|
195
|
-
? styles.
|
|
196
|
-
: styles.
|
|
195
|
+
? styles.responseStatusSuccess
|
|
196
|
+
: styles.responseStatusInfo;
|
|
197
197
|
|
|
198
198
|
return (
|
|
199
199
|
<li
|
|
@@ -210,14 +210,13 @@ function ApiTabsComponent(props) {
|
|
|
210
210
|
"tabs__item",
|
|
211
211
|
styles.tabItem,
|
|
212
212
|
attributes?.className,
|
|
213
|
+
responseStatusStyle,
|
|
213
214
|
{
|
|
214
|
-
[styles.
|
|
215
|
+
[styles.active]: selectedValue === value,
|
|
215
216
|
}
|
|
216
217
|
)}
|
|
217
218
|
>
|
|
218
|
-
<div
|
|
219
|
-
className={clsx(styles.responseTabDot, responseTabDotStyle)}
|
|
220
|
-
/>
|
|
219
|
+
<div className={styles.responseTabDot} />
|
|
221
220
|
{label ?? value}
|
|
222
221
|
</li>
|
|
223
222
|
);
|
|
@@ -18,13 +18,12 @@
|
|
|
18
18
|
font-weight: var(--ifm-font-weight-normal);
|
|
19
19
|
}
|
|
20
20
|
|
|
21
|
-
.tabItem:not(.
|
|
21
|
+
.tabItem:not(.active) {
|
|
22
22
|
opacity: 0.65;
|
|
23
23
|
}
|
|
24
24
|
|
|
25
25
|
.tabItem:hover {
|
|
26
26
|
opacity: 1;
|
|
27
|
-
background-color: var(--ifm-color-emphasis-100);
|
|
28
27
|
}
|
|
29
28
|
|
|
30
29
|
.tabItem:last-child {
|
|
@@ -66,19 +65,19 @@
|
|
|
66
65
|
border-radius: 50%;
|
|
67
66
|
}
|
|
68
67
|
|
|
69
|
-
.
|
|
68
|
+
.responseStatusSuccess > .responseTabDot {
|
|
70
69
|
background-color: var(--ifm-color-success);
|
|
71
70
|
}
|
|
72
71
|
|
|
73
|
-
.
|
|
72
|
+
.responseStatusDanger > .responseTabDot {
|
|
74
73
|
background-color: var(--ifm-color-danger);
|
|
75
74
|
}
|
|
76
75
|
|
|
77
|
-
.
|
|
76
|
+
.responseStatusInfo > .responseTabDot {
|
|
78
77
|
background-color: var(--ifm-color-info);
|
|
79
78
|
}
|
|
80
79
|
|
|
81
|
-
.
|
|
80
|
+
.active {
|
|
82
81
|
background-color: var(--ifm-color-emphasis-100);
|
|
83
82
|
}
|
|
84
83
|
|
|
@@ -188,12 +188,12 @@ function ApiTabsComponent(props) {
|
|
|
188
188
|
)}
|
|
189
189
|
>
|
|
190
190
|
{values.map(({ value, label, attributes }) => {
|
|
191
|
-
const
|
|
191
|
+
const responseStatusStyle =
|
|
192
192
|
parseInt(value) >= 400
|
|
193
|
-
? styles.
|
|
193
|
+
? styles.responseStatusDanger
|
|
194
194
|
: parseInt(value) >= 200 && parseInt(value) < 300
|
|
195
|
-
? styles.
|
|
196
|
-
: styles.
|
|
195
|
+
? styles.responseStatusSuccess
|
|
196
|
+
: styles.responseStatusInfo;
|
|
197
197
|
|
|
198
198
|
return (
|
|
199
199
|
<li
|
|
@@ -210,14 +210,13 @@ function ApiTabsComponent(props) {
|
|
|
210
210
|
"tabs__item",
|
|
211
211
|
styles.tabItem,
|
|
212
212
|
attributes?.className,
|
|
213
|
+
responseStatusStyle,
|
|
213
214
|
{
|
|
214
|
-
[styles.
|
|
215
|
+
[styles.active]: selectedValue === value,
|
|
215
216
|
}
|
|
216
217
|
)}
|
|
217
218
|
>
|
|
218
|
-
<div
|
|
219
|
-
className={clsx(styles.responseTabDot, responseTabDotStyle)}
|
|
220
|
-
/>
|
|
219
|
+
<div className={styles.responseTabDot} />
|
|
221
220
|
{label ?? value}
|
|
222
221
|
</li>
|
|
223
222
|
);
|
|
@@ -18,13 +18,12 @@
|
|
|
18
18
|
font-weight: var(--ifm-font-weight-normal);
|
|
19
19
|
}
|
|
20
20
|
|
|
21
|
-
.tabItem:not(.
|
|
21
|
+
.tabItem:not(.active) {
|
|
22
22
|
opacity: 0.65;
|
|
23
23
|
}
|
|
24
24
|
|
|
25
25
|
.tabItem:hover {
|
|
26
26
|
opacity: 1;
|
|
27
|
-
background-color: var(--ifm-color-emphasis-100);
|
|
28
27
|
}
|
|
29
28
|
|
|
30
29
|
.tabItem:last-child {
|
|
@@ -66,19 +65,19 @@
|
|
|
66
65
|
border-radius: 50%;
|
|
67
66
|
}
|
|
68
67
|
|
|
69
|
-
.
|
|
68
|
+
.responseStatusSuccess > .responseTabDot {
|
|
70
69
|
background-color: var(--ifm-color-success);
|
|
71
70
|
}
|
|
72
71
|
|
|
73
|
-
.
|
|
72
|
+
.responseStatusDanger > .responseTabDot {
|
|
74
73
|
background-color: var(--ifm-color-danger);
|
|
75
74
|
}
|
|
76
75
|
|
|
77
|
-
.
|
|
76
|
+
.responseStatusInfo > .responseTabDot {
|
|
78
77
|
background-color: var(--ifm-color-info);
|
|
79
78
|
}
|
|
80
79
|
|
|
81
|
-
.
|
|
80
|
+
.active {
|
|
82
81
|
background-color: var(--ifm-color-emphasis-100);
|
|
83
82
|
}
|
|
84
83
|
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "docusaurus-theme-openapi-docs",
|
|
3
3
|
"description": "OpenAPI theme for Docusaurus.",
|
|
4
|
-
"version": "1.6.
|
|
4
|
+
"version": "1.6.1",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"openapi",
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
"buffer": "^6.0.3",
|
|
52
52
|
"clsx": "^1.1.1",
|
|
53
53
|
"crypto-js": "^4.1.1",
|
|
54
|
-
"docusaurus-plugin-openapi-docs": "^1.6.
|
|
54
|
+
"docusaurus-plugin-openapi-docs": "^1.6.1",
|
|
55
55
|
"file-saver": "^2.0.5",
|
|
56
56
|
"immer": "^9.0.7",
|
|
57
57
|
"lodash": "^4.17.20",
|
|
@@ -74,5 +74,5 @@
|
|
|
74
74
|
"engines": {
|
|
75
75
|
"node": ">=14"
|
|
76
76
|
},
|
|
77
|
-
"gitHead": "
|
|
77
|
+
"gitHead": "68f648d80d41b82a607215bac0a082f931f80b7c"
|
|
78
78
|
}
|
package/src/markdown/utils.ts
CHANGED
|
@@ -188,12 +188,12 @@ function ApiTabsComponent(props) {
|
|
|
188
188
|
)}
|
|
189
189
|
>
|
|
190
190
|
{values.map(({ value, label, attributes }) => {
|
|
191
|
-
const
|
|
191
|
+
const responseStatusStyle =
|
|
192
192
|
parseInt(value) >= 400
|
|
193
|
-
? styles.
|
|
193
|
+
? styles.responseStatusDanger
|
|
194
194
|
: parseInt(value) >= 200 && parseInt(value) < 300
|
|
195
|
-
? styles.
|
|
196
|
-
: styles.
|
|
195
|
+
? styles.responseStatusSuccess
|
|
196
|
+
: styles.responseStatusInfo;
|
|
197
197
|
|
|
198
198
|
return (
|
|
199
199
|
<li
|
|
@@ -210,14 +210,13 @@ function ApiTabsComponent(props) {
|
|
|
210
210
|
"tabs__item",
|
|
211
211
|
styles.tabItem,
|
|
212
212
|
attributes?.className,
|
|
213
|
+
responseStatusStyle,
|
|
213
214
|
{
|
|
214
|
-
[styles.
|
|
215
|
+
[styles.active]: selectedValue === value,
|
|
215
216
|
}
|
|
216
217
|
)}
|
|
217
218
|
>
|
|
218
|
-
<div
|
|
219
|
-
className={clsx(styles.responseTabDot, responseTabDotStyle)}
|
|
220
|
-
/>
|
|
219
|
+
<div className={styles.responseTabDot} />
|
|
221
220
|
{label ?? value}
|
|
222
221
|
</li>
|
|
223
222
|
);
|
|
@@ -18,13 +18,12 @@
|
|
|
18
18
|
font-weight: var(--ifm-font-weight-normal);
|
|
19
19
|
}
|
|
20
20
|
|
|
21
|
-
.tabItem:not(.
|
|
21
|
+
.tabItem:not(.active) {
|
|
22
22
|
opacity: 0.65;
|
|
23
23
|
}
|
|
24
24
|
|
|
25
25
|
.tabItem:hover {
|
|
26
26
|
opacity: 1;
|
|
27
|
-
background-color: var(--ifm-color-emphasis-100);
|
|
28
27
|
}
|
|
29
28
|
|
|
30
29
|
.tabItem:last-child {
|
|
@@ -66,19 +65,19 @@
|
|
|
66
65
|
border-radius: 50%;
|
|
67
66
|
}
|
|
68
67
|
|
|
69
|
-
.
|
|
68
|
+
.responseStatusSuccess > .responseTabDot {
|
|
70
69
|
background-color: var(--ifm-color-success);
|
|
71
70
|
}
|
|
72
71
|
|
|
73
|
-
.
|
|
72
|
+
.responseStatusDanger > .responseTabDot {
|
|
74
73
|
background-color: var(--ifm-color-danger);
|
|
75
74
|
}
|
|
76
75
|
|
|
77
|
-
.
|
|
76
|
+
.responseStatusInfo > .responseTabDot {
|
|
78
77
|
background-color: var(--ifm-color-info);
|
|
79
78
|
}
|
|
80
79
|
|
|
81
|
-
.
|
|
80
|
+
.active {
|
|
82
81
|
background-color: var(--ifm-color-emphasis-100);
|
|
83
82
|
}
|
|
84
83
|
|