@scalar/api-reference 0.6.14 → 0.6.16
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 +23 -0
- package/README.md +52 -6
- package/dist/browser/standalone.js +1276 -1153
- package/dist/components/Content/EndpointsOverview.vue.d.ts.map +1 -1
- package/dist/components/Content/MarkdownRenderer.vue.d.ts.map +1 -1
- package/dist/components/Content/ReferenceEndpoint/ExampleRequest.vue.d.ts.map +1 -1
- package/dist/components/DarkModeToggle.vue.d.ts +3 -0
- package/dist/components/DarkModeToggle.vue.d.ts.map +1 -0
- package/dist/components/Icon/icons/index.d.ts +1 -1
- package/dist/components/Icon/icons/index.d.ts.map +1 -1
- package/dist/components/Sidebar.vue.d.ts.map +1 -1
- package/dist/components/SidebarElement.vue.d.ts.map +1 -1
- package/dist/hooks/index.d.ts +3 -0
- package/dist/hooks/index.d.ts.map +1 -0
- package/dist/hooks/useDarkModeState.d.ts +6 -0
- package/dist/hooks/useDarkModeState.d.ts.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +6020 -5920
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,28 @@
|
|
|
1
1
|
# @scalar/api-reference
|
|
2
2
|
|
|
3
|
+
## 0.6.16
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 0f87c35d: feat: add dark mode toggle 👀
|
|
8
|
+
- 3dd2574d: sidebar toggle not flex aligned + fix folder colors
|
|
9
|
+
- Updated dependencies [30aee7d1]
|
|
10
|
+
- Updated dependencies [99744358]
|
|
11
|
+
- Updated dependencies [24deb723]
|
|
12
|
+
- Updated dependencies [3dd2574d]
|
|
13
|
+
- @scalar/api-client@0.7.12
|
|
14
|
+
- @scalar/swagger-editor@0.6.14
|
|
15
|
+
|
|
16
|
+
## 0.6.15
|
|
17
|
+
|
|
18
|
+
### Patch Changes
|
|
19
|
+
|
|
20
|
+
- 7b6c21e5: request history ui and some other small type changes
|
|
21
|
+
- Updated dependencies [7b6c21e5]
|
|
22
|
+
- @scalar/api-client@0.7.11
|
|
23
|
+
- @scalar/use-modal@0.1.3
|
|
24
|
+
- @scalar/swagger-editor@0.6.13
|
|
25
|
+
|
|
3
26
|
## 0.6.14
|
|
4
27
|
|
|
5
28
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -23,28 +23,74 @@ import { ApiReference } from '@scalar/api-reference'
|
|
|
23
23
|
</template>
|
|
24
24
|
```
|
|
25
25
|
|
|
26
|
+
You can even [mount the component in React](https://github.com/scalar/scalar/blob/main/projects/react/src/App.tsx).
|
|
27
|
+
|
|
26
28
|
## Props
|
|
27
29
|
|
|
28
|
-
|
|
30
|
+
#### isEditable?: boolean
|
|
31
|
+
|
|
32
|
+
Whether the Swagger editor should be shown.
|
|
29
33
|
|
|
30
34
|
```vue
|
|
31
35
|
<ApiReference :isEditable="true" />
|
|
32
36
|
```
|
|
33
37
|
|
|
34
|
-
|
|
38
|
+
#### spec?: string
|
|
39
|
+
|
|
40
|
+
Directly pass an OpenAPI/Swagger spec.
|
|
35
41
|
|
|
36
42
|
```vue
|
|
37
|
-
<ApiReference spec="{ … }" />
|
|
43
|
+
<ApiReference :spec="{ … }" />
|
|
38
44
|
```
|
|
39
45
|
|
|
40
|
-
|
|
46
|
+
#### specUrl?: string
|
|
47
|
+
|
|
48
|
+
Pass the URL of a spec file (JSON or Yaml).
|
|
41
49
|
|
|
42
50
|
```vue
|
|
43
51
|
<ApiReference specUrl="/swagger.json" />
|
|
44
52
|
```
|
|
45
53
|
|
|
46
|
-
|
|
54
|
+
#### transformedSpec?: string
|
|
55
|
+
|
|
56
|
+
You can preprocess specs with `@scalar/swagger-parser` and directly pass the result.
|
|
57
|
+
|
|
58
|
+
```vue
|
|
59
|
+
<ApiReference :specResult="{ … }" />
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
#### proxyUrl?: string
|
|
63
|
+
|
|
64
|
+
Making requests to other domains is restricted in the browser and requires [CORS headers](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS). It’s recommended to use a proxy to send requests to other origins.
|
|
65
|
+
|
|
66
|
+
```vue
|
|
67
|
+
<ApiReference proxyUrl="https://proxy.example.com" />
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
ℹ️ You can use [@scalar/api-client-proxy](https://github.com/scalar/scalar/tree/main/packages/api-client-proxy) to host your own proxy.
|
|
71
|
+
|
|
72
|
+
#### initialTabState?: string
|
|
73
|
+
|
|
74
|
+
You can decide which tab should be active by default:
|
|
75
|
+
|
|
76
|
+
```vue
|
|
77
|
+
<ApiReference initialTabState="Getting Started" />
|
|
78
|
+
<!-- or -->
|
|
79
|
+
<ApiReference initialTabState="Swagger Editor" />
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
#### showSidebar?: boolean
|
|
83
|
+
|
|
84
|
+
Whether the sidebar should be shown.
|
|
85
|
+
|
|
86
|
+
```vue
|
|
87
|
+
<ApiReference :showSidebar="true" />
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
#### footerBelowSidebar?: boolean
|
|
91
|
+
|
|
92
|
+
Whether the footer should below the content or below the content _and_ the sidebar.
|
|
47
93
|
|
|
48
94
|
```vue
|
|
49
|
-
<ApiReference
|
|
95
|
+
<ApiReference :footerBelowSidebar="true" />
|
|
50
96
|
```
|