@scalar/api-client 2.2.49 → 2.2.50

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 (216) hide show
  1. package/CHANGELOG.md +31 -0
  2. package/dist/components/AddressBar/AddressBar.vue.d.ts +15 -3
  3. package/dist/components/AddressBar/AddressBar.vue.d.ts.map +1 -1
  4. package/dist/components/AddressBar/AddressBar.vue.js +1 -1
  5. package/dist/components/AddressBar/AddressBar.vue2.js +102 -94
  6. package/dist/components/AddressBar/AddressBarHistory.vue.d.ts +2 -0
  7. package/dist/components/AddressBar/AddressBarHistory.vue.d.ts.map +1 -1
  8. package/dist/components/AddressBar/AddressBarHistory.vue.js +2 -2
  9. package/dist/components/AddressBar/AddressBarHistory.vue2.js +54 -58
  10. package/dist/components/CodeInput/CodeInput.vue.d.ts +9 -0
  11. package/dist/components/CodeInput/CodeInput.vue.d.ts.map +1 -1
  12. package/dist/components/CodeInput/CodeInput.vue.js +2 -2
  13. package/dist/components/CodeInput/CodeInput.vue2.js +95 -93
  14. package/dist/components/CodeInput/codeVariableWidget.d.ts.map +1 -1
  15. package/dist/components/CodeInput/codeVariableWidget.js +1 -3
  16. package/dist/components/CommandPalette/CommandPaletteCollection.vue.d.ts.map +1 -1
  17. package/dist/components/CommandPalette/CommandPaletteCollection.vue.js +26 -22
  18. package/dist/components/CommandPalette/CommandPaletteImport.vue.d.ts.map +1 -1
  19. package/dist/components/CommandPalette/CommandPaletteImport.vue.js +13 -13
  20. package/dist/components/CommandPalette/CommandPaletteRequest.vue.d.ts.map +1 -1
  21. package/dist/components/CommandPalette/CommandPaletteRequest.vue.js +12 -12
  22. package/dist/components/CommandPalette/CommandPaletteServer.vue.d.ts.map +1 -1
  23. package/dist/components/CommandPalette/CommandPaletteServer.vue.js +54 -49
  24. package/dist/components/CommandPalette/CommandPaletteTag.vue.d.ts.map +1 -1
  25. package/dist/components/CommandPalette/CommandPaletteTag.vue.js +9 -9
  26. package/dist/components/CommandPalette/TheCommandPalette.vue.d.ts.map +1 -1
  27. package/dist/components/DataTable/DataTableCell.vue.d.ts.map +1 -1
  28. package/dist/components/DataTable/DataTableCell.vue.js +11 -8
  29. package/dist/components/DataTable/DataTableInput.vue.d.ts +6 -0
  30. package/dist/components/DataTable/DataTableInput.vue.d.ts.map +1 -1
  31. package/dist/components/DataTable/DataTableInput.vue.js +4 -4
  32. package/dist/components/DataTable/DataTableInput.vue2.js +36 -30
  33. package/dist/components/DataTable/DataTableInputSelect.vue.d.ts.map +1 -1
  34. package/dist/components/DataTable/DataTableInputSelect.vue.js +15 -15
  35. package/dist/components/Form/Form.vue.d.ts +3 -1
  36. package/dist/components/Form/Form.vue.d.ts.map +1 -1
  37. package/dist/components/Form/Form.vue.js +30 -25
  38. package/dist/components/ImportCollection/ImportCollectionModal.vue.d.ts.map +1 -1
  39. package/dist/components/ImportCollection/ImportCollectionModal.vue.js +41 -41
  40. package/dist/components/ImportCollection/ImportNowButton.vue.js +24 -24
  41. package/dist/components/ScreenReader.vue.d.ts.map +1 -1
  42. package/dist/components/Server/ServerDropdown.vue.d.ts.map +1 -1
  43. package/dist/components/Server/ServerDropdown.vue.js +13 -13
  44. package/dist/components/Server/ServerDropdownItem.vue.d.ts +1 -1
  45. package/dist/components/Server/ServerDropdownItem.vue.d.ts.map +1 -1
  46. package/dist/components/Server/ServerDropdownItem.vue.js +1 -1
  47. package/dist/components/Server/ServerDropdownItem.vue2.js +19 -19
  48. package/dist/layouts/App/create-api-client-app.d.ts +387 -477
  49. package/dist/layouts/App/create-api-client-app.d.ts.map +1 -1
  50. package/dist/layouts/Modal/create-api-client-modal.d.ts +774 -954
  51. package/dist/layouts/Modal/create-api-client-modal.d.ts.map +1 -1
  52. package/dist/layouts/Web/create-api-client-web.d.ts +387 -477
  53. package/dist/layouts/Web/create-api-client-web.d.ts.map +1 -1
  54. package/dist/libs/create-client.d.ts +390 -479
  55. package/dist/libs/create-client.d.ts.map +1 -1
  56. package/dist/libs/create-client.js +3 -15
  57. package/dist/libs/env-helpers.d.ts.map +1 -1
  58. package/dist/libs/find-request.d.ts +7 -7
  59. package/dist/libs/find-request.d.ts.map +1 -1
  60. package/dist/libs/hot-keys.d.ts +3 -1
  61. package/dist/libs/hot-keys.d.ts.map +1 -1
  62. package/dist/libs/hot-keys.js +11 -15
  63. package/dist/libs/hot-keys.test.d.ts +2 -0
  64. package/dist/libs/hot-keys.test.d.ts.map +1 -0
  65. package/dist/libs/index.js +27 -26
  66. package/dist/libs/send-request/build-request-security.d.ts +1 -1
  67. package/dist/libs/send-request/build-request-security.js +19 -16
  68. package/dist/libs/send-request/create-request-operation.test.d.ts +10 -10
  69. package/dist/libs/send-request/create-request-operation.test.d.ts.map +1 -1
  70. package/dist/libs/send-request/set-request-cookies.d.ts +1 -1
  71. package/dist/libs/send-request/set-request-cookies.d.ts.map +1 -1
  72. package/dist/libs/send-request/set-request-cookies.js +37 -34
  73. package/dist/store/active-entities.d.ts +58 -67
  74. package/dist/store/active-entities.d.ts.map +1 -1
  75. package/dist/store/active-entities.js +61 -74
  76. package/dist/store/collections.d.ts +90 -90
  77. package/dist/store/collections.d.ts.map +1 -1
  78. package/dist/store/collections.js +4 -17
  79. package/dist/store/cookies.d.ts +14 -14
  80. package/dist/store/environment.d.ts +19 -18
  81. package/dist/store/environment.d.ts.map +1 -1
  82. package/dist/store/environment.js +2 -8
  83. package/dist/store/import-spec.d.ts +16 -106
  84. package/dist/store/import-spec.d.ts.map +1 -1
  85. package/dist/store/import-spec.js +9 -14
  86. package/dist/store/request-example.d.ts +25 -25
  87. package/dist/store/request-example.d.ts.map +1 -1
  88. package/dist/store/request-example.js +15 -20
  89. package/dist/store/requests.d.ts +84 -84
  90. package/dist/store/requests.d.ts.map +1 -1
  91. package/dist/store/requests.js +17 -40
  92. package/dist/store/router-params.d.ts +13 -11
  93. package/dist/store/router-params.d.ts.map +1 -1
  94. package/dist/store/router-params.js +5 -5
  95. package/dist/store/security-schemes.d.ts +58 -58
  96. package/dist/store/security-schemes.d.ts.map +1 -1
  97. package/dist/store/security-schemes.js +1 -3
  98. package/dist/store/servers.d.ts +17 -17
  99. package/dist/store/servers.d.ts.map +1 -1
  100. package/dist/store/servers.js +2 -9
  101. package/dist/store/store.d.ts +387 -477
  102. package/dist/store/store.d.ts.map +1 -1
  103. package/dist/store/store.js +2 -4
  104. package/dist/store/tags.d.ts +28 -28
  105. package/dist/store/tags.d.ts.map +1 -1
  106. package/dist/store/tags.js +19 -34
  107. package/dist/store/workspace.d.ts +36 -36
  108. package/dist/store/workspace.d.ts.map +1 -1
  109. package/dist/store/workspace.js +1 -5
  110. package/dist/style.css +1 -1
  111. package/dist/views/Collection/Collection.vue.d.ts.map +1 -1
  112. package/dist/views/Cookies/CookieForm.vue.d.ts.map +1 -1
  113. package/dist/views/Cookies/CookieForm.vue.js +18 -18
  114. package/dist/views/Cookies/CookieRaw.vue.d.ts.map +1 -1
  115. package/dist/views/Cookies/Cookies.vue.d.ts.map +1 -1
  116. package/dist/views/Cookies/Cookies.vue2.js +24 -24
  117. package/dist/views/Environment/Environment.vue.d.ts.map +1 -1
  118. package/dist/views/Environment/Environment.vue2.js +140 -132
  119. package/dist/views/Environment/EnvironmentModal.vue.d.ts +2 -2
  120. package/dist/views/Environment/EnvironmentModal.vue.d.ts.map +1 -1
  121. package/dist/views/Environment/EnvironmentModal.vue.js +15 -15
  122. package/dist/views/Request/Request.vue.d.ts.map +1 -1
  123. package/dist/views/Request/Request.vue.js +2 -2
  124. package/dist/views/Request/Request.vue2.js +160 -141
  125. package/dist/views/Request/RequestSection/RequestAuth/DeleteRequestAuthModal.vue.d.ts +2 -1
  126. package/dist/views/Request/RequestSection/RequestAuth/DeleteRequestAuthModal.vue.d.ts.map +1 -1
  127. package/dist/views/Request/RequestSection/RequestAuth/DeleteRequestAuthModal.vue.js +7 -7
  128. package/dist/views/Request/RequestSection/RequestAuth/OAuth2.vue.d.ts +6 -2
  129. package/dist/views/Request/RequestSection/RequestAuth/OAuth2.vue.d.ts.map +1 -1
  130. package/dist/views/Request/RequestSection/RequestAuth/OAuth2.vue.js +99 -95
  131. package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.d.ts +4 -0
  132. package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.d.ts.map +1 -1
  133. package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.js +2 -2
  134. package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue2.js +70 -64
  135. package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTable.vue.d.ts +4 -0
  136. package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTable.vue.d.ts.map +1 -1
  137. package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTable.vue.js +1 -1
  138. package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTable.vue2.js +40 -34
  139. package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTableInput.vue.d.ts +6 -0
  140. package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTableInput.vue.d.ts.map +1 -1
  141. package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTableInput.vue.js +32 -26
  142. package/dist/views/Request/RequestSection/RequestAuth/RequestAuthTab.vue.d.ts +4 -0
  143. package/dist/views/Request/RequestSection/RequestAuth/RequestAuthTab.vue.d.ts.map +1 -1
  144. package/dist/views/Request/RequestSection/RequestAuth/RequestAuthTab.vue.js +2 -2
  145. package/dist/views/Request/RequestSection/RequestAuth/RequestAuthTab.vue2.js +93 -85
  146. package/dist/views/Request/RequestSection/RequestBody.vue.d.ts +9 -0
  147. package/dist/views/Request/RequestSection/RequestBody.vue.d.ts.map +1 -1
  148. package/dist/views/Request/RequestSection/RequestBody.vue.js +2 -2
  149. package/dist/views/Request/RequestSection/RequestBody.vue2.js +214 -244
  150. package/dist/views/Request/RequestSection/RequestCodeExample.vue.d.ts +10 -1
  151. package/dist/views/Request/RequestSection/RequestCodeExample.vue.d.ts.map +1 -1
  152. package/dist/views/Request/RequestSection/RequestCodeExample.vue.js +2 -2
  153. package/dist/views/Request/RequestSection/RequestCodeExample.vue2.js +77 -80
  154. package/dist/views/Request/RequestSection/RequestParams.vue.d.ts +7 -0
  155. package/dist/views/Request/RequestSection/RequestParams.vue.d.ts.map +1 -1
  156. package/dist/views/Request/RequestSection/RequestParams.vue.js +89 -96
  157. package/dist/views/Request/RequestSection/RequestPathParams.vue.d.ts +10 -2
  158. package/dist/views/Request/RequestSection/RequestPathParams.vue.d.ts.map +1 -1
  159. package/dist/views/Request/RequestSection/RequestPathParams.vue.js +59 -66
  160. package/dist/views/Request/RequestSection/RequestSection.vue.d.ts +11 -0
  161. package/dist/views/Request/RequestSection/RequestSection.vue.d.ts.map +1 -1
  162. package/dist/views/Request/RequestSection/RequestSection.vue.js +2 -2
  163. package/dist/views/Request/RequestSection/RequestSection.vue2.js +176 -155
  164. package/dist/views/Request/RequestSection/RequestTable.vue.d.ts +6 -0
  165. package/dist/views/Request/RequestSection/RequestTable.vue.d.ts.map +1 -1
  166. package/dist/views/Request/RequestSection/RequestTable.vue.js +2 -2
  167. package/dist/views/Request/RequestSection/RequestTable.vue2.js +97 -100
  168. package/dist/views/Request/RequestSection/RequestTableTooltip.vue.d.ts.map +1 -1
  169. package/dist/views/Request/RequestSection/RequestTableTooltip.vue.js +2 -2
  170. package/dist/views/Request/RequestSection/RequestTableTooltip.vue2.js +31 -22
  171. package/dist/views/Request/RequestSection/helpers/getting-started.d.ts +2 -2
  172. package/dist/views/Request/RequestSection/helpers/getting-started.d.ts.map +1 -1
  173. package/dist/views/Request/RequestSection/helpers/getting-started.js +11 -13
  174. package/dist/views/Request/RequestSidebar.vue.d.ts.map +1 -1
  175. package/dist/views/Request/RequestSidebar.vue.js +1 -1
  176. package/dist/views/Request/RequestSidebar.vue2.js +50 -48
  177. package/dist/views/Request/RequestSidebarItem.vue.d.ts +1 -1
  178. package/dist/views/Request/RequestSidebarItem.vue.d.ts.map +1 -1
  179. package/dist/views/Request/RequestSidebarItem.vue.js +2 -2
  180. package/dist/views/Request/RequestSidebarItem.vue2.js +38 -44
  181. package/dist/views/Request/RequestSubpageHeader.vue.d.ts +10 -0
  182. package/dist/views/Request/RequestSubpageHeader.vue.d.ts.map +1 -1
  183. package/dist/views/Request/RequestSubpageHeader.vue.js +1 -1
  184. package/dist/views/Request/RequestSubpageHeader.vue2.js +77 -69
  185. package/dist/views/Request/ResponseSection/ResponseEmpty.vue.d.ts +4 -1
  186. package/dist/views/Request/ResponseSection/ResponseEmpty.vue.d.ts.map +1 -1
  187. package/dist/views/Request/ResponseSection/ResponseEmpty.vue.js +1 -1
  188. package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +41 -39
  189. package/dist/views/Request/ResponseSection/ResponseSection.vue.d.ts +1 -0
  190. package/dist/views/Request/ResponseSection/ResponseSection.vue.d.ts.map +1 -1
  191. package/dist/views/Request/ResponseSection/ResponseSection.vue.js +1 -1
  192. package/dist/views/Request/ResponseSection/ResponseSection.vue2.js +56 -52
  193. package/dist/views/Request/components/WorkspaceDropdown.vue.d.ts.map +1 -1
  194. package/dist/views/Request/components/WorkspaceDropdown.vue.js +68 -68
  195. package/dist/views/Request/consts/new-auth-options.d.ts.map +1 -1
  196. package/dist/views/Request/handle-drag.d.ts +1 -1
  197. package/dist/views/Request/handle-drag.d.ts.map +1 -1
  198. package/dist/views/Request/handle-drag.js +38 -55
  199. package/dist/views/Request/libs/auth.d.ts +2 -2
  200. package/dist/views/Request/libs/auth.d.ts.map +1 -1
  201. package/dist/views/Request/libs/auth.js +28 -29
  202. package/dist/views/Request/libs/oauth2.d.ts.map +1 -1
  203. package/dist/views/Request/libs/oauth2.js +42 -65
  204. package/dist/views/Request/libs/request.d.ts +5 -0
  205. package/dist/views/Request/libs/request.d.ts.map +1 -1
  206. package/dist/views/Request/libs/request.js +37 -2
  207. package/dist/views/Request/libs/watch-mode.d.ts.map +1 -1
  208. package/dist/views/Request/libs/watch-mode.js +10 -34
  209. package/dist/views/Servers/ServerForm.vue.d.ts +1 -8
  210. package/dist/views/Servers/ServerForm.vue.d.ts.map +1 -1
  211. package/dist/views/Servers/ServerForm.vue.js +21 -22
  212. package/dist/views/Servers/Servers.vue.d.ts.map +1 -1
  213. package/dist/views/Servers/Servers.vue2.js +73 -81
  214. package/dist/views/Settings/SettingsGeneral.vue.d.ts.map +1 -1
  215. package/dist/views/Settings/SettingsGeneral.vue.js +118 -134
  216. package/package.json +15 -15
