@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.
Files changed (63) hide show
  1. package/CHANGELOG.md +31 -0
  2. package/dist/blocks/hooks/useBlockProps.d.ts +4 -5
  3. package/dist/blocks/hooks/useBlockProps.d.ts.map +1 -1
  4. package/dist/blocks/hooks/useBlockProps.js +10 -14
  5. package/dist/browser/standalone.js +5352 -5331
  6. package/dist/browser/webpack-stats.json +1 -1
  7. package/dist/components/ApiReferenceLayout.vue.d.ts.map +1 -1
  8. package/dist/components/ApiReferenceLayout.vue.js +2 -2
  9. package/dist/components/ApiReferenceLayout.vue2.js +103 -109
  10. package/dist/components/Content/Content.vue.d.ts.map +1 -1
  11. package/dist/components/Content/Content.vue.js +2 -2
  12. package/dist/components/Content/Content.vue2.js +97 -71
  13. package/dist/components/Content/Introduction/Introduction.vue.d.ts.map +1 -1
  14. package/dist/components/Content/Introduction/Introduction.vue.js +2 -2
  15. package/dist/components/Content/Introduction/Introduction.vue2.js +18 -18
  16. package/dist/components/Content/Lazy/Loading.vue.d.ts +3 -0
  17. package/dist/components/Content/Lazy/Loading.vue.d.ts.map +1 -1
  18. package/dist/components/Content/Lazy/Loading.vue.js +58 -56
  19. package/dist/components/Content/Tag/OperationsList.vue.d.ts +2 -0
  20. package/dist/components/Content/Tag/OperationsList.vue.d.ts.map +1 -1
  21. package/dist/components/Content/Tag/OperationsList.vue.js +2 -2
  22. package/dist/components/Content/Tag/OperationsList.vue2.js +22 -20
  23. package/dist/components/Content/Tag/OperationsListItem.vue.d.ts +2 -0
  24. package/dist/components/Content/Tag/OperationsListItem.vue.d.ts.map +1 -1
  25. package/dist/components/Content/Tag/OperationsListItem.vue.js +1 -1
  26. package/dist/components/Content/Tag/OperationsListItem.vue2.js +10 -8
  27. package/dist/components/Content/Tag/Tag.vue.d.ts +2 -0
  28. package/dist/components/Content/Tag/Tag.vue.d.ts.map +1 -1
  29. package/dist/components/Content/Tag/Tag.vue.js +38 -34
  30. package/dist/components/Content/Tag/TagList.vue.d.ts +3 -0
  31. package/dist/components/Content/Tag/TagList.vue.d.ts.map +1 -1
  32. package/dist/components/Content/Tag/TagList.vue.js +32 -30
  33. package/dist/components/Content/Tag/TagSection.vue.d.ts +2 -0
  34. package/dist/components/Content/Tag/TagSection.vue.d.ts.map +1 -1
  35. package/dist/components/Content/Tag/TagSection.vue.js +2 -2
  36. package/dist/components/Content/Tag/TagSection.vue2.js +16 -14
  37. package/dist/components/ShowMoreButton.vue.d.ts.map +1 -1
  38. package/dist/components/ShowMoreButton.vue.js +2 -2
  39. package/dist/features/ApiClientModal/useApiClient.d.ts +6 -6
  40. package/dist/features/ApiClientModal/useApiClient.d.ts.map +1 -1
  41. package/dist/features/BaseUrl/BaseUrl.vue.d.ts +6 -1
  42. package/dist/features/BaseUrl/BaseUrl.vue.d.ts.map +1 -1
  43. package/dist/features/BaseUrl/BaseUrl.vue.js +36 -32
  44. package/dist/features/Operation/Operation.vue.d.ts +1 -1
  45. package/dist/features/Operation/Operation.vue.d.ts.map +1 -1
  46. package/dist/features/Operation/Operation.vue.js +13 -12
  47. package/dist/features/Operation/components/RequestBody.vue.d.ts.map +1 -1
  48. package/dist/features/Operation/components/RequestBody.vue.js +2 -2
  49. package/dist/features/Operation/components/RequestBody.vue2.js +31 -22
  50. package/dist/features/Search/SearchButton.vue.d.ts.map +1 -1
  51. package/dist/features/Search/SearchButton.vue.js +2 -2
  52. package/dist/helpers/get-request.d.ts.map +1 -1
  53. package/dist/hooks/useMultipleDocuments.d.ts.map +1 -1
  54. package/dist/hooks/useMultipleDocuments.js +49 -41
  55. package/dist/index.d.ts +1 -1
  56. package/dist/index.d.ts.map +1 -1
  57. package/dist/index.js +1 -1
  58. package/dist/standalone/lib/html-api.d.ts +8 -9
  59. package/dist/standalone/lib/html-api.d.ts.map +1 -1
  60. package/dist/style.css +1 -1
  61. package/dist/types.d.ts +2 -2
  62. package/dist/types.d.ts.map +1 -1
  63. 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 name of the collection to use
21
- *
22
- * @default 'default'
21
+ * The collection to use
23
22
  */
24
- collection?: string;
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,EAAc,OAAO,IAAI,aAAa,EAAE,MAAM,iCAAiC,CAAA;AAE3F,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;;;;OAIG;IACH,UAAU,CAAC,EAAE,MAAM,CAAA;CACpB,CAAA;AAED;;GAEG;AACH,wBAAgB,aAAa,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE,UAAU,GAAG;IAC9D,SAAS,EAAE,WAAW,CAAC,aAAa,GAAG,SAAS,CAAC,CAAA;CAClD,CA4CA"}
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 r } from "@scalar/openapi-parser";
2
- import { computed as i } from "vue";
3
- function h({ store: e, location: o }) {
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: i(() => {
7
- if (!(e != null && e.collections) || !e.requests)
5
+ operation: c(() => {
6
+ if (!(t != null && t.collections) || !t.requests)
8
7
  return;
9
- const c = Object.values(e.requests).filter(
10
- (t) => {
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 c.find((t) => {
20
- const n = r(o.split("/")[2]), l = o.split("/")[3].toLocaleLowerCase();
21
- return t.method === l && t.path === n;
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
  };