@scalar/api-client 2.26.1 → 2.27.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 (158) hide show
  1. package/CHANGELOG.md +102 -0
  2. package/dist/components/Server/ServerSelector.vue.js +6 -6
  3. package/dist/components/ViewLayout/ViewLayoutCollapse.vue.js +6 -6
  4. package/dist/style.css +1 -1
  5. package/dist/v2/blocks/operation-block/OperationBlock.vue.d.ts +1 -1
  6. package/dist/v2/blocks/operation-block/OperationBlock.vue.d.ts.map +1 -1
  7. package/dist/v2/blocks/operation-block/OperationBlock.vue.js +48 -43
  8. package/dist/v2/blocks/operation-block/components/Header.vue.js +2 -2
  9. package/dist/v2/blocks/operation-block/components/Header.vue2.js +10 -10
  10. package/dist/v2/blocks/operation-block/helpers/build-request-body.d.ts.map +1 -1
  11. package/dist/v2/blocks/operation-block/helpers/build-request-body.js +29 -25
  12. package/dist/v2/blocks/operation-block/helpers/get-example.d.ts.map +1 -1
  13. package/dist/v2/blocks/operation-block/helpers/get-example.js +15 -15
  14. package/dist/v2/blocks/operation-block/helpers/get-selected-body-content-type.d.ts +10 -0
  15. package/dist/v2/blocks/operation-block/helpers/get-selected-body-content-type.d.ts.map +1 -0
  16. package/dist/v2/blocks/operation-block/helpers/get-selected-body-content-type.js +4 -0
  17. package/dist/v2/blocks/operation-block/helpers/send-request.d.ts +1 -1
  18. package/dist/v2/blocks/operation-block/helpers/send-request.d.ts.map +1 -1
  19. package/dist/v2/blocks/operation-block/helpers/send-request.js +1 -1
  20. package/dist/v2/blocks/request-block/RequestBlock.vue.d.ts +1 -1
  21. package/dist/v2/blocks/request-block/RequestBlock.vue.d.ts.map +1 -1
  22. package/dist/v2/blocks/request-block/RequestBlock.vue.js +1 -1
  23. package/dist/v2/blocks/request-block/RequestBlock.vue2.js +101 -100
  24. package/dist/v2/blocks/request-block/components/RequestBody.vue.d.ts.map +1 -1
  25. package/dist/v2/blocks/request-block/components/RequestBody.vue.js +2 -2
  26. package/dist/v2/blocks/request-block/components/RequestBody.vue2.js +62 -69
  27. package/dist/v2/blocks/request-block/components/RequestParams.vue.js +6 -6
  28. package/dist/v2/blocks/request-block/components/RequestTable.vue.d.ts +36 -2
  29. package/dist/v2/blocks/request-block/components/RequestTable.vue.d.ts.map +1 -1
  30. package/dist/v2/blocks/request-block/components/RequestTable.vue.js +1 -1
  31. package/dist/v2/blocks/request-block/components/RequestTableRow.vue.d.ts +38 -3
  32. package/dist/v2/blocks/request-block/components/RequestTableRow.vue.d.ts.map +1 -1
  33. package/dist/v2/blocks/request-block/helpers/get-default-headers.js +1 -1
  34. package/dist/v2/blocks/response-block/ResponseBlock.vue.d.ts +1 -1
  35. package/dist/v2/blocks/response-block/ResponseBlock.vue.d.ts.map +1 -1
  36. package/dist/v2/blocks/response-block/ResponseBlock.vue.js +1 -1
  37. package/dist/v2/blocks/response-block/ResponseBlock.vue2.js +68 -69
  38. package/dist/v2/blocks/response-block/components/ResponseEmpty.vue.d.ts.map +1 -1
  39. package/dist/v2/blocks/response-block/components/ResponseEmpty.vue.js +1 -1
  40. package/dist/v2/blocks/response-block/components/ResponseEmpty.vue2.js +31 -40
  41. package/dist/v2/blocks/scalar-address-bar-block/components/EnvironmentSelector.vue.d.ts.map +1 -1
  42. package/dist/v2/blocks/scalar-address-bar-block/components/EnvironmentSelector.vue.js +35 -41
  43. package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.d.ts.map +1 -1
  44. package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.js +37 -41
  45. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.d.ts +3 -2
  46. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.d.ts.map +1 -1
  47. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.js +107 -87
  48. package/dist/v2/blocks/scalar-auth-selector-block/components/OpenIDConnect.vue.d.ts +21 -0
  49. package/dist/v2/blocks/scalar-auth-selector-block/components/OpenIDConnect.vue.d.ts.map +1 -0
  50. package/dist/v2/blocks/scalar-auth-selector-block/components/OpenIDConnect.vue.js +91 -0
  51. package/dist/v2/blocks/scalar-auth-selector-block/components/OpenIDConnect.vue2.js +4 -0
  52. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.d.ts.map +1 -1
  53. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.js +107 -93
  54. package/dist/v2/blocks/scalar-auth-selector-block/helpers/extract-security-scheme-secrets.d.ts.map +1 -1
  55. package/dist/v2/blocks/scalar-auth-selector-block/helpers/extract-security-scheme-secrets.js +87 -65
  56. package/dist/v2/blocks/scalar-auth-selector-block/helpers/fetch-openid-connect-discovery.d.ts +36 -0
  57. package/dist/v2/blocks/scalar-auth-selector-block/helpers/fetch-openid-connect-discovery.d.ts.map +1 -0
  58. package/dist/v2/blocks/scalar-auth-selector-block/helpers/fetch-openid-connect-discovery.js +35 -0
  59. package/dist/v2/blocks/scalar-auth-selector-block/helpers/merge-security.d.ts +1 -1
  60. package/dist/v2/blocks/scalar-auth-selector-block/helpers/merge-security.d.ts.map +1 -1
  61. package/dist/v2/blocks/scalar-auth-selector-block/helpers/merge-security.js +18 -10
  62. package/dist/v2/blocks/scalar-auth-selector-block/helpers/openid-discovery-to-flows.d.ts +5 -0
  63. package/dist/v2/blocks/scalar-auth-selector-block/helpers/openid-discovery-to-flows.d.ts.map +1 -0
  64. package/dist/v2/blocks/scalar-auth-selector-block/helpers/openid-discovery-to-flows.js +27 -0
  65. package/dist/v2/blocks/scalar-auth-selector-block/helpers/secret-types.d.ts +3 -1
  66. package/dist/v2/blocks/scalar-auth-selector-block/helpers/secret-types.d.ts.map +1 -1
  67. package/dist/v2/blocks/scalar-auth-selector-block/helpers/security-scheme.d.ts +1 -2
  68. package/dist/v2/blocks/scalar-auth-selector-block/helpers/security-scheme.d.ts.map +1 -1
  69. package/dist/v2/blocks/scalar-auth-selector-block/helpers/security-scheme.js +29 -37
  70. package/dist/v2/components/layout/CollapsibleSection.vue.js +1 -1
  71. package/dist/v2/components/modals/ModalClientContainer.vue.d.ts +2 -2
  72. package/dist/v2/components/modals/ModalClientContainer.vue.d.ts.map +1 -1
  73. package/dist/v2/components/modals/ModalClientContainer.vue.js +1 -1
  74. package/dist/v2/components/modals/ModalClientContainer.vue2.js +45 -42
  75. package/dist/v2/components/sidebar/Sidebar.vue.d.ts +2 -0
  76. package/dist/v2/components/sidebar/Sidebar.vue.d.ts.map +1 -1
  77. package/dist/v2/components/sidebar/Sidebar.vue.js +25 -24
  78. package/dist/v2/components/sidebar/SidebarMenu.vue.d.ts +2 -0
  79. package/dist/v2/components/sidebar/SidebarMenu.vue.d.ts.map +1 -1
  80. package/dist/v2/components/sidebar/SidebarMenu.vue.js +30 -30
  81. package/dist/v2/features/app/App.vue.d.ts +6 -1
  82. package/dist/v2/features/app/App.vue.d.ts.map +1 -1
  83. package/dist/v2/features/app/App.vue.js +48 -46
  84. package/dist/v2/features/app/app-events.d.ts +1 -1
  85. package/dist/v2/features/app/app-events.d.ts.map +1 -1
  86. package/dist/v2/features/app/app-events.js +95 -56
  87. package/dist/v2/features/app/components/AppSidebar.vue.d.ts.map +1 -1
  88. package/dist/v2/features/app/components/AppSidebar.vue.js +3 -3
  89. package/dist/v2/features/app/components/AppSidebar.vue2.js +111 -105
  90. package/dist/v2/features/app/helpers/create-api-client-app.d.ts +12 -2
  91. package/dist/v2/features/app/helpers/create-api-client-app.d.ts.map +1 -1
  92. package/dist/v2/features/app/helpers/create-api-client-app.js +12 -10
  93. package/dist/v2/features/app/helpers/routes.d.ts +3 -1
  94. package/dist/v2/features/app/helpers/routes.d.ts.map +1 -1
  95. package/dist/v2/features/app/hooks/use-theme.d.ts +42 -0
  96. package/dist/v2/features/app/hooks/use-theme.d.ts.map +1 -0
  97. package/dist/v2/features/app/hooks/use-theme.js +34 -0
  98. package/dist/v2/features/app/index.d.ts +0 -1
  99. package/dist/v2/features/app/index.d.ts.map +1 -1
  100. package/dist/v2/features/collection/DocumentCollection.vue.d.ts.map +1 -1
  101. package/dist/v2/features/collection/DocumentCollection.vue.js +27 -26
  102. package/dist/v2/features/collection/WorkspaceCollection.vue.js +13 -12
  103. package/dist/v2/features/collection/components/Authentication.vue.d.ts.map +1 -1
  104. package/dist/v2/features/collection/components/Authentication.vue.js +2 -2
  105. package/dist/v2/features/collection/components/Authentication.vue2.js +49 -40
  106. package/dist/v2/features/collection/components/Cookies.vue.d.ts.map +1 -1
  107. package/dist/v2/features/collection/components/Cookies.vue.js +26 -13
  108. package/dist/v2/features/collection/components/Environment.vue.d.ts.map +1 -1
  109. package/dist/v2/features/collection/components/Environment.vue.js +27 -15
  110. package/dist/v2/features/collection/components/Overview.vue.d.ts.map +1 -1
  111. package/dist/v2/features/collection/components/Overview.vue.js +2 -2
  112. package/dist/v2/features/collection/components/Overview.vue2.js +68 -61
  113. package/dist/v2/features/collection/components/Servers.vue.d.ts.map +1 -1
  114. package/dist/v2/features/collection/components/Servers.vue.js +93 -88
  115. package/dist/v2/features/collection/components/Settings.vue.d.ts.map +1 -1
  116. package/dist/v2/features/collection/components/Settings.vue.js +19 -17
  117. package/dist/v2/features/environments/EnvironmentsList.vue.js +1 -1
  118. package/dist/v2/features/global-cookies/components/CookiesTable.vue.d.ts.map +1 -1
  119. package/dist/v2/features/global-cookies/components/CookiesTable.vue.js +2 -2
  120. package/dist/v2/features/global-cookies/components/CookiesTable.vue2.js +8 -8
  121. package/dist/v2/features/modal/Modal.vue.d.ts +1 -1
  122. package/dist/v2/features/modal/Modal.vue.d.ts.map +1 -1
  123. package/dist/v2/features/modal/Modal.vue.js +15 -15
  124. package/dist/v2/features/modal/helpers/create-api-client-modal.d.ts +1 -1
  125. package/dist/v2/features/modal/helpers/create-api-client-modal.d.ts.map +1 -1
  126. package/dist/v2/features/operation/Operation.vue.d.ts.map +1 -1
  127. package/dist/v2/features/operation/Operation.vue.js +31 -34
  128. package/dist/v2/features/settings/CollectionSettings.vue.d.ts +10 -7
  129. package/dist/v2/features/settings/CollectionSettings.vue.d.ts.map +1 -1
  130. package/dist/v2/features/settings/CollectionSettings.vue.js +183 -149
  131. package/dist/v2/features/settings/DocumentSettings.vue.d.ts.map +1 -1
  132. package/dist/v2/features/settings/DocumentSettings.vue.js +88 -79
  133. package/dist/v2/features/settings/components/Section.vue.d.ts +2 -1
  134. package/dist/v2/features/settings/components/Section.vue.d.ts.map +1 -1
  135. package/dist/v2/features/settings/components/Section.vue.js +26 -15
  136. package/dist/v2/features/settings/helpers/get-theme-colors.d.ts +4 -3
  137. package/dist/v2/features/settings/helpers/get-theme-colors.d.ts.map +1 -1
  138. package/dist/v2/features/settings/helpers/get-theme-colors.js +6 -7
  139. package/dist/v2/helpers/handle-hotkeys.d.ts.map +1 -1
  140. package/dist/v2/helpers/handle-hotkeys.js +2 -2
  141. package/dist/v2/helpers/index.d.ts +0 -1
  142. package/dist/v2/helpers/index.d.ts.map +1 -1
  143. package/dist/v2/hooks/use-global-hot-keys.d.ts +3 -1
  144. package/dist/v2/hooks/use-global-hot-keys.d.ts.map +1 -1
  145. package/dist/v2/hooks/use-global-hot-keys.js +8 -6
  146. package/dist/v2/workspace-events.d.ts.map +1 -1
  147. package/dist/v2/workspace-events.js +10 -0
  148. package/dist/views/Request/RequestSidebar.vue.d.ts.map +1 -1
  149. package/dist/views/Request/RequestSidebar.vue.js +2 -2
  150. package/dist/views/Request/RequestSidebar.vue2.js +139 -155
  151. package/dist/views/Request/RequestSidebarItem.vue.d.ts.map +1 -1
  152. package/dist/views/Request/RequestSidebarItem.vue.js +2 -2
  153. package/dist/views/Request/RequestSidebarItem.vue2.js +104 -101
  154. package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +1 -1
  155. package/package.json +20 -18
  156. package/dist/v2/helpers/plugins.d.ts +0 -65
  157. package/dist/v2/helpers/plugins.d.ts.map +0 -1
  158. package/dist/v2/helpers/plugins.js +0 -11
