@scalar/api-reference 1.25.75 → 1.25.77

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 (153) hide show
  1. package/CHANGELOG.md +25 -0
  2. package/dist/browser/standalone.js +23397 -23411
  3. package/dist/browser/webpack-stats.json +1 -1
  4. package/dist/components/ApiReference.vue.d.ts.map +1 -1
  5. package/dist/components/ApiReference.vue.js +41 -56
  6. package/dist/components/ApiReferenceLayout.vue.d.ts +2 -2
  7. package/dist/components/ApiReferenceLayout.vue.d.ts.map +1 -1
  8. package/dist/components/ApiReferenceLayout.vue.js +3 -3
  9. package/dist/components/ApiReferenceLayout.vue2.js +140 -123
  10. package/dist/components/Content/Content.vue.d.ts +0 -1
  11. package/dist/components/Content/Content.vue.d.ts.map +1 -1
  12. package/dist/components/Content/Content.vue.js +1 -1
  13. package/dist/components/Content/Content.vue2.js +67 -62
  14. package/dist/components/Content/Lazy/Loading.vue.d.ts.map +1 -1
  15. package/dist/components/Content/Lazy/Loading.vue.js +74 -69
  16. package/dist/components/Content/Tag/TagList.vue.d.ts.map +1 -1
  17. package/dist/components/Content/Tag/TagList.vue.js +37 -33
  18. package/dist/embeds/ExampleRequest/ExampleRequest.vue.d.ts +1 -1
  19. package/dist/embeds/ExampleRequest/ExampleRequest.vue.d.ts.map +1 -1
  20. package/dist/embeds/OpenApiDocument/OpenApiDocument.vue.d.ts +60 -60
  21. package/dist/embeds/OpenApiDocument/OpenApiDocument.vue.d.ts.map +1 -1
  22. package/dist/embeds/OpenApiDocument/types.d.ts +1 -1
  23. package/dist/embeds/OpenApiDocument/types.d.ts.map +1 -1
  24. package/dist/features/ApiClientModal/ApiClientModal.vue.d.ts.map +1 -1
  25. package/dist/features/ApiClientModal/ApiClientModal.vue.js +20 -18
  26. package/dist/features/ApiClientModal/useApiClient.d.ts +149 -138
  27. package/dist/features/ApiClientModal/useApiClient.d.ts.map +1 -1
  28. package/dist/features/ApiClientModal/useApiClient.js +6 -6
  29. package/dist/features/BaseUrl/ServerUrlSelect.vue.d.ts.map +1 -1
  30. package/dist/features/BaseUrl/ServerUrlSelect.vue.js +2 -2
  31. package/dist/features/BaseUrl/ServerVariablesSelect.vue.d.ts.map +1 -1
  32. package/dist/features/BaseUrl/ServerVariablesSelect.vue.js +3 -3
  33. package/dist/features/BaseUrl/ServerVariablesSelect.vue2.js +3 -3
  34. package/dist/features/BaseUrl/ServerVariablesTextbox.vue.d.ts.map +1 -1
  35. package/dist/features/BaseUrl/ServerVariablesTextbox.vue.js +2 -2
  36. package/dist/features/ExampleRequest/ExampleRequest.vue.d.ts +3 -0
  37. package/dist/features/ExampleRequest/ExampleRequest.vue.d.ts.map +1 -1
  38. package/dist/features/ExampleRequest/ExampleRequest.vue.js +1 -1
  39. package/dist/features/ExampleRequest/ExampleRequest.vue2.js +121 -147
  40. package/dist/features/Operation/Operation.vue.d.ts +6 -4
  41. package/dist/features/Operation/Operation.vue.d.ts.map +1 -1
  42. package/dist/features/Operation/Operation.vue.js +30 -13
  43. package/dist/features/Operation/hooks/useRequestExample.d.ts +17 -0
  44. package/dist/features/Operation/hooks/useRequestExample.d.ts.map +1 -0
  45. package/dist/features/Operation/hooks/useRequestExample.js +68 -0
  46. package/dist/features/Operation/layouts/ClassicLayout.vue.d.ts +2 -0
  47. package/dist/features/Operation/layouts/ClassicLayout.vue.d.ts.map +1 -1
  48. package/dist/features/Operation/layouts/ClassicLayout.vue.js +1 -1
  49. package/dist/features/Operation/layouts/ClassicLayout.vue2.js +47 -41
  50. package/dist/features/Operation/layouts/ModernLayout.vue.d.ts +2 -0
  51. package/dist/features/Operation/layouts/ModernLayout.vue.d.ts.map +1 -1
  52. package/dist/features/Operation/layouts/ModernLayout.vue.js +2 -2
  53. package/dist/features/Operation/layouts/ModernLayout.vue2.js +52 -48
  54. package/dist/helpers/convertRequestToHarRequest.d.ts +7 -0
  55. package/dist/helpers/convertRequestToHarRequest.d.ts.map +1 -0
  56. package/dist/helpers/convertRequestToHarRequest.js +64 -0
  57. package/dist/helpers/get-request.d.ts +40 -0
  58. package/dist/helpers/get-request.d.ts.map +1 -0
  59. package/dist/helpers/get-request.js +6 -0
  60. package/dist/helpers/getExampleCode.d.ts +2 -2
  61. package/dist/helpers/getExampleCode.d.ts.map +1 -1
  62. package/dist/helpers/getExampleCode.js +19 -16
  63. package/dist/helpers/index.d.ts +1 -3
  64. package/dist/helpers/index.d.ts.map +1 -1
  65. package/dist/helpers/provideSymbols.d.ts +0 -5
  66. package/dist/helpers/provideSymbols.d.ts.map +1 -1
  67. package/dist/helpers/provideSymbols.js +3 -4
  68. package/dist/hooks/useReactiveSpec.d.ts +1 -1
  69. package/dist/hooks/useSidebar.d.ts.map +1 -1
  70. package/dist/index.js +77 -85
  71. package/dist/legacy/helpers/getUrlFromServerState.js +8 -8
  72. package/dist/legacy/helpers/index.d.ts +0 -10
  73. package/dist/legacy/helpers/index.d.ts.map +1 -1
  74. package/dist/legacy/stores/index.d.ts +0 -3
  75. package/dist/legacy/stores/index.d.ts.map +1 -1
  76. package/dist/stores/index.d.ts +0 -1
  77. package/dist/stores/index.d.ts.map +1 -1
  78. package/dist/style.css +1 -1
  79. package/package.json +6 -6
  80. package/dist/components/Content/Authentication/Authentication.vue.d.ts +0 -8
  81. package/dist/components/Content/Authentication/Authentication.vue.d.ts.map +0 -1
  82. package/dist/components/Content/Authentication/Authentication.vue.js +0 -7
  83. package/dist/components/Content/Authentication/Authentication.vue2.js +0 -62
  84. package/dist/components/Content/Authentication/index.d.ts +0 -2
  85. package/dist/components/Content/Authentication/index.d.ts.map +0 -1
  86. package/dist/helpers/createRequest.d.ts +0 -6
  87. package/dist/helpers/createRequest.d.ts.map +0 -1
  88. package/dist/helpers/createRequest.js +0 -16
  89. package/dist/helpers/getApiClientRequest.d.ts +0 -13
  90. package/dist/helpers/getApiClientRequest.d.ts.map +0 -1
  91. package/dist/helpers/getApiClientRequest.js +0 -43
  92. package/dist/helpers/getHarRequest.d.ts +0 -4
  93. package/dist/helpers/getHarRequest.d.ts.map +0 -1
  94. package/dist/helpers/getHarRequest.js +0 -34
  95. package/dist/legacy/components/CardForm.vue.d.ts +0 -18
  96. package/dist/legacy/components/CardForm.vue.d.ts.map +0 -1
  97. package/dist/legacy/components/CardForm.vue.js +0 -13
  98. package/dist/legacy/components/CardFormButton.vue.d.ts +0 -22
  99. package/dist/legacy/components/CardFormButton.vue.d.ts.map +0 -1
  100. package/dist/legacy/components/CardFormButton.vue.js +0 -7
  101. package/dist/legacy/components/CardFormButton.vue2.js +0 -18
  102. package/dist/legacy/components/CardFormGroup.vue.d.ts +0 -18
  103. package/dist/legacy/components/CardFormGroup.vue.d.ts.map +0 -1
  104. package/dist/legacy/components/CardFormGroup.vue.js +0 -13
  105. package/dist/legacy/components/CardFormRows.vue.d.ts +0 -18
  106. package/dist/legacy/components/CardFormRows.vue.d.ts.map +0 -1
  107. package/dist/legacy/components/CardFormRows.vue.js +0 -13
  108. package/dist/legacy/components/CardFormTextInput.vue.d.ts +0 -23
  109. package/dist/legacy/components/CardFormTextInput.vue.d.ts.map +0 -1
  110. package/dist/legacy/components/CardFormTextInput.vue.js +0 -7
  111. package/dist/legacy/components/CardFormTextInput.vue2.js +0 -53
  112. package/dist/legacy/components/SecurityScheme.vue.d.ts +0 -8
  113. package/dist/legacy/components/SecurityScheme.vue.d.ts.map +0 -1
  114. package/dist/legacy/components/SecurityScheme.vue.js +0 -7
  115. package/dist/legacy/components/SecurityScheme.vue2.js +0 -393
  116. package/dist/legacy/components/SecuritySchemeScopes.vue.d.ts +0 -13
  117. package/dist/legacy/components/SecuritySchemeScopes.vue.d.ts.map +0 -1
  118. package/dist/legacy/components/SecuritySchemeScopes.vue.js +0 -7
  119. package/dist/legacy/components/SecuritySchemeScopes.vue2.js +0 -91
  120. package/dist/legacy/components/SecuritySchemeSelector.vue.d.ts +0 -11
  121. package/dist/legacy/components/SecuritySchemeSelector.vue.d.ts.map +0 -1
  122. package/dist/legacy/components/SecuritySchemeSelector.vue.js +0 -7
  123. package/dist/legacy/components/SecuritySchemeSelector.vue2.js +0 -96
  124. package/dist/legacy/helpers/createPlaceholderRequest.d.ts +0 -6
  125. package/dist/legacy/helpers/createPlaceholderRequest.d.ts.map +0 -1
  126. package/dist/legacy/helpers/encodeStringAsBase64.js +0 -6
  127. package/dist/legacy/helpers/getRequestFromAuthentication.d.ts +0 -10
  128. package/dist/legacy/helpers/getRequestFromAuthentication.d.ts.map +0 -1
  129. package/dist/legacy/helpers/getRequestFromAuthentication.js +0 -83
  130. package/dist/legacy/helpers/humanDiff.d.ts +0 -5
  131. package/dist/legacy/helpers/humanDiff.d.ts.map +0 -1
  132. package/dist/legacy/helpers/mapFromArray.d.ts +0 -5
  133. package/dist/legacy/helpers/mapFromArray.d.ts.map +0 -1
  134. package/dist/legacy/helpers/normalizeHeaderName.d.ts +0 -5
  135. package/dist/legacy/helpers/normalizeHeaderName.d.ts.map +0 -1
  136. package/dist/legacy/helpers/normalizeHeaderName.js +0 -6
  137. package/dist/legacy/helpers/normalizeHeaders.d.ts +0 -8
  138. package/dist/legacy/helpers/normalizeHeaders.d.ts.map +0 -1
  139. package/dist/legacy/helpers/normalizeHeaders.js +0 -22
  140. package/dist/legacy/helpers/normalizePath.d.ts +0 -5
  141. package/dist/legacy/helpers/normalizePath.d.ts.map +0 -1
  142. package/dist/legacy/helpers/normalizeUrl.d.ts +0 -5
  143. package/dist/legacy/helpers/normalizeUrl.d.ts.map +0 -1
  144. package/dist/legacy/helpers/prepareClientRequestConfig.d.ts +0 -24
  145. package/dist/legacy/helpers/prepareClientRequestConfig.d.ts.map +0 -1
  146. package/dist/legacy/stores/useAuthenticationStore.d.ts +0 -55
  147. package/dist/legacy/stores/useAuthenticationStore.d.ts.map +0 -1
  148. package/dist/legacy/stores/useAuthenticationStore.js +0 -36
  149. package/dist/legacy/stores/useOpenApiStore.d.ts +0 -125
  150. package/dist/legacy/stores/useOpenApiStore.d.ts.map +0 -1
  151. package/dist/legacy/stores/useOpenApiStore.js +0 -9
  152. package/dist/legacy/stores/useRequestStore.d.ts +0 -62
  153. package/dist/legacy/stores/useRequestStore.d.ts.map +0 -1
