@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
@@ -11,16 +11,14 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
11
11
  props: {
12
12
  level: { default: 0 },
13
13
  entries: {},
14
- paths: {},
15
- webhooks: {},
16
- schemas: {},
17
- security: {},
18
- activeServer: {},
19
- getSecuritySchemes: { type: Function },
20
- xScalarDefaultClient: {},
14
+ document: {},
15
+ clientOptions: {},
16
+ options: {},
17
+ selectedServer: {},
18
+ securitySchemes: {},
19
+ selectedClient: {},
21
20
  expandedItems: {},
22
- eventBus: {},
23
- options: {}
21
+ eventBus: {}
24
22
  },
25
23
  setup(__props) {
26
24
  const isTagGroup = (entry) => entry["type"] === "tag" && entry.isGroup === true;
@@ -30,7 +28,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
30
28
  const isModelsTag = (entry) => entry["type"] === "models";
31
29
  const isModel = (entry) => entry["type"] === "model";
32
30
  function getPathValue(entry) {
33
- return isWebhook(entry) ? __props.webhooks[entry.name] : __props.paths[entry.path];
31
+ return isWebhook(entry) ? __props.document.webhooks?.[entry.name] : __props.document.paths?.[entry.path];
34
32
  }
35
33
  return (_ctx, _cache) => {
36
34
  const _component_TraversedEntry = resolveComponent("TraversedEntry", true);
@@ -47,20 +45,19 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
47
45
  default: withCtx(() => [
48
46
  createVNode(unref(_sfc_main$2), {
49
47
  id: entry.id,
48
+ clientOptions: _ctx.clientOptions,
49
+ document: _ctx.document,
50
50
  eventBus: _ctx.eventBus,
51
- getSecurityScheme: _ctx.getSecuritySchemes,
52
51
  isCollapsed: !_ctx.expandedItems[entry.id],
52
+ isWebhook: isWebhook(entry),
53
53
  method: entry.method,
54
- options: {
55
- ..._ctx.options,
56
- isWebhook: isWebhook(entry)
57
- },
54
+ options: _ctx.options,
58
55
  path: isWebhook(entry) ? entry.name : entry.path,
59
56
  pathValue: getPathValue(entry),
60
- security: _ctx.security,
61
- server: _ctx.activeServer,
62
- xScalarDefaultClient: _ctx.xScalarDefaultClient
63
- }, null, 8, ["id", "eventBus", "getSecurityScheme", "isCollapsed", "method", "options", "path", "pathValue", "security", "server", "xScalarDefaultClient"])
57
+ securitySchemes: _ctx.securitySchemes,
58
+ selectedClient: _ctx.selectedClient,
59
+ server: _ctx.selectedServer
60
+ }, null, 8, ["id", "clientOptions", "document", "eventBus", "isCollapsed", "isWebhook", "method", "options", "path", "pathValue", "securitySchemes", "selectedClient", "server"])
64
61
  ]),
65
62
  _: 2
66
63
  }, 1032, ["omit"])) : isTag(entry) ? (openBlock(), createBlock(unref(_sfc_main$3), {
@@ -75,76 +72,61 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
75
72
  default: withCtx(() => [
76
73
  "children" in entry && entry.children?.length ? (openBlock(), createBlock(_component_TraversedEntry, {
77
74
  key: 0,
78
- activeServer: _ctx.activeServer,
75
+ clientOptions: _ctx.clientOptions,
76
+ document: _ctx.document,
79
77
  entries: entry.children,
80
78
  eventBus: _ctx.eventBus,
81
79
  expandedItems: _ctx.expandedItems,
82
- getSecuritySchemes: _ctx.getSecuritySchemes,
83
80
  level: _ctx.level + 1,
84
81
  options: _ctx.options,
85
- paths: _ctx.paths,
86
- schemas: _ctx.schemas,
87
- security: _ctx.security,
88
- webhooks: _ctx.webhooks,
89
- xScalarDefaultClient: _ctx.xScalarDefaultClient
90
- }, null, 8, ["activeServer", "entries", "eventBus", "expandedItems", "getSecuritySchemes", "level", "options", "paths", "schemas", "security", "webhooks", "xScalarDefaultClient"])) : createCommentVNode("", true)
82
+ securitySchemes: _ctx.securitySchemes,
83
+ selectedClient: _ctx.selectedClient,
84
+ selectedServer: _ctx.selectedServer
85
+ }, null, 8, ["clientOptions", "document", "entries", "eventBus", "expandedItems", "level", "options", "securitySchemes", "selectedClient", "selectedServer"])) : createCommentVNode("", true)
91
86
  ]),
92
87
  _: 2
