@scalar/api-client 2.18.4 → 2.19.0

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 (223) hide show
  1. package/CHANGELOG.md +37 -0
  2. package/dist/components/AddressBar/AddressBar.vue2.js +5 -5
  3. package/dist/components/CommandPalette/CommandPaletteImport.vue.js +6 -6
  4. package/dist/components/ImportCollection/DropEventListener.vue.d.ts.map +1 -1
  5. package/dist/components/ImportCollection/DropEventListener.vue.js +26 -28
  6. package/dist/components/ImportCollection/utils/get-openapi-version.d.ts.map +1 -1
  7. package/dist/components/ImportCollection/utils/import-collection.d.ts +1 -1
  8. package/dist/components/ImportCollection/utils/import-collection.d.ts.map +1 -1
  9. package/dist/components/Search/useSearch.d.ts.map +1 -1
  10. package/dist/components/Search/useSearch.js +16 -16
  11. package/dist/components/Server/index.d.ts +1 -1
  12. package/dist/components/Server/index.d.ts.map +1 -1
  13. package/dist/components/Server/index.js +6 -6
  14. package/dist/components/SideNav/SideNav.vue.js +3 -3
  15. package/dist/components/Sidebar/index.d.ts +1 -2
  16. package/dist/components/Sidebar/index.d.ts.map +1 -1
  17. package/dist/components/index.d.ts +2 -2
  18. package/dist/components/index.d.ts.map +1 -1
  19. package/dist/hooks/index.d.ts +2 -2
  20. package/dist/hooks/index.d.ts.map +1 -1
  21. package/dist/hooks/useResponseBody.d.ts +1 -1
  22. package/dist/hooks/useResponseBody.d.ts.map +1 -1
  23. package/dist/hooks/useResponseBody.js +4 -4
  24. package/dist/hooks/useSidebar.d.ts +1 -1
  25. package/dist/hooks/useSidebar.d.ts.map +1 -1
  26. package/dist/index.d.ts +2 -2
  27. package/dist/index.d.ts.map +1 -1
  28. package/dist/layouts/App/ApiClientApp.vue.js +5 -5
  29. package/dist/layouts/App/MainLayout.vue.js +4 -4
  30. package/dist/layouts/App/create-api-client-app.d.ts +12 -12
  31. package/dist/layouts/App/index.d.ts +1 -1
  32. package/dist/layouts/App/index.d.ts.map +1 -1
  33. package/dist/layouts/Web/ApiClientWeb.vue.js +6 -6
  34. package/dist/layouts/Web/create-api-client-web.d.ts +12 -12
  35. package/dist/layouts/Web/index.d.ts +1 -1
  36. package/dist/layouts/Web/index.d.ts.map +1 -1
  37. package/dist/libs/create-client.d.ts +12 -12
  38. package/dist/libs/get-request-uid-by-path-method.d.ts +1 -1
  39. package/dist/libs/get-request-uid-by-path-method.d.ts.map +1 -1
  40. package/dist/libs/hot-keys.d.ts +2 -2
  41. package/dist/libs/hot-keys.d.ts.map +1 -1
  42. package/dist/libs/importers/curl.d.ts.map +1 -1
  43. package/dist/libs/index.d.ts +14 -15
  44. package/dist/libs/index.d.ts.map +1 -1
  45. package/dist/libs/index.js +33 -33
  46. package/dist/libs/parse-curl.js +4 -4
  47. package/dist/libs/send-request/create-fetch-body.d.ts +1 -1
  48. package/dist/libs/send-request/create-fetch-body.d.ts.map +1 -1
  49. package/dist/libs/send-request/create-fetch-body.js +1 -1
  50. package/dist/libs/send-request/create-fetch-headers.d.ts.map +1 -1
  51. package/dist/libs/send-request/create-fetch-query-params.d.ts.map +1 -1
  52. package/dist/libs/send-request/create-fetch-query-params.js +2 -1
  53. package/dist/libs/send-request/index.d.ts +1 -1
  54. package/dist/libs/send-request/index.d.ts.map +1 -1
  55. package/dist/libs/send-request/index.js +4 -4
  56. package/dist/libs/send-request/set-request-cookies.d.ts.map +1 -1
  57. package/dist/libs/send-request/set-request-cookies.js +4 -4
  58. package/dist/store/active-entities.d.ts +1 -1
  59. package/dist/store/collections.d.ts +1 -1
  60. package/dist/store/collections.d.ts.map +1 -1
  61. package/dist/store/collections.js +4 -4
  62. package/dist/store/environment.d.ts +1 -1
  63. package/dist/store/environment.d.ts.map +1 -1
  64. package/dist/store/environment.js +4 -4
  65. package/dist/store/import-spec.d.ts +2 -2
  66. package/dist/store/import-spec.d.ts.map +1 -1
  67. package/dist/store/index.d.ts +1 -1
  68. package/dist/store/index.d.ts.map +1 -1
  69. package/dist/store/request-example.d.ts +1 -1
  70. package/dist/store/request-example.d.ts.map +1 -1
  71. package/dist/store/request-example.js +6 -6
  72. package/dist/store/requests.d.ts +1 -1
  73. package/dist/store/requests.d.ts.map +1 -1
  74. package/dist/store/requests.js +8 -8
  75. package/dist/store/security-schemes.d.ts +1 -1
  76. package/dist/store/security-schemes.d.ts.map +1 -1
  77. package/dist/store/security-schemes.js +4 -4
  78. package/dist/store/servers.d.ts +1 -1
  79. package/dist/store/servers.d.ts.map +1 -1
  80. package/dist/store/servers.js +4 -4
  81. package/dist/store/store.d.ts +12 -12
  82. package/dist/store/tags.d.ts +1 -1
  83. package/dist/store/tags.d.ts.map +1 -1
  84. package/dist/store/tags.js +5 -5
  85. package/dist/store/workspace.d.ts +13 -13
  86. package/dist/store/workspace.d.ts.map +1 -1
  87. package/dist/store/workspace.js +7 -7
  88. package/dist/style.css +1 -1
  89. package/dist/v2/blocks/operation-block/OperationBlock.vue.d.ts +4 -5
  90. package/dist/v2/blocks/operation-block/OperationBlock.vue.d.ts.map +1 -1
  91. package/dist/v2/blocks/operation-block/OperationBlock.vue.js +17 -16
  92. package/dist/v2/blocks/operation-block/helpers/build-request-cookie-header.d.ts +3 -3
  93. package/dist/v2/blocks/operation-block/helpers/build-request-cookie-header.d.ts.map +1 -1
  94. package/dist/v2/blocks/operation-block/helpers/build-request-cookie-header.js +22 -22
  95. package/dist/v2/blocks/operation-block/helpers/build-request-parameters.d.ts.map +1 -1
  96. package/dist/v2/blocks/operation-block/helpers/build-request-parameters.js +14 -13
  97. package/dist/v2/blocks/operation-block/helpers/build-request.d.ts.map +1 -1
  98. package/dist/v2/blocks/operation-block/helpers/build-request.js +43 -41
  99. package/dist/v2/blocks/operation-block/helpers/filter-global-cookies.d.ts +14 -0
  100. package/dist/v2/blocks/operation-block/helpers/filter-global-cookies.d.ts.map +1 -0
  101. package/dist/v2/blocks/operation-block/helpers/filter-global-cookies.js +14 -0
  102. package/dist/v2/blocks/operation-block/helpers/get-resolved-url.d.ts +25 -0
  103. package/dist/v2/blocks/operation-block/helpers/get-resolved-url.d.ts.map +1 -0
  104. package/dist/v2/blocks/operation-block/helpers/get-resolved-url.js +17 -0
  105. package/dist/v2/blocks/operation-code-sample/components/OperationCodeSample.vue.d.ts +10 -0
  106. package/dist/v2/blocks/operation-code-sample/components/OperationCodeSample.vue.d.ts.map +1 -1
  107. package/dist/v2/blocks/operation-code-sample/components/OperationCodeSample.vue.js +1 -1
  108. package/dist/v2/blocks/operation-code-sample/components/OperationCodeSample.vue2.js +29 -25
  109. package/dist/v2/blocks/operation-code-sample/helpers/generate-code-snippet.d.ts +6 -1
  110. package/dist/v2/blocks/operation-code-sample/helpers/generate-code-snippet.d.ts.map +1 -1
  111. package/dist/v2/blocks/operation-code-sample/helpers/generate-code-snippet.js +27 -23
  112. package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/operation-to-har.d.ts +10 -1
  113. package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/operation-to-har.d.ts.map +1 -1
  114. package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/operation-to-har.js +48 -39
  115. package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-parameters.d.ts.map +1 -1
  116. package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-parameters.js +49 -46
  117. package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-server-url.d.ts +1 -1
  118. package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-server-url.d.ts.map +1 -1
  119. package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-server-url.js +1 -1
  120. package/dist/v2/blocks/request-block/RequestBlock.vue.d.ts +6 -2
  121. package/dist/v2/blocks/request-block/RequestBlock.vue.d.ts.map +1 -1
  122. package/dist/v2/blocks/request-block/RequestBlock.vue.js +2 -2
  123. package/dist/v2/blocks/request-block/RequestBlock.vue2.js +200 -115
  124. package/dist/v2/blocks/request-block/components/RequestBody.vue.d.ts +4 -4
  125. package/dist/v2/blocks/request-block/components/RequestCodeSnippet.vue.d.ts.map +1 -1
  126. package/dist/v2/blocks/request-block/components/RequestCodeSnippet.vue.js +21 -17
  127. package/dist/v2/blocks/request-block/components/RequestParams.vue.d.ts +16 -10
  128. package/dist/v2/blocks/request-block/components/RequestParams.vue.d.ts.map +1 -1
  129. package/dist/v2/blocks/request-block/components/RequestParams.vue.js +32 -45
  130. package/dist/v2/blocks/request-block/components/RequestTable.vue.d.ts +16 -13
  131. package/dist/v2/blocks/request-block/components/RequestTable.vue.d.ts.map +1 -1
  132. package/dist/v2/blocks/request-block/components/RequestTable.vue.js +4 -4
  133. package/dist/v2/blocks/request-block/components/RequestTable.vue2.js +32 -33
  134. package/dist/v2/blocks/request-block/components/RequestTableRow.vue.d.ts +33 -18
  135. package/dist/v2/blocks/request-block/components/RequestTableRow.vue.d.ts.map +1 -1
  136. package/dist/v2/blocks/request-block/components/RequestTableRow.vue.js +106 -106
  137. package/dist/v2/blocks/request-block/helpers/create-parameter-handlers.d.ts +10 -5
  138. package/dist/v2/blocks/request-block/helpers/create-parameter-handlers.d.ts.map +1 -1
  139. package/dist/v2/blocks/request-block/helpers/create-parameter-handlers.js +60 -31
  140. package/dist/v2/blocks/request-block/helpers/get-default-headers.d.ts +41 -0
  141. package/dist/v2/blocks/request-block/helpers/get-default-headers.d.ts.map +1 -0
  142. package/dist/v2/blocks/request-block/helpers/get-default-headers.js +25 -0
  143. package/dist/v2/blocks/request-block/helpers/group-by.d.ts +1 -1
  144. package/dist/v2/blocks/request-block/helpers/group-by.d.ts.map +1 -1
  145. package/dist/v2/blocks/request-block/helpers/group-by.js +6 -3
  146. package/dist/v2/blocks/request-block/helpers/is-param-disabled.d.ts +13 -0
  147. package/dist/v2/blocks/request-block/helpers/is-param-disabled.d.ts.map +1 -0
  148. package/dist/v2/blocks/request-block/helpers/is-param-disabled.js +7 -0
  149. package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue.d.ts.map +1 -1
  150. package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue.js +1 -1
  151. package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue2.js +61 -63
  152. package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.d.ts +1 -2
  153. package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.d.ts.map +1 -1
  154. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.d.ts +2 -2
  155. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesInput.vue.d.ts +2 -2
  156. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue.d.ts +1 -2
  157. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue.d.ts.map +1 -1
  158. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.d.ts +2 -2
  159. package/dist/v2/components/code-input/CodeInput.vue.d.ts +2 -0
  160. package/dist/v2/components/code-input/CodeInput.vue.d.ts.map +1 -1
  161. package/dist/v2/components/code-input/CodeInput.vue.js +2 -2
  162. package/dist/v2/components/code-input/CodeInput.vue2.js +57 -51
  163. package/dist/v2/features/app/App.vue.js +6 -6
  164. package/dist/v2/features/app/app-events.d.ts +5 -9
  165. package/dist/v2/features/app/app-events.d.ts.map +1 -1
  166. package/dist/v2/features/app/app-events.js +146 -120
  167. package/dist/v2/features/app/app-state.d.ts.map +1 -1
  168. package/dist/v2/features/app/app-state.js +69 -71
  169. package/dist/v2/features/app/components/AppSidebar.vue.js +1 -1
  170. package/dist/v2/features/app/components/AppSidebar.vue2.js +5 -5
  171. package/dist/v2/features/modal/Modal.vue.d.ts.map +1 -1
  172. package/dist/v2/features/modal/Modal.vue.js +1 -1
  173. package/dist/v2/features/modal/Modal.vue2.js +21 -22
  174. package/dist/v2/features/modal/index.d.ts +1 -1
  175. package/dist/v2/features/modal/index.d.ts.map +1 -1
  176. package/dist/v2/features/modal/index.js +4 -4
  177. package/dist/v2/features/modal/modal-events.d.ts +13 -0
  178. package/dist/v2/features/modal/modal-events.d.ts.map +1 -0
  179. package/dist/v2/features/modal/modal-events.js +31 -0
  180. package/dist/v2/features/operation/Operation.vue.d.ts.map +1 -1
  181. package/dist/v2/features/operation/Operation.vue.js +30 -43
  182. package/dist/v2/workspace-events.d.ts +25 -0
  183. package/dist/v2/workspace-events.d.ts.map +1 -0
  184. package/dist/v2/workspace-events.js +202 -0
  185. package/dist/views/Components/CodeSnippet/helpers/convert-to-har-request.d.ts.map +1 -1
  186. package/dist/views/Components/CodeSnippet/helpers/get-snippet.d.ts +1 -1
  187. package/dist/views/Components/CodeSnippet/helpers/get-snippet.d.ts.map +1 -1
  188. package/dist/views/Cookies/Cookies.vue2.js +3 -3
  189. package/dist/views/Environment/handle-drag.d.ts +1 -1
  190. package/dist/views/Environment/handle-drag.d.ts.map +1 -1
  191. package/dist/views/Request/RequestRoot.vue2.js +9 -9
  192. package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTable.vue2.js +4 -4
  193. package/dist/views/Request/RequestSection/RequestCodeExample.vue2.js +4 -4
  194. package/dist/views/Request/RequestSection/RequestSection.vue2.js +5 -5
  195. package/dist/views/Request/RequestSection/helpers/update-scheme.d.ts.map +1 -1
  196. package/dist/views/Request/RequestSidebar.vue2.js +6 -6
  197. package/dist/views/Request/RequestSidebarItem.vue2.js +6 -6
  198. package/dist/views/Request/RequestSubpageHeader.vue2.js +4 -4
  199. package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +1 -1
  200. package/dist/views/Request/ResponseSection/index.d.ts +1 -1
  201. package/dist/views/Request/ResponseSection/index.d.ts.map +1 -1
  202. package/dist/views/Request/ResponseSection/index.js +4 -4
  203. package/dist/views/Request/consts/index.d.ts +2 -3
  204. package/dist/views/Request/consts/index.d.ts.map +1 -1
  205. package/dist/views/Request/consts/new-auth-options.d.ts +1 -1
  206. package/dist/views/Request/consts/new-auth-options.d.ts.map +1 -1
  207. package/dist/views/Request/handle-drag.d.ts +1 -1
  208. package/dist/views/Request/handle-drag.d.ts.map +1 -1
  209. package/dist/views/Request/hooks/useOpenApiWatcher.d.ts.map +1 -1
  210. package/dist/views/Request/hooks/useOpenApiWatcher.js +14 -14
  211. package/dist/views/Request/libs/auth.d.ts +1 -1
  212. package/dist/views/Request/libs/auth.d.ts.map +1 -1
  213. package/dist/views/Request/libs/index.d.ts +3 -3
  214. package/dist/views/Request/libs/index.d.ts.map +1 -1
  215. package/dist/views/Request/libs/oauth2.js +1 -1
  216. package/dist/views/Request/libs/watch-mode.js +6 -6
  217. package/dist/views/Request/types/index.d.ts +1 -1
  218. package/dist/views/Request/types/index.d.ts.map +1 -1
  219. package/package.json +13 -13
  220. package/dist/v2/features/modal/hooks/use-workspace-client-modal-events.d.ts +0 -18
  221. package/dist/v2/features/modal/hooks/use-workspace-client-modal-events.d.ts.map +0 -1
  222. package/dist/v2/features/modal/hooks/use-workspace-client-modal-events.js +0 -39
  223. package/dist/v2/features/operation/helpers/get-operation-header.js +0 -12
