docusaurus-theme-openapi-docs 3.0.0-beta.8 → 3.0.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.
Files changed (50) hide show
  1. package/lib/theme/ApiExplorer/Body/slice.d.ts +8 -8
  2. package/lib/theme/ApiExplorer/CodeSnippets/index.d.ts +1 -1
  3. package/lib/theme/ApiExplorer/CodeSnippets/index.js +16 -10
  4. package/lib/theme/ApiExplorer/CodeSnippets/languages.d.ts +1 -0
  5. package/lib/theme/ApiExplorer/CodeSnippets/languages.js +29 -2
  6. package/lib/theme/ApiExplorer/Request/index.js +1 -3
  7. package/lib/theme/ApiExplorer/Request/makeRequest.d.ts +1 -1
  8. package/lib/theme/ApiExplorer/Response/index.js +4 -1
  9. package/lib/theme/ApiExplorer/buildPostmanRequest.d.ts +1 -1
  10. package/lib/theme/ApiExplorer/buildPostmanRequest.js +1 -3
  11. package/lib/theme/ApiExplorer/index.js +1 -3
  12. package/lib/theme/ApiExplorer/persistanceMiddleware.js +6 -6
  13. package/lib/theme/ApiItem/Layout/index.js +19 -6
  14. package/lib/theme/ApiItem/index.js +6 -4
  15. package/lib/theme/ApiTabs/_ApiTabs.scss +1 -0
  16. package/lib/theme/DiscriminatorTabs/_DiscriminatorTabs.scss +1 -0
  17. package/lib/theme/MimeTabs/_MimeTabs.scss +1 -0
  18. package/lib/theme/MimeTabs/index.js +2 -2
  19. package/lib/theme/OperationTabs/_OperationTabs.scss +1 -0
  20. package/lib/theme/SchemaTabs/_SchemaTabs.scss +1 -0
  21. package/lib/theme/SchemaTabs/index.js +10 -4
  22. package/lib/theme/styles.scss +15 -15
  23. package/package.json +5 -5
  24. package/src/postman-code-generators.d.ts +1 -1
  25. package/src/theme/ApiExplorer/CodeSnippets/index.tsx +17 -11
  26. package/src/theme/ApiExplorer/CodeSnippets/languages.ts +22 -0
  27. package/src/theme/ApiExplorer/Request/index.tsx +1 -1
  28. package/src/theme/ApiExplorer/Request/makeRequest.ts +1 -1
  29. package/src/theme/ApiExplorer/Response/index.tsx +4 -1
  30. package/src/theme/ApiExplorer/buildPostmanRequest.ts +1 -1
  31. package/src/theme/ApiExplorer/index.tsx +1 -1
  32. package/src/theme/ApiExplorer/persistanceMiddleware.ts +6 -6
  33. package/src/theme/ApiExplorer/postman-collection.d.ts +1 -1
  34. package/src/theme/ApiItem/Layout/index.tsx +8 -4
  35. package/src/theme/ApiItem/index.tsx +6 -5
  36. package/src/theme/ApiTabs/_ApiTabs.scss +1 -0
  37. package/src/theme/ApiTabs/index.tsx +2 -2
  38. package/src/theme/DiscriminatorTabs/_DiscriminatorTabs.scss +1 -0
  39. package/src/theme/MimeTabs/_MimeTabs.scss +1 -0
  40. package/src/theme/MimeTabs/index.tsx +1 -1
  41. package/src/theme/OperationTabs/_OperationTabs.scss +1 -0
  42. package/src/theme/SchemaTabs/_SchemaTabs.scss +1 -0
  43. package/src/theme/SchemaTabs/index.tsx +12 -5
  44. package/src/theme/styles.scss +15 -15
  45. package/src/theme-openapi.d.ts +1 -0
  46. package/lib/theme/ApiDemoPanel/ApiCodeBlock/ExpandButton/index.d.ts +0 -13
  47. package/lib/theme/ApiDemoPanel/ApiCodeBlock/ExpandButton/index.js +0 -240
  48. package/lib/theme/ApiDemoPanel/ApiCodeBlock/Line/_Line.scss +0 -46
  49. package/src/theme/ApiDemoPanel/ApiCodeBlock/ExpandButton/index.tsx +0 -178
  50. package/src/theme/ApiDemoPanel/ApiCodeBlock/Line/_Line.scss +0 -46
