@scalar/api-reference 1.25.121 → 1.25.123

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 (148) hide show
  1. package/CHANGELOG.md +64 -0
  2. package/dist/blocks/constants.d.ts.map +1 -1
  3. package/dist/blocks/helpers/getPointer.d.ts.map +1 -1
  4. package/dist/blocks/hooks/useBlockProps.d.ts.map +1 -1
  5. package/dist/browser/standalone.js +21464 -20964
  6. package/dist/browser/webpack-stats.json +1 -1
  7. package/dist/components/Anchor/Anchor.vue.d.ts +0 -1
  8. package/dist/components/Anchor/Anchor.vue.d.ts.map +1 -1
  9. package/dist/components/Anchor/Anchor.vue.js +2 -2
  10. package/dist/components/Anchor/Anchor.vue2.js +27 -23
  11. package/dist/components/ApiReferenceLayout.vue.d.ts.map +1 -1
  12. package/dist/components/ApiReferenceLayout.vue.js +2 -2
  13. package/dist/components/ApiReferenceLayout.vue2.js +135 -128
  14. package/dist/components/Card/Card.vue.d.ts.map +1 -1
  15. package/dist/components/Card/Card.vue.js +7 -7
  16. package/dist/components/Content/ClientLibraries/ClientSelector.vue.js +1 -1
  17. package/dist/components/Content/Content.vue.d.ts.map +1 -1
  18. package/dist/components/Content/Content.vue.js +2 -2
  19. package/dist/components/Content/Content.vue2.js +33 -33
  20. package/dist/components/Content/Introduction/Description.vue.d.ts.map +1 -1
  21. package/dist/components/Content/Introduction/Description.vue.js +2 -2
  22. package/dist/components/Content/Introduction/Description.vue2.js +7 -7
  23. package/dist/components/Content/Introduction/Introduction.vue.d.ts.map +1 -1
  24. package/dist/components/Content/Introduction/Introduction.vue.js +1 -1
  25. package/dist/components/Content/Introduction/Introduction.vue2.js +44 -39
  26. package/dist/components/Content/Lazy/Loading.vue.d.ts.map +1 -1
  27. package/dist/components/Content/Lazy/Loading.vue.js +65 -59
  28. package/dist/components/Content/Models/Models.vue.d.ts.map +1 -1
  29. package/dist/components/Content/Models/Models.vue.js +2 -2
  30. package/dist/components/Content/Models/Models.vue2.js +66 -52
  31. package/dist/components/Content/Models/ModelsAccordion.vue.d.ts.map +1 -1
  32. package/dist/components/Content/Models/ModelsAccordion.vue.js +1 -1
  33. package/dist/components/Content/Models/ModelsAccordion.vue2.js +37 -31
  34. package/dist/components/Content/Schema/helpers/optimizeValueForDisplay.d.ts.map +1 -1
  35. package/dist/components/Content/Tag/Endpoints.vue.d.ts +1 -0
  36. package/dist/components/Content/Tag/Endpoints.vue.d.ts.map +1 -1
  37. package/dist/components/Content/Tag/Endpoints.vue.js +2 -2
  38. package/dist/components/Content/Tag/Endpoints.vue2.js +79 -52
  39. package/dist/components/Content/Tag/Tag.vue.d.ts.map +1 -1
  40. package/dist/components/Content/Tag/Tag.vue.js +2 -2
  41. package/dist/components/Content/Tag/Tag.vue2.js +29 -26
  42. package/dist/components/Content/Tag/TagAccordion.vue.d.ts.map +1 -1
  43. package/dist/components/Content/Tag/TagAccordion.vue.js +2 -2
  44. package/dist/components/Content/Tag/TagAccordion.vue2.js +22 -19
  45. package/dist/components/Content/Tag/TagList.vue.d.ts.map +1 -1
  46. package/dist/components/GettingStarted.vue.d.ts.map +1 -1
  47. package/dist/components/GettingStarted.vue.js +2 -2
  48. package/dist/components/GettingStarted.vue2.js +25 -25
  49. package/dist/components/HttpMethod/HttpMethod.vue.d.ts.map +1 -1
  50. package/dist/components/Layouts/ClassicLayout.vue.d.ts.map +1 -1
  51. package/dist/components/Layouts/ClassicLayout.vue.js +6 -6
  52. package/dist/components/Section/SectionContainer.vue.d.ts.map +1 -1
  53. package/dist/components/Section/SectionContainer.vue.js +1 -1
  54. package/dist/components/Section/SectionHeader.vue.d.ts +1 -6
  55. package/dist/components/Section/SectionHeader.vue.d.ts.map +1 -1
  56. package/dist/components/Section/SectionHeader.vue.js +1 -1
  57. package/dist/components/Section/SectionHeader.vue2.js +12 -16
  58. package/dist/components/Section/SectionHeaderTag.vue.d.ts +21 -0
  59. package/dist/components/Section/SectionHeaderTag.vue.d.ts.map +1 -0
  60. package/dist/components/Section/SectionHeaderTag.vue.js +7 -0
  61. package/dist/components/Section/SectionHeaderTag.vue2.js +18 -0
  62. package/dist/components/Section/index.d.ts +1 -0
  63. package/dist/components/Section/index.d.ts.map +1 -1
  64. package/dist/components/Sidebar/Sidebar.vue.d.ts.map +1 -1
  65. package/dist/components/Sidebar/Sidebar.vue.js +1 -1
  66. package/dist/components/Sidebar/Sidebar.vue2.js +14 -14
  67. package/dist/components/Sidebar/SidebarElement.vue.d.ts.map +1 -1
  68. package/dist/components/Sidebar/SidebarElement.vue.js +2 -2
  69. package/dist/esm.d.ts.map +1 -1
  70. package/dist/esm.js +1 -3
  71. package/dist/features/ApiClientModal/ApiClientModal.vue.d.ts.map +1 -1
  72. package/dist/features/ApiClientModal/useApiClient.d.ts +414 -510
  73. package/dist/features/ApiClientModal/useApiClient.d.ts.map +1 -1
  74. package/dist/features/BaseUrl/BaseUrl.vue.d.ts.map +1 -1
  75. package/dist/features/BaseUrl/BaseUrl.vue.js +20 -21
  76. package/dist/features/ExampleRequest/ExampleRequest.vue.d.ts.map +1 -1
  77. package/dist/features/ExampleRequest/ExampleRequest.vue.js +1 -1
  78. package/dist/features/ExampleResponses/ExampleResponses.vue.d.ts.map +1 -1
  79. package/dist/features/ExampleResponses/ExampleResponses.vue.js +2 -2
  80. package/dist/features/ExampleResponses/ExampleResponses.vue2.js +47 -47
  81. package/dist/features/Operation/Operation.vue.d.ts.map +1 -1
  82. package/dist/features/Operation/Operation.vue.js +5 -5
  83. package/dist/features/Operation/Webhooks.vue.d.ts.map +1 -1
  84. package/dist/features/Operation/Webhooks.vue.js +3 -3
  85. package/dist/features/Operation/Webhooks.vue2.js +74 -60
  86. package/dist/features/Operation/components/ContentTypeSelect.vue.d.ts.map +1 -1
  87. package/dist/features/Operation/components/ContentTypeSelect.vue.js +2 -2
  88. package/dist/features/Operation/components/ParameterHeaders.vue.d.ts.map +1 -1
  89. package/dist/features/Operation/components/ParameterHeaders.vue.js +3 -3
  90. package/dist/features/Operation/components/ParameterHeaders.vue2.js +8 -8
  91. package/dist/features/Operation/components/ParameterListItem.vue.d.ts.map +1 -1
  92. package/dist/features/Operation/components/ParameterListItem.vue.js +3 -3
  93. package/dist/features/Operation/components/ParameterListItem.vue2.js +16 -16
  94. package/dist/features/Operation/components/RequestBody.vue.d.ts.map +1 -1
  95. package/dist/features/Operation/components/RequestBody.vue.js +2 -2
  96. package/dist/features/Operation/components/RequestBody.vue2.js +26 -47
  97. package/dist/features/Operation/hooks/useResponses.d.ts.map +1 -1
  98. package/dist/features/Operation/layouts/ClassicLayout.vue.d.ts.map +1 -1
  99. package/dist/features/Operation/layouts/ClassicLayout.vue.js +2 -2
  100. package/dist/features/Operation/layouts/ClassicLayout.vue2.js +11 -11
  101. package/dist/features/Operation/layouts/ModernLayout.vue.d.ts.map +1 -1
  102. package/dist/features/Operation/layouts/ModernLayout.vue.js +2 -2
  103. package/dist/features/Operation/layouts/ModernLayout.vue2.js +80 -69
  104. package/dist/features/Search/SearchButton.vue.d.ts.map +1 -1
  105. package/dist/features/Search/SearchButton.vue.js +1 -1
  106. package/dist/features/Search/SearchButton.vue2.js +30 -18
  107. package/dist/features/Search/SearchModal.vue.d.ts.map +1 -1
  108. package/dist/features/Search/SearchModal.vue.js +1 -1
  109. package/dist/features/Search/SearchModal.vue2.js +104 -95
  110. package/dist/features/Search/useSearchIndex.d.ts.map +1 -1
  111. package/dist/features/Search/useSearchIndex.js +11 -17
  112. package/dist/features/TestRequestButton/TestRequestButton.vue.d.ts.map +1 -1
  113. package/dist/features/TestRequestButton/TestRequestButton.vue.js +2 -2
  114. package/dist/features/TestRequestButton/TestRequestButton.vue2.js +6 -6
  115. package/dist/helpers/createEmptySpecification.d.ts.map +1 -1
  116. package/dist/helpers/get-request.d.ts.map +1 -1
  117. package/dist/helpers/getModels.d.ts.map +1 -1
  118. package/dist/helpers/isMacOs.d.ts.map +1 -1
  119. package/dist/helpers/operation.d.ts.map +1 -1
  120. package/dist/helpers/parse.js +62 -62
  121. package/dist/helpers/specDownloads.d.ts.map +1 -1
  122. package/dist/helpers/specHelpers.d.ts.map +1 -1
  123. package/dist/helpers/waitFor.d.ts.map +1 -1
  124. package/dist/hooks/useConfig.d.ts.map +1 -1
  125. package/dist/hooks/useDeprecationWarnings.d.ts.map +1 -1
  126. package/dist/hooks/useDeprecationWarnings.js +1 -5
  127. package/dist/hooks/useNavState.d.ts +1 -2
  128. package/dist/hooks/useNavState.d.ts.map +1 -1
  129. package/dist/hooks/useNavState.js +3 -10
  130. package/dist/hooks/useReactiveSpec.d.ts +8 -8
  131. package/dist/hooks/useReactiveSpec.d.ts.map +1 -1
  132. package/dist/hooks/useReactiveSpec.js +12 -13
  133. package/dist/hooks/useSidebar.d.ts.map +1 -1
  134. package/dist/hooks/useSidebar.js +38 -48
  135. package/dist/index.js +1 -1
  136. package/dist/legacy/helpers/normalizeRequestMethod.d.ts.map +1 -1
  137. package/dist/legacy/helpers/normalizeRequestMethod.js +2 -6
  138. package/dist/legacy/types.d.ts.map +1 -1
  139. package/dist/standalone/lib/html-api.d.ts +11 -0
  140. package/dist/standalone/lib/html-api.d.ts.map +1 -0
  141. package/dist/standalone/lib/html-rendering.d.ts +51 -0
  142. package/dist/standalone/lib/html-rendering.d.ts.map +1 -0
  143. package/dist/standalone/lib/html-rendering.js +54 -0
  144. package/dist/stores/useHttpClientStore.d.ts.map +1 -1
  145. package/dist/style.css +1 -1
  146. package/dist/types.d.ts +0 -3
  147. package/dist/types.d.ts.map +1 -1
  148. package/package.json +15 -14
