rspress-plugin-api-extractor 0.1.0 → 0.1.2

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 (48) hide show
  1. package/index.js +32 -236
  2. package/package.json +3 -3
  3. package/runtime/components/ApiExample/index.js +29 -0
  4. package/runtime/components/ApiLlmsPackageActions/index.js +348 -0
  5. package/runtime/components/ApiLlmsPackageActions/index.module.js +2 -0
  6. package/runtime/components/ApiLlmsViewOptions/index.js +365 -0
  7. package/runtime/components/ApiMember/index.js +51 -0
  8. package/runtime/components/ApiSignature/index.js +32 -0
  9. package/runtime/components/EnumMembersTable/index.js +69 -0
  10. package/runtime/components/EnumMembersTable/index.module.js +7 -0
  11. package/runtime/components/EnumMembersTable/index_module.css +100 -0
  12. package/runtime/components/ExampleBlock/index.js +36 -0
  13. package/runtime/components/ExampleBlock/index.module.js +6 -0
  14. package/runtime/components/ExampleBlock/index_module.css +12 -0
  15. package/runtime/components/MarkdownContent/index.js +23 -0
  16. package/runtime/components/MarkdownText/index.js +27 -0
  17. package/runtime/components/MemberSignature/index.js +54 -0
  18. package/runtime/components/MemberSignature/index.module.js +7 -0
  19. package/runtime/components/MemberSignature/index_module.css +27 -0
  20. package/runtime/components/ParametersTable/index.js +69 -0
  21. package/runtime/components/ParametersTable/index.module.js +7 -0
  22. package/runtime/components/ParametersTable/index_module.css +104 -0
  23. package/runtime/components/SignatureBlock/index.js +35 -0
  24. package/runtime/components/SignatureBlock/index.module.js +7 -0
  25. package/runtime/components/SignatureBlock/index_module.css +27 -0
  26. package/runtime/components/SignatureCode/index.js +36 -0
  27. package/runtime/components/SignatureCode/index.module.js +7 -0
  28. package/runtime/components/SignatureCode/index_module.css +53 -0
  29. package/runtime/components/SignatureToolbar/index.js +55 -0
  30. package/runtime/components/SignatureToolbar/index.module.js +11 -0
  31. package/runtime/components/SignatureToolbar/index_module.css +124 -0
  32. package/runtime/components/buttons/ButtonGroup.js +9 -0
  33. package/runtime/components/buttons/CopyCodeButton.js +42 -0
  34. package/runtime/components/buttons/WrapSignatureButton.js +20 -0
  35. package/runtime/components/buttons/index.module.js +6 -0
  36. package/runtime/components/buttons/index_module.css +37 -0
  37. package/runtime/components/icons/CheckIcon/index.js +20 -0
  38. package/runtime/components/icons/CopyIcon/index.js +20 -0
  39. package/runtime/components/icons/UnwrapIcon/index.js +21 -0
  40. package/runtime/components/icons/WrapIcon/index.js +20 -0
  41. package/runtime/components/shared/_twoslash.css +447 -0
  42. package/runtime/components/shared/types.js +0 -0
  43. package/runtime/components/shared/variables.css +85 -0
  44. package/runtime/hooks/useWrapToggle.js +12 -0
  45. package/runtime/index.d.ts +173 -0
  46. package/runtime/index.js +11 -0
  47. package/runtime/utils/decode-hast.js +18 -0
  48. package/runtime/utils/hast-renderer.js +10 -0
