@scalar/api-client 3.1.0 → 3.2.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 (157) hide show
  1. package/CHANGELOG.md +21 -0
  2. package/dist/components/HttpMethod/HttpMethod.vue.d.ts +2 -2
  3. package/dist/components/Sidebar/Actions/SidebarListElementForm.vue.d.ts +2 -2
  4. package/dist/style.css +95 -71
  5. package/dist/v2/blocks/operation-block/OperationBlock.vue.d.ts.map +1 -1
  6. package/dist/v2/blocks/operation-block/OperationBlock.vue.js.map +1 -1
  7. package/dist/v2/blocks/operation-block/OperationBlock.vue.script.js +2 -1
  8. package/dist/v2/blocks/operation-block/OperationBlock.vue.script.js.map +1 -1
  9. package/dist/v2/blocks/operation-block/helpers/send-request.d.ts +5 -1
  10. package/dist/v2/blocks/operation-block/helpers/send-request.d.ts.map +1 -1
  11. package/dist/v2/blocks/operation-block/helpers/send-request.js +2 -2
  12. package/dist/v2/blocks/operation-block/helpers/send-request.js.map +1 -1
  13. package/dist/v2/blocks/operation-code-sample/components/OperationCodeSample.vue.d.ts.map +1 -1
  14. package/dist/v2/blocks/operation-code-sample/components/OperationCodeSample.vue.js +1 -1
  15. package/dist/v2/blocks/operation-code-sample/components/OperationCodeSample.vue.js.map +1 -1
  16. package/dist/v2/blocks/operation-code-sample/components/OperationCodeSample.vue.script.js +4 -0
  17. package/dist/v2/blocks/operation-code-sample/components/OperationCodeSample.vue.script.js.map +1 -1
  18. package/dist/v2/blocks/request-block/RequestBlock.vue.script.js.map +1 -1
  19. package/dist/v2/blocks/request-block/components/RequestBody.vue.d.ts.map +1 -1
  20. package/dist/v2/blocks/request-block/components/RequestBody.vue.js +1 -1
  21. package/dist/v2/blocks/request-block/components/RequestBody.vue.js.map +1 -1
  22. package/dist/v2/blocks/request-block/components/RequestBody.vue.script.js +1 -0
  23. package/dist/v2/blocks/request-block/components/RequestBody.vue.script.js.map +1 -1
  24. package/dist/v2/blocks/request-block/components/RequestTableRow.vue.d.ts.map +1 -1
  25. package/dist/v2/blocks/request-block/components/RequestTableRow.vue.js.map +1 -1
  26. package/dist/v2/blocks/request-block/components/RequestTableRow.vue.script.js +1 -0
  27. package/dist/v2/blocks/request-block/components/RequestTableRow.vue.script.js.map +1 -1
  28. package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue.d.ts +1 -1
  29. package/dist/v2/blocks/scalar-address-bar-block/components/EnvironmentSelector.vue.js.map +1 -1
  30. package/dist/v2/blocks/scalar-address-bar-block/components/EnvironmentSelector.vue.script.js +3 -3
  31. package/dist/v2/blocks/scalar-address-bar-block/components/EnvironmentSelector.vue.script.js.map +1 -1
  32. package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.script.js.map +1 -1
  33. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.d.ts.map +1 -1
  34. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.js.map +1 -1
  35. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.script.js +131 -48
  36. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.script.js.map +1 -1
  37. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesAddModal.vue.d.ts +2 -2
  38. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesAddModal.vue.d.ts.map +1 -1
  39. package/dist/v2/blocks/scalar-auth-selector-block/helpers/extract-security-scheme-secrets.d.ts.map +1 -1
  40. package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth.d.ts +16 -0
  41. package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth.d.ts.map +1 -1
  42. package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth.js +43 -1
  43. package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth.js.map +1 -1
  44. package/dist/v2/components/code-input/CodeInput.vue.d.ts +6 -2
  45. package/dist/v2/components/code-input/CodeInput.vue.d.ts.map +1 -1
  46. package/dist/v2/components/code-input/CodeInput.vue.js +1 -1
  47. package/dist/v2/components/code-input/CodeInput.vue.js.map +1 -1
  48. package/dist/v2/components/code-input/CodeInput.vue.script.js +9 -4
  49. package/dist/v2/components/code-input/CodeInput.vue.script.js.map +1 -1
  50. package/dist/v2/components/data-table/DataTableInput.vue.d.ts +3 -0
  51. package/dist/v2/components/data-table/DataTableInput.vue.d.ts.map +1 -1
  52. package/dist/v2/components/data-table/DataTableInput.vue.js +1 -1
  53. package/dist/v2/components/data-table/DataTableInput.vue.js.map +1 -1
  54. package/dist/v2/components/data-table/DataTableInput.vue.script.js +7 -1
  55. package/dist/v2/components/data-table/DataTableInput.vue.script.js.map +1 -1
  56. package/dist/v2/components/forms/ConfirmationForm.vue.d.ts +2 -2
  57. package/dist/v2/components/sidebar/Sidebar.vue.d.ts.map +1 -1
  58. package/dist/v2/components/sidebar/Sidebar.vue.js.map +1 -1
  59. package/dist/v2/components/sidebar/Sidebar.vue.script.js +16 -8
  60. package/dist/v2/components/sidebar/Sidebar.vue.script.js.map +1 -1
  61. package/dist/v2/components/sidebar/SidebarToggle.vue.js.map +1 -1
  62. package/dist/v2/components/sidebar/SidebarToggle.vue.script.js +1 -1
  63. package/dist/v2/components/sidebar/SidebarToggle.vue.script.js.map +1 -1
  64. package/dist/v2/constants.js +1 -1
  65. package/dist/v2/features/app/App.vue.d.ts.map +1 -1
  66. package/dist/v2/features/app/App.vue.js.map +1 -1
  67. package/dist/v2/features/app/App.vue.script.js +13 -13
  68. package/dist/v2/features/app/App.vue.script.js.map +1 -1
  69. package/dist/v2/features/app/app-state.d.ts +6 -1
  70. package/dist/v2/features/app/app-state.d.ts.map +1 -1
  71. package/dist/v2/features/app/app-state.js +5 -3
  72. package/dist/v2/features/app/app-state.js.map +1 -1
  73. package/dist/v2/features/app/components/AppSidebar.vue.js +1 -1
  74. package/dist/v2/features/app/components/AppSidebar.vue.js.map +1 -1
  75. package/dist/v2/features/app/components/AppSidebar.vue.script.js +1 -1
  76. package/dist/v2/features/app/components/AppSidebar.vue.script.js.map +1 -1
  77. package/dist/v2/features/app/components/DesktopTab.vue.d.ts +2 -2
  78. package/dist/v2/features/app/helpers/create-api-client-app.d.ts +9 -1
  79. package/dist/v2/features/app/helpers/create-api-client-app.d.ts.map +1 -1
  80. package/dist/v2/features/app/helpers/create-api-client-app.js +3 -2
  81. package/dist/v2/features/app/helpers/create-api-client-app.js.map +1 -1
  82. package/dist/v2/features/app/helpers/routes.d.ts +4 -2
  83. package/dist/v2/features/app/helpers/routes.d.ts.map +1 -1
  84. package/dist/v2/features/app/helpers/routes.js.map +1 -1
  85. package/dist/v2/features/collection/DocumentCollection.vue.script.js +2 -1
  86. package/dist/v2/features/collection/DocumentCollection.vue.script.js.map +1 -1
  87. package/dist/v2/features/collection/OperationCollection.vue.script.js +2 -1
  88. package/dist/v2/features/collection/OperationCollection.vue.script.js.map +1 -1
  89. package/dist/v2/features/collection/WorkspaceCollection.vue.script.js +2 -1
  90. package/dist/v2/features/collection/WorkspaceCollection.vue.script.js.map +1 -1
  91. package/dist/v2/features/collection/components/Authentication.vue.d.ts.map +1 -1
  92. package/dist/v2/features/collection/components/Authentication.vue.js +1 -1
  93. package/dist/v2/features/collection/components/Authentication.vue.js.map +1 -1
  94. package/dist/v2/features/collection/components/Authentication.vue.script.js +10 -1
  95. package/dist/v2/features/collection/components/Authentication.vue.script.js.map +1 -1
  96. package/dist/v2/features/collection/components/Cookies.vue.script.js +1 -0
  97. package/dist/v2/features/collection/components/Cookies.vue.script.js.map +1 -1
  98. package/dist/v2/features/collection/components/Editor/Editor.vue.script.js +1 -0
  99. package/dist/v2/features/collection/components/Editor/Editor.vue.script.js.map +1 -1
  100. package/dist/v2/features/collection/components/Environment.vue.script.js +1 -0
  101. package/dist/v2/features/collection/components/Environment.vue.script.js.map +1 -1
  102. package/dist/v2/features/collection/components/Form.vue.d.ts +2 -0
  103. package/dist/v2/features/collection/components/Form.vue.d.ts.map +1 -1
  104. package/dist/v2/features/collection/components/Form.vue.js.map +1 -1
  105. package/dist/v2/features/collection/components/Form.vue.script.js +4 -1
  106. package/dist/v2/features/collection/components/Form.vue.script.js.map +1 -1
  107. package/dist/v2/features/collection/components/LabelInput.vue.d.ts +1 -1
  108. package/dist/v2/features/collection/components/Overview.vue.script.js +1 -0
  109. package/dist/v2/features/collection/components/Overview.vue.script.js.map +1 -1
  110. package/dist/v2/features/collection/components/Runner/components/Runner.vue.d.ts.map +1 -1
  111. package/dist/v2/features/collection/components/Runner/components/Runner.vue.js.map +1 -1
  112. package/dist/v2/features/collection/components/Runner/components/Runner.vue.script.js +4 -2
  113. package/dist/v2/features/collection/components/Runner/components/Runner.vue.script.js.map +1 -1
  114. package/dist/v2/features/collection/components/Runner/components/RunnerTree.vue.d.ts +2 -2
  115. package/dist/v2/features/collection/components/Runner/hooks/use-runner-execution.d.ts +4 -2
  116. package/dist/v2/features/collection/components/Runner/hooks/use-runner-execution.d.ts.map +1 -1
  117. package/dist/v2/features/collection/components/Runner/hooks/use-runner-execution.js +3 -2
  118. package/dist/v2/features/collection/components/Runner/hooks/use-runner-execution.js.map +1 -1
  119. package/dist/v2/features/collection/components/Scripts.vue.script.js +1 -0
  120. package/dist/v2/features/collection/components/Scripts.vue.script.js.map +1 -1
  121. package/dist/v2/features/collection/components/Servers.vue.d.ts.map +1 -1
  122. package/dist/v2/features/collection/components/Servers.vue.js.map +1 -1
  123. package/dist/v2/features/collection/components/Servers.vue.script.js +3 -1
  124. package/dist/v2/features/collection/components/Servers.vue.script.js.map +1 -1
  125. package/dist/v2/features/collection/components/Settings.vue.script.js +1 -0
  126. package/dist/v2/features/collection/components/Settings.vue.script.js.map +1 -1
  127. package/dist/v2/features/command-palette/components/CommandActionForm.vue.d.ts +2 -2
  128. package/dist/v2/features/environments/components/EnvironmentDeleteModal.vue.d.ts +2 -2
  129. package/dist/v2/features/environments/components/EnvironmentVariablesDropdown.vue.d.ts +1 -1
  130. package/dist/v2/features/environments/components/EnvironmentVariablesDropdown.vue.d.ts.map +1 -1
  131. package/dist/v2/features/environments/components/EnvironmentVariablesDropdown.vue.js.map +1 -1
  132. package/dist/v2/features/environments/components/EnvironmentVariablesDropdown.vue.script.js +2 -2
  133. package/dist/v2/features/environments/components/EnvironmentVariablesDropdown.vue.script.js.map +1 -1
  134. package/dist/v2/features/global-cookies/components/CookiesTable.vue.d.ts.map +1 -1
  135. package/dist/v2/features/global-cookies/components/CookiesTable.vue.js +1 -1
  136. package/dist/v2/features/global-cookies/components/CookiesTable.vue.js.map +1 -1
  137. package/dist/v2/features/global-cookies/components/CookiesTable.vue.script.js +2 -0
  138. package/dist/v2/features/global-cookies/components/CookiesTable.vue.script.js.map +1 -1
  139. package/dist/v2/features/modal/Modal.vue.d.ts +7 -6
  140. package/dist/v2/features/modal/Modal.vue.d.ts.map +1 -1
  141. package/dist/v2/features/modal/Modal.vue.js.map +1 -1
  142. package/dist/v2/features/modal/Modal.vue.script.js +2 -2
  143. package/dist/v2/features/modal/Modal.vue.script.js.map +1 -1
  144. package/dist/v2/features/modal/helpers/create-api-client-modal.d.ts +5 -5
  145. package/dist/v2/features/modal/helpers/create-api-client-modal.d.ts.map +1 -1
  146. package/dist/v2/features/modal/helpers/create-api-client-modal.js.map +1 -1
  147. package/dist/v2/features/modal/helpers/types.d.ts +1 -7
  148. package/dist/v2/features/modal/helpers/types.d.ts.map +1 -1
  149. package/dist/v2/features/modal/index.d.ts +1 -1
  150. package/dist/v2/features/modal/index.d.ts.map +1 -1
  151. package/dist/v2/features/operation/Operation.vue.d.ts +0 -5
  152. package/dist/v2/features/operation/Operation.vue.d.ts.map +1 -1
  153. package/dist/v2/features/operation/Operation.vue.js.map +1 -1
  154. package/dist/v2/features/operation/Operation.vue.script.js.map +1 -1
  155. package/dist/v2/types/options.d.ts +15 -0
  156. package/dist/v2/types/options.d.ts.map +1 -0
  157. package/package.json +13 -13
