rapidoc 11.0.1 → 12.1.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 (96) hide show
  1. package/README.md +171 -54
  2. package/dist/rapidoc-flow-min.js +580 -0
  3. package/dist/rapidoc-flow-min.js.LICENSE.txt +171 -0
  4. package/dist/rapidoc-min.js +645 -202
  5. package/dist/rapidoc-min.js.LICENSE.txt +381 -0
  6. package/package.json +57 -42
  7. package/src/README.md +150 -0
  8. package/src/components/README.md +91 -0
  9. package/src/components/api-request.ts +912 -0
  10. package/src/components/api-response.ts +514 -0
  11. package/src/components/json-tree.ts +171 -0
  12. package/src/components/schema-base-element.ts +329 -0
  13. package/src/components/schema-table.ts +475 -0
  14. package/src/components/schema-tree.ts +393 -0
  15. package/src/components/tag-input.ts +180 -0
  16. package/src/flow.js +3 -0
  17. package/src/index.js +6 -0
  18. package/src/oauth-receiver.ts +29 -0
  19. package/src/rapi-flow.ts +1178 -0
  20. package/src/rapidoc-mini.ts +603 -0
  21. package/src/rapidoc.ts +1854 -0
  22. package/src/styles/README.md +96 -0
  23. package/src/styles/auth-styles.js +318 -0
  24. package/src/styles/border-styles.js +24 -0
  25. package/src/styles/css-bundle.js +129 -0
  26. package/src/styles/custom-styles.js +8 -0
  27. package/src/styles/dialog-box-styles.js +102 -0
  28. package/src/styles/endpoint-styles.js +564 -0
  29. package/src/styles/flex-styles.js +16 -0
  30. package/src/styles/flow-styles.js +248 -0
  31. package/src/styles/font-styles.js +432 -0
  32. package/src/styles/info-styles.js +36 -0
  33. package/src/styles/input-styles.js +555 -0
  34. package/src/styles/layout-styles.js +396 -0
  35. package/src/styles/microlighter-styles.js +99 -0
  36. package/src/styles/nav-styles.js +633 -0
  37. package/src/styles/param-list-styles.js +261 -0
  38. package/src/styles/schema-styles.js +296 -0
  39. package/src/styles/tab-styles.js +106 -0
  40. package/src/styles/theme-tokens.js +582 -0
  41. package/src/templates/README.md +89 -0
  42. package/src/templates/advanced-search-dialog-template.js +94 -0
  43. package/src/templates/api-response-template.js +223 -0
  44. package/src/templates/callback-template.js +86 -0
  45. package/src/templates/code-samples-template.js +52 -0
  46. package/src/templates/components-template.js +86 -0
  47. package/src/templates/downloads-template.js +70 -0
  48. package/src/templates/endpoint-template.js +377 -0
  49. package/src/templates/expanded-endpoint-template.js +270 -0
  50. package/src/templates/focused-endpoint-template.js +146 -0
  51. package/src/templates/header-template.js +92 -0
  52. package/src/templates/logo-template.js +21 -0
  53. package/src/templates/main-body-template.js +102 -0
  54. package/src/templates/navbar-template.js +498 -0
  55. package/src/templates/overview-template.js +104 -0
  56. package/src/templates/request-body-template.js +673 -0
  57. package/src/templates/request-params-template.js +485 -0
  58. package/src/templates/security-scheme-template.js +1272 -0
  59. package/src/templates/server-template.js +153 -0
  60. package/src/utils/README.md +146 -0
  61. package/src/utils/arazzo/README.md +119 -0
  62. package/src/utils/arazzo/components.js +15 -0
  63. package/src/utils/arazzo/graph.js +269 -0
  64. package/src/utils/arazzo/index.js +52 -0
  65. package/src/utils/arazzo/operations.js +106 -0
  66. package/src/utils/arazzo/parse.js +196 -0
  67. package/src/utils/arazzo/refs.js +40 -0
  68. package/src/utils/arazzo/svg.js +707 -0
  69. package/src/utils/auto-color-scheme.js +99 -0
  70. package/src/utils/bind-navbar.js +175 -0
  71. package/src/utils/color-utils.js +59 -0
  72. package/src/utils/common-utils.js +191 -0
  73. package/src/utils/curl-utils.js +126 -0
  74. package/src/utils/highlighter.js +419 -0
  75. package/src/utils/markdown-utils.js +110 -0
  76. package/src/utils/mcp/README.md +155 -0
  77. package/src/utils/mcp/common.js +166 -0
  78. package/src/utils/mcp/manifest.js +382 -0
  79. package/src/utils/mcp/project/server.ts +53 -0
  80. package/src/utils/mcp/project.js +88 -0
  81. package/src/utils/mcp/runtime.js +289 -0
  82. package/src/utils/mcp/schema.js +98 -0
  83. package/src/utils/mcp/workflow-runtime.js +374 -0
  84. package/src/utils/mcp/workflows.js +240 -0
  85. package/src/utils/mcp/zip.js +102 -0
  86. package/src/utils/mcp-generator.js +47 -0
  87. package/src/utils/mock-interceptor.js +557 -0
  88. package/src/utils/oauth-utils.js +87 -0
  89. package/src/utils/request-utils.js +264 -0
  90. package/src/utils/response-utils.js +203 -0
  91. package/src/utils/sanitize.js +57 -0
  92. package/src/utils/schema-utils.js +1954 -0
  93. package/src/utils/slugger.js +187 -0
  94. package/src/utils/spec-parser.js +941 -0
  95. package/src/utils/url-utils.js +246 -0
  96. package/src/utils/xml-utils.js +61 -0
