@scalar/api-client 3.3.1 → 3.4.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 (185) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/dist/monacoeditorwork/yaml.worker.bundle.js +92 -79
  3. package/dist/style.css +87 -57
  4. package/dist/v2/blocks/operation-block/OperationBlock.vue.d.ts +2 -0
  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 +5 -0
  8. package/dist/v2/blocks/operation-block/OperationBlock.vue.script.js.map +1 -1
  9. package/dist/v2/blocks/operation-block/components/Header.vue.d.ts +4 -0
  10. package/dist/v2/blocks/operation-block/components/Header.vue.d.ts.map +1 -1
  11. package/dist/v2/blocks/operation-block/components/Header.vue.js +1 -1
  12. package/dist/v2/blocks/operation-block/components/Header.vue.js.map +1 -1
  13. package/dist/v2/blocks/operation-block/components/Header.vue.script.js +6 -0
  14. package/dist/v2/blocks/operation-block/components/Header.vue.script.js.map +1 -1
  15. package/dist/v2/blocks/operation-block/helpers/response-cache.d.ts +2 -1
  16. package/dist/v2/blocks/operation-block/helpers/response-cache.d.ts.map +1 -1
  17. package/dist/v2/blocks/operation-block/helpers/response-cache.js +9 -2
  18. package/dist/v2/blocks/operation-block/helpers/response-cache.js.map +1 -1
  19. package/dist/v2/blocks/request-block/RequestBlock.vue.script.js.map +1 -1
  20. package/dist/v2/blocks/request-block/components/RequestTable.vue.d.ts +2 -2
  21. package/dist/v2/blocks/request-block/components/RequestTableRow.vue.d.ts +2 -2
  22. package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue.d.ts +4 -0
  23. package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue.d.ts.map +1 -1
  24. package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue.js +1 -1
  25. package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue.js.map +1 -1
  26. package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue.script.js +84 -71
  27. package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue.script.js.map +1 -1
  28. package/dist/v2/blocks/scalar-address-bar-block/helpers/is-placeholder-path.d.ts +13 -0
  29. package/dist/v2/blocks/scalar-address-bar-block/helpers/is-placeholder-path.d.ts.map +1 -0
  30. package/dist/v2/blocks/scalar-address-bar-block/helpers/is-placeholder-path.js +28 -0
  31. package/dist/v2/blocks/scalar-address-bar-block/helpers/is-placeholder-path.js.map +1 -0
  32. package/dist/v2/blocks/scalar-address-bar-block/helpers/refocus-blur-target.d.ts +16 -0
  33. package/dist/v2/blocks/scalar-address-bar-block/helpers/refocus-blur-target.d.ts.map +1 -0
  34. package/dist/v2/blocks/scalar-address-bar-block/helpers/refocus-blur-target.js +28 -0
  35. package/dist/v2/blocks/scalar-address-bar-block/helpers/refocus-blur-target.js.map +1 -0
  36. package/dist/v2/blocks/scalar-address-bar-block/hooks/use-path-masking.d.ts +31 -0
  37. package/dist/v2/blocks/scalar-address-bar-block/hooks/use-path-masking.d.ts.map +1 -0
  38. package/dist/v2/blocks/scalar-address-bar-block/hooks/use-path-masking.js +18 -0
  39. package/dist/v2/blocks/scalar-address-bar-block/hooks/use-path-masking.js.map +1 -0
  40. package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.script.js.map +1 -1
  41. package/dist/v2/components/code-input/CodeInput.vue.js +1 -1
  42. package/dist/v2/components/code-input/CodeInput.vue.js.map +1 -1
  43. package/dist/v2/components/code-input/CodeInput.vue.script.js +1 -1
  44. package/dist/v2/components/code-input/CodeInput.vue.script.js.map +1 -1
  45. package/dist/v2/constants.js +1 -1
  46. package/dist/v2/features/app/App.vue.d.ts +25 -1
  47. package/dist/v2/features/app/App.vue.d.ts.map +1 -1
  48. package/dist/v2/features/app/App.vue.js.map +1 -1
  49. package/dist/v2/features/app/App.vue.script.js +54 -39
  50. package/dist/v2/features/app/App.vue.script.js.map +1 -1
  51. package/dist/v2/features/app/app-events.js +4 -4
  52. package/dist/v2/features/app/app-events.js.map +1 -1
  53. package/dist/v2/features/app/app-state.d.ts +20 -14
  54. package/dist/v2/features/app/app-state.d.ts.map +1 -1
  55. package/dist/v2/features/app/app-state.js +89 -55
  56. package/dist/v2/features/app/app-state.js.map +1 -1
  57. package/dist/v2/features/app/components/AppHeader.vue.d.ts +26 -3
  58. package/dist/v2/features/app/components/AppHeader.vue.d.ts.map +1 -1
  59. package/dist/v2/features/app/components/AppHeader.vue.js.map +1 -1
  60. package/dist/v2/features/app/components/AppHeader.vue.script.js +15 -6
  61. package/dist/v2/features/app/components/AppHeader.vue.script.js.map +1 -1
  62. package/dist/v2/features/app/components/AppSidebar.vue.d.ts +2 -2
  63. package/dist/v2/features/app/components/AppSidebar.vue.d.ts.map +1 -1
  64. package/dist/v2/features/app/components/AppSidebar.vue.js +1 -1
  65. package/dist/v2/features/app/components/AppSidebar.vue.js.map +1 -1
  66. package/dist/v2/features/app/components/AppSidebar.vue.script.js +86 -108
  67. package/dist/v2/features/app/components/AppSidebar.vue.script.js.map +1 -1
  68. package/dist/v2/features/app/components/CreateVersionModal.vue.d.ts +28 -0
  69. package/dist/v2/features/app/components/CreateVersionModal.vue.d.ts.map +1 -0
  70. package/dist/v2/features/app/components/CreateVersionModal.vue.js +7 -0
  71. package/dist/v2/features/app/components/CreateVersionModal.vue.js.map +1 -0
  72. package/dist/v2/features/app/components/CreateVersionModal.vue.script.js +84 -0
  73. package/dist/v2/features/app/components/CreateVersionModal.vue.script.js.map +1 -0
  74. package/dist/v2/features/app/components/DocumentBreadcrumb.vue.d.ts +26 -0
  75. package/dist/v2/features/app/components/DocumentBreadcrumb.vue.d.ts.map +1 -0
  76. package/dist/v2/features/app/components/DocumentBreadcrumb.vue.js +9 -0
  77. package/dist/v2/features/app/components/DocumentBreadcrumb.vue.js.map +1 -0
  78. package/dist/v2/features/app/components/DocumentBreadcrumb.vue.script.js +376 -0
  79. package/dist/v2/features/app/components/DocumentBreadcrumb.vue.script.js.map +1 -0
  80. package/dist/v2/features/app/components/DocumentSyncIndicator.vue.d.ts +16 -0
  81. package/dist/v2/features/app/components/DocumentSyncIndicator.vue.d.ts.map +1 -0
  82. package/dist/v2/features/app/components/DocumentSyncIndicator.vue.js +7 -0
  83. package/dist/v2/features/app/components/DocumentSyncIndicator.vue.js.map +1 -0
  84. package/dist/v2/features/app/components/DocumentSyncIndicator.vue.script.js +51 -0
  85. package/dist/v2/features/app/components/DocumentSyncIndicator.vue.script.js.map +1 -0
  86. package/dist/v2/features/app/components/SidebarDocument.vue.d.ts +45 -0
  87. package/dist/v2/features/app/components/SidebarDocument.vue.d.ts.map +1 -0
  88. package/dist/v2/features/app/components/SidebarDocument.vue.js +7 -0
  89. package/dist/v2/features/app/components/SidebarDocument.vue.js.map +1 -0
  90. package/dist/v2/features/app/components/SidebarDocument.vue.script.js +137 -0
  91. package/dist/v2/features/app/components/SidebarDocument.vue.script.js.map +1 -0
  92. package/dist/v2/features/app/helpers/check-version-conflict.d.ts +51 -0
  93. package/dist/v2/features/app/helpers/check-version-conflict.d.ts.map +1 -0
  94. package/dist/v2/features/app/helpers/check-version-conflict.js +79 -0
  95. package/dist/v2/features/app/helpers/check-version-conflict.js.map +1 -0
  96. package/dist/v2/features/app/helpers/compute-version-status.d.ts +45 -0
  97. package/dist/v2/features/app/helpers/compute-version-status.d.ts.map +1 -0
  98. package/dist/v2/features/app/helpers/compute-version-status.js +18 -0
  99. package/dist/v2/features/app/helpers/compute-version-status.js.map +1 -0
  100. package/dist/v2/features/app/helpers/create-draft-registry-document.d.ts +39 -0
  101. package/dist/v2/features/app/helpers/create-draft-registry-document.d.ts.map +1 -0
  102. package/dist/v2/features/app/helpers/create-draft-registry-document.js +64 -0
  103. package/dist/v2/features/app/helpers/create-draft-registry-document.js.map +1 -0
  104. package/dist/v2/features/app/helpers/create-temp-operation.d.ts.map +1 -1
  105. package/dist/v2/features/app/helpers/create-temp-operation.js +5 -8
  106. package/dist/v2/features/app/helpers/create-temp-operation.js.map +1 -1
  107. package/dist/v2/features/app/helpers/detect-document-conflicts.d.ts +26 -0
  108. package/dist/v2/features/app/helpers/detect-document-conflicts.d.ts.map +1 -0
  109. package/dist/v2/features/app/helpers/detect-document-conflicts.js +27 -0
  110. package/dist/v2/features/app/helpers/detect-document-conflicts.js.map +1 -0
  111. package/dist/v2/features/app/helpers/filter-workspaces.d.ts +14 -14
  112. package/dist/v2/features/app/helpers/filter-workspaces.d.ts.map +1 -1
  113. package/dist/v2/features/app/helpers/filter-workspaces.js +15 -15
  114. package/dist/v2/features/app/helpers/filter-workspaces.js.map +1 -1
  115. package/dist/v2/features/app/helpers/group-workspaces.d.ts +23 -3
  116. package/dist/v2/features/app/helpers/group-workspaces.d.ts.map +1 -1
  117. package/dist/v2/features/app/helpers/group-workspaces.js +22 -7
  118. package/dist/v2/features/app/helpers/group-workspaces.js.map +1 -1
  119. package/dist/v2/features/app/helpers/load-registry-document.d.ts +16 -1
  120. package/dist/v2/features/app/helpers/load-registry-document.d.ts.map +1 -1
  121. package/dist/v2/features/app/helpers/load-registry-document.js +7 -6
  122. package/dist/v2/features/app/helpers/load-registry-document.js.map +1 -1
  123. package/dist/v2/features/app/helpers/routes.d.ts +5 -1
  124. package/dist/v2/features/app/helpers/routes.d.ts.map +1 -1
  125. package/dist/v2/features/app/helpers/routes.js +1 -1
  126. package/dist/v2/features/app/helpers/routes.js.map +1 -1
  127. package/dist/v2/features/app/helpers/version-status-presentation.d.ts +24 -0
  128. package/dist/v2/features/app/helpers/version-status-presentation.d.ts.map +1 -0
  129. package/dist/v2/features/app/helpers/version-status-presentation.js +43 -0
  130. package/dist/v2/features/app/helpers/version-status-presentation.js.map +1 -0
  131. package/dist/v2/features/app/hooks/use-active-document-version.d.ts +41 -0
  132. package/dist/v2/features/app/hooks/use-active-document-version.d.ts.map +1 -0
  133. package/dist/v2/features/app/hooks/use-active-document-version.js +60 -0
  134. package/dist/v2/features/app/hooks/use-active-document-version.js.map +1 -0
  135. package/dist/v2/features/app/hooks/use-sidebar-documents.d.ts +71 -23
  136. package/dist/v2/features/app/hooks/use-sidebar-documents.d.ts.map +1 -1
  137. package/dist/v2/features/app/hooks/use-sidebar-documents.js +167 -45
  138. package/dist/v2/features/app/hooks/use-sidebar-documents.js.map +1 -1
  139. package/dist/v2/features/app/hooks/use-version-conflict-check.d.ts +35 -0
  140. package/dist/v2/features/app/hooks/use-version-conflict-check.d.ts.map +1 -0
  141. package/dist/v2/features/app/hooks/use-version-conflict-check.js +62 -0
  142. package/dist/v2/features/app/hooks/use-version-conflict-check.js.map +1 -0
  143. package/dist/v2/features/collection/DocumentCollection.vue.d.ts.map +1 -1
  144. package/dist/v2/features/collection/DocumentCollection.vue.js.map +1 -1
  145. package/dist/v2/features/collection/DocumentCollection.vue.script.js +6 -1
  146. package/dist/v2/features/collection/DocumentCollection.vue.script.js.map +1 -1
  147. package/dist/v2/features/collection/OperationCollection.vue.script.js +1 -0
  148. package/dist/v2/features/collection/OperationCollection.vue.script.js.map +1 -1
  149. package/dist/v2/features/collection/WorkspaceCollection.vue.script.js +1 -0
  150. package/dist/v2/features/collection/WorkspaceCollection.vue.script.js.map +1 -1
  151. package/dist/v2/features/collection/components/Authentication.vue.script.js +1 -0
  152. package/dist/v2/features/collection/components/Authentication.vue.script.js.map +1 -1
  153. package/dist/v2/features/collection/components/Cookies.vue.script.js +1 -0
  154. package/dist/v2/features/collection/components/Cookies.vue.script.js.map +1 -1
  155. package/dist/v2/features/collection/components/Editor/Editor.vue.script.js +1 -0
  156. package/dist/v2/features/collection/components/Editor/Editor.vue.script.js.map +1 -1
  157. package/dist/v2/features/collection/components/Environment.vue.script.js +1 -0
  158. package/dist/v2/features/collection/components/Environment.vue.script.js.map +1 -1
  159. package/dist/v2/features/collection/components/GetStarted.vue.d.ts +12 -4
  160. package/dist/v2/features/collection/components/GetStarted.vue.d.ts.map +1 -1
  161. package/dist/v2/features/collection/components/GetStarted.vue.js.map +1 -1
  162. package/dist/v2/features/collection/components/GetStarted.vue.script.js +56 -13
  163. package/dist/v2/features/collection/components/GetStarted.vue.script.js.map +1 -1
  164. package/dist/v2/features/collection/components/Overview.vue.script.js +1 -0
  165. package/dist/v2/features/collection/components/Overview.vue.script.js.map +1 -1
  166. package/dist/v2/features/collection/components/Runner/components/Runner.vue.script.js +1 -0
  167. package/dist/v2/features/collection/components/Runner/components/Runner.vue.script.js.map +1 -1
  168. package/dist/v2/features/collection/components/Runner/hooks/use-runner-execution.js +2 -2
  169. package/dist/v2/features/collection/components/Runner/hooks/use-runner-execution.js.map +1 -1
  170. package/dist/v2/features/collection/components/Scripts.vue.script.js +1 -0
  171. package/dist/v2/features/collection/components/Scripts.vue.script.js.map +1 -1
  172. package/dist/v2/features/collection/components/Servers.vue.script.js +1 -0
  173. package/dist/v2/features/collection/components/Servers.vue.script.js.map +1 -1
  174. package/dist/v2/features/collection/components/Settings.vue.script.js +1 -0
  175. package/dist/v2/features/collection/components/Settings.vue.script.js.map +1 -1
  176. package/dist/v2/features/editor/hooks/use-three-way-merge-editor.js +1 -1
  177. package/dist/v2/features/operation/Operation.vue.d.ts.map +1 -1
  178. package/dist/v2/features/operation/Operation.vue.js.map +1 -1
  179. package/dist/v2/features/operation/Operation.vue.script.js +3 -0
  180. package/dist/v2/features/operation/Operation.vue.script.js.map +1 -1
  181. package/dist/v2/helpers/safe-run.d.ts +25 -1
  182. package/dist/v2/helpers/safe-run.d.ts.map +1 -1
  183. package/dist/v2/helpers/safe-run.js +26 -2
  184. package/dist/v2/helpers/safe-run.js.map +1 -1
  185. package/package.json +12 -11