@@ -1,106 +1,111 @@
1
- import { defineComponent as M, computed as B, openBlock as s, createElementBlock as t, Fragment as i, createStaticVNode as L, createElementVNode as b, renderSlot as l, createVNode as o, unref as r, createBlock as a, withCtx as k, normalizeClass as N, renderList as V, createCommentVNode as p } from "vue";
2
- import { ScalarErrorBoundary as E } from "@scalar/components";
3
- import A from "./Lazy/Loading.vue.js";
1
+ import { defineComponent as A, computed as B, openBlock as r, createElementBlock as i, Fragment as d, createStaticVNode as E, createElementVNode as l, renderSlot as n, createVNode as o, unref as s, createBlock as a, withCtx as k, normalizeClass as L, renderList as N, createCommentVNode as p } from "vue";
2
+ import { useActiveEntities as V } from "@scalar/api-client/store";
3
+ import { RequestAuthDataTable as R } from "@scalar/api-client/views/Request/RequestSection/RequestAuth";
4
+ import { ScalarErrorBoundary as q } from "@scalar/components";
5
+ import z from "./Lazy/Loading.vue.js";
4
6
  /* empty css */
5
- import R from "./Introduction/Introduction.vue.js";
6
- import z from "../../features/BaseUrl/BaseUrl.vue.js";
7
- import F from "./Authentication/Authentication.vue.js";
7
+ import D from "./Introduction/Introduction.vue.js";
8
+ import F from "../../features/BaseUrl/BaseUrl.vue.js";
8
9
  import G from "./ClientLibraries/ClientLibraries.vue.js";