93
88
  }, 1032, ["eventBus", "isCollapsed", "layout", "moreThanOneTag", "tag"])) : isTagGroup(entry) ? (openBlock(), createBlock(_component_TraversedEntry, {
94
89
  key: 2,
95
- activeServer: _ctx.activeServer,
90
+ clientOptions: _ctx.clientOptions,
91
+ document: _ctx.document,
96
92
  entries: entry.children || [],
97
93
  eventBus: _ctx.eventBus,
98
94
  expandedItems: _ctx.expandedItems,
99
- getSecuritySchemes: _ctx.getSecuritySchemes,
100
95
  level: _ctx.level + 1,
101
96
  options: _ctx.options,
102
- paths: _ctx.paths,
103
- schemas: _ctx.schemas,
104
- security: _ctx.security,
105
- webhooks: _ctx.webhooks,
106
- xScalarDefaultClient: _ctx.xScalarDefaultClient
107
- }, null, 8, ["activeServer", "entries", "eventBus", "expandedItems", "getSecuritySchemes", "level", "options", "paths", "schemas", "security", "webhooks", "xScalarDefaultClient"])) : isModelsTag(entry) && _ctx.schemas ? (openBlock(), createBlock(_sfc_main$4, {
97
+ securitySchemes: _ctx.securitySchemes,
98
+ selectedClient: _ctx.selectedClient,
99
+ selectedServer: _ctx.selectedServer
100
+ }, null, 8, ["clientOptions", "document", "entries", "eventBus", "expandedItems", "level", "options", "securitySchemes", "selectedClient", "selectedServer"])) : isModelsTag(entry) && _ctx.document.components?.schemas ? (openBlock(), createBlock(_sfc_main$4, {
108
101
  key: 3,
109
102
  id: entry.id,
110
103
  eventBus: _ctx.eventBus,
111
104
  isCollapsed: !_ctx.expandedItems[entry.id],
112
- options: {
113
- layout: _ctx.options.layout,
114
- expandAllModelSections: _ctx.options.expandAllModelSections,
115
- orderRequiredPropertiesFirst: _ctx.options.orderRequiredPropertiesFirst,
116
- orderSchemaPropertiesBy: _ctx.options.orderSchemaPropertiesBy
117
- }
105
+ layout: _ctx.options.layout
118
106
  }, {
119
107
  default: withCtx(() => [
120
108
  createVNode(_component_TraversedEntry, {
121
- activeServer: _ctx.activeServer,
109
+ clientOptions: _ctx.clientOptions,
110
+ document: _ctx.document,
122
111
  entries: entry.children || [],
123
112
  eventBus: _ctx.eventBus,
124
113
  expandedItems: _ctx.expandedItems,
125
- getSecuritySchemes: _ctx.getSecuritySchemes,
126
114
  level: _ctx.level + 1,
127
115
  options: _ctx.options,
128
- paths: _ctx.paths,
129
- schemas: _ctx.schemas,
130
- security: _ctx.security,
131
- webhooks: _ctx.webhooks,
132
- xScalarDefaultClient: _ctx.xScalarDefaultClient
133
- }, null, 8, ["activeServer", "entries", "eventBus", "expandedItems", "getSecuritySchemes", "level", "options", "paths", "schemas", "security", "webhooks", "xScalarDefaultClient"])
116
+ securitySchemes: _ctx.securitySchemes,
117
+ selectedClient: _ctx.selectedClient,
118
+ selectedServer: _ctx.selectedServer
119
+ }, null, 8, ["clientOptions", "document", "entries", "eventBus", "expandedItems", "level", "options", "securitySchemes", "selectedClient", "selectedServer"])
134
120
  ]),
135
121
  _: 2
136
- }, 1032, ["id", "eventBus", "isCollapsed", "options"])) : isModel(entry) && _ctx.schemas ? (openBlock(), createBlock(_sfc_main$5, {
122
+ }, 1032, ["id", "eventBus", "isCollapsed", "layout"])) : isModel(entry) && _ctx.document.components?.schemas?.[entry.name] ? (openBlock(), createBlock(_sfc_main$5, {
137
123
  key: 4,
138
124
  id: entry.id,
139
125
  eventBus: _ctx.eventBus,
140
126
  isCollapsed: !_ctx.expandedItems[entry.id],
141
127
  name: entry.name,
142
- options: {
143
- layout: _ctx.options.layout,
144
- orderRequiredPropertiesFirst: _ctx.options.orderRequiredPropertiesFirst,
145
- orderSchemaPropertiesBy: _ctx.options.orderSchemaPropertiesBy
146
- },
147
- schema: unref(getResolvedRef)(_ctx.schemas[entry.name])
128
+ options: _ctx.options,
129
+ schema: unref(getResolvedRef)(_ctx.document.components.schemas[entry.name])
148
130
  }, null, 8, ["id", "eventBus", "isCollapsed", "name", "options", "schema"])) : createCommentVNode("", true)
149
131
  ]),
150
132
  _: 2
@@ -26,8 +26,8 @@ type __VLS_Props = {
26
26
  options: SchemaOptions;
27
27
  };
28
28
  declare const _default_1: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
29
- required: boolean;
30
29
  level: number;
30
+ required: boolean;
31
31
  compact: boolean;
32
32
  hideModelNames: boolean;