package/dist/style.css CHANGED
@@ -3027,10 +3027,6 @@
3027
3027
  margin: 0 !important;
3028
3028
  }
3029
3029
 
3030
- .scalar-app .-m-\(--scalar-sidebar-padding\) {
3031
- margin: calc(var(--scalar-sidebar-padding) * -1);
3032
- }
3033
-
3034
3030
  .scalar-app .-m-1 {
3035
3031
  margin: -4px;
3036
3032
  }
@@ -3047,6 +3043,10 @@
3047
3043
  margin: 4px;
3048
3044
  }
3049
3045
 
3046
+ .scalar-app .-mx-\(--scalar-sidebar-padding\) {
3047
+ margin-inline: calc(var(--scalar-sidebar-padding) * -1);
3048
+ }
3049
+
3050
3050
  .scalar-app .-mx-0\.75 {
3051
3051
  margin-inline: -3px;
3052
3052
  }
@@ -3083,6 +3083,10 @@
3083
3083
  margin-block: 6px;
3084
3084
  }
3085
3085
 
3086
+ .scalar-app .-mt-\(--scalar-sidebar-padding\) {
3087
+ margin-top: calc(var(--scalar-sidebar-padding) * -1);
3088
+ }
3089
+
3086
3090
  .scalar-app .-mt-1\.5 {
3087
3091
  margin-top: -6px;
3088
3092
  }
