@scalar/api-client 2.18.4 → 2.19.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 (226) hide show
  1. package/CHANGELOG.md +58 -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/get-example-from-schema.js +12 -12
  113. package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/operation-to-har.d.ts +10 -1
  114. package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/operation-to-har.d.ts.map +1 -1
  115. package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/operation-to-har.js +48 -39
  116. package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-parameters.d.ts.map +1 -1
  117. package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-parameters.js +49 -46
  118. package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-server-url.d.ts +1 -1
  119. package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-server-url.d.ts.map +1 -1
  120. package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-server-url.js +1 -1
  121. package/dist/v2/blocks/request-block/RequestBlock.vue.d.ts +6 -2
  122. package/dist/v2/blocks/request-block/RequestBlock.vue.d.ts.map +1 -1
  123. package/dist/v2/blocks/request-block/RequestBlock.vue.js +2 -2
  124. package/dist/v2/blocks/request-block/RequestBlock.vue2.js +200 -115
  125. package/dist/v2/blocks/request-block/components/RequestBody.vue.d.ts +4 -4
  126. package/dist/v2/blocks/request-block/components/RequestBodyForm.vue.d.ts.map +1 -1
  127. package/dist/v2/blocks/request-block/components/RequestBodyForm.vue.js +44 -47
  128. package/dist/v2/blocks/request-block/components/RequestCodeSnippet.vue.d.ts.map +1 -1
  129. package/dist/v2/blocks/request-block/components/RequestCodeSnippet.vue.js +21 -17
  130. package/dist/v2/blocks/request-block/components/RequestParams.vue.d.ts +8 -20
  131. package/dist/v2/blocks/request-block/components/RequestParams.vue.d.ts.map +1 -1
  132. package/dist/v2/blocks/request-block/components/RequestParams.vue.js +29 -40
  133. package/dist/v2/blocks/request-block/components/RequestTable.vue.d.ts +11 -18
  134. package/dist/v2/blocks/request-block/components/RequestTable.vue.d.ts.map +1 -1
  135. package/dist/v2/blocks/request-block/components/RequestTable.vue.js +3 -3
  136. package/dist/v2/blocks/request-block/components/RequestTable.vue2.js +30 -40
  137. package/dist/v2/blocks/request-block/components/RequestTableRow.vue.d.ts +33 -18
  138. package/dist/v2/blocks/request-block/components/RequestTableRow.vue.d.ts.map +1 -1
  139. package/dist/v2/blocks/request-block/components/RequestTableRow.vue.js +106 -106
  140. package/dist/v2/blocks/request-block/helpers/create-parameter-handlers.d.ts +11 -14
  141. package/dist/v2/blocks/request-block/helpers/create-parameter-handlers.d.ts.map +1 -1
  142. package/dist/v2/blocks/request-block/helpers/create-parameter-handlers.js +43 -31
  143. package/dist/v2/blocks/request-block/helpers/get-default-headers.d.ts +41 -0
  144. package/dist/v2/blocks/request-block/helpers/get-default-headers.d.ts.map +1 -0
  145. package/dist/v2/blocks/request-block/helpers/get-default-headers.js +25 -0
  146. package/dist/v2/blocks/request-block/helpers/group-by.d.ts +1 -1
  147. package/dist/v2/blocks/request-block/helpers/group-by.d.ts.map +1 -1
  148. package/dist/v2/blocks/request-block/helpers/group-by.js +6 -3
  149. package/dist/v2/blocks/request-block/helpers/is-param-disabled.d.ts +13 -0
  150. package/dist/v2/blocks/request-block/helpers/is-param-disabled.d.ts.map +1 -0
  151. package/dist/v2/blocks/request-block/helpers/is-param-disabled.js +7 -0
  152. package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue.d.ts.map +1 -1
  153. package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue.js +1 -1
  154. package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue2.js +61 -63
  155. package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.d.ts +1 -2
  156. package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.d.ts.map +1 -1
  157. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.d.ts +2 -2
  158. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesInput.vue.d.ts +2 -2
  159. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue.d.ts +1 -2
  160. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue.d.ts.map +1 -1
  161. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.d.ts +2 -2
  162. package/dist/v2/components/code-input/CodeInput.vue.d.ts +2 -0
  163. package/dist/v2/components/code-input/CodeInput.vue.d.ts.map +1 -1
  164. package/dist/v2/components/code-input/CodeInput.vue.js +2 -2
  165. package/dist/v2/components/code-input/CodeInput.vue2.js +57 -51
  166. package/dist/v2/features/app/App.vue.js +6 -6
  167. package/dist/v2/features/app/app-events.d.ts +5 -9
  168. package/dist/v2/features/app/app-events.d.ts.map +1 -1
  169. package/dist/v2/features/app/app-events.js +143 -120
  170. package/dist/v2/features/app/app-state.d.ts.map +1 -1
  171. package/dist/v2/features/app/app-state.js +69 -71
  172. package/dist/v2/features/app/components/AppSidebar.vue.js +1 -1
  173. package/dist/v2/features/app/components/AppSidebar.vue2.js +5 -5
  174. package/dist/v2/features/modal/Modal.vue.d.ts.map +1 -1
  175. package/dist/v2/features/modal/Modal.vue.js +1 -1
  176. package/dist/v2/features/modal/Modal.vue2.js +21 -22
  177. package/dist/v2/features/modal/index.d.ts +1 -1
  178. package/dist/v2/features/modal/index.d.ts.map +1 -1
  179. package/dist/v2/features/modal/index.js +4 -4
  180. package/dist/v2/features/modal/modal-events.d.ts +13 -0
  181. package/dist/v2/features/modal/modal-events.d.ts.map +1 -0
  182. package/dist/v2/features/modal/modal-events.js +31 -0
  183. package/dist/v2/features/operation/Operation.vue.d.ts.map +1 -1
  184. package/dist/v2/features/operation/Operation.vue.js +30 -43
  185. package/dist/v2/workspace-events.d.ts +25 -0
  186. package/dist/v2/workspace-events.d.ts.map +1 -0
  187. package/dist/v2/workspace-events.js +199 -0
  188. package/dist/views/Components/CodeSnippet/helpers/convert-to-har-request.d.ts.map +1 -1
  189. package/dist/views/Components/CodeSnippet/helpers/get-snippet.d.ts +1 -1
  190. package/dist/views/Components/CodeSnippet/helpers/get-snippet.d.ts.map +1 -1
  191. package/dist/views/Cookies/Cookies.vue2.js +3 -3
  192. package/dist/views/Environment/handle-drag.d.ts +1 -1
  193. package/dist/views/Environment/handle-drag.d.ts.map +1 -1
  194. package/dist/views/Request/RequestRoot.vue2.js +9 -9
  195. package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTable.vue2.js +4 -4
  196. package/dist/views/Request/RequestSection/RequestCodeExample.vue2.js +4 -4
  197. package/dist/views/Request/RequestSection/RequestSection.vue2.js +5 -5
  198. package/dist/views/Request/RequestSection/helpers/update-scheme.d.ts.map +1 -1
  199. package/dist/views/Request/RequestSidebar.vue2.js +6 -6
  200. package/dist/views/Request/RequestSidebarItem.vue2.js +6 -6
  201. package/dist/views/Request/RequestSubpageHeader.vue2.js +4 -4
  202. package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +1 -1
  203. package/dist/views/Request/ResponseSection/index.d.ts +1 -1
  204. package/dist/views/Request/ResponseSection/index.d.ts.map +1 -1
  205. package/dist/views/Request/ResponseSection/index.js +4 -4
  206. package/dist/views/Request/consts/index.d.ts +2 -3
  207. package/dist/views/Request/consts/index.d.ts.map +1 -1
  208. package/dist/views/Request/consts/new-auth-options.d.ts +1 -1
  209. package/dist/views/Request/consts/new-auth-options.d.ts.map +1 -1
  210. package/dist/views/Request/handle-drag.d.ts +1 -1
  211. package/dist/views/Request/handle-drag.d.ts.map +1 -1
  212. package/dist/views/Request/hooks/useOpenApiWatcher.d.ts.map +1 -1
  213. package/dist/views/Request/hooks/useOpenApiWatcher.js +14 -14
  214. package/dist/views/Request/libs/auth.d.ts +1 -1
  215. package/dist/views/Request/libs/auth.d.ts.map +1 -1
  216. package/dist/views/Request/libs/index.d.ts +3 -3
  217. package/dist/views/Request/libs/index.d.ts.map +1 -1
  218. package/dist/views/Request/libs/oauth2.js +1 -1
  219. package/dist/views/Request/libs/watch-mode.js +6 -6
  220. package/dist/views/Request/types/index.d.ts +1 -1
  221. package/dist/views/Request/types/index.d.ts.map +1 -1
  222. package/package.json +12 -12
  223. package/dist/v2/features/modal/hooks/use-workspace-client-modal-events.d.ts +0 -18
  224. package/dist/v2/features/modal/hooks/use-workspace-client-modal-events.d.ts.map +0 -1
  225. package/dist/v2/features/modal/hooks/use-workspace-client-modal-events.js +0 -39
  226. package/dist/v2/features/operation/helpers/get-operation-header.js +0 -12