@@ -4,8 +4,8 @@ import { useRouter as w } from "vue-router";
4
4
  import x from "../../components/AddressBar/AddressBar.vue.js";
5
5
  import { useLayout as y } from "../../hooks/useLayout.js";
6
6
  import { useSidebar as h } from "../../hooks/useSidebar.js";
7
- import V from "../../components/OpenApiClientButton.vue.js";
8
- import { useWorkspace as z } from "../../store/store.js";
7
+ import { useWorkspace as V } from "../../store/store.js";
8
+ import z from "../../components/OpenApiClientButton.vue.js";
9
9
  const B = { class: "lg:min-h-header t-app__top-container flex w-full flex-wrap items-center justify-center border-b p-2 pt-2 lg:p-1 lg:pt-1" }, S = { class: "mb-2 flex w-1/2 flex-row items-center gap-1 lg:mb-0 lg:flex-1 lg:px-1" }, $ = { class: "mb-2 flex w-1/2 flex-row items-center justify-end gap-1 lg:mb-0 lg:flex-1 lg:px-2.5" }, O = /* @__PURE__ */ k({
10
10
  __name: "RequestSubpageHeader",
11
11
  props: {
@@ -18,7 +18,7 @@ const B = { class: "lg:min-h-header t-app__top-container flex w-full flex-wrap i
18
18
  },
19
19
  emits: ["hideModal", "importCurl"],
20
20
  setup(t) {
21
- const { hideClientButton: d, showSidebar: p, integration: f } = z(), { isSidebarOpen: b } = h(), { layout: r } = y(), { currentRoute: g } = w();
21
+ const { hideClientButton: d, showSidebar: p, integration: f } = V(), { isSidebarOpen: b } = h(), { layout: r } = y(), { currentRoute: g } = w();
22
22
  return (a, o) => (n(), l("div", B, [
23
23
  i("div", S, [
24
24
  e(p) ? (n(), l("div", {
@@ -36,7 +36,7 @@ const B = { class: "lg:min-h-header t-app__top-container flex w-full flex-wrap i
36
36
  onImportCurl: o[0] || (o[0] = (m) => a.$emit("importCurl", m))
37
37
  }, null, 8, ["collection", "envVariables", "environment", "operation", "server", "workspace"]),
38
38
  i("div", $, [
39
- e(r) === "modal" && t.collection.documentUrl && !e(d) ? (n(), C(e(V), {
39
+ e(r) === "modal" && t.collection.documentUrl && !e(d) ? (n(), C(e(z), {
40
40
  key: 0,
41
41
  buttonSource: "modal",
42
42
  class: "!w-fit lg:-mr-1",
@@ -33,7 +33,7 @@ const W = { class: "flex-center relative flex flex-1 flex-col gap-6 p-2 capitali
33
33
  }));
34
34
  }, f = (u) => {
35
35
  u?.createNew && g.name === "request" && p();
36
- }, v = "2.18.4";
36
+ }, v = "2.19.0";
37
37
  return q(() => a.hotKeys.on(f)), R(() => a.hotKeys.off(f)), (u, e) => (l(), n("div", W, [
38
38
  s("div", {
39
39
  class: y(["flex h-[calc(100%_-_50px)] flex-col items-center justify-center", {
@@ -1,3 +1,3 @@
1
- export { default as ResponseSection } from './ResponseSection.vue.js';
2
1
  export { default as ResponseBody } from './ResponseBody.vue.js';
2
+ export { default as ResponseSection } from './ResponseSection.vue.js';
3
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/ResponseSection/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,uBAAuB,CAAA;AAClE,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,oBAAoB,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/ResponseSection/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,oBAAoB,CAAA;AAC5D,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,uBAAuB,CAAA"}
@@ -1,6 +1,6 @@
1
- import { default as s } from "./ResponseSection.vue.js";
2
- import { default as a } from "./ResponseBody.vue.js";
1
+ import { default as s } from "./ResponseBody.vue.js";
2
+ import { default as a } from "./ResponseSection.vue.js";
3
3
  export {
4
- a as ResponseBody,
5
- s as ResponseSection
4
+ s as ResponseBody,
5
+ a as ResponseSection
6
6
  };
@@ -1,4 +1,3 @@
1
- export * from './mediaTypes.js';
2
- export type * from './mediaTypes.js';
3
- export * from './new-auth-options.js';
1
+ export { type MediaConfig, type MediaPreview, getMediaTypeConfig, isTextMediaType, mediaTypes, textMediaTypes, } from './mediaTypes.js';
2
+ export { ADD_AUTH_DICT, ADD_AUTH_OPTIONS, type SecuritySchemeGroup, type SecuritySchemeOption, } from './new-auth-options.js';
4
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/consts/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAA;AAC5B,mBAAmB,cAAc,CAAA;AACjC,cAAc,oBAAoB,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/consts/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,WAAW,EAChB,KAAK,YAAY,EACjB,kBAAkB,EAClB,eAAe,EACf,UAAU,EACV,cAAc,GACf,MAAM,cAAc,CAAA;AACrB,OAAO,EACL,aAAa,EACb,gBAAgB,EAChB,KAAK,mBAAmB,EACxB,KAAK,oBAAoB,GAC1B,MAAM,oBAAoB,CAAA"}
@@ -1,5 +1,5 @@
1
- import type { SecurityScheme, SecuritySchemePayload } from '@scalar/oas-utils/entities/spec';
2
1
  import type { ScalarComboboxOptionGroup } from '@scalar/components';
2
+ import type { SecurityScheme, SecuritySchemePayload } from '@scalar/oas-utils/entities/spec';
3
3
  export type SecuritySchemeOption = {
4
4
  id: SecurityScheme['uid'];
5
5
  label: string;
@@ -1 +1 @@
1
- {"version":3,"file":"new-auth-options.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/consts/new-auth-options.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,qBAAqB,EAAE,MAAM,iCAAiC,CAAA;AAE5F,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,oBAAoB,CAAA;AAEnE,MAAM,MAAM,oBAAoB,GAAG;IACjC,EAAE,EAAE,cAAc,CAAC,KAAK,CAAC,CAAA;IACzB,KAAK,EAAE,MAAM,CAAA;IACb,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,OAAO,CAAC,EAAE,qBAAqB,CAAA;CAChC,CAAA;AAED,MAAM,MAAM,mBAAmB,GAAG,yBAAyB,CAAC,oBAAoB,CAAC,CAAA;AAEjF;;;;GAIG;AACH,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyFhB,CAAA;AAIV,+CAA+C;AAC/C,eAAO,MAAM,gBAAgB,EAAE,oBAAoB,EAOlD,CAAA"}
1
+ {"version":3,"file":"new-auth-options.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/consts/new-auth-options.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,oBAAoB,CAAA;AACnE,OAAO,KAAK,EAAE,cAAc,EAAE,qBAAqB,EAAE,MAAM,iCAAiC,CAAA;AAG5F,MAAM,MAAM,oBAAoB,GAAG;IACjC,EAAE,EAAE,cAAc,CAAC,KAAK,CAAC,CAAA;IACzB,KAAK,EAAE,MAAM,CAAA;IACb,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,OAAO,CAAC,EAAE,qBAAqB,CAAA;CAChC,CAAA;AAED,MAAM,MAAM,mBAAmB,GAAG,yBAAyB,CAAC,oBAAoB,CAAC,CAAA;AAEjF;;;;GAIG;AACH,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyFhB,CAAA;AAIV,+CAA+C;AAC/C,eAAO,MAAM,gBAAgB,EAAE,oBAAoB,EAOlD,CAAA"}
@@ -1,6 +1,6 @@
1
+ import type { DraggingItem, HoveredItem } from '@scalar/draggable';
1
2
  import type { WorkspaceStore } from '../../store/index.js';
2
3
  import type { ActiveEntitiesStore } from '../../store/active-entities.js';
3
- import type { DraggingItem, HoveredItem } from '@scalar/draggable';
4
4
  /** Create DnD handlers */
5
5
  export declare function dragHandlerFactory(activeWorkspace: ActiveEntitiesStore['activeWorkspace'], { collections, collectionMutators, tags, tagMutators, workspaceMutators }: WorkspaceStore): {
6
6
  handleDragEnd: (draggingItem: DraggingItem, hoveredItem: HoveredItem) => void;
@@ -1 +1 @@
1
- {"version":3,"file":"handle-drag.d.ts","sourceRoot":"","sources":["../../../src/views/Request/handle-drag.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AAC7C,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAA;AAClE,OAAO,KAAK,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAA;AAGlE,0BAA0B;AAC1B,wBAAgB,kBAAkB,CAChC,eAAe,EAAE,mBAAmB,CAAC,iBAAiB,CAAC,EACvD,EAAE,WAAW,EAAE,kBAAkB,EAAE,IAAI,EAAE,WAAW,EAAE,iBAAiB,EAAE,EAAE,cAAc;kCAcpD,YAAY,eAAe,WAAW;gCAiExC,YAAY,eAAe,WAAW;EAqB1E"}
1
+ {"version":3,"file":"handle-drag.d.ts","sourceRoot":"","sources":["../../../src/views/Request/handle-drag.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAA;AAIlE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AAC7C,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAA;AAElE,0BAA0B;AAC1B,wBAAgB,kBAAkB,CAChC,eAAe,EAAE,mBAAmB,CAAC,iBAAiB,CAAC,EACvD,EAAE,WAAW,EAAE,kBAAkB,EAAE,IAAI,EAAE,WAAW,EAAE,iBAAiB,EAAE,EAAE,cAAc;kCAcpD,YAAY,eAAe,WAAW;gCAiExC,YAAY,eAAe,WAAW;EAqB1E"}
@@ -1 +1 @@
1
- {"version":3,"file":"useOpenApiWatcher.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/hooks/useOpenApiWatcher.ts"],"names":[],"mappings":"AAwBA;;;;;;GAMG;AACH,eAAO,MAAM,iBAAiB,YAgI7B,CAAA"}
1
+ {"version":3,"file":"useOpenApiWatcher.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/hooks/useOpenApiWatcher.ts"],"names":[],"mappings":"AAyBA;;;;;;GAMG;AACH,eAAO,MAAM,iBAAiB,YAgI7B,CAAA"}
@@ -1,26 +1,26 @@
1
- import { useActiveEntities as A } from "../../../store/active-entities.js";
2
- import { specDictionary as f } from "../../../store/import-spec.js";
3
- import { combineRenameDiffs as y, mutateCollectionDiff as E, mutateSecuritySchemeDiff as D, mutateServerDiff as R, mutateTagDiff as g, mutateRequestDiff as S } from "../libs/watch-mode.js";
4
- import { fetchDocument as T, createHash as M } from "@scalar/oas-utils/helpers";
1
+ import { fetchDocument as A, createHash as y } from "@scalar/oas-utils/helpers";
5
2
  import { parseSchema as l } from "@scalar/oas-utils/transforms";
6
- import { useToasts as I } from "@scalar/use-toasts";
7
- import { useTimeoutPoll as C } from "@vueuse/core";
8
- import L from "microdiff";
9
- import { watch as N } from "vue";
3
+ import { useToasts as E } from "@scalar/use-toasts";
4
+ import { useTimeoutPoll as D } from "@vueuse/core";
5
+ import R from "microdiff";
6
+ import { watch as g } from "vue";
7
+ import { useActiveEntities as S } from "../../../store/active-entities.js";
8
+ import { specDictionary as f } from "../../../store/import-spec.js";
9
+ import { combineRenameDiffs as T, mutateCollectionDiff as M, mutateSecuritySchemeDiff as I, mutateServerDiff as C, mutateTagDiff as L, mutateRequestDiff as N } from "../libs/watch-mode.js";
10
10
  import { useWorkspace as U } from "../../../store/store.js";
11
11
  const b = 5 * 1e3, P = 60 * 1e3, B = () => {
12
- const { toast: h } = I(), c = A(), o = U(), { activeCollection: s, activeWorkspace: v } = c, { collectionMutators: n } = o, i = (e) => h(`[useOpenApiWatcher] Changes to the ${e} were not applied`, "error"), O = (e) => {
13
- e.path[0] === "info" || e.path[0] === "security" ? E(e, c, o) || i("collection") : e.path[0] === "components" && e.path[1] === "securitySchemes" ? D(e, c, o) || i("securitySchemes") : e.path[0] === "servers" ? R(e, c, o) || i("servers") : e.path[0] === "tags" ? g(e, c, o) || i("tags") : e.path[0] === "paths" && (S(e, c, o) || i("requests"));
14
- }, { pause: p, resume: m } = C(async () => {
12
+ const { toast: h } = E(), c = S(), o = U(), { activeCollection: s, activeWorkspace: v } = c, { collectionMutators: n } = o, i = (e) => h(`[useOpenApiWatcher] Changes to the ${e} were not applied`, "error"), O = (e) => {
13
+ e.path[0] === "info" || e.path[0] === "security" ? M(e, c, o) || i("collection") : e.path[0] === "components" && e.path[1] === "securitySchemes" ? I(e, c, o) || i("securitySchemes") : e.path[0] === "servers" ? C(e, c, o) || i("servers") : e.path[0] === "tags" ? L(e, c, o) || i("tags") : e.path[0] === "paths" && (N(e, c, o) || i("requests"));
14
+ }, { pause: p, resume: m } = D(async () => {
15
15
  const e = s.value?.documentUrl;
16
16
  if (!e)
17
17
  return;
18
18
  const t = f[e];
19
19
  try {
20
- const a = await T(e, v.value?.proxyUrl, void 0, !1), u = M(a);
20
+ const a = await A(e, v.value?.proxyUrl, void 0, !1), u = y(a);
21
21
  if (n.edit(s.value.uid, "watchModeStatus", "WATCHING"), t?.hash)
22
22
  if (t.hash && t.hash !== u) {
23
- const { schema: r } = await l(a), W = L(t.schema, r), d = y(W);
23
+ const { schema: r } = await l(a), W = R(t.schema, r), d = T(W);
24
24
  try {
25
25
  d.forEach(O), f[e] = {
26
26
  hash: u,
@@ -44,7 +44,7 @@ const b = 5 * 1e3, P = 60 * 1e3, B = () => {
44
44
  }, P);
45
45
  }
46
46
  }, b);
47
- N(
47
+ g(
48
48
  [() => s.value?.documentUrl, () => s.value?.watchMode],
49
49
  ([e, t]) => {
50
50
  e && t ? (console.info(`[useOpenApiWatcher] Watching ${e} …`), m()) : s.value && (p(), n.edit(s.value.uid, "watchModeStatus", "IDLE"));
@@ -1,5 +1,5 @@
1
- import { type SecuritySchemeGroup, type SecuritySchemeOption } from '../../../views/Request/consts/index.js';
2
1
  import type { Collection, Operation, SecurityScheme } from '@scalar/oas-utils/entities/spec';
2
+ import { type SecuritySchemeGroup, type SecuritySchemeOption } from '../../../views/Request/consts/index.js';
3
3
  type DisplayScheme = {
4
4
  type: SecurityScheme['type'] | 'complex';
5
5
  nameKey: SecurityScheme['nameKey'];
@@ -1 +1 @@
1
- {"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/libs/auth.ts"],"names":[],"mappings":"AAAA,OAAO,EAAoB,KAAK,mBAAmB,EAAE,KAAK,oBAAoB,EAAE,MAAM,wBAAwB,CAAA;AAC9G,OAAO,KAAK,EAAE,UAAU,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAA;AAG5F,KAAK,aAAa,GAAG;IACnB,IAAI,EAAE,cAAc,CAAC,MAAM,CAAC,GAAG,SAAS,CAAA;IACxC,OAAO,EAAE,cAAc,CAAC,SAAS,CAAC,CAAA;IAClC,GAAG,EAAE,cAAc,CAAC,KAAK,CAAC,CAAA;CAC3B,CAAA;AAED,mDAAmD;AACnD,eAAO,MAAM,YAAY,GAAI,GAAG,aAAa;;;CAG3C,CAAA;AAEF,uCAAuC;AACvC,eAAO,MAAM,mBAAmB,GAAI,MAAM,MAAM,EAAE,EAAE,iBAAiB,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC;;;CAa/F,CAAA;AAEH,qEAAqE;AACrE,eAAO,MAAM,uBAAuB,GAAI,YAAY,SAAS,EAAE,aAAa,UAAU,+BASrF,CAAA;AAED;;;;GAIG;AACH,eAAO,MAAM,gBAAgB,GAC3B,sBAAsB,UAAU,CAAC,UAAU,CAAC,EAC5C,sBAAsB,UAAU,CAAC,iBAAiB,CAAC,EACnD,iBAAiB,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,EAC9C,aAAY,OAAe,KAC1B,oBAAoB,EAAE,GAAG,mBAAmB,EA8D9C,CAAA"}
1
+ {"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/libs/auth.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAA;AAG5F,OAAO,EAAoB,KAAK,mBAAmB,EAAE,KAAK,oBAAoB,EAAE,MAAM,wBAAwB,CAAA;AAE9G,KAAK,aAAa,GAAG;IACnB,IAAI,EAAE,cAAc,CAAC,MAAM,CAAC,GAAG,SAAS,CAAA;IACxC,OAAO,EAAE,cAAc,CAAC,SAAS,CAAC,CAAA;IAClC,GAAG,EAAE,cAAc,CAAC,KAAK,CAAC,CAAA;CAC3B,CAAA;AAED,mDAAmD;AACnD,eAAO,MAAM,YAAY,GAAI,GAAG,aAAa;;;CAG3C,CAAA;AAEF,uCAAuC;AACvC,eAAO,MAAM,mBAAmB,GAAI,MAAM,MAAM,EAAE,EAAE,iBAAiB,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC;;;CAa/F,CAAA;AAEH,qEAAqE;AACrE,eAAO,MAAM,uBAAuB,GAAI,YAAY,SAAS,EAAE,aAAa,UAAU,+BASrF,CAAA;AAED;;;;GAIG;AACH,eAAO,MAAM,gBAAgB,GAC3B,sBAAsB,UAAU,CAAC,UAAU,CAAC,EAC5C,sBAAsB,UAAU,CAAC,iBAAiB,CAAC,EACnD,iBAAiB,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,EAC9C,aAAY,OAAe,KAC1B,oBAAoB,EAAE,GAAG,mBAAmB,EA8D9C,CAAA"}
@@ -1,4 +1,4 @@
1
- export * from './auth.js';
2
- export * from './oauth2.js';
3
- export * from './watch-mode.js';
1
+ export { formatComplexScheme, formatScheme, getSchemeOptions, getSecurityRequirements } from './auth.js';
2
+ export { authorizeOauth2, authorizeServers, generateCodeChallenge } from './oauth2.js';
3
+ export { combineRenameDiffs, findResource, mutateCollectionDiff, mutateRequestDiff, mutateSecuritySchemeDiff, mutateServerDiff, mutateTagDiff, narrowUnionSchema, parseDiff, traverseZodSchema, } from './watch-mode.js';
4
4
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/libs/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAA;AACtB,cAAc,UAAU,CAAA;AACxB,cAAc,cAAc,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/libs/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,YAAY,EAAE,gBAAgB,EAAE,uBAAuB,EAAE,MAAM,QAAQ,CAAA;AACrG,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAA;AACnF,OAAO,EACL,kBAAkB,EAClB,YAAY,EACZ,oBAAoB,EACpB,iBAAiB,EACjB,wBAAwB,EACxB,gBAAgB,EAChB,aAAa,EACb,iBAAiB,EACjB,SAAS,EACT,iBAAiB,GAClB,MAAM,cAAc,CAAA"}
@@ -1,6 +1,6 @@
1
1
  import { makeUrlAbsolute as x } from "@scalar/helpers/url/make-url-absolute";
2
2
  import { shouldUseProxy as U } from "@scalar/oas-utils/helpers";
3
- import { fromUint8Array as S, encode as w } from "js-base64";
3
+ import { encode as w, fromUint8Array as S } from "js-base64";
4
4
  const A = () => {
5
5
  const e = new Uint8Array(32);
6
6
  return crypto.getRandomValues(e), S(e, !0);
@@ -1,5 +1,5 @@
1
- import { collectionSchema as A, requestSchema as O, serverSchema as R, tagSchema as b, securitySchemeSchema as S, createExampleFromRequest as D } from "@scalar/oas-utils/entities/spec";
2
- import { schemaModel as v, isHttpMethod as N } from "@scalar/oas-utils/helpers";
1
+ import { collectionSchema as A, requestSchema as O, serverSchema as R, securitySchemeSchema as b, tagSchema as S, createExampleFromRequest as D } from "@scalar/oas-utils/entities/spec";
2
+ import { isHttpMethod as N, schemaModel as v } from "@scalar/oas-utils/helpers";
3
3
  import { getNestedValue as M } from "@scalar/object-utils/nested";
4
4
  import k from "microdiff";
5
5
  import { z as p } from "zod";
@@ -266,7 +266,7 @@ const x = (e, n = []) => {
266
266
  const r = n.value.tags[u];
267
267
  if (!r)
268
268
  return !1;
269
- const i = t[r], o = m(b, { ...e, path: a });
269
+ const i = t[r], o = m(S, { ...e, path: a });
270
270
  if (!i || !o)
271
271
  return !1;
272
272
  s.edit(r, o.path, o.value);
@@ -279,7 +279,7 @@ const x = (e, n = []) => {
279
279
  return !1;
280
280
  s.delete(i, n.value.uid);
281
281
  } else if (e.type === "CREATE") {
282
- const r = v(e.value, b, !1);
282
+ const r = v(e.value, S, !1);
283
283
  if (!r)
284
284
  return !1;
285
285
  s.add(r, n.value.uid);
@@ -308,7 +308,7 @@ const x = (e, n = []) => {
308
308
  (i) => i.nameKey === u
309
309
  );
310
310
  if (a?.length) {
311
- const i = j(S, "type", r?.type ?? "");
311
+ const i = j(b, "type", r?.type ?? "");
312
312
  if (!i || !r)
313
313
  return !1;
314
314
  const o = m(i, { ...e, path: a });
@@ -320,7 +320,7 @@ const x = (e, n = []) => {
320
320
  if (!r)
321
321
  return !1;
322
322
  s.delete(r.uid);
323
- } else e.type === "CREATE" && s.add(S.parse(e.value), n.value.uid);
323
+ } else e.type === "CREATE" && s.add(b.parse(e.value), n.value.uid);
324
324
  return !0;
325
325
  };
326
326
  export {
@@ -1,2 +1,2 @@
1
- export * from './sidebar-item';
1
+ export type { SidebarItem, SidebarMenuItem } from './sidebar-item';
2
2
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/types/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAA"}
package/package.json CHANGED
@@ -18,7 +18,7 @@
18
18
  "rest",
19
19
  "testing"
20
20
  ],
21
- "version": "2.18.4",
21
+ "version": "2.19.0",
22
22
  "engines": {
23
23
  "node": ">=20"
24
24
  },
@@ -326,26 +326,26 @@
326
326
  "whatwg-mimetype": "^4.0.0",
327
327
  "yaml": "^2.8.0",
328
328
  "zod": "^4.3.5",
329
- "@scalar/helpers": "0.2.8",
330
329
  "@scalar/analytics-client": "1.0.1",
331
- "@scalar/icons": "0.5.2",
330
+ "@scalar/components": "0.16.24",
332
331
  "@scalar/draggable": "0.3.0",
332
+ "@scalar/helpers": "0.2.8",
333
333
  "@scalar/import": "0.4.45",
334
- "@scalar/json-magic": "0.9.1",
335
- "@scalar/oas-utils": "0.6.20",
334
+ "@scalar/json-magic": "0.9.2",
335
+ "@scalar/oas-utils": "0.6.21",
336
+ "@scalar/openapi-parser": "0.24.2",
336
337
  "@scalar/object-utils": "1.2.22",
338
+ "@scalar/icons": "0.5.2",
339
+ "@scalar/postman-to-openapi": "0.4.0",
337
340
  "@scalar/openapi-types": "0.5.3",
338
- "@scalar/openapi-parser": "0.24.1",
339
- "@scalar/postman-to-openapi": "0.3.60",
340
- "@scalar/sidebar": "0.7.13",
341
+ "@scalar/sidebar": "0.7.14",
341
342
  "@scalar/themes": "0.13.26",
342
343
  "@scalar/snippetz": "0.6.5",
343
- "@scalar/use-codemirror": "0.13.17",
344
+ "@scalar/use-codemirror": "0.13.18",
344
345
  "@scalar/types": "0.5.8",
345
346
  "@scalar/use-hooks": "0.3.6",
346
347
  "@scalar/use-toasts": "0.9.1",
347
- "@scalar/components": "0.16.23",
348
- "@scalar/workspace-store": "0.24.10"
348
+ "@scalar/workspace-store": "0.25.0"
349
349
  },
350
350
  "devDependencies": {
351
351
  "@tailwindcss/vite": "^4.1.18",
@@ -360,8 +360,8 @@
360
360
  "vite": "^7.3.1",
361
361
  "vite-svg-loader": "5.1.0",
362
362
  "vitest": "4.0.16",
363
- "@scalar/build-tooling": "0.4.1",
364
- "@scalar/galaxy": "0.5.12"
363
+ "@scalar/galaxy": "0.5.12",
364
+ "@scalar/build-tooling": "0.4.1"
365
365
  },
366
366
  "scripts": {
367
367
  "build": "scalar-build-vite",
@@ -1,18 +0,0 @@
1
- import type { ModalState } from '@scalar/components';
2
- import type { WorkspaceStore } from '@scalar/workspace-store/client';
3
- import type { WorkspaceEventBus } from '@scalar/workspace-store/events';
4
- import type { WorkspaceDocument } from '@scalar/workspace-store/schemas/workspace';
5
- import type { ComputedRef, Ref } from 'vue';
6
- import type { UseModalSidebarReturn } from '../../../../v2/features/modal/hooks/use-modal-sidebar.js';
7
- /**
8
- * Top level event handling for the modal client
9
- */
10
- export declare const useWorkspaceClientModalEvents: ({ eventBus, document, isSidebarOpen, sidebarState, modalState, workspaceStore, }: {
11
- eventBus: WorkspaceEventBus;
12
- document: ComputedRef<WorkspaceDocument | null>;
13
- isSidebarOpen: Ref<boolean>;
14
- sidebarState: UseModalSidebarReturn;
15
- modalState: ModalState;
16
- workspaceStore: WorkspaceStore;
17
- }) => void;
18
- //# sourceMappingURL=use-workspace-client-modal-events.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"use-workspace-client-modal-events.d.ts","sourceRoot":"","sources":["../../../../../src/v2/features/modal/hooks/use-workspace-client-modal-events.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAA;AACpD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAA;AACpE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AAqBvE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,2CAA2C,CAAA;AAClF,OAAO,KAAK,EAAE,WAAW,EAAE,GAAG,EAAE,MAAM,KAAK,CAAA;AAE3C,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,6CAA6C,CAAA;AAExF;;GAEG;AACH,eAAO,MAAM,6BAA6B,GAAI,kFAO3C;IACD,QAAQ,EAAE,iBAAiB,CAAA;IAC3B,QAAQ,EAAE,WAAW,CAAC,iBAAiB,GAAG,IAAI,CAAC,CAAA;IAC/C,aAAa,EAAE,GAAG,CAAC,OAAO,CAAC,CAAA;IAC3B,YAAY,EAAE,qBAAqB,CAAA;IACnC,UAAU,EAAE,UAAU,CAAA;IACtB,cAAc,EAAE,cAAc,CAAA;CAC/B,SAmFA,CAAA"}
@@ -1,39 +0,0 @@
1
- import { deleteSecurityScheme as i, updateSelectedAuthTab as d, updateSecurityScheme as u, updateSelectedScopes as c, updateSelectedSecuritySchemes as h, addServer as n, updateServer as s, deleteServer as v, updateServerVariables as S, updateSelectedServer as m, addOperationParameter as y, updateOperationParameter as q, deleteOperationParameter as x, deleteAllOperationParameters as O, updateOperationRequestBodyContentType as f, updateOperationRequestBodyExample as w, updateOperationRequestBodyFormValue as g, updateSelectedClient as P } from "@scalar/workspace-store/mutators";
2
- const C = ({
3
- eventBus: a,
4
- document: r,
5
- isSidebarOpen: o,
6
- sidebarState: t,
7
- modalState: l,
8
- workspaceStore: p
9
- }) => {
10
- a.on("scroll-to:nav-item", ({ id: e }) => t.handleSelectItem(e)), a.on("auth:delete:security-scheme", (e) => i(r.value, e)), a.on("auth:update:active-index", (e) => d(r.value, e)), a.on("auth:update:security-scheme", (e) => u(r.value, e)), a.on("auth:update:selected-scopes", (e) => c(r.value, e)), a.on(
11
- "auth:update:selected-security-schemes",
12
- async (e) => await h(r.value, e)
13
- ), a.on("server:add:server", () => n(r.value)), a.on("server:update:server", (e) => s(r.value, e)), a.on("server:delete:server", (e) => v(r.value, e)), a.on("server:update:variables", (e) => S(r.value, e)), a.on("server:update:selected", (e) => m(r.value, e)), a.on("operation:add:parameter", (e) => y(r.value, e)), a.on("operation:update:parameter", (e) => q(r.value, e)), a.on("operation:delete:parameter", (e) => x(r.value, e)), a.on("operation:delete-all:parameters", (e) => O(r.value, e)), a.on(
14
- "operation:update:requestBody:contentType",
15
- (e) => f(r.value, e)
16
- ), a.on(
17
- "operation:update:requestBody:value",
18
- (e) => w(r.value, e)
19
- ), a.on(
20
- "operation:update:requestBody:formValue",
21
- (e) => g(r.value, e)
22
- ), a.on("ui:toggle:sidebar", () => o.value = !o.value), a.on("ui:close:client-modal", () => l.hide()), a.on("ui:open:client-modal", (e) => {
23
- if (!e) {
24
- l.show();
25
- return;
26
- }
27
- "id" in e && e.id ? t.handleSelectItem(e.id) : "method" in e && "path" in e && t.handleSelectItem(
28
- t.getEntryByLocation({
29
- document: r.value?.["x-scalar-navigation"]?.id ?? "",
30
- path: e.path,
31
- method: e.method,
32
- example: e.exampleName
33
- })?.id ?? ""
34
- ), l.show();
35
- }), a.on("workspace:update:selected-client", (e) => P(p.workspace, e));
36
- };
37
- export {
38
- C as useWorkspaceClientModalEvents
39
- };
@@ -1,12 +0,0 @@
1
- import { getResolvedRef as n } from "@scalar/workspace-store/helpers/get-resolved-ref";
2
- const m = ({
3
- operation: r,
4
- name: o,
5
- type: t
6
- }) => r.parameters?.find((a) => {
7
- const e = n(a);
8
- return e.in === t && e.name.toLowerCase() === o.toLowerCase();
9
- }) ?? null;
10
- export {
11
- m as getOperationHeader
12
- };