package/CHANGELOG.md CHANGED
@@ -1,5 +1,26 @@
1
1
  # @scalar/api-client
2
2
 
3
+ ## 3.2.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [#8940](https://github.com/scalar/scalar/pull/8940): feat(api-client): support header for web layout
8
+
9
+ ## 3.2.0
10
+
11
+ ### Minor Changes
12
+
13
+ - [#8891](https://github.com/scalar/scalar/pull/8891): feat: support refreshing the token
14
+
15
+ ### Patch Changes
16
+
17
+ - [#8877](https://github.com/scalar/scalar/pull/8877): fix(api-client): prefill oauth2 redirect URI after switching documents
18
+ - [#8943](https://github.com/scalar/scalar/pull/8943): feat: added customFetch config to the client
19
+ - [#8931](https://github.com/scalar/scalar/pull/8931): fix: close environment selector dropdown after selection
20
+ - [#8933](https://github.com/scalar/scalar/pull/8933): feat(api-client): add app-level oauth2 redirect URI override plumbing for auth prefill
21
+ - [#8932](https://github.com/scalar/scalar/pull/8932): fix: only enable fake data suggestion for parameteres and request body
22
+ - [#8907](https://github.com/scalar/scalar/pull/8907): Fix code sample missing body content type update
23
+
3
24
  ## 3.1.0
4
25
 
5
26
  ### Minor Changes
@@ -4,9 +4,9 @@ type __VLS_Props = {
4
4
  isEditable?: boolean;
5
5
  };
6
6
  declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
7
- change: (value: "delete" | "head" | "get" | "options" | "put" | "post" | "patch" | "trace") => any;
7
+ change: (value: "head" | "delete" | "get" | "options" | "patch" | "post" | "put" | "trace") => any;
8
8
  }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
9
- onChange?: ((value: "delete" | "head" | "get" | "options" | "put" | "post" | "patch" | "trace") => any) | undefined;
9
+ onChange?: ((value: "head" | "delete" | "get" | "options" | "patch" | "post" | "put" | "trace") => any) | undefined;
10
10
  }>, {
11
11
  isSquare: boolean;
12
12
  isEditable: boolean;
@@ -7,11 +7,11 @@ type __VLS_Slots = {} & {
7
7
  default?: (props: typeof __VLS_1) => any;
8
8
  };
9
9
  declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
10
- submit: () => any;
11
10
  cancel: () => any;
11
+ submit: () => any;
12
12
  }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
13
- onSubmit?: (() => any) | undefined;
14
13
  onCancel?: (() => any) | undefined;
14
+ onSubmit?: (() => any) | undefined;
15
15
  }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
16
16
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
17
17
  declare const _default: typeof __VLS_export;
package/dist/style.css CHANGED
@@ -2948,8 +2948,8 @@
2948
2948
  left: 10px;
2949
2949
  }
2950
2950
 
2951
- .scalar-app .left-4 {
2952
- left: 16px;
2951
+ .scalar-app .left-3 {
2952
+ left: 12px;
2953
2953
  }
2954
2954
 
2955
2955
  .scalar-app .left-border {
@@ -4252,6 +4252,10 @@
4252
4252
  top: 16px;
4253
4253
  }
4254
4254
 
4255
+ .scalar-app .top-14 {
4256
+ top: 56px;
4257
+ }
4258
+
4255
4259
  .scalar-app .top-\[calc\(100\%\+4px\)\] {
4256
4260
  top: calc(100% + 4px);
4257
4261
  }
@@ -4312,8 +4316,8 @@
4312
4316
  left: 8px;
4313
4317
  }
4314
4318
 
4315
- .scalar-app .left-3 {
4316
- left: 12px;
4319
+ .scalar-app .left-4 {
4320
+ left: 16px;
4317
4321
  }
4318
4322
 
4319
4323
  .scalar-app .-z-1 {
@@ -4328,10 +4332,6 @@
4328
4332
  z-index: 1;
4329
4333
  }
4330
4334
 
4331
- .scalar-app .z-2 {
4332
- z-index: 2;
4333
- }
4334
-
4335
4335
  .scalar-app .z-10 {
4336
4336
  z-index: 10;
4337
4337
  z-index: 10;
@@ -4342,12 +4342,12 @@
4342
4342
  z-index: 50;
4343
4343
  }
4344
4344
 
4345
- .scalar-app .z-\[1\] {
4346
- z-index: 1;
4345
+ .scalar-app .z-60 {
4346
+ z-index: 60;
4347
4347
  }
4348
4348
 
4349
- .scalar-app .z-\[60\] {
4350
- z-index: 60;
4349
+ .scalar-app .z-\[1\] {
4350
+ z-index: 1;
4351
4351
  }
4352
4352
 
4353
4353
  .scalar-app .z-context {
@@ -4795,6 +4795,10 @@
4795
4795
  height: 100%;
4796
4796
  }
4797
4797
 
4798
+ .scalar-app .h-header {
4799
+ height: 48px;
4800
+ }
4801
+
4798
4802
  .scalar-app .h-min {
4799
4803
  height: min-content;
4800
4804
  }
@@ -7217,18 +7221,22 @@
7217
7221
  position: absolute !important;
7218
7222
  }
7219
7223
 
7220
- .scalar-app .max-md\:fixed\! {
7221
- position: fixed !important;
7222
- }
7223
-
7224
7224
  .scalar-app .max-md\:inset-y-0 {
7225
7225
  inset-block: 0;
7226
7226
  }
7227
7227
 
7228
+ .scalar-app .max-md\:top-4 {
7229
+ top: 16px;
7230
+ }
7231
+
7228
7232
  .scalar-app .max-md\:z-2 {
7229
7233
  z-index: 2;
7230
7234
  }
7231
7235
 
7236
+ .scalar-app .max-md\:z-5 {
7237
+ z-index: 5;
7238
+ }
7239
+
7232
7240
  .scalar-app .max-md\:flex\! {
7233
7241
  display: flex !important;
7234
7242
  }
@@ -7241,9 +7249,25 @@
7241
7249
  width: 100% !important;
7242
7250
  }
7243
7251
 
7252
+ .scalar-app .max-md\:pt-2 {
7253
+ padding-top: 8px;
7254
+ }
7255
+
7244
7256
  .scalar-app .max-md\:pt-12 {
7245
7257
  padding-top: 48px;
7246
7258
  }
7259
+
7260
+ .scalar-app .max-md\:pl-4\! {
7261
+ padding-left: 16px !important;
7262
+ }
7263
+
7264
+ .scalar-app .max-md\:pl-10 {
7265
+ padding-left: 40px;
7266
+ }
7267
+
7268
+ .scalar-app .max-md\:pl-14 {
7269
+ padding-left: 56px;
7270
+ }
7247
7271
  }
7248
7272
 
7249
7273
  @media (min-width: 600px) {
@@ -7622,23 +7646,23 @@
7622
7646
  /*
7623
7647
  Deep styling for customizing Codemirror
7624
7648
  */
7625
- [data-v-167b1bd5] .cm-editor {
7649
+ [data-v-6499ec1f] .cm-editor {
7626
7650
  height: 100%;
7627
7651
  outline: none;
7628
7652
  padding: 0;
7629
7653
  background: transparent;
7630
7654
  }
7631
- [data-v-167b1bd5] .cm-placeholder {
7655
+ [data-v-6499ec1f] .cm-placeholder {
7632
7656
  color: var(--scalar-color-3);
7633
7657
  }
7634
- [data-v-167b1bd5] .cm-content {
7658
+ [data-v-6499ec1f] .cm-content {
7635
7659
  font-family: var(--scalar-font-code);
7636
7660
  font-size: var(--scalar-small);
7637
7661
  max-height: 20px;
7638
7662
  padding: 8px 0;
7639
7663
  }
7640
7664
  /* Tooltip helper */
7641
- [data-v-167b1bd5] .cm-tooltip {
7665
+ [data-v-6499ec1f] .cm-tooltip {
7642
7666
  background: transparent !important;
7643
7667
  filter: brightness(var(--scalar-lifted-brightness));
7644
7668
  border-radius: var(--scalar-radius);
@@ -7647,43 +7671,43 @@
7647
7671
  outline: none !important;
7648
7672
  overflow: hidden !important;
7649
7673
  }
7650
- [data-v-167b1bd5] .cm-tooltip-autocomplete ul li {
7674
+ [data-v-6499ec1f] .cm-tooltip-autocomplete ul li {
7651
7675
  padding: 3px 6px !important;
7652
7676
  }
7653
- [data-v-167b1bd5] .cm-completionIcon-type:after {
7677
+ [data-v-6499ec1f] .cm-completionIcon-type:after {
7654
7678
  color: var(--scalar-color-3) !important;
7655
7679
  }
7656
- [data-v-167b1bd5] .cm-tooltip-autocomplete ul li[aria-selected] {
7680
+ [data-v-6499ec1f] .cm-tooltip-autocomplete ul li[aria-selected] {
7657
7681
  background: var(--scalar-background-2) !important;
7658
7682
  color: var(--scalar-color-1) !important;
7659
7683
  }
7660
- [data-v-167b1bd5] .cm-tooltip-autocomplete ul {
7684
+ [data-v-6499ec1f] .cm-tooltip-autocomplete ul {
7661
7685
  padding: 6px !important;
7662
7686
  position: relative;
7663
7687
  }
7664
- [data-v-167b1bd5] .cm-tooltip-autocomplete ul li:hover {
7688
+ [data-v-6499ec1f] .cm-tooltip-autocomplete ul li:hover {
7665
7689
  border-radius: 3px;
7666
7690
  color: var(--scalar-color-1) !important;
7667
7691
  background: var(--scalar-background-3) !important;
7668
7692
  }
7669
7693
  /* Disable active line highlighting */
7670
- [data-v-167b1bd5] .cm-activeLine,[data-v-167b1bd5] .cm-activeLineGutter {
7694
+ [data-v-6499ec1f] .cm-activeLine,[data-v-6499ec1f] .cm-activeLineGutter {
7671
7695
  background-color: transparent;
7672
7696
  }
7673
7697
  /* Color selection matching */
7674
- [data-v-167b1bd5] .cm-selectionMatch,[data-v-167b1bd5] .cm-matchingBracket {
7698
+ [data-v-6499ec1f] .cm-selectionMatch,[data-v-6499ec1f] .cm-matchingBracket {
7675
7699
  border-radius: var(--scalar-radius);
7676
7700
  background: var(--scalar-background-4) !important;
7677
7701
  }
7678
7702
  /* Color Picker Swatches */
7679
- [data-v-167b1bd5] .cm-css-color-picker-wrapper {
7703
+ [data-v-6499ec1f] .cm-css-color-picker-wrapper {
7680
7704
  display: inline-flex;
7681
7705
  outline: 1px solid var(--scalar-background-3);
7682
7706
  border-radius: 3px;
7683
7707
  overflow: hidden;
7684
7708
  }
7685
7709
  /* Number gutter */
7686
- [data-v-167b1bd5] .cm-gutters {
7710
+ [data-v-6499ec1f] .cm-gutters {
7687
7711
  background-color: transparent;
7688
7712
  border-right: none;
7689
7713
  color: var(--scalar-color-3);
@@ -7691,7 +7715,7 @@
7691
7715
  line-height: 22px;
7692
7716
  border-radius: 0 0 0 3px;
7693
7717
  }
7694
- [data-v-167b1bd5] .cm-gutters:before {
7718
+ [data-v-6499ec1f] .cm-gutters:before {
7695
7719
  content: '';
7696
7720
  position: absolute;
7697
7721
  top: 2px;
@@ -7701,7 +7725,7 @@
7701
7725
  border-radius: var(--scalar-radius) 0 0 var(--scalar-radius);
7702
7726
  background-color: var(--scalar-background-1);
7703
7727
  }
7704
- [data-v-167b1bd5] .cm-gutterElement {
7728
+ [data-v-6499ec1f] .cm-gutterElement {
7705
7729
  font-family: var(--scalar-font-code) !important;
7706
7730
  padding-left: 0px !important;
7707
7731
  padding-right: 6px !important;
@@ -7710,16 +7734,16 @@
7710
7734
  justify-content: flex-end;
7711
7735
  position: relative;
7712
7736
  }
7713
- [data-v-167b1bd5] .cm-lineNumbers .cm-gutterElement {
7737
+ [data-v-6499ec1f] .cm-lineNumbers .cm-gutterElement {
7714
7738
  min-width: fit-content;
7715
7739
  }
7716
- [data-v-167b1bd5] .cm-gutter + .cm-gutter :not(.cm-foldGutter) .cm-gutterElement {
7740
+ [data-v-6499ec1f] .cm-gutter + .cm-gutter :not(.cm-foldGutter) .cm-gutterElement {
7717
7741
  padding-left: 0 !important;
7718
7742
  }
7719
- [data-v-167b1bd5] .cm-scroller {
7743
+ [data-v-6499ec1f] .cm-scroller {
7720
7744
  overflow: auto;
7721
7745
  }
7722
- .line-wrapping[data-v-167b1bd5]:focus-within .cm-content {
7746
+ .line-wrapping[data-v-6499ec1f]:focus-within .cm-content {
7723
7747
  display: inline-table;
7724
7748
  min-height: fit-content;
7725
7749
  padding: 3px 6px;
@@ -8043,7 +8067,7 @@
8043
8067
  );
8044
8068
  }
8045
8069
 
8046
- [data-v-e861924b] .cm-content {
8070
+ [data-v-06778e40] .cm-content {
8047
8071
  font-size: var(--scalar-small);
8048
8072
  }
8049
8073
 
@@ -8064,10 +8088,10 @@
8064
8088
  scrollbar-width: none;
8065
8089
  }
8066
8090
 
8067
- [data-v-3157c3c7] .cm-editor {
8091
+ [data-v-819cea32] .cm-editor {
8068
8092
  padding: 0;
8069
8093
  }
8070
- [data-v-3157c3c7] .cm-content {
8094
+ [data-v-819cea32] .cm-content {
8071
8095
  align-items: center;
8072
8096
  background-color: transparent;
8073
8097
  display: flex;
@@ -8076,30 +8100,30 @@
8076
8100
  padding: 5px 8px;
8077
8101
  width: 100%;
8078
8102
  }
8079
- [data-v-3157c3c7] .cm-content:has(.cm-pill) {
8103
+ [data-v-819cea32] .cm-content:has(.cm-pill) {
8080
8104
  padding: 5px 8px;
8081
8105
  }
8082
- [data-v-3157c3c7] .cm-content .cm-pill:not(:last-of-type) {
8106
+ [data-v-819cea32] .cm-content .cm-pill:not(:last-of-type) {
8083
8107
  margin-right: 0.5px;
8084
8108
  }
8085
- [data-v-3157c3c7] .cm-content .cm-pill:not(:first-of-type) {
8109
+ [data-v-819cea32] .cm-content .cm-pill:not(:first-of-type) {
8086
8110
  margin-left: 0.5px;
8087
8111
  }
8088
- [data-v-3157c3c7] .cm-line {
8112
+ [data-v-819cea32] .cm-line {
8089
8113
  overflow: hidden;
8090
8114
  padding: 0;
8091
8115
  text-overflow: ellipsis;
8092
8116
  word-break: break-word;
8093
8117
  }
8094
- .required[data-v-3157c3c7]::after {
8118
+ .required[data-v-819cea32]::after {
8095
8119
  content: 'Required';
8096
8120
  }
8097
8121
  /* Tailwind placeholder is busted */
8098
- input[data-v-3157c3c7]::placeholder {
8122
+ input[data-v-819cea32]::placeholder {
8099
8123
  color: var(--scalar-color-3);
8100
8124
  }
8101
8125
  /* we want our inputs to look like a password input but not be one */
8102
- .scalar-password-input[data-v-3157c3c7] {
8126
+ .scalar-password-input[data-v-819cea32] {
8103
8127
  text-security: disc;
8104
8128
  -webkit-text-security: disc;
8105
8129
  -moz-text-security: disc;
@@ -8254,33 +8278,33 @@ to {
8254
8278
  }
8255
8279
  }
8256
8280
 
8257
- .request-card[data-v-0e4ddc16] {
8281
+ .request-card[data-v-59da314d] {
8258
8282
  font-size: var(--scalar-font-size-3);
8259
8283
  }
8260
- .request-method[data-v-0e4ddc16] {
8284
+ .request-method[data-v-59da314d] {
8261
8285
  font-family: var(--scalar-font-code);
8262
8286
  text-transform: uppercase;
8263
8287
  margin-right: 6px;
8264
8288
  }
8265
- .request-card-footer[data-v-0e4ddc16] {
8289
+ .request-card-footer[data-v-59da314d] {
8266
8290
  display: flex;
8267
8291
  justify-content: flex-end;
8268
8292
  padding: 6px;
8269
8293
  flex-shrink: 0;
8270
8294
  position: relative;
8271
8295
  }
8272
- .request-card-footer-addon[data-v-0e4ddc16] {
8296
+ .request-card-footer-addon[data-v-59da314d] {
8273
8297
  display: flex;
8274
8298
  align-items: center;
8275
8299
 
8276
8300
  flex: 1;
8277
8301
  min-width: 0;
8278
8302
  }
8279
- .request-editor-section[data-v-0e4ddc16] {
8303
+ .request-editor-section[data-v-59da314d] {
8280
8304
  display: flex;
8281
8305
  flex: 1;
8282
8306
  }
8283
- .request-card-simple[data-v-0e4ddc16] {
8307
+ .request-card-simple[data-v-59da314d] {
8284
8308
  display: flex;
8285
8309
  align-items: center;
8286
8310
  justify-content: space-between;
@@ -8289,7 +8313,7 @@ to {
8289
8313
 
8290
8314
  font-size: var(--scalar-small);
8291
8315
  }
8292
- .code-snippet[data-v-0e4ddc16] {
8316
+ .code-snippet[data-v-59da314d] {
8293
8317
  display: flex;
8294
8318
  flex-direction: column;
8295
8319
  width: 100%;
@@ -8342,27 +8366,27 @@ to {
8342
8366
  background: linear-gradient(rgba(0, 0, 0, 0.15), rgba(255, 255, 255, 0.1));
8343
8367
  }
8344
8368
 
8345
- .empty-sidebar-item-content[data-v-96a54993] {
8369
+ .empty-sidebar-item-content[data-v-8269f62b] {
8346
8370
  display: none;
8347
8371
  }
8348
- .empty-sidebar-item .empty-sidebar-item-content[data-v-96a54993] {
8372
+ .empty-sidebar-item .empty-sidebar-item-content[data-v-8269f62b] {
8349
8373
  display: block;
8350
8374
  }
8351
- .rabbitjump[data-v-96a54993] {
8375
+ .rabbitjump[data-v-8269f62b] {
8352
8376
  opacity: 0;
8353
8377
  }
8354
- .empty-sidebar-item:hover .rabbitjump[data-v-96a54993] {
8378
+ .empty-sidebar-item:hover .rabbitjump[data-v-8269f62b] {
8355
8379
  opacity: 1;
8356
- animation: rabbitAnimation-96a54993 0.5s steps(1) infinite;
8380
+ animation: rabbitAnimation-8269f62b 0.5s steps(1) infinite;
8357
8381
  }
8358
- .empty-sidebar-item:hover .rabbitsit[data-v-96a54993] {
8382
+ .empty-sidebar-item:hover .rabbitsit[data-v-8269f62b] {
8359
8383
  opacity: 0;
8360
- animation: rabbitAnimation2-96a54993 0.5s steps(1) infinite;
8384
+ animation: rabbitAnimation2-8269f62b 0.5s steps(1) infinite;
8361
8385
  }
8362
- .empty-sidebar-item:hover .rabbit-ascii[data-v-96a54993] {
8363
- animation: rabbitRun-96a54993 8s infinite linear;
8386
+ .empty-sidebar-item:hover .rabbit-ascii[data-v-8269f62b] {
8387
+ animation: rabbitRun-8269f62b 8s infinite linear;
8364
8388
  }
8365
- @keyframes rabbitRun-96a54993 {
8389
+ @keyframes rabbitRun-8269f62b {
8366
8390
  0% {
8367
8391
  transform: translate3d(0, 0, 0);
8368
8392
  }
@@ -8382,7 +8406,7 @@ to {
8382
8406
  transform: translate3d(0, 0, 0);
8383
8407
  }
8384
8408
  }
8385
- @keyframes rabbitAnimation-96a54993 {
8409
+ @keyframes rabbitAnimation-8269f62b {
8386
8410
  0%,
8387
8411
  100% {
8388
8412
  opacity: 1;
@@ -8391,7 +8415,7 @@ to {
8391
8415
  opacity: 0;
8392
8416
  }
8393
8417
  }
8394
- @keyframes rabbitAnimation2-96a54993 {
8418
+ @keyframes rabbitAnimation2-8269f62b {
8395
8419
  0%,
8396
8420
  100% {
8397
8421
  opacity: 0;
@@ -8766,16 +8790,16 @@ to {
8766
8790
  display: none;
8767
8791
  }
8768
8792
 
8769
- .scalar-collection-auth[data-v-6bba6b78] {
8793
+ .scalar-collection-auth[data-v-d3bc49bd] {
8770
8794
  border: var(--scalar-border-width) solid var(--scalar-border-color);
8771
8795
  border-radius: var(--scalar-radius-lg);
8772
8796
  overflow: hidden;
8773
8797
  }
8774
8798
 
8775
- [data-v-ddfccc08] .cm-editor {
8799
+ [data-v-2f13118d] .cm-editor {
8776
8800
  padding: 0;
8777
8801
  }
8778
- [data-v-ddfccc08] .cm-content {
8802
+ [data-v-2f13118d] .cm-content {
8779
8803
  align-items: center;
8780
8804
  background-color: transparent;
8781
8805
  display: flex;
@@ -8784,16 +8808,16 @@ to {
8784
8808
  padding: 5px 8px;
8785
8809
  width: 100%;
8786
8810
  }
8787
- [data-v-ddfccc08] .cm-content:has(.cm-pill) {
8811
+ [data-v-2f13118d] .cm-content:has(.cm-pill) {
8788
8812
  padding: 5px 8px;
8789
8813
  }
8790
- [data-v-ddfccc08] .cm-content .cm-pill:not(:last-of-type) {
8814
+ [data-v-2f13118d] .cm-content .cm-pill:not(:last-of-type) {
8791
8815
  margin-right: 0.5px;
8792
8816
  }
8793
- [data-v-ddfccc08] .cm-content .cm-pill:not(:first-of-type) {
8817
+ [data-v-2f13118d] .cm-content .cm-pill:not(:first-of-type) {
8794
8818
  margin-left: 0.5px;
8795
8819
  }
8796
- [data-v-ddfccc08] .cm-line {
8820
+ [data-v-2f13118d] .cm-line {
8797
8821
  overflow: hidden;
8798
8822
  padding: 0;
8799
8823
  text-overflow: ellipsis;
@@ -1 +1 @@
1
- {"version":3,"file":"OperationBlock.vue.d.ts","sourceRoot":"","sources":["../../../../src/v2/blocks/operation-block/OperationBlock.vue"],"names":[],"mappings":"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"}
1
+ {"version":3,"file":"OperationBlock.vue.d.ts","sourceRoot":"","sources":["../../../../src/v2/blocks/operation-block/OperationBlock.vue"],"names":[],"mappings":"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"}
@@ -1 +1 @@
1
- {"version":3,"file":"OperationBlock.vue.js","names":[],"sources":["../../../../src/v2/blocks/operation-block/OperationBlock.vue"],"sourcesContent":["<script lang=\"ts\">\n/**\n * OperationBlock\n *\n * Orchestrates the operation view by wiring together the Header, OperationBlock,\n * and ResponseBlock. Forwards user interactions to the workspace event bus and\n * passes through configuration such as auth, servers, plugins, and environment.\n * This component keeps the Operation page lean by centralizing event emission\n * and prop wiring between the blocks.\n *\n * Notable behavior:\n * - Uses operation['x-scalar-method'] and operation['x-scalar-path'] to provide\n * draft overrides for the UI when present.\n */\nexport default {\n name: 'OperationBlock',\n}\n\nexport type OperationBlockProps = {\n /** Event bus */\n eventBus: WorkspaceEventBus\n /** Application version */\n appVersion: string\n /** Openapi document */\n document: OpenApiDocument\n /** Workspace cookies */\n workspaceCookies: XScalarCookie[]\n /** Document cookies */\n documentCookies: XScalarCookie[]\n /** Current request path */\n path: string\n /** Current request method */\n method: HttpMethodType\n /** HTTP clients */\n httpClients: AvailableClients\n /** The history for the operation */\n history?: HistoryEntry[]\n /** Client layout */\n layout: ClientLayout\n /** Currently selected server */\n server: ServerObject | null\n /** Currently selected client */\n selectedClient: WorkspaceStore['workspace']['x-scalar-default-client']\n /** Server list available for operation/document */\n servers: ServerObject[]\n /** Meta information for the server */\n serverMeta: ServerMeta\n /** Hides the client button on the header */\n hideClientButton?: boolean\n /** Client integration */\n integration?: string | null\n /** Openapi document url for `modal` mode to open the client app */\n documentUrl?: string\n /** Client source */\n source?: 'gitbook' | 'api-reference'\n /** Operation object */\n operation: OperationObject\n /** Currently selected example key for the current operation */\n exampleKey: string\n /** Meta information for the auth update */\n authMeta: AuthMeta\n /** Document defined security schemes */\n securitySchemes: MergedSecuritySchemes\n /** Client plugins */\n plugins: ClientPlugin[]\n /** Environment list */\n environments?: string[]\n /** Currently selected environment */\n activeEnvironment?: string\n /** For environment variables in the inputs */\n environment: XScalarEnvironment\n /** The proxy URL for sending requests */\n proxyUrl: string\n /** Currently selected security */\n selectedSecurity: SelectedSecurity\n /** Currently selected security schemes */\n selectedSecuritySchemes: SecuritySchemeObjectSecret[]\n /** Security requirements */\n securityRequirements: OpenApiDocument['security']\n /** Default headers */\n defaultHeaders: Record<string, string>\n /** Selected anyOf/oneOf request-body variants keyed by schema path */\n requestBodyCompositionSelection?: Record<string, number>\n /** Subset of config options for the modal */\n options?: ModalProps['options']\n}\n</script>\n<script setup lang=\"ts\">\nimport { ERRORS } from '@scalar/helpers/errors/normalize-error'\nimport { isElectron } from '@scalar/helpers/general/is-electron'\nimport { buildSafeBodyRequest } from '@scalar/helpers/http/can-method-have-body'\nimport type { HttpMethod as HttpMethodType } from '@scalar/helpers/http/http-methods'\nimport { executeHook, type ClientPlugin } from '@scalar/oas-utils/helpers'\nimport {\n AVAILABLE_CLIENTS,\n type AvailableClients,\n} from '@scalar/types/snippetz'\nimport { useToasts } from '@scalar/use-toasts'\nimport type { WorkspaceStore } from '@scalar/workspace-store/client'\nimport type { SelectedSecurity } from '@scalar/workspace-store/entities/auth'\nimport type { HistoryEntry } from '@scalar/workspace-store/entities/history/schema'\nimport type {\n AuthMeta,\n ServerMeta,\n WorkspaceEventBus,\n} from '@scalar/workspace-store/events'\nimport {\n buildRequest,\n createVariablesStoreForRequest,\n getEnvironmentVariables,\n requestFactory,\n type MergedSecuritySchemes,\n type RequestPayload,\n type SecuritySchemeObjectSecret,\n} from '@scalar/workspace-store/request-example'\nimport type { XScalarEnvironment } from '@scalar/workspace-store/schemas/extensions/document/x-scalar-environments'\nimport type { XScalarCookie } from '@scalar/workspace-store/schemas/extensions/general/x-scalar-cookies'\nimport type {\n OpenApiDocument,\n ServerObject,\n} from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\nimport type { OperationObject } from '@scalar/workspace-store/schemas/v3.1/strict/operation'\nimport { computed, onBeforeUnmount, onMounted, ref, toValue, watch } from 'vue'\n\nimport ViewLayout from '@/components/ViewLayout/ViewLayout.vue'\nimport ViewLayoutContent from '@/components/ViewLayout/ViewLayoutContent.vue'\nimport { harToFetchRequest } from '@/v2/blocks/operation-block/helpers/har-to-fetch-request'\nimport { harToFetchResponse } from '@/v2/blocks/operation-block/helpers/har-to-fetch-response'\nimport {\n getOperationExampleKey,\n isStreamingResponse,\n responseCache,\n} from '@/v2/blocks/operation-block/helpers/response-cache'\nimport {\n sendRequest,\n type ResponseInstance,\n} from '@/v2/blocks/operation-block/helpers/send-request'\nimport { validatePathParameters } from '@/v2/blocks/operation-block/helpers/validate-path-parameters'\nimport { generateClientOptions } from '@/v2/blocks/operation-code-sample'\nimport { RequestBlock } from '@/v2/blocks/request-block'\nimport { ResponseBlock } from '@/v2/blocks/response-block'\nimport { type History } from '@/v2/blocks/scalar-address-bar-block'\nimport type { ModalProps } from '@/v2/features/modal/Modal.vue'\nimport type { ClientLayout } from '@/v2/types/layout'\n\nimport Header from './components/Header.vue'\n\nconst {\n authMeta,\n environment,\n eventBus,\n exampleKey,\n document,\n workspaceCookies = [],\n documentCookies = [],\n hideClientButton,\n httpClients = AVAILABLE_CLIENTS,\n history = [],\n method,\n operation,\n path,\n plugins = [],\n proxyUrl,\n requestBodyCompositionSelection,\n securitySchemes,\n selectedClient,\n server,\n environments,\n options,\n activeEnvironment,\n serverMeta,\n selectedSecurity,\n selectedSecuritySchemes,\n securityRequirements,\n defaultHeaders,\n} = defineProps<OperationBlockProps>()\n\n/** Hoist up client generation so it doesn't get re-generated on every operation */\nconst clientOptions = computed(() => generateClientOptions(httpClients))\n\nconst { toast } = useToasts()\n\n// Refs\nconst abortController = ref<AbortController | null>(null)\nconst response = ref<ResponseInstance | null>(null)\nconst requestPayload = ref<RequestPayload | null>(null)\n\n/** Cancel the request */\nconst cancelRequest = () => abortController.value?.abort(ERRORS.REQUEST_ABORTED)\n\n/** Execute the current operation example */\nconst handleExecute = async () => {\n const pathValidation = validatePathParameters(\n operation.parameters ?? [],\n exampleKey,\n )\n if (pathValidation.ok === false) {\n toast('Path parameters must have values.', 'error')\n return\n }\n\n const globalCookies = [...workspaceCookies, ...documentCookies]\n\n const { request: requestBuilder } = requestFactory({\n defaultHeaders,\n environment,\n exampleName: exampleKey,\n globalCookies,\n method,\n operation,\n path,\n proxyUrl,\n server,\n selectedSecuritySchemes,\n isElectron: isElectron(),\n requestBodyCompositionSelection,\n })\n\n // Stop any previous streaming response\n if (response.value && 'reader' in response.value) {\n response.value.reader.cancel()\n }\n\n const variablesStore = createVariablesStoreForRequest()\n\n // Execute the beforeRequest hook (plugins receive RequestFactory, not fetch Request)\n await executeHook(\n {\n requestBuilder,\n document,\n operation,\n variablesStore,\n },\n 'beforeRequest',\n plugins,\n )\n\n const envVariables = {\n ...getEnvironmentVariables(environment),\n ...variablesStore.getVariables(),\n }\n\n // Build the fetch Request after hooks may have mutated the factory\n const requestResult = (() => {\n try {\n return {\n ok: true,\n result: buildRequest(requestBuilder, {\n envVariables,\n }),\n } as const\n } catch (error) {\n const message = error instanceof Error ? error.message : String(error)\n return {\n ok: false,\n error: message,\n } as const\n }\n })()\n\n if (requestResult.ok === false) {\n toast(requestResult.error, 'error')\n return\n }\n\n // Store the abort controller for cancellation\n abortController.value = requestResult.result.controller\n\n // Execute the hooks\n eventBus.emit('hooks:on:request:sent', {\n meta: {\n method,\n path,\n exampleKey,\n },\n })\n\n /** Execute the request */\n const [sendError, sendResult] = await sendRequest({\n isUsingProxy: requestResult.result.isUsingProxy,\n requestPayload: requestResult.result.requestPayload,\n plugins,\n })\n\n if (sendResult) {\n // Execute the responseReceived hook\n await executeHook(\n {\n response: sendResult.originalResponse.clone(),\n requestBuilder,\n request: buildSafeBodyRequest(...sendResult.requestPayload),\n document,\n operation,\n variablesStore,\n },\n 'responseReceived',\n plugins,\n )\n }\n\n // Execute the hooks\n eventBus.emit('hooks:on:request:complete', {\n payload: sendResult\n ? {\n response: sendResult.originalResponse.clone(),\n requestPayload: sendResult.requestPayload,\n duration: sendResult.response.duration,\n timestamp: sendResult.timestamp,\n }\n : undefined,\n meta: {\n method,\n path,\n exampleKey,\n },\n })\n\n if (sendError) {\n // clean up the response and request\n response.value = null\n requestPayload.value = null\n abortController.value = null\n\n toast(sendError.message, 'error')\n return\n }\n\n // Store the response\n response.value = sendResult.response\n requestPayload.value = sendResult.requestPayload\n\n // Cache non-streaming responses so they can be restored when navigating back\n if (!isStreamingResponse(sendResult.response)) {\n responseCache.set(getOperationExampleKey(method, path, exampleKey), {\n response: sendResult.response,\n requestPayload: sendResult.requestPayload,\n })\n }\n}\n\nonMounted(() => {\n eventBus.on('operation:send:request:hotkey', handleExecute)\n eventBus.on('operation:cancel:request', cancelRequest)\n})\nonBeforeUnmount(() => {\n eventBus.off('operation:send:request:hotkey', handleExecute)\n eventBus.off('operation:cancel:request', cancelRequest)\n})\n\nconst operationHistory = computed<History[]>(() =>\n history\n .map((entry) => ({\n method: entry.request.method as HttpMethodType,\n path: entry.request.url,\n duration: entry.time,\n status: entry.response.status,\n }))\n .reverse(),\n)\n\nconst handleSelectHistoryItem = ({ index }: { index: number }) => {\n const transformedIndex = (history.length ?? 0) - index - 1\n const historyItem = history[transformedIndex]\n if (!historyItem) {\n return\n }\n\n const navigate = () =>\n eventBus.emit('ui:navigate', {\n page: 'example',\n method,\n path,\n exampleName: 'draft',\n callback: (status) => {\n // Do not replace the response if the navigation was not successful\n if (status !== 'success') {\n return\n }\n // Reconstruct the response\n const fetchResponse = harToFetchResponse({\n harResponse: historyItem.response,\n url: historyItem.request.url,\n method,\n path,\n duration: historyItem.time,\n })\n\n // Reconstruct the request\n const fetchRequest = harToFetchRequest({\n harRequest: historyItem.request,\n })\n\n // Update the response and request\n response.value = fetchResponse\n requestPayload.value = fetchRequest\n },\n })\n\n eventBus.emit('operation:reload:history', {\n meta: {\n path,\n method,\n },\n index: transformedIndex,\n callback: navigate,\n })\n}\n\n/**\n * When the path, method, or example key changes: save current response to\n * cache (so it can be restored when navigating back), then restore from cache\n * for the new operation or clear if no cached response. Response is only\n * cleared on page refresh or when making a new request for that operation.\n */\nwatch(\n [() => path, () => method, () => exampleKey],\n ([newPath, newMethod, newExampleKey]) => {\n const newKey = getOperationExampleKey(newMethod, newPath, newExampleKey)\n const cached = responseCache.get(newKey)\n if (cached) {\n response.value = cached.response\n requestPayload.value = cached.requestPayload\n } else {\n response.value = null\n requestPayload.value = null\n }\n\n // Cancel any in-flight request\n cancelRequest()\n },\n { immediate: true },\n)\n\nonBeforeUnmount(() => {\n // We cancel the request if the component is unmounted\n cancelRequest()\n})\n</script>\n<template>\n <div class=\"bg-b-1 flex h-full flex-col\">\n <div\n class=\"lg:min-h-header flex w-full flex-wrap items-center justify-center p-2 lg:p-0\">\n <!-- Address Bar -->\n <Header\n :activeEnvironment\n :documentUrl\n :environment\n :environments\n :eventBus\n :hideClientButton\n :history=\"operationHistory\"\n :integration\n :layout\n :method\n :path\n :server\n :serverMeta\n :servers\n :source\n @execute=\"handleExecute\"\n @select:history:item=\"handleSelectHistoryItem\" />\n </div>\n\n <ViewLayout class=\"border-t\">\n <ViewLayoutContent class=\"flex-1\">\n <!-- Request Section -->\n <RequestBlock\n :authMeta\n :clientOptions\n :defaultHeaders\n :documentCookies\n :environment\n :eventBus\n :exampleKey\n :layout\n :method\n :operation\n :options=\"toValue(options)\"\n :path\n :plugins\n :proxyUrl\n :requestBodyCompositionSelection\n :securityRequirements\n :securitySchemes\n :selectedClient\n :selectedSecurity\n :selectedSecuritySchemes\n :server\n :workspaceCookies />\n\n <!-- Response Section -->\n <ResponseBlock\n :appVersion\n :eventBus\n :layout\n :plugins\n :requestPayload\n :response\n :totalPerformedRequests=\"operationHistory.length\" />\n </ViewLayoutContent>\n </ViewLayout>\n </div>\n</template>\n"],"mappings":""}
1
+ {"version":3,"file":"OperationBlock.vue.js","names":[],"sources":["../../../../src/v2/blocks/operation-block/OperationBlock.vue"],"sourcesContent":["<script lang=\"ts\">\n/**\n * OperationBlock\n *\n * Orchestrates the operation view by wiring together the Header, OperationBlock,\n * and ResponseBlock. Forwards user interactions to the workspace event bus and\n * passes through configuration such as auth, servers, plugins, and environment.\n * This component keeps the Operation page lean by centralizing event emission\n * and prop wiring between the blocks.\n *\n * Notable behavior:\n * - Uses operation['x-scalar-method'] and operation['x-scalar-path'] to provide\n * draft overrides for the UI when present.\n */\nexport default {\n name: 'OperationBlock',\n}\n\nexport type OperationBlockProps = {\n /** Event bus */\n eventBus: WorkspaceEventBus\n /** Application version */\n appVersion: string\n /** Openapi document */\n document: OpenApiDocument\n /** Workspace cookies */\n workspaceCookies: XScalarCookie[]\n /** Document cookies */\n documentCookies: XScalarCookie[]\n /** Current request path */\n path: string\n /** Current request method */\n method: HttpMethodType\n /** HTTP clients */\n httpClients: AvailableClients\n /** The history for the operation */\n history?: HistoryEntry[]\n /** Client layout */\n layout: ClientLayout\n /** Currently selected server */\n server: ServerObject | null\n /** Currently selected client */\n selectedClient: WorkspaceStore['workspace']['x-scalar-default-client']\n /** Server list available for operation/document */\n servers: ServerObject[]\n /** Meta information for the server */\n serverMeta: ServerMeta\n /** Hides the client button on the header */\n hideClientButton?: boolean\n /** Client integration */\n integration?: string | null\n /** Openapi document url for `modal` mode to open the client app */\n documentUrl?: string\n /** Client source */\n source?: 'gitbook' | 'api-reference'\n /** Operation object */\n operation: OperationObject\n /** Currently selected example key for the current operation */\n exampleKey: string\n /** Meta information for the auth update */\n authMeta: AuthMeta\n /** Document defined security schemes */\n securitySchemes: MergedSecuritySchemes\n /** Client plugins */\n plugins: ClientPlugin[]\n /** Environment list */\n environments?: string[]\n /** Currently selected environment */\n activeEnvironment?: string\n /** For environment variables in the inputs */\n environment: XScalarEnvironment\n /** The proxy URL for sending requests */\n proxyUrl: string\n /** Currently selected security */\n selectedSecurity: SelectedSecurity\n /** Currently selected security schemes */\n selectedSecuritySchemes: SecuritySchemeObjectSecret[]\n /** Security requirements */\n securityRequirements: OpenApiDocument['security']\n /** Default headers */\n defaultHeaders: Record<string, string>\n /** Selected anyOf/oneOf request-body variants keyed by schema path */\n requestBodyCompositionSelection?: Record<string, number>\n /** Subset of config options for the modal */\n options?: ModalProps['options']\n}\n</script>\n<script setup lang=\"ts\">\nimport { ERRORS } from '@scalar/helpers/errors/normalize-error'\nimport { isElectron } from '@scalar/helpers/general/is-electron'\nimport { buildSafeBodyRequest } from '@scalar/helpers/http/can-method-have-body'\nimport type { HttpMethod as HttpMethodType } from '@scalar/helpers/http/http-methods'\nimport { executeHook, type ClientPlugin } from '@scalar/oas-utils/helpers'\nimport {\n AVAILABLE_CLIENTS,\n type AvailableClients,\n} from '@scalar/types/snippetz'\nimport { useToasts } from '@scalar/use-toasts'\nimport type { WorkspaceStore } from '@scalar/workspace-store/client'\nimport type { SelectedSecurity } from '@scalar/workspace-store/entities/auth'\nimport type { HistoryEntry } from '@scalar/workspace-store/entities/history/schema'\nimport type {\n AuthMeta,\n ServerMeta,\n WorkspaceEventBus,\n} from '@scalar/workspace-store/events'\nimport {\n buildRequest,\n createVariablesStoreForRequest,\n getEnvironmentVariables,\n requestFactory,\n type MergedSecuritySchemes,\n type RequestPayload,\n type SecuritySchemeObjectSecret,\n} from '@scalar/workspace-store/request-example'\nimport type { XScalarEnvironment } from '@scalar/workspace-store/schemas/extensions/document/x-scalar-environments'\nimport type { XScalarCookie } from '@scalar/workspace-store/schemas/extensions/general/x-scalar-cookies'\nimport type {\n OpenApiDocument,\n ServerObject,\n} from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\nimport type { OperationObject } from '@scalar/workspace-store/schemas/v3.1/strict/operation'\nimport { computed, onBeforeUnmount, onMounted, ref, toValue, watch } from 'vue'\n\nimport ViewLayout from '@/components/ViewLayout/ViewLayout.vue'\nimport ViewLayoutContent from '@/components/ViewLayout/ViewLayoutContent.vue'\nimport { harToFetchRequest } from '@/v2/blocks/operation-block/helpers/har-to-fetch-request'\nimport { harToFetchResponse } from '@/v2/blocks/operation-block/helpers/har-to-fetch-response'\nimport {\n getOperationExampleKey,\n isStreamingResponse,\n responseCache,\n} from '@/v2/blocks/operation-block/helpers/response-cache'\nimport {\n sendRequest,\n type ResponseInstance,\n} from '@/v2/blocks/operation-block/helpers/send-request'\nimport { validatePathParameters } from '@/v2/blocks/operation-block/helpers/validate-path-parameters'\nimport { generateClientOptions } from '@/v2/blocks/operation-code-sample'\nimport { RequestBlock } from '@/v2/blocks/request-block'\nimport { ResponseBlock } from '@/v2/blocks/response-block'\nimport { type History } from '@/v2/blocks/scalar-address-bar-block'\nimport type { ModalProps } from '@/v2/features/modal/Modal.vue'\nimport type { ClientLayout } from '@/v2/types/layout'\n\nimport Header from './components/Header.vue'\n\nconst {\n authMeta,\n environment,\n eventBus,\n exampleKey,\n document,\n workspaceCookies = [],\n documentCookies = [],\n hideClientButton,\n httpClients = AVAILABLE_CLIENTS,\n history = [],\n method,\n operation,\n path,\n plugins = [],\n proxyUrl,\n requestBodyCompositionSelection,\n securitySchemes,\n selectedClient,\n server,\n environments,\n options,\n activeEnvironment,\n serverMeta,\n selectedSecurity,\n selectedSecuritySchemes,\n securityRequirements,\n defaultHeaders,\n} = defineProps<OperationBlockProps>()\n\n/** Hoist up client generation so it doesn't get re-generated on every operation */\nconst clientOptions = computed(() => generateClientOptions(httpClients))\n\nconst { toast } = useToasts()\n\n// Refs\nconst abortController = ref<AbortController | null>(null)\nconst response = ref<ResponseInstance | null>(null)\nconst requestPayload = ref<RequestPayload | null>(null)\n\n/** Cancel the request */\nconst cancelRequest = () => abortController.value?.abort(ERRORS.REQUEST_ABORTED)\n\n/** Execute the current operation example */\nconst handleExecute = async () => {\n const pathValidation = validatePathParameters(\n operation.parameters ?? [],\n exampleKey,\n )\n if (pathValidation.ok === false) {\n toast('Path parameters must have values.', 'error')\n return\n }\n\n const globalCookies = [...workspaceCookies, ...documentCookies]\n\n const { request: requestBuilder } = requestFactory({\n defaultHeaders,\n environment,\n exampleName: exampleKey,\n globalCookies,\n method,\n operation,\n path,\n proxyUrl,\n server,\n selectedSecuritySchemes,\n isElectron: isElectron(),\n requestBodyCompositionSelection,\n })\n\n // Stop any previous streaming response\n if (response.value && 'reader' in response.value) {\n response.value.reader.cancel()\n }\n\n const variablesStore = createVariablesStoreForRequest()\n\n // Execute the beforeRequest hook (plugins receive RequestFactory, not fetch Request)\n await executeHook(\n {\n requestBuilder,\n document,\n operation,\n variablesStore,\n },\n 'beforeRequest',\n plugins,\n )\n\n const envVariables = {\n ...getEnvironmentVariables(environment),\n ...variablesStore.getVariables(),\n }\n\n // Build the fetch Request after hooks may have mutated the factory\n const requestResult = (() => {\n try {\n return {\n ok: true,\n result: buildRequest(requestBuilder, {\n envVariables,\n }),\n } as const\n } catch (error) {\n const message = error instanceof Error ? error.message : String(error)\n return {\n ok: false,\n error: message,\n } as const\n }\n })()\n\n if (requestResult.ok === false) {\n toast(requestResult.error, 'error')\n return\n }\n\n // Store the abort controller for cancellation\n abortController.value = requestResult.result.controller\n\n // Execute the hooks\n eventBus.emit('hooks:on:request:sent', {\n meta: {\n method,\n path,\n exampleKey,\n },\n })\n\n /** Execute the request */\n const [sendError, sendResult] = await sendRequest({\n isUsingProxy: requestResult.result.isUsingProxy,\n requestPayload: requestResult.result.requestPayload,\n plugins,\n customFetch: toValue(options)?.customFetch,\n })\n\n if (sendResult) {\n // Execute the responseReceived hook\n await executeHook(\n {\n response: sendResult.originalResponse.clone(),\n requestBuilder,\n request: buildSafeBodyRequest(...sendResult.requestPayload),\n document,\n operation,\n variablesStore,\n },\n 'responseReceived',\n plugins,\n )\n }\n\n // Execute the hooks\n eventBus.emit('hooks:on:request:complete', {\n payload: sendResult\n ? {\n response: sendResult.originalResponse.clone(),\n requestPayload: sendResult.requestPayload,\n duration: sendResult.response.duration,\n timestamp: sendResult.timestamp,\n }\n : undefined,\n meta: {\n method,\n path,\n exampleKey,\n },\n })\n\n if (sendError) {\n // clean up the response and request\n response.value = null\n requestPayload.value = null\n abortController.value = null\n\n toast(sendError.message, 'error')\n return\n }\n\n // Store the response\n response.value = sendResult.response\n requestPayload.value = sendResult.requestPayload\n\n // Cache non-streaming responses so they can be restored when navigating back\n if (!isStreamingResponse(sendResult.response)) {\n responseCache.set(getOperationExampleKey(method, path, exampleKey), {\n response: sendResult.response,\n requestPayload: sendResult.requestPayload,\n })\n }\n}\n\nonMounted(() => {\n eventBus.on('operation:send:request:hotkey', handleExecute)\n eventBus.on('operation:cancel:request', cancelRequest)\n})\nonBeforeUnmount(() => {\n eventBus.off('operation:send:request:hotkey', handleExecute)\n eventBus.off('operation:cancel:request', cancelRequest)\n})\n\nconst operationHistory = computed<History[]>(() =>\n history\n .map((entry) => ({\n method: entry.request.method as HttpMethodType,\n path: entry.request.url,\n duration: entry.time,\n status: entry.response.status,\n }))\n .reverse(),\n)\n\nconst handleSelectHistoryItem = ({ index }: { index: number }) => {\n const transformedIndex = (history.length ?? 0) - index - 1\n const historyItem = history[transformedIndex]\n if (!historyItem) {\n return\n }\n\n const navigate = () =>\n eventBus.emit('ui:navigate', {\n page: 'example',\n method,\n path,\n exampleName: 'draft',\n callback: (status) => {\n // Do not replace the response if the navigation was not successful\n if (status !== 'success') {\n return\n }\n // Reconstruct the response\n const fetchResponse = harToFetchResponse({\n harResponse: historyItem.response,\n url: historyItem.request.url,\n method,\n path,\n duration: historyItem.time,\n })\n\n // Reconstruct the request\n const fetchRequest = harToFetchRequest({\n harRequest: historyItem.request,\n })\n\n // Update the response and request\n response.value = fetchResponse\n requestPayload.value = fetchRequest\n },\n })\n\n eventBus.emit('operation:reload:history', {\n meta: {\n path,\n method,\n },\n index: transformedIndex,\n callback: navigate,\n })\n}\n\n/**\n * When the path, method, or example key changes: save current response to\n * cache (so it can be restored when navigating back), then restore from cache\n * for the new operation or clear if no cached response. Response is only\n * cleared on page refresh or when making a new request for that operation.\n */\nwatch(\n [() => path, () => method, () => exampleKey],\n ([newPath, newMethod, newExampleKey]) => {\n const newKey = getOperationExampleKey(newMethod, newPath, newExampleKey)\n const cached = responseCache.get(newKey)\n if (cached) {\n response.value = cached.response\n requestPayload.value = cached.requestPayload\n } else {\n response.value = null\n requestPayload.value = null\n }\n\n // Cancel any in-flight request\n cancelRequest()\n },\n { immediate: true },\n)\n\nonBeforeUnmount(() => {\n // We cancel the request if the component is unmounted\n cancelRequest()\n})\n</script>\n<template>\n <div class=\"bg-b-1 flex h-full flex-col\">\n <div\n class=\"lg:min-h-header flex w-full flex-wrap items-center justify-center p-2 lg:p-0\">\n <!-- Address Bar -->\n <Header\n :activeEnvironment\n :documentUrl\n :environment\n :environments\n :eventBus\n :hideClientButton\n :history=\"operationHistory\"\n :integration\n :layout\n :method\n :path\n :server\n :serverMeta\n :servers\n :source\n @execute=\"handleExecute\"\n @select:history:item=\"handleSelectHistoryItem\" />\n </div>\n\n <ViewLayout class=\"border-t\">\n <ViewLayoutContent class=\"flex-1\">\n <!-- Request Section -->\n <RequestBlock\n :authMeta\n :clientOptions\n :defaultHeaders\n :documentCookies\n :environment\n :eventBus\n :exampleKey\n :layout\n :method\n :operation\n :options=\"toValue(options)\"\n :path\n :plugins\n :proxyUrl\n :requestBodyCompositionSelection\n :securityRequirements\n :securitySchemes\n :selectedClient\n :selectedSecurity\n :selectedSecuritySchemes\n :server\n :workspaceCookies />\n\n <!-- Response Section -->\n <ResponseBlock\n :appVersion\n :eventBus\n :layout\n :plugins\n :requestPayload\n :response\n :totalPerformedRequests=\"operationHistory.length\" />\n </ViewLayoutContent>\n </ViewLayout>\n </div>\n</template>\n"],"mappings":""}
@@ -126,7 +126,8 @@ var OperationBlock_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */
126
126
  const [sendError, sendResult] = await sendRequest({
127
127
  isUsingProxy: requestResult.result.isUsingProxy,
128
128
  requestPayload: requestResult.result.requestPayload,
129
- plugins: __props.plugins
129
+ plugins: __props.plugins,
130
+ customFetch: toValue(__props.options)?.customFetch
130
131
  });
131
132
  if (sendResult) await executeHook({
132
133
  response: sendResult.originalResponse.clone(),