@@ -1,3 +1,12 @@
1
- declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, HTMLDivElement>;
1
+ import type { Workspace } from '@scalar/oas-utils/entities';
2
+ import type { Collection, Operation, RequestExample, Server } from '@scalar/oas-utils/entities/spec';
3
+ type __VLS_Props = {
4
+ collection: Collection;
5
+ example: RequestExample;
6
+ operation: Operation;
7
+ server: Server | undefined;
8
+ workspace: Workspace;
9
+ };
10
+ 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>;
2
11
  export default _default;
3
12
  //# sourceMappingURL=RequestCodeExample.vue.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"RequestCodeExample.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/RequestSection/RequestCodeExample.vue"],"names":[],"mappings":";AAsbA,wBAMG"}
1
+ {"version":3,"file":"RequestCodeExample.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/RequestSection/RequestCodeExample.vue"],"names":[],"mappings":"AA+KA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAA;AAC3D,OAAO,KAAK,EACV,UAAU,EACV,SAAS,EACT,cAAc,EACd,MAAM,EACP,MAAM,iCAAiC,CAAA;AAQxC,KAAK,WAAW,GAAG;IACjB,UAAU,EAAE,UAAU,CAAA;IACtB,OAAO,EAAE,cAAc,CAAA;IACvB,SAAS,EAAE,SAAS,CAAA;IACpB,MAAM,EAAE,MAAM,GAAG,SAAS,CAAA;IAC1B,SAAS,EAAE,SAAS,CAAA;CACrB,CAAC;;AA4PF,wBAOG"}
@@ -1,7 +1,7 @@
1
1
  import o from "./RequestCodeExample.vue2.js";
