@scalar/api-reference 1.41.1 → 1.43.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 (202) hide show
  1. package/CHANGELOG.md +82 -0
  2. package/dist/blocks/index.d.ts +0 -1
  3. package/dist/blocks/index.d.ts.map +1 -1
  4. package/dist/blocks/index.js +4 -6
  5. package/dist/blocks/scalar-client-selector-block/components/ClientDropdown.vue.d.ts +4 -1
  6. package/dist/blocks/scalar-client-selector-block/components/ClientDropdown.vue.d.ts.map +1 -1
  7. package/dist/blocks/scalar-client-selector-block/components/ClientDropdown.vue.js +1 -1
  8. package/dist/blocks/scalar-client-selector-block/components/ClientDropdown.vue2.js +9 -13
  9. package/dist/blocks/scalar-client-selector-block/components/ClientSelector.vue.d.ts +4 -1
  10. package/dist/blocks/scalar-client-selector-block/components/ClientSelector.vue.d.ts.map +1 -1
  11. package/dist/blocks/scalar-client-selector-block/components/ClientSelector.vue.js +1 -1
  12. package/dist/blocks/scalar-client-selector-block/components/ClientSelector.vue2.js +10 -9
  13. package/dist/blocks/scalar-info-block/components/DownloadLink.vue.d.ts +4 -0
  14. package/dist/blocks/scalar-info-block/components/DownloadLink.vue.d.ts.map +1 -1
  15. package/dist/blocks/scalar-info-block/components/DownloadLink.vue.js +1 -1
  16. package/dist/blocks/scalar-info-block/components/DownloadLink.vue2.js +4 -7
  17. package/dist/blocks/scalar-info-block/components/InfoBlock.vue.d.ts +7 -9
  18. package/dist/blocks/scalar-info-block/components/InfoBlock.vue.d.ts.map +1 -1
  19. package/dist/blocks/scalar-info-block/components/InfoBlock.vue.js +9 -6
  20. package/dist/blocks/scalar-server-selector-block/components/Selector.vue.d.ts +2 -9
  21. package/dist/blocks/scalar-server-selector-block/components/Selector.vue.d.ts.map +1 -1
  22. package/dist/blocks/scalar-server-selector-block/components/Selector.vue.js +13 -25
  23. package/dist/blocks/scalar-server-selector-block/components/ServerSelector.vue.d.ts +8 -4
  24. package/dist/blocks/scalar-server-selector-block/components/ServerSelector.vue.d.ts.map +1 -1
  25. package/dist/blocks/scalar-server-selector-block/components/ServerSelector.vue.js +18 -41
  26. package/dist/browser/standalone.js +20335 -23246
  27. package/dist/browser/webpack-stats.json +1 -1
  28. package/dist/components/ApiReference.vue.d.ts +2 -254
  29. package/dist/components/ApiReference.vue.d.ts.map +1 -1
  30. package/dist/components/ApiReference.vue.js +1 -1
  31. package/dist/components/ApiReference.vue2.js +71 -83
  32. package/dist/components/Content/Auth/Auth.vue.d.ts +17 -0
  33. package/dist/components/Content/Auth/Auth.vue.d.ts.map +1 -0
  34. package/dist/components/Content/Auth/Auth.vue.js +70 -0
  35. package/dist/components/Content/Auth/Auth.vue2.js +4 -0
  36. package/dist/components/Content/Auth/helpers/get-default-security.d.ts +18 -0
  37. package/dist/components/Content/Auth/helpers/get-default-security.d.ts.map +1 -0
  38. package/dist/components/Content/Auth/helpers/get-default-security.js +43 -0
  39. package/dist/components/Content/Auth/index.d.ts +2 -0
  40. package/dist/components/Content/Auth/index.d.ts.map +1 -0
  41. package/dist/components/Content/Content.vue.d.ts +9 -19
  42. package/dist/components/Content/Content.vue.d.ts.map +1 -1
  43. package/dist/components/Content/Content.vue.js +46 -47
  44. package/dist/components/Content/Models/Model.vue.d.ts +3 -6
  45. package/dist/components/Content/Models/Model.vue.d.ts.map +1 -1
  46. package/dist/components/Content/Models/Model.vue.js +2 -2
  47. package/dist/components/Content/Models/ModelTag.vue.d.ts +2 -7
  48. package/dist/components/Content/Models/ModelTag.vue.d.ts.map +1 -1
  49. package/dist/components/Content/Models/ModelTag.vue.js +3 -3
  50. package/dist/components/Content/Models/components/ClassicLayout.vue.d.ts +3 -5
  51. package/dist/components/Content/Models/components/ClassicLayout.vue.d.ts.map +1 -1
  52. package/dist/components/Content/Models/components/ClassicLayout.vue.js +1 -1
  53. package/dist/components/Content/Models/components/ClassicLayout.vue2.js +2 -8
  54. package/dist/components/Content/Models/components/ModernLayout.vue.d.ts +1 -1
  55. package/dist/components/Content/Models/components/ModernLayout.vue.d.ts.map +1 -1
  56. package/dist/components/Content/Operations/TraversedEntry.vue.d.ts +20 -25
  57. package/dist/components/Content/Operations/TraversedEntry.vue.d.ts.map +1 -1
  58. package/dist/components/Content/Operations/TraversedEntry.vue.js +38 -56
  59. package/dist/components/Content/Schema/SchemaProperty.vue.d.ts +1 -1
  60. package/dist/components/Content/Schema/SchemaProperty.vue.d.ts.map +1 -1
  61. package/dist/components/Content/index.d.ts +0 -1
  62. package/dist/components/Content/index.d.ts.map +1 -1
  63. package/dist/components/ShowMoreButton.vue.d.ts +1 -4
  64. package/dist/components/ShowMoreButton.vue.d.ts.map +1 -1
  65. package/dist/components/ShowMoreButton.vue.js +1 -1
  66. package/dist/components/ShowMoreButton.vue2.js +7 -17
  67. package/dist/components/index.d.ts +1 -1
  68. package/dist/components/index.d.ts.map +1 -1
  69. package/dist/components/index.js +12 -14
  70. package/dist/features/Operation/Operation.vue.d.ts +23 -25
  71. package/dist/features/Operation/Operation.vue.d.ts.map +1 -1
  72. package/dist/features/Operation/Operation.vue.js +28 -19
  73. package/dist/features/Operation/components/OperationParameters.vue.d.ts +2 -4
  74. package/dist/features/Operation/components/OperationParameters.vue.d.ts.map +1 -1
  75. package/dist/features/Operation/components/OperationParameters.vue.js +17 -6
  76. package/dist/features/Operation/components/OperationResponses.vue.d.ts +3 -5
  77. package/dist/features/Operation/components/OperationResponses.vue.d.ts.map +1 -1
  78. package/dist/features/Operation/components/OperationResponses.vue.js +3 -1
  79. package/dist/features/Operation/components/ParameterList.vue.d.ts +3 -6
  80. package/dist/features/Operation/components/ParameterList.vue.d.ts.map +1 -1
  81. package/dist/features/Operation/components/ParameterList.vue.js +6 -8
  82. package/dist/features/Operation/components/ParameterListItem.vue.d.ts +3 -6
  83. package/dist/features/Operation/components/ParameterListItem.vue.d.ts.map +1 -1
  84. package/dist/features/Operation/components/ParameterListItem.vue.js +1 -1
  85. package/dist/features/Operation/components/ParameterListItem.vue2.js +6 -8
  86. package/dist/features/Operation/components/callbacks/Callback.vue.d.ts +2 -4
  87. package/dist/features/Operation/components/callbacks/Callback.vue.d.ts.map +1 -1
  88. package/dist/features/Operation/components/callbacks/Callback.vue.js +1 -1
  89. package/dist/features/Operation/components/callbacks/Callback.vue2.js +1 -5
  90. package/dist/features/Operation/components/callbacks/Callbacks.vue.d.ts +2 -8
  91. package/dist/features/Operation/components/callbacks/Callbacks.vue.d.ts.map +1 -1
  92. package/dist/features/Operation/components/callbacks/Callbacks.vue.js +35 -24
  93. package/dist/features/Operation/helpers/filter-selected-security.d.ts +9 -0
  94. package/dist/features/Operation/helpers/filter-selected-security.d.ts.map +1 -0
  95. package/dist/features/Operation/helpers/filter-selected-security.js +27 -0
  96. package/dist/features/Operation/helpers/get-first-server.d.ts +1 -1
  97. package/dist/features/Operation/helpers/get-first-server.d.ts.map +1 -1
  98. package/dist/features/Operation/helpers/get-first-server.js +3 -3
  99. package/dist/features/Operation/layouts/ClassicLayout.vue.d.ts +7 -23
  100. package/dist/features/Operation/layouts/ClassicLayout.vue.d.ts.map +1 -1
  101. package/dist/features/Operation/layouts/ClassicLayout.vue.js +1 -1
  102. package/dist/features/Operation/layouts/ClassicLayout.vue2.js +24 -23
  103. package/dist/features/Operation/layouts/ModernLayout.vue.d.ts +7 -23
  104. package/dist/features/Operation/layouts/ModernLayout.vue.d.ts.map +1 -1
  105. package/dist/features/Operation/layouts/ModernLayout.vue.js +1 -1
  106. package/dist/features/Operation/layouts/ModernLayout.vue2.js +25 -27
  107. package/dist/features/example-responses/ExampleResponse.vue.d.ts.map +1 -1
  108. package/dist/features/example-responses/ExampleResponse.vue.js +1 -1
  109. package/dist/features/example-responses/ExampleResponse.vue2.js +1 -2
  110. package/dist/features/example-responses/ExampleResponses.vue.d.ts.map +1 -1
  111. package/dist/features/example-responses/ExampleResponses.vue.js +1 -1
  112. package/dist/features/example-responses/ExampleResponses.vue2.js +1 -2
  113. package/dist/features/test-request-button/TestRequestButton.vue.d.ts +3 -0
  114. package/dist/features/test-request-button/TestRequestButton.vue.d.ts.map +1 -1
  115. package/dist/features/test-request-button/TestRequestButton.vue.js +1 -1
  116. package/dist/features/test-request-button/TestRequestButton.vue2.js +5 -9
  117. package/dist/helpers/index.d.ts +0 -4
  118. package/dist/helpers/index.d.ts.map +1 -1
  119. package/dist/helpers/index.js +1 -9
  120. package/dist/helpers/map-config-plugins.d.ts +5 -0
  121. package/dist/helpers/map-config-plugins.d.ts.map +1 -0
  122. package/dist/helpers/map-config-plugins.js +29 -0
  123. package/dist/helpers/map-config-to-workspace-store.d.ts.map +1 -1
  124. package/dist/helpers/map-config-to-workspace-store.js +5 -0
  125. package/dist/helpers/map-configuration.d.ts +2 -2
  126. package/dist/helpers/storage.d.ts +347 -0
  127. package/dist/helpers/storage.d.ts.map +1 -0
  128. package/dist/helpers/storage.js +61 -0
  129. package/dist/hooks/index.d.ts +0 -2
  130. package/dist/hooks/index.d.ts.map +1 -1
  131. package/dist/hooks/index.js +1 -5
  132. package/dist/index.d.ts +0 -1
  133. package/dist/index.d.ts.map +1 -1
  134. package/dist/index.js +1 -3
  135. package/dist/plugins/persistance-plugin.d.ts +16 -0
  136. package/dist/plugins/persistance-plugin.d.ts.map +1 -0
  137. package/dist/plugins/persistance-plugin.js +54 -0
  138. package/dist/style.css +220 -542
  139. package/package.json +17 -17
  140. package/dist/blocks/scalar-auth-selector-block/components/AuthSelector.vue.d.ts +0 -11
  141. package/dist/blocks/scalar-auth-selector-block/components/AuthSelector.vue.d.ts.map +0 -1
  142. package/dist/blocks/scalar-auth-selector-block/components/AuthSelector.vue.js +0 -7
  143. package/dist/blocks/scalar-auth-selector-block/components/AuthSelector.vue2.js +0 -259
  144. package/dist/blocks/scalar-auth-selector-block/components/DeleteRequestAuthModal.vue.d.ts +0 -21
  145. package/dist/blocks/scalar-auth-selector-block/components/DeleteRequestAuthModal.vue.d.ts.map +0 -1
  146. package/dist/blocks/scalar-auth-selector-block/components/DeleteRequestAuthModal.vue.js +0 -66
  147. package/dist/blocks/scalar-auth-selector-block/components/DeleteRequestAuthModal.vue2.js +0 -4
  148. package/dist/blocks/scalar-auth-selector-block/components/OAuth2.vue.d.ts +0 -17
  149. package/dist/blocks/scalar-auth-selector-block/components/OAuth2.vue.d.ts.map +0 -1
  150. package/dist/blocks/scalar-auth-selector-block/components/OAuth2.vue.js +0 -273
  151. package/dist/blocks/scalar-auth-selector-block/components/OAuth2.vue2.js +0 -4
  152. package/dist/blocks/scalar-auth-selector-block/components/OAuthScopesInput.vue.d.ts +0 -9
  153. package/dist/blocks/scalar-auth-selector-block/components/OAuthScopesInput.vue.d.ts.map +0 -1
  154. package/dist/blocks/scalar-auth-selector-block/components/OAuthScopesInput.vue.js +0 -150
  155. package/dist/blocks/scalar-auth-selector-block/components/OAuthScopesInput.vue2.js +0 -4
  156. package/dist/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue.d.ts +0 -20
  157. package/dist/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue.d.ts.map +0 -1
  158. package/dist/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue.js +0 -7
  159. package/dist/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue2.js +0 -116
  160. package/dist/blocks/scalar-auth-selector-block/components/RequestAuthDataTableInput.vue.d.ts +0 -50
  161. package/dist/blocks/scalar-auth-selector-block/components/RequestAuthDataTableInput.vue.d.ts.map +0 -1
  162. package/dist/blocks/scalar-auth-selector-block/components/RequestAuthDataTableInput.vue.js +0 -55
  163. package/dist/blocks/scalar-auth-selector-block/components/RequestAuthDataTableInput.vue2.js +0 -4
  164. package/dist/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.d.ts +0 -17
  165. package/dist/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.d.ts.map +0 -1
  166. package/dist/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.js +0 -288
  167. package/dist/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue2.js +0 -4
  168. package/dist/blocks/scalar-auth-selector-block/helpers/filter-security-requirements.d.ts +0 -6
  169. package/dist/blocks/scalar-auth-selector-block/helpers/filter-security-requirements.d.ts.map +0 -1
  170. package/dist/blocks/scalar-auth-selector-block/helpers/update-scheme.d.ts +0 -8
  171. package/dist/blocks/scalar-auth-selector-block/helpers/update-scheme.d.ts.map +0 -1
  172. package/dist/blocks/scalar-auth-selector-block/helpers/update-scheme.js +0 -26
  173. package/dist/blocks/scalar-auth-selector-block/index.d.ts +0 -2
  174. package/dist/blocks/scalar-auth-selector-block/index.d.ts.map +0 -1
  175. package/dist/components/Content/ClientLibraries/ClientLibraries.vue.d.ts +0 -16
  176. package/dist/components/Content/ClientLibraries/ClientLibraries.vue.d.ts.map +0 -1
  177. package/dist/components/Content/ClientLibraries/ClientLibraries.vue.js +0 -7
  178. package/dist/components/Content/ClientLibraries/ClientLibraries.vue2.js +0 -142
  179. package/dist/components/Content/ClientLibraries/ClientSelector.vue.d.ts +0 -13
  180. package/dist/components/Content/ClientLibraries/ClientSelector.vue.d.ts.map +0 -1
  181. package/dist/components/Content/ClientLibraries/ClientSelector.vue.js +0 -7
  182. package/dist/components/Content/ClientLibraries/ClientSelector.vue2.js +0 -125
  183. package/dist/components/Content/ClientLibraries/featured-clients.d.ts +0 -11
  184. package/dist/components/Content/ClientLibraries/featured-clients.d.ts.map +0 -1
  185. package/dist/components/Content/ClientLibraries/featured-clients.js +0 -24
  186. package/dist/components/Content/ClientLibraries/index.d.ts +0 -2
  187. package/dist/components/Content/ClientLibraries/index.d.ts.map +0 -1
  188. package/dist/features/example-responses/helpers/get-resolved-ref-deep.d.ts +0 -26
  189. package/dist/features/example-responses/helpers/get-resolved-ref-deep.d.ts.map +0 -1
  190. package/dist/features/example-responses/helpers/get-resolved-ref-deep.js +0 -39
  191. package/dist/helpers/convert-security-scheme.d.ts +0 -9
  192. package/dist/helpers/convert-security-scheme.d.ts.map +0 -1
  193. package/dist/helpers/convert-security-scheme.js +0 -34
  194. package/dist/helpers/map-config-to-client-store.d.ts +0 -72
  195. package/dist/helpers/map-config-to-client-store.d.ts.map +0 -1
  196. package/dist/helpers/map-config-to-client-store.js +0 -146
  197. package/dist/hooks/use-legacy-store-events.d.ts +0 -14
  198. package/dist/hooks/use-legacy-store-events.d.ts.map +0 -1
  199. package/dist/hooks/use-legacy-store-events.js +0 -91
  200. package/dist/hooks/use-workspace-store-events.d.ts +0 -4
  201. package/dist/hooks/use-workspace-store-events.d.ts.map +0 -1
  202. package/dist/hooks/use-workspace-store-events.js +0 -68
