@scalar/api-reference 1.28.1 → 1.28.3

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 (83) hide show
  1. package/CHANGELOG.md +41 -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 +11624 -11582
  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/ClientLibraries/ClientLibraries.vue.d.ts.map +1 -1
  11. package/dist/components/Content/ClientLibraries/ClientLibraries.vue.js +2 -2
  12. package/dist/components/Content/ClientLibraries/ClientLibraries.vue2.js +48 -40
  13. package/dist/components/Content/ClientLibraries/ClientSelector.vue.d.ts.map +1 -1
  14. package/dist/components/Content/ClientLibraries/ClientSelector.vue.js +2 -2
  15. package/dist/components/Content/ClientLibraries/ClientSelector.vue2.js +6 -7
  16. package/dist/components/Content/Content.vue.d.ts.map +1 -1
  17. package/dist/components/Content/Content.vue.js +2 -2
  18. package/dist/components/Content/Content.vue2.js +97 -71
  19. package/dist/components/Content/Introduction/Introduction.vue.d.ts.map +1 -1
  20. package/dist/components/Content/Introduction/Introduction.vue.js +2 -2
  21. package/dist/components/Content/Introduction/Introduction.vue2.js +18 -18
  22. package/dist/components/Content/Lazy/Loading.vue.d.ts +3 -0
  23. package/dist/components/Content/Lazy/Loading.vue.d.ts.map +1 -1
  24. package/dist/components/Content/Lazy/Loading.vue.js +58 -56
  25. package/dist/components/Content/Schema/SchemaPropertyHeading.vue.d.ts.map +1 -1
  26. package/dist/components/Content/Schema/SchemaPropertyHeading.vue.js +1 -1
  27. package/dist/components/Content/Schema/SchemaPropertyHeading.vue2.js +77 -77
  28. package/dist/components/Content/Tag/OperationsList.vue.d.ts +2 -0
  29. package/dist/components/Content/Tag/OperationsList.vue.d.ts.map +1 -1
  30. package/dist/components/Content/Tag/OperationsList.vue.js +2 -2
  31. package/dist/components/Content/Tag/OperationsList.vue2.js +22 -20
  32. package/dist/components/Content/Tag/OperationsListItem.vue.d.ts +2 -0
  33. package/dist/components/Content/Tag/OperationsListItem.vue.d.ts.map +1 -1
  34. package/dist/components/Content/Tag/OperationsListItem.vue.js +2 -2
  35. package/dist/components/Content/Tag/OperationsListItem.vue2.js +10 -8
  36. package/dist/components/Content/Tag/Tag.vue.d.ts +2 -0
  37. package/dist/components/Content/Tag/Tag.vue.d.ts.map +1 -1
  38. package/dist/components/Content/Tag/Tag.vue.js +38 -34
  39. package/dist/components/Content/Tag/TagList.vue.d.ts +3 -0
  40. package/dist/components/Content/Tag/TagList.vue.d.ts.map +1 -1
  41. package/dist/components/Content/Tag/TagList.vue.js +32 -30
  42. package/dist/components/Content/Tag/TagSection.vue.d.ts +2 -0
  43. package/dist/components/Content/Tag/TagSection.vue.d.ts.map +1 -1
  44. package/dist/components/Content/Tag/TagSection.vue.js +2 -2
  45. package/dist/components/Content/Tag/TagSection.vue2.js +16 -14
  46. package/dist/components/Section/CompactSection.vue.d.ts.map +1 -1
  47. package/dist/components/Section/CompactSection.vue.js +1 -1
  48. package/dist/components/ShowMoreButton.vue.d.ts.map +1 -1
  49. package/dist/components/ShowMoreButton.vue.js +2 -2
  50. package/dist/components/Sidebar/SidebarElement.vue.d.ts.map +1 -1
  51. package/dist/components/Sidebar/SidebarElement.vue.js +2 -2
  52. package/dist/components/Sidebar/SidebarElement.vue2.js +41 -40
  53. package/dist/features/ApiClientModal/useApiClient.d.ts +6 -6
  54. package/dist/features/ApiClientModal/useApiClient.d.ts.map +1 -1
  55. package/dist/features/BaseUrl/BaseUrl.vue.d.ts +6 -1
  56. package/dist/features/BaseUrl/BaseUrl.vue.d.ts.map +1 -1
  57. package/dist/features/BaseUrl/BaseUrl.vue.js +36 -32
  58. package/dist/features/Operation/Operation.vue.d.ts +1 -1
  59. package/dist/features/Operation/Operation.vue.d.ts.map +1 -1
  60. package/dist/features/Operation/Operation.vue.js +13 -12
  61. package/dist/features/Operation/components/ParameterListItem.vue.d.ts.map +1 -1
  62. package/dist/features/Operation/components/ParameterListItem.vue.js +2 -2
  63. package/dist/features/Operation/components/ParameterListItem.vue2.js +11 -8
  64. package/dist/features/Operation/layouts/ModernLayout.vue.d.ts.map +1 -1
  65. package/dist/features/Operation/layouts/ModernLayout.vue.js +1 -1
  66. package/dist/features/Operation/layouts/ModernLayout.vue2.js +9 -8
  67. package/dist/helpers/scrollToId.d.ts +3 -1
  68. package/dist/helpers/scrollToId.d.ts.map +1 -1
  69. package/dist/helpers/scrollToId.js +4 -4
  70. package/dist/hooks/useMultipleDocuments.d.ts.map +1 -1
  71. package/dist/hooks/useMultipleDocuments.js +49 -41
  72. package/dist/hooks/useSidebar.d.ts +2 -2
  73. package/dist/hooks/useSidebar.d.ts.map +1 -1
  74. package/dist/hooks/useSidebar.js +84 -84
  75. package/dist/index.d.ts +1 -1
  76. package/dist/index.d.ts.map +1 -1
  77. package/dist/index.js +1 -1
  78. package/dist/standalone/lib/html-api.d.ts +8 -9
  79. package/dist/standalone/lib/html-api.d.ts.map +1 -1
  80. package/dist/style.css +1 -1
  81. package/dist/types.d.ts +2 -2
  82. package/dist/types.d.ts.map +1 -1
  83. package/package.json +11 -10