@@ -3258,10 +3262,6 @@
3258
3262
  width: 192px;
3259
3263
  }
3260
3264
 
3261
- .scalar-app .w-64 {
3262
- width: 256px;
3263
- }
3264
-
3265
3265
  .scalar-app .w-\[38px\] {
3266
3266
  width: 38px;
3267
3267
  }
@@ -3536,10 +3536,6 @@
3536
3536
  background-color: #00000038;
3537
3537
  }
3538
3538
 
3539
- .scalar-app .bg-border {
3540
- background-color: var(--scalar-border-color);
3541
- }
3542
-
3543
3539
  .scalar-app .bg-inherit {
3544
3540
  background-color: inherit;
3545
3541
  }
@@ -3661,6 +3657,10 @@
3661
3657
  padding-block: 6.75px;
3662
3658
  }
3663
3659
 
3660
+ .scalar-app .pt-\(--scalar-sidebar-padding\) {
3661
+ padding-top: var(--scalar-sidebar-padding);
3662
+ }
3663
+
3664
3664
  .scalar-app .pr-\[100\%\] {
3665
3665
  padding-right: 100%;
3666
3666
  }
@@ -4979,6 +4979,10 @@
4979
4979
  width: 224px;
4980
4980
  }
4981
4981
 
4982
+ .scalar-app .w-64 {
4983
+ width: 256px;
4984
+ }
4985
+
4982
4986
  .scalar-app .w-72 {
4983
4987
  width: 288px;
4984
4988
  }
