@scalar/api-reference 1.30.0 → 1.31.1

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 (167) hide show
  1. package/CHANGELOG.md +50 -0
  2. package/dist/browser/standalone.js +6690 -6569
  3. package/dist/browser/webpack-stats.json +1 -1
  4. package/dist/components/ApiReferenceLayout.vue.d.ts.map +1 -1
  5. package/dist/components/ApiReferenceLayout.vue.js +1 -1
  6. package/dist/components/ApiReferenceLayout.vue2.js +164 -181
  7. package/dist/components/Content/ClientLibraries/ClientLibraries.vue.d.ts.map +1 -1
  8. package/dist/components/Content/ClientLibraries/ClientLibraries.vue.js +2 -2
  9. package/dist/components/Content/ClientLibraries/ClientLibraries.vue2.js +56 -51
  10. package/dist/components/Content/Content.vue.d.ts.map +1 -1
  11. package/dist/components/Content/Content.vue.js +1 -1
  12. package/dist/components/Content/Content.vue2.js +5 -5
  13. package/dist/components/Content/Introduction/Introduction.vue.d.ts +2 -2
  14. package/dist/components/Content/Introduction/Introduction.vue.d.ts.map +1 -1
  15. package/dist/components/Content/Introduction/Introduction.vue.js +2 -2
  16. package/dist/components/Content/Introduction/Introduction.vue2.js +57 -63
  17. package/dist/components/Content/Lazy/Loading.vue.d.ts.map +1 -1
  18. package/dist/components/Content/Lazy/Loading.vue.js +46 -46
  19. package/dist/components/Content/Models/Models.vue.d.ts +2 -2
  20. package/dist/components/Content/Models/Models.vue.d.ts.map +1 -1
  21. package/dist/components/Content/Models/Models.vue.js +2 -2
  22. package/dist/components/Content/Models/Models.vue2.js +9 -7
  23. package/dist/components/Content/Models/ModelsAccordion.vue.d.ts +2 -2
  24. package/dist/components/Content/Models/ModelsAccordion.vue.d.ts.map +1 -1
  25. package/dist/components/Content/Models/ModelsAccordion.vue.js +2 -2
  26. package/dist/components/Content/Schema/Schema.preview.d.ts +294 -84
  27. package/dist/components/Content/Schema/Schema.preview.d.ts.map +1 -1
  28. package/dist/components/Content/Schema/Schema.vue.d.ts +21 -4
  29. package/dist/components/Content/Schema/Schema.vue.d.ts.map +1 -1
  30. package/dist/components/Content/Schema/Schema.vue.js +2 -2
  31. package/dist/components/Content/Schema/Schema.vue2.js +158 -131
  32. package/dist/components/Content/Schema/SchemaComposition.vue.d.ts +2 -2
  33. package/dist/components/Content/Schema/SchemaComposition.vue.d.ts.map +1 -1
  34. package/dist/components/Content/Schema/SchemaComposition.vue.js +57 -53
  35. package/dist/components/Content/Schema/SchemaDiscriminator.vue.d.ts +2 -3
  36. package/dist/components/Content/Schema/SchemaDiscriminator.vue.d.ts.map +1 -1
  37. package/dist/components/Content/Schema/SchemaDiscriminator.vue.js +29 -29
  38. package/dist/components/Content/Schema/SchemaHeading.vue.d.ts +2 -2
  39. package/dist/components/Content/Schema/SchemaHeading.vue.d.ts.map +1 -1
  40. package/dist/components/Content/Schema/SchemaHeading.vue.js +1 -1
  41. package/dist/components/Content/Schema/SchemaProperty.vue.d.ts +12 -3
  42. package/dist/components/Content/Schema/SchemaProperty.vue.d.ts.map +1 -1
  43. package/dist/components/Content/Schema/SchemaProperty.vue.js +1 -1
  44. package/dist/components/Content/Schema/SchemaProperty.vue2.js +133 -103
  45. package/dist/components/Content/Schema/SchemaPropertyHeading.vue.d.ts +3 -2
  46. package/dist/components/Content/Schema/SchemaPropertyHeading.vue.d.ts.map +1 -1
  47. package/dist/components/Content/Schema/SchemaPropertyHeading.vue.js +2 -2
  48. package/dist/components/Content/Schema/SchemaPropertyHeading.vue2.js +133 -126
  49. package/dist/components/Content/Schema/helpers/merge-all-of-schemas.d.ts +2 -2
  50. package/dist/components/Content/Schema/helpers/merge-all-of-schemas.d.ts.map +1 -1
  51. package/dist/components/Content/Tag/TagList.vue.d.ts +2 -2
  52. package/dist/components/Content/Tag/TagList.vue.d.ts.map +1 -1
  53. package/dist/components/DocumentSelector/DocumentSelector.vue.js +3 -3
  54. package/dist/components/Layouts/ClassicLayout.vue.d.ts.map +1 -1
  55. package/dist/components/Layouts/ClassicLayout.vue.js +19 -17
  56. package/dist/components/Layouts/Layouts.vue.js +11 -9
  57. package/dist/components/Layouts/ModernLayout.vue2.js +22 -20
  58. package/dist/components/Section/SectionAccordion.vue.d.ts.map +1 -1
  59. package/dist/components/Section/SectionAccordion.vue.js +2 -2
  60. package/dist/components/Section/SectionAccordion.vue2.js +1 -1
  61. package/dist/components/Section/SectionContainerAccordion.vue.d.ts.map +1 -1
  62. package/dist/components/Section/SectionContainerAccordion.vue.js +2 -2
  63. package/dist/components/Section/SectionContainerAccordion.vue2.js +4 -4
  64. package/dist/components/Section/SectionHeader.vue.d.ts.map +1 -1
  65. package/dist/components/Section/SectionHeader.vue.js +2 -2
  66. package/dist/components/Sidebar/Sidebar.vue.d.ts.map +1 -1
  67. package/dist/components/Sidebar/Sidebar.vue.js +2 -2
  68. package/dist/components/Sidebar/Sidebar.vue2.js +56 -56
  69. package/dist/components/SingleApiReference.vue.d.ts.map +1 -1
  70. package/dist/components/SingleApiReference.vue.js +27 -33
  71. package/dist/esm.d.ts.map +1 -1
  72. package/dist/features/ApiClientModal/ApiClientModal.vue.d.ts +2 -2
  73. package/dist/features/ApiClientModal/ApiClientModal.vue.d.ts.map +1 -1
  74. package/dist/features/ApiClientModal/ApiClientModal.vue.js +49 -50
  75. package/dist/features/ApiClientModal/useApiClient.d.ts +196 -196
  76. package/dist/features/ApiClientModal/useApiClient.d.ts.map +1 -1
  77. package/dist/features/DocumentSource/hooks/useDocumentFetcher.d.ts +11 -0
  78. package/dist/features/DocumentSource/hooks/useDocumentFetcher.d.ts.map +1 -0
  79. package/dist/features/DocumentSource/hooks/useDocumentFetcher.js +38 -0
  80. package/dist/features/DocumentSource/hooks/useDocumentSource.d.ts +21 -0
  81. package/dist/features/DocumentSource/hooks/useDocumentSource.d.ts.map +1 -0
  82. package/dist/features/DocumentSource/hooks/useDocumentSource.js +94 -0
  83. package/dist/features/DocumentSource/index.d.ts +2 -0
  84. package/dist/features/DocumentSource/index.d.ts.map +1 -0
  85. package/dist/features/DownloadLink/DownloadLink.vue.d.ts +1 -1
  86. package/dist/features/DownloadLink/DownloadLink.vue.d.ts.map +1 -1
  87. package/dist/features/DownloadLink/DownloadLink.vue.js +1 -1
  88. package/dist/features/DownloadLink/DownloadLink.vue2.js +18 -17
  89. package/dist/features/DownloadLink/index.d.ts +1 -0
  90. package/dist/features/DownloadLink/index.d.ts.map +1 -1
  91. package/dist/features/DownloadLink/openapi-version-symbol.d.ts +2 -0
  92. package/dist/features/DownloadLink/openapi-version-symbol.d.ts.map +1 -0
  93. package/dist/features/DownloadLink/openapi-version-symbol.js +4 -0
  94. package/dist/features/ExampleRequest/ExampleRequest.vue.d.ts +2 -0
  95. package/dist/features/ExampleRequest/ExampleRequest.vue.d.ts.map +1 -1
  96. package/dist/features/ExampleRequest/ExampleRequest.vue.js +2 -2
  97. package/dist/features/ExampleRequest/ExampleRequest.vue2.js +178 -127
  98. package/dist/features/Operation/Operation.vue.d.ts +2 -2
  99. package/dist/features/Operation/Operation.vue.d.ts.map +1 -1
  100. package/dist/features/Operation/Operation.vue.js +29 -23
  101. package/dist/features/Operation/components/OperationParameters.vue.d.ts +7 -3
  102. package/dist/features/Operation/components/OperationParameters.vue.d.ts.map +1 -1
  103. package/dist/features/Operation/components/OperationParameters.vue.js +28 -24
  104. package/dist/features/Operation/components/OperationResponses.vue.d.ts +2 -2
  105. package/dist/features/Operation/components/OperationResponses.vue.d.ts.map +1 -1
  106. package/dist/features/Operation/components/ParameterHeaders.vue.d.ts +2 -2
  107. package/dist/features/Operation/components/ParameterHeaders.vue.d.ts.map +1 -1
  108. package/dist/features/Operation/components/ParameterHeaders.vue.js +2 -2
  109. package/dist/features/Operation/components/ParameterList.vue.d.ts +2 -2
  110. package/dist/features/Operation/components/ParameterList.vue.d.ts.map +1 -1
  111. package/dist/features/Operation/components/ParameterList.vue.js +2 -2
  112. package/dist/features/Operation/components/ParameterListItem.vue.d.ts +2 -2
  113. package/dist/features/Operation/components/ParameterListItem.vue.d.ts.map +1 -1
  114. package/dist/features/Operation/components/ParameterListItem.vue.js +3 -3
  115. package/dist/features/Operation/components/ParameterListItem.vue2.js +6 -6
  116. package/dist/features/Operation/components/RequestBody.vue.d.ts +7 -3
  117. package/dist/features/Operation/components/RequestBody.vue.d.ts.map +1 -1
  118. package/dist/features/Operation/components/RequestBody.vue.js +2 -2
  119. package/dist/features/Operation/components/RequestBody.vue2.js +41 -36
  120. package/dist/features/Operation/layouts/ClassicLayout.vue.d.ts +7 -3
  121. package/dist/features/Operation/layouts/ClassicLayout.vue.d.ts.map +1 -1
  122. package/dist/features/Operation/layouts/ClassicLayout.vue.js +2 -2
  123. package/dist/features/Operation/layouts/ClassicLayout.vue2.js +84 -79
  124. package/dist/features/Operation/layouts/ModernLayout.vue.d.ts +5 -1
  125. package/dist/features/Operation/layouts/ModernLayout.vue.d.ts.map +1 -1
  126. package/dist/features/Operation/layouts/ModernLayout.vue.js +2 -2
  127. package/dist/features/Operation/layouts/ModernLayout.vue2.js +66 -57
  128. package/dist/features/Operation/types/schemas.d.ts +2 -2
  129. package/dist/features/Operation/types/schemas.d.ts.map +1 -1
  130. package/dist/features/Search/SearchButton.vue.js +2 -2
  131. package/dist/helpers/local-storage.d.ts +8 -0
  132. package/dist/helpers/local-storage.d.ts.map +1 -0
  133. package/dist/helpers/local-storage.js +6 -0
  134. package/dist/helpers/measure.d.ts +21 -0
  135. package/dist/helpers/measure.d.ts.map +1 -0
  136. package/dist/helpers/measure.js +7 -0
  137. package/dist/helpers/parse.d.ts +3 -5
  138. package/dist/helpers/parse.d.ts.map +1 -1
  139. package/dist/helpers/parse.js +64 -86
  140. package/dist/helpers/scroll-to-id.d.ts.map +1 -1
  141. package/dist/helpers/scroll-to-id.js +18 -4
  142. package/dist/hooks/useDiscriminator.d.ts +53 -0
  143. package/dist/hooks/useDiscriminator.d.ts.map +1 -0
  144. package/dist/hooks/useDiscriminator.js +149 -0
  145. package/dist/hooks/useOperationDiscriminator.d.ts +8 -0
  146. package/dist/hooks/useOperationDiscriminator.d.ts.map +1 -0
  147. package/dist/hooks/useOperationDiscriminator.js +57 -0
  148. package/dist/index.d.ts +0 -1
  149. package/dist/index.d.ts.map +1 -1
  150. package/dist/index.js +33 -35
  151. package/dist/libs/openapi.d.ts +3 -3
  152. package/dist/libs/openapi.d.ts.map +1 -1
  153. package/dist/libs/openapi.js +35 -42
  154. package/dist/standalone/lib/html-api.d.ts.map +1 -1
  155. package/dist/standalone/lib/html-api.js +15 -15
  156. package/dist/stores/useHttpClientStore.d.ts.map +1 -1
  157. package/dist/stores/useHttpClientStore.js +19 -18
  158. package/dist/style.css +1 -1
  159. package/dist/types.d.ts +27 -3
  160. package/dist/types.d.ts.map +1 -1
  161. package/package.json +15 -16
  162. package/dist/components/Content/Schema/helpers/schema-discriminator.d.ts +0 -12
  163. package/dist/components/Content/Schema/helpers/schema-discriminator.d.ts.map +0 -1
  164. package/dist/components/Content/Schema/helpers/schema-discriminator.js +0 -45
  165. package/dist/hooks/useReactiveSpec.d.ts +0 -448
  166. package/dist/hooks/useReactiveSpec.d.ts.map +0 -1
  167. package/dist/hooks/useReactiveSpec.js +0 -59