9
- import h from "./Tag/TagList.vue.js";
10
+ import b from "./Tag/TagList.vue.js";
10
11
  import I from "../../features/Operation/Webhooks.vue.js";
11
- import W from "./Models/ModelsAccordion.vue.js";
12
- import j from "./Models/Models.vue.js";
13
- import { useSidebar as q } from "../../hooks/useSidebar.js";
14
- import { hasModels as D } from "../../helpers/hasModels.js";
12
+ import T from "./Models/ModelsAccordion.vue.js";
13
+ import W from "./Models/Models.vue.js";
14
+ import { useSidebar as j } from "../../hooks/useSidebar.js";
15
+ import { hasModels as H } from "../../helpers/hasModels.js";
15
16
  import { getModels as g } from "../../helpers/getModels.js";
16
- const H = { class: "narrow-references-container" }, oe = /* @__PURE__ */ M({
17
+ const J = { class: "narrow-references-container" }, K = { class: "scalar-client p-[9px] border-y-1/2" }, ce = /* @__PURE__ */ A({
17
18
  __name: "Content",
18
19
  props: {
19
20
  parsedSpec: {},
20
21
  layout: { default: "modern" },
21
22
  baseServerURL: {},
22
- servers: {},
23
- proxyUrl: {}
23
+ servers: {}
24
24
  },
25
- setup(U) {
26
- const n = U, { hideModels: w } = q(), C = B(
27
- () => n.layout === "classic" ? "after" : "aside"
25
+ setup(C) {
26
+ const m = C, { hideModels: w } = j(), { activeCollection: U } = V(), $ = B(
27
+ () => m.layout === "classic" ? "after" : "aside"
28
28
  );
29
- return (e, c) => {
30
- var f, m, u, v;
31
- return s(), t(i, null, [
32
- c[0] || (c[0] = L('<div class="section-flare" data-v-fbdf2978><div class="section-flare-item" data-v-fbdf2978></div><div class="section-flare-item" data-v-fbdf2978></div><div class="section-flare-item" data-v-fbdf2978></div><div class="section-flare-item" data-v-fbdf2978></div><div class="section-flare-item" data-v-fbdf2978></div><div class="section-flare-item" data-v-fbdf2978></div><div class="section-flare-item" data-v-fbdf2978></div><div class="section-flare-item" data-v-fbdf2978></div></div>', 1)),
33
- b("div", H, [
34
- l(e.$slots, "start", {}, void 0, !0),
35
- o(r(A), {
29
+ return (e, u) => {
30
+ var f, v, S, y;
31
+ return r(), i(d, null, [
32
+ u[0] || (u[0] = E('<div class="section-flare" data-v-604f5c87><div class="section-flare-item" data-v-604f5c87></div><div class="section-flare-item" data-v-604f5c87></div><div class="section-flare-item" data-v-604f5c87></div><div class="section-flare-item" data-v-604f5c87></div><div class="section-flare-item" data-v-604f5c87></div><div class="section-flare-item" data-v-604f5c87></div><div class="section-flare-item" data-v-604f5c87></div><div class="section-flare-item" data-v-604f5c87></div></div>', 1)),
33
+ l("div", J, [
34
+ n(e.$slots, "start", {}, void 0, !0),
35
+ o(s(z), {
36
36
  layout: e.layout,
37
37
  parsedSpec: e.parsedSpec
38
38
  }, null, 8, ["layout", "parsedSpec"]),
39
- (m = (f = e.parsedSpec) == null ? void 0 : f.info) != null && m.title || (v = (u = e.parsedSpec) == null ? void 0 : u.info) != null && v.description ? (s(), a(r(R), {
39
+ (v = (f = e.parsedSpec) == null ? void 0 : f.info) != null && v.title || (y = (S = e.parsedSpec) == null ? void 0 : S.info) != null && y.description ? (r(), a(s(D), {
40
40
  key: 0,
41
41
  info: e.parsedSpec.info,
42
42
  parsedSpec: e.parsedSpec
43
43
  }, {
44
- [C.value]: k(() => [
45
- o(r(E), null, {
46
- default: k(() => [
47
- b("div", {
48
- class: N(["introduction-card", { "introduction-card-row": e.layout === "classic" }])
49
- }, [
50
- o(r(z), {
51
- class: "introduction-card-item",
52
- defaultServerUrl: e.baseServerURL,
53
- servers: n.servers,
54
- specification: e.parsedSpec
55
- }, null, 8, ["defaultServerUrl", "servers", "specification"]),
56
- o(r(F), {
57
- class: "introduction-card-item",
58
- parsedSpec: e.parsedSpec,
59
- proxyUrl: e.proxyUrl
60
- }, null, 8, ["parsedSpec", "proxyUrl"]),
61
- o(r(G), { class: "introduction-card-item" })
62
- ], 2)
63
- ]),
44
+ [$.value]: k(() => [
45
+ o(s(q), null, {
46
+ default: k(() => {
47
+ var t;
48
+ return [
49
+ l("div", {
50
+ class: L(["introduction-card", { "introduction-card-row": e.layout === "classic" }])
51
+ }, [
52
+ o(s(F), {
53
+ class: "introduction-card-item",
54
+ defaultServerUrl: e.baseServerURL,
55
+ servers: m.servers,
56
+ specification: e.parsedSpec
57
+ }, null, 8, ["defaultServerUrl", "servers", "specification"]),
58
+ l("div", K, [
59
+ o(s(R), {
60
+ layout: "reference",
61
+ selectedSecuritySchemeUids: ((t = s(U)) == null ? void 0 : t.selectedSecuritySchemeUids) ?? [],
62
+ title: "Authentication"
63
+ }, null, 8, ["selectedSecuritySchemeUids"])
64
+ ]),
65
+ o(s(G), { class: "introduction-card-item" })
66
+ ], 2)
67
+ ];
68
+ }),
64
69
  _: 1
65
70
  })
66
71
  ]),
67
72
  _: 2
68
- }, 1032, ["info", "parsedSpec"])) : l(e.$slots, "empty-state", { key: 1 }, void 0, !0),
69
- e.parsedSpec.tags ? (s(), t(i, { key: 2 }, [
70
- e.parsedSpec["x-tagGroups"] ? (s(!0), t(i, { key: 0 }, V(e.parsedSpec["x-tagGroups"], (S) => (s(), a(r(h), {
71
- key: S.name,
73
+ }, 1032, ["info", "parsedSpec"])) : n(e.$slots, "empty-state", { key: 1 }, void 0, !0),
74
+ e.parsedSpec.tags ? (r(), i(d, { key: 2 }, [
75
+ e.parsedSpec["x-tagGroups"] ? (r(!0), i(d, { key: 0 }, N(e.parsedSpec["x-tagGroups"], (t) => (r(), a(s(b), {
76
+ key: t.name,
72
77
  layout: e.layout,
73
78
  spec: e.parsedSpec,
74
- tags: S.tags.map((d) => {
75
- var y;
76
- return (y = e.parsedSpec.tags) == null ? void 0 : y.find(($) => $.name === d);
77
- }).filter((d) => !!d)
78
- }, null, 8, ["layout", "spec", "tags"]))), 128)) : (s(), a(r(h), {
79
+ tags: t.tags.map((c) => {
80
+ var h;
81
+ return (h = e.parsedSpec.tags) == null ? void 0 : h.find((M) => M.name === c);
82
+ }).filter((c) => !!c)
83
+ }, null, 8, ["layout", "spec", "tags"]))), 128)) : (r(), a(s(b), {
79
84
  key: 1,
80
85
  layout: e.layout,
81
86
  spec: e.parsedSpec,
82
87
  tags: e.parsedSpec.tags
83
88
  }, null, 8, ["layout", "spec", "tags"]))
84
89
  ], 64)) : p("", !0),
85
- e.parsedSpec.webhooks ? (s(), a(r(I), {
90
+ e.parsedSpec.webhooks ? (r(), a(s(I), {
86
91
  key: 3,
87
92
  webhooks: e.parsedSpec.webhooks
88
93
  }, null, 8, ["webhooks"])) : p("", !0),
89
- r(D)(e.parsedSpec) && !r(w) ? (s(), t(i, { key: 4 }, [
90
- e.layout === "classic" ? (s(), a(r(W), {
94
+ s(H)(e.parsedSpec) && !s(w) ? (r(), i(d, { key: 4 }, [
95
+ e.layout === "classic" ? (r(), a(s(T), {
91
96
  key: 0,
92
- schemas: r(g)(e.parsedSpec)
93
- }, null, 8, ["schemas"])) : (s(), a(r(j), {
97
+ schemas: s(g)(e.parsedSpec)
98
+ }, null, 8, ["schemas"])) : (r(), a(s(W), {
94
99
  key: 1,
95
- schemas: r(g)(e.parsedSpec)
100
+ schemas: s(g)(e.parsedSpec)
96
101
  }, null, 8, ["schemas"]))
97
102
  ], 64)) : p("", !0),
98
- l(e.$slots, "end", {}, void 0, !0)
103
+ n(e.$slots, "end", {}, void 0, !0)
99
104
  ])
100
105
  ], 64);
101
106
  };
102
107
  }
103
108
  });
104
109
  export {
105
- oe as default
110
+ ce as default
106
111
  };
@@ -1 +1 @@
1
- {"version":3,"file":"Loading.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Lazy/Loading.vue"],"names":[],"mappings":"AA6NA,OAAO,KAAK,EACV,IAAI,EAGL,MAAM,sBAAsB,CAAA;AAkB7B;;;;;;;;;;;;GAYG;AACH,KAAK,WAAW,GAAG;IACf,MAAM,CAAC,EAAE,QAAQ,GAAG,SAAS,CAAA;IAC7B,UAAU,EAAE,IAAI,CAAA;CACjB,CAAC;;YAFS,QAAQ,GAAG,SAAS;;AAqQjC,wBAQG"}
1
+ {"version":3,"file":"Loading.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Lazy/Loading.vue"],"names":[],"mappings":"AAsOA,OAAO,KAAK,EACV,IAAI,EAGL,MAAM,sBAAsB,CAAA;AAkB7B;;;;;;;;;;;;GAYG;AACH,KAAK,WAAW,GAAG;IACf,MAAM,CAAC,EAAE,QAAQ,GAAG,SAAS,CAAA;IAC7B,UAAU,EAAE,IAAI,CAAA;CACjB,CAAC;;YAFS,QAAQ,GAAG,SAAS;;AAyQjC,wBAQG"}
@@ -1,117 +1,122 @@
1
- import { defineComponent as D, ref as v, watch as E, onMounted as K, withDirectives as M, openBlock as n, createElementBlock as f, normalizeClass as j, Fragment as g, renderList as k, createBlock as m, unref as o, withCtx as p, createCommentVNode as w, createVNode as _, createTextVNode as A, toDisplayString as F, vShow as H } from "vue";
2
- import { lazyBus as P } from "./lazyBus.js";
3
- import q from "../Tag/Tag.vue.js";
4
- import G from "../../../features/Operation/Operation.vue.js";
5
- import J from "../../Section/SectionContainer.vue.js";
6
- import Q from "../../Section/Section.vue.js";
7
- import R from "../../Section/SectionContent.vue.js";
8
- import U from "../../Section/SectionHeader.vue.js";
9
- import X from "../../Anchor/Anchor.vue.js";
10
- import Y from "../Schema/Schema.vue.js";
11
- import { getModels as h } from "../../../helpers/getModels.js";
12
- import { scrollToId as x } from "../../../helpers/scrollToId.js";
13
- import { useNavState as Z } from "../../../hooks/useNavState.js";
14
- const fe = /* @__PURE__ */ D({
1
+ import { defineComponent as K, ref as v, watch as M, onMounted as j, withDirectives as A, openBlock as a, createElementBlock as m, normalizeClass as F, Fragment as h, renderList as b, createBlock as f, unref as t, withCtx as p, createCommentVNode as w, createVNode as T, createTextVNode as H, toDisplayString as P, vShow as G } from "vue";
2
+ import { useWorkspace as J } from "@scalar/api-client/store";
3
+ import { lazyBus as Q } from "./lazyBus.js";
4
+ import R from "../Tag/Tag.vue.js";
5
+ import U from "../../../features/Operation/Operation.vue.js";
6
+ import X from "../../Section/SectionContainer.vue.js";
7
+ import Y from "../../Section/Section.vue.js";
8
+ import Z from "../../Section/SectionContent.vue.js";
9
+ import ee from "../../Section/SectionHeader.vue.js";
10
+ import te from "../../Anchor/Anchor.vue.js";
11
+ import oe from "../Schema/Schema.vue.js";
12
+ import { getModels as g } from "../../../helpers/getModels.js";
13
+ import { scrollToId as C } from "../../../helpers/scrollToId.js";
14
+ import { useNavState as re } from "../../../hooks/useNavState.js";
15
+ const ye = /* @__PURE__ */ K({
15
16
  __name: "Loading",
16
17
  props: {
17
18
  layout: { default: "modern" },
18
19
  parsedSpec: {}
19
20
  },
20
- setup(L) {
21
- const i = L, T = v(!1), S = v([]), y = v([]), { getModelId: V, getSectionId: z, getTagId: B, hash: a, isIntersectionEnabled: I } = Z(), C = v(i.layout !== "classic" && a.value);
22
- E(
21
+ setup(q) {
22
+ const i = q, _ = v(!1), y = v([]), S = v([]), { requests: E, requestExamples: L, securitySchemes: V } = J(), { getModelId: z, getSectionId: B, getTagId: N, hash: s, isIntersectionEnabled: I } = re(), x = v(i.layout !== "classic" && s.value);
23
+ M(
23
24
  () => {
24
25
  var r;
25
26
  return (r = i.parsedSpec.tags) == null ? void 0 : r.length;
26
27
  },
27
28
  (r) => {
28
29
  var e, u;
29
- if (!a.value || typeof r != "number" || !i.parsedSpec.tags)
30
+ if (!s.value || typeof r != "number" || !i.parsedSpec.tags)
30
31
  return;
31
- const s = z();
32
- if (s.startsWith("tag")) {
33
- let t = 0;
34
- const d = ((e = i.parsedSpec.tags) == null ? void 0 : e.findIndex(
35
- (b) => B(b) === s
36
- )) ?? 0, l = a.value.match(/tag\/([^/]+)\/([^/]+)\/(.+)/);
37
- if ((l == null ? void 0 : l.length) === 4) {
38
- const b = l[2], O = "/" + l[3];
39
- t = (u = i.parsedSpec.tags[d]) == null ? void 0 : u.operations.findIndex(
40
- ({ httpVerb: W, path: $ }) => b === W && O === $
32
+ const l = B();
33
+ if (l.startsWith("tag")) {
34
+ let o = 0;
35
+ const c = ((e = i.parsedSpec.tags) == null ? void 0 : e.findIndex(
36
+ (k) => N(k) === l
37
+ )) ?? 0, n = s.value.match(/tag\/([^/]+)\/([^/]+)\/(.+)/);
38
+ if ((n == null ? void 0 : n.length) === 4) {
39
+ const k = n[2], O = "/" + n[3];
40
+ o = (u = i.parsedSpec.tags[c]) == null ? void 0 : u.operations.findIndex(
41
+ ({ httpVerb: $, path: D }) => k === $ && O === D
41
42
  );
42
43
  }
43
- const c = i.parsedSpec.tags[d];
44
- if (!c) return;
45
- c.name !== "default" && (T.value = s !== a.value && s.startsWith("tag")), S.value.push({
46
- ...c,
47
- lazyOperations: c.operations.slice(
48
- t,
49
- t + 2
44
+ const d = i.parsedSpec.tags[c];
45
+ if (!d) return;
46
+ d.name !== "default" && (_.value = l !== s.value && l.startsWith("tag")), y.value.push({
47
+ ...d,
48
+ lazyOperations: d.operations.slice(
49
+ o,
50
+ o + 2
50
51
  )
51
52
  });
52
- } else if (a.value.startsWith("model")) {
53
- const t = Object.keys(h(i.parsedSpec) ?? {}), [, d] = a.value.toLowerCase().split("/"), l = a.value === "models" ? 0 : t.findIndex((c) => c.toLowerCase() === d);
54
- if (l === -1) return;
55
- y.value = t.slice(l, l + 3);
53
+ } else if (s.value.startsWith("model")) {
54
+ const o = Object.keys(g(i.parsedSpec) ?? {}), [, c] = s.value.toLowerCase().split("/"), n = s.value === "models" ? 0 : o.findIndex((d) => d.toLowerCase() === c);
55
+ if (n === -1) return;
56
+ S.value = o.slice(n, n + 3);
56
57
  } else
57
- typeof window < "u" && x(a.value), setTimeout(() => I.value = !0, 1e3);
58
+ typeof window < "u" && C(s.value), setTimeout(() => I.value = !0, 1e3);
58
59
  },
59
60
  { immediate: !0 }
60
61
  );
61
- const N = P.on(({ id: r }) => {
62
- const s = a.value;
63
- !s || r !== s || (N(), setTimeout(() => {
64
- typeof window < "u" && x(s), C.value = !1, setTimeout(() => I.value = !0, 1e3);
62
+ const W = Q.on(({ id: r }) => {
63
+ const l = s.value;
64
+ !l || r !== l || (W(), setTimeout(() => {
65
+ typeof window < "u" && C(l), x.value = !1, setTimeout(() => I.value = !0, 1e3);
65
66
  }, 300));
66
67
  });
67
- return K(() => {
68
- a.value || setTimeout(() => I.value = !0, 1e3);
69
- }), (r, s) => M((n(), f("div", {
70
- class: j(["references-loading", {
71
- "references-loading-hidden-tag": T.value,
72
- "references-loading-top-spacer": S.value.length
68
+ return j(() => {
69
+ s.value || setTimeout(() => I.value = !0, 1e3);
70
+ }), (r, l) => A((a(), m("div", {
71
+ class: F(["references-loading", {
72
+ "references-loading-hidden-tag": _.value,
73
+ "references-loading-top-spacer": y.value.length
73
74
  }])
74
75
  }, [
75
- (n(!0), f(g, null, k(S.value, (e, u) => (n(), f(g, {
76
+ (a(!0), m(h, null, b(y.value, (e, u) => (a(), m(h, {
76
77
  key: e.name + u
77
78
  }, [
78
- e.operations && e.operations.length > 0 ? (n(), m(o(q), {
79
+ e.operations && e.operations.length > 0 ? (a(), f(t(R), {
79
80
  key: 0,
80
81
  spec: r.parsedSpec,
81
82
  tag: e
82
83
  }, {
83
84
  default: p(() => [
84
- (n(!0), f(g, null, k(e.lazyOperations, (t) => (n(), m(o(G), {
85
- key: `${t.httpVerb}-${t.operationId}`,
86
- operation: t,
85
+ (a(!0), m(h, null, b(e.lazyOperations, (o) => (a(), f(t(U), {
86
+ key: `${o.httpVerb}-${o.operationId}`,
87
+ layout: r.layout,
88
+ operation: o,
89
+ requestExamples: t(L),
90
+ requests: t(E),
91
+ securitySchemes: t(V),
87
92
  tag: e
88
- }, null, 8, ["operation", "tag"]))), 128))
93
+ }, null, 8, ["layout", "operation", "requestExamples", "requests", "securitySchemes", "tag"]))), 128))
89
94
  ]),
90
95
  _: 2
91
96
  }, 1032, ["spec", "tag"])) : w("", !0)
92
97
  ], 64))), 128)),
93
- y.value.length ? (n(), m(o(J), { key: 0 }, {
98
+ S.value.length ? (a(), f(t(X), { key: 0 }, {
94
99
  default: p(() => [
95
- (n(!0), f(g, null, k(y.value, (e) => (n(), m(o(Q), {
100
+ (a(!0), m(h, null, b(S.value, (e) => (a(), f(t(Y), {
96
101
  key: e,
97
102
  label: e
98
103
  }, {
99
104
  default: p(() => {
100
105
  var u;
101
106
  return [
102
- (u = o(h)(r.parsedSpec)) != null && u[e] ? (n(), m(o(R), { key: 0 }, {
107
+ (u = t(g)(r.parsedSpec)) != null && u[e] ? (a(), f(t(Z), { key: 0 }, {
103
108
  default: p(() => {
104
- var t;
109
+ var o;
105
110
  return [
106
- _(o(U), { level: 2 }, {
111
+ T(t(ee), { level: 2 }, {
107
112
  default: p(() => [
108
- _(o(X), {
109
- id: o(V)(e)
113
+ T(t(te), {
114
+ id: t(z)(e)
110
115
  }, {
111
116
  default: p(() => {
112
- var d;
117
+ var c;
113
118
  return [
114
- A(F(((d = o(h)(r.parsedSpec)) == null ? void 0 : d[e]).title ?? e), 1)
119
+ H(P(((c = t(g)(r.parsedSpec)) == null ? void 0 : c[e]).title ?? e), 1)
115
120
  ];
116
121
  }),
117
122
  _: 2
@@ -119,10 +124,10 @@ const fe = /* @__PURE__ */ D({
119
124
  ]),
120
125
  _: 2
121
126
  }, 1024),
122
- _(o(Y), {
127
+ T(t(oe), {
123
128
  name: e,
124
129
  noncollapsible: "",
125
- value: (t = o(h)(r.parsedSpec)) == null ? void 0 : t[e]
130
+ value: (o = t(g)(r.parsedSpec)) == null ? void 0 : o[e]
126
131
  }, null, 8, ["name", "value"])
127
132
  ];
128
133
  }),
@@ -136,10 +141,10 @@ const fe = /* @__PURE__ */ D({
136
141
  _: 1
137
142
  })) : w("", !0)
138
143
  ], 2)), [
139
- [H, C.value]
144
+ [G, x.value]
140
145
  ]);
141
146
  }
142
147
  });
143
148
  export {
144
- fe as default
149
+ ye as default
145
150
  };
@@ -1 +1 @@
1
- {"version":3,"file":"TagList.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Tag/TagList.vue"],"names":[],"mappings":"AA2DA,OAAO,KAAK,EAAE,IAAI,EAAE,GAAG,IAAI,OAAO,EAAE,MAAM,sBAAsB,CAAA;AAOhE,KAAK,WAAW,GAAG;IACjB,IAAI,EAAE,OAAO,EAAE,CAAA;IACf,IAAI,EAAE,IAAI,CAAA;IACV,MAAM,CAAC,EAAE,QAAQ,GAAG,SAAS,CAAA;CAC9B,CAAC;;AA6GF,wBAMG"}
1
+ {"version":3,"file":"TagList.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Tag/TagList.vue"],"names":[],"mappings":"AAiEA,OAAO,KAAK,EAAE,IAAI,EAAE,GAAG,IAAI,OAAO,EAAE,MAAM,sBAAsB,CAAA;AAOhE,KAAK,WAAW,GAAG;IACjB,IAAI,EAAE,OAAO,EAAE,CAAA;IACf,IAAI,EAAE,IAAI,CAAA;IACV,MAAM,CAAC,EAAE,QAAQ,GAAG,SAAS,CAAA;CAC9B,CAAC;;AAiHF,wBAMG"}
@@ -1,12 +1,13 @@
1
- import { defineComponent as g, computed as v, openBlock as r, createElementBlock as c, Fragment as m, renderList as d, createBlock as l, unref as e, withCtx as s, resolveDynamicComponent as B, createVNode as p } from "vue";
2
- import { ScalarErrorBoundary as I } from "@scalar/components";
3
- import S from "./TagAccordion.vue.js";
4
- import T from "./Tag.vue.js";
1
+ import { defineComponent as g, computed as v, openBlock as r, createElementBlock as l, Fragment as n, renderList as p, createBlock as i, unref as e, withCtx as a, resolveDynamicComponent as B, createVNode as d } from "vue";
2
+ import { useWorkspace as I } from "@scalar/api-client/store";
3
+ import { ScalarErrorBoundary as T } from "@scalar/components";
4
+ import $ from "./TagAccordion.vue.js";
5
+ import b from "./Tag.vue.js";
5
6
  import f from "../Lazy/Lazy.vue2.js";
6
- import $ from "../../../features/Operation/Operation.vue.js";
7
- import { useSidebar as b } from "../../../hooks/useSidebar.js";
8
- import { useNavState as C } from "../../../hooks/useNavState.js";
9
- const j = /* @__PURE__ */ g({
7
+ import x from "../../../features/Operation/Operation.vue.js";
8
+ import { useSidebar as C } from "../../../hooks/useSidebar.js";
9
+ import { useNavState as N } from "../../../hooks/useNavState.js";
10
+ const J = /* @__PURE__ */ g({
10
11
  __name: "TagList",
11
12
  props: {
12
13
  tags: {},
@@ -14,35 +15,38 @@ const j = /* @__PURE__ */ g({
14
15
  layout: {}
15
16
  },
16
17
  setup(y) {
17
- const n = y, { getOperationId: u, getTagId: a, hash: _ } = C(), { collapsedSidebarItems: L } = b(), h = v(
18
- () => n.layout === "classic" ? S : T
19
- ), k = n.layout !== "classic" && !_.value.startsWith("model");
20
- return (i, E) => (r(!0), c(m, null, d(i.tags, (t) => (r(), l(e(f), {
21
- id: e(a)(t),
22
- key: e(a)(t),
23
- isLazy: e(k) && !e(L)[e(a)(t)]
18
+ const c = y, { getOperationId: m, getTagId: o, hash: _ } = N(), { collapsedSidebarItems: h } = C(), { requests: L, requestExamples: S, securitySchemes: k } = I(), q = v(
19
+ () => c.layout === "classic" ? $ : b
20
+ ), z = c.layout !== "classic" && !_.value.startsWith("model");
21
+ return (u, V) => (r(!0), l(n, null, p(u.tags, (t) => (r(), i(e(f), {
22
+ id: e(o)(t),
23
+ key: e(o)(t),
24
+ isLazy: e(z) && !e(h)[e(o)(t)]
24
25
  }, {
25
- default: s(() => [
26
- (r(), l(B(h.value), {
27
- id: e(a)(t),
28
- spec: i.spec,
26
+ default: a(() => [
27
+ (r(), i(B(q.value), {
28
+ id: e(o)(t),
29
+ spec: u.spec,
29
30
  tag: t
30
31
  }, {
31
- default: s(() => [
32
- (r(!0), c(m, null, d(t.operations, (o, z) => (r(), l(e(f), {
33
- id: e(u)(o, t),
34
- key: `${o.httpVerb}-${o.operationId}`,
35
- isLazy: z > 0
32
+ default: a(() => [
33
+ (r(!0), l(n, null, p(t.operations, (s, E) => (r(), i(e(f), {
34
+ id: e(m)(s, t),
35
+ key: `${s.httpVerb}-${s.operationId}`,
36
+ isLazy: E > 0
36
37
  }, {
37
- default: s(() => [
38
- p(e(I), null, {
39
- default: s(() => [
40
- p(e($), {
41
- id: e(u)(o, t),
42
- layout: i.layout,
43
- operation: o,
38
+ default: a(() => [
39
+ d(e(T), null, {
40
+ default: a(() => [
41
+ d(e(x), {
42
+ id: e(m)(s, t),
43
+ layout: u.layout,
44
+ operation: s,
45
+ requestExamples: e(S),
46
+ requests: e(L),
47
+ securitySchemes: e(k),
44
48
  tag: t
45
- }, null, 8, ["id", "layout", "operation", "tag"])
49
+ }, null, 8, ["id", "layout", "operation", "requestExamples", "requests", "securitySchemes", "tag"])
46
50
  ]),
47
51
  _: 2
48
52
  }, 1024)
@@ -58,5 +62,5 @@ const j = /* @__PURE__ */ g({
58
62
  }
59
63
  });
60
64
  export {
61
- j as default
65
+ J as default
62
66
  };
@@ -2,7 +2,7 @@ import type { Spec, TransformedOperation } from '@scalar/types/legacy';
2
2
  import type { OpenApiDocumentConfiguration } from '../OpenApiDocument/types';
3
3
  type __VLS_Props = {
4
4
  parsedSpec: Spec;
5
- operation?: TransformedOperation;
5
+ operation: TransformedOperation;
6
6
  configuration?: OpenApiDocumentConfiguration;
7
7
  };
8
8
  declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, HTMLDivElement>;
@@ -1 +1 @@
1
- {"version":3,"file":"ExampleRequest.vue.d.ts","sourceRoot":"","sources":["../../../src/embeds/ExampleRequest/ExampleRequest.vue"],"names":[],"mappings":"AAiDA,OAAO,KAAK,EAAE,IAAI,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAA;AAGtE,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,0BAA0B,CAAA;AAI5E,KAAK,WAAW,GAAG;IACjB,UAAU,EAAE,IAAI,CAAA;IAChB,SAAS,CAAC,EAAE,oBAAoB,CAAA;IAChC,aAAa,CAAC,EAAE,4BAA4B,CAAA;CAC7C,CAAC;;AAiGF,wBAOG"}
1
+ {"version":3,"file":"ExampleRequest.vue.d.ts","sourceRoot":"","sources":["../../../src/embeds/ExampleRequest/ExampleRequest.vue"],"names":[],"mappings":"AAiEA,OAAO,KAAK,EAAE,IAAI,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAA;AAGtE,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,0BAA0B,CAAA;AAI5E,KAAK,WAAW,GAAG;IACjB,UAAU,EAAE,IAAI,CAAA;IAChB,SAAS,EAAE,oBAAoB,CAAA;IAC/B,aAAa,CAAC,EAAE,4BAA4B,CAAA;CAC7C,CAAC;;AA4GF,wBAOG"}