@scalar/api-client 0.7.35 → 0.7.37
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
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @scalar/api-client
|
|
2
2
|
|
|
3
|
+
## 0.7.37
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- b65840b: refactor: keep track of the collapsed sidebar items in @scalar/api-reference
|
|
8
|
+
|
|
9
|
+
## 0.7.36
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- bc23e62: fix: don’t trim / from the path, if it’s the only character
|
|
14
|
+
|
|
3
15
|
## 0.7.35
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
package/dist/index.js
CHANGED
|
@@ -122,8 +122,7 @@ function defaultState() {
|
|
|
122
122
|
activeApiClientEndpointId: "",
|
|
123
123
|
activeItem: {},
|
|
124
124
|
snippetType: "javascript",
|
|
125
|
-
activeBreadcrumb: ""
|
|
126
|
-
sidebarIdVisibility: {}
|
|
125
|
+
activeBreadcrumb: ""
|
|
127
126
|
};
|
|
128
127
|
}
|
|
129
128
|
const state = reactive(defaultState());
|
|
@@ -149,16 +148,12 @@ function setSnippetType(type) {
|
|
|
149
148
|
function setBreadcrumb(item) {
|
|
150
149
|
state.activeBreadcrumb = item;
|
|
151
150
|
}
|
|
152
|
-
function setSidebarIdVisibility(id2, visible) {
|
|
153
|
-
state.sidebarIdVisibility[id2] = visible;
|
|
154
|
-
}
|
|
155
151
|
const useApiClientStore = () => ({
|
|
156
152
|
state: readonly(state),
|
|
157
153
|
toggleApiClient,
|
|
158
154
|
setActiveApiClientEndpointId,
|
|
159
155
|
setSnippetType,
|
|
160
156
|
setBreadcrumb,
|
|
161
|
-
setSidebarIdVisibility,
|
|
162
157
|
hideApiClient
|
|
163
158
|
});
|
|
164
159
|
const createPlaceholderRequest = () => ({
|
|
@@ -222,6 +217,9 @@ const activeResponse = computed(
|
|
|
222
217
|
const setActiveRequest = (request) => {
|
|
223
218
|
Object.assign(activeRequest, request);
|
|
224
219
|
};
|
|
220
|
+
const resetActiveResponse = () => {
|
|
221
|
+
activeRequestId.value = "";
|
|
222
|
+
};
|
|
225
223
|
const readOnly$1 = ref(true);
|
|
226
224
|
const useRequestStore = () => ({
|
|
227
225
|
authState,
|
|
@@ -232,6 +230,7 @@ const useRequestStore = () => ({
|
|
|
232
230
|
requestHistoryOrder,
|
|
233
231
|
activeRequestId,
|
|
234
232
|
setActiveResponse,
|
|
233
|
+
resetActiveResponse,
|
|
235
234
|
addRequestToHistory,
|
|
236
235
|
setActiveRequest
|
|
237
236
|
});
|
|
@@ -25588,7 +25587,7 @@ const normalizePath = (path) => {
|
|
|
25588
25587
|
return "";
|
|
25589
25588
|
}
|
|
25590
25589
|
let normalizedPath = path.trim();
|
|
25591
|
-
if (normalizedPath.startsWith("/")) {
|
|
25590
|
+
if (normalizedPath.length > 1 && normalizedPath.startsWith("/")) {
|
|
25592
25591
|
normalizedPath = normalizedPath.slice(1);
|
|
25593
25592
|
}
|
|
25594
25593
|
return normalizedPath;
|
|
@@ -1,10 +1,8 @@
|
|
|
1
|
-
export type SidebarIdVisibility = Record<string, boolean>;
|
|
2
1
|
declare function toggleApiClient(item?: any, forceShow?: boolean): void;
|
|
3
2
|
declare function hideApiClient(): void;
|
|
4
3
|
declare function setActiveApiClientEndpointId(id: string): void;
|
|
5
4
|
declare function setSnippetType(type: string): void;
|
|
6
5
|
declare function setBreadcrumb(item: string): void;
|
|
7
|
-
declare function setSidebarIdVisibility(id: string, visible: boolean): void;
|
|
8
6
|
export declare const useApiClientStore: () => {
|
|
9
7
|
state: {
|
|
10
8
|
readonly showApiClient: boolean;
|
|
@@ -12,15 +10,11 @@ export declare const useApiClientStore: () => {
|
|
|
12
10
|
readonly activeItem: any;
|
|
13
11
|
readonly snippetType: string;
|
|
14
12
|
readonly activeBreadcrumb: string;
|
|
15
|
-
readonly sidebarIdVisibility: {
|
|
16
|
-
readonly [x: string]: boolean;
|
|
17
|
-
};
|
|
18
13
|
};
|
|
19
14
|
toggleApiClient: typeof toggleApiClient;
|
|
20
15
|
setActiveApiClientEndpointId: typeof setActiveApiClientEndpointId;
|
|
21
16
|
setSnippetType: typeof setSnippetType;
|
|
22
17
|
setBreadcrumb: typeof setBreadcrumb;
|
|
23
|
-
setSidebarIdVisibility: typeof setSidebarIdVisibility;
|
|
24
18
|
hideApiClient: typeof hideApiClient;
|
|
25
19
|
};
|
|
26
20
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"apiClientStore.d.ts","sourceRoot":"","sources":["../../src/stores/apiClientStore.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"apiClientStore.d.ts","sourceRoot":"","sources":["../../src/stores/apiClientStore.ts"],"names":[],"mappings":"AAsBA,iBAAS,eAAe,CAAC,IAAI,CAAC,EAAE,GAAG,EAAE,SAAS,UAAQ,QASrD;AAED,iBAAS,aAAa,SAErB;AAED,iBAAS,4BAA4B,CAAC,EAAE,EAAE,MAAM,QAE/C;AAED,iBAAS,cAAc,CAAC,IAAI,EAAE,MAAM,QAEnC;AAED,iBAAS,aAAa,CAAC,IAAI,EAAE,MAAM,QAElC;AAED,eAAO,MAAM,iBAAiB;;gCA9Cb,OAAO;4CACK,MAAM;6BACrB,GAAG;8BACF,MAAM;mCACD,MAAM;;;;;;;CAkDxB,CAAA"}
|
|
@@ -68,6 +68,7 @@ export declare const useRequestStore: () => {
|
|
|
68
68
|
requestHistoryOrder: import("vue").Ref<string[]>;
|
|
69
69
|
activeRequestId: import("vue").Ref<string>;
|
|
70
70
|
setActiveResponse: (historyID: string) => void;
|
|
71
|
+
resetActiveResponse: () => void;
|
|
71
72
|
addRequestToHistory: (value: RequestHistoryEntry) => void;
|
|
72
73
|
setActiveRequest: (request: ClientRequestConfig) => void;
|
|
73
74
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"requestStore.d.ts","sourceRoot":"","sources":["../../src/stores/requestStore.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,SAAS,EAAE,mBAAmB,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AAG7E,eAAO,MAAM,oBAAoB,QAAO,SA0BtC,CAAA;AAMF,KAAK,mBAAmB,GAAG,aAAa,CAAA;
|
|
1
|
+
{"version":3,"file":"requestStore.d.ts","sourceRoot":"","sources":["../../src/stores/requestStore.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,SAAS,EAAE,mBAAmB,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AAG7E,eAAO,MAAM,oBAAoB,QAAO,SA0BtC,CAAA;AAMF,KAAK,mBAAmB,GAAG,aAAa,CAAA;AAgExC,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mCAnCU,MAAM;;iCAPR,mBAAmB;gCA0BpB,mBAAmB;CA4BpD,CAAA"}
|
package/package.json
CHANGED
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"rest",
|
|
14
14
|
"testing"
|
|
15
15
|
],
|
|
16
|
-
"version": "0.7.
|
|
16
|
+
"version": "0.7.37",
|
|
17
17
|
"engines": {
|
|
18
18
|
"node": ">=20"
|
|
19
19
|
},
|
|
@@ -43,10 +43,10 @@
|
|
|
43
43
|
"pretty-bytes": "^6.1.1",
|
|
44
44
|
"pretty-ms": "^8.0.0",
|
|
45
45
|
"vue": "^3.3.0",
|
|
46
|
-
"@scalar/themes": "0.4.2",
|
|
47
46
|
"@scalar/use-codemirror": "0.7.15",
|
|
48
47
|
"@scalar/use-keyboard-event": "0.5.6",
|
|
49
|
-
"@scalar/use-modal": "0.1.9"
|
|
48
|
+
"@scalar/use-modal": "0.1.9",
|
|
49
|
+
"@scalar/themes": "0.4.2"
|
|
50
50
|
},
|
|
51
51
|
"devDependencies": {
|
|
52
52
|
"@scalar/use-codemirror": "^0.7.15",
|