33
33
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
@@ -1 +1 @@
1
- {"version":3,"file":"SchemaProperty.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Schema/SchemaProperty.vue"],"names":[],"mappings":"AAujBA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AAEvE,OAAO,KAAK,EACV,mBAAmB,EACnB,YAAY,EACb,MAAM,8DAA8D,CAAA;AAErE,OAAO,EAAY,KAAK,SAAS,EAAE,MAAM,KAAK,CAAA;AAI9C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mCAAmC,CAAA;AAUtE;;;;;GAKG;AAEH,KAAK,WAAW,GAAG;IACf,EAAE,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IACvB,MAAM,EAAE,YAAY,GAAG,SAAS,CAAA;IAChC,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,aAAa,CAAC,EAAE,mBAAmB,CAAA;IACnC,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,OAAO,CAAC,EAAE,sBAAsB,GAAG,mBAAmB,CAAA;IACtD,UAAU,CAAC,EAAE,MAAM,EAAE,CAAA;IACrB,QAAQ,EAAE,iBAAiB,GAAG,IAAI,CAAA;IAClC,OAAO,EAAE,aAAa,CAAA;CACvB,CAAC;;cAVW,OAAO;WAFV,MAAM;aAGJ,OAAO;oBAGA,OAAO;;AAimB5B,0BAOG"}
1
+ {"version":3,"file":"SchemaProperty.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Schema/SchemaProperty.vue"],"names":[],"mappings":"AAujBA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AAEvE,OAAO,KAAK,EACV,mBAAmB,EACnB,YAAY,EACb,MAAM,8DAA8D,CAAA;AAErE,OAAO,EAAY,KAAK,SAAS,EAAE,MAAM,KAAK,CAAA;AAI9C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mCAAmC,CAAA;AAUtE;;;;;GAKG;AAEH,KAAK,WAAW,GAAG;IACf,EAAE,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IACvB,MAAM,EAAE,YAAY,GAAG,SAAS,CAAA;IAChC,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,aAAa,CAAC,EAAE,mBAAmB,CAAA;IACnC,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,OAAO,CAAC,EAAE,sBAAsB,GAAG,mBAAmB,CAAA;IACtD,UAAU,CAAC,EAAE,MAAM,EAAE,CAAA;IACrB,QAAQ,EAAE,iBAAiB,GAAG,IAAI,CAAA;IAClC,OAAO,EAAE,aAAa,CAAA;CACvB,CAAC;;WAZQ,MAAM;cAEH,OAAO;aACR,OAAO;oBAGA,OAAO;;AAimB5B,0BAOG"}
@@ -1,4 +1,3 @@
1
- export { ClientLibraries } from './ClientLibraries';
2
1
  export { default as Content } from './Content.vue.js';
3
2
  export { Model, Models } from './Models';
4
3
  export { default as TraversedEntry } from './Operations/TraversedEntry.vue.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Content/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA;AACnD,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,eAAe,CAAA;AAClD,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,UAAU,CAAA;AACxC,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,iCAAiC,CAAA;AAC3E,OAAO,EAAE,MAAM,EAAE,aAAa,EAAE,4BAA4B,EAAE,cAAc,EAAE,MAAM,UAAU,CAAA;AAC9F,OAAO,EAAE,GAAG,EAAE,MAAM,QAAQ,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Content/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,eAAe,CAAA;AAClD,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,UAAU,CAAA;AACxC,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,iCAAiC,CAAA;AAC3E,OAAO,EAAE,MAAM,EAAE,aAAa,EAAE,4BAA4B,EAAE,cAAc,EAAE,MAAM,UAAU,CAAA;AAC9F,OAAO,EAAE,GAAG,EAAE,MAAM,QAAQ,CAAA"}
@@ -1,6 +1,3 @@
1
- type __VLS_Props = {
2
- id: string;
3
- };
4
- 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>;
1
+ declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
5
2
  export default _default;
6
3
  //# sourceMappingURL=ShowMoreButton.vue.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ShowMoreButton.vue.d.ts","sourceRoot":"","sources":["../../src/components/ShowMoreButton.vue"],"names":[],"mappings":"AAqEA,KAAK,WAAW,GAAG;IACjB,EAAE,EAAE,MAAM,CAAA;CACX,CAAC;;AAoEF,wBAMG"}
1
+ {"version":3,"file":"ShowMoreButton.vue.d.ts","sourceRoot":"","sources":["../../src/components/ShowMoreButton.vue"],"names":[],"mappings":";AA0GA,wBAKG"}
@@ -1,7 +1,7 @@
1
1
  import _sfc_main from "./ShowMoreButton.vue2.js";
2
2
  /* empty css */
3
3
  import _export_sfc from "../_virtual/_plugin-vue_export-helper.js";
4
- const ShowMoreButton = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-3cd30981"]]);
4
+ const ShowMoreButton = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-d1c2b649"]]);
5
5
  export {
6
6
  ShowMoreButton as default
7
7
  };
@@ -1,30 +1,20 @@
1
- import { defineComponent, useTemplateRef, createElementBlock, openBlock, createTextVNode, createVNode, unref } from "vue";
1
+ import { defineComponent, createElementBlock, openBlock, createTextVNode, createVNode, unref } from "vue";
2
2
  import { ScalarIconCaretDown } from "@scalar/icons";
3
- import { emitCustomEvent } from "@scalar/workspace-store/events";
3
+ const _hoisted_1 = {
4
+ class: "show-more",
5
+ type: "button"
6
+ };
4
7
  const _sfc_main = /* @__PURE__ */ defineComponent({
5
8
  __name: "ShowMoreButton",
6
- props: {
7
- id: {}
8
- },
9
9
  setup(__props) {
10
- const el = useTemplateRef("el");
11
- const handleClick = () => {
12
- emitCustomEvent(el.value, "scalar-on-show-more", { id: __props.id });
13
- };
14
10
  return (_ctx, _cache) => {
15
- return openBlock(), createElementBlock("button", {
16
- ref_key: "el",
17
- ref: el,
18
- class: "show-more",
19
- type: "button",
20
- onClick: handleClick
21
- }, [
11
+ return openBlock(), createElementBlock("button", _hoisted_1, [
22
12
  _cache[0] || (_cache[0] = createTextVNode(" Show More ", -1)),
23
13
  createVNode(unref(ScalarIconCaretDown), {
24
14
  class: "text-c-2 mt-0.25 size-3",
25
15
  weight: "bold"
26
16
  })
27
- ], 512);
17
+ ]);
28
18
  };
29
19
  }
30
20
  });