@@ -0,0 +1,9 @@
1
+ import { jsx } from "react/jsx-runtime";
2
+ import index_module from "./index.module.js";
3
+ function ButtonGroup({ children }) {
4
+ return /*#__PURE__*/ jsx("div", {
5
+ className: index_module.buttonGroup,
6
+ children: children
7
+ });
8
+ }
9
+ export { ButtonGroup };
@@ -0,0 +1,42 @@
1
+ import { jsx } from "react/jsx-runtime";
2
+ import clsx from "clsx";
3
+ import { useCallback, useState } from "react";
4
+ import { CheckIcon } from "../icons/CheckIcon/index.js";
5
+ import { CopyIcon } from "../icons/CopyIcon/index.js";
6
+ import index_module from "./index.module.js";
7
+ function CopyCodeButton({ code }) {
8
+ const [copied, setCopied] = useState(false);
9
+ const handleCopy = useCallback(async ()=>{
10
+ try {
11
+ await navigator.clipboard.writeText(code);
12
+ setCopied(true);
13
+ setTimeout(()=>setCopied(false), 2000);
14
+ } catch {
15
+ const textarea = document.createElement("textarea");
16
+ textarea.value = code;
17
+ textarea.style.position = "fixed";
18
+ textarea.style.opacity = "0";
19
+ document.body.appendChild(textarea);
20
+ textarea.select();
21
+ document.execCommand("copy");
22
+ document.body.removeChild(textarea);
23
+ setCopied(true);
24
+ setTimeout(()=>setCopied(false), 2000);
25
+ }
26
+ }, [
27
+ code
28
+ ]);
29
+ return /*#__PURE__*/ jsx("button", {
30
+ type: "button",
31
+ className: clsx(index_module.button, copied && "active"),
32
+ onClick: handleCopy,
33
+ "aria-label": copied ? "Copied!" : "Copy code",
34
+ title: copied ? "Copied!" : "Copy code",
35
+ children: copied ? /*#__PURE__*/ jsx(CheckIcon, {
36
+ size: 16
37
+ }) : /*#__PURE__*/ jsx(CopyIcon, {
38
+ size: 16
39
+ })
40
+ });
41
+ }
42
+ export { CopyCodeButton };
@@ -0,0 +1,20 @@
1
+ import { jsx } from "react/jsx-runtime";
2
+ import clsx from "clsx";
3
+ import { UnwrapIcon } from "../icons/UnwrapIcon/index.js";
4
+ import { WrapIcon } from "../icons/WrapIcon/index.js";
5
+ import index_module from "./index.module.js";
6
+ function WrapSignatureButton({ wrapped, onToggle }) {
7
+ return /*#__PURE__*/ jsx("button", {
8
+ type: "button",
9
+ className: clsx(index_module.button, wrapped && "active"),
10
+ onClick: onToggle,
11
+ "aria-label": wrapped ? "Disable line wrapping" : "Enable line wrapping",
12
+ title: wrapped ? "Disable wrapping" : "Enable wrapping",
13
+ children: wrapped ? /*#__PURE__*/ jsx(UnwrapIcon, {
14
+ size: 16
15
+ }) : /*#__PURE__*/ jsx(WrapIcon, {
16
+ size: 16
17
+ })
18
+ });
19
+ }
20
+ export { WrapSignatureButton };
@@ -0,0 +1,6 @@
1
+ import "./index_module.css";
2
+ const index_module = {
3
+ buttonGroup: "buttonGroup-AcnFuI",
4
+ button: "button-O9z52c"
5
+ };
6
+ export default index_module;
@@ -0,0 +1,37 @@
1
+ .buttonGroup-AcnFuI {
2
+ gap: var(--api-spacing-sm);
3
+ display: flex;
4
+ }
5
+
6
+ .button-O9z52c {
7
+ align-items: center;
8
+ gap: var(--api-spacing-xs);
9
+ padding: var(--api-spacing-xs) var(--api-spacing-md);
10
+ font-size: var(--api-font-size-sm);
11
+ font-weight: 500;
12
+ line-height: var(--api-line-height-button);
13
+ color: var(--api-color-text);
14
+ background-color: var(--api-color-bg-secondary);
15
+ border: 1px solid var(--api-color-border-secondary);
16
+ border-radius: var(--api-border-radius);
17
+ cursor: pointer;
18
+ transition: all var(--api-transition-fast);
19
+ display: inline-flex;
20
+ }
21
+
22
+ .button-O9z52c:hover {
23
+ background-color: var(--api-color-hover-bg);
24
+ border-color: var(--api-color-border-hover);
25
+ }
26
+
27
+ .button-O9z52c:active {
28
+ background-color: var(--api-color-active-bg);
29
+ transform: scale(.98);
30
+ }
31
+
32
+ .button-O9z52c svg {
33
+ flex-shrink: 0;
34
+ width: 16px;
35
+ height: 16px;
36
+ }
37
+
@@ -0,0 +1,20 @@
1
+ import { jsx, jsxs } from "react/jsx-runtime";
2
+ function CheckIcon({ size = 16, ...props }) {
3
+ return /*#__PURE__*/ jsxs("svg", {
4
+ xmlns: "http://www.w3.org/2000/svg",
5
+ width: size,
6
+ height: size,
7
+ viewBox: "0 0 24 24",
8
+ ...props,
9
+ children: [
10
+ /*#__PURE__*/ jsx("title", {
11
+ children: "Copied"
12
+ }),
13
+ /*#__PURE__*/ jsx("path", {
14
+ fill: "currentColor",
15
+ d: "M21 7L9 19l-5.5-5.5l1.41-1.41L9 16.17L19.59 5.59L21 7Z"
16
+ })
17
+ ]
18
+ });
19
+ }
20
+ export { CheckIcon };
@@ -0,0 +1,20 @@
1
+ import { jsx, jsxs } from "react/jsx-runtime";
2
+ function CopyIcon({ size = 16, ...props }) {
3
+ return /*#__PURE__*/ jsxs("svg", {
4
+ xmlns: "http://www.w3.org/2000/svg",
5
+ width: size,
6
+ height: size,
7
+ viewBox: "0 0 24 24",
8
+ ...props,
9
+ children: [
10
+ /*#__PURE__*/ jsx("title", {
11
+ children: "Copy"
12
+ }),
13
+ /*#__PURE__*/ jsx("path", {
14
+ fill: "currentColor",
15
+ d: "M19 21H8V7h11m0-2H8a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h11a2 2 0 0 0 2-2V7a2 2 0 0 0-2-2m-3-4H4a2 2 0 0 0-2 2v14h2V3h12V1Z"
16
+ })
17
+ ]
18
+ });
19
+ }
20
+ export { CopyIcon };
@@ -0,0 +1,21 @@
1
+ import { jsx, jsxs } from "react/jsx-runtime";
2
+ function UnwrapIcon({ size = 16, ...props }) {
3
+ return /*#__PURE__*/ jsxs("svg", {
4
+ xmlns: "http://www.w3.org/2000/svg",
5
+ width: size,
6
+ height: size,
7
+ viewBox: "0 0 24 24",
8
+ "aria-label": "Wrapped",
9
+ ...props,
10
+ children: [
11
+ /*#__PURE__*/ jsx("title", {
12
+ children: "Unwrap"
13
+ }),
14
+ /*#__PURE__*/ jsx("path", {
15
+ fill: "#22a041",
16
+ d: "M21 5H3v2h18zM3 19h7v-2H3zm0-6h15c1 0 2 .43 2 2s-1 2-2 2h-2v-2l-4 3l4 3v-2h2c2.95 0 4-1.27 4-4c0-2.72-1-4-4-4H3z"
17
+ })
18
+ ]
19
+ });
20
+ }
21
+ export { UnwrapIcon };
@@ -0,0 +1,20 @@
1
+ import { jsx, jsxs } from "react/jsx-runtime";
2
+ function WrapIcon({ size = 16, ...props }) {
3
+ return /*#__PURE__*/ jsxs("svg", {
4
+ xmlns: "http://www.w3.org/2000/svg",
5
+ width: size,
6
+ height: size,
7
+ viewBox: "0 0 24 24",
8
+ ...props,
9
+ children: [
10
+ /*#__PURE__*/ jsx("title", {
11
+ children: "Wrap"
12
+ }),
13
+ /*#__PURE__*/ jsx("path", {
14
+ fill: "currentColor",
15
+ d: "M16 7H3V5h13v2M3 19h13v-2H3v2m19-7l-4-3v2H3v2h15v2l4-3Z"
16
+ })
17
+ ]
18
+ });
19
+ }
20
+ export { WrapIcon };
@@ -0,0 +1,447 @@
1
+ :root {
2
+ --twoslash-border-color: #8888;
3
+ --twoslash-underline-color: currentColor;
4
+ --twoslash-highlighted-border: #c37d0d50;
5
+ --twoslash-highlighted-bg: #c37d0d20;
6
+ --twoslash-popup-bg: var(--api-shiki-light-bg, #f8f8f8);
7
+ --twoslash-popup-color: var(--api-shiki-light, inherit);
8
+ --twoslash-popup-shadow: #00000014 0px 1px 4px;
9
+ --twoslash-docs-color: #888;
10
+ --twoslash-docs-font: sans-serif;
11
+ --twoslash-code-font: inherit;
12
+ --twoslash-code-font-size: 1em;
13
+ --twoslash-matched-color: inherit;
14
+ --twoslash-unmatched-color: #888;
15
+ --twoslash-cursor-color: #8888;
16
+ --twoslash-error-color: #d45656;
17
+ --twoslash-error-bg: #d4565620;
18
+ --twoslash-warn-color: #c37d0d;
19
+ --twoslash-warn-bg: #c37d0d20;
20
+ --twoslash-tag-color: #3772cf;
21
+ --twoslash-tag-bg: #3772cf20;
22
+ --twoslash-tag-warn-color: var(--twoslash-warn-color);
23
+ --twoslash-tag-warn-bg: var(--twoslash-warn-bg);
24
+ --twoslash-tag-annotate-color: #1ba673;
25
+ --twoslash-tag-annotate-bg: #1ba67320;
26
+ }
27
+
28
+ html.rp-dark {
29
+ --twoslash-popup-bg: var(--api-shiki-dark-bg, #1e1e1e);
30
+ --twoslash-popup-color: var(--api-shiki-dark, inherit);
31
+ --twoslash-popup-shadow: #0000004d 0px 2px 8px;
32
+ --twoslash-docs-color: #aaa;
33
+ --twoslash-unmatched-color: #aaa;
34
+ --twoslash-border-color: #555;
35
+ }
36
+
37
+ @media (prefers-reduced-motion: reduce) {
38
+ .twoslash * {
39
+ transition: none;
40
+ }
41
+ }
42
+
43
+ .twoslash {
44
+ & .twoslash-popup-container {
45
+ background: var(--twoslash-popup-bg);
46
+ color: var(--twoslash-popup-color);
47
+ border: 1px solid var(--twoslash-border-color);
48
+ z-index: 1000;
49
+ -webkit-user-select: none;
50
+ user-select: none;
51
+ text-align: left;
52
+ box-shadow: var(--twoslash-popup-shadow);
53
+ white-space: normal;
54
+ overflow-wrap: normal;
55
+ word-break: normal;
56
+ opacity: 0;
57
+ pointer-events: none;
58
+ border-width: 0;
59
+ border-radius: 4px;
60
+ flex-direction: column;
61
+ width: 0;
62
+ height: 0;
63
+ transition: opacity .3s, width 0s .3s, height 0s .3s;
64
+ display: flex;
65
+ position: absolute;
66
+ left: 0;
67
+ overflow: hidden;
68
+ transform: translateY(1.1em);
69
+
70
+ &:hover {
71
+ -webkit-user-select: auto;
72
+ user-select: auto;
73
+ }
74
+ }
75
+
76
+ & .twoslash-popup-code, & .twoslash-popup-error, & .twoslash-popup-docs {
77
+ padding: 6px 8px;
78
+ }
79
+
80
+ & .twoslash-popup-code {
81
+ font-family: var(--twoslash-code-font);
82
+ font-size: var(--twoslash-code-font-size);
83
+ white-space: pre-wrap;
84
+ overflow-wrap: break-word;
85
+ display: block;
86
+ }
87
+
88
+ & .twoslash-popup-docs {
89
+ color: var(--twoslash-docs-color);
90
+ font-family: var(--twoslash-docs-font);
91
+ border-top: 1px solid var(--twoslash-border-color);
92
+ font-size: .8em;
93
+ }
94
+
95
+ & .twoslash-popup-error {
96
+ color: var(--twoslash-error-color);
97
+ background-color: var(--twoslash-error-bg);
98
+ font-family: var(--twoslash-docs-font);
99
+ font-size: .8em;
100
+ }
101
+
102
+ & .twoslash-popup-docs-tags {
103
+ font-family: var(--twoslash-docs-font);
104
+ flex-direction: column;
105
+ display: flex;
106
+ }
107
+
108
+ & .twoslash-popup-docs-tags, & .twoslash-popup-docs-tag-name {
109
+ margin-right: .5em;
110
+ }
111
+
112
+ & .twoslash-popup-docs-tag-name {
113
+ font-family: var(--twoslash-code-font);
114
+ }
115
+
116
+ & .twoslash-popup-arrow {
117
+ border-top: 1px solid var(--twoslash-border-color);
118
+ border-right: 1px solid var(--twoslash-border-color);
119
+ background: var(--twoslash-popup-bg);
120
+ pointer-events: none;
121
+ width: 6px;
122
+ height: 6px;
123
+ position: absolute;
124
+ top: -4px;
125
+ left: 1em;
126
+ transform: rotate(-45deg);
127
+ }
128
+
129
+ & .twoslash-hover {
130
+ border-bottom: 1px dotted #0000;
131
+ transition: border-color .3s;
132
+ position: relative;
133
+ }
134
+
135
+ &:hover .twoslash-hover:hover {
136
+ border-color: var(--twoslash-underline-color);
137
+ }
138
+
139
+ & .twoslash-hover:hover .twoslash-popup-container, & .twoslash-error-hover:hover .twoslash-popup-container, & .twoslash-query-persisted .twoslash-popup-container, & .twoslash-query-line .twoslash-popup-container {
140
+ opacity: 1;
141
+ pointer-events: auto;
142
+ width: max-content;
143
+ max-width: var(--popup-max-width, 75cqi);
144
+ min-width: 200px;
145
+ height: auto;
146
+ left: var(--popup-left, 0px);
147
+ top: var(--popup-top, 0px);
148
+ border-width: 1px;
149
+ transition: opacity .3s;
150
+ position: fixed;
151
+ overflow: visible;
152
+ transform: none;
153
+ }
154
+
155
+ & .twoslash-query-persisted .twoslash-popup-container {
156
+ z-index: 999;
157
+ position: absolute;
158
+ left: 0;
159
+ transform: translateY(1.5em);
160
+ }
161
+
162
+ & .twoslash-query-line .twoslash-popup-container {
163
+ margin-bottom: 1.4em;
164
+ position: relative;
165
+ top: auto;
166
+ left: auto;
167
+ transform: translateY(.6em);
168
+ }
169
+
170
+ & .twoslash-error-line {
171
+ background-color: var(--twoslash-error-bg);
172
+ border-left: 3px solid var(--twoslash-error-color);
173
+ color: var(--twoslash-error-color);
174
+ width: max-content;
175
+ min-width: 100%;
176
+ margin: .2em 0;
177
+ padding: 6px 12px;
178
+ position: relative;
179
+
180
+ &.twoslash-error-level-warning {
181
+ background-color: var(--twoslash-warn-bg);
182
+ border-left: 3px solid var(--twoslash-warn-color);
183
+ color: var(--twoslash-warn-color);
184
+ }
185
+ }
186
+
187
+ & .twoslash-error {
188
+ background: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20viewBox%3D%270%200%206%203%27%20enable-background%3D%27new%200%200%206%203%27%20height%3D%273%27%20width%3D%276%27%3E%3Cg%20fill%3D%27%23c94824%27%3E%3Cpolygon%20points%3D%275.5%2C0%202.5%2C3%201.1%2C3%204.1%2C0%27%2F%3E%3Cpolygon%20points%3D%274%2C0%206%2C2%206%2C0.6%205.4%2C0%27%2F%3E%3Cpolygon%20points%3D%270%2C2%201%2C3%202.4%2C3%200%2C0.6%27%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E") 0 100% repeat-x;
189
+ padding-bottom: 2px;
190
+
191
+ &.twoslash-error-level-warning {
192
+ background: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20viewBox%3D%270%200%206%203%27%20enable-background%3D%27new%200%200%206%203%27%20height%3D%273%27%20width%3D%276%27%3E%3Cg%20fill%3D%27%23c37d0d%27%3E%3Cpolygon%20points%3D%275.5%2C0%202.5%2C3%201.1%2C3%204.1%2C0%27%2F%3E%3Cpolygon%20points%3D%274%2C0%206%2C2%206%2C0.6%205.4%2C0%27%2F%3E%3Cpolygon%20points%3D%270%2C2%201%2C3%202.4%2C3%200%2C0.6%27%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E") 0 100% repeat-x;
193
+ padding-bottom: 2px;
194
+ }
195
+ }
196
+
197
+ & .twoslash-completion-cursor {
198
+ position: relative;
199
+
200
+ & .twoslash-completion-list {
201
+ -webkit-user-select: none;
202
+ user-select: none;
203
+ z-index: 1000;
204
+ box-shadow: var(--twoslash-popup-shadow);
205
+ background: var(--twoslash-popup-bg);
206
+ border: 1px solid var(--twoslash-border-color);
207
+ flex-direction: column;
208
+ gap: 4px;
209
+ width: 240px;
210
+ margin: 3px 0 0 -1px;
211
+ padding: 4px;
212
+ font-size: .8rem;
213
+ display: flex;
214
+ position: fixed;
215
+ top: 0;
216
+ left: 0;
217
+ transform: translate(0, 1.2em);
218
+
219
+ &:hover {
220
+ -webkit-user-select: auto;
221
+ user-select: auto;
222
+ }
223
+
224
+ &:before {
225
+ background-color: var(--twoslash-cursor-color);
226
+ content: " ";
227
+ width: 2px;
228
+ height: 1.4em;
229
+ position: absolute;
230
+ top: -1.6em;
231
+ left: -1px;
232
+ }
233
+
234
+ & li {
235
+ align-items: center;
236
+ gap: .25em;
237
+ line-height: 1em;
238
+ display: flex;
239
+ overflow: hidden;
240
+
241
+ & span.twoslash-completions-unmatched {
242
+ color: var(--twoslash-unmatched-color);
243
+ }
244
+
245
+ & span.twoslash-completions-matched {
246
+ color: var(--twoslash-matched-color);
247
+ }
248
+
249
+ &.deprecated {
250
+ opacity: .5;
251
+ text-decoration: line-through;
252
+ }
253
+ }
254
+ }
255
+ }
256
+
257
+ & .twoslash-completion-list .twoslash-completions-icon {
258
+ color: var(--twoslash-unmatched-color);
259
+ flex: none;
260
+ width: 1em;
261
+ }
262
+
263
+ & .twoslash-highlighted {
264
+ background-color: var(--twoslash-highlighted-bg);
265
+ border: 1px solid var(--twoslash-highlighted-border);
266
+ border-radius: 4px;
267
+ margin: -1px -3px;
268
+ padding: 1px 2px;
269
+ }
270
+
271
+ & .twoslash-tag-line {
272
+ background-color: var(--twoslash-tag-bg);
273
+ border-left: 3px solid var(--twoslash-tag-color);
274
+ color: var(--twoslash-tag-color);
275
+ align-items: center;
276
+ gap: .3em;
277
+ width: max-content;
278
+ min-width: 100%;
279
+ margin: .2em 0;
280
+ padding: 6px 10px;
281
+ display: flex;
282
+ position: relative;
283
+
284
+ & .twoslash-tag-icon {
285
+ width: 1.1em;
286
+ color: inherit;
287
+ }
288
+
289
+ &.twoslash-tag-error-line {
290
+ background-color: var(--twoslash-error-bg);
291
+ border-left: 3px solid var(--twoslash-error-color);
292
+ color: var(--twoslash-error-color);
293
+ }
294
+
295
+ &.twoslash-tag-warn-line {
296
+ background-color: var(--twoslash-tag-warn-bg);
297
+ border-left: 3px solid var(--twoslash-tag-warn-color);
298
+ color: var(--twoslash-tag-warn-color);
299
+ }
300
+
301
+ &.twoslash-tag-annotate-line {
302
+ background-color: var(--twoslash-tag-annotate-bg);
303
+ border-left: 3px solid var(--twoslash-tag-annotate-color);
304
+ color: var(--twoslash-tag-annotate-color);
305
+ }
306
+ }
307
+ }
308
+
309
+ .twoslash-popup-docs-tag:has(.twoslash-tag-hidden), .twoslash-popup-docs-tag:not(:has(.twoslash-popup-docs-tag-value)), .twoslash-popup-docs-tag:has(.twoslash-tag-remarks) .twoslash-popup-docs-tag-name {
310
+ display: none;
311
+ }
312
+
313
+ .twoslash-popup-docs-tag:has(.twoslash-tag-param), .twoslash-popup-docs-tag:has(.twoslash-tag-typeParam), .twoslash-popup-docs-tag:has(.twoslash-tag-returns), .twoslash-popup-docs-tag:has(.twoslash-tag-throws), .twoslash-popup-docs-tag:has(.twoslash-tag-defaultValue) {
314
+ border-bottom: 1px solid var(--twoslash-border-color);
315
+ color: var(--twoslash-docs-color);
316
+ align-items: baseline;
317
+ gap: .5em;
318
+ margin: 0 -8px;
319
+ padding: .35em 8px;
320
+ display: flex;
321
+ }
322
+
323
+ .twoslash-popup-docs-tag:has(.twoslash-tag-param) > .twoslash-popup-docs-tag-name, .twoslash-popup-docs-tag:has(.twoslash-tag-typeParam) > .twoslash-popup-docs-tag-name, .twoslash-popup-docs-tag:has(.twoslash-tag-returns) > .twoslash-popup-docs-tag-name, .twoslash-popup-docs-tag:has(.twoslash-tag-throws) > .twoslash-popup-docs-tag-name, .twoslash-popup-docs-tag:has(.twoslash-tag-defaultValue) > .twoslash-popup-docs-tag-name {
324
+ width: 0;
325
+ margin: 0;
326
+ padding: 0;
327
+ font-size: 0;
328
+ overflow: hidden;
329
+ }
330
+
331
+ .twoslash-popup-docs-tag:has(.twoslash-tag-param):before, .twoslash-popup-docs-tag:has(.twoslash-tag-typeParam):before, .twoslash-popup-docs-tag:has(.twoslash-tag-returns):before, .twoslash-popup-docs-tag:has(.twoslash-tag-throws):before, .twoslash-popup-docs-tag:has(.twoslash-tag-defaultValue):before {
332
+ font-size: .65rem;
333
+ font-weight: 600;
334
+ font-family: var(--twoslash-code-font);
335
+ white-space: nowrap;
336
+ border-radius: 3px;
337
+ flex-shrink: 0;
338
+ padding: 1px 5px;
339
+ line-height: 1.4;
340
+ display: inline-block;
341
+ }
342
+
343
+ .twoslash-popup-docs-tag:has(.twoslash-tag-typeParam):before {
344
+ content: "type";
345
+ background: var(--twoslash-tag-bg);
346
+ color: var(--twoslash-tag-color);
347
+ }
348
+
349
+ .twoslash-popup-docs-tag:has(.twoslash-tag-param):before {
350
+ content: "param";
351
+ background: var(--twoslash-tag-bg);
352
+ color: var(--twoslash-tag-color);
353
+ }
354
+
355
+ .twoslash-popup-docs-tag:has(.twoslash-tag-returns):before {
356
+ content: "returns";
357
+ background: var(--twoslash-tag-annotate-bg);
358
+ color: var(--twoslash-tag-annotate-color);
359
+ }
360
+
361
+ .twoslash-popup-docs-tag:has(.twoslash-tag-throws):before {
362
+ content: "throws";
363
+ background: var(--twoslash-warn-bg);
364
+ color: var(--twoslash-warn-color);
365
+ }
366
+
367
+ .twoslash-popup-docs-tag:has(.twoslash-tag-defaultValue):before {
368
+ content: "default";
369
+ background: var(--twoslash-highlighted-bg);
370
+ color: var(--twoslash-docs-color);
371
+ }
372
+
373
+ .twoslash-tag-remarks {
374
+ margin-top: .5em;
375
+ display: block;
376
+ }
377
+
378
+ .twoslash-tag-content {
379
+ display: block;
380
+ }
381
+
382
+ .twoslash-tag-content p {
383
+ margin: .25em 0;
384
+ }
385
+
386
+ .twoslash-tag-content p:first-child {
387
+ margin-top: 0;
388
+ }
389
+
390
+ .twoslash-tag-content p:last-child {
391
+ margin-bottom: 0;
392
+ }
393
+
394
+ .twoslash .twoslash-popup-container .twoslash-popup-docs code {
395
+ background-color: var(--twoslash-popup-bg);
396
+ border: 1px solid var(--twoslash-border-color);
397
+ border-radius: 3px;
398
+ padding: 1px 4px;
399
+ font-size: .85em;
400
+ display: inline;
401
+ }
402
+
403
+ .twoslash-popup-docs p {
404
+ text-wrap: auto;
405
+ font-size: .9rem;
406
+ line-height: 1.1rem;
407
+ }
408
+
409
+ .twoslash-popup-docs p:first-child {
410
+ margin-top: 0;
411
+ }
412
+
413
+ .twoslash-popup-docs p:last-child, .twoslash-popup-docs ul:last-child, .twoslash-popup-docs ol:last-child {
414
+ margin-bottom: 0;
415
+ }
416
+
417
+ .twoslash-popup-docs ul, .twoslash-popup-docs ol {
418
+ margin: .5em 0;
419
+ padding-left: 1.25em;
420
+ }
421
+
422
+ .twoslash-popup-docs li {
423
+ margin: .25em 0;
424
+ }
425
+
426
+ .api-type-link {
427
+ color: inherit;
428
+ text-underline-offset: 2px;
429
+ -webkit-text-decoration: underline dotted;
430
+ text-decoration: underline dotted;
431
+ text-decoration-thickness: 1px;
432
+ transition: all .2s;
433
+
434
+ &:hover {
435
+ text-decoration-style: solid;
436
+ text-decoration-thickness: 2px;
437
+ }
438
+ }
439
+
440
+ html.rp-dark .api-type-link {
441
+ text-decoration-color: #fff6;
442
+
443
+ &:hover {
444
+ text-decoration-color: #fffc;
445
+ }
446
+ }
447
+
File without changes