package/CHANGELOG.md CHANGED
@@ -1,5 +1,46 @@
1
1
  # @scalar/api-reference
2
2
 
3
+ ## 1.28.3
4
+
5
+ ### Patch Changes
6
+
7
+ - cd75eeb: fix: update collection in multi doc
8
+ - 39c0f47: chore: export multi doc types
9
+ - b4a8f65: feat: adds badges + show more button fixtures
10
+ - Updated dependencies [cd75eeb]
11
+ - Updated dependencies [39c0f47]
12
+ - Updated dependencies [4093692]
13
+ - @scalar/api-client@2.3.3
14
+ - @scalar/oas-utils@0.2.120
15
+ - @scalar/types@0.1.1
16
+ - @scalar/openapi-parser@0.10.10
17
+ - @scalar/snippetz@0.2.16
18
+ - @scalar/themes@0.9.79
19
+ - @scalar/code-highlight@0.0.25
20
+ - @scalar/components@0.13.37
21
+ - @scalar/use-hooks@0.1.33
22
+
23
+ ## 1.28.2
24
+
25
+ ### Patch Changes
26
+
27
+ - 22c7445: fix: updates collapsible section trigger style
28
+ - 3a956c0: fix: hides sidebar arrow on default open all tags configuration
29
+ - cf58fba: fix(api-reference): focus and screenreader improvements for client libraries, endpoints list and API client
30
+ - da6bbc5: feat: show if a parameter is deprecated
31
+ - Updated dependencies [e0ee082]
32
+ - Updated dependencies [1437882]
33
+ - Updated dependencies [060ada9]
34
+ - Updated dependencies [cf58fba]
35
+ - Updated dependencies [e00fa7e]
36
+ - Updated dependencies [632978d]
37
+ - @scalar/components@0.13.36
38
+ - @scalar/api-client@2.3.2
39
+ - @scalar/themes@0.9.78
40
+ - @scalar/code-highlight@0.0.25
41
+ - @scalar/oas-utils@0.2.119
42
+ - @scalar/use-hooks@0.1.32
43
+
3
44
  ## 1.28.1
4
45
 
5
46
  ### 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
  };