@@ -20,11 +20,9 @@ function te({
20
20
  function F() {
21
21
  s.value = "", d.value = 0, r.value = [];
22
22
  }
23
- const H = V(
24
- () => s.value.length === 0 ? o.value.slice(0, 25).map((u) => ({
25
- item: u
26
- })) : r.value.slice(0, 25)
27
- );
23
+ const H = V(() => s.value.length === 0 ? o.value.slice(0, 25).map((u) => ({
24
+ item: u
25
+ })) : r.value.slice(0, 25));
28
26
  return R(
29
27
  a.value,
30
28
  async () => {
@@ -33,9 +31,7 @@ function te({
33
31
  i.setCollection([]);
34
32
  return;
35
33
  }
36
- const l = [], u = G(
37
- ((w = (M = a.value) == null ? void 0 : M.info) == null ? void 0 : w.description) ?? ""
38
- );
34
+ const l = [], u = G(((w = (M = a.value) == null ? void 0 : M.info) == null ? void 0 : w.description) ?? "");
39
35
  u.length && (u.forEach((e) => {
40
36
  l.push({
41
37
  type: "heading",
@@ -55,7 +51,7 @@ function te({
55
51
  body: ""
56
52
  };
57
53
  o.value.push(S), e.operations && e.operations.forEach((t) => {
58
- const { parameterMap: n } = B(t), x = A(t) || n.value;
54
+ const { parameterMap: c } = B(t), x = A(t) || c.value;
59
55
  let f = null;
60
56
  typeof x != "boolean" && (f = x);
61
57
  const O = {
@@ -72,17 +68,15 @@ function te({
72
68
  f && (O.body = f), o.value.push(O);
73
69
  });
74
70
  });
75
- const c = (E = a.value) == null ? void 0 : E.webhooks, m = [];
76
- c && Object.keys(c).forEach((e) => {
77
- Object.keys(
78
- c[e]
79
- ).forEach((t) => {
80
- var n;
71
+ const n = (E = a.value) == null ? void 0 : E.webhooks, m = [];
72
+ n && Object.keys(n).forEach((e) => {
73
+ Object.keys(n[e]).forEach((t) => {
74
+ var c;
81
75
  m.push({
82
76
  type: "webhook",
83
- title: `Webhook: ${(n = c[e][t]) == null ? void 0 : n.name}`,
77
+ title: "Webhook",
84
78
  href: `#${j({ name: e, method: t })}`,
85
- description: e,
79
+ description: `${(c = n[e][t]) == null ? void 0 : c.name}`,
86
80
  httpVerb: t,
87
81
  tag: e,
88
82
  body: ""
@@ -1 +1 @@
1
- {"version":3,"file":"TestRequestButton.vue.d.ts","sourceRoot":"","sources":["../../../src/features/TestRequestButton/TestRequestButton.vue"],"names":[],"mappings":"AAqFA,OAAO,KAAK,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,iCAAiC,CAAA;AAK/E,KAAK,WAAW,GAAG;IACjB,SAAS,CAAC,EAAE,IAAI,CAAC,aAAa,EAAE,QAAQ,GAAG,MAAM,GAAG,KAAK,CAAC,CAAA;CAC3D,CAAC;;AAsGF,wBAMG"}
1
+ {"version":3,"file":"TestRequestButton.vue.d.ts","sourceRoot":"","sources":["../../../src/features/TestRequestButton/TestRequestButton.vue"],"names":[],"mappings":"AAmFA,OAAO,KAAK,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,iCAAiC,CAAA;AAS/E,KAAK,WAAW,GAAG;IACjB,SAAS,CAAC,EAAE,IAAI,CAAC,aAAa,EAAE,QAAQ,GAAG,MAAM,GAAG,KAAK,CAAC,CAAA;CAC3D,CAAC;;AAsGF,wBAMG"}
@@ -1,7 +1,7 @@
1
1
  import t from "./TestRequestButton.vue2.js";
2
2
  /* empty css */
3
3
  import o from "../../_virtual/_plugin-vue_export-helper.js";
4
- const s = /* @__PURE__ */ o(t, [["__scopeId", "data-v-ea8189a2"]]);
4
+ const m = /* @__PURE__ */ o(t, [["__scopeId", "data-v-e1499c8d"]]);
5
5
  export {
6
- s as default
6
+ m as default
7
7
  };
@@ -1,7 +1,7 @@
1
1
  import { defineComponent as d, computed as c, openBlock as i, createElementBlock as s, withModifiers as f, createVNode as a, unref as h, createElementVNode as k, withCtx as C, createTextVNode as u, toDisplayString as p, Fragment as y } from "vue";
2
- import B from "../../components/ScreenReader.vue.js";
3
- import { useConfig as b } from "../../hooks/useConfig.js";
4
- import { ScalarIcon as q } from "@scalar/components";
2
+ import { ScalarIcon as B } from "@scalar/components";
3
+ import b from "../../components/ScreenReader.vue.js";
4
+ import { useConfig as q } from "../../hooks/useConfig.js";
5
5
  import { useApiClient as R } from "../ApiClientModal/useApiClient.js";
6
6
  const T = ["method"], g = /* @__PURE__ */ d({
7
7
  __name: "TestRequestButton",
@@ -9,7 +9,7 @@ const T = ["method"], g = /* @__PURE__ */ d({
9
9
  operation: {}
10
10
  },
11
11
  setup(n) {
12
- const { client: t } = R(), o = b(), l = c(() => (o == null ? void 0 : o.hideTestRequestButton) !== !0), m = () => {
12
+ const { client: t } = R(), o = q(), l = c(() => (o == null ? void 0 : o.hideTestRequestButton) !== !0), m = () => {
13
13
  var e;
14
14
  n.operation && ((e = t == null ? void 0 : t.value) != null && e.open) && t.value.open({
15
15
  requestUid: n.operation.uid
@@ -22,12 +22,12 @@ const T = ["method"], g = /* @__PURE__ */ d({
22
22
  type: "button",
23
23
  onClick: f(m, ["stop"])
24
24
  }, [
25
- a(h(q), {
25
+ a(h(B), {
26
26
  icon: "Play",
27
27
  size: "sm"
28
28
  }),
29
29
  r[0] || (r[0] = k("span", null, "Test Request", -1)),
30
- a(B, null, {
30
+ a(b, null, {
31
31
  default: C(() => [
32
32
  u("(" + p(e.operation.method) + " " + p(e.operation.path) + ")", 1)
33
33
  ]),
@@ -1 +1 @@
1
- {"version":3,"file":"createEmptySpecification.d.ts","sourceRoot":"","sources":["../../src/helpers/createEmptySpecification.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAA;AACpD,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAA;AAIhD;;;GAGG;AACH,wBAAgB,wBAAwB,CACtC,oBAAoB,CAAC,EAAE,OAAO,CAAC,OAAO,CAAC,QAAQ,CAAC,GAsB1C,IAAI,CACX"}
1
+ {"version":3,"file":"createEmptySpecification.d.ts","sourceRoot":"","sources":["../../src/helpers/createEmptySpecification.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAA;AACpD,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAA;AAIhD;;;GAGG;AACH,wBAAgB,wBAAwB,CAAC,oBAAoB,CAAC,EAAE,OAAO,CAAC,OAAO,CAAC,QAAQ,CAAC,GAqBjF,IAAI,CACX"}
@@ -1 +1 @@
1
- {"version":3,"file":"get-request.d.ts","sourceRoot":"","sources":["../../src/helpers/get-request.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAA;AAE9D,6CAA6C;AAC7C,eAAO,MAAM,UAAU,aACX,cAAc,CAAC,UAAU,CAAC,QAC9B,MAAM,UACJ,MAAM;;;yBAK4iU,KAAK;kDAA4E,KAAK,8CAA8C,KAAK;wCAA6E,KAAK;8BAA6D,KAAK;+BAAyD,KAAK;;;;;;mBAAwR,CAAC;;;;;;;;;;;;;eAA0f,CAAC;mBAAkC,CAAC;cAAwC,CAAC;eAA8B,CAAC;aAA4B,CAAC;gBAA8H,CAAC;iBAAwC,CAAC;mBAAkC,CAAC;;;;;aAD3/W,CAAA"}
1
+ {"version":3,"file":"get-request.d.ts","sourceRoot":"","sources":["../../src/helpers/get-request.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAA;AAE9D,6CAA6C;AAC7C,eAAO,MAAM,UAAU,aAAc,cAAc,CAAC,UAAU,CAAC,QAAQ,MAAM,UAAU,MAAM;;;yBAEw/T,KAAK;kDAA4E,KAAK,8CAA8C,KAAK;wCAA6E,KAAK;8BAA6D,KAAK;+BAAyD,KAAK;;;;;;mBAAwR,CAAC;;;;;;;;;;;;;eAA0f,CAAC;mBAAkC,CAAC;cAAwC,CAAC;eAA8B,CAAC;aAA4B,CAAC;gBAA8H,CAAC;iBAAwC,CAAC;mBAAkC,CAAC;;;;;aAD96W,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"getModels.d.ts","sourceRoot":"","sources":["../../src/helpers/getModels.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AAC9E,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAA;AAEhD;;GAEG;AACH,wBAAgB,SAAS,CAAC,IAAI,CAAC,EAAE,IAAI,mHA4BpC"}
1
+ {"version":3,"file":"getModels.d.ts","sourceRoot":"","sources":["../../src/helpers/getModels.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AAC9E,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAA;AAEhD;;GAEG;AACH,wBAAgB,SAAS,CAAC,IAAI,CAAC,EAAE,IAAI,mHAyBpC"}
@@ -1 +1 @@
1
- {"version":3,"file":"isMacOs.d.ts","sourceRoot":"","sources":["../../src/helpers/isMacOs.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,eAAO,MAAM,OAAO,eACuD,CAAA"}
1
+ {"version":3,"file":"isMacOs.d.ts","sourceRoot":"","sources":["../../src/helpers/isMacOs.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,eAAO,MAAM,OAAO,eAAoF,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"operation.d.ts","sourceRoot":"","sources":["../../src/helpers/operation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,SAAS,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAA;AAEvE;;GAEG;AACH,wBAAgB,qBAAqB,CAAC,SAAS,EAAE,SAAS,GAAG,OAAO,CASnE;AAED;;GAEG;AACH,wBAAgB,qBAAqB,CACnC,SAAS,EAAE,SAAS,GACnB,gBAAgB,GAAG,SAAS,CAG9B;AAED;;GAEG;AACH,wBAAgB,0BAA0B,CAAC,SAAS,EAAE,SAAS,GAAG,MAAM,CAMvE"}
1
+ {"version":3,"file":"operation.d.ts","sourceRoot":"","sources":["../../src/helpers/operation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,SAAS,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAA;AAEvE;;GAEG;AACH,wBAAgB,qBAAqB,CAAC,SAAS,EAAE,SAAS,GAAG,OAAO,CAQnE;AAED;;GAEG;AACH,wBAAgB,qBAAqB,CAAC,SAAS,EAAE,SAAS,GAAG,gBAAgB,GAAG,SAAS,CAGxF;AAED;;GAEG;AACH,wBAAgB,0BAA0B,CAAC,SAAS,EAAE,SAAS,GAAG,MAAM,CAMvE"}
@@ -1,119 +1,119 @@
1
1
  import { redirectToProxy as R, shouldIgnoreEntity as u } from "@scalar/oas-utils/helpers";
2
2
  import { load as M, dereference as q } from "@scalar/openapi-parser";
3
- import { fetchUrls as C } from "@scalar/openapi-parser/plugins/fetch-urls";
3
+ import { fetchUrls as D } from "@scalar/openapi-parser/plugins/fetch-urls";
4
4
  import { createEmptySpecification as O } from "./createEmptySpecification.js";
5
- import { normalizeRequestMethod as k } from "../legacy/helpers/normalizeRequestMethod.js";
6
- import { validRequestMethods as F } from "../legacy/fixtures/httpRequestMethods.js";
7
- const H = (m, {
8
- proxyUrl: t
9
- } = {}) => new Promise(async (o, E) => {
5
+ import { normalizeRequestMethod as j } from "../legacy/helpers/normalizeRequestMethod.js";
6
+ import { validRequestMethods as C } from "../legacy/fixtures/httpRequestMethods.js";
7
+ const G = (m, {
8
+ proxyUrl: e
9
+ } = {}) => new Promise(async (n, b) => {
10
10
  var h;
11
11
  try {
12
12
  if (!m)
13
- return o(I(O()));
13
+ return n(I(O()));
14
14
  const f = performance.now(), { filesystem: s } = await M(m, {
15
15
  plugins: [
16
- C({
17
- fetch: (n) => fetch(t ? R(t, n) : n)
16
+ D({
17
+ fetch: (o) => fetch(e ? R(e, o) : o)
18
18
  })
19
19
  ]
20
- }), { schema: a, errors: r } = await q(s), e = performance.now();
21
- return console.log(`dereference: ${Math.round(e - f)} ms`), r != null && r.length && console.warn(
20
+ }), { schema: a, errors: r } = await q(s), t = performance.now();
21
+ return console.log(`dereference: ${Math.round(t - f)} ms`), r != null && r.length && console.warn(
22
22
  `Please open an issue on https://github.com/scalar/scalar
23
23
  `,
24
24
  `Scalar OpenAPI Parser Warning:
25
25
  `,
26
26
  r
27
- ), a === void 0 ? (E(((h = r == null ? void 0 : r[0]) == null ? void 0 : h.message) ?? "Failed to parse the OpenAPI file."), o(I(O()))) : o(I(a));
27
+ ), a === void 0 ? (b(((h = r == null ? void 0 : r[0]) == null ? void 0 : h.message) ?? "Failed to parse the OpenAPI file."), n(I(O()))) : n(I(a));
28
28
  } catch (f) {
29
- console.error("[@scalar/api-reference]", "Failed to parse the OpenAPI document. It might be invalid?"), console.error(f), E(f);
29
+ console.error("[@scalar/api-reference]", "Failed to parse the OpenAPI document. It might be invalid?"), console.error(f), b(f);
30
30
  }
31
- return o(I(O()));
31
+ return n(I(O()));
32
32
  }), I = (m) => {
33
33
  var h, f;
34
- let t = {};
35
- m && typeof m == "object" ? t = structuredClone(m) : t = O(), t.tags || (t.tags = []), t.paths || (t.paths = {});
36
- const o = {};
37
- return Object.keys(t.webhooks ?? {}).forEach((s) => {
34
+ let e = {};
35
+ m && typeof m == "object" ? e = structuredClone(m) : e = O(), e.tags || (e.tags = []), e.paths || (e.paths = {}), e.components || (e.components = {}), e.webhooks || (e.webhooks = {}), e.servers || (e.servers = []), e.security || (e.security = []), e.externalDocs || (e.externalDocs = {});
36
+ const n = {};
37
+ return Object.keys(e.webhooks ?? {}).forEach((s) => {
38
38
  var a;
39
- Object.keys(((a = t.webhooks) == null ? void 0 : a[s]) ?? {}).forEach((r) => {
40
- var n, l, g, y;
41
- const e = (n = t.webhooks) == null ? void 0 : n[s][r];
42
- if (!(!e || u(e))) {
43
- if (Array.isArray(e.tags)) {
44
- const i = (l = e.tags) == null ? void 0 : l.map(
39
+ Object.keys(((a = e.webhooks) == null ? void 0 : a[s]) ?? {}).forEach((r) => {
40
+ var o, l, g, y;
41
+ const t = (o = e.webhooks) == null ? void 0 : o[s][r];
42
+ if (!(!t || u(t))) {
43
+ if (Array.isArray(t.tags)) {
44
+ const i = (l = t.tags) == null ? void 0 : l.map(
45
45
  (c) => {
46
46
  var w;
47
- return (w = t.tags) == null ? void 0 : w.find((p) => p.name === c);
47
+ return (w = e.tags) == null ? void 0 : w.find((p) => p.name === c);
48
48
  }
49
49
  );
50
- if (e.tags = i == null ? void 0 : i.filter((c) => !u(c)), i != null && i.some((c) => u(c)))
50
+ if (t.tags = i == null ? void 0 : i.filter((c) => !u(c)), i != null && i.some((c) => u(c)))
51
51
  return;
52
52
  }
53
- o[s] === void 0 && (o[s] = {}), o[s][r] = {
53
+ n[s] === void 0 && (n[s] = {}), n[s][r] = {
54
54
  // Transformed data
55
- httpVerb: k(r),
55
+ httpVerb: j(r),
56
56
  path: s,
57
- operationId: (e == null ? void 0 : e.operationId) || s,
58
- name: (e == null ? void 0 : e.summary) || s || "",
59
- description: (e == null ? void 0 : e.description) || "",
60
- pathParameters: (y = (g = t.paths) == null ? void 0 : g[s]) == null ? void 0 : y.parameters,
57
+ operationId: (t == null ? void 0 : t.operationId) || s,
58
+ name: (t == null ? void 0 : t.summary) || s || "",
59
+ description: (t == null ? void 0 : t.description) || "",
60
+ pathParameters: (y = (g = e.paths) == null ? void 0 : g[s]) == null ? void 0 : y.parameters,
61
61
  // Original webhook
62
62
  information: {
63
- ...e
63
+ ...t
64
64
  }
65
65
  };
66
66
  }
67
67
  });
68
- }), Object.keys(((h = t.components) == null ? void 0 : h.schemas) ?? {}).forEach((s) => {
69
- var a, r, e, n;
70
- u((r = (a = t.components) == null ? void 0 : a.schemas) == null ? void 0 : r[s]) && ((n = (e = t.components) == null ? void 0 : e.schemas) == null || delete n[s]);
71
- }), Object.keys(t.paths).forEach((s) => {
72
- Object.keys(t.paths[s]).filter(
73
- (r) => F.includes(r.toUpperCase())
68
+ }), Object.keys(((h = e.components) == null ? void 0 : h.schemas) ?? {}).forEach((s) => {
69
+ var a, r, t, o;
70
+ u((r = (a = e.components) == null ? void 0 : a.schemas) == null ? void 0 : r[s]) && ((o = (t = e.components) == null ? void 0 : t.schemas) == null || delete o[s]);
71
+ }), Object.keys(e.paths).forEach((s) => {
72
+ Object.keys(e.paths[s]).filter(
73
+ (r) => C.includes(r.toUpperCase())
74
74
  ).forEach((r) => {
75
75
  var l, g, y, i, c, w;
76
- const e = t.paths[s][r];
77
- if (e === void 0 || u(e))
76
+ const t = e.paths[s][r];
77
+ if (t === void 0 || u(t))
78
78
  return;
79
- const n = {
80
- httpVerb: k(r),
79
+ const o = {
80
+ httpVerb: j(r),
81
81
  path: s,
82
- operationId: e.operationId || s,
83
- name: e.summary || s || "",
84
- description: e.description || "",
82
+ operationId: t.operationId || s,
83
+ name: t.summary || s || "",
84
+ description: t.description || "",
85
85
  information: {
86
- ...e
86
+ ...t
87
87
  },
88
- pathParameters: (g = (l = t.paths) == null ? void 0 : l[s]) == null ? void 0 : g.parameters
88
+ pathParameters: (g = (l = e.paths) == null ? void 0 : l[s]) == null ? void 0 : g.parameters
89
89
  };
90
- if (!e.tags || e.tags.length === 0) {
91
- (y = t.tags) != null && y.find((d) => d.name === "default") || (i = t.tags) == null || i.push({
90
+ if (!t.tags || t.tags.length === 0) {
91
+ (y = e.tags) != null && y.find((d) => d.name === "default") || (i = e.tags) == null || i.push({
92
92
  name: "default",
93
93
  description: "",
94
94
  operations: []
95
95
  });
96
- const p = (c = t.tags) == null ? void 0 : c.findIndex(
96
+ const p = (c = e.tags) == null ? void 0 : c.findIndex(
97
97
  (d) => d.name === "default"
98
98
  );
99
- p >= 0 && ((w = t.tags[p]) == null || w.operations.push(n));
99
+ p >= 0 && ((w = e.tags[p]) == null || w.operations.push(o));
100
100
  } else
101
- e.tags.forEach((p) => {
102
- var b, x, j;
103
- const d = (b = t.tags) == null ? void 0 : b.findIndex((A) => A.name === p);
104
- d === -1 && ((x = t.tags) == null || x.push({
101
+ t.tags.forEach((p) => {
102
+ var E, P, k;
103
+ const d = (E = e.tags) == null ? void 0 : E.findIndex((A) => A.name === p);
104
+ d === -1 && ((P = e.tags) == null || P.push({
105
105
  name: p,
106
106
  description: ""
107
107
  }));
108
- const P = d !== -1 ? d : t.tags.length - 1;
109
- typeof ((j = t.tags[P]) == null ? void 0 : j.operations) > "u" && (t.tags[P].operations = []), t.tags[P].operations.push(n);
108
+ const x = d !== -1 ? d : e.tags.length - 1;
109
+ typeof ((k = e.tags[x]) == null ? void 0 : k.operations) > "u" && (e.tags[x].operations = []), e.tags[x].operations.push(o);
110
110
  });
111
111
  });
112
- }), t.tags = (f = t.tags) == null ? void 0 : f.filter((s) => !u(s)), {
113
- ...t,
114
- webhooks: o
112
+ }), e.tags = (f = e.tags) == null ? void 0 : f.filter((s) => !u(s)), {
113
+ ...e,
114
+ webhooks: n
115
115
  };
116
116
  };
117
117
  export {
118
- H as parse
118
+ G as parse
119
119
  };
@@ -1 +1 @@
1
- {"version":3,"file":"specDownloads.d.ts","sourceRoot":"","sources":["../../src/helpers/specDownloads.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,eAAe;QAFqB,MAAM;gBAAc,MAAM;OAER,CAAA;AAEnE,mCAAmC;AACnC,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,MAAM,QAiChE"}
1
+ {"version":3,"file":"specDownloads.d.ts","sourceRoot":"","sources":["../../src/helpers/specDownloads.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,eAAe;QADqB,MAAM;gBAAc,MAAM;OACR,CAAA;AAEnE,mCAAmC;AACnC,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,MAAM,QAiChE"}
@@ -1 +1 @@
1
- {"version":3,"file":"specHelpers.d.ts","sourceRoot":"","sources":["../../src/helpers/specHelpers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAA;AAErD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AAE7C,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,iBAAS,cAAc,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,cAAc,GAAG,MAAM,CAchE;AAED,iBAAS,eAAe,CAAC,GAAG,EAAE,aAAa,GAAG,MAAM,EAAE,CAuBrD;AAED,iBAAS,kBAAkB,CAAC,SAAS,EAAE,SAAS,GAAG,MAAM,EAAE,GAAG,OAAO,CAapE;AAED,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,kBAAkB,EAAE,CAAA"}
1
+ {"version":3,"file":"specHelpers.d.ts","sourceRoot":"","sources":["../../src/helpers/specHelpers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAA;AAErD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AAE7C,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,iBAAS,cAAc,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,cAAc,GAAG,MAAM,CAchE;AAED,iBAAS,eAAe,CAAC,GAAG,EAAE,aAAa,GAAG,MAAM,EAAE,CAuBrD;AAED,iBAAS,kBAAkB,CAAC,SAAS,EAAE,SAAS,GAAG,MAAM,EAAE,GAAG,OAAO,CAYpE;AAED,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,kBAAkB,EAAE,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"waitFor.d.ts","sourceRoot":"","sources":["../../src/helpers/waitFor.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,eAAO,MAAM,OAAO,YACT,MAAM,OAAO,0CAGrB,OAAO,CAAC,IAAI,CAgBd,CAAA"}
1
+ {"version":3,"file":"waitFor.d.ts","sourceRoot":"","sources":["../../src/helpers/waitFor.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,eAAO,MAAM,OAAO,YAAmB,MAAM,OAAO,0CAAkC,OAAO,CAAC,IAAI,CAgBjG,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"useConfig.d.ts","sourceRoot":"","sources":["../../src/hooks/useConfig.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,SAAS,CAAA;AACrD,OAAO,EAAE,KAAK,YAAY,EAAU,MAAM,KAAK,CAAA;AAE/C,eAAO,MAAM,oBAAoB,EACnB,YAAY,CAAC,sBAAsB,CAAC,CAAA;AAElD,0DAA0D;AAC1D,eAAO,MAAM,SAAS,8BAGrB,CAAA"}
1
+ {"version":3,"file":"useConfig.d.ts","sourceRoot":"","sources":["../../src/hooks/useConfig.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,SAAS,CAAA;AACrD,OAAO,EAAE,KAAK,YAAY,EAAU,MAAM,KAAK,CAAA;AAE/C,eAAO,MAAM,oBAAoB,EAAe,YAAY,CAAC,sBAAsB,CAAC,CAAA;AAEpF,0DAA0D;AAC1D,eAAO,MAAM,SAAS,8BAGrB,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"useDeprecationWarnings.d.ts","sourceRoot":"","sources":["../../src/hooks/useDeprecationWarnings.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,sBAAsB,CAAA;AAOlE;;GAEG;AACH,wBAAgB,sBAAsB,CAAC,aAAa,EAAE,sBAAsB,QAgC3E"}
1
+ {"version":3,"file":"useDeprecationWarnings.d.ts","sourceRoot":"","sources":["../../src/hooks/useDeprecationWarnings.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,sBAAsB,CAAA;AAOlE;;GAEG;AACH,wBAAgB,sBAAsB,CAAC,aAAa,EAAE,sBAAsB,QA4B3E"}
@@ -6,11 +6,7 @@ function p(e) {
6
6
  () => {
7
7
  e.proxy && console.warn(
8
8
  "[DEPRECATED] You’re using the deprecated 'proxy' attribute, rename it to 'proxyUrl' or update the package."
9
- ), (e.proxyUrl || e.proxy) === o && (console.warn(
10
- `[DEPRECATED] Warning: configuration.proxyUrl points to our old proxy (${o}).`
11
- ), console.warn(
12
- `[DEPRECATED] We are overwriting the value and use the new proxy URL (${r}) instead.`
13
- ), delete e.proxy, e.proxyUrl = r, console.warn(
9
+ ), (e.proxyUrl || e.proxy) === o && (console.warn(`[DEPRECATED] Warning: configuration.proxyUrl points to our old proxy (${o}).`), console.warn(`[DEPRECATED] We are overwriting the value and use the new proxy URL (${r}) instead.`), delete e.proxy, e.proxyUrl = r, console.warn(
14
10
  `[DEPRECATED] Action Required: You should manually update your configuration to use the new URL (${r}). Read more: https://github.com/scalar/scalar`
15
11
  ));
16
12
  },
@@ -1,5 +1,4 @@
1
- import type { Heading, Tag, TransformedOperation } from '@scalar/types/legacy';
2
- import type { PathRouting } from '../types';
1
+ import type { Heading, PathRouting, Tag, TransformedOperation } from '@scalar/types/legacy';
3
2
  /**
4
3
  * Hook which provides reactive hash state from the URL
5
4
  * Also hash is only readable by the client so keep that in mind for SSR
@@ -1 +1 @@
1
- {"version":3,"file":"useNavState.d.ts","sourceRoot":"","sources":["../../src/hooks/useNavState.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,OAAO,EAAE,GAAG,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAA;AAI9E,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,UAAU,CAAA;AAwF3C;;;;;;GAMG;AACH,eAAO,MAAM,WAAW;;IAsDpB,mCAAmC;4BACX,MAAM;IAG9B;;;;OAIG;+BAnF0B,MAAM;IAqFnC;;;;;OAKG;oCApGY,MAAM;IAsGrB;;;OAGG;uCAjIY,MAAM;IAmIrB,0DAA0D;;6BAjC5B;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,CAAA;KAAE;yBA5BrC;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE;4BATb,OAAO;gCAyBH,oBAAoB,aAAa,GAAG;iCAjHrC,MAAM;;oBA0GjB,GAAG;;;;CAiE3B,CAAA"}
1
+ {"version":3,"file":"useNavState.d.ts","sourceRoot":"","sources":["../../src/hooks/useNavState.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,OAAO,EAAE,WAAW,EAAE,GAAG,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAA;AA2E3F;;;;;;GAMG;AACH,eAAO,MAAM,WAAW;;IAsDpB,mCAAmC;4BACX,MAAM;IAG9B;;;;OAIG;+BAhF0B,MAAM;IAkFnC;;;;;OAKG;oCA9FgC,MAAM;IAgGzC;;;OAGG;uCArHmC,MAAM;IAuH5C,0DAA0D;;6BAjC5B;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,CAAA;KAAE;yBA5BrC;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE;4BATb,OAAO;gCAyBH,oBAAoB,aAAa,GAAG;iCAlGrC,MAAM;;oBA2FjB,GAAG;;;;CAiE3B,CAAA"}
@@ -14,22 +14,15 @@ const s = l(""), u = l(m.hash ?? ""), o = l(), w = l(!1), h = (e) => {
14
14
  }, v = () => {
15
15
  u.value = o.value ? h(window.location.pathname) : (
16
16
  // Must remove the prefix from the hash as the internal hash value should be pure
17
- decodeURIComponent(window.location.hash.replace(/^#/, "")).slice(
18
- s.value.length
19
- )
17
+ decodeURIComponent(window.location.hash.replace(/^#/, "")).slice(s.value.length)
20
18
  );
21
19
  }, $ = (e, r = window.location.href) => {
22
20
  const n = new URL(r);
23
- o.value ? n.pathname = f(
24
- o.value.basePath,
25
- e
26
- ) : n.hash = s.value + e, u.value = e, window.history.replaceState({}, "", n);
21
+ o.value ? n.pathname = f(o.value.basePath, e) : n.hash = s.value + e, u.value = e, window.history.replaceState({}, "", n);
27
22
  }, S = (e, r = window.location.href, n = window.location.search) => {
28
23
  const a = new URL(r);
29
24
  return a.hash = s.value + e, a.search = n, a.toString();
30
- }, U = (e = u.value) => `${s.value}${e}`, b = () => decodeURIComponent(
31
- window.location.hash.replace(/^#/, "").slice(s.value.length)
32
- ), x = () => {
25
+ }, U = (e = u.value) => `${s.value}${e}`, b = () => decodeURIComponent(window.location.hash.replace(/^#/, "").slice(s.value.length)), x = () => {
33
26
  const e = p(), r = (t) => typeof (e == null ? void 0 : e.generateHeadingSlug) == "function" ? `${e.generateHeadingSlug(t)}` : t.slug ? `description/${t.slug}` : "", n = (t) => t != null && t.name ? typeof (e == null ? void 0 : e.generateModelSlug) == "function" ? `model/${e.generateModelSlug(t)}` : `model/${c(t.name)}` : "models", a = (t) => typeof (e == null ? void 0 : e.generateTagSlug) == "function" ? `tag/${e.generateTagSlug(t)}` : `tag/${c(t.name)}`;
34
27
  return {
35
28
  hash: u,
@@ -38,11 +38,11 @@ export declare function useReactiveSpec({ specConfig, proxyUrl, }: {
38
38
  default?: any;
39
39
  format?: string | undefined;
40
40
  description?: string | undefined;
41
- properties?: Record<string, import("@scalar/types").Schema> | undefined;
41
+ properties?: Record<string, import("@scalar/types/legacy").Schema> | undefined;
42
42
  } | undefined;
43
43
  example?: any;
44
44
  examples?: (Map<string, any> & Omit<Map<string, any>, keyof Map<any, any>>) | undefined;
45
- content?: import("@scalar/types").RequestBodyMimeTypes | undefined;
45
+ content?: import("@scalar/types/legacy").RequestBodyMimeTypes | undefined;
46
46
  headers?: {
47
47
  [key: string]: import("@scalar/openapi-types").OpenAPI.HeaderObject;
48
48
  } | undefined;
@@ -52,7 +52,7 @@ export declare function useReactiveSpec({ specConfig, proxyUrl, }: {
52
52
  requestBody?: {
53
53
  description?: string | undefined;
54
54
  required?: boolean | undefined;
55
- content?: import("@scalar/types").RequestBodyMimeTypes | undefined;
55
+ content?: import("@scalar/types/legacy").RequestBodyMimeTypes | undefined;
56
56
  } | undefined;
57
57
  summary?: string | undefined;
58
58
  tags?: string[] | undefined;
@@ -67,7 +67,7 @@ export declare function useReactiveSpec({ specConfig, proxyUrl, }: {
67
67
  label: string;
68
68
  source: string;
69
69
  }[] | undefined;
70
- 'x-scalar-stability'?: import("@scalar/types").XScalarStability | undefined;
70
+ 'x-scalar-stability'?: import("@scalar/types/legacy").XScalarStability | undefined;
71
71
  'x-codeSamples'?: {
72
72
  lang: string;
73
73
  label: string;
@@ -101,11 +101,11 @@ export declare function useReactiveSpec({ specConfig, proxyUrl, }: {
101
101
  default?: any;
102
102
  format?: string | undefined;
103
103
  description?: string | undefined;
104
- properties?: Record<string, import("@scalar/types").Schema> | undefined;
104
+ properties?: Record<string, import("@scalar/types/legacy").Schema> | undefined;
105
105
  } | undefined;
106
106
  example?: any;
107
107
  examples?: (Map<string, any> & Omit<Map<string, any>, keyof Map<any, any>>) | undefined;
108
- content?: import("@scalar/types").RequestBodyMimeTypes | undefined;
108
+ content?: import("@scalar/types/legacy").RequestBodyMimeTypes | undefined;
109
109
  headers?: {
110
110
  [key: string]: import("@scalar/openapi-types").OpenAPI.HeaderObject;
111
111
  } | undefined;
@@ -216,8 +216,8 @@ export declare function useReactiveSpec({ specConfig, proxyUrl, }: {
216
216
  callbacks?: Record<string, import("@scalar/openapi-types").OpenAPIV3_1.ReferenceObject | import("@scalar/openapi-types").OpenAPIV3_1.CallbackObject> | undefined;
217
217
  pathItems?: Record<string, import("@scalar/openapi-types").OpenAPIV3_1.ReferenceObject | import("@scalar/openapi-types").OpenAPIV3_1.PathItemObject> | undefined;
218
218
  } | undefined;
219
- webhooks?: import("@scalar/types").Webhooks | undefined;
220
- definitions?: import("@scalar/types").Definitions | undefined;
219
+ webhooks?: import("@scalar/types/legacy").Webhooks | undefined;
220
+ definitions?: import("@scalar/types/legacy").Definitions | undefined;
221
221
  swagger?: import("@scalar/openapi-types").OpenAPIV2.Document["swagger"];
222
222
  openapi?: import("@scalar/openapi-types").OpenAPIV3.Document["openapi"] | import("@scalar/openapi-types").OpenAPIV3_1.Document["openapi"];
223
223
  'x-tagGroups'?: {
@@ -1 +1 @@
1
- {"version":3,"file":"useReactiveSpec.d.ts","sourceRoot":"","sources":["../../src/hooks/useReactiveSpec.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAA;AAC7D,OAAO,EAAE,KAAK,gBAAgB,EAAiC,MAAM,KAAK,CAAA;AAyD1E;;GAEG;AACH,wBAAgB,eAAe,CAAC,EAC9B,UAAU,EACV,QAAQ,GACT,EAAE;IACD,UAAU,CAAC,EAAE,gBAAgB,CAAC,iBAAiB,CAAC,CAAA;IAChD,QAAQ,CAAC,EAAE,gBAAgB,CAAC,MAAM,CAAC,CAAA;CACpC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAwDA"}
1
+ {"version":3,"file":"useReactiveSpec.d.ts","sourceRoot":"","sources":["../../src/hooks/useReactiveSpec.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAA;AAC7D,OAAO,EAAE,KAAK,gBAAgB,EAAiC,MAAM,KAAK,CAAA;AAoD1E;;GAEG;AACH,wBAAgB,eAAe,CAAC,EAC9B,UAAU,EACV,QAAQ,GACT,EAAE;IACD,UAAU,CAAC,EAAE,gBAAgB,CAAC,iBAAiB,CAAC,CAAA;IAChD,QAAQ,CAAC,EAAE,gBAAgB,CAAC,MAAM,CAAC,CAAA;CACpC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAqDA"}
@@ -1,13 +1,13 @@
1
1
  import { isValidUrl as d, fetchSpecFromUrl as f, prettyPrintJson as h } from "@scalar/oas-utils/helpers";
2
- import { ref as u, reactive as v, watch as m, toValue as a } from "vue";
3
- import { parse as g } from "../helpers/parse.js";
2
+ import { ref as u, reactive as g, watch as m, toValue as s } from "vue";
3
+ import { parse as v } from "../helpers/parse.js";
4
4
  import { createEmptySpecification as l } from "../helpers/createEmptySpecification.js";
5
5
  const y = async ({ url: e, content: r }, n) => {
6
6
  if (e) {
7
- const s = performance.now();
7
+ const a = performance.now();
8
8
  try {
9
9
  const c = d(e) ? await f(e, n) : await f(e), o = performance.now();
10
- return console.log(`fetch: ${Math.round(o - s)} ms (${e})`), console.log("size:", Math.round(c.length / 1024), "kB"), c;
10
+ return console.log(`fetch: ${Math.round(o - a)} ms (${e})`), console.log("size:", Math.round(c.length / 1024), "kB"), c;
11
11
  } catch (c) {
12
12
  console.error("Failed to fetch spec from URL:", c);
13
13
  }
@@ -22,25 +22,24 @@ function C({
22
22
  specConfig: e,
23
23
  proxyUrl: r
24
24
  }) {
25
- const n = u(""), t = v(l()), s = u(null);
25
+ const n = u(""), t = g(l()), a = u(null);
26
26
  function c(o) {
27
- return o ? g(o, {
28
- proxyUrl: r ? a(r) : void 0
27
+ return o ? v(o, {
28
+ proxyUrl: r ? s(r) : void 0
29
29
  }).then((i) => {
30
- s.value = null, Object.assign(t, {
31
- servers: [],
30
+ a.value = null, Object.assign(t, {
32
31
  ...i
33
32
  });
34
33
  }).catch((i) => {
35
- s.value = i.toString();
34
+ a.value = i.toString();
36
35
  }) : Object.assign(t, l());
37
36
  }
38
37
  return m(
39
- () => a(e),
38
+ () => s(e),
40
39
  async (o) => {
41
40
  var i;
42
41
  if (o) {
43
- const p = (i = await y(o, a(r))) == null ? void 0 : i.trim();
42
+ const p = (i = await y(o, s(r))) == null ? void 0 : i.trim();
44
43
  typeof p == "string" && (n.value = p);
45
44
  }
46
45
  },
@@ -50,7 +49,7 @@ function C({
50
49
  }), {
51
50
  rawSpec: n,
52
51
  parsedSpec: t,
53
- specErrors: s
52
+ specErrors: a
54
53
  };
55
54
  }
56
55
  export {
@@ -1 +1 @@
1
- {"version":3,"file":"useSidebar.d.ts","sourceRoot":"","sources":["../../src/hooks/useSidebar.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,IAAI,EAAE,GAAG,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAA;AAc3E,MAAM,MAAM,YAAY,GAAG;IACzB,EAAE,EAAE,MAAM,CAAA;IACV,KAAK,EAAE,MAAM,CAAA;IACb,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,EAAE,YAAY,EAAE,CAAA;IACzB,MAAM,CAAC,EAAE,MAAM,IAAI,CAAA;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,IAAI,EAAE,OAAO,CAAA;IACb,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB,CAAA;AAcD,uDAAuD;AACvD,iBAAS,aAAa,CAAC,IAAI,EAAE,IAAI,QA6ChC;AAMD,KAAK,qBAAqB,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;AAMpD,iBAAS,0BAA0B,CAAC,GAAG,EAAE,MAAM,QAE9C;AAED,iBAAS,uBAAuB,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,QAE3D;AAsOD,MAAM,MAAM,gBAAgB,GAAG;IAC7B,UAAU,EAAE,IAAI,CAAA;CACjB,CAAA;AAED,MAAM,MAAM,YAAY,GAAG;IACzB,UAAU,CAAC,EAAE,OAAO,GAAG,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,KAAK,MAAM,CAAC,CAAA;IACnD,gBAAgB,CAAC,EACb,OAAO,GACP,QAAQ,GACR,CAAC,CAAC,CAAC,EAAE,oBAAoB,EAAE,CAAC,EAAE,oBAAoB,KAAK,MAAM,CAAC,CAAA;CACnE,CAAA;AAED;;;;;;GAMG;AACH,eAAO,MAAM,iBAAiB,gBAAiB,MAAM,SAepD,CAAA;AAED;;GAEG;AACH,wBAAgB,UAAU,CAAC,OAAO,CAAC,EAAE,gBAAgB,GAAG,YAAY;;;;;;;;;;;;;qCApBrB,MAAM;EA2EpD"}
1
+ {"version":3,"file":"useSidebar.d.ts","sourceRoot":"","sources":["../../src/hooks/useSidebar.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,IAAI,EAAE,GAAG,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAA;AAc3E,MAAM,MAAM,YAAY,GAAG;IACzB,EAAE,EAAE,MAAM,CAAA;IACV,KAAK,EAAE,MAAM,CAAA;IACb,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,EAAE,YAAY,EAAE,CAAA;IACzB,MAAM,CAAC,EAAE,MAAM,IAAI,CAAA;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,IAAI,EAAE,OAAO,CAAA;IACb,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB,CAAA;AAcD,uDAAuD;AACvD,iBAAS,aAAa,CAAC,IAAI,EAAE,IAAI,QA0ChC;AAMD,KAAK,qBAAqB,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;AAIpD,iBAAS,0BAA0B,CAAC,GAAG,EAAE,MAAM,QAE9C;AAED,iBAAS,uBAAuB,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,QAE3D;AAsND,MAAM,MAAM,gBAAgB,GAAG;IAC7B,UAAU,EAAE,IAAI,CAAA;CACjB,CAAA;AAED,MAAM,MAAM,YAAY,GAAG;IACzB,UAAU,CAAC,EAAE,OAAO,GAAG,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,KAAK,MAAM,CAAC,CAAA;IACnD,gBAAgB,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,CAAC,CAAC,CAAC,EAAE,oBAAoB,EAAE,CAAC,EAAE,oBAAoB,KAAK,MAAM,CAAC,CAAA;CACvG,CAAA;AAED;;;;;;GAMG;AACH,eAAO,MAAM,iBAAiB,gBAAiB,MAAM,SAepD,CAAA;AAED;;GAEG;AACH,wBAAgB,UAAU,CAAC,OAAO,CAAC,EAAE,gBAAgB,GAAG,YAAY;;;;;;;;;;;;;qCApBrB,MAAM;EA2EpD"}