@scalar/nuxt 0.3.33 → 0.3.34
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.
package/dist/module.d.mts
CHANGED
|
@@ -22,6 +22,7 @@ type ModuleOptions = {
|
|
|
22
22
|
* configurations. These configurations will extend over the base config
|
|
23
23
|
*/
|
|
24
24
|
configurations: Omit<Configuration, 'devtools'>[];
|
|
25
|
+
layout: string | false;
|
|
25
26
|
} & Configuration;
|
|
26
27
|
declare const _default: _nuxt_schema.NuxtModule<ModuleOptions>;
|
|
27
28
|
|
package/dist/module.d.ts
CHANGED
|
@@ -22,6 +22,7 @@ type ModuleOptions = {
|
|
|
22
22
|
* configurations. These configurations will extend over the base config
|
|
23
23
|
*/
|
|
24
24
|
configurations: Omit<Configuration, 'devtools'>[];
|
|
25
|
+
layout: string | false;
|
|
25
26
|
} & Configuration;
|
|
26
27
|
declare const _default: _nuxt_schema.NuxtModule<ModuleOptions>;
|
|
27
28
|
|
package/dist/module.json
CHANGED
package/dist/module.mjs
CHANGED
|
@@ -16,7 +16,8 @@ const module = defineNuxtModule({
|
|
|
16
16
|
},
|
|
17
17
|
showSidebar: true,
|
|
18
18
|
devtools: true,
|
|
19
|
-
configurations: []
|
|
19
|
+
configurations: [],
|
|
20
|
+
layout: false
|
|
20
21
|
},
|
|
21
22
|
setup(_options, _nuxt) {
|
|
22
23
|
const resolver = createResolver(import.meta.url);
|
|
@@ -57,6 +58,7 @@ const module = defineNuxtModule({
|
|
|
57
58
|
name: "scalar-" + index,
|
|
58
59
|
path: configuration.pathRouting?.basePath + ":pathMatch(.*)*",
|
|
59
60
|
meta: {
|
|
61
|
+
layout: _options.layout,
|
|
60
62
|
configuration,
|
|
61
63
|
isOpenApiEnabled
|
|
62
64
|
},
|
|
@@ -68,6 +70,7 @@ const module = defineNuxtModule({
|
|
|
68
70
|
name: "scalar",
|
|
69
71
|
path: _options.pathRouting?.basePath + ":pathMatch(.*)*",
|
|
70
72
|
meta: {
|
|
73
|
+
layout: _options.layout,
|
|
71
74
|
configuration: _options,
|
|
72
75
|
isOpenApiEnabled
|
|
73
76
|
},
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<script lang="ts" setup>
|
|
2
2
|
import { ModernLayout, parse } from '@scalar/api-reference'
|
|
3
3
|
import type { ApiReferenceConfiguration } from '@scalar/types/api-reference'
|
|
4
|
-
import { useHead, useRequestURL, useSeoMeta } from '#imports'
|
|
4
|
+
import { useFetch, useHead, useRequestURL, useSeoMeta } from '#imports'
|
|
5
5
|
import type { Configuration } from '~/src/types'
|
|
6
6
|
import { reactive, ref, toRaw } from 'vue'
|
|
7
7
|
|
|
@@ -23,8 +23,9 @@ const document =
|
|
|
23
23
|
: content
|
|
24
24
|
? toRaw(content)
|
|
25
25
|
: url
|
|
26
|
-
? await
|
|
27
|
-
: await
|
|
26
|
+
? (await useFetch<string>(url, { responseType: 'text' })).data.value
|
|
27
|
+
: (await useFetch<string>('/_openapi.json', { responseType: 'text' }))
|
|
28
|
+
.data.value
|
|
28
29
|
|
|
29
30
|
// Check for empty spec
|
|
30
31
|
if (!document) {
|
package/package.json
CHANGED
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"testing",
|
|
21
21
|
"vue"
|
|
22
22
|
],
|
|
23
|
-
"version": "0.3.
|
|
23
|
+
"version": "0.3.34",
|
|
24
24
|
"engines": {
|
|
25
25
|
"node": ">=18"
|
|
26
26
|
},
|
|
@@ -39,9 +39,9 @@
|
|
|
39
39
|
],
|
|
40
40
|
"dependencies": {
|
|
41
41
|
"@nuxt/kit": "^3.12.3",
|
|
42
|
-
"@scalar/api-client": "2.3.
|
|
43
|
-
"@scalar/
|
|
44
|
-
"@scalar/
|
|
42
|
+
"@scalar/api-client": "2.3.34",
|
|
43
|
+
"@scalar/api-reference": "1.28.34",
|
|
44
|
+
"@scalar/types": "0.1.16"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
47
|
"@nuxt/devtools": "^1.3.9",
|