2
2
  /* empty css */
3
- import e from "../../../_virtual/_plugin-vue_export-helper.js";
4
- const r = /* @__PURE__ */ e(o, [["__scopeId", "data-v-54e084d9"]]);
3
+ import t from "../../../_virtual/_plugin-vue_export-helper.js";
4
+ const r = /* @__PURE__ */ t(o, [["__scopeId", "data-v-c2f2c62b"]]);
5
5
  export {
6
6
  r as default
7
7
  };
@@ -1,101 +1,98 @@
1
- import { defineComponent as S, computed as a, openBlock as w, createElementBlock as $, createVNode as s, withCtx as i, createTextVNode as g, createElementVNode as u, unref as c, toDisplayString as k } from "vue";
2
- import K from "../../../components/DataTable/DataTable.vue.js";
3
- import V from "../../../components/DataTable/DataTableRow.vue.js";
4
- import E from "../../../components/ViewLayout/ViewLayoutCollapse.vue.js";
5
- import { useActiveEntities as H } from "../../../store/active-entities.js";
6
- import { ScalarCombobox as R, ScalarButton as j, ScalarIcon as q } from "@scalar/components";
7
- import { snippetz as B } from "@scalar/snippetz";
8
- import { filterSecurityRequirements as D } from "./helpers/filter-security-requirements.js";
9
- import N from "../../Components/CodeSnippet/CodeSnippet.vue.js";
10
- import { useWorkspace as T } from "../../../store/store.js";
11
- const U = { class: "w-full" }, W = { class: "flex flex-1 -mx-1" }, z = { class: "bg-b-1 border-t flex items-center justify-center overflow-hidden" }, Y = /* @__PURE__ */ S({
1
+ import { defineComponent as b, computed as c, openBlock as w, createElementBlock as x, createVNode as n, withCtx as s, createTextVNode as C, createElementVNode as m, unref as a, toDisplayString as S } from "vue";
2
+ import k from "../../../components/DataTable/DataTable.vue.js";
3
+ import $ from "../../../components/DataTable/DataTableRow.vue.js";
4
+ import g from "../../../components/ViewLayout/ViewLayoutCollapse.vue.js";
5
+ import { ScalarCombobox as K, ScalarButton as V, ScalarIcon as _ } from "@scalar/components";
6
+ import { snippetz as H } from "@scalar/snippetz";
7
+ import { filterSecurityRequirements as j } from "./helpers/filter-security-requirements.js";
8
+ import B from "../../Components/CodeSnippet/CodeSnippet.vue.js";
9
+ import { useWorkspace as D } from "../../../store/store.js";
10
+ const E = { class: "w-full" }, N = { class: "flex flex-1 -mx-1" }, R = { class: "bg-b-1 border-t flex items-center justify-center overflow-hidden" }, P = /* @__PURE__ */ b({
12
11
  __name: "RequestCodeExample",
13
- setup(I) {
14
- const {
15
- activeRequest: m,
16
- activeExample: f,
17
- activeServer: v,
18
- activeCollection: p,
19
- activeWorkspace: n
20
- } = H(), { securitySchemes: _, workspaceMutators: y } = T(), h = a(
21
- () => {
22
- var e, t, l;
23
- return D(
24
- ((e = m.value) == null ? void 0 : e.security) || ((t = p.value) == null ? void 0 : t.security) || [],
25
- (l = p.value) == null ? void 0 : l.selectedSecuritySchemeUids,
26
- _
27
- );
28
- }
29
- ), r = a(() => {
12
+ props: {
13
+ collection: {},
14
+ example: {},
15
+ operation: {},
16
+ server: {},
17
+ workspace: {}
18
+ },
19
+ setup(o) {
20
+ const { securitySchemes: p, workspaceMutators: u } = D(), f = c(
21
+ () => j(
22
+ o.operation.security || o.collection.security || [],
23
+ o.collection.selectedSecuritySchemeUids,
24
+ p
25
+ )
26
+ ), r = c(() => {
30
27
  const e = {};
31
28
  return {
32
- options: B().clients().map((l) => ({
33
- label: l.title,
34
- options: l.clients.map((o) => (e[`${l.key},${o.client}`] = o.title, {
35
- id: `${l.key},${o.client}`,
36
- label: o.title
29
+ options: H().clients().map((t) => ({
30
+ label: t.title,
31
+ options: t.clients.map((i) => (e[`${t.key},${i.client}`] = i.title, {
32
+ id: `${t.key},${i.client}`,
33
+ label: i.title
37
34
  }))
38
35
  })),
39
36
  dict: e
40
37
  };
41
- }), d = a(() => {
42
- var l, o;
43
- const e = (l = n.value) == null ? void 0 : l.selectedHttpClient;
38
+ }), d = c(() => {
39
+ var t;
40
+ const e = o.workspace.selectedHttpClient;
44
41
  if (!e)
45
- return ((o = r.value.options[0]) == null ? void 0 : o.options[0]) ?? {
42
+ return ((t = r.value.options[0]) == null ? void 0 : t.options[0]) ?? {
46
43
  id: "js,fetch",
47
44
  label: "Fetch"
48
45
  };
49
- const t = `${e.targetKey},${e.clientKey}`;
46
+ const l = `${e.targetKey},${e.clientKey}`;
50
47
  return {
51
- id: t,
52
- label: r.value.dict[t] ?? "Unknown"
48
+ id: l,
49
+ label: r.value.dict[l] ?? "Unknown"
53
50
  };
54
- }), x = a(
51
+ }), v = c(
55
52
  () => {
56
- var e, t;
57
- return ((t = (e = n.value) == null ? void 0 : e.selectedHttpClient) == null ? void 0 : t.targetKey) ?? "js";
53
+ var e;
54
+ return ((e = o.workspace.selectedHttpClient) == null ? void 0 : e.targetKey) ?? "js";
58
55
  }
59
- ), b = a(
56
+ ), y = c(
60
57
  () => {
61
- var e, t;
62
- return ((t = (e = n.value) == null ? void 0 : e.selectedHttpClient) == null ? void 0 : t.clientKey) ?? "fetch";
58
+ var e;
59
+ return ((e = o.workspace.selectedHttpClient) == null ? void 0 : e.clientKey) ?? "fetch";
63
60
  }
64
- ), C = ({ id: e }) => {
65
- const [t, l] = e.split(",");
66
- !n.value || !t || !l || y.edit(n.value.uid, "selectedHttpClient", {
67
- targetKey: t,
68
- clientKey: l
61
+ ), h = ({ id: e }) => {
62
+ const [l, t] = e.split(",");
63
+ !l || !t || u.edit(o.workspace.uid, "selectedHttpClient", {
64
+ targetKey: l,
65
+ clientKey: t
69
66
  });
70
67
  };
71
- return (e, t) => (w(), $("div", U, [
72
- s(E, {
73
- class: "group/preview -mt-0.25 w-full",
68
+ return (e, l) => (w(), x("div", E, [
69
+ n(g, {
70
+ class: "group/preview -mt-0.25 w-full border-b-0",
74
71
  defaultOpen: !1,
75
72
  hasIcon: !1
76
73
  }, {
77
- title: i(() => t[0] || (t[0] = [
78
- g("Code Snippet")
74
+ title: s(() => l[0] || (l[0] = [
75
+ C("Code Snippet")
79
76
  ])),
80
- actions: i(() => [
81
- u("div", W, [
82
- s(c(R), {
77
+ actions: s(() => [
78
+ m("div", N, [
79
+ n(a(K), {
83
80
  modelValue: d.value,
84
81
  options: r.value.options,
85
82
  placement: "bottom-end",
86
- "onUpdate:modelValue": C
83
+ "onUpdate:modelValue": h
87
84
  }, {
88
- default: i(() => [
89
- s(c(j), {
85
+ default: s(() => [
86
+ n(a(V), {
90
87
  class: "flex gap-1.5 h-full px-1.5 py-0.75 font-normal text-c-1 w-fit hover:bg-b-3",
91
88
  fullWidth: "",
92
89
  variant: "ghost"
93
90
  }, {
94
- default: i(() => {
95
- var l;
91
+ default: s(() => {
92
+ var t;
96
93
  return [
97
- u("span", null, k((l = d.value) == null ? void 0 : l.label), 1),
98
- s(c(q), {
94
+ m("span", null, S((t = d.value) == null ? void 0 : t.label), 1),
95
+ n(a(_), {
99
96
  icon: "ChevronDown",
100
97
  size: "md"
101
98
  })
@@ -108,20 +105,20 @@ const U = { class: "w-full" }, W = { class: "flex flex-1 -mx-1" }, z = { class:
108
105
  }, 8, ["modelValue", "options"])
109
106
  ])
110
107
  ]),
111
- default: i(() => [
112
- s(K, { columns: [""] }, {
113
- default: i(() => [
114
- s(V, null, {
115
- default: i(() => [
116
- u("div", z, [
117
- s(c(N), {
108
+ default: s(() => [
109
+ n(k, { columns: [""] }, {
110
+ default: s(() => [
111
+ n($, null, {
112
+ default: s(() => [
113
+ m("div", R, [
114
+ n(a(B), {
118
115
  class: "px-3 py-1.5",
119
- client: b.value,
120
- example: c(f),
121
- operation: c(m),
122
- securitySchemes: h.value,
123
- server: c(v),
124
- target: x.value
116
+ client: y.value,
117
+ example: e.example,
118
+ operation: e.operation,
119
+ securitySchemes: f.value,
120
+ server: e.server,
121
+ target: v.value
125
122
  }, null, 8, ["client", "example", "operation", "securitySchemes", "server", "target"])
126
123
  ])
127
124
  ]),
@@ -137,5 +134,5 @@ const U = { class: "w-full" }, W = { class: "flex flex-1 -mx-1" }, z = { class:
137
134
  }
138
135
  });
139
136
  export {
140
- Y as default
137
+ P as default
141
138
  };
@@ -1,6 +1,13 @@
1
+ import type { EnvVariable } from '../../../store/active-entities';
2
+ import type { Environment } from '@scalar/oas-utils/entities/environment';
1
3
  import { type RequestExample } from '@scalar/oas-utils/entities/spec';
4
+ import type { Workspace } from '@scalar/oas-utils/entities/workspace';
2
5
  import type { RouteLocationRaw } from 'vue-router';
3
6
  type __VLS_Props = {
7
+ example: RequestExample;
8
+ environment: Environment;
9
+ envVariables: EnvVariable[];
10
+ workspace: Workspace;
4
11
  title: string;
5
12
  paramKey: keyof RequestExample['parameters'];
6
13
  readOnlyEntries?: {
@@ -1 +1 @@
1
- {"version":3,"file":"RequestParams.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/RequestSection/RequestParams.vue"],"names":[],"mappings":"AAsOA,OAAO,EACL,KAAK,cAAc,EAEpB,MAAM,iCAAiC,CAAA;AAExC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAA;AAIlD,KAAK,WAAW,GAAG;IACjB,KAAK,EAAE,MAAM,CAAA;IACb,QAAQ,EAAE,MAAM,cAAc,CAAC,YAAY,CAAC,CAAA;IAC5C,eAAe,CAAC,EAAE;QAChB,GAAG,EAAE,MAAM,CAAA;QACX,KAAK,EAAE,MAAM,CAAA;QACb,OAAO,EAAE,OAAO,CAAA;QAChB,KAAK,EAAE,gBAAgB,CAAA;KACxB,EAAE,CAAA;CACJ,CAAC;;AA8VF,wBAOG"}
1
+ {"version":3,"file":"RequestParams.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/RequestSection/RequestParams.vue"],"names":[],"mappings":"AA8NA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAA;AAG1D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wCAAwC,CAAA;AACzE,OAAO,EACL,KAAK,cAAc,EAEpB,MAAM,iCAAiC,CAAA;AACxC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sCAAsC,CAAA;AAErE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAA;AAIlD,KAAK,WAAW,GAAG;IACjB,OAAO,EAAE,cAAc,CAAA;IACvB,WAAW,EAAE,WAAW,CAAA;IACxB,YAAY,EAAE,WAAW,EAAE,CAAA;IAC3B,SAAS,EAAE,SAAS,CAAA;IACpB,KAAK,EAAE,MAAM,CAAA;IACb,QAAQ,EAAE,MAAM,cAAc,CAAC,YAAY,CAAC,CAAA;IAC5C,eAAe,CAAC,EAAE;QAChB,GAAG,EAAE,MAAM,CAAA;QACX,KAAK,EAAE,MAAM,CAAA;QACb,OAAO,EAAE,OAAO,CAAA;QAChB,KAAK,EAAE,gBAAgB,CAAA;KACxB,EAAE,CAAA;CACJ,CAAC;;AA6UF,wBAOG"}
@@ -1,150 +1,143 @@
1
- import { defineComponent as A, computed as c, onMounted as N, ref as V, watch as z, openBlock as v, createBlock as d, withCtx as r, createTextVNode as R, toDisplayString as k, createElementVNode as i, unref as x, createVNode as C, withModifiers as B, createCommentVNode as E, normalizeClass as M, nextTick as q } from "vue";
2
- import W from "../../../components/ViewLayout/ViewLayoutCollapse.vue.js";
3
- import { useActiveEntities as D } from "../../../store/active-entities.js";
4
- import w from "./RequestTable.vue.js";
5
- import { ScalarTooltip as G, ScalarButton as U } from "@scalar/components";
6
- import { requestExampleParametersSchema as P } from "@scalar/oas-utils/entities/spec";
7
- import { useWorkspace as j } from "../../../store/store.js";
8
- const F = { class: "text-c-2 flex whitespace-nowrap opacity-0 group-hover/params:opacity-100 has-[:focus-visible]:opacity-100 request-meta-buttons" }, H = { class: "sr-only" }, te = /* @__PURE__ */ A({
1
+ import { defineComponent as O, computed as m, onMounted as T, ref as S, watch as N, openBlock as p, createBlock as d, withCtx as l, createTextVNode as b, toDisplayString as k, createElementVNode as r, unref as h, createVNode as w, withModifiers as z, createCommentVNode as x, normalizeClass as A, nextTick as R } from "vue";
2
+ import B from "../../../components/ViewLayout/ViewLayoutCollapse.vue.js";
3
+ import V from "./RequestTable.vue.js";
4
+ import { ScalarTooltip as M, ScalarButton as W } from "@scalar/components";
5
+ import { requestExampleParametersSchema as C } from "@scalar/oas-utils/entities/spec";
6
+ import { useWorkspace as D } from "../../../store/store.js";
7
+ const G = { class: "text-c-2 flex whitespace-nowrap opacity-0 group-hover/params:opacity-100 has-[:focus-visible]:opacity-100 request-meta-buttons" }, U = { class: "sr-only" }, Z = /* @__PURE__ */ O({
9
8
  __name: "RequestParams",
10
9
  props: {
10
+ example: {},
11
+ environment: {},
12
+ envVariables: {},
13
+ workspace: {},
11
14
  title: {},
12
15
  paramKey: {},
13
16
  readOnlyEntries: { default: () => [] }
14
17
  },
15
- setup(n) {
16
- const { activeRequest: o, activeExample: l } = D(), { requestExampleMutators: u } = j(), s = c(() => {
17
- var e;
18
- return ((e = l.value) == null ? void 0 : e.parameters[n.paramKey]) ?? [];
19
- });
20
- N(() => {
21
- g();
22
- });
23
- const m = () => {
24
- if (!o.value || !l.value) return;
25
- const e = P.parse({ enabled: !1 }), t = [...s.value, e];
26
- u.edit(
27
- l.value.uid,
28
- `parameters.${n.paramKey}`,
29
- t
30
- );
31
- }, p = V(null), K = (e, t, h) => {
32
- if (!o.value || !l.value) return;
33
- const f = s.value;
34
- if (f.length > e) {
35
- const a = [...f];
36
- if (!a[e]) return;
37
- a[e] = { ...a[e], [t]: h }, (a[e].key !== "" || a[e].value !== "") && (a[e].enabled = !0), a[e].key === "" && a[e].value === "" && a.splice(e, 1), u.edit(
38
- l.value.uid,
39
- `parameters.${n.paramKey}`,
40
- a
18
+ setup(t) {
19
+ const { requestExampleMutators: i } = D(), s = m(() => t.example.parameters[t.paramKey] ?? []);
20
+ T(() => f());
21
+ const o = () => {
22
+ const e = C.parse({ enabled: !1 }), a = [...s.value, e];
23
+ i.edit(t.example.uid, `parameters.${t.paramKey}`, a);
24
+ }, u = S(null), P = (e, a, g) => {
25
+ const c = s.value;
26
+ if (c.length > e) {
27
+ const n = [...c];
28
+ if (!n[e]) return;
29
+ n[e] = { ...n[e], [a]: g }, (n[e].key !== "" || n[e].value !== "") && (n[e].enabled = !0), n[e].key === "" && n[e].value === "" && n.splice(e, 1), i.edit(
30
+ t.example.uid,
31
+ `parameters.${t.paramKey}`,
32
+ n
41
33
  );
42
34
  } else {
43
- const a = [P.parse({ [t]: h })];
44
- u.edit(
45
- l.value.uid,
46
- `parameters.${n.paramKey}`,
47
- a
48
- ), q(() => {
49
- var b;
50
- if (!p.value) return;
51
- (b = p.value.querySelectorAll("input")[t === "key" ? 0 : 1]) == null || b.focus();
35
+ const n = [C.parse({ [a]: g })];
36
+ i.edit(t.example.uid, `parameters.${t.paramKey}`, n), R(() => {
37
+ var y;
38
+ if (!u.value) return;
39
+ (y = u.value.querySelectorAll("input")[a === "key" ? 0 : 1]) == null || y.focus();
52
40
  });
53
41
  }
54
- e === f.length - 1 && m();
55
- }, $ = (e, t) => o.value && l.value && u.edit(
56
- l.value.uid,
57
- `parameters.${n.paramKey}.${e}.enabled`,
58
- t
59
- ), O = () => {
60
- if (!o.value || !l.value) return;
61
- const e = s.value.filter((t) => t.required);
62
- u.edit(
63
- l.value.uid,
64
- `parameters.${n.paramKey}`,
42
+ e === c.length - 1 && o();
43
+ }, q = (e, a) => i.edit(
44
+ t.example.uid,
45
+ `parameters.${t.paramKey}.${e}.enabled`,
46
+ a
47
+ ), E = () => {
48
+ const e = s.value.filter((a) => a.required);
49
+ i.edit(
50
+ t.example.uid,
51
+ `parameters.${t.paramKey}`,
65
52
  e
66
- ), q(() => m());
53
+ ), R(() => o());
67
54
  };
68
- function g() {
55
+ function f() {
69
56
  if (s.value.length === 0)
70
- m();
57
+ o();
71
58
  else if (s.value.length >= 1) {
72
59
  const e = s.value[s.value.length - 1];
73
- e && e.key !== "" && e.value !== "" && m();
60
+ e && e.key !== "" && e.value !== "" && o();
74
61
  }
75
62
  }
76
- const T = c(
63
+ const K = m(
77
64
  () => s.value.filter((e) => e.key || e.value).length
78
- ), S = c(() => s.value.length > 1);
79
- z(
80
- () => l.value,
81
- (e, t) => {
82
- e !== t && g();
65
+ ), $ = m(() => s.value.length > 1);
66
+ N(
67
+ () => t.example,
68
+ (e, a) => {
69
+ e !== a && f();
83
70
  },
84
71
  { immediate: !0 }
85
72
  );
86
- const y = c(() => (n.readOnlyEntries ?? []).length > 0);
87
- return (e, t) => (v(), d(W, {
73
+ const v = m(() => (t.readOnlyEntries ?? []).length > 0);
74
+ return (e, a) => (p(), d(B, {
88
75
  class: "group/params",
89
- itemCount: T.value
76
+ itemCount: K.value
90
77
  }, {
91
- title: r(() => [
92
- R(k(e.title), 1)
78
+ title: l(() => [
79
+ b(k(e.title), 1)
93
80
  ]),
94
- actions: r(() => [
95
- i("div", F, [
96
- S.value ? (v(), d(x(G), {
81
+ actions: l(() => [
82
+ r("div", G, [
83
+ $.value ? (p(), d(h(M), {
97
84
  key: 0,
98
85
  side: "right",
99
86
  sideOffset: 12
100
87
  }, {
101
- trigger: r(() => [
102
- C(x(U), {
88
+ trigger: l(() => [
89
+ w(h(W), {
103
90
  class: "px-1 transition-none",
104
91
  size: "sm",
105
92
  variant: "ghost",
106
- onClick: B(O, ["stop"])
93
+ onClick: z(E, ["stop"])
107
94
  }, {
108
- default: r(() => [
109
- t[0] || (t[0] = R(" Clear ")),
110
- i("span", H, "All " + k(e.title), 1)
95
+ default: l(() => [
96
+ a[0] || (a[0] = b(" Clear ")),
97
+ r("span", U, "All " + k(e.title), 1)
111
98
  ]),
112
99
  _: 1
113
100
  })
114
101
  ]),
115
- content: r(() => t[1] || (t[1] = [
116
- i("div", { class: "grid gap-1.5 pointer-events-none min-w-48 w-content shadow-lg rounded bg-b-1 p-2 text-xxs leading-5 z-10 text-c-1" }, [
117
- i("div", { class: "flex items-center text-c-2" }, [
118
- i("span", null, "Clear optional parameters")
102
+ content: l(() => a[1] || (a[1] = [
103
+ r("div", { class: "grid gap-1.5 pointer-events-none min-w-48 w-content shadow-lg rounded bg-b-1 p-2 text-xxs leading-5 z-10 text-c-1" }, [
104
+ r("div", { class: "flex items-center text-c-2" }, [
105
+ r("span", null, "Clear optional parameters")
119
106
  ])
120
107
  ], -1)
121
108
  ])),
122
109
  _: 1
123
- })) : E("", !0)
110
+ })) : x("", !0)
124
111
  ])
125
112
  ]),
126
- default: r(() => [
127
- i("div", {
113
+ default: l(() => [
114
+ r("div", {
128
115
  ref_key: "tableWrapperRef",
129
- ref: p
116
+ ref: u
130
117
  }, [
131
- y.value ? (v(), d(w, {
118
+ v.value ? (p(), d(V, {
132
119
  key: 0,
133
- class: M(["flex-1", {
134
- "bg-mix-transparent bg-mix-amount-95 bg-c-3": y.value
120
+ class: A(["flex-1", {
121
+ "bg-mix-transparent bg-mix-amount-95 bg-c-3": v.value
135
122
  }]),
136
123
  columns: ["32px", "", ""],
124
+ envVariables: e.envVariables,
125
+ environment: e.environment,
137
126
  isGlobal: "",
138
127
  isReadOnly: "",
139
- items: e.readOnlyEntries
140
- }, null, 8, ["class", "items"])) : E("", !0),
141
- C(w, {
128
+ items: e.readOnlyEntries,
129
+ workspace: e.workspace
130
+ }, null, 8, ["class", "envVariables", "environment", "items", "workspace"])) : x("", !0),
131
+ w(V, {
142
132
  class: "flex-1",
143
133
  columns: ["32px", "", ""],
134
+ envVariables: e.envVariables,
135
+ environment: e.environment,
144
136
  items: s.value,
145
- onToggleRow: $,
146
- onUpdateRow: K
147
- }, null, 8, ["items"])
137
+ workspace: e.workspace,
138
+ onToggleRow: q,
139
+ onUpdateRow: P
140
+ }, null, 8, ["envVariables", "environment", "items", "workspace"])
148
141
  ], 512)
149
142
  ]),
150
143
  _: 1
@@ -152,5 +145,5 @@ const F = { class: "text-c-2 flex whitespace-nowrap opacity-0 group-hover/params
152
145
  }
153
146
  });
154
147
  export {
155
- te as default
148
+ Z as default
156
149
  };
@@ -1,7 +1,15 @@
1
- import type { RequestExample } from '@scalar/oas-utils/entities/spec';
1
+ import type { EnvVariable } from '../../../store/active-entities';
2
+ import type { Workspace } from '@scalar/oas-utils/entities';
3
+ import type { Environment } from '@scalar/oas-utils/entities/environment';
4
+ import type { Operation, RequestExample } from '@scalar/oas-utils/entities/spec';
2
5
  type __VLS_Props = {
3
- title: string;
6
+ example: RequestExample;
7
+ operation: Operation;
4
8
  paramKey: keyof RequestExample['parameters'];
9
+ title: string;
10
+ environment: Environment;
11
+ envVariables: EnvVariable[];
12
+ workspace: Workspace;
5
13
  };
6
14
  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, {}, any>;
7
15
  export default _default;
@@ -1 +1 @@
1
- {"version":3,"file":"RequestPathParams.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/RequestSection/RequestPathParams.vue"],"names":[],"mappings":"AAuIA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAA;AAMrE,KAAK,WAAW,GAAG;IACjB,KAAK,EAAE,MAAM,CAAA;IACb,QAAQ,EAAE,MAAM,cAAc,CAAC,YAAY,CAAC,CAAA;CAC7C,CAAC;;AAiMF,wBAOG"}
1
+ {"version":3,"file":"RequestPathParams.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/RequestSection/RequestPathParams.vue"],"names":[],"mappings":"AAgIA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAA;AAE1D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAA;AAC3D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wCAAwC,CAAA;AACzE,OAAO,KAAK,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAA;AAMhF,KAAK,WAAW,GAAG;IACjB,OAAO,EAAE,cAAc,CAAA;IACvB,SAAS,EAAE,SAAS,CAAA;IACpB,QAAQ,EAAE,MAAM,cAAc,CAAC,YAAY,CAAC,CAAA;IAC5C,KAAK,EAAE,MAAM,CAAA;IACb,WAAW,EAAE,WAAW,CAAA;IACxB,YAAY,EAAE,WAAW,EAAE,CAAA;IAC3B,SAAS,EAAE,SAAS,CAAA;CACrB,CAAC;;AAoLF,wBAOG"}