@@ -5059,6 +5063,10 @@
5059
5063
  max-width: calc(100% - 32px);
5060
5064
  }
5061
5065
 
5066
+ .scalar-app .max-w-sm {
5067
+ max-width: 384px;
5068
+ }
5069
+
5062
5070
  .scalar-app .min-w-0 {
5063
5071
  min-width: 0;
5064
5072
  }
@@ -5754,6 +5762,10 @@
5754
5762
  background-color: var(--scalar-background-danger);
5755
5763
  }
5756
5764
 
5765
+ .scalar-app .bg-border {
5766
+ background-color: var(--scalar-border-color);
5767
+ }
5768
+
5757
5769
  .scalar-app .bg-c-accent, .scalar-app .bg-c-accent\/5 {
5758
5770
  background-color: var(--scalar-color-accent);
5759
5771
  }
@@ -6186,6 +6198,10 @@
6186
6198
  padding-left: 48px;
6187
6199
  }
6188
6200
 
6201
+ .scalar-app .pl-px {
6202
+ padding-left: 1px;
6203
+ }
6204
+
6189
6205
  .scalar-app .text-center {
6190
6206
  text-align: center;
6191
6207
  }
@@ -7211,6 +7227,10 @@
7211
7227
  color: var(--scalar-color-2);
7212
7228
  }
7213
7229
 
7230
+ .scalar-app .disabled\:opacity-50:disabled {
7231
+ opacity: .5;
7232
+ }
7233
+
7214
7234
  .scalar-app .has-focus-visible\:bg-b-1:has(:focus-visible) {
7215
7235
  background-color: var(--scalar-background-1);
7216
7236
  }
@@ -7662,23 +7682,23 @@
7662
7682
  /*
7663
7683
  Deep styling for customizing Codemirror
7664
7684
  */
