@scalar/api-client 2.26.2 → 2.29.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 (164) hide show
  1. package/CHANGELOG.md +218 -0
  2. package/dist/components/Server/ServerSelector.vue.js +6 -6
  3. package/dist/components/ViewLayout/ViewLayoutCollapse.vue.js +6 -6
  4. package/dist/components/ViewLayout/ViewLayoutSection.vue.d.ts.map +1 -1
  5. package/dist/components/ViewLayout/ViewLayoutSection.vue.js +1 -1
  6. package/dist/libs/local-storage.js +3 -3
  7. package/dist/style.css +1 -1
  8. package/dist/v2/blocks/operation-block/helpers/build-request-body.d.ts.map +1 -1
  9. package/dist/v2/blocks/operation-block/helpers/build-request-body.js +29 -25
  10. package/dist/v2/blocks/operation-block/helpers/get-example.d.ts.map +1 -1
  11. package/dist/v2/blocks/operation-block/helpers/get-example.js +15 -15
  12. package/dist/v2/blocks/operation-block/helpers/get-selected-body-content-type.d.ts +10 -0
  13. package/dist/v2/blocks/operation-block/helpers/get-selected-body-content-type.d.ts.map +1 -0
  14. package/dist/v2/blocks/operation-block/helpers/get-selected-body-content-type.js +4 -0
  15. package/dist/v2/blocks/request-block/RequestBlock.vue.js +1 -1
  16. package/dist/v2/blocks/request-block/RequestBlock.vue2.js +26 -26
  17. package/dist/v2/blocks/request-block/components/RequestBody.vue.d.ts.map +1 -1
  18. package/dist/v2/blocks/request-block/components/RequestBody.vue.js +2 -2
  19. package/dist/v2/blocks/request-block/components/RequestBody.vue2.js +88 -103
  20. package/dist/v2/blocks/request-block/components/RequestTable.vue.d.ts +2 -0
  21. package/dist/v2/blocks/request-block/components/RequestTable.vue.d.ts.map +1 -1
  22. package/dist/v2/blocks/request-block/components/RequestTableRow.vue.d.ts +2 -0
  23. package/dist/v2/blocks/request-block/components/RequestTableRow.vue.d.ts.map +1 -1
  24. package/dist/v2/blocks/request-block/helpers/get-default-headers.d.ts +1 -1
  25. package/dist/v2/blocks/request-block/helpers/get-default-headers.d.ts.map +1 -1
  26. package/dist/v2/blocks/request-block/helpers/get-default-headers.js +20 -19
  27. package/dist/v2/blocks/response-block/ResponseBlock.vue.js +1 -1
  28. package/dist/v2/blocks/response-block/ResponseBlock.vue2.js +7 -7
  29. package/dist/v2/blocks/response-block/components/ResponseEmpty.vue.d.ts.map +1 -1
  30. package/dist/v2/blocks/response-block/components/ResponseEmpty.vue.js +1 -1
  31. package/dist/v2/blocks/response-block/components/ResponseEmpty.vue2.js +31 -40
  32. package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.d.ts +2 -0
  33. package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.d.ts.map +1 -1
  34. package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.js +52 -54
  35. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.d.ts +3 -2
  36. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.d.ts.map +1 -1
  37. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.js +106 -86
  38. package/dist/v2/blocks/scalar-auth-selector-block/components/OpenIDConnect.vue.d.ts +21 -0
  39. package/dist/v2/blocks/scalar-auth-selector-block/components/OpenIDConnect.vue.d.ts.map +1 -0
  40. package/dist/v2/blocks/scalar-auth-selector-block/components/OpenIDConnect.vue.js +91 -0
  41. package/dist/v2/blocks/scalar-auth-selector-block/components/OpenIDConnect.vue2.js +4 -0
  42. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.d.ts.map +1 -1
  43. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.js +107 -93
  44. package/dist/v2/blocks/scalar-auth-selector-block/helpers/extract-security-scheme-secrets.d.ts.map +1 -1
  45. package/dist/v2/blocks/scalar-auth-selector-block/helpers/extract-security-scheme-secrets.js +87 -65
  46. package/dist/v2/blocks/scalar-auth-selector-block/helpers/fetch-openid-connect-discovery.d.ts +36 -0
  47. package/dist/v2/blocks/scalar-auth-selector-block/helpers/fetch-openid-connect-discovery.d.ts.map +1 -0
  48. package/dist/v2/blocks/scalar-auth-selector-block/helpers/fetch-openid-connect-discovery.js +35 -0
  49. package/dist/v2/blocks/scalar-auth-selector-block/helpers/merge-security.d.ts +1 -1
  50. package/dist/v2/blocks/scalar-auth-selector-block/helpers/merge-security.d.ts.map +1 -1
  51. package/dist/v2/blocks/scalar-auth-selector-block/helpers/merge-security.js +18 -10
  52. package/dist/v2/blocks/scalar-auth-selector-block/helpers/openid-discovery-to-flows.d.ts +5 -0
  53. package/dist/v2/blocks/scalar-auth-selector-block/helpers/openid-discovery-to-flows.d.ts.map +1 -0
  54. package/dist/v2/blocks/scalar-auth-selector-block/helpers/openid-discovery-to-flows.js +27 -0
  55. package/dist/v2/blocks/scalar-auth-selector-block/helpers/secret-types.d.ts +3 -1
  56. package/dist/v2/blocks/scalar-auth-selector-block/helpers/secret-types.d.ts.map +1 -1
  57. package/dist/v2/blocks/scalar-auth-selector-block/helpers/security-scheme.d.ts +4 -3
  58. package/dist/v2/blocks/scalar-auth-selector-block/helpers/security-scheme.d.ts.map +1 -1
  59. package/dist/v2/blocks/scalar-auth-selector-block/helpers/security-scheme.js +32 -40
  60. package/dist/v2/components/code-input/CodeInput.vue.d.ts.map +1 -1
  61. package/dist/v2/components/code-input/CodeInput.vue.js +2 -2
  62. package/dist/v2/components/layout/CollapsibleSection.vue.js +1 -1
  63. package/dist/v2/components/sidebar/Sidebar.vue.d.ts +2 -0
  64. package/dist/v2/components/sidebar/Sidebar.vue.d.ts.map +1 -1
  65. package/dist/v2/components/sidebar/Sidebar.vue.js +25 -24
  66. package/dist/v2/components/sidebar/SidebarMenu.vue.d.ts +2 -0
  67. package/dist/v2/components/sidebar/SidebarMenu.vue.d.ts.map +1 -1
  68. package/dist/v2/components/sidebar/SidebarMenu.vue.js +30 -30
  69. package/dist/v2/features/app/App.vue.d.ts +5 -0
  70. package/dist/v2/features/app/App.vue.d.ts.map +1 -1
  71. package/dist/v2/features/app/App.vue.js +80 -78
  72. package/dist/v2/features/app/app-events.d.ts +2 -1
  73. package/dist/v2/features/app/app-events.d.ts.map +1 -1
  74. package/dist/v2/features/app/app-events.js +89 -64
  75. package/dist/v2/features/app/app-state.d.ts.map +1 -1
  76. package/dist/v2/features/app/app-state.js +172 -151
  77. package/dist/v2/features/app/components/AppSidebar.vue.d.ts.map +1 -1
  78. package/dist/v2/features/app/components/AppSidebar.vue.js +3 -3
  79. package/dist/v2/features/app/components/AppSidebar.vue2.js +99 -97
  80. package/dist/v2/features/app/components/DesktopTabs.vue.d.ts.map +1 -1
  81. package/dist/v2/features/app/components/DesktopTabs.vue.js +4 -4
  82. package/dist/v2/features/app/components/DownloadAppButton.vue.d.ts.map +1 -1
  83. package/dist/v2/features/app/components/DownloadAppButton.vue.js +1 -1
  84. package/dist/v2/features/app/components/DownloadAppButton.vue2.js +9 -9
  85. package/dist/v2/features/app/components/SidebarItemMenu.vue.d.ts.map +1 -1
  86. package/dist/v2/features/app/components/SidebarItemMenu.vue.js +71 -43
  87. package/dist/v2/features/app/helpers/create-api-client-app.d.ts +11 -1
  88. package/dist/v2/features/app/helpers/create-api-client-app.d.ts.map +1 -1
  89. package/dist/v2/features/app/helpers/create-api-client-app.js +12 -10
  90. package/dist/v2/features/app/helpers/routes.d.ts +2 -0
  91. package/dist/v2/features/app/helpers/routes.d.ts.map +1 -1
  92. package/dist/v2/features/app/helpers/routes.js +11 -11
  93. package/dist/v2/features/app/hooks/use-theme.d.ts +42 -0
  94. package/dist/v2/features/app/hooks/use-theme.d.ts.map +1 -0
  95. package/dist/v2/features/app/hooks/use-theme.js +34 -0
  96. package/dist/v2/features/collection/DocumentCollection.vue.d.ts.map +1 -1
  97. package/dist/v2/features/collection/DocumentCollection.vue.js +27 -26
  98. package/dist/v2/features/collection/WorkspaceCollection.vue.d.ts +1 -6
  99. package/dist/v2/features/collection/WorkspaceCollection.vue.d.ts.map +1 -1
  100. package/dist/v2/features/collection/WorkspaceCollection.vue.js +41 -22
  101. package/dist/v2/features/collection/components/Authentication.vue.d.ts.map +1 -1
  102. package/dist/v2/features/collection/components/Authentication.vue.js +2 -2
  103. package/dist/v2/features/collection/components/Authentication.vue2.js +49 -40
  104. package/dist/v2/features/collection/components/Cookies.vue.d.ts.map +1 -1
  105. package/dist/v2/features/collection/components/Cookies.vue.js +26 -13
  106. package/dist/v2/features/collection/components/Environment.vue.d.ts.map +1 -1
  107. package/dist/v2/features/collection/components/Environment.vue.js +27 -15
  108. package/dist/v2/features/collection/components/LabelInput.vue.d.ts +3 -0
  109. package/dist/v2/features/collection/components/LabelInput.vue.d.ts.map +1 -1
  110. package/dist/v2/features/collection/components/LabelInput.vue.js +2 -2
  111. package/dist/v2/features/collection/components/LabelInput.vue2.js +20 -16
  112. package/dist/v2/features/collection/components/Overview.vue.d.ts.map +1 -1
  113. package/dist/v2/features/collection/components/Overview.vue.js +2 -2
  114. package/dist/v2/features/collection/components/Overview.vue2.js +68 -61
  115. package/dist/v2/features/collection/components/Servers.vue.d.ts.map +1 -1
  116. package/dist/v2/features/collection/components/Servers.vue.js +93 -88
  117. package/dist/v2/features/collection/components/Settings.vue.d.ts.map +1 -1
  118. package/dist/v2/features/collection/components/Settings.vue.js +19 -17
  119. package/dist/v2/features/command-palette/components/CommandPaletteExample.vue.d.ts +7 -2
  120. package/dist/v2/features/command-palette/components/CommandPaletteExample.vue.d.ts.map +1 -1
  121. package/dist/v2/features/command-palette/components/CommandPaletteExample.vue.js +70 -71
  122. package/dist/v2/features/command-palette/components/{CommandPaletteDocument.vue.d.ts → CommandPaletteOpenApiDocument.vue.d.ts} +3 -3
  123. package/dist/v2/features/command-palette/components/CommandPaletteOpenApiDocument.vue.d.ts.map +1 -0
  124. package/dist/v2/features/command-palette/components/{CommandPaletteDocument.vue.js → CommandPaletteOpenApiDocument.vue.js} +15 -15
  125. package/dist/v2/features/command-palette/components/CommandPaletteOpenApiDocument.vue2.js +4 -0
  126. package/dist/v2/features/command-palette/components/CommandPaletteRequest.vue.d.ts +2 -2
  127. package/dist/v2/features/command-palette/components/CommandPaletteRequest.vue.d.ts.map +1 -1
  128. package/dist/v2/features/command-palette/components/CommandPaletteRequest.vue.js +10 -10
  129. package/dist/v2/features/command-palette/components/CommandPaletteTag.vue.d.ts +27 -5
  130. package/dist/v2/features/command-palette/components/CommandPaletteTag.vue.d.ts.map +1 -1
  131. package/dist/v2/features/command-palette/components/CommandPaletteTag.vue.js +80 -53
  132. package/dist/v2/features/command-palette/hooks/use-command-palette-state.d.ts +34 -9
  133. package/dist/v2/features/command-palette/hooks/use-command-palette-state.d.ts.map +1 -1
  134. package/dist/v2/features/command-palette/hooks/use-command-palette-state.js +50 -44
  135. package/dist/v2/features/environments/EnvironmentsList.vue.js +1 -1
  136. package/dist/v2/features/global-cookies/components/CookiesTable.vue.d.ts.map +1 -1
  137. package/dist/v2/features/global-cookies/components/CookiesTable.vue.js +2 -2
  138. package/dist/v2/features/global-cookies/components/CookiesTable.vue2.js +8 -8
  139. package/dist/v2/features/modal/Modal.vue.d.ts.map +1 -1
  140. package/dist/v2/features/modal/Modal.vue.js +15 -15
  141. package/dist/v2/features/operation/Operation.vue.d.ts.map +1 -1
  142. package/dist/v2/features/operation/Operation.vue.js +30 -33
  143. package/dist/v2/features/settings/CollectionSettings.vue.d.ts +10 -7
  144. package/dist/v2/features/settings/CollectionSettings.vue.d.ts.map +1 -1
  145. package/dist/v2/features/settings/CollectionSettings.vue.js +183 -149
  146. package/dist/v2/features/settings/DocumentSettings.vue.d.ts.map +1 -1
  147. package/dist/v2/features/settings/DocumentSettings.vue.js +88 -79
  148. package/dist/v2/features/settings/components/Section.vue.d.ts +2 -1
  149. package/dist/v2/features/settings/components/Section.vue.d.ts.map +1 -1
  150. package/dist/v2/features/settings/components/Section.vue.js +26 -15
  151. package/dist/v2/features/settings/helpers/get-theme-colors.d.ts +4 -3
  152. package/dist/v2/features/settings/helpers/get-theme-colors.d.ts.map +1 -1
  153. package/dist/v2/features/settings/helpers/get-theme-colors.js +6 -7
  154. package/dist/v2/helpers/handle-hotkeys.d.ts.map +1 -1
  155. package/dist/v2/helpers/handle-hotkeys.js +2 -2
  156. package/dist/v2/hooks/use-global-hot-keys.d.ts +3 -1
  157. package/dist/v2/hooks/use-global-hot-keys.d.ts.map +1 -1
  158. package/dist/v2/hooks/use-global-hot-keys.js +8 -6
  159. package/dist/v2/workspace-events.d.ts.map +1 -1
  160. package/dist/v2/workspace-events.js +132 -115
  161. package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +1 -1
  162. package/package.json +17 -16
  163. package/dist/v2/features/command-palette/components/CommandPaletteDocument.vue.d.ts.map +0 -1
  164. package/dist/v2/features/command-palette/components/CommandPaletteDocument.vue2.js +0 -4