@@ -1,7 +1,8 @@
1
1
  import { getResolvedRef as d } from "@scalar/workspace-store/helpers/get-resolved-ref";
2
2
  import { getExampleFromSchema as p } from "../get-example-from-schema.js";
3
3
  import { getExample as h } from "../../../operation-block/helpers/get-example.js";
4
- const A = (e) => (e ?? []).map((o) => d(o)), g = (e) => {
4
+ import { isParamDisabled as A } from "../../../request-block/helpers/is-param-disabled.js";
5
+ const g = (e) => (e ?? []).map((o) => d(o)), S = (e) => {
5
6
  if (e.in === "header")
6
7
  return { style: "simple", explode: "explode" in e && e.explode !== void 0 ? e.explode : !1 };
7
8
  if (e.in === "cookie")
@@ -11,53 +12,55 @@ const A = (e) => (e ?? []).map((o) => d(o)), g = (e) => {
11
12
  query: "form",
12
13
  header: "simple",
13
14
  cookie: "form"
14
- }[e.in], t = "style" in e && e.style ? e.style : o, $ = "explode" in e && e.explode !== void 0 ? e.explode : t === "form";
15
- return { style: t, explode: $ };
16
- }, S = (e, o, t) => {
17
- const $ = h(e, o, t)?.value;
18
- if ($ !== void 0)
19
- return $;
20
- if ("schema" in e && e.schema) {
21
- const f = e.in === "path" ? { emptyString: `{${e.name}}` } : {};
22
- return p(d(e.schema), f);
23
- }
24
- }, w = ({
15
+ }[e.in], t = "style" in e && e.style ? e.style : o, y = "explode" in e && e.explode !== void 0 ? e.explode : t === "form";
16
+ return { style: t, explode: y };
17
+ }, k = (e, o, t) => {
18
+ const y = h(e, o, t);
19
+ if (A(e, y))
20
+ return;
21
+ if (y?.value !== void 0)
22
+ return y.value;
23
+ if (!("schema" in e) || !e.schema)
24
+ return;
25
+ const f = e.in === "path" ? { emptyString: `{${e.name}}` } : {};
26
+ return p(d(e.schema), f);
27
+ }, E = ({
25
28
  harRequest: e,
26
29
  parameters: o,
27
30
  example: t,
28
- contentType: $
31
+ contentType: y
29
32
  }) => {
30
33
  const f = [...e.headers], i = [...e.queryString];
31
- let r = e.url;
32
- const u = A(o);
34
+ let c = e.url;
35
+ const u = g(o);
33
36
  for (const s of u) {
34
37
  if (!s.in || !s.name)
35
38
  continue;
36
- const n = S(s, t, $);
39
+ const n = k(s, t, y);
37
40
  if (n === void 0)
38
41
  continue;
39
- const { style: b, explode: v } = g(s);
42
+ const { style: m, explode: v } = S(s);
40
43
  switch (s.in) {
41
44
  case "path": {
42
- r = k(r, s, n, b, v);
45
+ c = x(c, s, n, m, v);
43
46
  break;
44
47
  }
45
48
  case "query": {
46
- switch (b) {
49
+ switch (m) {
47
50
  case "form": {
48
51
  if (v)
49
52
  if (Array.isArray(n))
50
53
  for (const l of n)
51
54
  i.push({ name: s.name, value: String(l) });
52
55
  else if (typeof n == "object" && n !== null)
53
- for (const [l, c] of Object.entries(n))
54
- i.push({ name: l, value: String(c) });
56
+ for (const [l, r] of Object.entries(n))
57
+ i.push({ name: l, value: String(r) });
55
58
  else
56
59
  i.push({ name: s.name, value: String(n) });
57
60
  else if (Array.isArray(n))
58
61
  i.push({ name: s.name, value: n.join(",") });
59
62
  else if (typeof n == "object" && n !== null) {
60
- const l = Object.entries(n).map(([c, y]) => `${c},${y}`).join(",");
63
+ const l = Object.entries(n).map(([r, $]) => `${r},${$}`).join(",");
61
64
  i.push({ name: s.name, value: l });
62
65
  } else
63
66
  i.push({ name: s.name, value: String(n) });
@@ -67,7 +70,7 @@ const A = (e) => (e ?? []).map((o) => d(o)), g = (e) => {
67
70
  if (Array.isArray(n))
68
71
  i.push({ name: s.name, value: n.join(" ") });
69
72
  else if (typeof n == "object" && n !== null) {
70
- const l = Object.entries(n).map(([c, y]) => `${c} ${y}`).join(" ");
73
+ const l = Object.entries(n).map(([r, $]) => `${r} ${$}`).join(" ");
71
74
  i.push({ name: s.name, value: l });
72
75
  }
73
76
  break;
@@ -83,8 +86,8 @@ const A = (e) => (e ?? []).map((o) => d(o)), g = (e) => {
83
86
  }
84
87
  case "deepObject": {
85
88
  if (v && typeof n == "object" && n !== null)
86
- for (const [l, c] of Object.entries(n))
87
- i.push({ name: `${s.name}[${l}]`, value: String(c) });
89
+ for (const [l, r] of Object.entries(n))
90
+ i.push({ name: `${s.name}[${l}]`, value: String(r) });
88
91
  break;
89
92
  }
90
93
  // Default to form style
@@ -99,14 +102,14 @@ const A = (e) => (e ?? []).map((o) => d(o)), g = (e) => {
99
102
  for (const l of n)
100
103
  f.push({ name: s.name, value: String(l) });
101
104
  else if (typeof n == "object" && n !== null) {
102
- const l = Object.entries(n).map(([c, y]) => `${c}=${y}`).join(",");
105
+ const l = Object.entries(n).map(([r, $]) => `${r}=${$}`).join(",");
103
106
  f.push({ name: s.name, value: l });
104
107
  } else
105
108
  f.push({ name: s.name, value: String(n) });
106
109
  else if (Array.isArray(n))
107
110
  f.push({ name: s.name, value: n.join(",") });
108
111
  else if (typeof n == "object" && n !== null) {
109
- const l = Object.entries(n).map(([c, y]) => `${c},${y}`).join(",");
112
+ const l = Object.entries(n).map(([r, $]) => `${r},${$}`).join(",");
110
113
  f.push({ name: s.name, value: l });
111
114
  } else
112
115
  f.push({ name: s.name, value: String(n) });
@@ -117,42 +120,42 @@ const A = (e) => (e ?? []).map((o) => d(o)), g = (e) => {
117
120
  for (const l of n)
118
121
  e.cookies.push({ name: s.name, value: l === null ? "null" : String(l) });
119
122
  else if (typeof n == "object" && n !== null)
120
- for (const [l, c] of Object.entries(n))
121
- e.cookies.push({ name: l, value: c === null ? "null" : String(c) });
123
+ for (const [l, r] of Object.entries(n))
124
+ e.cookies.push({ name: l, value: r === null ? "null" : String(r) });
122
125
  else
123
126
  e.cookies.push({ name: s.name, value: n === null ? "null" : String(n) });
124
127
  else if (Array.isArray(n)) {
125
- const l = n.map((c) => c === null ? "null" : String(c)).join(",");
128
+ const l = n.map((r) => r === null ? "null" : String(r)).join(",");
126
129
  e.cookies.push({ name: s.name, value: l });
127
130
  } else if (typeof n == "object" && n !== null) {
128
- const l = (y) => {
131
+ const l = ($) => {
129
132
  const a = [];
130
- for (const [m, j] of Object.entries(y))
131
- typeof j == "object" && j !== null && !Array.isArray(j) ? a.push(m, ...l(j)) : a.push(m, j === null ? "null" : String(j));
133
+ for (const [b, j] of Object.entries($))
134
+ typeof j == "object" && j !== null && !Array.isArray(j) ? a.push(b, ...l(j)) : a.push(b, j === null ? "null" : String(j));
132
135
  return a;
133
- }, c = l(n).join(",");
134
- e.cookies.push({ name: s.name, value: c });
136
+ }, r = l(n).join(",");
137
+ e.cookies.push({ name: s.name, value: r });
135
138
  } else
136
139
  e.cookies.push({ name: s.name, value: n === null ? "null" : String(n) });
137
140
  break;
138
141
  }
139
142
  }
140
143
  return {
141
- url: r,
144
+ url: c,
142
145
  headers: f,
143
146
  queryString: i,
144
147
  cookies: e.cookies
145
148
  };
146
- }, k = (e, o, t, $, f) => {
147
- switch ($) {
149
+ }, x = (e, o, t, y, f) => {
150
+ switch (y) {
148
151
  case "matrix": {
149
152
  if (f) {
150
153
  if (Array.isArray(t)) {
151
- const i = t.map((r) => `${o.name}=${r}`).join(";");
154
+ const i = t.map((c) => `${o.name}=${c}`).join(";");
152
155
  return e.replace(`{;${o.name}}`, `;${i}`);
153
156
  }
154
157
  if (typeof t == "object" && t !== null) {
155
- const i = Object.entries(t).map(([r, u]) => `${r}=${u}`).join(";");
158
+ const i = Object.entries(t).map(([c, u]) => `${c}=${u}`).join(";");
156
159
  return e.replace(`{;${o.name}}`, `;${i}`);
157
160
  }
158
161
  return e.replace(`{;${o.name}}`, `;${o.name}=${t}`);
@@ -160,7 +163,7 @@ const A = (e) => (e ?? []).map((o) => d(o)), g = (e) => {
160
163
  if (Array.isArray(t))
161
164
  return e.replace(`{;${o.name}}`, `;${o.name}=${t.join(",")}`);
162
165
  if (typeof t == "object" && t !== null) {
163
- const i = Object.entries(t).map(([r, u]) => `${r},${u}`).join(",");
166
+ const i = Object.entries(t).map(([c, u]) => `${c},${u}`).join(",");
164
167
  return e.replace(`{;${o.name}}`, `;${o.name}=${i}`);
165
168
  }
166
169
  return e.replace(`{;${o.name}}`, `;${o.name}=${t}`);
@@ -170,7 +173,7 @@ const A = (e) => (e ?? []).map((o) => d(o)), g = (e) => {
170
173
  if (Array.isArray(t))
171
174
  return e.replace(`{.${o.name}}`, `.${t.join(".")}`);
172
175
  if (typeof t == "object" && t !== null) {
173
- const i = Object.entries(t).map(([r, u]) => `${r}=${u}`).join(".");
176
+ const i = Object.entries(t).map(([c, u]) => `${c}=${u}`).join(".");
174
177
  return e.replace(`{.${o.name}}`, `.${i}`);
175
178
  }
176
179
  return e.replace(`{.${o.name}}`, `.${t}`);
@@ -178,7 +181,7 @@ const A = (e) => (e ?? []).map((o) => d(o)), g = (e) => {
178
181
  if (Array.isArray(t))
179
182
  return e.replace(`{.${o.name}}`, `.${t.join(",")}`);
180
183
  if (typeof t == "object" && t !== null) {
181
- const i = Object.entries(t).map(([r, u]) => `${r},${u}`).join(",");
184
+ const i = Object.entries(t).map(([c, u]) => `${c},${u}`).join(",");
182
185
  return e.replace(`{.${o.name}}`, `.${i}`);
183
186
  }
184
187
  return e.replace(`{.${o.name}}`, `.${t}`);
@@ -188,7 +191,7 @@ const A = (e) => (e ?? []).map((o) => d(o)), g = (e) => {
188
191
  if (Array.isArray(t))
189
192
  return e.replace(`{${o.name}}`, t.join(","));
190
193
  if (typeof t == "object" && t !== null) {
191
- const i = Object.entries(t).map(([r, u]) => `${r}=${u}`).join(",");
194
+ const i = Object.entries(t).map(([c, u]) => `${c}=${u}`).join(",");
192
195
  return e.replace(`{${o.name}}`, i);
193
196
  }
194
197
  return e.replace(`{${o.name}}`, String(t));
@@ -196,7 +199,7 @@ const A = (e) => (e ?? []).map((o) => d(o)), g = (e) => {
196
199
  if (Array.isArray(t))
197
200
  return e.replace(`{${o.name}}`, t.join(","));
198
201
  if (typeof t == "object" && t !== null) {
199
- const i = Object.entries(t).map(([r, u]) => `${r},${u}`).join(",");
202
+ const i = Object.entries(t).map(([c, u]) => `${c},${u}`).join(",");
200
203
  return e.replace(`{${o.name}}`, i);
201
204
  }
202
205
  return e.replace(`{${o.name}}`, String(t));
@@ -207,5 +210,5 @@ const A = (e) => (e ?? []).map((o) => d(o)), g = (e) => {
207
210
  }
208
211
  };
209
212
  export {
210
- w as processParameters
213
+ E as processParameters
211
214
  };
@@ -2,5 +2,5 @@ import type { ServerObject } from '@scalar/workspace-store/schemas/v3.1/strict/o
2
2
  /**
3
3
  * Processes a server URL by replacing variables with their default values and merging with the path
4
4
  */
5
- export declare const processServerUrl: (server: ServerObject, path: string) => string;
5
+ export declare const processServerUrl: (server: ServerObject | null, path: string) => string;
6
6
  //# sourceMappingURL=process-server-url.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"process-server-url.d.ts","sourceRoot":"","sources":["../../../../../../src/v2/blocks/operation-code-sample/helpers/operation-to-har/process-server-url.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,8DAA8D,CAAA;AAEhG;;GAEG;AACH,eAAO,MAAM,gBAAgB,GAAI,QAAQ,YAAY,EAAE,MAAM,MAAM,KAAG,MA4BrE,CAAA"}
1
+ {"version":3,"file":"process-server-url.d.ts","sourceRoot":"","sources":["../../../../../../src/v2/blocks/operation-code-sample/helpers/operation-to-har/process-server-url.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,8DAA8D,CAAA;AAEhG;;GAEG;AACH,eAAO,MAAM,gBAAgB,GAAI,QAAQ,YAAY,GAAG,IAAI,EAAE,MAAM,MAAM,KAAG,MA4B5E,CAAA"}
@@ -1,7 +1,7 @@
1
1
  import { replaceVariables as c } from "@scalar/helpers/regex/replace-variables";
2
2
  import { mergeUrls as a } from "@scalar/helpers/url/merge-urls";
3
3
  const m = (r, e) => {
4
- if (!r.url)
4
+ if (!r?.url)
5
5
  return e;
6
6
  const t = r.url;
7
7
  if (r.variables) {
@@ -1,12 +1,15 @@
1
1
  import type { HttpMethod } from '@scalar/helpers/http/http-methods';
2
2
  import type { WorkspaceStore } from '@scalar/workspace-store/client';
3
- import type { WorkspaceEventBus } from '@scalar/workspace-store/events';
4
- import type { AuthMeta } from '@scalar/workspace-store/mutators';
3
+ import type { AuthMeta, WorkspaceEventBus } from '@scalar/workspace-store/events';
5
4
  import type { XScalarEnvironment } from '@scalar/workspace-store/schemas/extensions/document/x-scalar-environments';
5
+ import type { XScalarCookie } from '@scalar/workspace-store/schemas/extensions/general/x-scalar-cookies';
6
6
  import type { OpenApiDocument, OperationObject, SecuritySchemeObject, ServerObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document';
7
7
  import type { ClientLayout } from '../../../hooks/index.js';
8
8
  import type { ClientOptionGroup } from '../../../v2/blocks/operation-code-sample/index.js';
9
9
  import type { ClientPlugin } from '../../../v2/helpers/plugins.js';
10
+ export type ExtendedScalarCookie = XScalarCookie & {
11
+ location: 'document' | 'workspace';
12
+ };
10
13
  type __VLS_Props = {
11
14
  selectedSecurity: OpenApiDocument['x-scalar-selected-security'];
12
15
  authMeta: AuthMeta;
@@ -25,6 +28,7 @@ type __VLS_Props = {
25
28
  selectedClient: WorkspaceStore['workspace']['x-scalar-default-client'];
26
29
  selectedSecuritySchemes: SecuritySchemeObject[];
27
30
  server: ServerObject | null;
31
+ globalCookies: ExtendedScalarCookie[];
28
32
  };
29
33
  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>;
30
34
  export default _default;
@@ -1 +1 @@
1
- {"version":3,"file":"RequestBlock.vue.d.ts","sourceRoot":"","sources":["../../../../src/v2/blocks/request-block/RequestBlock.vue"],"names":[],"mappings":"AA4aA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mCAAmC,CAAA;AAEnE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAA;AACpE,OAAO,KAAK,EAEV,iBAAiB,EAClB,MAAM,gCAAgC,CAAA;AAGvC,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,kCAAkC,CAAA;AAChE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2EAA2E,CAAA;AACnH,OAAO,KAAK,EACV,eAAe,EACf,eAAe,EACf,oBAAoB,EACpB,YAAY,EACb,MAAM,8DAA8D,CAAA;AAKrE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AAC3C,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAA;AAO1E,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAA;AAWxD,KAAK,WAAW,GAAG;IACjB,gBAAgB,EAAE,eAAe,CAAC,4BAA4B,CAAC,CAAA;IAC/D,QAAQ,EAAE,QAAQ,CAAA;IAClB,aAAa,EAAE,iBAAiB,EAAE,CAAA;IAClC,WAAW,EAAE,kBAAkB,CAAA;IAC/B,QAAQ,EAAE,iBAAiB,CAAA;IAC3B,UAAU,EAAE,MAAM,CAAA;IAClB,MAAM,EAAE,YAAY,CAAA;IACpB,MAAM,EAAE,UAAU,CAAA;IAClB,SAAS,EAAE,eAAe,CAAA;IAC1B,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,EAAE,YAAY,EAAE,CAAA;IACvB,QAAQ,EAAE,MAAM,CAAA;IAChB,oBAAoB,EAAE,eAAe,CAAC,UAAU,CAAC,CAAA;IACjD,eAAe,EAAE,WAAW,CAAC,eAAe,CAAC,YAAY,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAA;IAC9E,cAAc,EAAE,cAAc,CAAC,WAAW,CAAC,CAAC,yBAAyB,CAAC,CAAA;IACtE,uBAAuB,EAAE,oBAAoB,EAAE,CAAA;IAC/C,MAAM,EAAE,YAAY,GAAG,IAAI,CAAA;CAC5B,CAAC;;AA6iBF,wBAMG"}
1
+ {"version":3,"file":"RequestBlock.vue.d.ts","sourceRoot":"","sources":["../../../../src/v2/blocks/request-block/RequestBlock.vue"],"names":[],"mappings":"AAsiBA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mCAAmC,CAAA;AAEnE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAA;AACpE,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,oBAAoB,EACpB,YAAY,EACb,MAAM,8DAA8D,CAAA;AAKrE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AAI3C,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAA;AAW1E,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAA;AAWxD,MAAM,MAAM,oBAAoB,GAAG,aAAa,GAAG;IACjD,QAAQ,EAAE,UAAU,GAAG,WAAW,CAAA;CACnC,CAAA;AAED,KAAK,WAAW,GAAG;IACjB,gBAAgB,EAAE,eAAe,CAAC,4BAA4B,CAAC,CAAA;IAC/D,QAAQ,EAAE,QAAQ,CAAA;IAClB,aAAa,EAAE,iBAAiB,EAAE,CAAA;IAClC,WAAW,EAAE,kBAAkB,CAAA;IAC/B,QAAQ,EAAE,iBAAiB,CAAA;IAC3B,UAAU,EAAE,MAAM,CAAA;IAClB,MAAM,EAAE,YAAY,CAAA;IACpB,MAAM,EAAE,UAAU,CAAA;IAClB,SAAS,EAAE,eAAe,CAAA;IAC1B,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,EAAE,YAAY,EAAE,CAAA;IACvB,QAAQ,EAAE,MAAM,CAAA;IAChB,oBAAoB,EAAE,eAAe,CAAC,UAAU,CAAC,CAAA;IACjD,eAAe,EAAE,WAAW,CAAC,eAAe,CAAC,YAAY,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAA;IAC9E,cAAc,EAAE,cAAc,CAAC,WAAW,CAAC,CAAC,yBAAyB,CAAC,CAAA;IACtE,uBAAuB,EAAE,oBAAoB,EAAE,CAAA;IAC/C,MAAM,EAAE,YAAY,GAAG,IAAI,CAAA;IAC3B,aAAa,EAAE,oBAAoB,EAAE,CAAA;CACtC,CAAC;;AAkqBF,wBAMG"}
@@ -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 d = /* @__PURE__ */ t(o, [["__scopeId", "data-v-35cedd3d"]]);
4
+ const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-175541a7"]]);
5
5
  export {
6
- d as default
6
+ m as default
7
7
  };