@@ -14,6 +14,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
14
14
  props: {
15
15
  responses: {},
16
16
  breadcrumb: {},
17
+ collapsableItems: { type: Boolean },
17
18
  eventBus: {},
18
19
  options: {}
19
20
  },
@@ -26,11 +27,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
26
27
  return openBlock(), createBlock(ParameterListItem, {
27
28
  key: status,
28
29
  breadcrumb: _ctx.breadcrumb,
30
+ collapsableItems: _ctx.collapsableItems,
29
31
  eventBus: _ctx.eventBus,
30
32
  name: status,
31
33
  options: _ctx.options,
32
34
  parameter: unref(getResolvedRef)(response)
33
- }, null, 8, ["breadcrumb", "eventBus", "name", "options", "parameter"]);
35
+ }, null, 8, ["breadcrumb", "collapsableItems", "eventBus", "name", "options", "parameter"]);
34
36
  }), 128))
35
37
  ])
36
38
  ])) : createCommentVNode("", true);
@@ -1,15 +1,12 @@
1
1
  import type { WorkspaceEventBus } from '@scalar/workspace-store/events';
2
2
  import type { ParameterObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document';
3
+ import type { OperationProps } from '../../../features/Operation/Operation.vue.js';
3
4
  type __VLS_Props = {
4
5
  parameters: ParameterObject[];
5
6
  breadcrumb?: string[];
6
7
  eventBus: WorkspaceEventBus | null;
7
- options: {
8
- collapsableItems?: boolean;
9
- withExamples?: boolean;
10
- orderRequiredPropertiesFirst: boolean | undefined;
11
- orderSchemaPropertiesBy: 'alpha' | 'preserve' | undefined;
12
- };
8
+ collapsableItems?: boolean;
9
+ options: Pick<OperationProps['options'], 'orderRequiredPropertiesFirst' | 'orderSchemaPropertiesBy'>;
13
10
  };
14
11
  declare var __VLS_1: {};
15
12
  type __VLS_Slots = {} & {
@@ -1 +1 @@
1
- {"version":3,"file":"ParameterList.vue.d.ts","sourceRoot":"","sources":["../../../../src/features/Operation/components/ParameterList.vue"],"names":[],"mappings":"AAsDA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AACvE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,8DAA8D,CAAA;AAKnG,KAAK,WAAW,GAAG;IACjB,UAAU,EAAE,eAAe,EAAE,CAAA;IAC7B,UAAU,CAAC,EAAE,MAAM,EAAE,CAAA;IACrB,QAAQ,EAAE,iBAAiB,GAAG,IAAI,CAAA;IAClC,OAAO,EAAE;QACP,gBAAgB,CAAC,EAAE,OAAO,CAAA;QAC1B,YAAY,CAAC,EAAE,OAAO,CAAA;QACtB,4BAA4B,EAAE,OAAO,GAAG,SAAS,CAAA;QACjD,uBAAuB,EAAE,OAAO,GAAG,UAAU,GAAG,SAAS,CAAA;KAC1D,CAAA;CACF,CAAC;AAkEF,QAAA,IAAI,OAAO,IAAW,CAAE;AACxB,KAAK,WAAW,GAAG,EAAE,GACnB;IAAE,KAAK,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,OAAO,KAAK,GAAG,CAAA;CAAE,CAAC;AAsB7C,QAAA,MAAM,eAAe,kSAMnB,CAAC;wBACkB,eAAe,CAAC,OAAO,eAAe,EAAE,WAAW,CAAC;AAAzE,wBAA0E;AAQ1E,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
1
+ {"version":3,"file":"ParameterList.vue.d.ts","sourceRoot":"","sources":["../../../../src/features/Operation/components/ParameterList.vue"],"names":[],"mappings":"AAiDA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AACvE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,8DAA8D,CAAA;AAGnG,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAA;AAIxE,KAAK,WAAW,GAAG;IACjB,UAAU,EAAE,eAAe,EAAE,CAAA;IAC7B,UAAU,CAAC,EAAE,MAAM,EAAE,CAAA;IACrB,QAAQ,EAAE,iBAAiB,GAAG,IAAI,CAAA;IAClC,gBAAgB,CAAC,EAAE,OAAO,CAAA;IAC1B,OAAO,EAAE,IAAI,CACX,cAAc,CAAC,SAAS,CAAC,EACzB,8BAA8B,GAAG,yBAAyB,CAC3D,CAAA;CACF,CAAC;AA+DF,QAAA,IAAI,OAAO,IAAW,CAAE;AACxB,KAAK,WAAW,GAAG,EAAE,GACnB;IAAE,KAAK,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,OAAO,KAAK,GAAG,CAAA;CAAE,CAAC;AAqB7C,QAAA,MAAM,eAAe,kSAMnB,CAAC;wBACkB,eAAe,CAAC,OAAO,eAAe,EAAE,WAAW,CAAC;AAAzE,wBAA0E;AAQ1E,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
@@ -1,5 +1,4 @@
1
- import { defineComponent, useId, computed, createElementBlock, createCommentVNode, openBlock, createElementVNode, unref, renderSlot, Fragment, renderList, createBlock } from "vue";
2
- import { shouldIgnoreEntity } from "@scalar/oas-utils/helpers";
1
+ import { defineComponent, useId, createElementBlock, createCommentVNode, openBlock, createElementVNode, unref, renderSlot, Fragment, renderList, createBlock } from "vue";
3
2
  import ParameterListItem from "./ParameterListItem.vue.js";
4
3
  const _hoisted_1 = {
5
4
  key: 0,
@@ -13,15 +12,13 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
13
12
  parameters: {},
14
13
  breadcrumb: {},
15
14
  eventBus: {},
15
+ collapsableItems: { type: Boolean },
16
16
  options: {}
17
17
  },
18
18
  setup(__props) {
19
19
  const id = useId();
20
- const filteredParameters = computed(
21
- () => __props.parameters.filter((parameter) => !shouldIgnoreEntity(parameter))
22
- );
23
20
  return (_ctx, _cache) => {
24
- return filteredParameters.value?.length ? (openBlock(), createElementBlock("div", _hoisted_1, [
21
+ return _ctx.parameters?.length ? (openBlock(), createElementBlock("div", _hoisted_1, [
25
22
  createElementVNode("div", {
26
23
  id: unref(id),
27
24
  class: "text-c-1 mt-3 mb-3 text-lg leading-[1.45] font-medium"
@@ -32,15 +29,16 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
32
29
  "aria-labelledby": unref(id),
33
30
  class: "mb-3 list-none p-0 text-sm"
34
31
  }, [
35
- (openBlock(true), createElementBlock(Fragment, null, renderList(filteredParameters.value, (item) => {
32
+ (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.parameters, (item) => {
36
33
  return openBlock(), createBlock(ParameterListItem, {
37
34
  key: item.name,
38
35
  breadcrumb: _ctx.breadcrumb,
36
+ collapsableItems: _ctx.collapsableItems,
39
37
  eventBus: _ctx.eventBus,
40
38
  name: item.name,
41
39
  options: _ctx.options,
42
40
  parameter: item
43
- }, null, 8, ["breadcrumb", "eventBus", "name", "options", "parameter"]);
41
+ }, null, 8, ["breadcrumb", "collapsableItems", "eventBus", "name", "options", "parameter"]);
44
42
  }), 128))
45
43
  ], 8, _hoisted_3)
46
44
  ])) : createCommentVNode("", true);
@@ -1,16 +1,13 @@
1
1
  import type { WorkspaceEventBus } from '@scalar/workspace-store/events';
2
2
  import type { ParameterObject, ResponseObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document';
3
+ import type { OperationProps } from '../../../features/Operation/Operation.vue.js';
3
4
  type __VLS_Props = {
4
5
  parameter: ParameterObject | ResponseObject;
5
6
  name: string;
6
7
  breadcrumb?: string[];
7
8
  eventBus: WorkspaceEventBus | null;
8
- options: {
9
- collapsableItems?: boolean;
10
- withExamples?: boolean;
11
- orderRequiredPropertiesFirst: boolean | undefined;
12
- orderSchemaPropertiesBy: 'alpha' | 'preserve' | undefined;
13
- };
9
+ collapsableItems?: boolean;
10
+ options: Pick<OperationProps['options'], 'orderRequiredPropertiesFirst' | 'orderSchemaPropertiesBy'>;
14
11
  };
15
12
  declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
16
13
  export default _default;
@@ -1 +1 @@
1
- {"version":3,"file":"ParameterListItem.vue.d.ts","sourceRoot":"","sources":["../../../../src/features/Operation/components/ParameterListItem.vue"],"names":[],"mappings":"AAmTA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AAEvE,OAAO,KAAK,EACV,eAAe,EACf,cAAc,EAEf,MAAM,8DAA8D,CAAA;AAQrE,KAAK,WAAW,GAAG;IACjB,SAAS,EAAE,eAAe,GAAG,cAAc,CAAA;IAC3C,IAAI,EAAE,MAAM,CAAA;IACZ,UAAU,CAAC,EAAE,MAAM,EAAE,CAAA;IACrB,QAAQ,EAAE,iBAAiB,GAAG,IAAI,CAAA;IAClC,OAAO,EAAE;QACP,gBAAgB,CAAC,EAAE,OAAO,CAAA;QAC1B,YAAY,CAAC,EAAE,OAAO,CAAA;QACtB,4BAA4B,EAAE,OAAO,GAAG,SAAS,CAAA;QACjD,uBAAuB,EAAE,OAAO,GAAG,UAAU,GAAG,SAAS,CAAA;KAC1D,CAAA;CACF,CAAC;;AAiWF,wBAMG"}
1
+ {"version":3,"file":"ParameterListItem.vue.d.ts","sourceRoot":"","sources":["../../../../src/features/Operation/components/ParameterListItem.vue"],"names":[],"mappings":"AA2SA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AAEvE,OAAO,KAAK,EACV,eAAe,EACf,cAAc,EAEf,MAAM,8DAA8D,CAAA;AAIrE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAA;AAKxE,KAAK,WAAW,GAAG;IACjB,SAAS,EAAE,eAAe,GAAG,cAAc,CAAA;IAC3C,IAAI,EAAE,MAAM,CAAA;IACZ,UAAU,CAAC,EAAE,MAAM,EAAE,CAAA;IACrB,QAAQ,EAAE,iBAAiB,GAAG,IAAI,CAAA;IAClC,gBAAgB,CAAC,EAAE,OAAO,CAAA;IAC1B,OAAO,EAAE,IAAI,CACX,cAAc,CAAC,SAAS,CAAC,EACzB,8BAA8B,GAAG,yBAAyB,CAC3D,CAAA;CACF,CAAC;;AAoVF,wBAMG"}
@@ -1,7 +1,7 @@
1
1
  import _sfc_main from "./ParameterListItem.vue2.js";
2
2
  /* empty css */
3
3
  import _export_sfc from "../../../_virtual/_plugin-vue_export-helper.js";
4
- const ParameterListItem = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-57b2f2e5"]]);
4
+ const ParameterListItem = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-2b6dfab9"]]);
5
5
  export {
6
6
  ParameterListItem as default
7
7
  };
@@ -20,6 +20,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
20
20
  name: {},
21
21
  breadcrumb: {},
22
22
  eventBus: {},
23
+ collapsableItems: { type: Boolean },
23
24
  options: {}
24
25
  },
25
26
  setup(__props) {
@@ -53,9 +54,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
53
54
  };
54
55
  });
55
56
  const shouldCollapse = computed(
56
- () => Boolean(
57
- __props.options.collapsableItems && (content.value || headers.value || schema.value)
58
- )
57
+ () => Boolean(__props.collapsableItems && (content.value || headers.value || schema.value))
59
58
  );
60
59
  return (_ctx, _cache) => {
61
60
  return openBlock(), createElementBlock("li", _hoisted_1, [
@@ -73,8 +72,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
73
72
  }, null, 8, ["class"]),
74
73
  createElementVNode("div", null, [
75
74
  createVNode(unref(ScalarWrappingText), {
76
- text: _ctx.name,
77
- preset: "property"
75
+ preset: "property",
76
+ text: _ctx.name
78
77
  }, null, 8, ["text"])
79
78
  ])
80
79
  ]),
@@ -133,9 +132,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
133
132
  orderSchemaPropertiesBy: _ctx.options.orderSchemaPropertiesBy
134
133
  },
135
134
  required: "required" in _ctx.parameter && _ctx.parameter.required,
136
- schema: value.value,
137
- withExamples: typeof _ctx.options.withExamples === "boolean" ? _ctx.options.withExamples : true
138
- }, null, 8, ["breadcrumb", "description", "eventBus", "name", "options", "required", "schema", "withExamples"])
135
+ schema: value.value
136
+ }, null, 8, ["breadcrumb", "description", "eventBus", "name", "options", "required", "schema"])
139
137
  ]),
