@scalar/api-reference 0.1.2 → 0.1.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.
- package/CHANGELOG.md +18 -0
- package/dist/components/ApiReference.vue.d.ts +8 -5
- package/dist/components/ApiReference.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/{index-4b7dc641.js → index-ad012ba6.js} +2230 -191
- package/dist/index.js +33 -34
- package/dist/style.css +290 -256
- package/dist/types.d.ts +2 -2
- package/dist/types.d.ts.map +1 -1
- package/dist/variables.css +132 -0
- package/package.json +6 -6
- package/src/assets/css/variables.css +77 -9
- package/src/components/ApiClientModal.vue +4 -4
- package/src/components/ApiReference.vue +25 -61
- package/src/components/Card/Card.vue +2 -2
- package/src/components/Card/CardContent.vue +1 -1
- package/src/components/Card/CardFooter.vue +1 -1
- package/src/components/Content/Content.vue +2 -2
- package/src/components/Content/Introduction/BaseUrl.vue +1 -1
- package/src/components/Content/Introduction/Introduction.vue +4 -3
- package/src/components/Content/Introduction/LanguageSelector.vue +1 -1
- package/src/components/Content/MarkdownRenderer.vue +15 -7
- package/src/components/Content/ReferenceEndpoint/ExampleRequest.vue +11 -9
- package/src/components/Content/ReferenceEndpoint/ExampleResponses.vue +1 -1
- package/src/components/Content/ReferenceEndpoint/RequestBody.vue +4 -4
- package/src/components/FindAnythingButton.vue +2 -4
- package/src/components/FlowButton.vue +2 -2
- package/src/components/Sidebar.vue +1 -1
- package/src/types.ts +2 -2
- package/vite.config.ts +11 -1
|
@@ -268,7 +268,7 @@ const availableLanguages = computed(() => {
|
|
|
268
268
|
.language-select {
|
|
269
269
|
position: relative;
|
|
270
270
|
padding-right: 9px;
|
|
271
|
-
border-right: 1px solid var(--scalar-api-reference-
|
|
271
|
+
border-right: 1px solid var(--scalar-api-reference-border-color);
|
|
272
272
|
}
|
|
273
273
|
.language-select select {
|
|
274
274
|
border: none;
|
|
@@ -317,13 +317,15 @@ const availableLanguages = computed(() => {
|
|
|
317
317
|
margin-left: 6px;
|
|
318
318
|
border: none;
|
|
319
319
|
border-radius: 3px;
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
.copy-button:hover {
|
|
323
|
+
color: var(--scalar-api-reference-theme-color-1);
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
.copy-button svg {
|
|
327
|
+
width: 13px;
|
|
328
|
+
height: 13px;
|
|
327
329
|
}
|
|
328
330
|
|
|
329
331
|
.show-api-client-button {
|
|
@@ -332,7 +334,7 @@ const availableLanguages = computed(() => {
|
|
|
332
334
|
appearance: none;
|
|
333
335
|
outline: none;
|
|
334
336
|
border: none;
|
|
335
|
-
border-radius: var(--scalar-api-reference-
|
|
337
|
+
border-radius: var(--scalar-api-reference-rounded-lg);
|
|
336
338
|
height: 35px;
|
|
337
339
|
display: flex;
|
|
338
340
|
justify-content: center;
|
|
@@ -124,7 +124,7 @@ watch(selectedResponseIndex, () => {
|
|
|
124
124
|
font-size: var(--scalar-api-reference-theme-mini);
|
|
125
125
|
}
|
|
126
126
|
.scalar-api-reference__empty-state {
|
|
127
|
-
border: 1px dashed var(--scalar-api-reference-
|
|
127
|
+
border: 1px dashed var(--scalar-api-reference-border-color);
|
|
128
128
|
width: 100%;
|
|
129
129
|
text-align: center;
|
|
130
130
|
font-size: var(--scalar-api-reference-theme-mini);
|
|
@@ -30,7 +30,7 @@ defineProps<{ requestBody?: RequestBody }>()
|
|
|
30
30
|
margin-top: 6px;
|
|
31
31
|
}
|
|
32
32
|
.parameter .parameter-child {
|
|
33
|
-
border: var(--scalar-api-reference-
|
|
33
|
+
border: var(--scalar-api-reference-border);
|
|
34
34
|
border-radius: 20px;
|
|
35
35
|
margin-top: 12px;
|
|
36
36
|
width: fit-content;
|
|
@@ -85,7 +85,7 @@ defineProps<{ requestBody?: RequestBody }>()
|
|
|
85
85
|
transform: rotate(45deg);
|
|
86
86
|
}
|
|
87
87
|
.parameter-child__open > .parameter-child-trigger {
|
|
88
|
-
border-bottom: var(--scalar-api-reference-
|
|
88
|
+
border-bottom: var(--scalar-api-reference-border);
|
|
89
89
|
}
|
|
90
90
|
|
|
91
91
|
.parameter {
|
|
@@ -93,13 +93,13 @@ defineProps<{ requestBody?: RequestBody }>()
|
|
|
93
93
|
font-size: var(--scalar-api-reference-theme-small);
|
|
94
94
|
}
|
|
95
95
|
.parameter li {
|
|
96
|
-
border-top: var(--scalar-api-reference-
|
|
96
|
+
border-top: var(--scalar-api-reference-border);
|
|
97
97
|
padding: 12px 0;
|
|
98
98
|
}
|
|
99
99
|
.parameter-name {
|
|
100
100
|
font-weight: 500;
|
|
101
101
|
margin-right: 6px;
|
|
102
|
-
font-family: var(--scalar-api-reference-
|
|
102
|
+
font-family: var(--scalar-api-reference-font-mono);
|
|
103
103
|
font-size: 13px;
|
|
104
104
|
color: var(--scalar-api-reference-theme-color-1);
|
|
105
105
|
}
|
|
@@ -27,11 +27,9 @@ import FlowIcon from './Icon/FlowIcon.vue'
|
|
|
27
27
|
padding: 0 12px;
|
|
28
28
|
|
|
29
29
|
color: var(--scalar-api-reference-theme-color-3);
|
|
30
|
-
border: none;
|
|
31
30
|
outline: none;
|
|
32
|
-
border-radius: var(--scalar-api-reference-
|
|
33
|
-
|
|
34
|
-
box-shadow: 0 0 0 1px var(--scalar-api-reference-sidebar-border-color, var(--scalar-api-reference-theme-border-color));
|
|
31
|
+
border-radius: var(--scalar-api-reference-rounded);
|
|
32
|
+
border: var(--scalar-api-reference-border);
|
|
35
33
|
/* prettier-ignore */
|
|
36
34
|
background: var(--scalar-api-reference-sidebar-search-background, var(--scalar-api-reference-theme-background-1));
|
|
37
35
|
cursor: pointer;
|
|
@@ -53,7 +53,7 @@ export { useLoadButtonState }
|
|
|
53
53
|
-webkit-appearance: none;
|
|
54
54
|
height: 40px;
|
|
55
55
|
padding: 0px 24px;
|
|
56
|
-
border-radius: var(--scalar-api-reference-
|
|
56
|
+
border-radius: var(--scalar-api-reference-rounded);
|
|
57
57
|
color: var(--scalar-api-reference-theme-button-1-color);
|
|
58
58
|
font-size: var(--scalar-api-reference-theme-font-size-4);
|
|
59
59
|
font-weight: 500;
|
|
@@ -90,7 +90,7 @@ export { useLoadButtonState }
|
|
|
90
90
|
background: var(--scalar-api-reference-theme-background-1);
|
|
91
91
|
color: var(--scalar-api-reference-theme-color-1);
|
|
92
92
|
padding: 11px 23px;
|
|
93
|
-
border: var(--scalar-api-reference-
|
|
93
|
+
border: var(--scalar-api-reference-border);
|
|
94
94
|
box-shadow: rgba(0, 0, 0, 0.09) 0px 1px 4px;
|
|
95
95
|
}
|
|
96
96
|
.flow-button-outlined:hover,
|
|
@@ -134,7 +134,7 @@ const {
|
|
|
134
134
|
position: relative;
|
|
135
135
|
cursor: pointer;
|
|
136
136
|
/* prettier-ignore */
|
|
137
|
-
border-radius: 0 var(--scalar-api-reference-
|
|
137
|
+
border-radius: 0 var(--scalar-api-reference-rounded) var(--scalar-api-reference-rounded) 0;
|
|
138
138
|
flex: 1;
|
|
139
139
|
padding-right: 12px;
|
|
140
140
|
user-select: none;
|
package/src/types.ts
CHANGED
package/vite.config.ts
CHANGED
|
@@ -4,15 +4,25 @@ import { defineConfig } from 'vite'
|
|
|
4
4
|
export default defineConfig({
|
|
5
5
|
plugins: [vue()],
|
|
6
6
|
build: {
|
|
7
|
+
cssCodeSplit: true,
|
|
7
8
|
minify: false,
|
|
8
9
|
lib: {
|
|
9
|
-
entry: 'src/index.ts',
|
|
10
|
+
entry: ['src/index.ts', 'src/assets/css/variables.css'],
|
|
10
11
|
name: '@scalar/api-reference',
|
|
11
12
|
fileName: 'index',
|
|
12
13
|
formats: ['es'],
|
|
13
14
|
},
|
|
14
15
|
rollupOptions: {
|
|
15
16
|
external: ['vue'],
|
|
17
|
+
output: {
|
|
18
|
+
assetFileNames: (assetInfo) => {
|
|
19
|
+
if (assetInfo.name === 'index.css') {
|
|
20
|
+
return 'style.css'
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
return assetInfo.name ?? 'default'
|
|
24
|
+
},
|
|
25
|
+
},
|
|
16
26
|
},
|
|
17
27
|
},
|
|
18
28
|
})
|