@scalar/api-reference 1.35.5 → 1.35.7

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 (225) hide show
  1. package/CHANGELOG.md +53 -0
  2. package/dist/blocks/helpers/getPointer.d.ts.map +1 -1
  3. package/dist/browser/standalone.js +19316 -19449
  4. package/dist/browser/webpack-stats.json +1 -1
  5. package/dist/components/Anchor/WithBreadcrumb.vue2.js +8 -11
  6. package/dist/components/ApiReference.vue.js +1 -1
  7. package/dist/components/ApiReferenceLayout.vue.js +4 -4
  8. package/dist/components/ApiReferenceLayout.vue2.js +247 -268
  9. package/dist/components/Badge/Badge.vue.js +1 -1
  10. package/dist/components/ClassicHeader.vue.js +1 -1
  11. package/dist/components/Content/Content.vue.js +145 -169
  12. package/dist/components/Content/Content.vue3.js +1 -1
  13. package/dist/components/Content/Models/ClassicLayout.vue.js +1 -1
  14. package/dist/components/Content/Models/ClassicLayout.vue2.js +32 -35
  15. package/dist/components/Content/Models/Models.vue.js +27 -31
  16. package/dist/components/Content/Models/ModernLayout.vue.js +1 -1
  17. package/dist/components/Content/Operations/TraversedEntry.vue.js +32 -35
  18. package/dist/components/Content/Operations/TraversedEntryContainer.vue.js +26 -27
  19. package/dist/components/Content/Operations/get-current-index.js +1 -1
  20. package/dist/components/Content/Schema/Schema.vue.js +1 -1
  21. package/dist/components/Content/Schema/Schema.vue2.js +68 -74
  22. package/dist/components/Content/Schema/SchemaComposition.vue.js +42 -45
  23. package/dist/components/Content/Schema/SchemaEnumPropertyItem.vue.js +1 -1
  24. package/dist/components/Content/Schema/SchemaEnumValues.vue.js +1 -1
  25. package/dist/components/Content/Schema/SchemaEnumValues.vue2.js +45 -50
  26. package/dist/components/Content/Schema/SchemaHeading.vue.js +1 -1
  27. package/dist/components/Content/Schema/SchemaObjectProperties.vue.js +41 -48
  28. package/dist/components/Content/Schema/SchemaProperty.vue.js +1 -1
  29. package/dist/components/Content/Schema/SchemaProperty.vue2.js +142 -157
  30. package/dist/components/Content/Schema/SchemaPropertyDetail.vue.js +1 -1
  31. package/dist/components/Content/Schema/SchemaPropertyExamples.vue.js +1 -1
  32. package/dist/components/Content/Schema/SchemaPropertyHeading.vue.js +1 -1
  33. package/dist/components/Content/Schema/SchemaPropertyHeading.vue2.js +160 -164
  34. package/dist/components/Content/Schema/helpers/get-schema-type.js +15 -17
  35. package/dist/components/Content/Schema/helpers/merge-all-of-schemas.js +74 -77
  36. package/dist/components/Content/Schema/helpers/optimize-value-for-display.js +10 -11
  37. package/dist/components/Content/Tags/ClassicLayout.vue.js +1 -1
  38. package/dist/components/Content/Tags/ClassicLayout.vue2.js +36 -39
  39. package/dist/components/Content/Tags/ModernLayout.vue.js +1 -1
  40. package/dist/components/Content/Tags/ModernLayout.vue2.js +31 -35
  41. package/dist/components/Content/Tags/TagSection.vue.js +86 -92
  42. package/dist/components/GettingStarted.vue.js +1 -1
  43. package/dist/components/Lazy/Lazy.vue.d.ts.map +1 -1
  44. package/dist/components/Lazy/Lazy.vue2.js +2 -2
  45. package/dist/components/LinkList/LinkList.vue.js +1 -1
  46. package/dist/components/LoadingSkeleton.vue.js +1 -1
  47. package/dist/components/MobileHeader.vue.d.ts.map +1 -1
  48. package/dist/components/MobileHeader.vue.js +3 -3
  49. package/dist/components/MobileHeader.vue2.js +13 -12
  50. package/dist/components/OperationPath.vue.js +1 -1
  51. package/dist/components/OperationsList/OperationsList.vue.js +1 -1
  52. package/dist/components/OperationsList/OperationsList.vue2.js +45 -51
  53. package/dist/components/OperationsList/OperationsListItem.vue.js +1 -1
  54. package/dist/components/ScreenReader.vue.js +1 -1
  55. package/dist/components/Section/CompactSection.vue.js +1 -1
  56. package/dist/components/Section/Section.vue.js +1 -1
  57. package/dist/components/Section/Section.vue2.js +13 -14
  58. package/dist/components/Section/SectionAccordion.vue.js +1 -1
  59. package/dist/components/Section/SectionAccordion.vue2.js +29 -30
  60. package/dist/components/Section/SectionColumn.vue.js +1 -1
  61. package/dist/components/Section/SectionColumns.vue.js +1 -1
  62. package/dist/components/Section/SectionContainer.vue.js +1 -1
  63. package/dist/components/Section/SectionContainerAccordion.vue.js +1 -1
  64. package/dist/components/Section/SectionContent.vue.js +1 -1
  65. package/dist/components/Section/SectionHeader.vue.js +1 -1
  66. package/dist/components/Section/SectionHeaderTag.vue.js +1 -1
  67. package/dist/components/SectionFlare/SectionFlare.vue.js +1 -1
  68. package/dist/components/ShowMoreButton.vue.js +1 -1
  69. package/dist/components/ShowMoreButton.vue2.js +12 -13
  70. package/dist/features/Operation/Operation.vue.js +31 -36
  71. package/dist/features/Operation/components/Headers.vue.js +1 -1
  72. package/dist/features/Operation/components/OperationParameters.vue.js +8 -11
  73. package/dist/features/Operation/components/ParameterList.vue.js +21 -24
  74. package/dist/features/Operation/components/ParameterListItem.vue.js +1 -1
  75. package/dist/features/Operation/components/ParameterListItem.vue2.js +36 -37
  76. package/dist/features/Operation/components/RequestBody.vue.js +1 -1
  77. package/dist/features/Operation/components/RequestBody.vue2.js +45 -52
  78. package/dist/features/Operation/components/callbacks/Callback.vue.js +1 -1
  79. package/dist/features/Operation/components/callbacks/Callback.vue2.js +32 -35
  80. package/dist/features/Operation/layouts/ClassicLayout.vue.d.ts.map +1 -1
  81. package/dist/features/Operation/layouts/ClassicLayout.vue.js +4 -4
  82. package/dist/features/Operation/layouts/ClassicLayout.vue2.js +114 -119
  83. package/dist/features/Operation/layouts/ModernLayout.vue.d.ts.map +1 -1
  84. package/dist/features/Operation/layouts/ModernLayout.vue.js +3 -3
  85. package/dist/features/Operation/layouts/ModernLayout.vue2.js +87 -89
  86. package/dist/features/Search/components/SearchButton.vue.js +23 -25
  87. package/dist/features/Search/components/SearchModal.vue.js +1 -1
  88. package/dist/features/Search/components/SearchModal.vue2.js +53 -54
  89. package/dist/features/api-client-modal/ApiClientModal.vue.js +31 -38
  90. package/dist/features/document-source/hooks/useDocumentFetcher.js +17 -18
  91. package/dist/features/document-source/hooks/useDocumentSource.d.ts.map +1 -1
  92. package/dist/features/document-source/hooks/useDocumentSource.js +21 -20
  93. package/dist/features/example-responses/ExampleResponse.vue.js +1 -1
  94. package/dist/features/example-responses/ExampleResponse.vue2.js +23 -26
  95. package/dist/features/example-responses/ExampleResponseTab.vue.js +1 -1
  96. package/dist/features/example-responses/ExampleResponseTabList.vue.js +1 -1
  97. package/dist/features/example-responses/ExampleResponses.vue.js +1 -1
  98. package/dist/features/example-responses/ExampleResponses.vue2.js +128 -153
  99. package/dist/features/info-object/Contact.vue.js +24 -27
  100. package/dist/features/info-object/License.vue.js +26 -29
  101. package/dist/features/multiple-documents/DocumentSelector.vue.js +22 -31
  102. package/dist/features/multiple-documents/useMultipleDocuments.js +52 -56
  103. package/dist/features/sidebar/components/Sidebar.vue.d.ts.map +1 -1
  104. package/dist/features/sidebar/components/Sidebar.vue.js +3 -3
  105. package/dist/features/sidebar/components/Sidebar.vue2.js +74 -79
  106. package/dist/features/sidebar/components/SidebarElement.vue.js +3 -3
  107. package/dist/features/sidebar/components/SidebarElement.vue2.js +52 -53
  108. package/dist/features/sidebar/components/SidebarGroup.vue.js +1 -1
  109. package/dist/features/sidebar/components/SidebarHttpBadge.vue.js +1 -1
  110. package/dist/features/specification-extension/SpecificationExtension.vue2.js +28 -31
  111. package/dist/features/test-request-button/TestRequestButton.vue.js +1 -1
  112. package/dist/features/test-request-button/TestRequestButton.vue2.js +1 -2
  113. package/dist/features/traverse-schema/helpers/traverse-description.js +13 -14
  114. package/dist/features/traverse-schema/helpers/traverse-document.js +14 -15
  115. package/dist/features/traverse-schema/helpers/traverse-paths.js +20 -23
  116. package/dist/features/traverse-schema/helpers/traverse-schemas.js +13 -15
  117. package/dist/features/traverse-schema/helpers/traverse-webhooks.js +8 -10
  118. package/dist/hooks/useFreezing.js +14 -14
  119. package/dist/hooks/useNavState.js +37 -39
  120. package/dist/index.js +2 -2
  121. package/dist/libs/openapi.js +28 -31
  122. package/dist/style.css +1 -1
  123. package/dist/v2/ApiReferenceWorkspace.vue.d.ts.map +1 -1
  124. package/dist/v2/ApiReferenceWorkspace.vue.js +102 -103
  125. package/dist/v2/ApiReferenceWorkspace.vue3.js +1 -1
  126. package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.js +1 -1
  127. package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue2.js +116 -135
  128. package/dist/v2/blocks/scalar-auth-selector-block/components/DeleteRequestAuthModal.vue.js +40 -47
  129. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.js +45 -46
  130. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesInput.vue.js +109 -125
  131. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue.js +1 -1
  132. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.js +84 -84
  133. package/dist/v2/blocks/scalar-auth-selector-block/helpers/update-scheme.js +12 -13
  134. package/dist/v2/blocks/scalar-client-selector-block/components/ClientDropdown.vue.js +1 -1
  135. package/dist/v2/blocks/scalar-client-selector-block/components/ClientDropdown.vue2.js +1 -4
  136. package/dist/v2/blocks/scalar-client-selector-block/components/ClientSelector.vue.js +1 -1
  137. package/dist/v2/blocks/scalar-client-selector-block/components/ClientSelector.vue2.js +77 -82
  138. package/dist/v2/blocks/scalar-info-block/components/DownloadLink.vue.d.ts.map +1 -1
  139. package/dist/v2/blocks/scalar-info-block/components/DownloadLink.vue.js +2 -2
  140. package/dist/v2/blocks/scalar-info-block/components/DownloadLink.vue2.js +56 -50
  141. package/dist/v2/blocks/scalar-info-block/components/InfoDescription.vue.js +1 -1
  142. package/dist/v2/blocks/scalar-info-block/components/IntroductionCard.vue.js +1 -1
  143. package/dist/v2/blocks/scalar-info-block/components/IntroductionCardItem.vue.js +1 -1
  144. package/dist/v2/blocks/scalar-info-block/components/IntroductionLayout.vue.js +1 -1
  145. package/dist/v2/blocks/scalar-info-block/components/IntroductionLayout.vue2.js +74 -89
  146. package/dist/v2/blocks/scalar-request-example-block/components/ExamplePicker.vue2.js +24 -27
  147. package/dist/v2/blocks/scalar-request-example-block/components/RequestExample.vue.d.ts.map +1 -1
  148. package/dist/v2/blocks/scalar-request-example-block/components/RequestExample.vue.js +2 -2
  149. package/dist/v2/blocks/scalar-request-example-block/components/RequestExample.vue2.js +111 -118
  150. package/dist/v2/blocks/scalar-request-example-block/helpers/find-client.js +11 -12
  151. package/dist/v2/blocks/scalar-request-example-block/helpers/get-secrets.js +3 -3
  152. package/dist/v2/blocks/scalar-server-selector-block/components/Selector.vue.js +11 -14
  153. package/dist/v2/blocks/scalar-server-selector-block/components/ServerSelector.vue.js +45 -48
  154. package/dist/v2/helpers/get-document-name.js +10 -10
  155. package/dist/v2/helpers/map-configuration.d.ts.map +1 -1
  156. package/dist/v2/helpers/map-configuration.js +48 -51
  157. package/dist/v2/hooks/use-legacy-store-events.js +44 -48
  158. package/dist/v2/hooks/use-workspace-store-events.js +23 -26
  159. package/package.json +24 -23
  160. package/dist/components/ApiReferenceLayout.vue3.js +0 -4
  161. package/dist/components/ApiReferenceLayout.vue4.js +0 -4
  162. package/dist/components/ApiReferenceLayout.vue5.js +0 -4
  163. package/dist/components/ApiReferenceLayout.vue6.js +0 -4
  164. package/dist/components/Badge/Badge.vue3.js +0 -4
  165. package/dist/components/ClassicHeader.vue2.js +0 -4
  166. package/dist/components/Content/Content.vue2.js +0 -4
  167. package/dist/components/Content/Models/ClassicLayout.vue3.js +0 -4
  168. package/dist/components/Content/Models/ModernLayout.vue3.js +0 -4
  169. package/dist/components/Content/Schema/Schema.vue3.js +0 -4
  170. package/dist/components/Content/Schema/SchemaEnumPropertyItem.vue3.js +0 -4
  171. package/dist/components/Content/Schema/SchemaEnumValues.vue3.js +0 -4
  172. package/dist/components/Content/Schema/SchemaHeading.vue3.js +0 -4
  173. package/dist/components/Content/Schema/SchemaProperty.vue3.js +0 -4
  174. package/dist/components/Content/Schema/SchemaPropertyDetail.vue3.js +0 -4
  175. package/dist/components/Content/Schema/SchemaPropertyExamples.vue3.js +0 -4
  176. package/dist/components/Content/Schema/SchemaPropertyHeading.vue3.js +0 -4
  177. package/dist/components/Content/Tags/ClassicLayout.vue3.js +0 -4
  178. package/dist/components/Content/Tags/ModernLayout.vue3.js +0 -4
  179. package/dist/components/GettingStarted.vue3.js +0 -4
  180. package/dist/components/LinkList/LinkList.vue3.js +0 -4
  181. package/dist/components/LoadingSkeleton.vue3.js +0 -4
  182. package/dist/components/MobileHeader.vue3.js +0 -4
  183. package/dist/components/OperationPath.vue3.js +0 -4
  184. package/dist/components/OperationsList/OperationsList.vue3.js +0 -4
  185. package/dist/components/OperationsList/OperationsListItem.vue3.js +0 -4
  186. package/dist/components/ScreenReader.vue3.js +0 -4
  187. package/dist/components/Section/CompactSection.vue3.js +0 -4
  188. package/dist/components/Section/Section.vue3.js +0 -4
  189. package/dist/components/Section/SectionAccordion.vue3.js +0 -4
  190. package/dist/components/Section/SectionColumn.vue2.js +0 -4
  191. package/dist/components/Section/SectionColumns.vue2.js +0 -4
  192. package/dist/components/Section/SectionContainer.vue3.js +0 -4
  193. package/dist/components/Section/SectionContainerAccordion.vue3.js +0 -4
  194. package/dist/components/Section/SectionContent.vue3.js +0 -4
  195. package/dist/components/Section/SectionHeader.vue3.js +0 -4
  196. package/dist/components/Section/SectionHeaderTag.vue3.js +0 -4
  197. package/dist/components/SectionFlare/SectionFlare.vue2.js +0 -4
  198. package/dist/components/ShowMoreButton.vue3.js +0 -4
  199. package/dist/features/Operation/components/Headers.vue3.js +0 -4
  200. package/dist/features/Operation/components/ParameterListItem.vue3.js +0 -4
  201. package/dist/features/Operation/components/RequestBody.vue3.js +0 -4
  202. package/dist/features/Operation/components/callbacks/Callback.vue3.js +0 -4
  203. package/dist/features/Operation/layouts/ClassicLayout.vue3.js +0 -4
  204. package/dist/features/Operation/layouts/ModernLayout.vue3.js +0 -4
  205. package/dist/features/Search/components/SearchModal.vue3.js +0 -4
  206. package/dist/features/example-responses/ExampleResponse.vue3.js +0 -4
  207. package/dist/features/example-responses/ExampleResponseTab.vue3.js +0 -4
  208. package/dist/features/example-responses/ExampleResponseTabList.vue3.js +0 -4
  209. package/dist/features/example-responses/ExampleResponses.vue3.js +0 -4
  210. package/dist/features/sidebar/components/Sidebar.vue3.js +0 -4
  211. package/dist/features/sidebar/components/SidebarElement.vue3.js +0 -4
  212. package/dist/features/sidebar/components/SidebarGroup.vue3.js +0 -4
  213. package/dist/features/sidebar/components/SidebarHttpBadge.vue3.js +0 -4
  214. package/dist/features/test-request-button/TestRequestButton.vue3.js +0 -4
  215. package/dist/v2/ApiReferenceWorkspace.vue2.js +0 -4
  216. package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue3.js +0 -4
  217. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue3.js +0 -4
  218. package/dist/v2/blocks/scalar-client-selector-block/components/ClientDropdown.vue3.js +0 -4
  219. package/dist/v2/blocks/scalar-client-selector-block/components/ClientSelector.vue3.js +0 -4
  220. package/dist/v2/blocks/scalar-info-block/components/DownloadLink.vue3.js +0 -4
  221. package/dist/v2/blocks/scalar-info-block/components/InfoDescription.vue3.js +0 -4
  222. package/dist/v2/blocks/scalar-info-block/components/IntroductionCard.vue3.js +0 -4
  223. package/dist/v2/blocks/scalar-info-block/components/IntroductionCardItem.vue2.js +0 -4
  224. package/dist/v2/blocks/scalar-info-block/components/IntroductionLayout.vue3.js +0 -4
  225. package/dist/v2/blocks/scalar-request-example-block/components/RequestExample.vue3.js +0 -4