140
138
  _: 1
141
139
  }, 8, ["static"])
@@ -1,16 +1,14 @@
1
1
  import type { HttpMethod as HttpMethodType } from '@scalar/helpers/http/http-methods';
2
2
  import type { WorkspaceEventBus } from '@scalar/workspace-store/events';
3
3
  import { type OperationObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document';
4
+ import type { OperationProps } from '../../../../features/Operation/Operation.vue.js';
4
5
  type __VLS_Props = {
5
6
  callback: OperationObject;
6
7
  method: HttpMethodType;
7
8
  name: string;
8
9
  url: string;
9
10
  eventBus: WorkspaceEventBus | null;
10
- options: {
11
- orderRequiredPropertiesFirst: boolean | undefined;
12
- orderSchemaPropertiesBy: 'alpha' | 'preserve' | undefined;
13
- };
11
+ options: Pick<OperationProps['options'], 'orderRequiredPropertiesFirst' | 'orderSchemaPropertiesBy'>;
14
12
  };
15
13
  declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
16
14
  export default _default;
@@ -1 +1 @@
1
- {"version":3,"file":"Callback.vue.d.ts","sourceRoot":"","sources":["../../../../../src/features/Operation/components/callbacks/Callback.vue"],"names":[],"mappings":"AA6HA,OAAO,KAAK,EAAE,UAAU,IAAI,cAAc,EAAE,MAAM,mCAAmC,CAAA;AAErF,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AAEvE,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,8DAA8D,CAAA;AAMnG,KAAK,WAAW,GAAG;IACjB,QAAQ,EAAE,eAAe,CAAA;IACzB,MAAM,EAAE,cAAc,CAAA;IACtB,IAAI,EAAE,MAAM,CAAA;IACZ,GAAG,EAAE,MAAM,CAAA;IACX,QAAQ,EAAE,iBAAiB,GAAG,IAAI,CAAA;IAClC,OAAO,EAAE;QACP,4BAA4B,EAAE,OAAO,GAAG,SAAS,CAAA;QACjD,uBAAuB,EAAE,OAAO,GAAG,UAAU,GAAG,SAAS,CAAA;KAC1D,CAAA;CACF,CAAC;;AAwLF,wBAMG"}
1
+ {"version":3,"file":"Callback.vue.d.ts","sourceRoot":"","sources":["../../../../../src/features/Operation/components/callbacks/Callback.vue"],"names":[],"mappings":"AA0HA,OAAO,KAAK,EAAE,UAAU,IAAI,cAAc,EAAE,MAAM,mCAAmC,CAAA;AAErF,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AAEvE,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,8DAA8D,CAAA;AAKnG,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAA;AAExE,KAAK,WAAW,GAAG;IACjB,QAAQ,EAAE,eAAe,CAAA;IACzB,MAAM,EAAE,cAAc,CAAA;IACtB,IAAI,EAAE,MAAM,CAAA;IACZ,GAAG,EAAE,MAAM,CAAA;IACX,QAAQ,EAAE,iBAAiB,GAAG,IAAI,CAAA;IAClC,OAAO,EAAE,IAAI,CACX,cAAc,CAAC,SAAS,CAAC,EACzB,8BAA8B,GAAG,yBAAyB,CAC3D,CAAA;CACF,CAAC;;AAgLF,wBAMG"}
@@ -1,7 +1,7 @@
1
1
  import _sfc_main from "./Callback.vue2.js";
2
2
  /* empty css */
3
3
  import _export_sfc from "../../../../_virtual/_plugin-vue_export-helper.js";
4
- const Callback = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-48ee3595"]]);
4
+ const Callback = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-102d2096"]]);
5
5
  export {
6
6
  Callback as default
7
7
  };
@@ -44,11 +44,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
44
44
  createVNode(_sfc_main$3, {
45
45
  collapsableItems: false,
46
46
  eventBus: _ctx.eventBus,
47
- options: {
48
- collapsableItems: true,
49
- orderRequiredPropertiesFirst: _ctx.options.orderRequiredPropertiesFirst,
50
- orderSchemaPropertiesBy: _ctx.options.orderSchemaPropertiesBy
51
- },
47
+ options: _ctx.options,
52
48
  responses: _ctx.callback.responses
53
49
  }, null, 8, ["eventBus", "options", "responses"])
54
50
  ])