@@ -1,5 +1,5 @@
1
1
  export { default as ClassicHeader } from './ClassicHeader.vue.js';
2
- export { ClientLibraries, Content, Model, Models, Schema, SchemaHeading, SchemaObjectExampleCodeBlock, SchemaProperty, Tag, TraversedEntry, } from './Content';
2
+ export { Content, Model, Models, Schema, SchemaHeading, SchemaObjectExampleCodeBlock, SchemaProperty, Tag, TraversedEntry, } from './Content';
3
3
  export { default as ApiReferenceContent } from './Content/Content.vue.js';
4
4
  export { HttpMethod } from './HttpMethod';
5
5
  export { default as IntersectionObserver } from './IntersectionObserver.vue.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,qBAAqB,CAAA;AAC9D,OAAO,EACL,eAAe,EACf,OAAO,EACP,KAAK,EACL,MAAM,EACN,MAAM,EACN,aAAa,EACb,4BAA4B,EAC5B,cAAc,EACd,GAAG,EACH,cAAc,GACf,MAAM,WAAW,CAAA;AAClB,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,uBAAuB,CAAA;AACtE,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AACzC,OAAO,EAAE,OAAO,IAAI,oBAAoB,EAAE,MAAM,4BAA4B,CAAA;AAC5E,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,MAAM,iBAAiB,CAAA;AACjD,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,oBAAoB,CAAA;AAC5D,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAA;AACjD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAC/C,OAAO,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAA;AAC5C,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,qBAAqB,CAAA;AAC9D,OAAO,EACL,OAAO,EACP,KAAK,EACL,MAAM,EACN,MAAM,EACN,aAAa,EACb,4BAA4B,EAC5B,cAAc,EACd,GAAG,EACH,cAAc,GACf,MAAM,WAAW,CAAA;AAClB,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,uBAAuB,CAAA;AACtE,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AACzC,OAAO,EAAE,OAAO,IAAI,oBAAoB,EAAE,MAAM,4BAA4B,CAAA;AAC5E,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,MAAM,iBAAiB,CAAA;AACjD,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,oBAAoB,CAAA;AAC5D,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAA;AACjD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAC/C,OAAO,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAA;AAC5C,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA"}
@@ -11,17 +11,15 @@ import { default as default11 } from "./Content/Tags/Tag.vue.js";
11
11
  import { default as default12 } from "./Content/Operations/TraversedEntry.vue.js";
12
12
  import { default as default13 } from "./HttpMethod/HttpMethod.vue.js";
13
13
  import { default as default14 } from "./RenderPlugins/RenderPlugins.vue.js";