@@ -0,0 +1,248 @@
1
+ import { css } from "lit";
2
+
3
+ /**
4
+ * Styles for the workflow diagram drawn by utils/arazzo/svg.js. Shared by <rapi-flow> and by
5
+ * build-time pages (@rapidoc/prerender `getFlowCss()`), so selectors are plain classes, not :host.
6
+ */
7
+ export default css`
8
+ .rf-svg {
9
+ display: block;
10
+ max-width: 100%;
11
+ height: auto;
12
+ font-family: var(--font-sans);
13
+ font-size: var(--font-size-description);
14
+ overflow: visible;
15
+ }
16
+ .rf-node rect {
17
+ fill: var(--card);
18
+ stroke: var(--border);
19
+ stroke-width: 1.25;
20
+ }
21
+ .rf-io rect {
22
+ fill: var(--muted);
23
+ }
24
+ .rf-title {
25
+ fill: color-mix(in srgb, var(--primary) 65%, var(--foreground));
26
+ font-weight: 600;
27
+ font-size: var(--font-size-regular);
28
+ }
29
+ .rf-sub {
30
+ fill: var(--muted-foreground);
31
+ }
32
+ .rf-io-title,
33
+ .rf-criteria {
34
+ fill: var(--muted-foreground);
35
+ font-size: var(--font-size-xs);
36
+ text-transform: uppercase;
37
+ letter-spacing: 0.04em;
38
+ }
39
+ .rf-criteria {
40
+ text-transform: none;
41
+ letter-spacing: normal;
42
+ }
43
+ .rf-path,
44
+ .rf-method,
45
+ .rf-unresolved {
46
+ font-family: var(--font-mono);
47
+ font-size: var(--font-size-small);
48
+ }
49
+ .rf-path {
50
+ fill: var(--foreground);
51
+ }
52
+ .rf-method {
53
+ font-weight: 700;
54
+ fill: var(--method-default);
55
+ }
56
+ .rf-method-get { fill: var(--method-get); }
57
+ .rf-method-post { fill: var(--method-post); }
58
+ .rf-method-put { fill: var(--method-put); }
59
+ .rf-method-delete { fill: var(--method-delete); }
60
+ .rf-method-patch { fill: var(--method-patch); }
61
+ .rf-method-head { fill: var(--method-head); }
62
+ .rf-method-options { fill: var(--method-options); }
63
+ .rf-method-trace { fill: var(--method-trace); }
64
+ .rf-method-query { fill: var(--method-query); }
65
+ .rf-unresolved {
66
+ fill: var(--muted-foreground);
67
+ font-style: italic;
68
+ }
69
+ .rf-jump {
70
+ cursor: pointer;
71
+ outline: none;
72
+ }
73
+ .rf-jump:hover .rf-step-name,
74
+ .rf-tag.rf-jump:hover,
75
+ .rf-tag.rf-jump:focus-visible {
76
+ text-decoration: underline;
77
+ }
78
+ .rf-clickable {
79
+ cursor: pointer;
80
+ outline: none;
81
+ }
82
+ .rf-clickable:hover rect,
83
+ .rf-clickable:focus-visible rect {
84
+ stroke: var(--primary);
85
+ stroke-width: 2;
86
+ }
87
+ .rf-selected rect {
88
+ stroke: var(--primary);
89
+ stroke-width: 2;
90
+ }
91
+ .rf-seq {
92
+ fill: none;
93
+ stroke: var(--muted-foreground);
94
+ stroke-width: 1.25;
95
+ }
96
+ .rf-head-seq {
97
+ fill: var(--muted-foreground);
98
+ }
99
+ .rf-data {
100
+ fill: none;
101
+ stroke: var(--primary);
102
+ stroke-width: 1.5;
103
+ stroke-dasharray: 5 4;
104
+ }
105
+ .rf-head-data {
106
+ fill: var(--primary);
107
+ }
108
+ .rf-data.rf-to-output {
109
+ stroke: var(--muted-foreground);
110
+ }
111
+ .rf-head-output {
112
+ fill: var(--muted-foreground);
113
+ }
114
+ .rf-sep {
115
+ fill: none;
116
+ stroke: var(--border);
117
+ stroke-width: 1;
118
+ }
119
+ .rf-row {
120
+ font-size: var(--font-size-small);
121
+ }
122
+ .rf-in-name,
123
+ .rf-out-name,
124
+ .rf-bind-name,
125
+ .rf-bind-val,
126
+ .rf-act-when,
127
+ .rf-act-then {
128
+ fill: var(--foreground);
129
+ }
130
+ .rf-bind-name,
131
+ .rf-bind-val,
132
+ .rf-kw,
133
+ .rf-in-type,
134
+ .rf-in-default,
135
+ .rf-in-enum {
136
+ font-family: var(--font-mono);
137
+ }
138
+ .rf-in-type,
139
+ .rf-in-default,
140
+ .rf-in-enum,
141
+ .rf-out-from,
142
+ .rf-out-kind,
143
+ .rf-act-name,
144
+ .rf-more,
145
+ .rf-tag,
146
+ .rf-sec-title {
147
+ fill: var(--muted-foreground);
148
+ }
149
+ .rf-kw,
150
+ .rf-out-kind {
151
+ font-weight: 600;
152
+ }
153
+ /* Step names are the step color wherever they appear: box titles, value lines, outputs */
154
+ /* --primary mixed toward the text color keeps the hue and reads at 4.5:1 on light cards */
155
+ .rf-step-name,
156
+ .rf-kw-step,
157
+ .rf-tag.rf-out-step,
158
+ .rf-row.rf-linked .rf-out-name {
159
+ fill: color-mix(in srgb, var(--primary) 65%, var(--foreground));
160
+ }
161
+ .rf-tag.rf-out-step {
162
+ font-size: var(--font-size-small);
163
+ font-weight: 600;
164
+ }
165
+ /* Hover linking (<rapi-flow>): a step, its lines and its rows in the outputs box */
166
+ .rf-step.rf-linked rect {
167
+ stroke: var(--primary);
168
+ stroke-width: 2;
169
+ }
170
+ .rf-data.rf-linked {
171
+ stroke-width: 2.5;
172
+ }
173
+ /* A run in <rapi-flow>: the step whose request is in flight */
174
+ .rf-step.rf-running rect {
175
+ stroke: var(--primary);
176
+ stroke-width: 2;
177
+ stroke-dasharray: 6 4;
178
+ animation: rf-march 1s linear infinite;
179
+ }
180
+ @keyframes rf-march {
181
+ to {
182
+ stroke-dashoffset: -20;
183
+ }
184
+ }
185
+ .rf-io .rf-sep {
186
+ stroke: var(--muted-foreground);
187
+ stroke-opacity: 0.35;
188
+ }
189
+ .rf-out-from {
190
+ font-family: var(--font-mono);
191
+ }
192
+ .rf-kw-input {
193
+ fill: var(--blue);
194
+ }
195
+ .rf-kw-value,
196
+ .rf-kw-expression {
197
+ fill: var(--muted-foreground);
198
+ }
199
+ .rf-req {
200
+ fill: var(--destructive);
201
+ font-size: var(--font-size-xs);
202
+ font-weight: 600;
203
+ }
204
+ .rf-more,
205
+ .rf-tag,
206
+ .rf-sec-title {
207
+ font-size: var(--font-size-xs);
208
+ }
209
+ .rf-sec-title {
210
+ text-transform: uppercase;
211
+ letter-spacing: 0.04em;
212
+ }
213
+ .rf-check-type {
214
+ fill: var(--muted-foreground);
215
+ }
216
+ .rf-check-type,
217
+ .rf-check {
218
+ font-family: var(--font-mono);
219
+ }
220
+ .rf-check {
221
+ fill: var(--foreground);
222
+ }
223
+ .rf-data-label rect {
224
+ fill: var(--background);
225
+ stroke: var(--primary);
226
+ stroke-width: 1;
227
+ }
228
+ .rf-data-label text {
229
+ fill: var(--foreground);
230
+ font-size: var(--font-size-xs);
231
+ }
232
+ .rf-goto {
233
+ fill: none;
234
+ stroke-width: 1.5;
235
+ }
236
+ .rf-goto.rf-success {
237
+ stroke: var(--green);
238
+ }
239
+ .rf-goto.rf-failure {
240
+ stroke: var(--destructive);
241
+ }
242
+ .rf-head-success {
243
+ fill: var(--green);
244
+ }
245
+ .rf-head-failure {
246
+ fill: var(--destructive);
247
+ }
248
+ `;
@@ -0,0 +1,432 @@
1
+ import { css } from "lit";
2
+
3
+ export default css`
4
+ .hover-bg:hover {
5
+ background: var(--muted);
6
+ }
7
+ ::selection {
8
+ background: var(--selection-bg);
9
+ color: var(--selection-fg);
10
+ }
11
+ .regular-font {
12
+ font-family: var(--font-sans);
13
+ }
14
+ .mono-font {
15
+ font-family: var(--font-mono);
16
+ }
17
+ .title {
18
+ font-size: calc(var(--font-size-small) + 1.125rem);
19
+ font-weight: normal;
20
+ text-wrap: balance;
21
+ }
22
+ .sub-title {
23
+ font-size: var(--h3-font-size);
24
+ text-wrap: balance;
25
+ }
26
+ .req-res-title {
27
+ font-family: var(--font-sans);
28
+ font-size: calc(var(--font-size-small) + 0.25rem);
29
+ font-weight: bold;
30
+ margin-bottom: 0.5rem;
31
+ text-align: start;
32
+ text-wrap: balance;
33
+ }
34
+ .tiny-title {
35
+ font-size: calc(var(--font-size-small) + 1px);
36
+ font-weight: bold;
37
+ }
38
+ .regular-font-size {
39
+ font-size: var(--font-size-regular);
40
+ }
41
+ .small-font-size {
42
+ font-size: var(--font-size-small);
43
+ }
44
+ .upper {
45
+ text-transform: uppercase;
46
+ }
47
+ .primary-text {
48
+ color: var(--primary);
49
+ }
50
+ .bold-text {
51
+ font-weight: bold;
52
+ }
53
+ .gray-text {
54
+ color: var(--muted-foreground);
55
+ }
56
+ .red-text {
57
+ color: var(--destructive);
58
+ }
59
+ .blue-text {
60
+ color: var(--blue);
61
+ }
62
+ .multiline {
63
+ overflow: scroll;
64
+ max-height: var(--resp-area-height);
65
+ color: var(--muted-foreground);
66
+ }
67
+ .method-fg {
68
+ color: var(--method-default);
69
+ }
70
+ .method-fg.put {
71
+ color: var(--method-put);
72
+ }
73
+ .method-fg.post {
74
+ color: var(--method-post);
75
+ }
76
+ .method-fg.get {
77
+ color: var(--method-get);
78
+ }
79
+ .method-fg.delete {
80
+ color: var(--method-delete);
81
+ }
82
+ .method-fg.head {
83
+ color: var(--method-head);
84
+ }
85
+ .method-fg.patch {
86
+ color: var(--method-patch);
87
+ }
88
+ .method-fg.options {
89
+ color: var(--method-options);
90
+ }
91
+ .method-fg.trace {
92
+ color: var(--method-trace);
93
+ }
94
+ .method-fg.query {
95
+ color: var(--method-query);
96
+ }
97
+ .method-fg.copy {
98
+ color: var(--method-default);
99
+ }
100
+ .method-fg.purge {
101
+ color: var(--method-default);
102
+ }
103
+
104
+ /*
105
+ * Headings: one scale for RapiDoc's own headings (.rapidoc-heading) and headings rendered from
106
+ * markdown descriptions, so both line up with surrounding docs content. The custom properties and
107
+ * their defaults are defined in theme-tokens.js; override them on the element, e.g.
108
+ * rapi-doc { --h2-font-size: 1.8125rem; --heading-weight: 700; }
109
+ */
110
+ h1,
111
+ h2,
112
+ h3,
113
+ h4,
114
+ h5,
115
+ h6,
116
+ .rapidoc-heading:is(h1, h2, h3, h4, h5, h6) {
117
+ font-family: var(--heading-font);
118
+ font-weight: var(--heading-weight);
119
+ line-height: var(--heading-line-height);
120
+ letter-spacing: var(--heading-letter-spacing);
121
+ color: var(--heading-color);
122
+ margin-block: var(--heading-margin-top) var(--heading-margin-bottom);
123
+ padding: 0;
124
+ text-wrap: balance;
125
+ }
126
+ h1,
127
+ h1.rapidoc-heading {
128
+ font-size: var(--h1-font-size);
129
+ }
130
+ h2,
131
+ h2.rapidoc-heading {
132
+ font-size: var(--h2-font-size);
133
+ }
134
+ h3,
135
+ h3.rapidoc-heading {
136
+ font-size: var(--h3-font-size);
137
+ }
138
+ h4,
139
+ h4.rapidoc-heading {
140
+ font-size: var(--h4-font-size);
141
+ }
142
+ h5,
143
+ h5.rapidoc-heading {
144
+ font-size: var(--h5-font-size);
145
+ }
146
+ h6,
147
+ h6.rapidoc-heading {
148
+ font-size: var(--h6-font-size);
149
+ }
150
+ :is(h1, h2, h3, h4, h5, h6):first-child,
151
+ .rapidoc-heading:is(h1, h2, h3, h4, h5, h6):first-child {
152
+ margin-block-start: 0;
153
+ }
154
+
155
+ /* Compact small-caps labels (Request, Response, Path parameters, ...) */
156
+ .rapidoc-heading.label-heading {
157
+ font-size: var(--label-heading-font-size);
158
+ font-weight: var(--heading-weight);
159
+ line-height: 1.4;
160
+ letter-spacing: 0.04em;
161
+ text-transform: uppercase;
162
+ margin-block: 16px 6px;
163
+ }
164
+ .rapidoc-heading.label-heading.req-res-title {
165
+ font-size: calc(var(--font-size-small) + 0.25rem);
166
+ margin-block: 0 0.5rem;
167
+ }
168
+ .rapidoc-heading.label-heading.tiny-title {
169
+ font-size: calc(var(--font-size-small) + 1px);
170
+ margin-block: 0 8px;
171
+ }
172
+ .table-title {
173
+ font-size: var(--font-size-small);
174
+ font-weight: 600;
175
+ vertical-align: middle;
176
+ margin: 12px 0 4px 0;
177
+ }
178
+ .table-title > .rapidoc-heading.label-heading {
179
+ margin: 0;
180
+ }
181
+ /* Keeps the heading outline complete for assistive tech without showing a duplicate title */
182
+ .visually-hidden {
183
+ position: absolute;
184
+ width: 1px;
185
+ height: 1px;
186
+ margin: -1px;
187
+ padding: 0;
188
+ overflow: hidden;
189
+ clip-path: inset(50%);
190
+ white-space: nowrap;
191
+ border: 0;
192
+ }
193
+
194
+ p {
195
+ margin-block-start: 0.5em;
196
+ }
197
+ a {
198
+ color: var(--blue);
199
+ text-decoration: none;
200
+ cursor: pointer;
201
+ }
202
+ a:hover {
203
+ text-decoration: underline;
204
+ }
205
+
206
+ code,
207
+ pre {
208
+ margin: 0px;
209
+ font-family: var(--font-mono);
210
+ font-size: calc(var(--font-size-mono) - 1px);
211
+ }
212
+
213
+ .m-markdown,
214
+ .m-markdown-small {
215
+ display: block;
216
+ color: var(--foreground);
217
+ /* Long unbroken words (URL paths, ids, inline code) wrap instead of widening the page. */
218
+ overflow-wrap: anywhere;
219
+ }
220
+
221
+ .m-markdown p,
222
+ .m-markdown span {
223
+ font-size: var(--font-size-regular);
224
+ line-height: var(--line-height);
225
+ color: inherit;
226
+ }
227
+ .m-markdown li {
228
+ font-size: var(--font-size-regular);
229
+ line-height: var(--line-height);
230
+ margin-block: 0.25em;
231
+ color: inherit;
232
+ }
233
+
234
+ .m-markdown-small p,
235
+ .m-markdown-small span {
236
+ font-size: var(--font-size-description);
237
+ line-height: calc(var(--font-size-description) + 6px);
238
+ color: inherit;
239
+ }
240
+ .m-markdown-small li {
241
+ font-size: var(--font-size-description);
242
+ line-height: calc(var(--font-size-description) + 8px);
243
+ margin-block: 3px;
244
+ color: inherit;
245
+ }
246
+
247
+ .m-markdown strong,
248
+ .m-markdown b,
249
+ .m-markdown-small strong,
250
+ .m-markdown-small b {
251
+ color: var(--foreground);
252
+ font-weight: 600;
253
+ }
254
+
255
+ .m-markdown h1,
256
+ .m-markdown h2,
257
+ .m-markdown h3,
258
+ .m-markdown h4,
259
+ .m-markdown h5,
260
+ .m-markdown h6,
261
+ .m-markdown-small h1,
262
+ .m-markdown-small h2,
263
+ .m-markdown-small h3,
264
+ .m-markdown-small h4,
265
+ .m-markdown-small h5,
266
+ .m-markdown-small h6 {
267
+ color: var(--foreground);
268
+ }
269
+
270
+ .m-markdown p:not(:first-child) {
271
+ margin-block-start: var(--paragraph-spacing);
272
+ }
273
+
274
+ .m-markdown-small p:not(:first-child) {
275
+ margin-block-start: 12px;
276
+ }
277
+ .m-markdown-small p:first-child {
278
+ margin-block-start: 0;
279
+ }
280
+
281
+ .m-markdown p,
282
+ .m-markdown-small p {
283
+ margin-block-end: 0;
284
+ }
285
+
286
+ .m-markdown code span {
287
+ font-size: var(--font-size-mono);
288
+ }
289
+
290
+ .m-markdown-small code,
291
+ .m-markdown code {
292
+ padding: 1px 6px;
293
+ border-radius: min(var(--radius), 0.5rem);
294
+ color: var(--foreground);
295
+ background-color: var(--muted);
296
+ font-size: calc(var(--font-size-mono));
297
+ line-height: 1.2;
298
+ }
299
+
300
+ .m-markdown-small code {
301
+ font-size: calc(var(--font-size-mono) - 1px);
302
+ padding: 1px 5px;
303
+ }
304
+
305
+ .m-markdown-small pre,
306
+ .m-markdown pre {
307
+ white-space: pre-wrap;
308
+ overflow-wrap: normal;
309
+ overflow-x: auto;
310
+ line-height: normal;
311
+ border-radius: min(var(--radius), 0.5rem);
312
+ border: 1px solid var(--input);
313
+ }
314
+
315
+ .m-markdown pre {
316
+ padding: 12px;
317
+ background: var(--code-bg);
318
+ color: var(--foreground);
319
+
320
+ & code {
321
+ border: none;
322
+ padding: 0;
323
+ background: transparent;
324
+ color: var(--foreground);
325
+ }
326
+ }
327
+
328
+ .m-markdown-small pre {
329
+ margin-top: 4px;
330
+ padding: 2px 4px;
331
+ background: var(--code-bg);
332
+ color: var(--card-foreground);
333
+
334
+ & code {
335
+ border: none;
336
+ padding: 0;
337
+ background: transparent;
338
+ color: var(--card-foreground);
339
+ }
340
+ }
341
+
342
+ .m-markdown ul,
343
+ .m-markdown ol {
344
+ padding-inline-start: 30px;
345
+ }
346
+
347
+ .m-markdown-small ul,
348
+ .m-markdown-small ol {
349
+ padding-inline-start: 20px;
350
+ }
351
+
352
+ .m-markdown-small a,
353
+ .m-markdown a {
354
+ color: var(--blue);
355
+ }
356
+
357
+ .m-markdown-small img,
358
+ .m-markdown img {
359
+ max-width: 100%;
360
+ }
361
+
362
+ /* Markdown table */
363
+
364
+ .m-markdown-small table,
365
+ .m-markdown table {
366
+ border-spacing: 0;
367
+ margin: 10px 0;
368
+ border-collapse: separate;
369
+ border: 1px solid var(--border);
370
+ border-radius: min(var(--radius), 0.5rem);
371
+ font-size: calc(var(--font-size-small) + 1px);
372
+ line-height: calc(var(--font-size-small) + 4px);
373
+ /* Wide tables scroll inside their own box instead of widening the page */
374
+ display: block;
375
+ width: max-content;
376
+ max-width: 100%;
377
+ overflow-x: auto;
378
+ }
379
+
380
+ .m-markdown-small table {
381
+ font-size: var(--font-size-small);
382
+ line-height: calc(var(--font-size-small) + 2px);
383
+ margin: 8px 0;
384
+ }
385
+
386
+ .m-markdown-small td,
387
+ .m-markdown-small th,
388
+ .m-markdown td,
389
+ .m-markdown th {
390
+ vertical-align: top;
391
+ border-top: 1px solid var(--border);
392
+ line-height: calc(var(--font-size-small) + 4px);
393
+ }
394
+
395
+ .m-markdown-small tr:first-child th,
396
+ .m-markdown tr:first-child th {
397
+ border-top: 0 none;
398
+ }
399
+
400
+ .m-markdown th,
401
+ .m-markdown td {
402
+ padding: 10px 12px;
403
+ }
404
+
405
+ .m-markdown-small th,
406
+ .m-markdown-small td {
407
+ padding: 8px 8px;
408
+ }
409
+
410
+ .m-markdown th,
411
+ .m-markdown-small th {
412
+ font-weight: 600;
413
+ background: var(--card);
414
+ vertical-align: middle;
415
+ }
416
+
417
+ .m-markdown-small table code,
418
+ .m-markdown table code {
419
+ font-size: calc(var(--font-size-mono) - 1px);
420
+ }
421
+
422
+ .m-markdown blockquote,
423
+ .m-markdown-small blockquote {
424
+ margin-inline-start: 0;
425
+ margin-inline-end: 0;
426
+ border-inline-start: 3px solid var(--border);
427
+ padding: 6px 0 6px 6px;
428
+ }
429
+ .m-markdown hr {
430
+ border: 1px solid var(--border);
431
+ }
432
+ `;
@@ -0,0 +1,36 @@
1
+ import { css } from "lit";
2
+
3
+ export default css`
4
+ #api-title .version {
5
+ display: inline-block;
6
+ vertical-align: middle;
7
+ margin-inline-start: 0.5em;
8
+ padding: 0.125em 0.5em;
9
+ border: 1px solid var(--border);
10
+ border-radius: var(--radius);
11
+ background: var(--muted);
12
+ color: var(--muted-foreground);
13
+ font-family: var(--font-mono);
14
+ font-size: var(--font-size-small);
15
+ font-weight: 500;
16
+ line-height: 1.5;
17
+ letter-spacing: normal;
18
+ }
19
+
20
+ #api-info {
21
+ font-size: calc(var(--font-size-regular) - 1px);
22
+ margin-top: 8px;
23
+ }
24
+
25
+ #api-info span:before {
26
+ content: '|';
27
+ display: inline-block;
28
+ opacity: 0.5;
29
+ width: 15px;
30
+ text-align: center;
31
+ }
32
+ #api-info span:first-child:before {
33
+ content: '';
34
+ width: 0px;
35
+ }
36
+ `;