@@ -1,4 +1,5 @@
1
1
  import type { HttpMethod as HttpMethodType } from '@scalar/helpers/http/http-methods';
2
+ import { type ClientPlugin } from '@scalar/oas-utils/helpers';
2
3
  import { type AvailableClients } from '@scalar/types/snippetz';
3
4
  import type { WorkspaceStore } from '@scalar/workspace-store/client';
4
5
  import type { SelectedSecurity } from '@scalar/workspace-store/entities/auth';
@@ -10,7 +11,6 @@ import type { OperationObject } from '@scalar/workspace-store/schemas/v3.1/stric
10
11
  import type { ClientLayout } from '../../../hooks/index.js';
11
12
  import type { ExtendedScalarCookie } from '../../../v2/blocks/request-block/RequestBlock.vue.js';
12
13
  import type { MergedSecuritySchemes } from '../../../v2/blocks/scalar-auth-selector-block/helpers/merge-security.js';
13
- import { type ClientPlugin } from '../../../v2/helpers/plugins.js';
14
14
  /**
15
15
  * OperationBlock
16
16
  *
@@ -1 +1 @@
1
- {"version":3,"file":"OperationBlock.vue.d.ts","sourceRoot":"","sources":["../../../../src/v2/blocks/operation-block/OperationBlock.vue"],"names":[],"mappings":"AA+YA,OAAO,KAAK,EAAE,UAAU,IAAI,cAAc,EAAE,MAAM,mCAAmC,CAAA;AAErF,OAAO,EAEL,KAAK,gBAAgB,EACtB,MAAM,wBAAwB,CAAA;AAE/B,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAA;AACpE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uCAAuC,CAAA;AAC7E,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iDAAiD,CAAA;AACnF,OAAO,KAAK,EACV,QAAQ,EACR,iBAAiB,EAClB,MAAM,gCAAgC,CAAA;AACvC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2EAA2E,CAAA;AACnH,OAAO,KAAK,EACV,eAAe,EACf,YAAY,EACb,MAAM,8DAA8D,CAAA;AACrE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uDAAuD,CAAA;AAK5F,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AAS3C,OAAO,KAAK,EAA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AAe,CAAC,UAAU,CAAC;IAC7C,iCAAiC;8BACP,gBAAgB,GAAG,SAAS;IACtD,0BAA0B;gBACd,MAAM;IAClB,iCAAiC;mBAClB,oBAAoB,EAAE;IACrC,2BAA2B;UACrB,MAAM;IACZ,6BAA6B;YACrB,cAAc;IACtB,mBAAmB;iBACN,gBAAgB;IAC7B,oCAAoC;cAC1B,YAAY,EAAE;IACxB,oBAAoB;YACZ,YAAY;IACpB,gCAAgC;YACxB,YAAY,GAAG,IAAI;IAC3B,gCAAgC;oBAChB,cAAc,CAAC,WAAW,CAAC,CAAC,yBAAyB,CAAC;IACtE,mDAAmD;aAC1C,YAAY,EAAE;IACvB,4CAA4C;uBACzB,OAAO;IAC1B,0BAA0B;kBACZ,MAAM,GAAG,IAAI;IAC3B,mEAAmE;kBACrD,MAAM;IACpB,oBAAoB;aACX,SAAS,GAAG,eAAe;IACpC,uBAAuB;eACZ,eAAe;IAC1B,kCAAkC;+BACP,gBAAgB,GAAG,SAAS;IACvD,qDAAqD;0BAC/B,OAAO;IAC7B,+DAA+D;gBACnD,MAAM;IAClB,2CAA2C;cACjC,QAAQ;IAClB,wCAAwC;qBACvB,qBAAqB;IACtC,qBAAqB;aACZ,YAAY,EAAE;IACvB,uBAAuB;mBACR,MAAM,EAAE;IACvB,qCAAqC;wBACjB,MAAM;IAC1B,8CAA8C;iBACjC,kBAAkB;IAC/B,yCAAyC;cAC/B,MAAM;;;kFAsad,CAAC"}
1
+ {"version":3,"file":"OperationBlock.vue.d.ts","sourceRoot":"","sources":["../../../../src/v2/blocks/operation-block/OperationBlock.vue"],"names":[],"mappings":"AAsZA,OAAO,KAAK,EAAE,UAAU,IAAI,cAAc,EAAE,MAAM,mCAAmC,CAAA;AAErF,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,2BAA2B,CAAA;AAC7D,OAAO,EAEL,KAAK,gBAAgB,EACtB,MAAM,wBAAwB,CAAA;AAE/B,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCA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8C;iBACjC,kBAAkB;IAC/B,yCAAyC;cAC/B,MAAM;;;kFA6ad,CAAC"}
@@ -1,24 +1,24 @@
1
- import { defineComponent as b, computed as a, ref as c, onMounted as K, onBeforeUnmount as g, watch as O, createElementBlock as V, openBlock as w, createElementVNode as T, createVNode as l, withCtx as x, unref as B } from "vue";
2
- import { AVAILABLE_CLIENTS as I } from "@scalar/types/snippetz";
3
- import { useToasts as M } from "@scalar/use-toasts";
4
- import A from "../../../components/ViewLayout/ViewLayout.vue.js";
5
- import L from "../../../components/ViewLayout/ViewLayoutContent.vue.js";
6
- import { ERRORS as N } from "../../../libs/errors.js";
7
- import { buildRequest as P } from "./helpers/build-request.js";
8
- import { getSecuritySchemes as H } from "./helpers/build-request-security.js";
9
- import { harToFetchRequest as F } from "./helpers/har-to-fetch-request.js";
10
- import { harToFetchResponse as $ } from "./helpers/har-to-fetch-response.js";
11
- import { sendRequest as j } from "./helpers/send-request.js";
12
- import D from "./components/Header.vue.js";
13
- import { generateClientOptions as Q } from "../operation-code-sample/helpers/generate-client-options.js";
14
- import { getSecurityRequirements as z } from "../../features/operation/helpers/get-security-requirements.js";
15
- import { getSelectedSecurity as G } from "../../features/operation/helpers/get-selected-security.js";
16
- import J from "../request-block/RequestBlock.vue.js";
17
- import W from "../response-block/ResponseBlock.vue.js";
18
- const X = { class: "bg-b-1 flex h-full flex-col" }, Y = { class: "lg:min-h-header flex w-full flex-wrap items-center justify-center p-2 lg:p-0" }, Z = {
1
+ import { defineComponent as K, computed as a, ref as c, onMounted as O, onBeforeUnmount as g, watch as V, createElementBlock as w, openBlock as T, createElementVNode as I, createVNode as l, withCtx as x, unref as B } from "vue";
2
+ import { AVAILABLE_CLIENTS as M } from "@scalar/types/snippetz";
3
+ import { useToasts as A } from "@scalar/use-toasts";
4
+ import L from "../../../components/ViewLayout/ViewLayout.vue.js";
5
+ import N from "../../../components/ViewLayout/ViewLayoutContent.vue.js";
6
+ import { ERRORS as P } from "../../../libs/errors.js";
7
+ import { buildRequest as H } from "./helpers/build-request.js";
8
+ import { getSecuritySchemes as F } from "./helpers/build-request-security.js";
9
+ import { harToFetchRequest as $ } from "./helpers/har-to-fetch-request.js";
10
+ import { harToFetchResponse as j } from "./helpers/har-to-fetch-response.js";
11
+ import { sendRequest as D } from "./helpers/send-request.js";
12
+ import Q from "./components/Header.vue.js";
13
+ import { generateClientOptions as z } from "../operation-code-sample/helpers/generate-client-options.js";
14
+ import { getSecurityRequirements as G } from "../../features/operation/helpers/get-security-requirements.js";
15
+ import { getSelectedSecurity as J } from "../../features/operation/helpers/get-selected-security.js";
16
+ import W from "../request-block/RequestBlock.vue.js";
17
+ import X from "../response-block/ResponseBlock.vue.js";
18
+ const Y = { class: "bg-b-1 flex h-full flex-col" }, Z = { class: "lg:min-h-header flex w-full flex-wrap items-center justify-center p-2 lg:p-0" }, p = {
19
19
  name: "OperationBlock"
20
- }, ye = /* @__PURE__ */ b({
21
- ...Z,
20
+ }, fe = /* @__PURE__ */ K({
21
+ ...p,
22
22
  props: {
23
23
  eventBus: {},
24
24
  documentSecurity: {},
@@ -27,7 +27,7 @@ const X = { class: "bg-b-1 flex h-full flex-col" }, Y = { class: "lg:min-h-heade
27
27
  globalCookies: { default: () => [] },
28
28
  path: {},
29
29
  method: {},
30
- httpClients: { default: () => I },
30
+ httpClients: { default: () => M },
31
31
  history: { default: () => [] },
32
32
  layout: {},
33
33
  server: {},
@@ -51,19 +51,19 @@ const X = { class: "bg-b-1 flex h-full flex-col" }, Y = { class: "lg:min-h-heade
51
51
  },
52
52
  emits: ["update:servers"],
53
53
  setup(e, { emit: q }) {
54
- const R = q, C = a(() => Q(e.httpClients)), d = a(
55
- () => z(e.documentSecurity, e.operation.security)
54
+ const R = q, C = a(() => z(e.httpClients)), d = a(
55
+ () => G(e.documentSecurity, e.operation.security)
56
56
  ), h = a(
57
- () => G(
57
+ () => J(
58
58
  e.documentSelectedSecurity,
59
59
  e.operationSelectedSecurity,
60
60
  d.value,
61
61
  e.setOperationSecurity
62
62
  )
63
63
  ), v = a(
64
- () => H(e.securitySchemes, h.value.selectedSchemes)
65
- ), { toast: y } = M(), f = c(null), i = c(null), u = c(null), s = () => f.value?.abort(N.REQUEST_ABORTED), m = async () => {
66
- const [t, n] = P({
64
+ () => F(e.securitySchemes, h.value.selectedSchemes)
65
+ ), { toast: y } = A(), f = c(null), i = c(null), u = c(null), s = () => f.value?.abort(P.REQUEST_ABORTED), m = async () => {
66
+ const [t, n] = H({
67
67
  environment: e.environment,
68
68
  exampleKey: e.exampleKey,
69
69
  globalCookies: e.globalCookies,
@@ -85,7 +85,7 @@ const X = { class: "bg-b-1 flex h-full flex-col" }, Y = { class: "lg:min-h-heade
85
85
  exampleKey: e.exampleKey
86
86
  }
87
87
  });
88
- const [o, r] = await j({
88
+ const [o, r] = await D({
89
89
  isUsingProxy: n.isUsingProxy,
90
90
  operation: e.operation,
91
91
  plugins: e.plugins,
@@ -109,7 +109,7 @@ const X = { class: "bg-b-1 flex h-full flex-col" }, Y = { class: "lg:min-h-heade
109
109
  }
110
110
  i.value = r.response, u.value = r.request;
111
111
  };
112
- K(() => {
112
+ O(() => {
113
113
  e.eventBus.on("operation:send:request:hotkey", m), e.eventBus.on("operation:cancel:request", s);
114
114
  }), g(() => {
115
115
  e.eventBus.off("operation:send:request:hotkey", m), e.eventBus.off("operation:cancel:request", s);
@@ -125,19 +125,24 @@ const X = { class: "bg-b-1 flex h-full flex-col" }, Y = { class: "lg:min-h-heade
125
125
  const n = (e.history.length ?? 0) - t - 1, o = e.history[n];
126
126
  if (!o)
127
127
  return;
128
- const r = () => e.eventBus.emit("ui:route:example", {
128
+ const r = () => e.eventBus.emit("ui:navigate", {
129
+ page: "example",
130
+ method: e.method,
131
+ path: e.path,
129
132
  exampleName: "draft",
130
- callback: async () => {
131
- const E = $({
133
+ callback: (E) => {
134
+ if (E !== "success")
135
+ return;
136
+ const U = j({
132
137
  harResponse: o.response,
133
138
  url: o.request.url,
134
139
  method: e.method,
135
140
  path: e.path,
136
141
  duration: o.time
137
- }), U = F({
142
+ }), b = $({
138
143
  harRequest: o.request
139
144
  });
140
- i.value = E, u.value = U;
145
+ i.value = U, u.value = b;
141
146
  }
142
147
  });
143
148
  e.eventBus.emit("operation:reload:history", {
@@ -149,13 +154,13 @@ const X = { class: "bg-b-1 flex h-full flex-col" }, Y = { class: "lg:min-h-heade
149
154
  callback: r
150
155
  });
151
156
  };
152
- return O([() => e.path, () => e.method, () => e.exampleKey], () => {
157
+ return V([() => e.path, () => e.method, () => e.exampleKey], () => {
153
158
  i.value = null, u.value = null, s();
154
159
  }), g(() => {
155
160
  s();
156
- }), (t, n) => (w(), V("div", X, [
157
- T("div", Y, [
158
- l(D, {
161
+ }), (t, n) => (T(), w("div", Y, [
162
+ I("div", Z, [
163
+ l(Q, {
159
164
  activeEnvironment: e.activeEnvironment,
160
165
  documentUrl: e.documentUrl,
161
166
  environment: e.environment,
@@ -175,11 +180,11 @@ const X = { class: "bg-b-1 flex h-full flex-col" }, Y = { class: "lg:min-h-heade
175
180
  "onUpdate:servers": n[0] || (n[0] = (o) => R("update:servers"))
176
181
  }, null, 8, ["activeEnvironment", "documentUrl", "environment", "environments", "eventBus", "hideClientButton", "history", "integration", "layout", "method", "path", "server", "servers", "source"])
177
182
  ]),
178
- l(A, { class: "border-t" }, {
183
+ l(L, { class: "border-t" }, {
179
184
  default: x(() => [
180
- l(L, { class: "flex-1" }, {
185
+ l(N, { class: "flex-1" }, {
181
186
  default: x(() => [
182
- l(B(J), {
187
+ l(B(W), {
183
188
  authMeta: e.authMeta,
184
189
  clientOptions: C.value,
185
190
  environment: e.environment,
@@ -199,7 +204,7 @@ const X = { class: "bg-b-1 flex h-full flex-col" }, Y = { class: "lg:min-h-heade
199
204
  selectedSecuritySchemes: v.value,
200
205
  server: e.server
201
206
  }, null, 8, ["authMeta", "clientOptions", "environment", "eventBus", "exampleKey", "globalCookies", "layout", "method", "operation", "path", "plugins", "proxyUrl", "securityRequirements", "securitySchemes", "selectedClient", "selectedSecurity", "selectedSecuritySchemes", "server"]),
202
- l(B(W), {
207
+ l(B(X), {
203
208
  appVersion: e.appVersion,
204
209
  eventBus: e.eventBus,
205
210
  layout: e.layout,
@@ -218,5 +223,5 @@ const X = { class: "bg-b-1 flex h-full flex-col" }, Y = { class: "lg:min-h-heade
218
223
  }
219
224
  });
220
225
  export {
221
- ye as default
226
+ fe as default
222
227
  };
@@ -1,7 +1,7 @@
1
1
  import o from "./Header.vue2.js";
2
2
  /* empty css */
3
3
  import r from "../../../../_virtual/_plugin-vue_export-helper.js";
4
- const d = /* @__PURE__ */ r(o, [["__scopeId", "data-v-1de95fda"]]);
4
+ const m = /* @__PURE__ */ r(o, [["__scopeId", "data-v-7b4b0249"]]);
5
5
  export {
6
- d as default
6
+ m as default
7
7
  };
@@ -1,4 +1,4 @@
1
- import { defineComponent as g, createElementBlock as s, openBlock as o, createElementVNode as i, createVNode as u, unref as l, createBlock as a, createCommentVNode as m } from "vue";
1
+ import { defineComponent as g, createElementBlock as s, openBlock as o, createElementVNode as i, createVNode as a, unref as l, createBlock as v, createCommentVNode as m } from "vue";
2
2
  import { ScalarIcon as d } from "@scalar/components";
3
3
  import x from "../../scalar-address-bar-block/components/EnvironmentSelector.vue.js";
4
4
  import B from "../../scalar-address-bar-block/components/AddressBar.vue.js";
@@ -23,16 +23,16 @@ const b = { class: "lg:min-h-header t-app__top-container flex w-full flex-wrap i
23
23
  },
24
24
  emits: ["execute", "update:servers", "select:history:item", "add:environment"],
25
25
  setup(e, { emit: c }) {
26
- const r = c, f = (v) => {
27
- e.eventBus.emit("workspace:update:active-environment", v);
26
+ const r = c, f = (u) => {
27
+ e.eventBus.emit("workspace:update:active-environment", u);
28
28
  }, y = () => {
29
- e.eventBus.emit("ui:route:page", { name: "workspace.environment" });
29
+ e.eventBus.emit("ui:navigate", { page: "workspace", path: "environment" });
30
30
  };
31
- return (v, t) => (o(), s("div", b, [
31
+ return (u, t) => (o(), s("div", b, [
32
32
  t[8] || (t[8] = i("div", { class: "mb-2 flex w-1/2 flex-row items-center gap-1 lg:mb-0 lg:flex-1 lg:px-1" }, [
33
33
  i("div", { class: "size-8" })
34
34
  ], -1)),
35
- u(l(B), {
35
+ a(l(B), {
36
36
  activeEnvironment: e.activeEnvironment,
37
37
  environment: e.environment,
38
38
  environments: e.environments,
@@ -49,14 +49,14 @@ const b = { class: "lg:min-h-header t-app__top-container flex w-full flex-wrap i
49
49
  "onUpdate:servers": t[3] || (t[3] = (n) => r("update:servers"))
50
50
  }, null, 8, ["activeEnvironment", "environment", "environments", "eventBus", "history", "layout", "method", "path", "server", "servers"]),
51
51
  i("div", C, [
52
- e.layout !== "modal" ? (o(), a(x, {
52
+ e.layout !== "modal" ? (o(), v(x, {
53
53
  key: 0,
54
54
  activeEnvironment: e.activeEnvironment,
55
55
  environments: e.environments,
56
56
  "onAdd:environment": y,
57
57
  "onSelect:environment": f
58
58
  }, null, 8, ["activeEnvironment", "environments"])) : m("", !0),
59
- e.layout === "modal" && e.documentUrl && !e.hideClientButton ? (o(), a(l(k), {
59
+ e.layout === "modal" && e.documentUrl && !e.hideClientButton ? (o(), v(l(k), {
60
60
  key: 1,
61
61
  buttonSource: "modal",
62
62
  class: "!w-fit lg:-mr-1",
@@ -70,7 +70,7 @@ const b = { class: "lg:min-h-header t-app__top-container flex w-full flex-wrap i
70
70
  type: "button",
71
71
  onClick: t[4] || (t[4] = (n) => e.eventBus.emit("ui:close:client-modal"))
72
72
  }, [
73
- u(l(d), {
73
+ a(l(d), {
74
74
  icon: "Close",
75
75
  size: "lg",
76
76
  thickness: "2"
@@ -83,7 +83,7 @@ const b = { class: "lg:min-h-header t-app__top-container flex w-full flex-wrap i
83
83
  type: "button",
84
84
  onClick: t[5] || (t[5] = (n) => e.eventBus.emit("ui:close:client-modal"))
85
85
  }, [
86
- u(l(d), {
86
+ a(l(d), {
87
87
  icon: "Close",
88
88
  size: "md",
89
89
  thickness: "1.75"
@@ -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 type { HttpMethod } from '@scalar/helpers/http/http-methods';
2
+ import { type ClientPlugin } from '@scalar/oas-utils/helpers';
2
3
  import type { OperationObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document';
3
4
  import { type ErrorResponse } from '../../../../libs/errors.js';
4
- import { type ClientPlugin } from '../../../../v2/helpers/plugins.js';
5
5
  /** A single set of populated values for a sent request */
6
6
  export type ResponseInstance = Omit<Response, 'headers'> & {
7
7
  /** Store headers as an object to match what we had with axios */
@@ -1 +1 @@
1
- {"version":3,"file":"send-request.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/operation-block/helpers/send-request.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mCAAmC,CAAA;AAEnE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,8DAA8D,CAAA;AAEnG,OAAO,EAAU,KAAK,aAAa,EAAkB,MAAM,eAAe,CAAA;AAE1E,OAAO,EAAE,KAAK,YAAY,EAAe,MAAM,sBAAsB,CAAA;AAKrE,0DAA0D;AAC1D,MAAM,MAAM,gBAAgB,GAAG,IAAI,CAAC,QAAQ,EAAE,SAAS,CAAC,GAAG;IACzD,iEAAiE;IACjE,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IAC/B,wCAAwC;IACxC,gBAAgB,EAAE,MAAM,EAAE,CAAA;IAC1B,kCAAkC;IAClC,QAAQ,EAAE,MAAM,CAAA;IAChB,0BAA0B;IAC1B,MAAM,EAAE,MAAM,CAAA;IACd,+BAA+B;IAC/B,UAAU,EAAE,MAAM,CAAA;IAClB,0BAA0B;IAC1B,MAAM,EAAE,UAAU,CAAA;IAClB,uBAAuB;IACvB,IAAI,EAAE,MAAM,CAAA;CACb,GAAG,CACE;IACE,wBAAwB;IACxB,IAAI,EAAE,MAAM,GAAG,IAAI,CAAA;IACnB,iCAAiC;IACjC,IAAI,EAAE,MAAM,CAAA;CACb,GACD;IACE,qDAAqD;IACrD,MAAM,EAAE,2BAA2B,CAAC,UAAU,CAAC,CAAA;CAChD,CACJ,CAAA;AAKH;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,WAAW,GAAU,gDAK/B;IACD,YAAY,EAAE,OAAO,CAAA;IACrB,SAAS,EAAE,eAAe,CAAA;IAC1B,OAAO,EAAE,YAAY,EAAE,CAAA;IACvB,OAAO,EAAE,OAAO,CAAA;CACjB,KAAG,OAAO,CACT,aAAa,CAAC;IACZ,QAAQ,EAAE,gBAAgB,CAAA;IAC1B,OAAO,EAAE,OAAO,CAAA;IAChB,SAAS,EAAE,MAAM,CAAA;IACjB,gBAAgB,EAAE,QAAQ,CAAA;CAC3B,CAAC,CA0DH,CAAA"}
1
+ {"version":3,"file":"send-request.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/operation-block/helpers/send-request.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mCAAmC,CAAA;AAEnE,OAAO,EAAE,KAAK,YAAY,EAAe,MAAM,2BAA2B,CAAA;AAC1E,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,8DAA8D,CAAA;AAEnG,OAAO,EAAU,KAAK,aAAa,EAAkB,MAAM,eAAe,CAAA;AAM1E,0DAA0D;AAC1D,MAAM,MAAM,gBAAgB,GAAG,IAAI,CAAC,QAAQ,EAAE,SAAS,CAAC,GAAG;IACzD,iEAAiE;IACjE,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IAC/B,wCAAwC;IACxC,gBAAgB,EAAE,MAAM,EAAE,CAAA;IAC1B,kCAAkC;IAClC,QAAQ,EAAE,MAAM,CAAA;IAChB,0BAA0B;IAC1B,MAAM,EAAE,MAAM,CAAA;IACd,+BAA+B;IAC/B,UAAU,EAAE,MAAM,CAAA;IAClB,0BAA0B;IAC1B,MAAM,EAAE,UAAU,CAAA;IAClB,uBAAuB;IACvB,IAAI,EAAE,MAAM,CAAA;CACb,GAAG,CACE;IACE,wBAAwB;IACxB,IAAI,EAAE,MAAM,GAAG,IAAI,CAAA;IACnB,iCAAiC;IACjC,IAAI,EAAE,MAAM,CAAA;CACb,GACD;IACE,qDAAqD;IACrD,MAAM,EAAE,2BAA2B,CAAC,UAAU,CAAC,CAAA;CAChD,CACJ,CAAA;AAKH;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,WAAW,GAAU,gDAK/B;IACD,YAAY,EAAE,OAAO,CAAA;IACrB,SAAS,EAAE,eAAe,CAAA;IAC1B,OAAO,EAAE,YAAY,EAAE,CAAA;IACvB,OAAO,EAAE,OAAO,CAAA;CACjB,KAAG,OAAO,CACT,aAAa,CAAC;IACZ,QAAQ,EAAE,gBAAgB,CAAA;IAC1B,OAAO,EAAE,OAAO,CAAA;IAChB,SAAS,EAAE,MAAM,CAAA;IACjB,gBAAgB,EAAE,QAAQ,CAAA;CAC3B,CAAC,CA0DH,CAAA"}
@@ -1,7 +1,7 @@
1
1
  import { httpStatusCodes as S } from "@scalar/helpers/http/http-status-codes";
2
+ import { executeHook as f } from "@scalar/oas-utils/helpers";
2
3
  import { normalizeError as b, ERRORS as q } from "../../../../libs/errors.js";
3
4
  import { normalizeHeaders as x } from "../../../../libs/normalize-headers.js";
4
- import { executeHook as f } from "../../../helpers/plugins.js";
5
5
  import { decodeBuffer as D } from "./decode-buffer.js";
6
6
  import { getCookieHeaderKeys as T } from "./get-cookie-header-keys.js";
7
7
  const E = [204, 205, 304], v = async ({
@@ -1,4 +1,5 @@
1
1
  import type { HttpMethod } from '@scalar/helpers/http/http-methods';
2
+ import type { ClientPlugin } from '@scalar/oas-utils/helpers';
2
3
  import type { WorkspaceStore } from '@scalar/workspace-store/client';
3
4
  import type { SelectedSecurity } from '@scalar/workspace-store/entities/auth';
4
5
  import type { AuthMeta, WorkspaceEventBus } from '@scalar/workspace-store/events';
@@ -9,7 +10,6 @@ import type { ClientLayout } from '../../../hooks/index.js';
9
10
  import type { ClientOptionGroup } from '../../../v2/blocks/operation-code-sample/index.js';
10
11
  import { type MergedSecuritySchemes } from '../../../v2/blocks/scalar-auth-selector-block/index.js';
11
12
  import type { SecuritySchemeObjectSecret } from '../../../v2/blocks/scalar-auth-selector-block/helpers/secret-types';
12
- import type { ClientPlugin } from '../../../v2/helpers/plugins.js';
13
13
  export type ExtendedScalarCookie = XScalarCookie & {
14
14
  location: 'document' | 'workspace';
15
15
  };
@@ -1 +1 @@
1
- {"version":3,"file":"RequestBlock.vue.d.ts","sourceRoot":"","sources":["../../../../src/v2/blocks/request-block/RequestBlock.vue"],"names":[],"mappings":"AA2iBA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mCAAmC,CAAA;AAEnE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAA;AACpE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uCAAuC,CAAA;AAC7E,OAAO,KAAK,EAEV,QAAQ,EACR,iBAAiB,EAClB,MAAM,gCAAgC,CAAA;AAGvC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2EAA2E,CAAA;AACnH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qEAAqE,CAAA;AACxG,OAAO,KAAK,EACV,eAAe,EACf,eAAe,EACf,YAAY,EACb,MAAM,8DAA8D,CAAA;AAKrE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AAI3C,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAA;AAU1E,OAAO,EAEL,KAAK,qBAAqB,EAC3B,MAAM,wCAAwC,CAAA;AAC/C,OAAO,KAA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AC,yBAAyB,CAAC,CAAA;IACtE,gBAAgB,EAAE,gBAAgB,CAAA;IAClC,uBAAuB,EAAE,0BAA0B,EAAE,CAAA;IACrD,MAAM,EAAE,YAAY,GAAG,IAAI,CAAA;CAC5B,CAAC;AAorBF,QAAA,MAAM,YAAY,kSAEhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
@@ -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-fe19bfef"]]);
4
+ const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-b1bbc64b"]]);
5
5
  export {
6
6
  m as default
7
7
  };