@scalar/nextjs-api-reference 0.8.22 → 0.9.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.
- package/CHANGELOG.md +17 -0
- package/dist/index.cjs +4 -5
- package/dist/index.d.ts +1 -1
- package/dist/index.js +4 -5
- package/dist/index.umd.cjs +4 -5
- package/package.json +7 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
# @scalar/nextjs-api-reference
|
|
2
2
|
|
|
3
|
+
## 0.9.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#7105](https://github.com/scalar/scalar/pull/7105) [`c713362`](https://github.com/scalar/scalar/commit/c7133623da7ac5f2cfe501ad55fffb89978f21f1) Thanks [@marcalexiei](https://github.com/marcalexiei)! - feat(next-js): make `ApiReference` return a synchronous route handler
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- Updated dependencies []:
|
|
12
|
+
- @scalar/core@0.3.21
|
|
13
|
+
|
|
14
|
+
## 0.8.23
|
|
15
|
+
|
|
16
|
+
### Patch Changes
|
|
17
|
+
|
|
18
|
+
- @scalar/core@0.3.20
|
|
19
|
+
|
|
3
20
|
## 0.8.22
|
|
4
21
|
|
|
5
22
|
### Patch Changes
|
package/dist/index.cjs
CHANGED
|
@@ -220,12 +220,11 @@ const ApiReference = (givenConfiguration) => {
|
|
|
220
220
|
...DEFAULT_CONFIGURATION,
|
|
221
221
|
...givenConfiguration
|
|
222
222
|
};
|
|
223
|
-
return
|
|
224
|
-
|
|
223
|
+
return () => {
|
|
224
|
+
const referenceDocument = getHtmlDocument(configuration, customTheme);
|
|
225
|
+
return new Response(referenceDocument, {
|
|
225
226
|
status: 200,
|
|
226
|
-
headers: {
|
|
227
|
-
"Content-Type": "text/html"
|
|
228
|
-
}
|
|
227
|
+
headers: { "Content-Type": "text/html" }
|
|
229
228
|
});
|
|
230
229
|
};
|
|
231
230
|
};
|
package/dist/index.d.ts
CHANGED
|
@@ -8,7 +8,7 @@ import { HtmlRenderingConfiguration } from '@scalar/core/libs/html-rendering';
|
|
|
8
8
|
* @params config - the Api Reference config object
|
|
9
9
|
* @params options - reserved for future use to add customization to the response
|
|
10
10
|
*/
|
|
11
|
-
export declare const ApiReference: (givenConfiguration: Partial<ApiReferenceConfiguration>) => () =>
|
|
11
|
+
export declare const ApiReference: (givenConfiguration: Partial<ApiReferenceConfiguration>) => (() => Response);
|
|
12
12
|
|
|
13
13
|
/**
|
|
14
14
|
* The configuration for the Scalar API Reference for Next.js
|
package/dist/index.js
CHANGED
|
@@ -218,12 +218,11 @@ const ApiReference = (givenConfiguration) => {
|
|
|
218
218
|
...DEFAULT_CONFIGURATION,
|
|
219
219
|
...givenConfiguration
|
|
220
220
|
};
|
|
221
|
-
return
|
|
222
|
-
|
|
221
|
+
return () => {
|
|
222
|
+
const referenceDocument = getHtmlDocument(configuration, customTheme);
|
|
223
|
+
return new Response(referenceDocument, {
|
|
223
224
|
status: 200,
|
|
224
|
-
headers: {
|
|
225
|
-
"Content-Type": "text/html"
|
|
226
|
-
}
|
|
225
|
+
headers: { "Content-Type": "text/html" }
|
|
227
226
|
});
|
|
228
227
|
};
|
|
229
228
|
};
|
package/dist/index.umd.cjs
CHANGED
|
@@ -222,12 +222,11 @@
|
|
|
222
222
|
...DEFAULT_CONFIGURATION,
|
|
223
223
|
...givenConfiguration
|
|
224
224
|
};
|
|
225
|
-
return
|
|
226
|
-
|
|
225
|
+
return () => {
|
|
226
|
+
const referenceDocument = getHtmlDocument(configuration, customTheme);
|
|
227
|
+
return new Response(referenceDocument, {
|
|
227
228
|
status: 200,
|
|
228
|
-
headers: {
|
|
229
|
-
"Content-Type": "text/html"
|
|
230
|
-
}
|
|
229
|
+
headers: { "Content-Type": "text/html" }
|
|
231
230
|
});
|
|
232
231
|
};
|
|
233
232
|
};
|
package/package.json
CHANGED
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"openapi",
|
|
19
19
|
"swagger"
|
|
20
20
|
],
|
|
21
|
-
"version": "0.
|
|
21
|
+
"version": "0.9.0",
|
|
22
22
|
"engines": {
|
|
23
23
|
"node": ">=20"
|
|
24
24
|
},
|
|
@@ -35,19 +35,20 @@
|
|
|
35
35
|
],
|
|
36
36
|
"module": "./dist/index.js",
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@scalar/core": "0.3.
|
|
38
|
+
"@scalar/core": "0.3.21"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
41
|
"@types/node": "^22.9.0",
|
|
42
42
|
"@types/react": "^19.1.8",
|
|
43
43
|
"@types/react-dom": "^19.1.6",
|
|
44
|
-
"@vitejs/plugin-react": "
|
|
44
|
+
"@vitejs/plugin-react": "5.0.4",
|
|
45
45
|
"next": "^15.4.7",
|
|
46
46
|
"react": "^19.1.0",
|
|
47
47
|
"react-dom": "^19.1.0",
|
|
48
|
-
"vite": "7.1.
|
|
48
|
+
"vite": "7.1.11",
|
|
49
49
|
"vite-plugin-dts": "^4.3.0",
|
|
50
|
-
"
|
|
50
|
+
"vitest": "3.2.4",
|
|
51
|
+
"@scalar/api-reference": "1.39.0"
|
|
51
52
|
},
|
|
52
53
|
"peerDependencies": {
|
|
53
54
|
"next": "^15.0.0",
|
|
@@ -60,6 +61,7 @@
|
|
|
60
61
|
"format:check": "scalar-format-check",
|
|
61
62
|
"lint:check": "scalar-lint-check",
|
|
62
63
|
"lint:fix": "scalar-lint-fix",
|
|
64
|
+
"test": "vitest",
|
|
63
65
|
"types:check": "tsc --noEmit --skipLibCheck"
|
|
64
66
|
}
|
|
65
67
|
}
|