@scalar/api-reference 1.28.2 → 1.28.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 +31 -0
- package/dist/blocks/hooks/useBlockProps.d.ts +4 -5
- package/dist/blocks/hooks/useBlockProps.d.ts.map +1 -1
- package/dist/blocks/hooks/useBlockProps.js +10 -14
- package/dist/browser/standalone.js +5352 -5331
- package/dist/browser/webpack-stats.json +1 -1
- package/dist/components/ApiReferenceLayout.vue.d.ts.map +1 -1
- package/dist/components/ApiReferenceLayout.vue.js +2 -2
- package/dist/components/ApiReferenceLayout.vue2.js +103 -109
- package/dist/components/Content/Content.vue.d.ts.map +1 -1
- package/dist/components/Content/Content.vue.js +2 -2
- package/dist/components/Content/Content.vue2.js +97 -71
- package/dist/components/Content/Introduction/Introduction.vue.d.ts.map +1 -1
- package/dist/components/Content/Introduction/Introduction.vue.js +2 -2
- package/dist/components/Content/Introduction/Introduction.vue2.js +18 -18
- package/dist/components/Content/Lazy/Loading.vue.d.ts +3 -0
- package/dist/components/Content/Lazy/Loading.vue.d.ts.map +1 -1
- package/dist/components/Content/Lazy/Loading.vue.js +58 -56
- package/dist/components/Content/Tag/OperationsList.vue.d.ts +2 -0
- package/dist/components/Content/Tag/OperationsList.vue.d.ts.map +1 -1
- package/dist/components/Content/Tag/OperationsList.vue.js +2 -2
- package/dist/components/Content/Tag/OperationsList.vue2.js +22 -20
- package/dist/components/Content/Tag/OperationsListItem.vue.d.ts +2 -0
- package/dist/components/Content/Tag/OperationsListItem.vue.d.ts.map +1 -1
- package/dist/components/Content/Tag/OperationsListItem.vue.js +1 -1
- package/dist/components/Content/Tag/OperationsListItem.vue2.js +10 -8
- package/dist/components/Content/Tag/Tag.vue.d.ts +2 -0
- package/dist/components/Content/Tag/Tag.vue.d.ts.map +1 -1
- package/dist/components/Content/Tag/Tag.vue.js +38 -34
- package/dist/components/Content/Tag/TagList.vue.d.ts +3 -0
- package/dist/components/Content/Tag/TagList.vue.d.ts.map +1 -1
- package/dist/components/Content/Tag/TagList.vue.js +32 -30
- package/dist/components/Content/Tag/TagSection.vue.d.ts +2 -0
- package/dist/components/Content/Tag/TagSection.vue.d.ts.map +1 -1
- package/dist/components/Content/Tag/TagSection.vue.js +2 -2
- package/dist/components/Content/Tag/TagSection.vue2.js +16 -14
- package/dist/components/ShowMoreButton.vue.d.ts.map +1 -1
- package/dist/components/ShowMoreButton.vue.js +2 -2
- package/dist/features/ApiClientModal/useApiClient.d.ts +6 -6
- package/dist/features/ApiClientModal/useApiClient.d.ts.map +1 -1
- package/dist/features/BaseUrl/BaseUrl.vue.d.ts +6 -1
- package/dist/features/BaseUrl/BaseUrl.vue.d.ts.map +1 -1
- package/dist/features/BaseUrl/BaseUrl.vue.js +36 -32
- package/dist/features/Operation/Operation.vue.d.ts +1 -1
- package/dist/features/Operation/Operation.vue.d.ts.map +1 -1
- package/dist/features/Operation/Operation.vue.js +13 -12
- package/dist/features/Operation/components/RequestBody.vue.d.ts.map +1 -1
- package/dist/features/Operation/components/RequestBody.vue.js +2 -2
- package/dist/features/Operation/components/RequestBody.vue2.js +31 -22
- package/dist/features/Search/SearchButton.vue.d.ts.map +1 -1
- package/dist/features/Search/SearchButton.vue.js +2 -2
- package/dist/helpers/get-request.d.ts.map +1 -1
- package/dist/hooks/useMultipleDocuments.d.ts.map +1 -1
- package/dist/hooks/useMultipleDocuments.js +49 -41
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/standalone/lib/html-api.d.ts +8 -9
- package/dist/standalone/lib/html-api.d.ts.map +1 -1
- package/dist/style.css +1 -1
- package/dist/types.d.ts +2 -2
- package/dist/types.d.ts.map +1 -1
- package/package.json +8 -8
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,36 @@
|
|
|
1
1
|
# @scalar/api-reference
|
|
2
2
|
|
|
3
|
+
## 1.28.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- ebc29d5: fix: missing requestBody description
|
|
8
|
+
- 3af0c08: fix(api-references): change search button outline from shadow to border
|
|
9
|
+
- Updated dependencies [ed2b1fb]
|
|
10
|
+
- Updated dependencies [ebc29d5]
|
|
11
|
+
- Updated dependencies [58acdc6]
|
|
12
|
+
- @scalar/api-client@2.3.4
|
|
13
|
+
|
|
14
|
+
## 1.28.3
|
|
15
|
+
|
|
16
|
+
### Patch Changes
|
|
17
|
+
|
|
18
|
+
- cd75eeb: fix: update collection in multi doc
|
|
19
|
+
- 39c0f47: chore: export multi doc types
|
|
20
|
+
- b4a8f65: feat: adds badges + show more button fixtures
|
|
21
|
+
- Updated dependencies [cd75eeb]
|
|
22
|
+
- Updated dependencies [39c0f47]
|
|
23
|
+
- Updated dependencies [4093692]
|
|
24
|
+
- @scalar/api-client@2.3.3
|
|
25
|
+
- @scalar/oas-utils@0.2.120
|
|
26
|
+
- @scalar/types@0.1.1
|
|
27
|
+
- @scalar/openapi-parser@0.10.10
|
|
28
|
+
- @scalar/snippetz@0.2.16
|
|
29
|
+
- @scalar/themes@0.9.79
|
|
30
|
+
- @scalar/code-highlight@0.0.25
|
|
31
|
+
- @scalar/components@0.13.37
|
|
32
|
+
- @scalar/use-hooks@0.1.33
|
|
33
|
+
|
|
3
34
|
## 1.28.2
|
|
4
35
|
|
|
5
36
|
### Patch Changes
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { createWorkspaceStore } from '@scalar/api-client/store';
|
|
2
|
+
import type { Collection } from '@scalar/oas-utils/entities/spec';
|
|
2
3
|
import type { Request as RequestEntity } from '@scalar/oas-utils/entities/spec';
|
|
3
4
|
import { type ComputedRef } from 'vue';
|
|
4
5
|
export type StoreContext = ReturnType<typeof createWorkspaceStore>;
|
|
@@ -17,16 +18,14 @@ export type BlockProps = {
|
|
|
17
18
|
*/
|
|
18
19
|
location: `#/${string}`;
|
|
19
20
|
/**
|
|
20
|
-
* The
|
|
21
|
-
*
|
|
22
|
-
* @default 'default'
|
|
21
|
+
* The collection to use
|
|
23
22
|
*/
|
|
24
|
-
collection
|
|
23
|
+
collection: Collection;
|
|
25
24
|
};
|
|
26
25
|
/**
|
|
27
26
|
* Provides computed properties for the block, based on the standardized interface of the `createStore` function.
|
|
28
27
|
*/
|
|
29
|
-
export declare function useBlockProps({ store, location }: BlockProps): {
|
|
28
|
+
export declare function useBlockProps({ store, location, collection }: BlockProps): {
|
|
30
29
|
operation: ComputedRef<RequestEntity | undefined>;
|
|
31
30
|
};
|
|
32
31
|
//# sourceMappingURL=useBlockProps.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useBlockProps.d.ts","sourceRoot":"","sources":["../../../src/blocks/hooks/useBlockProps.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAA;AACpE,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"useBlockProps.d.ts","sourceRoot":"","sources":["../../../src/blocks/hooks/useBlockProps.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAA;AACpE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAA;AACjE,OAAO,KAAK,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,iCAAiC,CAAA;AAE/E,OAAO,EAAE,KAAK,WAAW,EAAY,MAAM,KAAK,CAAA;AAGhD,MAAM,MAAM,YAAY,GAAG,UAAU,CAAC,OAAO,oBAAoB,CAAC,CAAA;AAElE,MAAM,MAAM,UAAU,GAAG;IACvB;;OAEG;IACH,KAAK,EAAE,YAAY,GAAG,SAAS,CAAA;IAC/B;;;;;;;OAOG;IACH,QAAQ,EAAE,KAAK,MAAM,EAAE,CAAA;IACvB;;OAEG;IACH,UAAU,EAAE,UAAU,CAAA;CACvB,CAAA;AAED;;GAEG;AACH,wBAAgB,aAAa,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,UAAU,EAAE,EAAE,UAAU,GAAG;IAC1E,SAAS,EAAE,WAAW,CAAC,aAAa,GAAG,SAAS,CAAC,CAAA;CAClD,CAgCA"}
|
|
@@ -1,24 +1,20 @@
|
|
|
1
|
-
import { unescapeJsonPointer as
|
|
2
|
-
import { computed as
|
|
3
|
-
function h({ store:
|
|
4
|
-
const s = i(() => Object.values((e == null ? void 0 : e.collections) ?? {})[0]);
|
|
1
|
+
import { unescapeJsonPointer as a } from "@scalar/openapi-parser";
|
|
2
|
+
import { computed as c } from "vue";
|
|
3
|
+
function h({ store: t, location: o, collection: n }) {
|
|
5
4
|
return {
|
|
6
|
-
operation:
|
|
7
|
-
if (!(
|
|
5
|
+
operation: c(() => {
|
|
6
|
+
if (!(t != null && t.collections) || !t.requests)
|
|
8
7
|
return;
|
|
9
|
-
const
|
|
10
|
-
(
|
|
11
|
-
var n;
|
|
12
|
-
return (n = s.value) == null ? void 0 : n.requests.includes(t.uid);
|
|
13
|
-
}
|
|
8
|
+
const s = Object.values(t.requests).filter(
|
|
9
|
+
(e) => n.requests.includes(e.uid)
|
|
14
10
|
);
|
|
15
11
|
if (!o.startsWith("#/paths/"))
|
|
16
12
|
throw new Error(
|
|
17
13
|
"Invalid location, try using #/paths/$YOUR_ENDPOINT/$HTTP_METHOD. You can use the getPointer helper to generate a valid location: getPointer(['paths', '/planets/{planetId}', 'get'])"
|
|
18
14
|
);
|
|
19
|
-
return
|
|
20
|
-
const
|
|
21
|
-
return
|
|
15
|
+
return s.find((e) => {
|
|
16
|
+
const i = a(o.split("/")[2]), r = o.split("/")[3].toLocaleLowerCase();
|
|
17
|
+
return e.method === r && e.path === i;
|
|
22
18
|
});
|
|
23
19
|
})
|
|
24
20
|
};
|