docusaurus-theme-openapi-docs 3.0.0-beta.7 → 3.0.0-beta.8
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/theme/ApiTabs/index.js +7 -5
- package/lib/theme/DiscriminatorTabs/index.js +7 -5
- package/lib/theme/MimeTabs/index.js +7 -5
- package/lib/theme/OperationTabs/index.js +7 -5
- package/lib/theme/SchemaTabs/index.js +7 -5
- package/package.json +3 -3
- package/src/theme/ApiTabs/index.tsx +9 -7
- package/src/theme/DiscriminatorTabs/index.tsx +7 -5
- package/src/theme/MimeTabs/index.tsx +7 -5
- package/src/theme/OperationTabs/index.tsx +7 -5
- package/src/theme/SchemaTabs/index.tsx +7 -5
|
@@ -108,11 +108,13 @@ function TabList({
|
|
|
108
108
|
(0, react_1.useEffect)(() => {
|
|
109
109
|
const resizeObserver = new ResizeObserver((entries) => {
|
|
110
110
|
for (let entry of entries) {
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
111
|
+
requestAnimationFrame(() => {
|
|
112
|
+
if (entry.target.clientWidth < entry.target.scrollWidth) {
|
|
113
|
+
setShowTabArrows(true);
|
|
114
|
+
} else {
|
|
115
|
+
setShowTabArrows(false);
|
|
116
|
+
}
|
|
117
|
+
});
|
|
116
118
|
}
|
|
117
119
|
});
|
|
118
120
|
resizeObserver.observe(tabItemListContainerRef.current);
|
|
@@ -100,11 +100,13 @@ function TabList({ className, block, selectedValue, selectValue, tabValues }) {
|
|
|
100
100
|
(0, react_1.useEffect)(() => {
|
|
101
101
|
const resizeObserver = new ResizeObserver((entries) => {
|
|
102
102
|
for (let entry of entries) {
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
103
|
+
requestAnimationFrame(() => {
|
|
104
|
+
if (entry.target.clientWidth < entry.target.scrollWidth) {
|
|
105
|
+
setShowTabArrows(true);
|
|
106
|
+
} else {
|
|
107
|
+
setShowTabArrows(false);
|
|
108
|
+
}
|
|
109
|
+
});
|
|
108
110
|
}
|
|
109
111
|
});
|
|
110
112
|
resizeObserver.observe(tabItemListContainerRef.current);
|
|
@@ -138,11 +138,13 @@ function TabList({
|
|
|
138
138
|
(0, react_1.useEffect)(() => {
|
|
139
139
|
const resizeObserver = new ResizeObserver((entries) => {
|
|
140
140
|
for (let entry of entries) {
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
141
|
+
requestAnimationFrame(() => {
|
|
142
|
+
if (entry.target.clientWidth < entry.target.scrollWidth) {
|
|
143
|
+
setShowTabArrows(true);
|
|
144
|
+
} else {
|
|
145
|
+
setShowTabArrows(false);
|
|
146
|
+
}
|
|
147
|
+
});
|
|
146
148
|
}
|
|
147
149
|
});
|
|
148
150
|
resizeObserver.observe(tabItemListContainerRef.current);
|
|
@@ -99,11 +99,13 @@ function TabList({ className, block, selectedValue, selectValue, tabValues }) {
|
|
|
99
99
|
(0, react_1.useEffect)(() => {
|
|
100
100
|
const resizeObserver = new ResizeObserver((entries) => {
|
|
101
101
|
for (let entry of entries) {
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
102
|
+
requestAnimationFrame(() => {
|
|
103
|
+
if (entry.target.clientWidth < entry.target.scrollWidth) {
|
|
104
|
+
setShowTabArrows(true);
|
|
105
|
+
} else {
|
|
106
|
+
setShowTabArrows(false);
|
|
107
|
+
}
|
|
108
|
+
});
|
|
107
109
|
}
|
|
108
110
|
});
|
|
109
111
|
resizeObserver.observe(tabItemListContainerRef.current);
|
|
@@ -100,11 +100,13 @@ function TabList({ className, block, selectedValue, selectValue, tabValues }) {
|
|
|
100
100
|
(0, react_1.useEffect)(() => {
|
|
101
101
|
const resizeObserver = new ResizeObserver((entries) => {
|
|
102
102
|
for (let entry of entries) {
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
103
|
+
requestAnimationFrame(() => {
|
|
104
|
+
if (entry.target.clientWidth < entry.target.scrollWidth) {
|
|
105
|
+
setShowTabArrows(true);
|
|
106
|
+
} else {
|
|
107
|
+
setShowTabArrows(false);
|
|
108
|
+
}
|
|
109
|
+
});
|
|
108
110
|
}
|
|
109
111
|
});
|
|
110
112
|
resizeObserver.observe(tabItemListContainerRef.current);
|
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": "3.0.0-beta.
|
|
4
|
+
"version": "3.0.0-beta.8",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"openapi",
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"clsx": "^1.1.1",
|
|
45
45
|
"copy-text-to-clipboard": "^3.1.0",
|
|
46
46
|
"crypto-js": "^4.1.1",
|
|
47
|
-
"docusaurus-plugin-openapi-docs": "^3.0.0-beta.
|
|
47
|
+
"docusaurus-plugin-openapi-docs": "^3.0.0-beta.8",
|
|
48
48
|
"docusaurus-plugin-sass": "^0.2.3",
|
|
49
49
|
"file-saver": "^2.0.5",
|
|
50
50
|
"lodash": "^4.17.20",
|
|
@@ -69,5 +69,5 @@
|
|
|
69
69
|
"engines": {
|
|
70
70
|
"node": ">=14"
|
|
71
71
|
},
|
|
72
|
-
"gitHead": "
|
|
72
|
+
"gitHead": "5877a91dbf3a6f75d4b13258fe5d1f578dd35637"
|
|
73
73
|
}
|
|
@@ -89,11 +89,13 @@ function TabList({
|
|
|
89
89
|
useEffect(() => {
|
|
90
90
|
const resizeObserver = new ResizeObserver((entries) => {
|
|
91
91
|
for (let entry of entries) {
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
92
|
+
requestAnimationFrame(() => {
|
|
93
|
+
if (entry.target.clientWidth < entry.target.scrollWidth) {
|
|
94
|
+
setShowTabArrows(true);
|
|
95
|
+
} else {
|
|
96
|
+
setShowTabArrows(false);
|
|
97
|
+
}
|
|
98
|
+
});
|
|
97
99
|
}
|
|
98
100
|
});
|
|
99
101
|
|
|
@@ -159,8 +161,8 @@ function TabList({
|
|
|
159
161
|
parseInt(value) >= 400
|
|
160
162
|
? "danger"
|
|
161
163
|
: parseInt(value) >= 200 && parseInt(value) < 300
|
|
162
|
-
|
|
163
|
-
|
|
164
|
+
? "success"
|
|
165
|
+
: "info",
|
|
164
166
|
{
|
|
165
167
|
active: selectedValue === value,
|
|
166
168
|
}
|
|
@@ -82,11 +82,13 @@ function TabList({
|
|
|
82
82
|
useEffect(() => {
|
|
83
83
|
const resizeObserver = new ResizeObserver((entries) => {
|
|
84
84
|
for (let entry of entries) {
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
85
|
+
requestAnimationFrame(() => {
|
|
86
|
+
if (entry.target.clientWidth < entry.target.scrollWidth) {
|
|
87
|
+
setShowTabArrows(true);
|
|
88
|
+
} else {
|
|
89
|
+
setShowTabArrows(false);
|
|
90
|
+
}
|
|
91
|
+
});
|
|
90
92
|
}
|
|
91
93
|
});
|
|
92
94
|
|
|
@@ -119,11 +119,13 @@ function TabList({
|
|
|
119
119
|
useEffect(() => {
|
|
120
120
|
const resizeObserver = new ResizeObserver((entries) => {
|
|
121
121
|
for (let entry of entries) {
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
122
|
+
requestAnimationFrame(() => {
|
|
123
|
+
if (entry.target.clientWidth < entry.target.scrollWidth) {
|
|
124
|
+
setShowTabArrows(true);
|
|
125
|
+
} else {
|
|
126
|
+
setShowTabArrows(false);
|
|
127
|
+
}
|
|
128
|
+
});
|
|
127
129
|
}
|
|
128
130
|
});
|
|
129
131
|
|
|
@@ -81,11 +81,13 @@ function TabList({
|
|
|
81
81
|
useEffect(() => {
|
|
82
82
|
const resizeObserver = new ResizeObserver((entries) => {
|
|
83
83
|
for (let entry of entries) {
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
84
|
+
requestAnimationFrame(() => {
|
|
85
|
+
if (entry.target.clientWidth < entry.target.scrollWidth) {
|
|
86
|
+
setShowTabArrows(true);
|
|
87
|
+
} else {
|
|
88
|
+
setShowTabArrows(false);
|
|
89
|
+
}
|
|
90
|
+
});
|
|
89
91
|
}
|
|
90
92
|
});
|
|
91
93
|
|
|
@@ -82,11 +82,13 @@ function TabList({
|
|
|
82
82
|
useEffect(() => {
|
|
83
83
|
const resizeObserver = new ResizeObserver((entries) => {
|
|
84
84
|
for (let entry of entries) {
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
85
|
+
requestAnimationFrame(() => {
|
|
86
|
+
if (entry.target.clientWidth < entry.target.scrollWidth) {
|
|
87
|
+
setShowTabArrows(true);
|
|
88
|
+
} else {
|
|
89
|
+
setShowTabArrows(false);
|
|
90
|
+
}
|
|
91
|
+
});
|
|
90
92
|
}
|
|
91
93
|
});
|
|
92
94
|
|