@@ -88,7 +88,10 @@ function Response({ item }: { item: NonNullable<ApiItem> }) {
88
88
  </div>
89
89
  <div
90
90
  style={{
91
- backgroundColor: prismTheme.plain.backgroundColor,
91
+ backgroundColor:
92
+ code && prettyResponse !== "Fetching..."
93
+ ? prismTheme.plain.backgroundColor
94
+ : "transparent",
92
95
  paddingLeft: "1rem",
93
96
  paddingTop: "1rem",
94
97
  ...((prettyResponse === "Fetching..." || !code) && {
@@ -5,7 +5,6 @@
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  * ========================================================================== */
7
7
 
8
- import sdk from "@paloaltonetworks/postman-collection";
9
8
  import { AuthState, Scheme } from "@theme/ApiExplorer/Authorization/slice";
10
9
  import { Body, Content } from "@theme/ApiExplorer/Body/slice";
11
10
  import {
@@ -13,6 +12,7 @@ import {
13
12
  ServerObject,
14
13
  } from "docusaurus-plugin-openapi-docs/src/openapi/types";
15
14
  import cloneDeep from "lodash/cloneDeep";
15
+ import sdk from "postman-collection";
16
16
 
17
17
  type Param = {
18
18
  value?: string | string[];
@@ -7,11 +7,11 @@
7
7
 
8
8
  import React from "react";
9
9
 
10
- import sdk from "@paloaltonetworks/postman-collection";
11
10
  import CodeSnippets from "@theme/ApiExplorer/CodeSnippets";
12
11
  import Request from "@theme/ApiExplorer/Request";
13
12
  import Response from "@theme/ApiExplorer/Response";
14
13
  import { ApiItem } from "docusaurus-plugin-openapi-docs/src/types";
14
+ import sdk from "postman-collection";
15
15
 
16
16
  function ApiExplorer({
17
17
  item,
@@ -45,13 +45,13 @@ export function createPersistanceMiddleware(options: ThemeConfig["api"]) {
45
45
  }
46
46
 
47
47
  // TODO: determine way to rehydrate without flashing
48
- // if (action.type === "contentType/setContentType") {
49
- // storage.setItem("contentType", action.payload);
50
- // }
48
+ if (action.type === "contentType/setContentType") {
49
+ storage.setItem("contentType", action.payload);
50
+ }
51
51
 
52
- // if (action.type === "accept/setAccept") {
53
- // storage.setItem("accept", action.payload);
54
- // }
52
+ if (action.type === "accept/setAccept") {
53
+ storage.setItem("accept", action.payload);
54
+ }
55
55
 
56
56
  if (action.type === "server/setServer") {
57
57
  storage.setItem("server", action.payload);
@@ -5,6 +5,6 @@
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  * ========================================================================== */
7
7
 
8
- declare module "@paloaltonetworks/postman-collection" {
8
+ declare module "postman-collection" {
9
9
  export = Request.sdk;
10
10
  }
@@ -65,12 +65,16 @@ export default function DocItemLayout({ children }: Props): JSX.Element {
65
65
  <DocVersionBadge />
66
66
  {docTOC.mobile}
67
67
  <DocItemContent>{children}</DocItemContent>
68
- <div className={clsx("col", api ? "col--7" : "col--12")}>
69
- <DocItemFooter />
68
+ <div className="row">
69
+ <div className={clsx("col", api ? "col--7" : "col--12")}>
70
+ <DocItemFooter />
71
+ </div>
70
72
  </div>
71
73
  </article>
72
- <div className={clsx("col", api ? "col--7" : "col--12")}>
73
- <DocItemPaginator />
74
+ <div className="row">
75
+ <div className={clsx("col", api ? "col--7" : "col--12")}>
76
+ <DocItemPaginator />
77
+ </div>
74
78
  </div>
75
79
  </div>
76
80
  </div>
@@ -56,11 +56,12 @@ export default function ApiItem(props: Props): JSX.Element {
56
56
  const { schema } = frontMatter as SchemaFrontMatter;
57
57
  // decompress and parse
58
58
  if (api) {
59
- api = JSON.parse(
60
- zlib.inflateSync(Buffer.from(api as any, "base64")).toString()
61
- );
59
+ try {
60
+ api = JSON.parse(
61
+ zlib.inflateSync(Buffer.from(api as any, "base64")).toString()
62
+ );
63
+ } catch {}
62
64
  }
63
-
64
65
  const { siteConfig } = useDocusaurusContext();
65
66
  const themeConfig = siteConfig.themeConfig as ThemeConfig;
66
67
  const options = themeConfig.api;
@@ -187,7 +188,7 @@ export default function ApiItem(props: Props): JSX.Element {
187
188
  <DocItemMetadata />
188
189
  <DocItemLayout>
189
190
  <div className="row">
190
- <div className="col col--12">
191
+ <div className="col col--12 markdown">
191
192
  <MDXComponent />
192
193
  </div>
193
194
  </div>
@@ -87,6 +87,7 @@
87
87
  overflow-y: hidden;
88
88
  overflow-x: scroll;
89
89
  scroll-behavior: smooth;
90
+ scrollbar-width: none;
90
91
  }
91
92
 
92
93
  .openapi-tabs__response-list-container::-webkit-scrollbar {
@@ -161,8 +161,8 @@ function TabList({
161
161
  parseInt(value) >= 400
162
162
  ? "danger"
163
163
  : parseInt(value) >= 200 && parseInt(value) < 300
164
- ? "success"
165
- : "info",
164
+ ? "success"
165
+ : "info",
166
166
  {
167
167
  active: selectedValue === value,
168
168
  }
@@ -59,6 +59,7 @@
59
59
  overflow-y: hidden;
60
60
  overflow-x: scroll;
61
61
  scroll-behavior: smooth;
62
+ scrollbar-width: none;
62
63
  }
63
64
 
64
65
  .openapi-tabs__discriminator-list-container::-webkit-scrollbar {
@@ -45,6 +45,7 @@
45
45
  overflow-y: hidden;
46
46
  overflow-x: scroll;
47
47
  scroll-behavior: smooth;
48
+ scrollbar-width: none;
48
49
 
49
50
  &::-webkit-scrollbar {
50
51
  display: none;
@@ -21,7 +21,7 @@ import {
21
21
  } from "@docusaurus/theme-common/internal";
22
22
  import { TabItemProps } from "@docusaurus/theme-common/lib/utils/tabsUtils";
23
23
  import useIsBrowser from "@docusaurus/useIsBrowser";
24
- import setAccept from "@theme/ApiExplorer/Accept/slice";
24
+ import { setAccept } from "@theme/ApiExplorer/Accept/slice";
25
25
  import { setContentType } from "@theme/ApiExplorer/ContentType/slice";
26
26
  import { useTypedDispatch, useTypedSelector } from "@theme/ApiItem/hooks";
27
27
  import { RootState } from "@theme/ApiItem/store";
@@ -47,6 +47,7 @@
47
47
  overflow-y: hidden;
48
48
  overflow-x: scroll;
49
49
  scroll-behavior: smooth;
50
+ scrollbar-width: none;
50
51
 
51
52
  &::-webkit-scrollbar {
52
53
  display: none;
@@ -38,6 +38,7 @@
38
38
  overflow-y: hidden;
39
39
  overflow-x: scroll;
40
40
  scroll-behavior: smooth;
41
+ scrollbar-width: none;
41
42
 
42
43
  &::-webkit-scrollbar {
43
44
  display: none;
@@ -11,6 +11,7 @@ import React, {
11
11
  useEffect,
12
12
  useState,
13
13
  ReactElement,
14
+ LegacyRef,
14
15
  } from "react";
15
16
 
16
17
  import {
@@ -99,12 +100,18 @@ function TabList({
99
100
  };
100
101
  }, []);
101
102
 
102
- const handleRightClick = () => {
103
- tabItemListContainerRef.current!.scrollLeft += 90;
103
+ const handleRightClick = (e: any) => {
104
+ e.preventDefault();
105
+ if (tabItemListContainerRef.current) {
106
+ tabItemListContainerRef.current.scrollLeft += 90;
107
+ }
104
108
  };
105
109
 
106
- const handleLeftClick = () => {
107
- tabItemListContainerRef.current!.scrollLeft -= 90;
110
+ const handleLeftClick = (e: any) => {
111
+ e.preventDefault();
112
+ if (tabItemListContainerRef.current) {
113
+ tabItemListContainerRef.current.scrollLeft -= 90;
114
+ }
108
115
  };
109
116
 
110
117
  return (
@@ -116,7 +123,7 @@ function TabList({
116
123
  />
117
124
  )}
118
125
  <ul
119
- ref={tabItemListContainerRef}
126
+ ref={tabItemListContainerRef as LegacyRef<HTMLUListElement>}
120
127
  role="tablist"
121
128
  aria-orientation="horizontal"
122
129
  className={clsx(
@@ -130,22 +130,22 @@
130
130
 
131
131
  /* Version button */
132
132
 
133
- // .version-button div {
134
- // display: block;
135
- // }
133
+ .version-button div {
134
+ display: block;
135
+ }
136
136
 
137
- // .version-button div > button > span::after {
138
- // border-color: currentcolor transparent;
139
- // border-style: solid;
140
- // border-width: 0.4em 0.4em 0;
141
- // content: "";
142
- // margin-left: 0.3em;
143
- // position: relative;
144
- // transform: translateY(-50%);
145
- // display: inline-block;
146
- // font-size: 0.8rem;
147
- // top: 1px;
148
- // }
137
+ .version-button div > button > span::after {
138
+ border-color: currentcolor transparent;
139
+ border-style: solid;
140
+ border-width: 0.4em 0.4em 0;
141
+ content: "";
142
+ margin-left: 0.3em;
143
+ position: relative;
144
+ transform: translateY(-50%);
145
+ display: inline-block;
146
+ font-size: 0.8rem;
147
+ top: 1px;
148
+ }
149
149
 
150
150
  .openapi__logo {
151
151
  width: 250px;
@@ -74,6 +74,7 @@ declare module "@theme/ApiExplorer/Accept" {
74
74
  }
75
75
 
76
76
  declare module "@theme/ApiExplorer/Accept/slice" {
77
+ export { setAccept };
77
78
  export default accept as Reducer<State, AnyAction>;
78
79
  }
79
80
 
@@ -1,13 +0,0 @@
1
- import React from "react";
2
- import { type Language } from "prism-react-renderer";
3
- interface Props {
4
- code: string;
5
- className: string;
6
- language: Language;
7
- showLineNumbers: boolean;
8
- blockClassName: string;
9
- title: string;
10
- lineClassNames: string[];
11
- }
12
- export default function ExpandButton({ code, className, language, showLineNumbers, blockClassName, title, lineClassNames, }: Props): React.JSX.Element;
13
- export {};
@@ -1,240 +0,0 @@
1
- "use strict";
2
- /* ============================================================================
3
- * Copyright (c) Palo Alto Networks
4
- *
5
- * This source code is licensed under the MIT license found in the
6
- * LICENSE file in the root directory of this source tree.
7
- * ========================================================================== */
8
- var __createBinding =
9
- (this && this.__createBinding) ||
10
- (Object.create
11
- ? function (o, m, k, k2) {
12
- if (k2 === undefined) k2 = k;
13
- var desc = Object.getOwnPropertyDescriptor(m, k);
14
- if (
15
- !desc ||
16
- ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)
17
- ) {
18
- desc = {
19
- enumerable: true,
20
- get: function () {
21
- return m[k];
22
- },
23
- };
24
- }
25
- Object.defineProperty(o, k2, desc);
26
- }
27
- : function (o, m, k, k2) {
28
- if (k2 === undefined) k2 = k;
29
- o[k2] = m[k];
30
- });
31
- var __setModuleDefault =
32
- (this && this.__setModuleDefault) ||
33
- (Object.create
34
- ? function (o, v) {
35
- Object.defineProperty(o, "default", { enumerable: true, value: v });
36
- }
37
- : function (o, v) {
38
- o["default"] = v;
39
- });
40
- var __importStar =
41
- (this && this.__importStar) ||
42
- function (mod) {
43
- if (mod && mod.__esModule) return mod;
44
- var result = {};
45
- if (mod != null)
46
- for (var k in mod)
47
- if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k))
48
- __createBinding(result, mod, k);
49
- __setModuleDefault(result, mod);
50
- return result;
51
- };
52
- var __importDefault =
53
- (this && this.__importDefault) ||
54
- function (mod) {
55
- return mod && mod.__esModule ? mod : { default: mod };
56
- };
57
- Object.defineProperty(exports, "__esModule", { value: true });
58
- const react_1 = __importStar(require("react"));
59
- const theme_common_1 = require("@docusaurus/theme-common");
60
- const Translate_1 = require("@docusaurus/Translate");
61
- // @ts-ignore
62
- const Container_1 = __importDefault(
63
- require("@theme/ApiExplorer/ApiCodeBlock/Container")
64
- );
65
- // @ts-ignore
66
- const CopyButton_1 = __importDefault(
67
- require("@theme/ApiExplorer/ApiCodeBlock/CopyButton")
68
- );
69
- // @ts-ignore
70
- const ExitButton_1 = __importDefault(
71
- require("@theme/ApiExplorer/ApiCodeBlock/ExitButton")
72
- );
73
- // @ts-ignore
74
- const Line_1 = __importDefault(require("@theme/ApiExplorer/ApiCodeBlock/Line"));
75
- const clsx_1 = __importDefault(require("clsx"));
76
- const prism_react_renderer_1 = require("prism-react-renderer");
77
- const react_modal_1 = __importDefault(require("react-modal"));
78
- function ExpandButton({
79
- code,
80
- className,
81
- language,
82
- showLineNumbers,
83
- blockClassName,
84
- title,
85
- lineClassNames,
86
- }) {
87
- const prismTheme = (0, theme_common_1.usePrismTheme)();
88
- function openModal() {
89
- setIsOpen(true);
90
- }
91
- function closeModal() {
92
- setIsOpen(false);
93
- }
94
- const [modalIsOpen, setIsOpen] = react_1.default.useState(false);
95
- (0, react_1.useEffect)(() => {
96
- react_modal_1.default.setAppElement("body");
97
- });
98
- return react_1.default.createElement(
99
- react_1.default.Fragment,
100
- null,
101
- react_1.default.createElement(
102
- "button",
103
- {
104
- type: "button",
105
- "aria-label": modalIsOpen
106
- ? (0, Translate_1.translate)({
107
- id: "theme.CodeBlock.expanded",
108
- message: "Expanded",
109
- description: "The expanded button label on code blocks",
110
- })
111
- : (0, Translate_1.translate)({
112
- id: "theme.CodeBlock.expandButtonAriaLabel",
113
- message: "Expand code to fullscreen",
114
- description: "The ARIA label for expand code blocks button",
115
- }),
116
- title: (0, Translate_1.translate)({
117
- id: "theme.CodeBlock.expand",
118
- message: "Expand",
119
- description: "The expand button label on code blocks",
120
- }),
121
- className: (0, clsx_1.default)(
122
- "clean-btn",
123
- className,
124
- "openapi-explorer__code-block-expand-btn",
125
- modalIsOpen && "openapi-explorer__code-block-expand-btn--copied"
126
- ),
127
- onClick: openModal,
128
- },
129
- react_1.default.createElement(
130
- "span",
131
- {
132
- className: "openapi-explorer__code-block-expand-btn-icons",
133
- "aria-hidden": "true",
134
- },
135
- react_1.default.createElement(
136
- "svg",
137
- {
138
- className: "openapi-explorer__code-block-expand-btn-icon",
139
- viewBox: "0 0 448 512",
140
- },
141
- react_1.default.createElement("path", {
142
- d: "M32 32C14.3 32 0 46.3 0 64v96c0 17.7 14.3 32 32 32s32-14.3 32-32V96h64c17.7 0 32-14.3 32-32s-14.3-32-32-32H32zM64 352c0-17.7-14.3-32-32-32s-32 14.3-32 32v96c0 17.7 14.3 32 32 32h96c17.7 0 32-14.3 32-32s-14.3-32-32-32H64V352zM320 32c-17.7 0-32 14.3-32 32s14.3 32 32 32h64v64c0 17.7 14.3 32 32 32s32-14.3 32-32V64c0-17.7-14.3-32-32-32H320zM448 352c0-17.7-14.3-32-32-32s-32 14.3-32 32v64H320c-17.7 0-32 14.3-32 32s14.3 32 32 32h96c17.7 0 32-14.3 32-32V352z",
143
- })
144
- ),
145
- react_1.default.createElement(
146
- "svg",
147
- {
148
- className: "openapi-explorer__code-block-expand-btn-icon--success",
149
- viewBox: "0 0 24 24",
150
- },
151
- react_1.default.createElement("path", {
152
- d: "M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z",
153
- })
154
- )
155
- )
156
- ),
157
- react_1.default.createElement(
158
- react_modal_1.default,
159
- {
160
- className: "openapi-explorer__expand-modal-content",
161
- overlayClassName: "openapi-explorer__expand-modal-overlay",
162
- isOpen: modalIsOpen,
163
- onRequestClose: closeModal,
164
- contentLabel: "Code Snippet",
165
- },
166
- react_1.default.createElement(
167
- Container_1.default,
168
- {
169
- as: "div",
170
- className: (0, clsx_1.default)(
171
- "openapi-explorer__code-block-container",
172
- language &&
173
- !blockClassName.includes(`language-${language}`) &&
174
- `language-${language}`
175
- ),
176
- },
177
- title &&
178
- react_1.default.createElement(
179
- "div",
180
- { className: "openapi-explorer__code-block-title" },
181
- title
182
- ),
183
- react_1.default.createElement(
184
- "div",
185
- { className: "openapi-explorer__code-block-content" },
186
- react_1.default.createElement(
187
- prism_react_renderer_1.Highlight,
188
- { theme: prismTheme, code: code, language: language ?? "text" },
189
- ({ className, tokens, getLineProps, getTokenProps }) =>
190
- react_1.default.createElement(
191
- "pre",
192
- {
193
- /* eslint-disable-next-line jsx-a11y/no-noninteractive-tabindex */
194
- tabIndex: 0,
195
- className: (0, clsx_1.default)(
196
- className,
197
- "openapi-explorer__code-block",
198
- "thin-scrollbar"
199
- ),
200
- },
201
- react_1.default.createElement(
202
- "code",
203
- {
204
- className: (0, clsx_1.default)(
205
- "openapi-explorer__code-block-lines",
206
- showLineNumbers &&
207
- "openapi-explorer__code-block-lines-numbers"
208
- ),
209
- },
210
- tokens.map((line, i) =>
211
- react_1.default.createElement(Line_1.default, {
212
- key: i,
213
- line: line,
214
- getLineProps: getLineProps,
215
- getTokenProps: getTokenProps,
216
- classNames: lineClassNames,
217
- showLineNumbers: showLineNumbers,
218
- })
219
- )
220
- )
221
- )
222
- ),
223
- react_1.default.createElement(
224
- "div",
225
- { className: "openapi-explorer__code-block-btn-group" },
226
- react_1.default.createElement(CopyButton_1.default, {
227
- className: "openapi-explorer__code-block-code-btn",
228
- code: code,
229
- }),
230
- react_1.default.createElement(ExitButton_1.default, {
231
- className: "openapi-dmeo__code-block-code-btn",
232
- handler: closeModal,
233
- })
234
- )
235
- )
236
- )
237
- )
238
- );
239
- }
240
- exports.default = ExpandButton;
@@ -1,46 +0,0 @@
1
- /* Intentionally has zero specificity, so that to be able to override
2
- the background in custom CSS file due bug https://github.com/facebook/docusaurus/issues/3678 */
3
- :where(:root) {
4
- --docusaurus-highlighted-code-line-bg: rgb(72 77 91);
5
- }
6
-
7
- :where([data-theme="dark"]) {
8
- --docusaurus-highlighted-code-line-bg: rgb(100 100 100);
9
- }
10
-
11
- .theme-code-block-highlighted-line {
12
- background-color: var(--docusaurus-highlighted-code-line-bg);
13
- display: block;
14
- margin: 0 calc(-1 * var(--ifm-pre-padding));
15
- padding: 0 var(--ifm-pre-padding);
16
- }
17
-
18
- .openapi-explorer__code-block-code-line {
19
- display: table-row;
20
- counter-increment: line-count;
21
- }
22
-
23
- .openapi-explorer__code-block-code-line-number {
24
- display: table-cell;
25
- text-align: right;
26
- width: 1%;
27
- position: sticky;
28
- left: 0;
29
- padding: 0 var(--ifm-pre-padding);
30
- background: var(--ifm-pre-background);
31
- overflow-wrap: normal;
32
- }
33
-
34
- .openapi-explorer__code-block-code-line-number::before {
35
- content: counter(line-count);
36
- opacity: 0.4;
37
- }
38
-
39
- :global(.theme-code-block-highlighted-line)
40
- .openapi-explorer__code-block-code-line-number::before {
41
- opacity: 0.8;
42
- }
43
-
44
- .openapi-explorer__code-block-code-line-number {
45
- padding-right: var(--ifm-pre-padding);
46
- }