@@ -1,5 +1,5 @@
1
1
  import type { Operation } from '@scalar/oas-utils/entities/spec';
2
- import type { OpenAPI, OpenAPIV2, OpenAPIV3, OpenAPIV3_1 } from '@scalar/openapi-types';
2
+ import type { OpenAPI, OpenAPIV3_1 } from '@scalar/openapi-types';
3
3
  import type { Spec, TransformedOperation } from '@scalar/types/legacy';
4
4
  import { XScalarStability } from '@scalar/types/legacy';
5
5
  type PropertyObject = {
@@ -20,9 +20,9 @@ export declare function formatProperty(key: string, obj: PropertyObject): string
20
20
  */
21
21
  export declare function extractRequestBody(operation: TransformedOperation): string[] | boolean;
22
22
  /**
23
- * Returns all models from the specification, no matter if it’s Swagger 2.0 or OpenAPI 3.x.
23
+ * Returns all models from the specification, no matter if it’s OpenAPI 3.x.
24
24
  */
25
- export declare function getModels(spec?: Spec): Record<string, OpenAPIV3_1.SchemaObject> | OpenAPIV2.DefinitionsObject | Record<string, OpenAPIV3.SchemaObject>;
25
+ export declare function getModels(spec?: Spec): Record<string, OpenAPIV3_1.SchemaObject>;
26
26
  /**
27
27
  * Checks if the OpenAPI document has schemas.
28
28
  */
@@ -1 +1 @@
1
- {"version":3,"file":"openapi.d.ts","sourceRoot":"","sources":["../../src/libs/openapi.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAA;AAChE,OAAO,KAAK,EAAE,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AACvF,OAAO,KAAK,EAAE,IAAI,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAA;AACtE,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAA;AAIvD,KAAK,cAAc,GAAG;IACpB,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAA;IACnB,UAAU,EAAE;QACV,CAAC,GAAG,EAAE,MAAM,GAAG;YACb,IAAI,EAAE,MAAM,CAAA;YACZ,WAAW,CAAC,EAAE,MAAM,CAAA;SACrB,CAAA;KACF,CAAA;CACF,CAAA;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,cAAc,GAAG,MAAM,CAcvE;AA8BD;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,SAAS,EAAE,oBAAoB,GAAG,MAAM,EAAE,GAAG,OAAO,CAYtF;AAED;;GAEG;AACH,wBAAgB,SAAS,CAAC,IAAI,CAAC,EAAE,IAAI,mHAyBpC;AAED;;GAEG;AACH,eAAO,MAAM,SAAS,aAAc,IAAI,YAUvC,CAAA;AAED;;GAEG;AACH,eAAO,MAAM,WAAW,aAAc,IAAI,YAUzC,CAAA;AAED;;GAEG;AACH,wBAAgB,SAAS,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,EAAE,GAAG,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,GAAG,EAAE,GAAG,CAAC,oBAW3E;AAED;;;GAGG;AACH,wBAAgB,wBAAwB,CAAC,oBAAoB,CAAC,EAAE,OAAO,CAAC,OAAO,CAAC,QAAQ,CAAC,GAqBjF,IAAI,CACX;AAED;;GAEG;AACH,wBAAgB,qBAAqB,CAAC,SAAS,EAAE,IAAI,CAAC,SAAS,EAAE,YAAY,GAAG,oBAAoB,CAAC,GAAG,OAAO,CAQ9G;AAED;;GAEG;AACH,wBAAgB,qBAAqB,CACnC,SAAS,EAAE,IAAI,CAAC,SAAS,EAAE,YAAY,GAAG,oBAAoB,CAAC,GAC9D,gBAAgB,GAAG,SAAS,CAK9B;AAED;;GAEG;AACH,wBAAgB,0BAA0B,CAAC,SAAS,EAAE,IAAI,CAAC,SAAS,EAAE,YAAY,GAAG,oBAAoB,CAAC,GAAG,MAAM,CAYlH"}
1
+ {"version":3,"file":"openapi.d.ts","sourceRoot":"","sources":["../../src/libs/openapi.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAA;AAChE,OAAO,KAAK,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AACjE,OAAO,KAAK,EAAE,IAAI,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAA;AACtE,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAA;AAIvD,KAAK,cAAc,GAAG;IACpB,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAA;IACnB,UAAU,EAAE;QACV,CAAC,GAAG,EAAE,MAAM,GAAG;YACb,IAAI,EAAE,MAAM,CAAA;YACZ,WAAW,CAAC,EAAE,MAAM,CAAA;SACrB,CAAA;KACF,CAAA;CACF,CAAA;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,cAAc,GAAG,MAAM,CAcvE;AA8BD;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,SAAS,EAAE,oBAAoB,GAAG,MAAM,EAAE,GAAG,OAAO,CAYtF;AAED;;GAEG;AACH,wBAAgB,SAAS,CAAC,IAAI,CAAC,EAAE,IAAI,4CAsBpC;AAED;;GAEG;AACH,eAAO,MAAM,SAAS,aAAc,IAAI,YAUvC,CAAA;AAED;;GAEG;AACH,eAAO,MAAM,WAAW,aAAc,IAAI,YAUzC,CAAA;AAED;;GAEG;AACH,wBAAgB,SAAS,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,EAAE,GAAG,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,GAAG,EAAE,GAAG,CAAC,oBAW3E;AAED;;;GAGG;AACH,wBAAgB,wBAAwB,CAAC,oBAAoB,CAAC,EAAE,OAAO,CAAC,OAAO,CAAC,QAAQ,CAAC,GAiBjF,IAAI,CACX;AAED;;GAEG;AACH,wBAAgB,qBAAqB,CAAC,SAAS,EAAE,IAAI,CAAC,SAAS,EAAE,YAAY,GAAG,oBAAoB,CAAC,GAAG,OAAO,CAQ9G;AAED;;GAEG;AACH,wBAAgB,qBAAqB,CACnC,SAAS,EAAE,IAAI,CAAC,SAAS,EAAE,YAAY,GAAG,oBAAoB,CAAC,GAC9D,gBAAgB,GAAG,SAAS,CAK9B;AAED;;GAEG;AACH,wBAAgB,0BAA0B,CAAC,SAAS,EAAE,IAAI,CAAC,SAAS,EAAE,YAAY,GAAG,oBAAoB,CAAC,GAAG,MAAM,CAYlH"}
@@ -1,59 +1,56 @@
1
1
  import { XScalarStability as o } from "@scalar/types/legacy";
2
- function l(e, t) {
2
+ function l(e, r) {
3
3
  var n;
4
- let r = e;
5
- const i = (n = t.required) == null ? void 0 : n.includes(e);
6
- return r += i ? " REQUIRED " : " optional ", t.properties[e] && (r += t.properties[e].type, t.properties[e].description && (r += " " + t.properties[e].description)), r;
4
+ let t = e;
5
+ const i = (n = r.required) == null ? void 0 : n.includes(e);
6
+ return t += i ? " REQUIRED " : " optional ", r.properties[e] && (t += r.properties[e].type, r.properties[e].description && (t += " " + r.properties[e].description)), t;
7
7
  }
8
- function d(e) {
8
+ function p(e) {
9
9
  var i;
10
- const t = ["Body"], r = (i = e == null ? void 0 : e.schema) == null ? void 0 : i.properties;
11
- return r && Object.keys(r).forEach((n) => {
10
+ const r = ["Body"], t = (i = e == null ? void 0 : e.schema) == null ? void 0 : i.properties;
11
+ return t && Object.keys(t).forEach((n) => {
12
12
  if (!e.schema)
13
13
  return;
14
- t.push(l(n, e.schema));
15
- const s = r[n];
16
- s.type === "object" && !!s.properties && s.properties && Object.keys(s.properties).forEach((u) => {
17
- var f, c;
18
- t.push(`${u} ${(c = (f = s.properties) == null ? void 0 : f[u]) == null ? void 0 : c.type}`);
14
+ r.push(l(n, e.schema));
15
+ const s = t[n];
16
+ s.type === "object" && !!s.properties && s.properties && Object.keys(s.properties).forEach((c) => {
17
+ var u, f;
18
+ r.push(`${c} ${(f = (u = s.properties) == null ? void 0 : u[c]) == null ? void 0 : f.type}`);
19
19
  });
20
- }), t;
20
+ }), r;
21
21
  }
22
22
  function O(e) {
23
- var t, r, i;
23
+ var r, t, i;
24
24
  try {
25
- const n = (i = (r = (t = e == null ? void 0 : e.information) == null ? void 0 : t.requestBody) == null ? void 0 : r.content) == null ? void 0 : i["application/json"];
25
+ const n = (i = (t = (r = e == null ? void 0 : e.information) == null ? void 0 : r.requestBody) == null ? void 0 : t.content) == null ? void 0 : i["application/json"];
26
26
  if (!n)
27
27
  throw new Error("Body not found");
28
- return d(n);
28
+ return p(n);
29
29
  } catch {
30
30
  return !1;
31
31
  }
32
32
  }
33
- function p(e) {
34
- var r, i;
33
+ function d(e) {
34
+ var t, i;
35
35
  if (!e)
36
36
  return {};
37
- const t = (
37
+ const r = (
38
38
  // OpenAPI 3.x
39
- Object.keys(((r = e == null ? void 0 : e.components) == null ? void 0 : r.schemas) ?? {}).length ? (i = e == null ? void 0 : e.components) == null ? void 0 : i.schemas : (
40
- // Swagger 2.0
41
- Object.keys((e == null ? void 0 : e.definitions) ?? {}).length ? e == null ? void 0 : e.definitions : (
42
- // Fallback
43
- {}
44
- )
39
+ Object.keys(((t = e == null ? void 0 : e.components) == null ? void 0 : t.schemas) ?? {}).length ? (i = e == null ? void 0 : e.components) == null ? void 0 : i.schemas : (
40
+ // Fallback
41
+ {}
45
42
  )
46
43
  );
47
- return Object.keys(t ?? {}).forEach((n) => {
44
+ return Object.keys(r ?? {}).forEach((n) => {
48
45
  var s;
49
- ((s = t[n]) == null ? void 0 : s["x-internal"]) === !0 && delete t[n];
50
- }), t;
46
+ ((s = r[n]) == null ? void 0 : s["x-internal"]) === !0 && delete r[n];
47
+ }), r;
51
48
  }
52
- const b = (e) => e ? !!Object.keys(p(e) ?? {}).length : !1, x = (e) => e ? !!Object.keys((e == null ? void 0 : e.webhooks) ?? {}).length : !1;
53
- function a(e, t) {
54
- for (const [r, i] of Object.entries(e))
55
- i !== null && typeof i == "object" ? (t[r] ?? (t[r] = new i.__proto__.constructor()), a(i, t[r])) : typeof i < "u" && (t[r] = i);
56
- return t;
49
+ const b = (e) => e ? !!Object.keys(d(e) ?? {}).length : !1, x = (e) => e ? !!Object.keys((e == null ? void 0 : e.webhooks) ?? {}).length : !1;
50
+ function a(e, r) {
51
+ for (const [t, i] of Object.entries(e))
52
+ i !== null && typeof i == "object" ? (r[t] ?? (r[t] = new i.__proto__.constructor()), a(i, r[t])) : typeof i < "u" && (r[t] = i);
53
+ return r;
57
54
  }
58
55
  function E(e) {
59
56
  return a(e ?? {}, {
@@ -70,10 +67,6 @@ function E(e) {
70
67
  email: ""
71
68
  }
72
69
  },
73
- externalDocs: {
74
- description: "",
75
- url: ""
76
- },
77
70
  servers: [],
78
71
  tags: []
79
72
  });
@@ -84,18 +77,18 @@ function S(e) {
84
77
  function h(e) {
85
78
  return e.deprecated ? o.Deprecated : e["x-scalar-stability"];
86
79
  }
87
- function g(e) {
88
- const t = h(e);
89
- return t === o.Deprecated ? "text-red" : t === o.Experimental ? "text-orange" : t === o.Stable ? "text-green" : "";
80
+ function v(e) {
81
+ const r = h(e);
82
+ return r === o.Deprecated ? "text-red" : r === o.Experimental ? "text-orange" : r === o.Stable ? "text-green" : "";
90
83
  }
91
84
  export {
92
85
  E as createEmptySpecification,
93
86
  a as deepMerge,
94
87
  O as extractRequestBody,
95
88
  l as formatProperty,
96
- p as getModels,
89
+ d as getModels,
97
90
  h as getOperationStability,
98
- g as getOperationStabilityColor,
91
+ v as getOperationStabilityColor,
99
92
  b as hasModels,
100
93
  x as hasWebhooks,
101
94
  S as isOperationDeprecated
@@ -1 +1 @@
1
- {"version":3,"file":"html-api.d.ts","sourceRoot":"","sources":["../../../src/standalone/lib/html-api.ts"],"names":[],"mappings":"AACA,OAAO,EAEL,KAAK,yBAAyB,EAE9B,KAAK,kBAAkB,EACxB,MAAM,6BAA6B,CAAA;AAQpC;;GAEG;AACH,wBAAgB,kCAAkC,CAAC,GAAG,EAAE,QAAQ,GAAG,yBAAyB,CA+G3F;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,QAAQ,EAAE,aAAa,EAAE,yBAAyB,QAiBzF;AAID,eAAO,MAAM,eAAe,QAAS,QAAQ,YAAY,OAAO,GAAG,IAAI,mBAatE,CAAA;AAED;;;;;;GAMG;AACH,eAAO,MAAM,kBAAkB,EAAE,kBAkHhC,CAAA"}
1
+ {"version":3,"file":"html-api.d.ts","sourceRoot":"","sources":["../../../src/standalone/lib/html-api.ts"],"names":[],"mappings":"AACA,OAAO,EAEL,KAAK,yBAAyB,EAE9B,KAAK,kBAAkB,EACxB,MAAM,6BAA6B,CAAA;AAQpC;;GAEG;AACH,wBAAgB,kCAAkC,CAAC,GAAG,EAAE,QAAQ,GAAG,yBAAyB,CA+G3F;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,QAAQ,EAAE,aAAa,EAAE,yBAAyB,QAiBzF;AAID,eAAO,MAAM,eAAe,QAAS,QAAQ,YAAY,OAAO,GAAG,IAAI,mBAatE,CAAA;AAED;;;;;;GAMG;AACH,eAAO,MAAM,kBAAkB,EAAE,kBAwHhC,CAAA"}
@@ -1,15 +1,15 @@
1
- import { createHead as r } from "@unhead/vue";
2
- import { reactive as u, createApp as c, h as d } from "vue";
3
- import i from "../../components/ApiReference.vue.js";
4
- const y = (n, s) => {
5
- const t = u({
1
+ import { createHead as c } from "@unhead/vue";
2
+ import { reactive as f, createApp as d, h as i } from "vue";
3
+ import u from "../../components/ApiReference.vue.js";
4
+ const g = (a, s) => {
5
+ const r = "scalar-refs", t = f({
6
6
  // Either the configuration will be the second arugment or it MUST be the first (configuration only)
7
- configuration: s ?? n ?? {}
7
+ configuration: s ?? a ?? {}
8
8
  });
9
- let a = c(() => d(i, t));
10
- if (a.use(r()), s) {
11
- const e = typeof n == "string" ? document.querySelector(n) : n;
12
- e ? a.mount(e) : console.error("Could not find a mount point for API References:", n);
9
+ let n = d(() => i(u, t));
10
+ if (n.use(c()), n.config.idPrefix = r, s) {
11
+ const e = typeof a == "string" ? document.querySelector(a) : a;
12
+ e ? n.mount(e) : console.error("Could not find a mount point for API References:", a);
13
13
  }
14
14
  document.addEventListener(
15
15
  "scalar:reload-references",
@@ -18,13 +18,13 @@ const y = (n, s) => {
18
18
  "scalar:reload-references event has been deprecated, please use the scalarInstance.app.mount method instead."
19
19
  ), !t.configuration)
20
20
  return;
21
- const e = typeof n == "string" ? document.querySelector(n) : n;
22
- e && (e && !document.body.contains(e) && document.body.appendChild(e), a.unmount(), a = c(() => d(i, t)), a.use(r()), a.mount(e));
21
+ const e = typeof a == "string" ? document.querySelector(a) : a;
22
+ e && (e && !document.body.contains(e) && document.body.appendChild(e), n.unmount(), n = d(() => i(u, t)), n.use(c()), n.config.idPrefix = r, n.mount(e));
23
23
  },
24
24
  !1
25
25
  );
26
26
  const o = () => {
27
- delete t.configuration, a.unmount();
27
+ delete t.configuration, n.unmount();
28
28
  };
29
29
  return document.addEventListener(
30
30
  "scalar:destroy-references",
@@ -41,7 +41,7 @@ const y = (n, s) => {
41
41
  },
42
42
  !1
43
43
  ), {
44
- app: a,
44
+ app: n,
45
45
  getConfiguration: () => t.configuration ?? {},
46
46
  updateConfiguration: (e) => {
47
47
  t.configuration = e;
@@ -50,5 +50,5 @@ const y = (n, s) => {
50
50
  };
51
51
  };
52
52
  export {
53
- y as createApiReference
53
+ g as createApiReference
54
54
  };
@@ -1 +1 @@
1
- {"version":3,"file":"useHttpClientStore.d.ts","sourceRoot":"","sources":["../../src/stores/useHttpClientStore.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAA;AACzD,OAAO,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAA;AAC9D,OAAO,EAAE,KAAK,GAAG,EAAqC,MAAM,KAAK,CAAA;AASjE;;;GAGG;AACH,iBAAS,cAAc,CAAC,MAAM,EAAE,eAAe,UAE9C;AAED;;;GAGG;AACH,iBAAS,cAAc,CAAC,MAAM,EAAE,eAAe,UAM9C;AAYD;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE,OAAO,EAAE,GAAG,CAAC,aAAa,CAAC,GAAG,MAAM,EAAE,CAoD5F;AASD,+BAA+B;AAC/B,MAAM,MAAM,eAAe,GAAG;IAAE,SAAS,EAAE,QAAQ,CAAC;IAAC,SAAS,EAAE,MAAM,CAAA;CAAE,CAAA;AAMxE,iBAAS,oBAAoB,CAAC,UAAU,CAAC,EAAE,eAAe,QAOzD;AAiCD,iBAAS,UAAU,SAElB;AAYD,kEAAkE;AAClE,eAAO,MAAM,kBAAkB;;4BA7DY,QAAQ;4BAAa,MAAM;;;8BAqDrC,OAAO,CAAC,eAAe,CAAC;;qBAcP,GAAG,CAAC,aAAa,CAAC;4BACxC,aAAa;;;;;;CAaxC,CAAA"}
1
+ {"version":3,"file":"useHttpClientStore.d.ts","sourceRoot":"","sources":["../../src/stores/useHttpClientStore.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAA;AACzD,OAAO,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAA;AAC9D,OAAO,EAAE,KAAK,GAAG,EAAqC,MAAM,KAAK,CAAA;AASjE;;;GAGG;AACH,iBAAS,cAAc,CAAC,MAAM,EAAE,eAAe,UAE9C;AAED;;;GAGG;AACH,iBAAS,cAAc,CAAC,MAAM,EAAE,eAAe,UAM9C;AAYD;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE,OAAO,EAAE,GAAG,CAAC,aAAa,CAAC,GAAG,MAAM,EAAE,CAoD5F;AASD,+BAA+B;AAC/B,MAAM,MAAM,eAAe,GAAG;IAAE,SAAS,EAAE,QAAQ,CAAC;IAAC,SAAS,EAAE,MAAM,CAAA;CAAE,CAAA;AAMxE,iBAAS,oBAAoB,CAAC,UAAU,CAAC,EAAE,eAAe,QAOzD;AAiCD,iBAAS,UAAU,SAElB;AAeD,kEAAkE;AAClE,eAAO,MAAM,kBAAkB;;4BAhEY,QAAQ;4BAAa,MAAM;;;8BAqDrC,OAAO,CAAC,eAAe,CAAC;;qBAiBP,GAAG,CAAC,aAAa,CAAC;4BACxC,aAAa;;;;;;CAaxC,CAAA"}
@@ -1,11 +1,12 @@
1
+ import { REFERENCE_LS_KEYS as E } from "../helpers/local-storage.js";
1
2
  import { objectMerge as p } from "@scalar/oas-utils/helpers";
2
- import { snippetz as k } from "@scalar/snippetz";
3
- import { computed as o, readonly as a, ref as d, reactive as m } from "vue";
3
+ import { snippetz as m } from "@scalar/snippetz";
4
+ import { computed as o, readonly as a, ref as C, reactive as k } from "vue";
4
5
  const y = {
5
6
  targetKey: "shell",
6
7
  clientKey: "curl"
7
- }, { clients: A } = k();
8
- function C(t) {
8
+ }, { clients: A } = m();
9
+ function d(t) {
9
10
  var n;
10
11
  return ((n = r.value.find((e) => e.key === t.targetKey)) == null ? void 0 : n.title) ?? t.targetKey;
11
12
  }
@@ -13,8 +14,8 @@ function K(t) {
13
14
  var n, e;
14
15
  return ((e = (n = r.value.find((i) => i.key === t.targetKey)) == null ? void 0 : n.clients.find((i) => i.client === t.clientKey)) == null ? void 0 : e.title) ?? t.clientKey;
15
16
  }
16
- const H = o(() => C(l)), b = o(() => K(l));
17
- function h(t, n) {
17
+ const H = o(() => d(l)), S = o(() => K(l));
18
+ function L(t, n) {
18
19
  return n.value === !0 ? [] : t.flatMap((e) => {
19
20
  var i;
20
21
  return typeof n.value != "object" ? [] : Array.isArray(n.value) ? (e.clients = e.clients.filter(
@@ -24,8 +25,8 @@ function h(t, n) {
24
25
  n.value[e.key].includes(s.client))), (i = e == null ? void 0 : e.clients) != null && i.length ? [e] : []);
25
26
  });
26
27
  }
27
- const r = o(() => h(A(), c)), c = d({}), f = d();
28
- function j(t) {
28
+ const r = o(() => L(A(), c)), c = C({}), f = C();
29
+ function b(t) {
29
30
  t !== void 0 && (f.value = t, T(u()));
30
31
  }
31
32
  const u = () => {
@@ -40,30 +41,30 @@ function v(t) {
40
41
  (n) => n.key === t.targetKey && n.clients.find((e) => e.client === t.clientKey)
41
42
  );
42
43
  }
43
- function L() {
44
+ function _() {
44
45
  p(l, u());
45
46
  }
46
- const l = m(u()), T = (t) => {
47
+ const l = k(u()), T = (t) => {
47
48
  Object.assign(l, {
48
49
  ...l,
49
50
  ...t
50
- });
51
- }, S = () => ({
51
+ }), localStorage.setItem(E.SELECTED_CLIENT, JSON.stringify(l));
52
+ }, D = () => ({
52
53
  httpClient: a(l),
53
- resetState: L,
54
+ resetState: _,
54
55
  setHttpClient: T,
55
- setDefaultHttpClient: j,
56
+ setDefaultHttpClient: b,
56
57
  excludedClients: a(c),
57
58
  setExcludedClients: (t) => {
58
59
  c.value = t, p(l, u());
59
60
  },
60
61
  availableTargets: r,
61
62
  getClientTitle: K,
62
- getTargetTitle: C,
63
+ getTargetTitle: d,
63
64
  httpTargetTitle: H,
64
- httpClientTitle: b
65
+ httpClientTitle: S
65
66
  });
66
67
  export {
67
- h as filterHiddenClients,
68
- S as useHttpClientStore
68
+ L as filterHiddenClients,
69
+ D as useHttpClientStore
69
70
  };