14
- import { default as default15 } from "./Content/ClientLibraries/ClientLibraries.vue.js";
15
- import { default as default16 } from "./Content/Schema/Schema.vue.js";
16
- import { default as default17 } from "./Content/Schema/SchemaHeading.vue.js";
17
- import { default as default18 } from "./Content/Schema/SchemaProperty.vue.js";
18
- import { default as default19 } from "./OperationsList/OperationsList.vue.js";
19
- import { default as default20 } from "./Section/SectionContainer.vue.js";
20
- import { default as default21 } from "./SectionFlare/SectionFlare.vue.js";
14
+ import { default as default15 } from "./Content/Schema/Schema.vue.js";
15
+ import { default as default16 } from "./Content/Schema/SchemaHeading.vue.js";
16
+ import { default as default17 } from "./Content/Schema/SchemaProperty.vue.js";
17
+ import { default as default18 } from "./OperationsList/OperationsList.vue.js";
18
+ import { default as default19 } from "./Section/SectionContainer.vue.js";
19
+ import { default as default20 } from "./SectionFlare/SectionFlare.vue.js";
21
20
  export {
22
21
  default3 as ApiReferenceContent,
23
22
  default2 as ClassicHeader,
24
- default15 as ClientLibraries,
25
23
  default4 as Content,
26
24
  default13 as HttpMethod,
27
25
  default5 as IntersectionObserver,
@@ -29,14 +27,14 @@ export {
29
27
  default7 as MobileHeader,
30
28
  default8 as Model,
31
29
  default9 as Models,
32
- default19 as OperationsList,
30
+ default18 as OperationsList,
33
31
  default14 as RenderPlugins,
34
- default16 as Schema,
35
- default17 as SchemaHeading,
32
+ default15 as Schema,
33
+ default16 as SchemaHeading,
36
34
  default10 as SchemaObjectExampleCodeBlock,
37
- default18 as SchemaProperty,
38
- default20 as SectionContainer,
39
- default21 as SectionFlare,
35
+ default17 as SchemaProperty,
36
+ default19 as SectionContainer,
37
+ default20 as SectionFlare,
40
38
  default11 as Tag,
41
39
  default12 as TraversedEntry
42
40
  };
@@ -1,38 +1,36 @@
1
1
  import type { ClientOptionGroup } from '@scalar/api-client/v2/blocks/operation-code-sample';
2
+ import type { MergedSecuritySchemes } from '@scalar/api-client/v2/blocks/scalar-auth-selector-block';
2
3
  import type { HttpMethod } from '@scalar/helpers/http/http-methods';
3
- import type { Server } from '@scalar/oas-utils/entities/spec';
4
+ import type { ApiReferenceConfigurationRaw } from '@scalar/types/api-reference';
4
5
  import type { WorkspaceStore } from '@scalar/workspace-store/client';
5
6
  import type { WorkspaceEventBus } from '@scalar/workspace-store/events';
6
- import type { PathItemObject, SecurityRequirementObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document';
7
- import type { SecuritySchemeGetter } from '../../helpers/map-config-to-client-store.js';
8
- type __VLS_Props = {
7
+ import type { OpenApiDocument, PathItemObject, ServerObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document';
8
+ /**
9
+ * References Operation "block"
10
+ */
11
+ declare const _default: import("vue").DefineComponent<OperationProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<OperationProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
12
+ export default _default;
13
+ export type OperationProps = {
9
14
  id: string;
10
15
  method: HttpMethod;
16
+ /** The subset of the configuration object required for the operation component */
17
+ options: Pick<ApiReferenceConfigurationRaw, 'expandAllResponses' | 'hideTestRequestButton' | 'layout' | 'orderRequiredPropertiesFirst' | 'orderSchemaPropertiesBy' | 'showOperationId'>;
18
+ /** Document object */
19
+ document: OpenApiDocument;
11
20
  /** Key of the operations path in the document.paths object */
12
21
  path: string;
13
22
  /** OpenAPI path object that will include the operation */
14
23
  pathValue: PathItemObject | undefined;
15
- /** Active server*/
16
- server: Server | undefined;
17
- /** Document level security requirements */
18
- security: SecurityRequirementObject[] | undefined;
19
- /** Temporary getter function to handle overlap with the client store */
20
- getSecurityScheme: SecuritySchemeGetter;
24
+ /** Currently selected server for the document */
25
+ server: ServerObject | null;
26
+ /** The merged security schemes for the document and the authentication configuration */
27
+ securitySchemes: MergedSecuritySchemes;
28
+ /** The http client options for the dropdown */
29
+ clientOptions: ClientOptionGroup[];
30
+ /** Whether the Classic layout operation is collapsed */
21
31
  isCollapsed: boolean;
22
- xScalarDefaultClient: WorkspaceStore['workspace']['x-scalar-default-client'];
23
- eventBus: WorkspaceEventBus | null;
24
- options: {
25
- layout: 'classic' | 'modern';
26
- /** Sets some additional display properties when an operation is a webhook */
27
- isWebhook: boolean;
28
- showOperationId: boolean | undefined;
29
- hideTestRequestButton: boolean | undefined;
30
- expandAllResponses: boolean | undefined;
31
- clientOptions: ClientOptionGroup[];
32
- orderRequiredPropertiesFirst: boolean | undefined;
33
- orderSchemaPropertiesBy: 'alpha' | 'preserve' | undefined;
34
- };
32
+ isWebhook: boolean;
33
+ selectedClient: WorkspaceStore['workspace']['x-scalar-default-client'];
34
+ eventBus: WorkspaceEventBus;
35
35
  };
36
- 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>;
37
- export default _default;
38
36
  //# sourceMappingURL=Operation.vue.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Operation.vue.d.ts","sourceRoot":"","sources":["../../../src/features/Operation/Operation.vue"],"names":[],"mappings":"AAyHA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,oDAAoD,CAAA;AAC3F,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mCAAmC,CAAA;AACnE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,iCAAiC,CAAA;AAC7D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAA;AACpE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AAEvE,OAAO,KAAK,EACV,cAAc,EACd,yBAAyB,EAE1B,MAAM,8DAA8D,CAAA;AAIrE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,sCAAsC,CAAA;AAMhF,KAAK,WAAW,GAAG;IACjB,EAAE,EAAE,MAAM,CAAA;IACV,MAAM,EAAE,UAAU,CAAA;IAClB,8DAA8D;IAC9D,IAAI,EAAE,MAAM,CAAA;IACZ,0DAA0D;IAC1D,SAAS,EAAE,cAAc,GAAG,SAAS,CAAA;IACrC,mBAAmB;IACnB,MAAM,EAAE,MAAM,GAAG,SAAS,CAAA;IAC1B,2CAA2C;IAC3C,QAAQ,EAAE,yBAAyB,EAAE,GAAG,SAAS,CAAA;IACjD,wEAAwE;IACxE,iBAAiB,EAAE,oBAAoB,CAAA;IACvC,WAAW,EAAE,OAAO,CAAA;IACpB,oBAAoB,EAAE,cAAc,CAAC,WAAW,CAAC,CAAC,yBAAyB,CAAC,CAAA;IAC5E,QAAQ,EAAE,iBAAiB,GAAG,IAAI,CAAA;IAElC,OAAO,EAAE;QACP,MAAM,EAAE,SAAS,GAAG,QAAQ,CAAA;QAC5B,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;;AAwIF,wBAMG"}
1
+ {"version":3,"file":"Operation.vue.d.ts","sourceRoot":"","sources":["../../../src/features/Operation/Operation.vue"],"names":[],"mappings":"AAgJA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,oDAAoD,CAAA;AAC3F,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,yDAAyD,CAAA;AACpG,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mCAAmC,CAAA;AACnE,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,6BAA6B,CAAA;AAC/E,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAA;AACpE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AAEvE,OAAO,KAAK,EACV,eAAe,EACf,cAAc,EACd,YAAY,EACb,MAAM,8DAA8D,CAAA;AAWrE;;GAEG;;AACH,wBA+JI;AAEJ,MAAM,MAAM,cAAc,GAAG;IAC3B,EAAE,EAAE,MAAM,CAAA;IACV,MAAM,EAAE,UAAU,CAAA;IAClB,kFAAkF;IAClF,OAAO,EAAE,IAAI,CACX,4BAA4B,EAC1B,oBAAoB,GACpB,uBAAuB,GACvB,QAAQ,GACR,8BAA8B,GAC9B,yBAAyB,GACzB,iBAAiB,CACpB,CAAA;IACD,sBAAsB;IACtB,QAAQ,EAAE,eAAe,CAAA;IACzB,8DAA8D;IAC9D,IAAI,EAAE,MAAM,CAAA;IACZ,0DAA0D;IAC1D,SAAS,EAAE,cAAc,GAAG,SAAS,CAAA;IACrC,iDAAiD;IACjD,MAAM,EAAE,YAAY,GAAG,IAAI,CAAA;IAC3B,wFAAwF;IACxF,eAAe,EAAE,qBAAqB,CAAA;IACtC,+CAA+C;IAC/C,aAAa,EAAE,iBAAiB,EAAE,CAAA;IAClC,wDAAwD;IACxD,WAAW,EAAE,OAAO,CAAA;IACpB,SAAS,EAAE,OAAO,CAAA;IAClB,cAAc,EAAE,cAAc,CAAC,WAAW,CAAC,CAAC,yBAAyB,CAAC,CAAA;IACtE,QAAQ,EAAE,iBAAiB,CAAA;CAC5B,CACA"}
@@ -1,23 +1,28 @@
1
1
  import { defineComponent, computed, createElementBlock, createCommentVNode, openBlock, Fragment, createBlock } from "vue";
2
2
  import { getResolvedRef } from "@scalar/workspace-store/helpers/get-resolved-ref";
3
3
  import { combineParams } from "./helpers/combine-params.js";
4
+ import { filterSelectedSecurity } from "./helpers/filter-selected-security.js";
4
5
  import { getFirstServer } from "./helpers/get-first-server.js";
5
6
  import ClassicLayout from "./layouts/ClassicLayout.vue.js";
6
7
  import ModernLayout from "./layouts/ModernLayout.vue.js";
8
+ const __default__ = {};
7
9
  const _sfc_main = /* @__PURE__ */ defineComponent({
10
+ ...__default__,
8
11
  __name: "Operation",
9
12
  props: {
10
13
  id: {},
11
14
  method: {},
15
+ options: {},
16
+ document: {},
12
17
  path: {},
13
18
  pathValue: {},
14
19
  server: {},
15
- security: {},
16
- getSecurityScheme: { type: Function },
20
+ securitySchemes: {},
21
+ clientOptions: {},
17
22
  isCollapsed: { type: Boolean },
18
- xScalarDefaultClient: {},
19
- eventBus: {},
20
- options: {}
23
+ isWebhook: { type: Boolean },
24
+ selectedClient: {},
25
+ eventBus: {}
21
26
  },
22
27
  setup(__props) {
23
28
  const operation = computed(() => {
@@ -28,45 +33,49 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
28
33
  const parameters = combineParams(__props.pathValue?.parameters, entity.parameters);
29
34
  return { ...entity, parameters };
30
35
  });
31
- const selectedSecuritySchemes = computed(
32
- () => __props.getSecurityScheme(operation.value?.security, __props.security || [])
33
- );
34
36
  const selectedServer = computed(
35
37
  () => getFirstServer(
36
38
  // 1) Operation
37
- operation.value?.servers,
39
+ operation.value?.servers ?? null,
38
40
  // 2) Path Item
39
- __props.pathValue?.servers,
41
+ __props.pathValue?.servers ?? null,
40
42
  // 3) Document
41
43
  __props.server
42
44
  )
43
45
  );
46
+ const selectedSecuritySchemes = computed(
47
+ () => filterSelectedSecurity(__props.document, operation.value, __props.securitySchemes)
48
+ );
44
49
  return (_ctx, _cache) => {
45
50
  return operation.value ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
46
- _ctx.options?.layout === "classic" ? (openBlock(), createBlock(ClassicLayout, {
51
+ _ctx.options.layout === "classic" ? (openBlock(), createBlock(ClassicLayout, {
47
52
  key: 0,
48
53
  id: _ctx.id,
54
+ clientOptions: _ctx.clientOptions,
49
55
  eventBus: _ctx.eventBus,
50
56
  isCollapsed: _ctx.isCollapsed,
57
+ isWebhook: _ctx.isWebhook,
51
58
  method: _ctx.method,
52
59
  operation: operation.value,
53
60
  options: _ctx.options,
54
61
  path: _ctx.path,
55
- securitySchemes: selectedSecuritySchemes.value,
56
- server: selectedServer.value,
57
- xScalarDefaultClient: _ctx.xScalarDefaultClient
58
- }, null, 8, ["id", "eventBus", "isCollapsed", "method", "operation", "options", "path", "securitySchemes", "server", "xScalarDefaultClient"])) : (openBlock(), createBlock(ModernLayout, {
62
+ selectedClient: _ctx.selectedClient,
63
+ selectedSecuritySchemes: selectedSecuritySchemes.value,
64
+ selectedServer: selectedServer.value
65
+ }, null, 8, ["id", "clientOptions", "eventBus", "isCollapsed", "isWebhook", "method", "operation", "options", "path", "selectedClient", "selectedSecuritySchemes", "selectedServer"])) : (openBlock(), createBlock(ModernLayout, {
59
66
  key: 1,
60
67
  id: _ctx.id,
68
+ clientOptions: _ctx.clientOptions,
61
69
  eventBus: _ctx.eventBus,
70
+ isWebhook: _ctx.isWebhook,
62
71
  method: _ctx.method,
63
72
  operation: operation.value,
64
73
  options: _ctx.options,
65
74
  path: _ctx.path,
66
- securitySchemes: selectedSecuritySchemes.value,
67
- server: selectedServer.value,
68
- xScalarDefaultClient: _ctx.xScalarDefaultClient
69
- }, null, 8, ["id", "eventBus", "method", "operation", "options", "path", "securitySchemes", "server", "xScalarDefaultClient"]))
75
+ selectedClient: _ctx.selectedClient,
76
+ selectedSecuritySchemes: selectedSecuritySchemes.value,
77
+ selectedServer: selectedServer.value
78
+ }, null, 8, ["id", "clientOptions", "eventBus", "isWebhook", "method", "operation", "options", "path", "selectedClient", "selectedSecuritySchemes", "selectedServer"]))
70
79
  ], 64)) : createCommentVNode("", true);
71
80
  };
72
81
  }
@@ -1,14 +1,12 @@
1
1
  import type { WorkspaceEventBus } from '@scalar/workspace-store/events';
2
2
  import type { ParameterObject, RequestBodyObject } 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
  breadcrumb?: string[];
5
6
  parameters?: ParameterObject[];
6
7
  requestBody?: RequestBodyObject | undefined;
7
8
  eventBus: WorkspaceEventBus | null;
8
- options: {
9
- orderRequiredPropertiesFirst: boolean | undefined;
10
- orderSchemaPropertiesBy: 'alpha' | 'preserve' | undefined;
11
- };
9
+ options: Pick<OperationProps['options'], 'orderRequiredPropertiesFirst' | 'orderSchemaPropertiesBy'>;
12
10
  };
13
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>;
14
12
  export default _default;
@@ -1 +1 @@
1
- {"version":3,"file":"OperationParameters.vue.d.ts","sourceRoot":"","sources":["../../../../src/features/Operation/components/OperationParameters.vue"],"names":[],"mappings":"AAyEA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AACvE,OAAO,KAAK,EACV,eAAe,EACf,iBAAiB,EAClB,MAAM,8DAA8D,CAAA;AAKrE,KAAK,WAAW,GAAG;IACjB,UAAU,CAAC,EAAE,MAAM,EAAE,CAAA;IACrB,UAAU,CAAC,EAAE,eAAe,EAAE,CAAA;IAC9B,WAAW,CAAC,EAAE,iBAAiB,GAAG,SAAS,CAAA;IAC3C,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;;AAoIF,wBAMG"}
1
+ {"version":3,"file":"OperationParameters.vue.d.ts","sourceRoot":"","sources":["../../../../src/features/Operation/components/OperationParameters.vue"],"names":[],"mappings":"AA4FA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AACvE,OAAO,KAAK,EACV,eAAe,EACf,iBAAiB,EAClB,MAAM,8DAA8D,CAAA;AAGrE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAA;AAKxE,KAAK,WAAW,GAAG;IACjB,UAAU,CAAC,EAAE,MAAM,EAAE,CAAA;IACrB,UAAU,CAAC,EAAE,eAAe,EAAE,CAAA;IAC9B,WAAW,CAAC,EAAE,iBAAiB,GAAG,SAAS,CAAA;IAC3C,QAAQ,EAAE,iBAAiB,GAAG,IAAI,CAAA;IAClC,OAAO,EAAE,IAAI,CACX,cAAc,CAAC,SAAS,CAAC,EACzB,8BAA8B,GAAG,yBAAyB,CAC3D,CAAA;CACF,CAAC;;AAkJF,wBAMG"}
@@ -1,4 +1,5 @@
1
- import { defineComponent, createElementBlock, openBlock, Fragment, createVNode, createBlock, createCommentVNode, withCtx, createTextVNode } from "vue";
1
+ import { defineComponent, computed, createElementBlock, openBlock, Fragment, createVNode, createBlock, createCommentVNode, withCtx, createTextVNode } from "vue";
2
+ import { shouldIgnoreEntity } from "@scalar/oas-utils/helpers";
2
3
  import _sfc_main$1 from "./ParameterList.vue.js";
3
4
  import RequestBody from "./RequestBody.vue.js";
4
5
  const _sfc_main = /* @__PURE__ */ defineComponent({
@@ -11,14 +12,24 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
11
12
  options: {}
12
13
  },
13
14
  setup(__props) {
14
- const filterParameters = (where) => __props.parameters?.filter((parameter) => parameter.in === where) ?? [];
15
+ const splitParameters = computed(
16
+ () => (__props.parameters ?? []).reduce(
17
+ (acc, parameter) => {
18
+ if (!shouldIgnoreEntity(parameter)) {
19
+ acc[parameter.in].push(parameter);
20
+ }
21
+ return acc;
22
+ },
23
+ { cookie: [], header: [], path: [], query: [] }
24
+ )
25
+ );
15
26
  return (_ctx, _cache) => {
16
27
  return openBlock(), createElementBlock(Fragment, null, [
17
28
  createVNode(_sfc_main$1, {
18
29
  breadcrumb: _ctx.breadcrumb ? [..._ctx.breadcrumb, "path"] : void 0,
19
30
  eventBus: _ctx.eventBus,
20
31
  options: _ctx.options,
21
- parameters: filterParameters("path")
32
+ parameters: splitParameters.value["path"]
22
33
  }, {
23
34
  title: withCtx(() => [..._cache[0] || (_cache[0] = [
24
35
  createTextVNode("Path Parameters", -1)
@@ -29,7 +40,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
29
40
  breadcrumb: _ctx.breadcrumb ? [..._ctx.breadcrumb, "query"] : void 0,
30
41
  eventBus: _ctx.eventBus,
31
42
  options: _ctx.options,
32
- parameters: filterParameters("query")
43
+ parameters: splitParameters.value["query"]
33
44
  }, {
34
45
  title: withCtx(() => [..._cache[1] || (_cache[1] = [
35
46
  createTextVNode("Query Parameters", -1)
@@ -40,7 +51,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
40
51
  breadcrumb: _ctx.breadcrumb ? [..._ctx.breadcrumb, "headers"] : void 0,
41
52
  eventBus: _ctx.eventBus,
42
53
  options: _ctx.options,
43
- parameters: filterParameters("header")
54
+ parameters: splitParameters.value["header"]
44
55
  }, {
45
56
  title: withCtx(() => [..._cache[2] || (_cache[2] = [
46
57
  createTextVNode("Headers", -1)
@@ -51,7 +62,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
51
62
  breadcrumb: _ctx.breadcrumb ? [..._ctx.breadcrumb, "cookies"] : void 0,
52
63
  eventBus: _ctx.eventBus,
53
64
  options: _ctx.options,
54
- parameters: filterParameters("cookie")
65
+ parameters: splitParameters.value["cookie"]
55
66
  }, {
56
67
  title: withCtx(() => [..._cache[3] || (_cache[3] = [
57
68
  createTextVNode("Cookies", -1)
@@ -1,14 +1,12 @@
1
1
  import type { WorkspaceEventBus } from '@scalar/workspace-store/events';
2
2
  import type { OperationObject } 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
  responses: OperationObject['responses'];
5
6
  breadcrumb?: string[];
7
+ collapsableItems?: boolean;
6
8
  eventBus: WorkspaceEventBus | null;
7
- options: {
8
- collapsableItems?: boolean | undefined;
9
- orderRequiredPropertiesFirst: boolean | undefined;
10
- orderSchemaPropertiesBy: 'alpha' | 'preserve' | undefined;
11
- };
9
+ options: Pick<OperationProps['options'], 'orderRequiredPropertiesFirst' | 'orderSchemaPropertiesBy'>;
12
10
  };
13
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>;
14
12
  export default _default;
@@ -1 +1 @@
1
- {"version":3,"file":"OperationResponses.vue.d.ts","sourceRoot":"","sources":["../../../../src/features/Operation/components/OperationResponses.vue"],"names":[],"mappings":"AAuCA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AAEvE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,8DAA8D,CAAA;AAInG,KAAK,WAAW,GAAG;IACjB,SAAS,EAAE,eAAe,CAAC,WAAW,CAAC,CAAA;IACvC,UAAU,CAAC,EAAE,MAAM,EAAE,CAAA;IACrB,QAAQ,EAAE,iBAAiB,GAAG,IAAI,CAAA;IAClC,OAAO,EAAE;QACP,gBAAgB,CAAC,EAAE,OAAO,GAAG,SAAS,CAAA;QACtC,4BAA4B,EAAE,OAAO,GAAG,SAAS,CAAA;QACjD,uBAAuB,EAAE,OAAO,GAAG,UAAU,GAAG,SAAS,CAAA;KAC1D,CAAA;CACF,CAAC;;AA0EF,wBAMG"}
1
+ {"version":3,"file":"OperationResponses.vue.d.ts","sourceRoot":"","sources":["../../../../src/features/Operation/components/OperationResponses.vue"],"names":[],"mappings":"AA0CA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AAEvE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,8DAA8D,CAAA;AAEnG,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAA;AAIxE,KAAK,WAAW,GAAG;IACjB,SAAS,EAAE,eAAe,CAAC,WAAW,CAAC,CAAA;IACvC,UAAU,CAAC,EAAE,MAAM,EAAE,CAAA;IACrB,gBAAgB,CAAC,EAAE,OAAO,CAAA;IAC1B,QAAQ,EAAE,iBAAiB,GAAG,IAAI,CAAA;IAClC,OAAO,EAAE,IAAI,CACX,cAAc,CAAC,SAAS,CAAC,EACzB,8BAA8B,GAAG,yBAAyB,CAC3D,CAAA;CACF,CAAC;;AA4EF,wBAMG"}