@@ -1,17 +1,11 @@
1
- import type { HttpMethod } from '@scalar/helpers/http/http-methods';
2
1
  import type { WorkspaceEventBus } from '@scalar/workspace-store/events';
3
2
  import type { CallbackObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document';
3
+ import type { OperationProps } from '../../../../features/Operation/Operation.vue.js';
4
4
  type __VLS_Props = {
5
5
  path: string;
6
- method: HttpMethod;
7
6
  callbacks: CallbackObject;
8
7
  eventBus: WorkspaceEventBus | null;
9
- options: {
10
- collapsableItems?: boolean;
11
- withExamples?: boolean;
12
- orderRequiredPropertiesFirst: boolean | undefined;
13
- orderSchemaPropertiesBy: 'alpha' | 'preserve' | undefined;
14
- };
8
+ options: Pick<OperationProps['options'], 'orderRequiredPropertiesFirst' | 'orderSchemaPropertiesBy'>;
15
9
  };
16
10
  declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
17
11
  export default _default;
@@ -1 +1 @@
1
- {"version":3,"file":"Callbacks.vue.d.ts","sourceRoot":"","sources":["../../../../../src/features/Operation/components/callbacks/Callbacks.vue"],"names":[],"mappings":"AA8DA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mCAAmC,CAAA;AAEnE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AAEvE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,8DAA8D,CAAA;AAIlG,KAAK,WAAW,GAAG;IACjB,IAAI,EAAE,MAAM,CAAA;IACZ,MAAM,EAAE,UAAU,CAAA;IAClB,SAAS,EAAE,cAAc,CAAA;IACzB,QAAQ,EAAE,iBAAiB,GAAG,IAAI,CAAA;IAClC,OAAO,EAAE;QACP,gBAAgB,CAAC,EAAE,OAAO,CAAA;QAC1B,YAAY,CAAC,EAAE,OAAO,CAAA;QACtB,4BAA4B,EAAE,OAAO,GAAG,SAAS,CAAA;QACjD,uBAAuB,EAAE,OAAO,GAAG,UAAU,GAAG,SAAS,CAAA;KAC1D,CAAA;CACF,CAAC;;AAoFF,wBAMG"}
1
+ {"version":3,"file":"Callbacks.vue.d.ts","sourceRoot":"","sources":["../../../../../src/features/Operation/components/callbacks/Callbacks.vue"],"names":[],"mappings":"AA0FA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AAEvE,OAAO,KAAK,EACV,cAAc,EAEf,MAAM,8DAA8D,CAAA;AAGrE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAA;AAIxE,KAAK,WAAW,GAAG;IACjB,IAAI,EAAE,MAAM,CAAA;IACZ,SAAS,EAAE,cAAc,CAAA;IACzB,QAAQ,EAAE,iBAAiB,GAAG,IAAI,CAAA;IAClC,OAAO,EAAE,IAAI,CACX,cAAc,CAAC,SAAS,CAAC,EACzB,8BAA8B,GAAG,yBAAyB,CAC3D,CAAA;CACF,CAAC;;AA6GF,wBAMG"}
@@ -1,5 +1,6 @@
1
- import { defineComponent, createElementBlock, openBlock, createElementVNode, Fragment, renderList, unref, createBlock, createCommentVNode } from "vue";
1
+ import { defineComponent, computed, createElementBlock, openBlock, createElementVNode, Fragment, renderList, createBlock } from "vue";
2
2
  import { isHttpMethod } from "@scalar/helpers/http/is-http-method";
3
+ import { objectEntries } from "@scalar/helpers/object/object-entries";
3
4
  import { getResolvedRef } from "@scalar/workspace-store/helpers/get-resolved-ref";
4
5
  import Callback from "./Callback.vue.js";
5
6
  const _hoisted_1 = {
@@ -11,37 +12,47 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
11
12
  __name: "Callbacks",
12
13
  props: {
13
14
  path: {},
14
- method: {},
15
15
  callbacks: {},
16
16
  eventBus: {},
17
17
  options: {}
18
18
  },
19
19
  setup(__props) {
20
+ const flattenedCallbacks = computed(() => {
21
+ const _callbacks = [];
22
+ objectEntries(__props.callbacks).forEach(([name, pathItem]) => {
23
+ objectEntries(getResolvedRef(pathItem)).forEach(([url, methods]) => {
24
+ if (typeof methods !== "object" || !methods) {
25
+ return;
26
+ }
27
+ objectEntries(methods).forEach(([callbackMethod, callback]) => {
28
+ if (!isHttpMethod(callbackMethod)) {
29
+ return;
30
+ }
31
+ _callbacks.push({
32
+ name,
33
+ url,
34
+ method: callbackMethod,
35
+ callback
36
+ });
37
+ });
38
+ });
39
+ });
40
+ return _callbacks;
41
+ });
20
42
  return (_ctx, _cache) => {
21
43
  return openBlock(), createElementBlock("div", _hoisted_1, [
22
44
  _cache[0] || (_cache[0] = createElementVNode("div", { class: "callbacks-title text-c-1 my-3 text-lg font-medium" }, " Callbacks ", -1)),
23
- (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.callbacks, (pathItem, name) => {
24
- return openBlock(), createElementBlock(Fragment, { key: name }, [
25
- (openBlock(true), createElementBlock(Fragment, null, renderList(unref(getResolvedRef)(pathItem), (methods, url) => {
26
- return openBlock(), createElementBlock(Fragment, null, [
27
- (openBlock(true), createElementBlock(Fragment, null, renderList(methods, (callback, callbackMethod) => {
28
- return openBlock(), createElementBlock(Fragment, { key: callbackMethod }, [
29
- unref(isHttpMethod)(callbackMethod) ? (openBlock(), createBlock(Callback, {
30
- key: 0,
31
- callback,
32
- eventBus: _ctx.eventBus,
33
- method: callbackMethod,
34
- name,
35
- operationMethod: __props.method,
36
- options: _ctx.options,
37
- path: _ctx.path,
38
- url
39
- }, null, 8, ["callback", "eventBus", "method", "name", "operationMethod", "options", "path", "url"])) : createCommentVNode("", true)
40
- ], 64);
41
- }), 128))
42
- ], 64);
43
- }), 256))
44
- ], 64);
45
+ (openBlock(true), createElementBlock(Fragment, null, renderList(flattenedCallbacks.value, ({ callback, method, name, url }) => {
46
+ return openBlock(), createBlock(Callback, {
47
+ key: `${name}-${url}-${method}`,
48
+ callback,
49
+ eventBus: _ctx.eventBus,
50
+ method,
51
+ name,
52
+ options: _ctx.options,
53
+ path: _ctx.path,
54
+ url
55
+ }, null, 8, ["callback", "eventBus", "method", "name", "options", "path", "url"]);
45
56
  }), 128))
46
57
  ]);
47
58
  };
@@ -0,0 +1,9 @@
1
+ import type { MergedSecuritySchemes } from '@scalar/api-client/v2/blocks/scalar-auth-selector-block';
2
+ import type { OpenApiDocument, OperationObject, SecuritySchemeObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document';
3
+ /**
4
+ * Find the intersection between which security is selected on the document and what this operation requires
5
+ *
6
+ * If there is no overlap, we return the first requirement
7
+ */
8
+ export declare const filterSelectedSecurity: (document: OpenApiDocument, operation: OperationObject | null, securitySchemes?: MergedSecuritySchemes) => SecuritySchemeObject[];
9
+ //# sourceMappingURL=filter-selected-security.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"filter-selected-security.d.ts","sourceRoot":"","sources":["../../../../src/features/Operation/helpers/filter-selected-security.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,yDAAyD,CAAA;AAEpG,OAAO,KAAK,EACV,eAAe,EACf,eAAe,EAEf,oBAAoB,EACrB,MAAM,8DAA8D,CAAA;AAKrE;;;;GAIG;AACH,eAAO,MAAM,sBAAsB,GACjC,UAAU,eAAe,EACzB,WAAW,eAAe,GAAG,IAAI,EACjC,kBAAiB,qBAA0B,KAC1C,oBAAoB,EAkCtB,CAAA"}
@@ -0,0 +1,27 @@
1
+ import { getSecuritySchemes } from "@scalar/api-client/v2/blocks/operation-block";
2
+ import { getSelectedSecurity } from "@scalar/api-client/v2/features/operation";
3
+ const getKey = (requirement) => Object.keys(requirement).sort().join(",");
4
+ const filterSelectedSecurity = (document, operation, securitySchemes = {}) => {
5
+ const securityRequirements = operation?.security ?? document.security ?? [];
6
+ const selectedSecurity = getSelectedSecurity(
7
+ document?.["x-scalar-selected-security"],
8
+ operation?.["x-scalar-selected-security"]
9
+ );
10
+ const requirementSet = new Set(securityRequirements.map((r) => getKey(r)));
11
+ const selectedRequirement = selectedSecurity.selectedSchemes[selectedSecurity.selectedIndex];
12
+ if (selectedRequirement && requirementSet.has(getKey(selectedRequirement))) {
13
+ return getSecuritySchemes(securitySchemes, [selectedRequirement]);
14
+ }
15
+ for (const selected of selectedSecurity.selectedSchemes) {
16
+ if (requirementSet.has(getKey(selected))) {
17
+ return getSecuritySchemes(securitySchemes, [selected]);
18
+ }
19
+ }
20
+ if (operation?.security?.length && !document?.["x-scalar-set-operation-security"]) {
21
+ return getSecuritySchemes(securitySchemes, securityRequirements.slice(0, 1));
22
+ }
23
+ return [];
24
+ };
25
+ export {
26
+ filterSelectedSecurity
27
+ };
@@ -5,5 +5,5 @@ import type { ServerObject } from '@scalar/workspace-store/schemas/v3.1/strict/o
5
5
  * @example
6
6
  * getFirstServer([operation.servers, pathItem.servers, server])
7
7
  */
8
- export declare function getFirstServer(...availableServers: (ServerObject[] | ServerObject | undefined)[]): ServerObject | undefined;
8
+ export declare const getFirstServer: (...availableServers: (ServerObject[] | ServerObject | null)[]) => ServerObject | null;
9
9
  //# sourceMappingURL=get-first-server.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"get-first-server.d.ts","sourceRoot":"","sources":["../../../../src/features/Operation/helpers/get-first-server.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,8DAA8D,CAAA;AAEhG;;;;;GAKG;AACH,wBAAgB,cAAc,CAC5B,GAAG,gBAAgB,EAAE,CAAC,YAAY,EAAE,GAAG,YAAY,GAAG,SAAS,CAAC,EAAE,GACjE,YAAY,GAAG,SAAS,CAyB1B"}
1
+ {"version":3,"file":"get-first-server.d.ts","sourceRoot":"","sources":["../../../../src/features/Operation/helpers/get-first-server.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,8DAA8D,CAAA;AAEhG;;;;;GAKG;AACH,eAAO,MAAM,cAAc,GAAI,GAAG,kBAAkB,CAAC,YAAY,EAAE,GAAG,YAAY,GAAG,IAAI,CAAC,EAAE,KAAG,YAAY,GAAG,IAyB7G,CAAA"}
@@ -1,5 +1,5 @@
1
1
  import { getResolvedRef } from "@scalar/workspace-store/helpers/get-resolved-ref";
2
- function getFirstServer(...availableServers) {
2
+ const getFirstServer = (...availableServers) => {
3
3
  for (const serverSource of availableServers) {
4
4
  if (!serverSource) {
5
5
  continue;
@@ -18,8 +18,8 @@ function getFirstServer(...availableServers) {
18
18
  }
19
19
  }
20
20
  }
21
- return void 0;
22
- }
21
+ return null;
22
+ };
23
23
  export {
24
24
  getFirstServer
25
25
  };
@@ -1,28 +1,12 @@
1
- import { type ClientOptionGroup } from '@scalar/api-client/v2/blocks/operation-code-sample';
2
- import type { HttpMethod as HttpMethodType } from '@scalar/helpers/http/http-methods';
3
- import type { WorkspaceStore } from '@scalar/workspace-store/client';
4
- import type { WorkspaceEventBus } from '@scalar/workspace-store/events';
5
1
  import type { OperationObject, SecuritySchemeObject, ServerObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document';
6
- type __VLS_Props = {
7
- id: string;
8
- path: string;
9
- method: HttpMethodType;
2
+ import type { OperationProps } from '../../../features/Operation/Operation.vue.js';
3
+ type __VLS_Props = Omit<OperationProps, 'document' | 'pathValue' | 'server' | 'securitySchemes'> & {
4
+ /** Operation object with path params */
10
5
  operation: OperationObject;
11
- server: ServerObject | undefined;
12
- securitySchemes: SecuritySchemeObject[];
13
- xScalarDefaultClient: WorkspaceStore['workspace']['x-scalar-default-client'];
14
- isCollapsed: boolean;
15
- eventBus: WorkspaceEventBus | null;
16
- /** Global options that can be derived from the top level config or assigned at a block level */
17
- options: {
18
- /** Sets some additional display properties when an operation is a webhook */
19
- isWebhook: boolean;
20
- clientOptions: ClientOptionGroup[];
21
- showOperationId: boolean | undefined;
22
- hideTestRequestButton: boolean | undefined;
23
- orderRequiredPropertiesFirst: boolean | undefined;
24
- orderSchemaPropertiesBy: 'alpha' | 'preserve' | undefined;
25
- };
6
+ /** The selected server for the operation */
7
+ selectedServer: ServerObject | null;
8
+ /** The selected security schemes for the operation */
9
+ selectedSecuritySchemes: SecuritySchemeObject[];
26
10
  };
27
11
  declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
28
12
  export default _default;
@@ -1 +1 @@
1
- {"version":3,"file":"ClassicLayout.vue.d.ts","sourceRoot":"","sources":["../../../../src/features/Operation/layouts/ClassicLayout.vue"],"names":[],"mappings":"AAmfA,OAAO,EAEL,KAAK,iBAAiB,EACvB,MAAM,oDAAoD,CAAA;AAM3D,OAAO,KAAK,EAAE,UAAU,IAAI,cAAc,EAAE,MAAM,mCAAmC,CAAA;AAYrF,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAA;AACpE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AAEvE,OAAO,KAAK,EACV,eAAe,EAEf,oBAAoB,EACpB,YAAY,EACb,MAAM,8DAA8D,CAAA;AAmBrE,KAAK,WAAW,GAAG;IACjB,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,MAAM,CAAA;IACZ,MAAM,EAAE,cAAc,CAAA;IACtB,SAAS,EAAE,eAAe,CAAA;IAE1B,MAAM,EAAE,YAAY,GAAG,SAAS,CAAA;IAChC,eAAe,EAAE,oBAAoB,EAAE,CAAA;IACvC,oBAAoB,EAAE,cAAc,CAAC,WAAW,CAAC,CAAC,yBAAyB,CAAC,CAAA;IAC5E,WAAW,EAAE,OAAO,CAAA;IACpB,QAAQ,EAAE,iBAAiB,GAAG,IAAI,CAAA;IAClC,gGAAgG;IAChG,OAAO,EAAE;QACP,6EAA6E;QAC7E,SAAS,EAAE,OAAO,CAAA;QAClB,aAAa,EAAE,iBAAiB,EAAE,CAAA;QAClC,eAAe,EAAE,OAAO,GAAG,SAAS,CAAA;QACpC,qBAAqB,EAAE,OAAO,GAAG,SAAS,CAAA;QAC1C,4BAA4B,EAAE,OAAO,GAAG,SAAS,CAAA;QACjD,uBAAuB,EAAE,OAAO,GAAG,UAAU,GAAG,SAAS,CAAA;KAC1D,CAAA;CACF,CAAC;;AAkkBF,wBAMG"}
1
+ {"version":3,"file":"ClassicLayout.vue.d.ts","sourceRoot":"","sources":["../../../../src/features/Operation/layouts/ClassicLayout.vue"],"names":[],"mappings":"AAggBA,OAAO,KAAK,EACV,eAAe,EAEf,oBAAoB,EACpB,YAAY,EACb,MAAM,8DAA8D,CAAA;AAcrE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAA;AAMxE,KAAK,WAAW,GAAG,IAAI,CACnB,cAAc,EACd,UAAU,GAAG,WAAW,GAAG,QAAQ,GAAG,iBAAiB,CACxD,GAAG;IACF,wCAAwC;IACxC,SAAS,EAAE,eAAe,CAAA;IAC1B,4CAA4C;IAC5C,cAAc,EAAE,YAAY,GAAG,IAAI,CAAA;IACnC,sDAAsD;IACtD,uBAAuB,EAAE,oBAAoB,EAAE,CAAA;CAChD,CAAC;;AA2kBJ,wBAMG"}
@@ -1,7 +1,7 @@
1
1
  import _sfc_main from "./ClassicLayout.vue2.js";
2
2
  /* empty css */
3
3
  import _export_sfc from "../../../_virtual/_plugin-vue_export-helper.js";
4
- const ClassicLayout = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-c3680e67"]]);
4
+ const ClassicLayout = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-727857de"]]);
5
5
  export {
6
6
  ClassicLayout as default
7
7
  };
@@ -45,15 +45,17 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
45
45
  __name: "ClassicLayout",
46
46
  props: {
47
47
  id: {},
48
- path: {},
49
48
  method: {},
50
- operation: {},
51
- server: {},
52
- securitySchemes: {},
53
- xScalarDefaultClient: {},
49
+ options: {},
50
+ path: {},
51
+ clientOptions: {},
54
52
  isCollapsed: { type: Boolean },
53
+ isWebhook: { type: Boolean },
54
+ selectedClient: {},
55
55
  eventBus: {},
56
- options: {}
56
+ operation: {},
57
+ selectedServer: {},
58
+ selectedSecuritySchemes: {}
57
59
  },
58
60
  setup(__props) {
59
61
  const operationTitle = computed(() => __props.operation.summary || __props.path || "");
@@ -98,7 +100,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
98
100
  ]),
99
101
  _: 1
100
102
  }, 8, ["class"])) : createCommentVNode("", true),
101
- _ctx.options.isWebhook ? (openBlock(), createBlock(unref(Badge), {
103
+ _ctx.isWebhook ? (openBlock(), createBlock(unref(Badge), {
102
104
  key: 1,
103
105
  class: "font-code text-green flex w-fit items-center justify-center gap-1"
104
106
  }, {
@@ -124,17 +126,19 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
124
126
  badges: _ctx.operation["x-badges"],
125
127
  position: "after"
126
128
  }, null, 8, ["badges"]),
127
- !_ctx.options?.hideTestRequestButton ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
128
- active && !_ctx.options.isWebhook ? (openBlock(), createBlock(unref(TestRequestButton), {
129
+ !_ctx.options.hideTestRequestButton ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
130
+ active && !_ctx.isWebhook ? (openBlock(), createBlock(unref(TestRequestButton), {
129
131
  key: 0,
132
+ id: _ctx.id,
133
+ eventBus: _ctx.eventBus,
130
134
  method: _ctx.method,
131
135
  path: _ctx.path
132
- }, null, 8, ["method", "path"])) : (openBlock(), createBlock(unref(ScalarIconPlay), {
136
+ }, null, 8, ["id", "eventBus", "method", "path"])) : (openBlock(), createBlock(unref(ScalarIconPlay), {
133
137
  key: 1,
134
138
  class: "endpoint-try-hint size-4.5"
135
139
  }))
136
140
  ], 64)) : createCommentVNode("", true),
137
- _ctx.options?.showOperationId && _ctx.operation.operationId ? (openBlock(), createElementBlock("span", _hoisted_6, toDisplayString(_ctx.operation.operationId), 1)) : createCommentVNode("", true),
141
+ _ctx.options.showOperationId && _ctx.operation.operationId ? (openBlock(), createElementBlock("span", _hoisted_6, toDisplayString(_ctx.operation.operationId), 1)) : createCommentVNode("", true),
138
142
  createVNode(unref(ScalarIconButton), {
139
143
  class: "endpoint-copy p-0.5",
140
144
  icon: unref(ScalarIconCopy),
@@ -164,10 +168,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
164
168
  createElementVNode("div", _hoisted_11, [
165
169
  createVNode(_sfc_main$3, {
166
170
  eventBus: _ctx.eventBus,
167
- options: {
168
- orderRequiredPropertiesFirst: _ctx.options.orderRequiredPropertiesFirst,
169
- orderSchemaPropertiesBy: _ctx.options.orderSchemaPropertiesBy
170
- },
171
+ options: _ctx.options,
171
172
  responses: _ctx.operation.responses
172
173
  }, null, 8, ["eventBus", "options", "responses"])
173
174
  ]),
@@ -175,10 +176,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
175
176
  createVNode(_sfc_main$4, {
176
177
  callbacks: _ctx.operation.callbacks,
177
178
  eventBus: _ctx.eventBus,
178
- method: _ctx.method,
179
179
  options: _ctx.options,
180
180
  path: _ctx.path
181
- }, null, 8, ["callbacks", "eventBus", "method", "options", "path"])
181
+ }, null, 8, ["callbacks", "eventBus", "options", "path"])
182
182
  ])) : createCommentVNode("", true)
183
183
  ]),
184
184
  _ctx.operation.responses ? (openBlock(), createBlock(unref(ExampleResponses), {
@@ -199,16 +199,17 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
199
199
  default: withCtx(() => [
200
200
  createVNode(unref(OperationCodeSample), {
201
201
  class: "operation-example-card",
202
- clientOptions: _ctx.options.clientOptions,
202
+ clientOptions: _ctx.clientOptions,
203
+ eventBus: _ctx.eventBus,
203
204
  fallback: "",
204
- isWebhook: _ctx.options.isWebhook,
205
+ isWebhook: _ctx.isWebhook,
205
206
  method: _ctx.method,
206
207
  operation: _ctx.operation,
207
208
  path: _ctx.path,
208
- securitySchemes: _ctx.securitySchemes,
209
- selectedClient: _ctx.xScalarDefaultClient,
210
- selectedServer: _ctx.server
211
- }, null, 8, ["clientOptions", "isWebhook", "method", "operation", "path", "securitySchemes", "selectedClient", "selectedServer"])
209
+ securitySchemes: _ctx.selectedSecuritySchemes,
210
+ selectedClient: _ctx.selectedClient,
211
+ selectedServer: _ctx.selectedServer
212
+ }, null, 8, ["clientOptions", "eventBus", "isWebhook", "method", "operation", "path", "securitySchemes", "selectedClient", "selectedServer"])
212
213
  ]),
213
214
  _: 1
214
215
  })
@@ -1,28 +1,12 @@
1
- import { type ClientOptionGroup } from '@scalar/api-client/v2/blocks/operation-code-sample';
2
- import type { HttpMethod as HttpMethodType } from '@scalar/helpers/http/http-methods';
3
- import type { WorkspaceStore } from '@scalar/workspace-store/client';
4
- import type { WorkspaceEventBus } from '@scalar/workspace-store/events';
5
1
  import type { OperationObject, SecuritySchemeObject, ServerObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document';
6
- type __VLS_Props = {
7
- id: string;
8
- path: string;
9
- method: HttpMethodType;
2
+ import type { OperationProps } from '../../../features/Operation/Operation.vue.js';
3
+ type __VLS_Props = Omit<OperationProps, 'document' | 'pathValue' | 'server' | 'isCollapsed' | 'securitySchemes'> & {
4
+ /** Operation object with path params */
10
5
  operation: OperationObject;
11
- securitySchemes: SecuritySchemeObject[];
12
- server: ServerObject | undefined;
13
- xScalarDefaultClient: WorkspaceStore['workspace']['x-scalar-default-client'];
14
- eventBus: WorkspaceEventBus | null;
15
- /** Global options that can be derived from the top level config or assigned at a block level */
16
- options: {
17
- /** Sets some additional display properties when an operation is a webhook */
18
- isWebhook: boolean;
19
- showOperationId: boolean | undefined;
20
- hideTestRequestButton: boolean | undefined;
21
- expandAllResponses: boolean | undefined;
22
- clientOptions: ClientOptionGroup[];
23
- orderRequiredPropertiesFirst: boolean | undefined;
24
- orderSchemaPropertiesBy: 'alpha' | 'preserve' | undefined;
25
- };
6
+ /** The selected server for the operation */
7
+ selectedServer: ServerObject | null;
8
+ /** The selected security schemes for the operation */
9
+ selectedSecuritySchemes: SecuritySchemeObject[];
26
10
  };
27
11
  declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
28
12
  export default _default;
@@ -1 +1 @@
1
- {"version":3,"file":"ModernLayout.vue.d.ts","sourceRoot":"","sources":["../../../../src/features/Operation/layouts/ModernLayout.vue"],"names":[],"mappings":"AA4PA,OAAO,EAEL,KAAK,iBAAiB,EACvB,MAAM,oDAAoD,CAAA;AAE3D,OAAO,KAAK,EAAE,UAAU,IAAI,cAAc,EAAE,MAAM,mCAAmC,CAAA;AAOrF,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAA;AACpE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AAEvE,OAAO,KAAK,EACV,eAAe,EAEf,oBAAoB,EACpB,YAAY,EACb,MAAM,8DAA8D,CAAA;AAyBrE,KAAK,WAAW,GAAG;IACjB,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,MAAM,CAAA;IACZ,MAAM,EAAE,cAAc,CAAA;IACtB,SAAS,EAAE,eAAe,CAAA;IAC1B,eAAe,EAAE,oBAAoB,EAAE,CAAA;IACvC,MAAM,EAAE,YAAY,GAAG,SAAS,CAAA;IAChC,oBAAoB,EAAE,cAAc,CAAC,WAAW,CAAC,CAAC,yBAAyB,CAAC,CAAA;IAC5E,QAAQ,EAAE,iBAAiB,GAAG,IAAI,CAAA;IAClC,gGAAgG;IAChG,OAAO,EAAE;QACP,6EAA6E;QAC7E,SAAS,EAAE,OAAO,CAAA;QAClB,eAAe,EAAE,OAAO,GAAG,SAAS,CAAA;QACpC,qBAAqB,EAAE,OAAO,GAAG,SAAS,CAAA;QAC1C,kBAAkB,EAAE,OAAO,GAAG,SAAS,CAAA;QACvC,aAAa,EAAE,iBAAiB,EAAE,CAAA;QAClC,4BAA4B,EAAE,OAAO,GAAG,SAAS,CAAA;QACjD,uBAAuB,EAAE,OAAO,GAAG,UAAU,GAAG,SAAS,CAAA;KAC1D,CAAA;CACF,CAAC;;AA4fF,wBAMG"}
1
+ {"version":3,"file":"ModernLayout.vue.d.ts","sourceRoot":"","sources":["../../../../src/features/Operation/layouts/ModernLayout.vue"],"names":[],"mappings":"AA6PA,OAAO,KAAK,EACV,eAAe,EAEf,oBAAoB,EACpB,YAAY,EACb,MAAM,8DAA8D,CAAA;AAoBrE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAA;AAMxE,KAAK,WAAW,GAAG,IAAI,CACnB,cAAc,EACd,UAAU,GAAG,WAAW,GAAG,QAAQ,GAAG,aAAa,GAAG,iBAAiB,CACxE,GAAG;IACF,wCAAwC;IACxC,SAAS,EAAE,eAAe,CAAA;IAC1B,4CAA4C;IAC5C,cAAc,EAAE,YAAY,GAAG,IAAI,CAAA;IACnC,sDAAsD;IACtD,uBAAuB,EAAE,oBAAoB,EAAE,CAAA;CAChD,CAAC;;AA6fJ,wBAMG"}