docusaurus-theme-openapi-docs 0.0.0-beta.656 → 0.0.0-beta.657
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/ApiDemoPanel/ApiCodeBlock/Container/_Container.scss +1 -0
- package/lib/theme/ApiDemoPanel/ApiCodeBlock/Content/_Content.scss +2 -0
- package/lib/theme/ApiDemoPanel/ApiCodeBlock/ExpandButton/_ExpandButton.scss +20 -0
- package/lib/theme/ApiDemoPanel/ApiCodeBlock/ExpandButton/index.js +2 -17
- package/package.json +3 -3
- package/src/theme/ApiDemoPanel/ApiCodeBlock/Container/_Container.scss +1 -0
- package/src/theme/ApiDemoPanel/ApiCodeBlock/Content/_Content.scss +2 -0
- package/src/theme/ApiDemoPanel/ApiCodeBlock/ExpandButton/_ExpandButton.scss +20 -0
- package/src/theme/ApiDemoPanel/ApiCodeBlock/ExpandButton/index.js +2 -17
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
.openapi-demo__code-block-content {
|
|
2
|
+
height: 100%;
|
|
2
3
|
position: relative;
|
|
3
4
|
/* rtl:ignore */
|
|
4
5
|
direction: ltr;
|
|
@@ -15,6 +16,7 @@
|
|
|
15
16
|
}
|
|
16
17
|
|
|
17
18
|
.openapi-demo__code-block {
|
|
19
|
+
height: 100%;
|
|
18
20
|
border-radius: var(--ifm-global-radius);
|
|
19
21
|
--ifm-pre-background: var(--prism-background-color);
|
|
20
22
|
margin: 0;
|
|
@@ -1,3 +1,23 @@
|
|
|
1
|
+
.openapi-demo__expand-modal-content {
|
|
2
|
+
padding: none;
|
|
3
|
+
border: thin solid var(--ifm-toc-border-color);
|
|
4
|
+
border-radius: var(--ifm-global-radius);
|
|
5
|
+
max-width: 95%;
|
|
6
|
+
width: 65vw;
|
|
7
|
+
height: 65vh;
|
|
8
|
+
overflow: auto;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.openapi-demo__expand-modal-overlay {
|
|
12
|
+
display: flex;
|
|
13
|
+
align-items: center;
|
|
14
|
+
justify-content: center;
|
|
15
|
+
position: fixed;
|
|
16
|
+
inset: 0px;
|
|
17
|
+
background-color: rgba(0, 0, 0, 0.9);
|
|
18
|
+
z-index: 201;
|
|
19
|
+
}
|
|
20
|
+
|
|
1
21
|
.theme-code-block:hover .openapi-demo__code-block-expand-btn--copied {
|
|
2
22
|
opacity: 1 !important;
|
|
3
23
|
}
|
|
@@ -38,22 +38,6 @@ export default function ExpandButton({
|
|
|
38
38
|
|
|
39
39
|
const [modalIsOpen, setIsOpen] = React.useState(false);
|
|
40
40
|
|
|
41
|
-
const customStyles = {
|
|
42
|
-
overlay: { backgroundColor: "rgba(0, 0, 0, 0.9)", zIndex: "201" },
|
|
43
|
-
content: {
|
|
44
|
-
top: "50%",
|
|
45
|
-
left: "50%",
|
|
46
|
-
right: "auto",
|
|
47
|
-
bottom: "auto",
|
|
48
|
-
padding: "none",
|
|
49
|
-
border: "thin solid var(--ifm-toc-border-color)",
|
|
50
|
-
borderRadius: "var(--ifm-global-radius)",
|
|
51
|
-
transform: "translate(-50%, -50%)",
|
|
52
|
-
maxWidth: "95%",
|
|
53
|
-
width: "min-content",
|
|
54
|
-
overflow: "auto",
|
|
55
|
-
},
|
|
56
|
-
};
|
|
57
41
|
useEffect(() => {
|
|
58
42
|
Modal.setAppElement("body");
|
|
59
43
|
});
|
|
@@ -107,9 +91,10 @@ export default function ExpandButton({
|
|
|
107
91
|
</span>
|
|
108
92
|
</button>
|
|
109
93
|
<Modal
|
|
94
|
+
className="openapi-demo__expand-modal-content"
|
|
95
|
+
overlayClassName="openapi-demo__expand-modal-overlay"
|
|
110
96
|
isOpen={modalIsOpen}
|
|
111
97
|
onRequestClose={closeModal}
|
|
112
|
-
style={customStyles}
|
|
113
98
|
contentLabel="Code Snippet"
|
|
114
99
|
>
|
|
115
100
|
<Container
|
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": "0.0.0-beta.
|
|
4
|
+
"version": "0.0.0-beta.657",
|
|
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": "0.0.0-beta.
|
|
47
|
+
"docusaurus-plugin-openapi-docs": "0.0.0-beta.657",
|
|
48
48
|
"docusaurus-plugin-sass": "^0.2.3",
|
|
49
49
|
"file-saver": "^2.0.5",
|
|
50
50
|
"lodash": "^4.17.20",
|
|
@@ -68,5 +68,5 @@
|
|
|
68
68
|
"engines": {
|
|
69
69
|
"node": ">=14"
|
|
70
70
|
},
|
|
71
|
-
"gitHead": "
|
|
71
|
+
"gitHead": "8204108ee850afcc24228dbeff2fecfa9f289644"
|
|
72
72
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
.openapi-demo__code-block-content {
|
|
2
|
+
height: 100%;
|
|
2
3
|
position: relative;
|
|
3
4
|
/* rtl:ignore */
|
|
4
5
|
direction: ltr;
|
|
@@ -15,6 +16,7 @@
|
|
|
15
16
|
}
|
|
16
17
|
|
|
17
18
|
.openapi-demo__code-block {
|
|
19
|
+
height: 100%;
|
|
18
20
|
border-radius: var(--ifm-global-radius);
|
|
19
21
|
--ifm-pre-background: var(--prism-background-color);
|
|
20
22
|
margin: 0;
|
|
@@ -1,3 +1,23 @@
|
|
|
1
|
+
.openapi-demo__expand-modal-content {
|
|
2
|
+
padding: none;
|
|
3
|
+
border: thin solid var(--ifm-toc-border-color);
|
|
4
|
+
border-radius: var(--ifm-global-radius);
|
|
5
|
+
max-width: 95%;
|
|
6
|
+
width: 65vw;
|
|
7
|
+
height: 65vh;
|
|
8
|
+
overflow: auto;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.openapi-demo__expand-modal-overlay {
|
|
12
|
+
display: flex;
|
|
13
|
+
align-items: center;
|
|
14
|
+
justify-content: center;
|
|
15
|
+
position: fixed;
|
|
16
|
+
inset: 0px;
|
|
17
|
+
background-color: rgba(0, 0, 0, 0.9);
|
|
18
|
+
z-index: 201;
|
|
19
|
+
}
|
|
20
|
+
|
|
1
21
|
.theme-code-block:hover .openapi-demo__code-block-expand-btn--copied {
|
|
2
22
|
opacity: 1 !important;
|
|
3
23
|
}
|
|
@@ -38,22 +38,6 @@ export default function ExpandButton({
|
|
|
38
38
|
|
|
39
39
|
const [modalIsOpen, setIsOpen] = React.useState(false);
|
|
40
40
|
|
|
41
|
-
const customStyles = {
|
|
42
|
-
overlay: { backgroundColor: "rgba(0, 0, 0, 0.9)", zIndex: "201" },
|
|
43
|
-
content: {
|
|
44
|
-
top: "50%",
|
|
45
|
-
left: "50%",
|
|
46
|
-
right: "auto",
|
|
47
|
-
bottom: "auto",
|
|
48
|
-
padding: "none",
|
|
49
|
-
border: "thin solid var(--ifm-toc-border-color)",
|
|
50
|
-
borderRadius: "var(--ifm-global-radius)",
|
|
51
|
-
transform: "translate(-50%, -50%)",
|
|
52
|
-
maxWidth: "95%",
|
|
53
|
-
width: "min-content",
|
|
54
|
-
overflow: "auto",
|
|
55
|
-
},
|
|
56
|
-
};
|
|
57
41
|
useEffect(() => {
|
|
58
42
|
Modal.setAppElement("body");
|
|
59
43
|
});
|
|
@@ -107,9 +91,10 @@ export default function ExpandButton({
|
|
|
107
91
|
</span>
|
|
108
92
|
</button>
|
|
109
93
|
<Modal
|
|
94
|
+
className="openapi-demo__expand-modal-content"
|
|
95
|
+
overlayClassName="openapi-demo__expand-modal-overlay"
|
|
110
96
|
isOpen={modalIsOpen}
|
|
111
97
|
onRequestClose={closeModal}
|
|
112
|
-
style={customStyles}
|
|
113
98
|
contentLabel="Code Snippet"
|
|
114
99
|
>
|
|
115
100
|
<Container
|