@camunda8/docusaurus-theme-openapi-docs 4.5.2 → 4.5.4
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.
|
@@ -400,7 +400,13 @@ function CodeSnippets({
|
|
|
400
400
|
},
|
|
401
401
|
includeVariant: true,
|
|
402
402
|
currentLanguage: lang,
|
|
403
|
-
defaultValue:
|
|
403
|
+
defaultValue:
|
|
404
|
+
selectedVariant &&
|
|
405
|
+
lang.variants
|
|
406
|
+
.map((v) => v.toLowerCase())
|
|
407
|
+
.includes(selectedVariant)
|
|
408
|
+
? selectedVariant
|
|
409
|
+
: lang.variants[0]?.toLowerCase(),
|
|
404
410
|
languageSet: mergedLangs,
|
|
405
411
|
lazy: true,
|
|
406
412
|
},
|
|
@@ -410,7 +416,7 @@ function CodeSnippets({
|
|
|
410
416
|
{
|
|
411
417
|
value: variant.toLowerCase(),
|
|
412
418
|
label: variant.toUpperCase(),
|
|
413
|
-
key: `${lang.language}-${
|
|
419
|
+
key: `${lang.language}-${variant}`,
|
|
414
420
|
attributes: {
|
|
415
421
|
className: `openapi-tabs__code-item--variant`,
|
|
416
422
|
},
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@camunda8/docusaurus-theme-openapi-docs",
|
|
3
3
|
"description": "OpenAPI theme for Docusaurus.",
|
|
4
|
-
"version": "4.5.
|
|
4
|
+
"version": "4.5.4",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"openapi",
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"prepare": "npm run build"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
|
-
"@camunda8/docusaurus-plugin-openapi-docs": "^4.5.
|
|
32
|
+
"@camunda8/docusaurus-plugin-openapi-docs": "^4.5.3",
|
|
33
33
|
"@docusaurus/theme-classic": "^3.5.0",
|
|
34
34
|
"@docusaurus/theme-common": "^3.5.0",
|
|
35
35
|
"@docusaurus/types": "^3.5.0",
|
|
@@ -345,7 +345,14 @@ function CodeSnippets({
|
|
|
345
345
|
}}
|
|
346
346
|
includeVariant={true}
|
|
347
347
|
currentLanguage={lang}
|
|
348
|
-
defaultValue={
|
|
348
|
+
defaultValue={
|
|
349
|
+
selectedVariant &&
|
|
350
|
+
lang.variants
|
|
351
|
+
.map((v) => v.toLowerCase())
|
|
352
|
+
.includes(selectedVariant)
|
|
353
|
+
? selectedVariant
|
|
354
|
+
: lang.variants[0]?.toLowerCase()
|
|
355
|
+
}
|
|
349
356
|
languageSet={mergedLangs}
|
|
350
357
|
lazy
|
|
351
358
|
>
|
|
@@ -354,7 +361,7 @@ function CodeSnippets({
|
|
|
354
361
|
<CodeTab
|
|
355
362
|
value={variant.toLowerCase()}
|
|
356
363
|
label={variant.toUpperCase()}
|
|
357
|
-
key={`${lang.language}-${
|
|
364
|
+
key={`${lang.language}-${variant}`}
|
|
358
365
|
attributes={{
|
|
359
366
|
className: `openapi-tabs__code-item--variant`,
|
|
360
367
|
}}
|