@@ -1,47 +1,43 @@
1
- import { defineComponent as S, ref as g, onMounted as E, watch as b, onBeforeUnmount as B, createElementBlock as R, openBlock as k } from "vue";
2
- import { useActiveEntities as q, useWorkspace as x } from "@scalar/api-client/store";
3
- import { mutateSecuritySchemeDiff as D } from "@scalar/api-client/views/Request/libs";
4
- import { getServersFromDocument as U } from "@scalar/oas-utils/helpers";
5
- import { emitCustomEvent as C } from "@scalar/workspace-store/events";
1
+ import { defineComponent as h, ref as S, onMounted as g, watch as E, onBeforeUnmount as b, createElementBlock as B, openBlock as R } from "vue";
2
+ import { useActiveEntities as k, useWorkspace as q } from "@scalar/api-client/store";
3
+ import { mutateSecuritySchemeDiff as x } from "@scalar/api-client/views/Request/libs";
4
+ import { getServersFromDocument as D } from "@scalar/oas-utils/helpers";
5
+ import { emitCustomEvent as U } from "@scalar/workspace-store/events";
6
6
  import { watchDebounced as f } from "@vueuse/core";
7
- import v from "microdiff";
8
- import { useNavState as y } from "../../hooks/useNavState.js";
9
- import { useApiClient as A } from "./useApiClient.js";
10
- import { useExampleStore as L } from "../../legacy/stores/useExampleStore.js";
11
- const z = /* @__PURE__ */ S({
7
+ import m from "microdiff";
8
+ import { useNavState as C } from "../../hooks/useNavState.js";
9
+ import { useApiClient as y } from "./useApiClient.js";
10
+ import { useExampleStore as A } from "../../legacy/stores/useExampleStore.js";
11
+ const z = /* @__PURE__ */ h({
12
12
  __name: "ApiClientModal",
13
13
  props: {
14
14
  configuration: {},
15
15
  dereferencedDocument: {}
16
16
  },
17
17
  setup(r) {
18
- const u = g(null), { client: i, init: d } = A(), { selectedExampleKey: p, operationId: l } = L(), a = q(), c = x(), { isIntersectionEnabled: m } = y(), h = () => ({
18
+ const n = S(null), { client: u, init: v } = y(), { selectedExampleKey: d, operationId: s } = A(), i = k(), a = q(), { isIntersectionEnabled: l } = C(), p = () => ({
19
19
  name: "on-before-request",
20
20
  hooks: {
21
21
  onBeforeRequest: r.configuration.onBeforeRequest
22
22
  }
23
23
  });
24
- return E(() => {
25
- u.value && d({
26
- el: u.value,
24
+ return g(() => {
25
+ n.value && v({
26
+ el: n.value,
27
27
  configuration: {
28
28
  ...r.configuration,
29
29
  // If the onBeforeRequest hook is configured, we add the plugin to the API client.
30
- plugins: r.configuration.onBeforeRequest ? [h] : []
30
+ plugins: r.configuration.onBeforeRequest ? [p] : []
31
31
  },
32
- store: c
32
+ store: a
33
33
  });
34
34
  }), f(
35
35
  () => r.dereferencedDocument,
36
36
  (e, o) => {
37
- var s, t;
38
- if (!e)
39
- return;
40
- const n = v(e, o || {});
41
- n != null && n.length && (a.activeCollection.value && ((s = i.value) == null || s.resetStore()), c.importSpecFile(void 0, "default", {
37
+ !e || !m(e, o || {})?.length || (i.activeCollection.value && u.value?.resetStore(), a.importSpecFile(void 0, "default", {
42
38
  dereferencedDocument: e,
43
39
  shouldLoad: !1,
44
- documentUrl: (t = r.configuration) == null ? void 0 : t.url,
40
+ documentUrl: r.configuration?.url,
45
41
  useCollectionSecurity: !0,
46
42
  ...r.configuration
47
43
  }));
@@ -49,22 +45,22 @@ const z = /* @__PURE__ */ S({
49
45
  ), f(
50
46
  () => r.configuration,
51
47
  (e, o) => {
52
- if (!o || !a.activeCollection.value)
48
+ if (!o || !i.activeCollection.value)
53
49
  return;
54
- const n = v(o, e);
55
- if (!n.some(
50
+ const c = m(o, e);
51
+ if (!c.some(
56
52
  (t) => t.path[0] === "url" || t.path[0] === "content" || t.path[1] === "url" || t.path[1] === "content"
57
53
  )) {
58
- if (n.forEach((t) => {
59
- t.path[0] === "authentication" && D(t, a, c);
54
+ if (c.forEach((t) => {
55
+ t.path[0] === "authentication" && x(t, i, a);
60
56
  }), e.servers || o.servers) {
61
- const t = U(
57
+ const t = D(
62
58
  e.servers ?? r.dereferencedDocument.servers,
63
59
  {
64
60
  baseServerURL: e.baseServerURL
65
61
  }
66
62
  );
67
- C(u.value, "scalar-replace-servers", {
63
+ U(n.value, "scalar-replace-servers", {
68
64
  servers: t,
69
65
  options: {
70
66
  disableOldStoreUpdate: !0
@@ -72,19 +68,16 @@ const z = /* @__PURE__ */ S({
72
68
  });
73
69
  }
74
70
  }
75
- m.value = !1, setTimeout(() => {
76
- m.value = !0;
71
+ l.value = !1, setTimeout(() => {
72
+ l.value = !0;
77
73
  }, 1e3);
78
74
  },
79
75
  { deep: !0, debounce: 300 }
80
- ), b(p, (e) => {
81
- i.value && e && l.value && i.value.updateExample(e, l.value);
82
- }), B(() => {
83
- var e;
84
- return (e = i.value) == null ? void 0 : e.app.unmount();
85
- }), (e, o) => (k(), R("div", {
76
+ ), E(d, (e) => {
77
+ u.value && e && s.value && u.value.updateExample(e, s.value);
78
+ }), b(() => u.value?.app.unmount()), (e, o) => (R(), B("div", {
86
79
  ref_key: "el",
87
- ref: u
80
+ ref: n
88
81
  }, null, 512));
89
82
  }
90
83
  });
@@ -1,35 +1,34 @@
1
1
  import { fetchDocument as i, prettyPrintJson as f } from "@scalar/oas-utils/helpers";
2
- import { ref as s, watch as m, toValue as u } from "vue";
2
+ import { ref as s, watch as m, toValue as c } from "vue";
3
3
  function l({
4
- configuration: r
4
+ configuration: e
5
5
  }) {
6
6
  const t = s("");
7
7
  return m(
8
- () => u(r),
9
- async (n) => {
10
- var e, o;
11
- if (!n)
8
+ () => c(e),
9
+ async (r) => {
10
+ if (!r)
12
11
  return;
13
- const c = await a(n, (e = u(r)) == null ? void 0 : e.proxyUrl, (o = u(r)) == null ? void 0 : o.fetch);
14
- typeof c == "string" && (t.value = c.trim());
12
+ const o = await a(r, c(e)?.proxyUrl, c(e)?.fetch);
13
+ typeof o == "string" && (t.value = o.trim());
15
14
  },
16
15
  { immediate: !0, deep: !0 }
17
16
  ), {
18
17
  originalDocument: t
19
18
  };
20
19
  }
21
- const a = async ({ url: r, content: t }, n, c) => {
22
- if (r && !t)
20
+ const a = async ({ url: e, content: t }, r, o) => {
21
+ if (e && !t)
23
22
  try {
24
- return await i(r, n, c);
25
- } catch (o) {
26
- console.error("Failed to fetch OpenAPI document from URL:", o);
23
+ return await i(e, r, o);
24
+ } catch (u) {
25
+ console.error("Failed to fetch OpenAPI document from URL:", u);
27
26
  }
28
- const e = typeof t == "function" ? t() : t;
29
- if (typeof e == "string")
30
- return e;
31
- if (typeof e == "object")
32
- return f(e);
27
+ const n = typeof t == "function" ? t() : t;
28
+ if (typeof n == "string")
29
+ return n;
30
+ if (typeof n == "object")
31
+ return f(n);
33
32
  };
34
33
  export {
35
34
  l as useDocumentFetcher
@@ -1 +1 @@
1
- {"version":3,"file":"useDocumentSource.d.ts","sourceRoot":"","sources":["../../../../src/features/document-source/hooks/useDocumentSource.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAA;AAG1F,OAAO,KAAK,EAAW,WAAW,EAAE,MAAM,uBAAuB,CAAA;AACjE,OAAO,EAAE,KAAK,yBAAyB,EAAmC,MAAM,6BAA6B,CAAA;AAC7G,OAAO,EAAE,KAAK,gBAAgB,EAAE,KAAK,GAAG,EAAiC,MAAM,KAAK,CAAA;AAIpF;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,EAChC,gBAAgB,EAAE,wBAAwB,EAC1C,oBAAoB,EAAE,4BAA4B,EAClD,aAAa,GACd,EAAE;IACD,gBAAgB,CAAC,EAAE,gBAAgB,CAAC,MAAM,CAAC,CAAA;IAC3C,oBAAoB,CAAC,EAAE,gBAAgB,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAA;IAC7D,aAAa,CAAC,EAAE,gBAAgB,CAAC,yBAAyB,CAAC,CAAA;CAC5D,GAAG;IACF,gBAAgB,EAAE,GAAG,CAAC,MAAM,CAAC,CAAA;IAC7B,sBAAsB,EAAE,GAAG,CAAC,MAAM,CAAC,CAAA;IACnC,oBAAoB,EAAE,GAAG,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAA;IAC/C,cAAc,EAAE,UAAU,CAAC,OAAO,oBAAoB,CAAC,CAAA;IACvD,mBAAmB,EAAE,UAAU,CAAC,OAAO,yBAAyB,CAAC,CAAA;CAClE,CA2GA"}
1
+ {"version":3,"file":"useDocumentSource.d.ts","sourceRoot":"","sources":["../../../../src/features/document-source/hooks/useDocumentSource.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAA;AAG1F,OAAO,KAAK,EAAW,WAAW,EAAE,MAAM,uBAAuB,CAAA;AAEjE,OAAO,EAAE,KAAK,yBAAyB,EAAmC,MAAM,6BAA6B,CAAA;AAC7G,OAAO,EAAE,KAAK,gBAAgB,EAAE,KAAK,GAAG,EAAiC,MAAM,KAAK,CAAA;AAIpF;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,EAChC,gBAAgB,EAAE,wBAAwB,EAC1C,oBAAoB,EAAE,4BAA4B,EAClD,aAAa,GACd,EAAE;IACD,gBAAgB,CAAC,EAAE,gBAAgB,CAAC,MAAM,CAAC,CAAA;IAC3C,oBAAoB,CAAC,EAAE,gBAAgB,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAA;IAC7D,aAAa,CAAC,EAAE,gBAAgB,CAAC,yBAAyB,CAAC,CAAA;CAC5D,GAAG;IACF,gBAAgB,EAAE,GAAG,CAAC,MAAM,CAAC,CAAA;IAC7B,sBAAsB,EAAE,GAAG,CAAC,MAAM,CAAC,CAAA;IACnC,oBAAoB,EAAE,GAAG,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAA;IAC/C,cAAc,EAAE,UAAU,CAAC,OAAO,oBAAoB,CAAC,CAAA;IACvD,mBAAmB,EAAE,UAAU,CAAC,OAAO,yBAAyB,CAAC,CAAA;CAClE,CA2GA"}
@@ -1,17 +1,18 @@
1
1
  import { createWorkspaceStore as v, createActiveEntitiesStore as y } from "@scalar/api-client/store";
2
2
  import { measureAsync as P } from "@scalar/helpers/testing/measure";
3
- import { normalize as w, upgrade as O, dereference as V } from "@scalar/openapi-parser";
3
+ import { normalize as w, dereference as O } from "@scalar/openapi-parser";
4
+ import { upgrade as V } from "@scalar/openapi-upgrader";
4
5
  import { apiReferenceConfigurationSchema as D } from "@scalar/types/api-reference";
5
- import { computed as f, toValue as t, ref as l, watch as F } from "vue";
6
+ import { computed as f, toValue as r, ref as l, watch as F } from "vue";
6
7
  import { useDocumentFetcher as I } from "./useDocumentFetcher.js";
7
- function C({
8
+ function L({
8
9
  originalDocument: c,
9
- dereferencedDocument: o,
10
+ dereferencedDocument: t,
10
11
  configuration: i
11
12
  }) {
12
13
  const { originalDocument: d } = I({
13
14
  configuration: i
14
- }), s = f(() => c ? t(c) : t(d)), n = l(""), h = f(() => o ? t(o) : t(u)), u = l({
15
+ }), s = f(() => c ? r(c) : r(d)), o = l(""), h = f(() => t ? r(t) : r(u)), u = l({
15
16
  openapi: "3.1.0",
16
17
  info: {
17
18
  title: "",
@@ -20,32 +21,32 @@ function C({
20
21
  paths: {}
21
22
  });
22
23
  F(
23
- () => t(s),
24
- async (a) => {
25
- if (!a)
24
+ () => r(s),
25
+ async (n) => {
26
+ if (!n)
26
27
  return;
27
- const e = w(a);
28
+ const e = w(n);
28
29
  if (e === void 0) {
29
- console.error("Failed to parse the OpenAPI document:", a);
30
+ console.error("Failed to parse the OpenAPI document:", n);
30
31
  return;
31
32
  }
32
- if (n.value = typeof e == "object" && (e.openapi || e.swagger) || "", o)
33
+ if (o.value = typeof e == "object" && (e.openapi || e.swagger) || "", t)
33
34
  return;
34
- const S = !n.value.startsWith("3.1") ? (
35
+ const S = !o.value.startsWith("3.1") ? (
35
36
  // Upgrade needed
36
- O(e).specification
37
+ V(e, "3.1")
37
38
  ) : (
38
39
  // Skip the upgrade
39
40
  e
40
41
  ), A = await P("dereference", async () => {
41
- const { schema: p, errors: r } = await V(S);
42
- return r != null && r.length && console.warn(
42
+ const { schema: p, errors: a } = await O(S);
43
+ return a?.length && console.warn(
43
44
  `Please open an issue on https://github.com/scalar/scalar
44
45
  `,
45
46
  `Scalar OpenAPI Parser Warning:
46
47
  `,
47
- r
48
- ), p === void 0 && console.error("Failed to dereference the OpenAPI document", r), p;
48
+ a
49
+ ), p === void 0 && console.error("Failed to dereference the OpenAPI document", a), p;
49
50
  });
50
51
  u.value = A;
51
52
  },
@@ -53,16 +54,16 @@ function C({
53
54
  );
54
55
  const m = v({
55
56
  useLocalStorage: !1,
56
- ...t(i) ?? D.parse({})
57
+ ...r(i) ?? D.parse({})
57
58
  }), g = y(m);
58
59
  return {
59
60
  originalDocument: s,
60
- originalOpenApiVersion: n,
61
+ originalOpenApiVersion: o,
61
62
  dereferencedDocument: h,
62
63
  workspaceStore: m,
63
64
  activeEntitiesStore: g
64
65
  };
65
66
  }
66
67
  export {
67
- C as useDocumentSource
68
+ L as useDocumentSource
68
69
  };
@@ -1,5 +1,5 @@
1
1
  import o from "./ExampleResponse.vue2.js";
2
- import "./ExampleResponse.vue3.js";
2
+ /* empty css */
3
3
  import p from "../../_virtual/_plugin-vue_export-helper.js";
4
4
  const r = /* @__PURE__ */ p(o, [["__scopeId", "data-v-d0d01485"]]);
5
5
  export {
@@ -1,37 +1,34 @@
1
- import { defineComponent as m, createBlock as r, createElementBlock as a, openBlock as t, unref as e } from "vue";
2
- import { ScalarCodeBlock as l } from "@scalar/components";
3
- import { getExampleFromSchema as p } from "@scalar/oas-utils/spec-getters";
4
- import { getResolvedRef as c } from "@scalar/workspace-store/helpers/get-resolved-ref";
5
- import { getResolvedRefDeep as f } from "./helpers/get-resolved-ref-deep.js";
6
- const i = {
1
+ import { defineComponent as r, createBlock as n, createElementBlock as l, openBlock as t, unref as e } from "vue";
2
+ import { ScalarCodeBlock as s } from "@scalar/components";
3
+ import { getExampleFromSchema as m } from "@scalar/oas-utils/spec-getters";
4
+ import { getResolvedRef as a } from "@scalar/workspace-store/helpers/get-resolved-ref";
5
+ import { getResolvedRefDeep as p } from "./helpers/get-resolved-ref-deep.js";
6
+ const c = {
7
7
  key: 2,
8
8
  class: "empty-state"
9
- }, v = /* @__PURE__ */ m({
9
+ }, _ = /* @__PURE__ */ r({
10
10
  __name: "ExampleResponse",
11
11
  props: {
12
12
  response: {},
13
13
  example: {}
14
14
  },
15
- setup(d) {
16
- return (o, u) => {
17
- var n, s;
18
- return o.example !== void 0 ? (t(), r(e(l), {
19
- key: 0,
20
- class: "bg-b-2 -outline-offset-2",
21
- content: (n = e(f)(o.example)) == null ? void 0 : n.value,
22
- lang: "json"
23
- }, null, 8, ["content"])) : (s = o.response) != null && s.schema ? (t(), r(e(l), {
24
- key: 1,
25
- class: "bg-b-2 -outline-offset-2",
26
- content: e(p)(e(c)(o.response.schema), {
27
- emptyString: "string",
28
- mode: "read"
29
- }),
30
- lang: "json"
31
- }, null, 8, ["content"])) : (t(), a("div", i, " No Body "));
32
- };
15
+ setup(f) {
16
+ return (o, i) => o.example !== void 0 ? (t(), n(e(s), {
17
+ key: 0,
18
+ class: "bg-b-2 -outline-offset-2",
19
+ content: e(p)(o.example)?.value,
20
+ lang: "json"
21
+ }, null, 8, ["content"])) : o.response?.schema ? (t(), n(e(s), {
22
+ key: 1,
23
+ class: "bg-b-2 -outline-offset-2",
24
+ content: e(m)(e(a)(o.response.schema), {
25
+ emptyString: "string",
26
+ mode: "read"
27
+ }),
28
+ lang: "json"
29
+ }, null, 8, ["content"])) : (t(), l("div", c, " No Body "));
33
30
  }
34
31
  });
35
32
  export {
36
- v as default
33
+ _ as default
37
34
  };
@@ -1,5 +1,5 @@
1
1
  import o from "./ExampleResponseTab.vue2.js";
2
- import "./ExampleResponseTab.vue3.js";
2
+ /* empty css */
3
3
  import e from "../../_virtual/_plugin-vue_export-helper.js";
4
4
  const m = /* @__PURE__ */ e(o, [["__scopeId", "data-v-c8207e48"]]);
5
5
  export {
@@ -1,5 +1,5 @@
1
1
  import o from "./ExampleResponseTabList.vue2.js";
2
- import "./ExampleResponseTabList.vue3.js";
2
+ /* empty css */
3
3
  import t from "../../_virtual/_plugin-vue_export-helper.js";
4
4
  const a = /* @__PURE__ */ t(o, [["__scopeId", "data-v-fec8fbbb"]]);
5
5
  export {
@@ -1,5 +1,5 @@
1
1
  import o from "./ExampleResponses.vue2.js";
2
- import "./ExampleResponses.vue3.js";
2
+ /* empty css */
3
3
  import p from "../../_virtual/_plugin-vue_export-helper.js";
4
4
  const m = /* @__PURE__ */ p(o, [["__scopeId", "data-v-7dc85889"]]);
5
5
  export {