7665
- [data-v-6499ec1f] .cm-editor {
7685
+ [data-v-3118bf46] .cm-editor {
7666
7686
  height: 100%;
7667
7687
  outline: none;
7668
7688
  padding: 0;
7669
7689
  background: transparent;
7670
7690
  }
7671
- [data-v-6499ec1f] .cm-placeholder {
7691
+ [data-v-3118bf46] .cm-placeholder {
7672
7692
  color: var(--scalar-color-3);
7673
7693
  }
7674
- [data-v-6499ec1f] .cm-content {
7694
+ [data-v-3118bf46] .cm-content {
7675
7695
  font-family: var(--scalar-font-code);
7676
7696
  font-size: var(--scalar-small);
7677
7697
  max-height: 20px;
7678
7698
  padding: 8px 0;
7679
7699
  }
7680
7700
  /* Tooltip helper */
7681
- [data-v-6499ec1f] .cm-tooltip {
7701
+ [data-v-3118bf46] .cm-tooltip {
7682
7702
  background: transparent !important;
7683
7703
  filter: brightness(var(--scalar-lifted-brightness));
7684
7704
  border-radius: var(--scalar-radius);
@@ -7687,43 +7707,43 @@
7687
7707
  outline: none !important;
7688
7708
  overflow: hidden !important;
7689
7709
  }
7690
- [data-v-6499ec1f] .cm-tooltip-autocomplete ul li {
7710
+ [data-v-3118bf46] .cm-tooltip-autocomplete ul li {
7691
7711
  padding: 3px 6px !important;
7692
7712
  }
7693
- [data-v-6499ec1f] .cm-completionIcon-type:after {
7713
+ [data-v-3118bf46] .cm-completionIcon-type:after {
7694
7714
  color: var(--scalar-color-3) !important;
7695
7715
  }
7696
- [data-v-6499ec1f] .cm-tooltip-autocomplete ul li[aria-selected] {
7716
+ [data-v-3118bf46] .cm-tooltip-autocomplete ul li[aria-selected] {
7697
7717
  background: var(--scalar-background-2) !important;
7698
7718
  color: var(--scalar-color-1) !important;
7699
7719
  }
7700
- [data-v-6499ec1f] .cm-tooltip-autocomplete ul {
7720
+ [data-v-3118bf46] .cm-tooltip-autocomplete ul {
7701
7721
  padding: 6px !important;
7702
7722
  position: relative;
7703
7723
  }
7704
- [data-v-6499ec1f] .cm-tooltip-autocomplete ul li:hover {
7724
+ [data-v-3118bf46] .cm-tooltip-autocomplete ul li:hover {
7705
7725
  border-radius: 3px;
7706
7726
  color: var(--scalar-color-1) !important;
7707
7727
  background: var(--scalar-background-3) !important;
7708
7728
  }
7709
7729
  /* Disable active line highlighting */
7710
- [data-v-6499ec1f] .cm-activeLine,[data-v-6499ec1f] .cm-activeLineGutter {
7730
+ [data-v-3118bf46] .cm-activeLine,[data-v-3118bf46] .cm-activeLineGutter {
7711
7731
  background-color: transparent;
7712
7732
  }
7713
7733
  /* Color selection matching */
7714
- [data-v-6499ec1f] .cm-selectionMatch,[data-v-6499ec1f] .cm-matchingBracket {
7734
+ [data-v-3118bf46] .cm-selectionMatch,[data-v-3118bf46] .cm-matchingBracket {
7715
7735
  border-radius: var(--scalar-radius);
7716
7736
  background: var(--scalar-background-4) !important;
7717
7737
  }
7718
7738
  /* Color Picker Swatches */
7719
- [data-v-6499ec1f] .cm-css-color-picker-wrapper {
7739
+ [data-v-3118bf46] .cm-css-color-picker-wrapper {
7720
7740
  display: inline-flex;
7721
7741
  outline: 1px solid var(--scalar-background-3);
7722
7742
  border-radius: 3px;
7723
7743
  overflow: hidden;
7724
7744
  }
7725
7745
  /* Number gutter */
7726
- [data-v-6499ec1f] .cm-gutters {
7746
+ [data-v-3118bf46] .cm-gutters {
7727
7747
  background-color: transparent;
7728
7748
  border-right: none;
7729
7749
  color: var(--scalar-color-3);
@@ -7731,7 +7751,7 @@
7731
7751
  line-height: 22px;
7732
7752
  border-radius: 0 0 0 3px;
7733
7753
  }
7734
- [data-v-6499ec1f] .cm-gutters:before {
7754
+ [data-v-3118bf46] .cm-gutters:before {
7735
7755
  content: '';
7736
7756
  position: absolute;
7737
7757
  top: 2px;
@@ -7741,7 +7761,7 @@
7741
7761
  border-radius: var(--scalar-radius) 0 0 var(--scalar-radius);
7742
7762
  background-color: var(--scalar-background-1);
7743
7763
  }
7744
- [data-v-6499ec1f] .cm-gutterElement {
7764
+ [data-v-3118bf46] .cm-gutterElement {
7745
7765
  font-family: var(--scalar-font-code) !important;
7746
7766
  padding-left: 0px !important;
7747
7767
  padding-right: 6px !important;
@@ -7750,16 +7770,16 @@
7750
7770
  justify-content: flex-end;
7751
7771
  position: relative;
7752
7772
  }
7753
- [data-v-6499ec1f] .cm-lineNumbers .cm-gutterElement {
7773
+ [data-v-3118bf46] .cm-lineNumbers .cm-gutterElement {
7754
7774
  min-width: fit-content;
7755
7775
  }
7756
- [data-v-6499ec1f] .cm-gutter + .cm-gutter :not(.cm-foldGutter) .cm-gutterElement {
7776
+ [data-v-3118bf46] .cm-gutter + .cm-gutter :not(.cm-foldGutter) .cm-gutterElement {
7757
7777
  padding-left: 0 !important;
7758
7778
  }
7759
- [data-v-6499ec1f] .cm-scroller {
7779
+ [data-v-3118bf46] .cm-scroller {
7760
7780
  overflow: auto;
7761
7781
  }
7762
- .line-wrapping[data-v-6499ec1f]:focus-within .cm-content {
7782
+ .line-wrapping[data-v-3118bf46]:focus-within .cm-content {
7763
7783
  display: inline-table;
7764
7784
  min-height: fit-content;
7765
7785
  padding: 3px 6px;
@@ -7835,51 +7855,51 @@
7835
7855
  margin-top: 0;
7836
7856
  }
7837
7857
 
7838
- [data-v-bc1b7459] .cm-editor {
7858
+ [data-v-dc314812] .cm-editor {
7839
7859
  height: 100%;
7840
7860
  outline: none;
7841
7861
  width: 100%;
7842
7862
  }
7843
- [data-v-bc1b7459] .cm-line {
7863
+ [data-v-dc314812] .cm-line {
7844
7864
  padding: 0;
7845
7865
  }
7846
- [data-v-bc1b7459] .cm-content {
7866
+ [data-v-dc314812] .cm-content {
7847
7867
  padding: 0;
7848
7868
  display: flex;
7849
7869
  align-items: center;
7850
7870
  font-size: var(--scalar-small);
7851
7871
  }
7852
- .scroll-timeline-x[data-v-bc1b7459] {
7872
+ .scroll-timeline-x[data-v-dc314812] {
7853
7873
  scroll-timeline: --scroll-timeline x;
7854
7874
  /* Firefox supports */
7855
7875
  scroll-timeline: --scroll-timeline horizontal;
7856
7876
  -ms-overflow-style: none; /* IE and Edge */
7857
7877
  }
7858
- .scroll-timeline-x-hidden[data-v-bc1b7459] {
7878
+ .scroll-timeline-x-hidden[data-v-dc314812] {
7859
7879
  overflow-x: auto;
7860
7880
  }
7861
- .scroll-timeline-x-hidden[data-v-bc1b7459] .cm-scroller {
7881
+ .scroll-timeline-x-hidden[data-v-dc314812] .cm-scroller {
7862
7882
  scrollbar-width: none;
7863
7883
  -ms-overflow-style: none;
7864
7884
  padding-right: 20px;
7865
7885
  overflow: auto;
7866
7886
  }
7867
- .scroll-timeline-x-hidden[data-v-bc1b7459]::-webkit-scrollbar {
7887
+ .scroll-timeline-x-hidden[data-v-dc314812]::-webkit-scrollbar {
7868
7888
  width: 0;
7869
7889
  height: 0;
7870
7890
  display: none;
7871
7891
  }
7872
- .scroll-timeline-x-hidden[data-v-bc1b7459] .cm-scroller::-webkit-scrollbar {
7892
+ .scroll-timeline-x-hidden[data-v-dc314812] .cm-scroller::-webkit-scrollbar {
7873
7893
  width: 0;
7874
7894
  height: 0;
7875
7895
  display: none;
7876
7896
  }
7877
- .scroll-timeline-x-address[data-v-bc1b7459] {
7897
+ .scroll-timeline-x-address[data-v-dc314812] {
7878
7898
  line-height: 27px;
7879
7899
  scrollbar-width: none; /* Firefox */
7880
7900
  }
7881
7901
  /* make clickable are to left of send button */
7882
- .scroll-timeline-x-address[data-v-bc1b7459]:after {
7902
+ .scroll-timeline-x-address[data-v-dc314812]:after {
7883
7903
  content: '';
7884
7904
  position: absolute;
7885
7905
  height: 100%;
@@ -7887,24 +7907,24 @@
7887
7907
  right: 0;
7888
7908
  cursor: text;
7889
7909
  }
7890
- .scroll-timeline-x-address[data-v-bc1b7459]:empty:before {
7910
+ .scroll-timeline-x-address[data-v-dc314812]:empty:before {
7891
7911
  content: 'Enter URL or cURL request';
7892
7912
  color: var(--scalar-color-3);
7893
7913
  pointer-events: none;
7894
7914
  }
7895
- .fade-left[data-v-bc1b7459],
7896
- .fade-right[data-v-bc1b7459] {
7915
+ .fade-left[data-v-dc314812],
7916
+ .fade-right[data-v-dc314812] {
7897
7917
  content: '';
7898
7918
  position: sticky;
7899
7919
  height: 100%;
7900
- animation-name: fadein-bc1b7459;
7920
+ animation-name: fadein-dc314812;
7901
7921
  animation-duration: 1ms;
7902
7922
  animation-direction: reverse;
7903
7923
  animation-timeline: --scroll-timeline;
7904
7924
  pointer-events: none;
7905
7925
  z-index: 1;
7906
7926
  }
7907
- .fade-left[data-v-bc1b7459] {
7927
+ .fade-left[data-v-dc314812] {
7908
7928
  background: linear-gradient(
7909
7929
  -90deg,
7910
7930
  color-mix(in srgb, var(--scalar-address-bar-bg), transparent 100%) 0%,
@@ -7915,7 +7935,7 @@
7915
7935
  min-width: 6px;
7916
7936
  animation-direction: normal;
7917
7937
  }
7918
- .fade-right[data-v-bc1b7459] {
7938
+ .fade-right[data-v-dc314812] {
7919
7939
  background: linear-gradient(
7920
7940
  90deg,
7921
7941
  color-mix(in srgb, var(--scalar-address-bar-bg), transparent 100%) 0%,
@@ -7925,7 +7945,7 @@
7925
7945
  right: -1px;
7926
7946
  min-width: 24px;
7927
7947
  }
7928
- @keyframes fadein-bc1b7459 {
7948
+ @keyframes fadein-dc314812 {
7929
7949
  0% {
7930
7950
  opacity: 0;
7931
7951
  }
@@ -7933,7 +7953,7 @@
7933
7953
  opacity: 1;
7934
7954
  }
7935
7955
  }
7936
- .address-bar-bg-states[data-v-bc1b7459] {
7956
+ .address-bar-bg-states[data-v-dc314812] {
7937
7957
  --scalar-address-bar-bg: color-mix(
7938
7958
  in srgb,
7939
7959
  var(--scalar-background-1),
@@ -7941,22 +7961,22 @@
7941
7961
  );
7942
7962
  background: var(--scalar-address-bar-bg);
7943
7963
  }
7944
- .address-bar-bg-states[data-v-bc1b7459]:has(.cm-focused) {
7964
+ .address-bar-bg-states[data-v-dc314812]:has(.cm-focused) {
7945
7965
  --scalar-address-bar-bg: var(--scalar-background-1);
7946
7966
  border-color: var(--scalar-border-color);
7947
7967
  outline-width: 1px;
7948
7968
  outline-style: solid;
7949
7969
  }
7950
- .address-bar-bg-states:has(.cm-focused) .fade-left[data-v-bc1b7459],
7951
- .address-bar-bg-states:has(.cm-focused) .fade-right[data-v-bc1b7459] {
7970
+ .address-bar-bg-states:has(.cm-focused) .fade-left[data-v-dc314812],
7971
+ .address-bar-bg-states:has(.cm-focused) .fade-right[data-v-dc314812] {
7952
7972
  --scalar-address-bar-bg: var(--scalar-background-1);
7953
7973
  }
7954
7974
 
7955
- .app-exit-button[data-v-1c2b0dae] {
7975
+ .app-exit-button[data-v-09019679] {
7956
7976
  color: white;
7957
7977
  background: rgba(0, 0, 0, 0.1);
7958
7978
  }
7959
- .app-exit-button[data-v-1c2b0dae]:hover {
7979
+ .app-exit-button[data-v-09019679]:hover {
7960
7980
  background: rgba(255, 255, 255, 0.1);
7961
7981
  }
7962
7982
 
@@ -8386,10 +8406,10 @@ to {
8386
8406
  * `LoadingSkeleton.vue` easing/duration used in `@scalar/api-reference` so
8387
8407
  * any skeleton in the app feels consistent.
8388
8408
  */
8389
- .sidebar-skeleton-row > span[data-v-e803152c] {
8390
- animation: sidebar-skeleton-pulse-e803152c 1.5s infinite alternate;
8409
+ .sidebar-skeleton-row > span[data-v-1181f741] {
8410
+ animation: sidebar-skeleton-pulse-1181f741 1.5s infinite alternate;
8391
8411
  }
8392
- @keyframes sidebar-skeleton-pulse-e803152c {
8412
+ @keyframes sidebar-skeleton-pulse-1181f741 {
8393
8413
  from {
8394
8414
  opacity: 1;
8395
8415
  }
@@ -8498,6 +8518,16 @@ to {
8498
8518
  background-color: var(--scalar-background-2);
8499
8519
  }
8500
8520
 
8521
+ /*
8522
+ * The combobox option only marks the *active* (hovered / keyboard-focused)
8523
+ * row with a background. We also want a persistent highlight on the
8524
+ * currently *selected* version so the user can spot it at a glance, even
8525
+ * after moving the cursor or arrowing to another row.
8526
+ */
8527
+ .version-picker[data-v-0fc16a7d] [role='option'][aria-selected='true'] {
8528
+ background-color: var(--scalar-background-2);
8529
+ }
8530
+
8501
8531
  .splash-screen[data-v-af32615f] {
8502
8532
  opacity: 0;
8503
8533
  animation: fadeIn-af32615f 0.5s ease-in-out forwards;
@@ -34,6 +34,8 @@ export type OperationBlockProps = {
34
34
  appVersion: string;
35
35
  /** Openapi document */
36
36
  document: OpenApiDocument;
37
+ /** Openapi document slug */
38
+ documentSlug: string;
37
39
  /** Workspace cookies */
38
40
  workspaceCookies: XScalarCookie[];
39
41
  /** Document cookies */
@@ -1 +1 @@
1
- {"version":3,"file":"OperationBlock.vue.d.ts","sourceRoot":"","sources":["../../../../src/v2/blocks/operation-block/OperationBlock.vue"],"names":[],"mappings":"AAwgBA,OAAO,KAAK,EAAE,UAAU,IAAI,cAAc,EAAE,MA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CAAC,UAAU,CAAC,CAAA;IACjD,sBAAsB;IACtB,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IACtC,sEAAsE;IACtE,+BAA+B,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IACxD,6CAA6C;IAC7C,OAAO,CAAC,EAAE,UAAU,CAAC,SAAS,CAAC,CAAA;CAChC,CAAA;AACD,QAAA,MAAM,YAAY,kTA6fd,CAAC"}
1
+ {"version":3,"file":"OperationBlock.vue.d.ts","sourceRoot":"","sources":["../../../../src/v2/blocks/operation-block/OperationBlock.vue"],"names":[],"mappings":"AA6gBA,OAAO,KAAK,EAAE,UAAU,IAAI,cAAc,EAAE,MAAM,mCAAmC,CAAA;AACrF,OAAO,EAAe,KAAK,YAAY,EAAE,MAAM,2BAA2B,CAAA;AAC1E,OAAO,EAEL,KAAK,gBAAgB,EACtB,MAAM,wBAAwB,CAAA;AAE/B,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAA;AACpE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uCAAuC,CAAA;AAC7E,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iDAAiD,CAAA;AACnF,OAAO,KAAK,EACV,QAAQ,EACR,UAAU,EACV,iBAAiB,EAClB,MAAM,gCAAgC,CAAA;AACvC,OAAO,EAKL,KAAK,qBAAqB,EAE1B,KAAK,0BAA0B,EAChC,MAAM,yCAAyC,CAAA;AAChD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2EAA2E,CAAA;AACnH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qEAAqE,CAAA;AACxG,OAAO,KAAK,EACV,eAAe,EACf,YAAY,EACb,MAAM,8DAA8D,CAAA;AACrE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uDAAuD,CAAA;AAqB5F,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAA;AAC/D,OAA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;IAClB,2CAA2C;IAC3C,QAAQ,EAAE,QAAQ,CAAA;IAClB,wCAAwC;IACxC,eAAe,EAAE,qBAAqB,CAAA;IACtC,qBAAqB;IACrB,OAAO,EAAE,YAAY,EAAE,CAAA;IACvB,uBAAuB;IACvB,YAAY,CAAC,EAAE,MAAM,EAAE,CAAA;IACvB,qCAAqC;IACrC,iBAAiB,CAAC,EAAE,MAAM,CAAA;IAC1B,8CAA8C;IAC9C,WAAW,EAAE,kBAAkB,CAAA;IAC/B,yCAAyC;IACzC,QAAQ,EAAE,MAAM,CAAA;IAChB,kCAAkC;IAClC,gBAAgB,EAAE,gBAAgB,CAAA;IAClC,0CAA0C;IAC1C,uBAAuB,EAAE,0BAA0B,EAAE,CAAA;IACrD,4BAA4B;IAC5B,oBAAoB,EAAE,eAAe,CAAC,UAAU,CAAC,CAAA;IACjD,sBAAsB;IACtB,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IACtC,sEAAsE;IACtE,+BAA+B,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IACxD,6CAA6C;IAC7C,OAAO,CAAC,EAAE,UAAU,CAAC,SAAS,CAAC,CAAA;CAChC,CAAA;AACD,QAAA,MAAM,YAAY,kTAkgBd,CAAC"}
@@ -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 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\nconst handleNavigateSettings = () => {\n eventBus.emit('ui:navigate', {\n page: 'operation',\n path: 'overview',\n operationPath: path,\n method,\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 @navigate:settings=\"handleNavigateSettings\"\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 /** Openapi document slug */\n documentSlug: string\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 documentSlug,\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\nconst handleNavigateSettings = () => {\n eventBus.emit('ui:navigate', {\n page: 'operation',\n path: 'overview',\n operationPath: path,\n method,\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 :documentSlug\n :documentUrl\n :environment\n :environments\n :eventBus\n :exampleKey\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 @navigate:settings=\"handleNavigateSettings\"\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":""}
@@ -26,6 +26,7 @@ var OperationBlock_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */
26
26
  eventBus: {},
27
27
  appVersion: {},
28
28
  document: {},
29
+ documentSlug: {},
29
30
  workspaceCookies: { default: () => [] },
30
31
  documentCookies: { default: () => [] },
31
32
  path: {},
@@ -246,10 +247,12 @@ var OperationBlock_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */
246
247
  return (_ctx, _cache) => {
247
248
  return openBlock(), createElementBlock("div", _hoisted_1, [createElementVNode("div", _hoisted_2, [createVNode(Header_default, {
248
249
  activeEnvironment: __props.activeEnvironment,
250
+ documentSlug: __props.documentSlug,
249
251
  documentUrl: __props.documentUrl,
250
252
  environment: __props.environment,
251
253
  environments: __props.environments,
252
254
  eventBus: __props.eventBus,
255
+ exampleKey: __props.exampleKey,
253
256
  hideClientButton: __props.hideClientButton,
254
257
  history: operationHistory.value,
255
258
  integration: __props.integration,
@@ -265,10 +268,12 @@ var OperationBlock_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */
265
268
  "onSelect:history:item": handleSelectHistoryItem
266
269
  }, null, 8, [
267
270
  "activeEnvironment",
271
+ "documentSlug",
268
272
  "documentUrl",
269
273
  "environment",
270
274
  "environments",
271
275
  "eventBus",
276
+ "exampleKey",
272
277
  "hideClientButton",
273
278
  "history",
274
279
  "integration",
@@ -1 +1 @@
1
- {"version":3,"file":"OperationBlock.vue.script.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\nconst handleNavigateSettings = () => {\n eventBus.emit('ui:navigate', {\n page: 'operation',\n path: 'overview',\n operationPath: path,\n method,\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 @navigate:settings=\"handleNavigateSettings\"\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":";;;;;;;;;;;;;;;;;;;;;;;CAeE,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAmKR,MAAM,gBAAgB,eAAe,sBAAsB,QAAA,YAAY,CAAA;EAEvE,MAAM,EAAE,UAAU,WAAU;EAG5B,MAAM,kBAAkB,IAA4B,KAAI;EACxD,MAAM,WAAW,IAA6B,KAAI;EAClD,MAAM,iBAAiB,IAA2B,KAAI;;EAGtD,MAAM,sBAAsB,gBAAgB,OAAO,MAAM,OAAO,gBAAe;;EAG/E,MAAM,gBAAgB,YAAY;AAKhC,OAJuB,uBACrB,QAAA,UAAU,cAAc,EAAE,EAC1B,QAAA,WACF,CACmB,OAAO,OAAO;AAC/B,UAAM,qCAAqC,QAAO;AAClD;;GAGF,MAAM,gBAAgB,CAAC,GAAG,QAAA,kBAAkB,GAAG,QAAA,gBAAe;GAE9D,MAAM,EAAE,SAAS,mBAAmB,eAAe;IACjD,gBAAa,QAAA;IACb,aAAU,QAAA;IACV,aAAa,QAAA;IACb;IACA,QAAK,QAAA;IACL,WAAQ,QAAA;IACR,MAAG,QAAA;IACH,UAAO,QAAA;IACP,QAAK,QAAA;IACL,yBAAsB,QAAA;IACtB,YAAY,YAAY;IACxB,iCAA8B,QAAA;IAC/B,CAAA;AAGD,OAAI,SAAS,SAAS,YAAY,SAAS,MACzC,UAAS,MAAM,OAAO,QAAO;GAG/B,MAAM,iBAAiB,gCAA+B;AAGtD,SAAM,YACJ;IACE;IACA,UAAO,QAAA;IACP,WAAQ,QAAA;IACR;IACD,EACD,iBACA,QAAA,QACF;GAEA,MAAM,eAAe;IACnB,GAAG,wBAAwB,Q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A;MACA,sBAAA,QAAA;MACA,iBAAA,QAAA;MACA,gBAAA,QAAA;MACA,kBAAA,QAAA;MACA,yBAAA,QAAA;MACA,QAAA,QAAA;MACA,kBAAA,QAAA;;;;;;;;;;;;;;;;;;;;;;;;SAGH,YAOsD,MAAA,sBAAA,EAAA;MANnD,YAAA,QAAA;MACA,UAAA,QAAA;MACA,QAAA,QAAA;MACA,SAAA,QAAA;MACA,gBAAA,eAAA;MACA,UAAA,SAAA;MACA,wBAAwB,iBAAA,MAAiB"}
1
+ {"version":3,"file":"OperationBlock.vue.script.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 /** Openapi document slug */\n documentSlug: string\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 documentSlug,\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\nconst handleNavigateSettings = () => {\n eventBus.emit('ui:navigate', {\n page: 'operation',\n path: 'overview',\n operationPath: path,\n method,\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 :documentSlug\n :documentUrl\n :environment\n :environments\n :eventBus\n :exampleKey\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 @navigate:settings=\"handleNavigateSettings\"\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":";;;;;;;;;;;;;;;;;;;;;;;CAeE,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAsKR,MAAM,gBAAgB,eAAe,sBAAsB,QAAA,YAAY,CAAA;EAEvE,MAAM,EAAE,UAAU,WAAU;EAG5B,MAAM,kBAAkB,IAA4B,KAAI;EACxD,MAAM,WAAW,IAA6B,KAAI;EAClD,MAAM,iBAAiB,IAA2B,KAAI;;EAGtD,MAAM,sBAAsB,gBAAgB,OAAO,MAAM,OAAO,gBAAe;;EAG/E,MAAM,gBAAgB,YAAY;AAKhC,OAJuB,uBACrB,QAAA,UAAU,cAAc,EAAE,EAC1B,QAAA,WACF,CACmB,OAAO,OAAO;AAC/B,UAAM,qCAAqC,QAAO;AAClD;;GAGF,MAAM,gBAAgB,CAAC,GAAG,QAAA,kBAAkB,GAAG,QAAA,gBAAe;GAE9D,MAAM,EAAE,SAAS,mBAAmB,eAAe;IACjD,gBAAa,QAAA;IACb,aAAU,QAAA;IACV,aAAa,QAAA;IACb;IACA,QAAK,QAAA;IACL,WAAQ,QAAA;IACR,MAAG,QAAA;IACH,UAAO,QAAA;IACP,QAAK,QAAA;IACL,yBAAsB,QAAA;IACtB,YAAY,YAAY;IACxB,iCAA8B,QAAA;IAC/B,CAAA;AAGD,OAAI,SAAS,SAAS,YAAY,SAAS,MACzC,UAAS,MAAM,OAAO,QAAO;GAG/B,MAAM,iBAAiB,gCAA+B;AAGtD,SAAM,YACJ;IACE;IACA,UAAO,QAAA;IACP,WAAQ,QAAA;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