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,485 @@
1
+ /**
2
+ * Renders path, query, header, and cookie parameter inputs, schema tree previews, constraints, and clickable example badges for <api-request>.
3
+ */
4
+ import { html } from "lit";
5
+ import { unsafeHTML } from "lit/directives/unsafe-html.js";
6
+ import { live } from "lit/directives/live.js";
7
+ import { sanitizeHTML } from "../utils/sanitize.js";
8
+ import { marked } from "marked";
9
+ import {
10
+ schemaToAST,
11
+ getTypeInfo,
12
+ normalizeExamples,
13
+ getSchemaFromParam,
14
+ generateExample,
15
+ standardizeExample,
16
+ anyExampleWithSummaryOrDescription,
17
+ EMPTY_ARRAY,
18
+ } from "~/utils/schema-utils";
19
+ import "~/components/schema-tree";
20
+ import "~/components/tag-input";
21
+
22
+ /**
23
+ * A label followed by a wrapping list of values (Allowed values, Examples).
24
+ * Wrapped lines hang under the first value; CSS draws the separators.
25
+ */
26
+ export function valueListTemplate(label, items) {
27
+ return html`<div class="value-list" part="value-list">
28
+ <span class="param-constraint-label value-list-label" part="value-list-label">${label}</span>
29
+ <ul class="value-list-items" part="value-list-items" role="list">
30
+ ${items.map((item) => html`<li>${item}</li>`)}
31
+ </ul>
32
+ </div>`;
33
+ }
34
+
35
+ /**
36
+ * Constraints as label/value pairs. The labels share one column, so every value starts at the same place,
37
+ * whether there is one constraint or several. Limits (range, multiple of, length) and allowed values wrap
38
+ * as value lists, hanging under their first value.
39
+ */
40
+ export function constraintListTemplate(paramSchema, allowedItems, exampleItems) {
41
+ const valueItems = (items) =>
42
+ html`<ul class="value-list-items" part="value-list-items" role="list">
43
+ ${items.map((item) => html`<li>${item}</li>`)}
44
+ </ul>`;
45
+ const row = (label, value) =>
46
+ html`<dt class="param-constraint-label" part="param-constraint-label">${label}</dt>
47
+ <dd>${value}</dd>`;
48
+ return html`<dl class="param-constraint" part="param-constraint">
49
+ ${paramSchema.default ? row("Default:", paramSchema.default) : ""} ${paramSchema.pattern ? row("Pattern:", paramSchema.pattern) : ""}
50
+ ${
51
+ paramSchema.constrain
52
+ ? row(
53
+ "Limits:",
54
+ valueItems(
55
+ paramSchema.constrain
56
+ .split("┃")
57
+ .map((v) => v.trim())
58
+ .filter(Boolean),
59
+ ),
60
+ )
61
+ : ""
62
+ }
63
+ ${allowedItems ? row("Allowed:", valueItems(allowedItems)) : ""} ${exampleItems ? row("Examples:", valueItems(exampleItems)) : ""}
64
+ </dl>`;
65
+ }
66
+
67
+ /**
68
+ * Short examples join the constraint list (lined up with the other values) when there is no description to put them under.
69
+ * Long-format examples, with a summary or description, always stay in the details.
70
+ */
71
+ export function examplesBesideConstraints(description, hasConstraint, exampleList = []) {
72
+ return (
73
+ !description?.trim() &&
74
+ Boolean(hasConstraint) &&
75
+ exampleList.length > 0 &&
76
+ !anyExampleWithSummaryOrDescription(exampleList)
77
+ );
78
+ }
79
+
80
+ export function renderExample(example, paramType, paramName) {
81
+ return html`
82
+ ${paramType === "array" ? "[" : ""}
83
+ <button
84
+ type="button"
85
+ part="anchor anchor-param-example"
86
+ class="value-chip"
87
+ ?disabled="${this.allowTry !== "true"}"
88
+ data-example-type="${paramType === "array" ? paramType : "string"}"
89
+ data-example="${
90
+ example.value && Array.isArray(example.value)
91
+ ? example.value?.join("~|~")
92
+ : (typeof example.value === "object"
93
+ ? JSON.stringify(example.value, null, 2)
94
+ : example.value) || ""
95
+ }"
96
+ title="${
97
+ example.value && Array.isArray(example.value)
98
+ ? example.value?.join("~|~")
99
+ : (typeof example.value === "object"
100
+ ? JSON.stringify(example.value, null, 2)
101
+ : example.value) || ""
102
+ }"
103
+ @click="${(e) => {
104
+ const inputEl = e.target
105
+ .closest(".param-list")
106
+ .querySelector(`[data-pname="${paramName}"]`);
107
+ if (inputEl) {
108
+ inputEl.value =
109
+ e.target.dataset.exampleType === "array"
110
+ ? e.target.dataset.example.split("~|~")
111
+ : e.target.dataset.example;
112
+ }
113
+ }}"
114
+ >
115
+ ${example.printableValue || example.value}
116
+ </button>
117
+ ${paramType === "array" ? "] " : ""}
118
+ `;
119
+ }
120
+
121
+ export function renderShortFormatExamples(examples, paramType, paramName) {
122
+ return valueListTemplate(
123
+ "Examples:",
124
+ examples.map((x) => renderExample.call(this, x, paramType, paramName)),
125
+ );
126
+ }
127
+
128
+ export function renderLongFormatExamples(exampleList, paramType, paramName) {
129
+ return html` <ul class="param-example-list" part="param-example-list" role="list">
130
+ ${exampleList.map(
131
+ (v) =>
132
+ html`<li>
133
+ ${renderExample.call(this, v, paramType, paramName)} ${v.summary?.length > 0 ? html`<span>&lpar;${v.summary}&rpar;</span>` : ""}
134
+ ${v.description?.length > 0 ? html`<div class="m-markdown-small">${unsafeHTML(sanitizeHTML(marked(v.description)))}</div>` : ""}
135
+ </li>`,
136
+ )}
137
+ </ul>`;
138
+ }
139
+
140
+ export function exampleListTemplate(paramName, paramType, exampleList = []) {
141
+ return html` ${
142
+ exampleList.length > 0
143
+ ? anyExampleWithSummaryOrDescription(exampleList)
144
+ ? html`<span class="param-constraint-label">Examples: </span>
145
+ ${renderLongFormatExamples.call(this, exampleList, paramType, paramName)}`
146
+ : renderShortFormatExamples.call(this, exampleList, paramType, paramName)
147
+ : ""
148
+ }`;
149
+ }
150
+
151
+ // A singular `example` is the value itself, even an object; only an `examples` map wraps its values in { value }
152
+ const singleExample = (ex) =>
153
+ ex !== null && typeof ex === "object" && !Array.isArray(ex)
154
+ ? { Example: { value: ex } }
155
+ : standardizeExample(ex);
156
+
157
+ export function inputParametersTemplate(paramType) {
158
+ const filteredParams = this.parameters
159
+ ? this.parameters.filter((param) => param.in === paramType)
160
+ : [];
161
+ if (filteredParams.length === 0) {
162
+ return "";
163
+ }
164
+ let title = "";
165
+ if (paramType === "path") {
166
+ title = "Path parameters";
167
+ } else if (paramType === "query") {
168
+ title = "Query-string parameters";
169
+ } else if (paramType === "header") {
170
+ title = "Request headers";
171
+ } else if (paramType === "cookie") {
172
+ title = "Cookies";
173
+ }
174
+
175
+ const paramItems = [];
176
+ for (const param of filteredParams) {
177
+ const [declaredParamSchema, serializeStyle, mimeTypeElem] = getSchemaFromParam(param);
178
+ if (!declaredParamSchema) {
179
+ continue;
180
+ }
181
+ const paramSchema = getTypeInfo(declaredParamSchema);
182
+ if (!paramSchema) {
183
+ continue;
184
+ }
185
+ const schemaAsObj = schemaToAST(declaredParamSchema);
186
+ let paramStyle = "form";
187
+ let paramExplode = true;
188
+ let paramAllowReserved = false;
189
+ if (paramType === "query" || paramType === "header" || paramType === "path") {
190
+ if (param.style && "form spaceDelimited pipeDelimited".includes(param.style)) {
191
+ paramStyle = param.style;
192
+ } else if (serializeStyle) {
193
+ paramStyle = serializeStyle;
194
+ }
195
+ if (typeof param.explode === "boolean") {
196
+ paramExplode = param.explode;
197
+ }
198
+ if (typeof param.allowReserved === "boolean") {
199
+ paramAllowReserved = param.allowReserved;
200
+ }
201
+ }
202
+ // openapi 3.1.0 spec based examples (which must be Object(string : { value:any, summary?: string, description?: string})
203
+ const example = normalizeExamples(
204
+ standardizeExample(param.examples) ||
205
+ singleExample(param.example) ||
206
+ singleExample(mimeTypeElem?.example) ||
207
+ standardizeExample(mimeTypeElem?.examples) ||
208
+ standardizeExample(paramSchema.examples) ||
209
+ standardizeExample(paramSchema.example),
210
+ paramSchema.type,
211
+ );
212
+ if (
213
+ !example.exampleVal &&
214
+ (paramSchema.type === "object" || paramSchema.type.split("┃").includes("object"))
215
+ ) {
216
+ example.exampleVal =
217
+ generateExample(
218
+ declaredParamSchema,
219
+ serializeStyle || "json",
220
+ {},
221
+ {},
222
+ this.callback === "true" || this.webhook === "true" ? true : false,
223
+ this.callback === "true" || this.webhook === "true" ? false : true,
224
+ "text",
225
+ false,
226
+ )[0]?.exampleValue || "";
227
+ }
228
+ const hasConstraint =
229
+ paramSchema.default ||
230
+ paramSchema.constrain ||
231
+ paramSchema.allowedValues ||
232
+ paramSchema.pattern;
233
+ const inlineExamples = examplesBesideConstraints(
234
+ param.description,
235
+ hasConstraint,
236
+ example.exampleList,
237
+ );
238
+ paramItems.push(html`
239
+ <li class="param ${param.deprecated ? "deprecated" : ""}" part="param" title="${param.deprecated ? "Deprecated" : ""}">
240
+ <div class="param-label" part="param-label">
241
+ <div class="param-name ${param.deprecated ? "deprecated" : ""}" part="param-name">
242
+ ${
243
+ param.deprecated
244
+ ? html`<svg class="param-deprecated-icon" viewBox="0 0 10 10" width="10" height="10" aria-hidden="true">
245
+ <path d="M2 2L8 8M2 8L8 2" />
246
+ </svg>`
247
+ : ""
248
+ }
249
+ ${param.required ? html`<span class="param-required" title="Required">*</span>` : ""} ${param.name}
250
+ </div>
251
+ <div class="param-type" part="param-type">
252
+ ${
253
+ paramSchema.type === "array" || paramSchema.type.split("┃").includes("array")
254
+ ? `${paramSchema.arrayType || paramSchema.type}`
255
+ : `${paramSchema.format && !paramSchema.type.includes("┃") ? paramSchema.format : paramSchema.contentMediaType && !paramSchema.type.includes("┃") ? paramSchema.contentMediaType : paramSchema.type}`
256
+ }
257
+ </div>
258
+ </div>
259
+ ${
260
+ this.allowTry === "true"
261
+ ? html` <div class="param-input" part="param-input">
262
+ ${
263
+ paramSchema.type === "array" ||
264
+ (paramSchema.type.split("┃").includes("array") &&
265
+ !paramSchema.type.split("┃").includes("object"))
266
+ ? html`<tag-input
267
+ class="request-param"
268
+ id="tag-input-request-param-${param.name}"
269
+ style="width:100%"
270
+ data-ptype="${paramType}"
271
+ data-pname="${param.name}"
272
+ data-item-type="${declaredParamSchema.items?.type || ""}"
273
+ data-example="${Array.isArray(example.exampleVal) ? example.exampleVal.join("~|~") : example.exampleVal}"
274
+ data-param-serialize-style="${paramStyle}"
275
+ data-param-serialize-explode="${paramExplode}"
276
+ data-param-allow-reserved="${paramAllowReserved}"
277
+ data-x-fill-example="${param["x-fill-example"] || "yes"}"
278
+ data-array="true"
279
+ placeholder="add-multiple &#x21a9;"
280
+ .value="${
281
+ param["x-fill-example"] === "no"
282
+ ? EMPTY_ARRAY
283
+ : live(
284
+ this.fillRequestFieldsWithExample === "true"
285
+ ? Array.isArray(example.exampleVal)
286
+ ? example.exampleVal
287
+ : [example.exampleVal]
288
+ : EMPTY_ARRAY,
289
+ )
290
+ }"
291
+ @input="${(e) => {
292
+ const requestPanelEl = this.getRequestPanel(e);
293
+ this.liveCURLSyntaxUpdate(requestPanelEl);
294
+ }}"
295
+ @change="${(e) => {
296
+ const requestPanelEl = this.getRequestPanel(e);
297
+ this.liveCURLSyntaxUpdate(requestPanelEl);
298
+ }}"
299
+ >
300
+ </tag-input>`
301
+ : paramSchema.type === "object" ||
302
+ paramSchema.type.split("┃").includes("object")
303
+ ? html`<div part="tab-panel" class="tab-panel col">
304
+ <div
305
+ part="tab-btn-row"
306
+ class="tab-buttons row"
307
+ @click="${(e) => {
308
+ if (e.target.tagName.toLowerCase() === "button") {
309
+ const newState = { ...this.activeParameterSchemaTabs };
310
+ newState[param.name] = e.target.dataset.tab;
311
+ this.activeParameterSchemaTabs = newState;
312
+ }
313
+ }}"
314
+ >
315
+ <button
316
+ part="tab-btn"
317
+ class="tab-btn ${this.activeParameterSchemaTabs[param.name] === "example" ? "active" : ""}"
318
+ data-tab="example"
319
+ >
320
+ EXAMPLE
321
+ </button>
322
+ <button
323
+ part="tab-btn"
324
+ class="tab-btn ${this.activeParameterSchemaTabs[param.name] !== "example" ? "active" : ""}"
325
+ data-tab="schema"
326
+ >
327
+ SCHEMA
328
+ </button>
329
+ </div>
330
+
331
+ ${html`<div
332
+ part="tab-content"
333
+ class="tab-content col"
334
+ data-tab="example"
335
+ style="display:${
336
+ this.activeParameterSchemaTabs[param.name] === "example"
337
+ ? "block"
338
+ : "none"
339
+ }; padding-left:5px; width:100%"
340
+ >
341
+ <textarea
342
+ id="textarea-request-param-${param.name}"
343
+ class="textarea request-param"
344
+ part="textarea textarea-param"
345
+ data-ptype="${paramType}-object"
346
+ data-pname="${param.name}"
347
+ data-example="${
348
+ typeof example.exampleVal === "object"
349
+ ? JSON.stringify(example.exampleVal, null, 2)
350
+ : example.exampleVal
351
+ }"
352
+ data-param-serialize-style="${paramStyle}"
353
+ data-param-serialize-explode="${paramExplode}"
354
+ data-param-allow-reserved="${paramAllowReserved}"
355
+ data-x-fill-example="${param["x-fill-example"] || "yes"}"
356
+ spellcheck="false"
357
+ .value="${
358
+ param["x-fill-example"] === "no"
359
+ ? ""
360
+ : live(
361
+ this.fillRequestFieldsWithExample === "true"
362
+ ? typeof example.exampleVal === "object"
363
+ ? JSON.stringify(example.exampleVal, null, 2)
364
+ : example.exampleVal
365
+ : "",
366
+ )
367
+ }"
368
+ style="resize:vertical; width:100%; height: ${"read focused".includes(this.renderStyle) ? "180px" : "120px"};"
369
+ @input=${(e) => {
370
+ const requestPanelEl = this.getRequestPanel(e);
371
+ this.liveCURLSyntaxUpdate(requestPanelEl);
372
+ }}
373
+ ></textarea>
374
+ </div>`}
375
+ ${html`<div
376
+ part="tab-content"
377
+ class="tab-content col"
378
+ data-tab="schema"
379
+ style="display:${
380
+ this.activeParameterSchemaTabs[param.name] !== "example"
381
+ ? "block"
382
+ : "none"
383
+ }; padding-left:5px; width:100%;"
384
+ >
385
+ <schema-tree
386
+ class="json"
387
+ style="display: block"
388
+ .data="${schemaAsObj}"
389
+ schema-expand-level="${this.schemaExpandLevel}"
390
+ schema-description-expanded="${this.schemaDescriptionExpanded}"
391
+ allow-schema-description-expand-toggle="${this.allowSchemaDescriptionExpandToggle}"
392
+ schema-hide-read-only="${this.schemaHideReadOnly.includes(this.method)}"
393
+ schema-hide-write-only="${this.schemaHideWriteOnly.includes(this.method)}"
394
+ exportparts="wrap-request-btn:wrap-request-btn, btn:btn, btn-fill:btn-fill, btn-outline:btn-outline, btn-try:btn-try, btn-clear:btn-clear, btn-fill-example:btn-fill-example, btn-clear-resp:btn-clear-resp,
395
+ file-input:file-input, textbox:textbox, textbox-param:textbox-param, textarea:textarea, textarea-param:textarea-param,
396
+ anchor:anchor, anchor-param-example:anchor-param-example"
397
+ >
398
+ </schema-tree>
399
+ </div>`}
400
+ </div>`
401
+ : html` <input
402
+ type="${paramSchema.format === "password" ? "password" : "text"}"
403
+ spellcheck="false"
404
+ style="width:100%"
405
+ id="input-request-param-${param.name}"
406
+ class="request-param"
407
+ part="textbox textbox-param"
408
+ data-ptype="${paramType}"
409
+ data-pname="${param.name}"
410
+ data-example="${Array.isArray(example.exampleVal) ? example.exampleVal.join("~|~") : example.exampleVal}"
411
+ data-param-allow-reserved="${paramAllowReserved}"
412
+ data-x-fill-example="${param["x-fill-example"] || "yes"}"
413
+ data-array="false"
414
+ .value="${
415
+ param["x-fill-example"] === "no"
416
+ ? ""
417
+ : live(
418
+ this.fillRequestFieldsWithExample === "true"
419
+ ? example.exampleVal
420
+ : "",
421
+ )
422
+ }"
423
+ @input=${(e) => {
424
+ const requestPanelEl = this.getRequestPanel(e);
425
+ this.liveCURLSyntaxUpdate(requestPanelEl);
426
+ }}
427
+ />`
428
+ }
429
+ </div>`
430
+ : ""
431
+ }
432
+ ${
433
+ hasConstraint
434
+ ? constraintListTemplate(
435
+ paramSchema,
436
+ paramSchema.allowedValues &&
437
+ String(paramSchema.allowedValues)
438
+ .split("┃")
439
+ .map(
440
+ (v) =>
441
+ html`<button
442
+ type="button"
443
+ part="anchor anchor-param-constraint"
444
+ class="value-chip"
445
+ ?disabled="${this.allowTry !== "true"}"
446
+ data-type="${paramSchema.type === "array" ? paramSchema.type : "string"}"
447
+ data-enum="${v.trim()}"
448
+ @click="${(e) => {
449
+ const inputEl = e.target
450
+ .closest(".param-list")
451
+ .querySelector(`[data-pname="${param.name}"]`);
452
+ if (inputEl) {
453
+ if (e.target.dataset.type === "array") {
454
+ inputEl.value = [e.target.dataset.enum];
455
+ } else {
456
+ inputEl.value = e.target.dataset.enum;
457
+ }
458
+ }
459
+ }}"
460
+ >
461
+ ${v}
462
+ </button>`,
463
+ ),
464
+ inlineExamples &&
465
+ example.exampleList.map((x) =>
466
+ renderExample.call(this, x, paramSchema.type, param.name),
467
+ ),
468
+ )
469
+ : ""
470
+ }
471
+ <div class="param-details" part="param-details">
472
+ ${param.description ? html`<div class="m-markdown-small">${unsafeHTML(sanitizeHTML(marked(param.description)))}</div>` : ""}
473
+ ${inlineExamples ? "" : exampleListTemplate.call(this, param.name, paramSchema.type, example.exampleList)}
474
+ </div>
475
+ </li>
476
+ `);
477
+ }
478
+
479
+ return html` <h5 class="rapidoc-heading label-heading table-title top-gap" part="heading heading-5">${title}</h5>
480
+ <div class="param-list-container">
481
+ <ul class="param-list" part="param-list" role="list">
482
+ ${paramItems}
483
+ </ul>
484
+ </div>`;
485
+ }