@@ -1 +1 @@
1
- {"version":3,"file":"build-request-body.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/operation-block/helpers/build-request-body.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,0DAA0D,CAAA;AAIjG;;GAEG;AACH,eAAO,MAAM,gBAAgB,GAC3B,aAAa,iBAAiB,GAAG,SAAS;AAC1C,8DAA8D;AAC9D,MAAK,MAAM,CAAC,MAAM,EAAE,MAAM,CAAM;AAChC,qCAAqC;AACrC,mBAAsB,KACrB,QAAQ,GAAG,IAgFb,CAAA"}
1
+ {"version":3,"file":"build-request-body.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/operation-block/helpers/build-request-body.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,0DAA0D,CAAA;AAKjG;;GAEG;AACH,eAAO,MAAM,gBAAgB,GAC3B,aAAa,iBAAiB,GAAG,SAAS;AAC1C,8DAA8D;AAC9D,MAAK,MAAM,CAAC,MAAM,EAAE,MAAM,CAAM;AAChC,qCAAqC;AACrC,mBAAsB,KACrB,QAAQ,GAAG,IAgFb,CAAA"}
@@ -1,35 +1,39 @@
1
- import { replaceEnvVariables as n } from "@scalar/helpers/regex/replace-variables";
2
- import { unpackProxyObject as u } from "@scalar/workspace-store/helpers/unpack-proxy";
3
- import { getExampleFromBody as m } from "../../request-block/helpers/get-request-body-example.js";
4
- const b = (i, a = {}, f = "default") => {
5
- if (!i)
1
+ import { replaceEnvVariables as l } from "@scalar/helpers/regex/replace-variables";
2
+ import { unpackProxyObject as s } from "@scalar/workspace-store/helpers/unpack-proxy";
3
+ import { getSelectedBodyContentType as m } from "./get-selected-body-content-type.js";
4
+ import { getExampleFromBody as d } from "../../request-block/helpers/get-request-body-example.js";
5
+ const v = (p, a = {}, u = "default") => {
6
+ if (!p)
6
7
  return null;
7
- const l = i?.["x-scalar-selected-content-type"]?.[f] ?? Object.keys(i?.content ?? {})[0] ?? "application/json", e = m(i, l, f);
8
+ const o = m(p, u);
9
+ if (!o)
10
+ return null;
11
+ const e = d(p, o, u);
8
12
  if (!e)
9
13
  return null;
10
- if ((l === "multipart/form-data" || l === "application/x-www-form-urlencoded") && Array.isArray(e.value)) {
11
- const c = e.value.filter((t) => !t.isDisabled), r = l === "multipart/form-data" ? new FormData() : new URLSearchParams();
12
- return c.forEach(({ name: t, value: o }) => {
13
- if (!t)
14
+ if ((o === "multipart/form-data" || o === "application/x-www-form-urlencoded") && Array.isArray(e.value)) {
15
+ const i = e.value.filter((r) => !r.isDisabled), t = o === "multipart/form-data" ? new FormData() : new URLSearchParams();
16
+ return i.forEach(({ name: r, value: n }) => {
17
+ if (!r)
14
18
  return;
15
- const p = n(t, a);
16
- if (o instanceof File && r instanceof FormData) {
17
- const s = u(o);
18
- r.append(p, s, s.name);
19
- } else typeof o == "string" && r.append(p, n(o, a));
20
- }), r;
19
+ const f = l(r, a);
20
+ if (n instanceof File && t instanceof FormData) {
21
+ const c = s(n);
22
+ t.append(f, c, c.name);
23
+ } else typeof n == "string" && t.append(f, l(n, a));
24
+ }), t;
21
25
  }
22
- if (l === "application/x-www-form-urlencoded" && e.value !== null && typeof e.value == "object" && !Array.isArray(e.value)) {
23
- const c = new URLSearchParams();
24
- for (const [r, t] of Object.entries(e.value))
25
- if (r && t !== void 0 && t !== null) {
26
- const o = n(r, a), p = typeof t == "string" ? t : String(t);
27
- c.append(o, n(p, a));
26
+ if (o === "application/x-www-form-urlencoded" && e.value !== null && typeof e.value == "object" && !Array.isArray(e.value)) {
27
+ const i = new URLSearchParams();
28
+ for (const [t, r] of Object.entries(e.value))
29
+ if (t && r !== void 0 && r !== null) {
30
+ const n = l(t, a), f = typeof r == "string" ? r : String(r);
31
+ i.append(n, l(f, a));
28
32
  }
29
- return c;
33
+ return i;
30
34
  }
31
- return typeof e.value == "object" ? n(JSON.stringify(e.value), a) : typeof e.value == "string" ? n(e.value, a) : e.value;
35
+ return typeof e.value == "object" ? l(JSON.stringify(e.value), a) : typeof e.value == "string" ? l(e.value, a) : e.value;
32
36
  };
33
37
  export {
34
- b as buildRequestBody
38
+ v as buildRequestBody
35
39
  };
@@ -1 +1 @@
1
- {"version":3,"file":"get-example.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/operation-block/helpers/get-example.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,aAAa,EACb,eAAe,EACf,eAAe,EACf,iBAAiB,EAClB,MAAM,8DAA8D,CAAA;AA6BrE;;;;;;GAMG;AACH,eAAO,MAAM,UAAU,GACrB,OAAO,eAAe,GAAG,iBAAiB,GAAG,eAAe,EAC5D,YAAY,MAAM,GAAG,SAAS,EAC9B,aAAa,MAAM,GAAG,SAAS,KAC9B,aAAa,GAAG,SA6ClB,CAAA"}
1
+ {"version":3,"file":"get-example.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/operation-block/helpers/get-example.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,aAAa,EACb,eAAe,EACf,eAAe,EACf,iBAAiB,EAClB,MAAM,8DAA8D,CAAA;AAgCrE;;;;;;GAMG;AACH,eAAO,MAAM,UAAU,GACrB,OAAO,eAAe,GAAG,iBAAiB,GAAG,eAAe,EAC5D,YAAY,MAAM,GAAG,SAAS,EAC9B,aAAa,MAAM,GAAG,SAAS,KAC9B,aAAa,GAAG,SA6ClB,CAAA"}
@@ -1,26 +1,26 @@
1
- import { getResolvedRefDeep as s } from "../../operation-code-sample/helpers/get-resolved-ref-deep.js";
2
- const r = (t, n, o) => {
1
+ import { getResolvedRefDeep as u } from "../../operation-code-sample/helpers/get-resolved-ref-deep.js";
2
+ const r = (t, n, s) => {
3
3
  if (!t && !n)
4
4
  return;
5
- const i = o || Object.keys(t ?? {})[0] || "", e = s(t?.[i]);
6
- if (e !== void 0)
7
- return e;
8
- if (!o && n !== void 0)
9
- return { value: s(n) };
10
- }, c = (t, n, o) => {
5
+ const o = !!t && Object.keys(t).length > 0, e = s || Object.keys(t ?? {})[0] || "", i = u(t?.[e]);
6
+ if (i !== void 0)
7
+ return i;
8
+ if ((!o || !s) && n !== void 0)
9
+ return { value: u(n) };
10
+ }, l = (t, n, s) => {
11
11
  if ("content" in t) {
12
- const e = t.content?.[o ?? Object.keys(t.content)[0] ?? ""], u = r(e?.examples, e?.example, n);
13
- if (u !== void 0)
14
- return u;
12
+ const e = t.content?.[s ?? Object.keys(t.content)[0] ?? ""], i = r(e?.examples, e?.example, n);
13
+ if (i !== void 0)
14
+ return i;
15
15
  }
16
16
  if ("examples" in t || "example" in t) {
17
17
  const e = r(t.examples, t.example, n);
18
18
  if (e !== void 0)
19
19
  return e;
20
20
  }
21
- const i = s(t);
22
- if ("schema" in i && i.schema) {
23
- const e = i.schema;
21
+ const o = u(t);
22
+ if ("schema" in o && o.schema) {
23
+ const e = o.schema;
24
24
  if ("default" in e && e.default !== void 0)
25
25
  return { value: e.default };
26
26
  if ("enum" in e && e.enum?.[0] !== void 0)
@@ -32,5 +32,5 @@ const r = (t, n, o) => {
32
32
  }
33
33
  };
34
34
  export {
35
- c as getExample
35
+ l as getExample
36
36
  };
@@ -0,0 +1,10 @@
1
+ import type { RequestBodyObject } from '@scalar/workspace-store/schemas/v3.1/strict/request-body';
2
+ /**
3
+ * Returns the selected body content type for the given request body and exampleKey.
4
+ * Priority:
5
+ * 1. requestBody?.['x-scalar-selected-content-type']?.[exampleKey] (if set)
6
+ * 2. First key in requestBody?.content (if available)
7
+ * 3. null (if none available)
8
+ */
9
+ export declare const getSelectedBodyContentType: (requestBody: RequestBodyObject | undefined, exampleKey?: string) => string | null;
10
+ //# sourceMappingURL=get-selected-body-content-type.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-selected-body-content-type.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/operation-block/helpers/get-selected-body-content-type.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,0DAA0D,CAAA;AAEjG;;;;;;GAMG;AACH,eAAO,MAAM,0BAA0B,GACrC,aAAa,iBAAiB,GAAG,SAAS,EAC1C,aAAY,MAAkB,KAC7B,MAAM,GAAG,IAIX,CAAA"}
@@ -0,0 +1,4 @@
1
+ const n = (e, t = "default") => e?.["x-scalar-selected-content-type"]?.[t] ?? Object.keys(e?.content ?? {})[0] ?? null;
2
+ export {
3
+ n as getSelectedBodyContentType
4
+ };
@@ -1,7 +1,7 @@
1
1
  import o from "./RequestBlock.vue2.js";
2
2
  /* empty css */
3
3
  import t from "../../../_virtual/_plugin-vue_export-helper.js";
4
- const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-422a27d2"]]);
4
+ const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-2076f815"]]);
5
5
  export {
6
6
  m as default
7
7
  };
@@ -1,8 +1,8 @@
1
- import { defineComponent as z, computed as n, ref as X, useId as s, watch as J, createBlock as q, openBlock as v, withCtx as C, createElementVNode as K, withDirectives as m, createElementBlock as B, createVNode as d, unref as y, vShow as c, mergeProps as f, toHandlers as b, Fragment as W, renderList as Y, createCommentVNode as E, resolveDynamicComponent as Z, toDisplayString as _ } from "vue";
1
+ import { defineComponent as z, computed as n, ref as X, useId as s, watch as J, createBlock as q, openBlock as v, withCtx as C, createElementVNode as K, withDirectives as m, createElementBlock as x, createVNode as d, unref as y, vShow as c, mergeProps as f, toHandlers as b, Fragment as W, renderList as Y, createCommentVNode as E, resolveDynamicComponent as Z, toDisplayString as _ } from "vue";
2
2
  import { ScalarErrorBoundary as ee } from "@scalar/components";
3
3
  import { canMethodHaveBody as w } from "@scalar/helpers/http/can-method-have-body";
4
4
  import { REGEX as te } from "@scalar/helpers/regex/regex-helpers";
5
- import { getResolvedRef as p } from "@scalar/workspace-store/helpers/get-resolved-ref";
5
+ import { getResolvedRef as R } from "@scalar/workspace-store/helpers/get-resolved-ref";
6
6
  import { unpackProxyObject as ae } from "@scalar/workspace-store/helpers/unpack-proxy";
7
7
  import le from "../../../components/SectionFilter.vue.js";
8
8
  import ne from "../../../components/ViewLayout/ViewLayoutSection.vue.js";
@@ -18,10 +18,10 @@ import { getParameterSchema as de } from "./helpers/get-parameter-schema.js";
18
18
  import { groupBy as D } from "./helpers/group-by.js";
19
19
  import { isParamDisabled as ce } from "./helpers/is-param-disabled.js";
20
20
  import ve from "../scalar-auth-selector-block/components/AuthSelector.vue.js";
21
- const ye = { class: "group pointer-events-none flex flex-1 items-center gap-1 lg:pr-24" }, he = ["for"], fe = ["id", "placeholder", "value"], xe = {
21
+ const ye = { class: "group pointer-events-none flex flex-1 items-center gap-1 lg:pr-24" }, he = ["for"], fe = ["id", "placeholder", "value"], Be = {
22
22
  key: 2,
23
23
  class: "text-c-1 flex h-8 items-center"
24
- }, Be = ["id", "role"], Te = /* @__PURE__ */ z({
24
+ }, xe = ["id", "role"], Te = /* @__PURE__ */ z({
25
25
  __name: "RequestBlock",
26
26
  props: {
27
27
  authMeta: { default: () => ({ type: "document" }) },
@@ -50,7 +50,7 @@ const ye = { class: "group pointer-events-none flex flex-1 items-center gap-1 lg
50
50
  exampleKey: e.exampleKey
51
51
  })), r = n(
52
52
  () => D(
53
- e.operation.parameters?.map((t) => p(t)) ?? [],
53
+ e.operation.parameters?.map((t) => R(t)) ?? [],
54
54
  "in",
55
55
  (t) => {
56
56
  const a = re(t, e.exampleKey, void 0);
@@ -75,7 +75,7 @@ const ye = { class: "group pointer-events-none flex flex-1 items-center gap-1 lg
75
75
  )
76
76
  ), N = n(
77
77
  () => me({ method: e.method, operation: e.operation, exampleKey: e.exampleKey })
78
- ), R = n(() => {
78
+ ), p = n(() => {
79
79
  const t = e.operation["x-scalar-disable-parameters"]?.["default-headers"]?.[e.exampleKey] ?? {};
80
80
  return N.value.map((a) => {
81
81
  const l = I.value[a.name.toLowerCase()]?.[0];
@@ -89,7 +89,7 @@ const ye = { class: "group pointer-events-none flex flex-1 items-center gap-1 lg
89
89
  };
90
90
  });
91
91
  }), A = n(() => [
92
- ...R.value,
92
+ ...p.value,
93
93
  ...r.value.header ?? []
94
94
  ]), V = n(() => {
95
95
  const t = ie({
@@ -153,7 +153,7 @@ const ye = { class: "group pointer-events-none flex flex-1 items-center gap-1 lg
153
153
  meta: o.value,
154
154
  payload: { summary: a }
155
155
  });
156
- }, x = n(() => ({
156
+ }, B = n(() => ({
157
157
  path: g("path", e.eventBus, o.value, {
158
158
  context: r.value.path ?? []
159
159
  }),
@@ -163,7 +163,7 @@ const ye = { class: "group pointer-events-none flex flex-1 items-center gap-1 lg
163
163
  }),
164
164
  header: g("header", e.eventBus, o.value, {
165
165
  context: A.value,
166
- defaultParameters: R.value.length
166
+ defaultParameters: p.value.length
167
167
  }),
168
168
  query: g("query", e.eventBus, o.value, {
169
169
  context: r.value.query ?? []
@@ -209,19 +209,19 @@ const ye = { class: "group pointer-events-none flex flex-1 items-center gap-1 lg
209
209
  }, {
210
210
  title: C(() => [
211
211
  K("div", ye, [
212
- e.layout !== "modal" ? (v(), B("label", {
212
+ e.layout !== "modal" ? (v(), x("label", {
213
213
  key: 0,
214
214
  class: "pointer-events-auto absolute top-0 left-0 h-full w-full cursor-text opacity-0",
215
215
  for: y(U)
216
216
  }, null, 8, he)) : E("", !0),
217
- e.layout !== "modal" ? (v(), B("input", {
217
+ e.layout !== "modal" ? (v(), x("input", {
218
218
  key: 1,
219
219
  id: y(U),
220
220
  class: "text-c-1 group-hover-input pointer-events-auto relative z-10 -ml-0.5 h-8 w-full rounded pl-1.25 has-[:focus-visible]:outline md:-ml-1.25",
221
221
  placeholder: L.value,
222
222
  value: e.operation.summary,
223
- onInput: F
224
- }, null, 40, fe)) : (v(), B("span", xe, _(e.operation.summary), 1))
223
+ onBlur: F
224
+ }, null, 40, fe)) : (v(), x("span", Be, _(e.operation.summary), 1))
225
225
  ]),
226
226
  d(le, {
227
227
  modelValue: i.value,
@@ -259,7 +259,7 @@ const ye = { class: "group pointer-events-none flex flex-1 items-center gap-1 lg
259
259
  rows: r.value.path ?? [],
260
260
  showAddRowPlaceholder: !1,
261
261
  title: "Variables"
262
- }, b(x.value.path)), null, 16, ["id", "environment", "eventBus", "exampleKey", "rows"]), [
262
+ }, b(B.value.path)), null, 16, ["id", "environment", "eventBus", "exampleKey", "rows"]), [
263
263
  [c, h("Variables") && r.value.path?.length]
264
264
  ]),
265
265
  m(d(k, f({
@@ -270,7 +270,7 @@ const ye = { class: "group pointer-events-none flex flex-1 items-center gap-1 lg
270
270
  rows: P.value ?? [],
271
271
  showAddRowPlaceholder: !0,
272
272
  title: "Cookies"
273
- }, b(x.value.cookie)), null, 16, ["id", "environment", "eventBus", "exampleKey", "rows"]), [
273
+ }, b(B.value.cookie)), null, 16, ["id", "environment", "eventBus", "exampleKey", "rows"]), [
274
274
  [c, h("Cookies")]
275
275
  ]),
276
276
  m(d(k, f({
@@ -280,7 +280,7 @@ const ye = { class: "group pointer-events-none flex flex-1 items-center gap-1 lg
280
280
  exampleKey: e.exampleKey,
281
281
  rows: A.value ?? [],
282
282
  title: "Headers"
283
- }, b(x.value.header)), null, 16, ["id", "environment", "eventBus", "exampleKey", "rows"]), [
283
+ }, b(B.value.header)), null, 16, ["id", "environment", "eventBus", "exampleKey", "rows"]), [
284
284
  [c, h("Headers")]
285
285
  ]),
286
286
  m(d(k, f({
@@ -290,14 +290,14 @@ const ye = { class: "group pointer-events-none flex flex-1 items-center gap-1 lg
290
290
  exampleKey: e.exampleKey,
291
291
  rows: r.value.query ?? [],
292
292
  title: "Query Parameters"
293
- }, b(x.value.query)), null, 16, ["id", "environment", "eventBus", "exampleKey", "rows"]), [
293
+ }, b(B.value.query)), null, 16, ["id", "environment", "eventBus", "exampleKey", "rows"]), [
294
294
  [c, h("Query")]
295
295
  ]),
296
296
  m(d(ue, {
297
297
  id: u.value.Body,
298
298
  environment: e.environment,
299
299
  exampleKey: e.exampleKey,
300
- requestBody: y(p)(e.operation.requestBody),
300
+ requestBody: y(R)(e.operation.requestBody),
301
301
  title: "Request Body",
302
302
  "onUpdate:contentType": G,
303
303
  "onUpdate:formValue": M,
@@ -305,17 +305,17 @@ const ye = { class: "group pointer-events-none flex flex-1 items-center gap-1 lg
305
305
  }, null, 8, ["id", "environment", "exampleKey", "requestBody"]), [
306
306
  [c, h("Body") && y(w)(e.method)]
307
307
  ]),
308
- (v(!0), B(W, null, Y(e.plugins, (l, S) => m((v(), q(y(ee), { key: S }, {
308
+ (v(!0), x(W, null, Y(e.plugins, (l, S) => (v(), q(y(ee), { key: S }, {
309
309
  default: C(() => [
310
- l?.components?.request ? (v(), q(Z(l.components.request.component), f({
310
+ l?.components?.request ? m((v(), q(Z(l.components.request.component), f({
311
311
  key: 0,
312
312
  operation: e.operation
313
- }, { ref_for: !0 }, l.components.request.additionalProps, { "onOperation:update:extension": j }), null, 16, ["operation"])) : E("", !0)
313
+ }, { ref_for: !0 }, l.components.request.additionalProps, { "onOperation:update:extension": j }), null, 16, ["operation"])), [
314
+ [c, i.value === "All"]
315
+ ]) : E("", !0)
314
316
  ]),
315
317
  _: 2
316
- }, 1024)), [
317
- [c, i.value === "All"]
318
- ])), 128)),
318
+ }, 1024))), 128)),
319
319
  a[1] || (a[1] = K("div", { class: "flex grow" }, null, -1)),
320
320
  m(d(se, {
321
321
  clientOptions: e.clientOptions,
@@ -327,12 +327,12 @@ const ye = { class: "group pointer-events-none flex flex-1 items-center gap-1 lg
327
327
  path: e.path,
328
328
  securitySchemes: e.selectedSecuritySchemes,
329
329
  selectedClient: e.selectedClient,
330
- selectedContentType: y(p)(e.operation.requestBody)?.["x-scalar-selected-content-type"]?.[e.exampleKey],
330
+ selectedContentType: y(R)(e.operation.requestBody)?.["x-scalar-selected-content-type"]?.[e.exampleKey],
331
331
  selectedServer: e.server ?? void 0
332
332
  }, null, 8, ["clientOptions", "eventBus", "globalCookies", "method", "operation", "path", "securitySchemes", "selectedClient", "selectedContentType", "selectedServer"]), [
333
333
  [c, i.value === "All"]
334
334
  ])
335
- ], 8, Be)
335
+ ], 8, xe)
336
336
  ]),
337
337
  _: 1
338
338
  }, 8, ["aria-label"]));
@@ -1 +1 @@
1
- {"version":3,"file":"RequestBody.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/request-block/components/RequestBody.vue"],"names":[],"mappings":"AA+RA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2EAA2E,CAAA;AACnH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,8DAA8D,CAAA;AAgBrG,KAAK,WAAW,GAAG;IACjB,mBAAmB;IACnB,WAAW,CAAC,EAAE,iBAAiB,CAAA;IAC/B,+DAA+D;IAC/D,UAAU,EAAE,MAAM,CAAA;IAClB,oBAAoB;IACpB,KAAK,EAAE,MAAM,CAAA;IACb,2BAA2B;IAC3B,WAAW,EAAE,kBAAkB,CAAA;CAChC,CAAC;AAugBF,QAAA,MAAM,YAAY;;;;;;;;;;;eAlgB4B,MAAM;;;;;;;;;;;;;;;;;;eAAN,MAAM;;;;;;;kFAqgBlD,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
1
+ {"version":3,"file":"RequestBody.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/request-block/components/RequestBody.vue"],"names":[],"mappings":"AAwQA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2EAA2E,CAAA;AACnH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,8DAA8D,CAAA;AAgBrG,KAAK,WAAW,GAAG;IACjB,mBAAmB;IACnB,WAAW,CAAC,EAAE,iBAAiB,CAAA;IAC/B,+DAA+D;IAC/D,UAAU,EAAE,MAAM,CAAA;IAClB,oBAAoB;IACpB,KAAK,EAAE,MAAM,CAAA;IACb,2BAA2B;IAC3B,WAAW,EAAE,kBAAkB,CAAA;CAChC,CAAC;AA4eF,QAAA,MAAM,YAAY;;;;;;;;;;;eAve4B,MAAM;;;;;;;;;;;;;;;;;;eAAN,MAAM;;;;;;;kFA0elD,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
@@ -1,7 +1,7 @@
1
1
  import o from "./RequestBody.vue2.js";
2
2
  /* empty css */
3
3
  import t from "../../../../_virtual/_plugin-vue_export-helper.js";
4
- const f = /* @__PURE__ */ t(o, [["__scopeId", "data-v-0a6f7696"]]);
4
+ const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-fd127758"]]);
5
5
  export {
6
- f as default
6
+ m as default
7
7
  };
@@ -1,22 +1,25 @@
1
- import { defineComponent as F, computed as d, watch as q, createBlock as p, openBlock as u, unref as t, withCtx as i, createVNode as r, createElementVNode as c, toDisplayString as v, createElementBlock as y, Fragment as O, createTextVNode as T } from "vue";
2
- import { ScalarListbox as S, ScalarButton as x, ScalarIcon as k } from "@scalar/components";
3
- import { unpackProxyObject as B } from "@scalar/workspace-store/helpers/unpack-proxy";
4
- import D from "./RequestBodyForm.vue.js";
1
+ import { defineComponent as h, computed as d, createBlock as p, openBlock as u, unref as t, withCtx as a, createVNode as i, createElementVNode as f, toDisplayString as v, createElementBlock as y, Fragment as E, createTextVNode as T } from "vue";
2
+ import { ScalarListbox as F, ScalarButton as x, ScalarIcon as w } from "@scalar/components";
3
+ import { CONTENT_TYPES as k } from "@scalar/helpers/consts/content-types";
4
+ import { objectEntries as q } from "@scalar/helpers/object/object-entries";
5
+ import { unpackProxyObject as C } from "@scalar/workspace-store/helpers/unpack-proxy";
6
+ import { getSelectedBodyContentType as D } from "../../operation-block/helpers/get-selected-body-content-type.js";
7
+ import U from "./RequestBodyForm.vue.js";
5
8
  import { getFileName as V } from "../helpers/files.js";
6
- import { getExampleFromBody as U } from "../helpers/get-request-body-example.js";
7
- import E from "../../../components/layout/CollapsibleSection.vue.js";
8
- import L from "../../../components/data-table/DataTable.vue.js";
9
- import M from "../../../components/data-table/DataTableHeader.vue.js";
10
- import $ from "../../../components/data-table/DataTableRow.vue.js";
11
- import z from "../../../components/code-input/CodeInput.vue.js";
12
- import { useFileDialog as K } from "../../../../hooks/useFileDialog.js";
13
- const R = {
9
+ import { getExampleFromBody as $ } from "../helpers/get-request-body-example.js";
10
+ import z from "../../../components/layout/CollapsibleSection.vue.js";
11
+ import O from "../../../components/data-table/DataTable.vue.js";
12
+ import K from "../../../components/data-table/DataTableHeader.vue.js";
13
+ import I from "../../../components/data-table/DataTableRow.vue.js";
14
+ import L from "../../../components/code-input/CodeInput.vue.js";
15
+ import { useFileDialog as M } from "../../../../hooks/useFileDialog.js";
16
+ const P = {
14
17
  key: 0,
15
18
  class: "text-c-3 flex min-h-10 w-full items-center justify-center border-t p-2 text-sm"
16
- }, I = {
19
+ }, R = {
17
20
  key: 1,
18
21
  class: "flex items-center justify-center overflow-hidden border-t p-1.5"
19
- }, J = { class: "text-c-2 w-full max-w-full overflow-hidden rounded border px-1.5 py-1 text-xs whitespace-nowrap" }, ne = /* @__PURE__ */ F({
22
+ }, J = { class: "text-c-2 w-full max-w-full overflow-hidden rounded border px-1.5 py-1 text-xs whitespace-nowrap" }, re = /* @__PURE__ */ h({
20
23
  __name: "RequestBody",
21
24
  props: {
22
25
  requestBody: {},
@@ -25,88 +28,70 @@ const R = {
25
28
  environment: {}
26
29
  },
27
30
  emits: ["update:contentType", "update:value", "update:formValue"],
28
- setup(l, { emit: C }) {
29
- const s = C, N = {
31
+ setup(r, { emit: B }) {
32
+ const m = B, N = {
30
33
  "application/json": "json",
31
34
  "application/xml": "xml",
32
35
  "application/yaml": "yaml"
33
- }, b = {
34
- "multipart/form-data": "Multipart Form",
35
- "application/x-www-form-urlencoded": "Form URL Encoded",
36
- "application/octet-stream": "Binary File",
37
- "application/json": "JSON",
38
- "application/xml": "XML",
39
- "application/yaml": "YAML",
40
- "application/edn": "EDN",
41
- other: "Other",
42
- none: "None"
43
- }, n = d(
44
- () => l.requestBody?.["x-scalar-selected-content-type"]?.[l.exampleKey] ?? Object.keys(l.requestBody?.content ?? {})[0] ?? "none"
45
- );
46
- q(
47
- () => l.requestBody?.["x-scalar-selected-content-type"]?.[l.exampleKey],
48
- (o) => {
49
- o || s("update:contentType", { value: n.value });
50
- },
51
- { immediate: !0 }
52
- );
53
- const f = Object.entries(b).map(([o, e]) => ({
54
- id: o,
36
+ }, o = d(
37
+ () => D(r.requestBody, r.exampleKey) ?? "none"
38
+ ), c = q(k).map(([n, e]) => ({
39
+ id: n,
55
40
  label: e
56
- })), g = d({
57
- get: () => f.find(
58
- (e) => e.id === n.value
59
- ) ?? f.at(-1),
60
- set: (o) => {
61
- s("update:contentType", { value: o.id });
41
+ })), b = d({
42
+ get: () => c.find(
43
+ (e) => e.id === o.value
44
+ ) ?? c.at(-1),
45
+ set: (n) => {
46
+ m("update:contentType", { value: n.id });
62
47
  }
63
48
  });
64
- function h(o) {
65
- const { open: e } = K({
66
- onChange: (a) => {
67
- const w = a?.[0];
68
- w && o(w);
49
+ function S(n) {
50
+ const { open: e } = M({
51
+ onChange: (l) => {
52
+ const g = l?.[0];
53
+ g && n(g);
69
54
  },
70
55
  multiple: !1,
71
56
  accept: "*/*"
72
57
  });
73
58
  e();
74
59
  }
75
- const m = d(
76
- () => l.requestBody && U(l.requestBody, n.value, l.exampleKey)
60
+ const s = d(
61
+ () => r.requestBody && $(r.requestBody, o.value, r.exampleKey)
77
62
  ), j = d(() => {
78
- if (!m.value)
63
+ if (!s.value)
79
64
  return "";
80
- const o = m.value.value;
81
- return typeof o == "string" ? o : JSON.stringify(o, null, 2);
65
+ const n = s.value.value;
66
+ return typeof n == "string" ? n : JSON.stringify(n, null, 2);
82
67
  });
83
- return (o, e) => (u(), p(t(E), null, {
84
- title: i(() => [
85
- T(v(l.title), 1)
68
+ return (n, e) => (u(), p(t(z), null, {
69
+ title: a(() => [
70
+ T(v(r.title), 1)
86
71
  ]),
87
- default: i(() => [
88
- r(t(L), {
72
+ default: a(() => [
73
+ i(t(O), {
89
74
  columns: [""],
90
75
  presentational: ""
91
76
  }, {
92
- default: i(() => [
93
- r(t(M), { class: "relative col-span-full flex h-8 cursor-pointer items-center justify-between border-r-0 !p-0" }, {
94
- default: i(() => [
95
- r(t(S), {
96
- modelValue: g.value,
97
- "onUpdate:modelValue": e[0] || (e[0] = (a) => g.value = a),
98
- options: t(f),
77
+ default: a(() => [
78
+ i(t(K), { class: "relative col-span-full flex h-8 cursor-pointer items-center justify-between border-r-0 !p-0" }, {
79
+ default: a(() => [
80
+ i(t(F), {
81
+ modelValue: b.value,
82
+ "onUpdate:modelValue": e[0] || (e[0] = (l) => b.value = l),
83
+ options: t(c),
99
84
  teleport: ""
100
85
  }, {
101
- default: i(() => [
102
- r(t(x), {
86
+ default: a(() => [
87
+ i(t(x), {
103
88
  class: "text-c-2 hover:text-c-1 flex h-full w-fit gap-1.5 px-3 font-normal",
104
89
  fullWidth: "",
105
90
  variant: "ghost"
106
91
  }, {
107
- default: i(() => [
108
- c("span", null, v(b[n.value] ?? n.value), 1),
109
- r(t(k), {
92
+ default: a(() => [
93
+ f("span", null, v(t(k)[o.value] ?? o.value), 1),
94
+ i(t(w), {
110
95
  icon: "ChevronDown",
111
96
  size: "md"
112
97
  })
@@ -119,23 +104,23 @@ const R = {
119
104
  ]),
120
105
  _: 1
121
106
  }),
122
- r(t($), null, {
123
- default: i(() => [
124
- n.value === "none" ? (u(), y("div", R, [...e[5] || (e[5] = [
125
- c("span", null, "No Body", -1)
126
- ])])) : n.value === "application/octet-stream" ? (u(), y("div", I, [
127
- t(V)(t(B)(m.value?.value)) !== void 0 ? (u(), y(O, { key: 0 }, [
128
- c("span", J, v(t(V)(t(B)(m.value?.value))), 1),
129
- r(t(x), {
107
+ i(t(I), null, {
108
+ default: a(() => [
109
+ o.value === "none" ? (u(), y("div", P, [...e[5] || (e[5] = [
110
+ f("span", null, "No Body", -1)
111
+ ])])) : o.value === "application/octet-stream" ? (u(), y("div", R, [
112
+ t(V)(t(C)(s.value?.value)) !== void 0 ? (u(), y(E, { key: 0 }, [
113
+ f("span", J, v(t(V)(t(C)(s.value?.value))), 1),
114
+ i(t(x), {
130
115
  class: "bg-b-2 hover:bg-b-3 text-c-2 ml-1 border-0 shadow-none",
131
116
  size: "sm",
132
117
  variant: "outlined",
133
- onClick: e[1] || (e[1] = (a) => s("update:value", {
118
+ onClick: e[1] || (e[1] = (l) => m("update:value", {
134
119
  payload: void 0,
135
- contentType: n.value
120
+ contentType: o.value
136
121
  }))
137
122
  }, {
138
- default: i(() => [...e[6] || (e[6] = [
123
+ default: a(() => [...e[6] || (e[6] = [
139
124
  T(" Delete ", -1)
140
125
  ])]),
141
126
  _: 1
@@ -145,16 +130,16 @@ const R = {
145
130
  class: "bg-b-2 hover:bg-b-3 text-c-2 border-0 shadow-none",
146
131
  size: "sm",
147
132
  variant: "outlined",
148
- onClick: e[2] || (e[2] = () => h(
149
- (a) => s("update:value", {
150
- payload: a,
151
- contentType: n.value
133
+ onClick: e[2] || (e[2] = () => S(
134
+ (l) => m("update:value", {
135
+ payload: l,
136
+ contentType: o.value
152
137
  })
153
138
  ))
154
139
  }, {
155
- default: i(() => [
156
- e[7] || (e[7] = c("span", null, "Select File", -1)),
157
- r(t(k), {
140
+ default: a(() => [
141
+ e[7] || (e[7] = f("span", null, "Select File", -1)),
142
+ i(t(w), {
158
143
  class: "ml-1",
159
144
  icon: "Upload",
160
145
  size: "xs",
@@ -163,27 +148,27 @@ const R = {
163
148
  ]),
164
149
  _: 1
165
150
  }))
166
- ])) : n.value === "multipart/form-data" || n.value === "application/x-www-form-urlencoded" ? (u(), p(D, {
151
+ ])) : o.value === "multipart/form-data" || o.value === "application/x-www-form-urlencoded" ? (u(), p(U, {
167
152
  key: 2,
168
- environment: l.environment,
169
- example: m.value,
170
- selectedContentType: n.value,
171
- "onUpdate:formValue": e[3] || (e[3] = (a) => s("update:formValue", {
172
- payload: a,
173
- contentType: n.value
153
+ environment: r.environment,
154
+ example: s.value,
155
+ selectedContentType: o.value,
156
+ "onUpdate:formValue": e[3] || (e[3] = (l) => m("update:formValue", {
157
+ payload: l,
158
+ contentType: o.value
174
159
  }))
175
- }, null, 8, ["environment", "example", "selectedContentType"])) : (u(), p(t(z), {
160
+ }, null, 8, ["environment", "example", "selectedContentType"])) : (u(), p(t(L), {
176
161
  key: 3,
177
162
  class: "border-t px-3",
178
163
  content: "",
179
- environment: l.environment,
180
- language: N[n.value] ?? "plaintext",
164
+ environment: r.environment,
165
+ language: N[o.value] ?? "plaintext",
181
166
  lineNumbers: "",
182
167
  lint: "",
183
168
  modelValue: j.value,
184
- "onUpdate:modelValue": e[4] || (e[4] = (a) => s("update:value", {
185
- payload: a,
186
- contentType: n.value
169
+ "onUpdate:modelValue": e[4] || (e[4] = (l) => m("update:value", {
170
+ payload: l,
171
+ contentType: o.value
187
172
  }))
188
173
  }, null, 8, ["environment", "language", "modelValue"]))
189
174
  ]),
@@ -198,5 +183,5 @@ const R = {
198
183
  }
199
184
  });
200
185
  export {
201
- ne as default
186
+ re as default
202
187
  };