@scalar/api-reference 1.32.9 → 1.33.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 (404) hide show
  1. package/CHANGELOG.md +99 -0
  2. package/dist/browser/standalone.js +17026 -16443
  3. package/dist/browser/webpack-stats.json +1 -1
  4. package/dist/components/Anchor/Anchor.vue.d.ts.map +1 -1
  5. package/dist/components/Anchor/Anchor.vue.js +50 -5
  6. package/dist/components/Anchor/Anchor.vue2.js +2 -42
  7. package/dist/components/ApiReference.vue.js +6 -6
  8. package/dist/components/ApiReferenceLayout.vue.d.ts.map +1 -1
  9. package/dist/components/ApiReferenceLayout.vue.js +6 -6
  10. package/dist/components/ApiReferenceLayout.vue2.js +167 -176
  11. package/dist/components/ApiReferenceLayout.vue3.js +4 -0
  12. package/dist/components/ApiReferenceLayout.vue4.js +4 -0
  13. package/dist/components/ApiReferenceLayout.vue5.js +4 -0
  14. package/dist/components/ApiReferenceLayout.vue6.js +4 -0
  15. package/dist/components/Badge/Badge.vue.d.ts.map +1 -1
  16. package/dist/components/Badge/Badge.vue.js +4 -4
  17. package/dist/components/Badge/Badge.vue2.js +4 -0
  18. package/dist/components/ClassicHeader.vue.js +1 -1
  19. package/dist/components/ClassicHeader.vue2.js +4 -0
  20. package/dist/components/Content/ClientLibraries/ClientLibraries.vue.d.ts +14 -1
  21. package/dist/components/Content/ClientLibraries/ClientLibraries.vue.d.ts.map +1 -1
  22. package/dist/components/Content/ClientLibraries/ClientLibraries.vue.js +3 -3
  23. package/dist/components/Content/ClientLibraries/ClientLibraries.vue2.js +74 -84
  24. package/dist/components/Content/ClientLibraries/ClientLibraries.vue3.js +4 -0
  25. package/dist/components/Content/ClientLibraries/ClientSelector.vue.d.ts +8 -0
  26. package/dist/components/Content/ClientLibraries/ClientSelector.vue.d.ts.map +1 -1
  27. package/dist/components/Content/ClientLibraries/ClientSelector.vue.js +2 -2
  28. package/dist/components/Content/ClientLibraries/ClientSelector.vue2.js +81 -80
  29. package/dist/components/Content/ClientLibraries/ClientSelector.vue3.js +4 -0
  30. package/dist/components/Content/ClientLibraries/featured-clients.d.ts +11 -0
  31. package/dist/components/Content/ClientLibraries/featured-clients.d.ts.map +1 -0
  32. package/dist/components/Content/ClientLibraries/featured-clients.js +17 -0
  33. package/dist/components/Content/Content.vue.d.ts +5 -6
  34. package/dist/components/Content/Content.vue.d.ts.map +1 -1
  35. package/dist/components/Content/Content.vue.js +49 -6
  36. package/dist/components/Content/Content.vue2.js +2 -160
  37. package/dist/components/Content/Content.vue3.js +5 -0
  38. package/dist/components/Content/Introduction/Description.vue.d.ts.map +1 -1
  39. package/dist/components/Content/Introduction/Description.vue.js +3 -3
  40. package/dist/components/Content/Introduction/Description.vue3.js +4 -0
  41. package/dist/components/Content/Introduction/Introduction.vue.d.ts +7 -17
  42. package/dist/components/Content/Introduction/Introduction.vue.d.ts.map +1 -1
  43. package/dist/components/Content/Introduction/Introduction.vue.js +2 -2
  44. package/dist/components/Content/Introduction/Introduction.vue2.js +103 -118
  45. package/dist/components/Content/Introduction/Introduction.vue3.js +4 -0
  46. package/dist/components/Content/Introduction/IntroductionSection.vue.d.ts +25 -0
  47. package/dist/components/Content/Introduction/IntroductionSection.vue.d.ts.map +1 -0
  48. package/dist/components/Content/Introduction/IntroductionSection.vue.js +7 -0
  49. package/dist/components/Content/Introduction/IntroductionSection.vue2.js +159 -0
  50. package/dist/components/Content/Introduction/IntroductionSection.vue3.js +4 -0
  51. package/dist/components/Content/Models/{ModelsAccordion.vue.d.ts → ClassicLayout.vue.d.ts} +2 -2
  52. package/dist/components/Content/Models/ClassicLayout.vue.d.ts.map +1 -0
  53. package/dist/components/Content/Models/ClassicLayout.vue.js +7 -0
  54. package/dist/components/Content/Models/{ModelsAccordion.vue2.js → ClassicLayout.vue2.js} +30 -30
  55. package/dist/components/Content/Models/ClassicLayout.vue3.js +4 -0
  56. package/dist/components/Content/Models/Models.vue.d.ts +3 -1
  57. package/dist/components/Content/Models/Models.vue.d.ts.map +1 -1
  58. package/dist/components/Content/Models/Models.vue.js +38 -5
  59. package/dist/components/Content/Models/Models.vue2.js +2 -114
  60. package/dist/components/Content/Models/ModernLayout.vue.d.ts +7 -0
  61. package/dist/components/Content/Models/ModernLayout.vue.d.ts.map +1 -0
  62. package/dist/components/Content/Models/ModernLayout.vue.js +7 -0
  63. package/dist/components/Content/Models/ModernLayout.vue2.js +100 -0
  64. package/dist/components/Content/Models/ModernLayout.vue3.js +4 -0
  65. package/dist/components/Content/Models/index.d.ts +0 -1
  66. package/dist/components/Content/Models/index.d.ts.map +1 -1
  67. package/dist/components/Content/Operations/TraversedEntry.vue.d.ts +21 -0
  68. package/dist/components/Content/Operations/TraversedEntry.vue.d.ts.map +1 -0
  69. package/dist/components/Content/Operations/TraversedEntry.vue.js +95 -0
  70. package/dist/components/Content/Operations/TraversedEntry.vue2.js +4 -0
  71. package/dist/components/Content/Operations/TraversedEntryContainer.vue.d.ts +17 -0
  72. package/dist/components/Content/Operations/TraversedEntryContainer.vue.d.ts.map +1 -0
  73. package/dist/components/Content/Operations/TraversedEntryContainer.vue.js +56 -0
  74. package/dist/components/Content/Operations/TraversedEntryContainer.vue2.js +4 -0
  75. package/dist/components/Content/Operations/index.d.ts +2 -0
  76. package/dist/components/Content/Operations/index.d.ts.map +1 -0
  77. package/dist/components/Content/Schema/Schema.vue.js +1 -1
  78. package/dist/components/Content/Schema/Schema.vue3.js +4 -0
  79. package/dist/components/Content/Schema/SchemaComposition.vue.d.ts.map +1 -1
  80. package/dist/components/Content/Schema/SchemaEnumPropertyItem.vue.d.ts.map +1 -1
  81. package/dist/components/Content/Schema/SchemaEnumPropertyItem.vue.js +3 -3
  82. package/dist/components/Content/Schema/SchemaEnumPropertyItem.vue3.js +4 -0
  83. package/dist/components/Content/Schema/SchemaEnumValues.vue.d.ts.map +1 -1
  84. package/dist/components/Content/Schema/SchemaEnumValues.vue.js +3 -3
  85. package/dist/components/Content/Schema/SchemaEnumValues.vue2.js +63 -68
  86. package/dist/components/Content/Schema/SchemaEnumValues.vue3.js +4 -0
  87. package/dist/components/Content/Schema/SchemaHeading.vue.d.ts.map +1 -1
  88. package/dist/components/Content/Schema/SchemaHeading.vue.js +4 -4
  89. package/dist/components/Content/Schema/SchemaHeading.vue2.js +23 -22
  90. package/dist/components/Content/Schema/SchemaHeading.vue3.js +4 -0
  91. package/dist/components/Content/Schema/SchemaProperty.vue.d.ts.map +1 -1
  92. package/dist/components/Content/Schema/SchemaProperty.vue.js +2 -2
  93. package/dist/components/Content/Schema/SchemaProperty.vue2.js +34 -33
  94. package/dist/components/Content/Schema/SchemaProperty.vue3.js +4 -0
  95. package/dist/components/Content/Schema/SchemaPropertyDetail.vue.d.ts.map +1 -1
  96. package/dist/components/Content/Schema/SchemaPropertyDetail.vue.js +2 -2
  97. package/dist/components/Content/Schema/SchemaPropertyDetail.vue3.js +4 -0
  98. package/dist/components/Content/Schema/SchemaPropertyExamples.vue.js +3 -3
  99. package/dist/components/Content/Schema/SchemaPropertyExamples.vue3.js +4 -0
  100. package/dist/components/Content/Schema/SchemaPropertyHeading.vue.d.ts.map +1 -1
  101. package/dist/components/Content/Schema/SchemaPropertyHeading.vue.js +3 -3
  102. package/dist/components/Content/Schema/SchemaPropertyHeading.vue2.js +26 -23
  103. package/dist/components/Content/Schema/SchemaPropertyHeading.vue3.js +4 -0
  104. package/dist/components/Content/Schema/helpers/merge-all-of-schemas.d.ts +2 -1
  105. package/dist/components/Content/Schema/helpers/merge-all-of-schemas.d.ts.map +1 -1
  106. package/dist/components/Content/Schema/helpers/merge-all-of-schemas.js +59 -52
  107. package/dist/components/Content/Schema/helpers/optimize-value-for-display.d.ts.map +1 -1
  108. package/dist/components/Content/Schema/helpers/optimize-value-for-display.js +24 -20
  109. package/dist/components/Content/Schema/helpers/schema-name.d.ts +1 -1
  110. package/dist/components/Content/Schema/helpers/schema-name.d.ts.map +1 -1
  111. package/dist/components/Content/{Tag/TagAccordion.vue.d.ts → Tags/ClassicLayout.vue.d.ts} +3 -3
  112. package/dist/components/Content/Tags/ClassicLayout.vue.d.ts.map +1 -0
  113. package/dist/components/Content/Tags/ClassicLayout.vue.js +7 -0
  114. package/dist/components/Content/Tags/ClassicLayout.vue2.js +51 -0
  115. package/dist/components/Content/Tags/ClassicLayout.vue3.js +4 -0
  116. package/dist/components/Content/{Tag/TagSection.vue.d.ts → Tags/ModernLayout.vue.d.ts} +17 -13
  117. package/dist/components/Content/Tags/ModernLayout.vue.d.ts.map +1 -0
  118. package/dist/components/Content/Tags/ModernLayout.vue.js +7 -0
  119. package/dist/components/Content/Tags/ModernLayout.vue2.js +69 -0
  120. package/dist/components/Content/Tags/ModernLayout.vue3.js +4 -0
  121. package/dist/components/Content/Tags/Tag.vue.d.ts +25 -0
  122. package/dist/components/Content/Tags/Tag.vue.d.ts.map +1 -0
  123. package/dist/components/Content/Tags/Tag.vue.js +27 -0
  124. package/dist/components/Content/{Tag/Tag.vue.d.ts → Tags/TagSection.vue.d.ts} +3 -6
  125. package/dist/components/Content/Tags/TagSection.vue.d.ts.map +1 -0
  126. package/dist/components/Content/Tags/TagSection.vue.js +104 -0
  127. package/dist/components/Content/Tags/TagSection.vue2.js +4 -0
  128. package/dist/components/Content/Tags/index.d.ts +2 -0
  129. package/dist/components/Content/Tags/index.d.ts.map +1 -0
  130. package/dist/components/GettingStarted.vue.js +1 -1
  131. package/dist/components/GettingStarted.vue3.js +4 -0
  132. package/dist/components/HttpMethod/HttpMethod.vue.d.ts.map +1 -1
  133. package/dist/components/HttpMethod/HttpMethod.vue.js +8 -6
  134. package/dist/components/{Content/Lazy → Lazy}/Lazy.vue.d.ts +1 -10
  135. package/dist/components/Lazy/Lazy.vue.d.ts.map +1 -0
  136. package/dist/components/Lazy/Lazy.vue2.js +25 -0
  137. package/dist/components/Lazy/index.d.ts +3 -0
  138. package/dist/components/Lazy/index.d.ts.map +1 -0
  139. package/dist/components/Lazy/lazyBus.d.ts +8 -0
  140. package/dist/components/Lazy/lazyBus.d.ts.map +1 -0
  141. package/dist/components/Lazy/lazyBus.js +7 -0
  142. package/dist/components/LinkList/LinkList.vue.d.ts +20 -0
  143. package/dist/components/LinkList/LinkList.vue.d.ts.map +1 -0
  144. package/dist/components/LinkList/LinkList.vue.js +7 -0
  145. package/dist/components/LinkList/LinkList.vue2.js +32 -0
  146. package/dist/components/LinkList/LinkList.vue3.js +4 -0
  147. package/dist/components/LinkList/index.d.ts +2 -0
  148. package/dist/components/LinkList/index.d.ts.map +1 -0
  149. package/dist/components/LoadingSkeleton.vue.d.ts.map +1 -1
  150. package/dist/components/LoadingSkeleton.vue.js +3 -3
  151. package/dist/components/LoadingSkeleton.vue3.js +4 -0
  152. package/dist/components/MobileHeader.vue.js +1 -1
  153. package/dist/components/MobileHeader.vue3.js +4 -0
  154. package/dist/components/OperationPath.vue.js +1 -1
  155. package/dist/components/OperationPath.vue3.js +4 -0
  156. package/dist/components/{Content/Tag → OperationsList}/OperationsList.vue.d.ts +2 -5
  157. package/dist/components/OperationsList/OperationsList.vue.d.ts.map +1 -0
  158. package/dist/components/OperationsList/OperationsList.vue.js +7 -0
  159. package/dist/components/OperationsList/OperationsList.vue2.js +60 -0
  160. package/dist/components/OperationsList/OperationsList.vue3.js +4 -0
  161. package/dist/components/{Content/Tag → OperationsList}/OperationsListItem.vue.d.ts +2 -4
  162. package/dist/components/OperationsList/OperationsListItem.vue.d.ts.map +1 -0
  163. package/dist/components/OperationsList/OperationsListItem.vue.js +7 -0
  164. package/dist/components/OperationsList/OperationsListItem.vue2.js +63 -0
  165. package/dist/components/OperationsList/OperationsListItem.vue3.js +4 -0
  166. package/dist/components/OperationsList/index.d.ts +2 -0
  167. package/dist/components/OperationsList/index.d.ts.map +1 -0
  168. package/dist/components/ScreenReader.vue.js +1 -1
  169. package/dist/components/ScreenReader.vue3.js +4 -0
  170. package/dist/components/Section/CompactSection.vue.d.ts.map +1 -1
  171. package/dist/components/Section/CompactSection.vue.js +3 -3
  172. package/dist/components/Section/CompactSection.vue2.js +35 -36
  173. package/dist/components/Section/CompactSection.vue3.js +4 -0
  174. package/dist/components/Section/Section.vue.js +1 -1
  175. package/dist/components/Section/Section.vue3.js +4 -0
  176. package/dist/components/Section/SectionAccordion.vue.d.ts.map +1 -1
  177. package/dist/components/Section/SectionAccordion.vue.js +3 -3
  178. package/dist/components/Section/SectionAccordion.vue2.js +42 -36
  179. package/dist/components/Section/SectionAccordion.vue3.js +4 -0
  180. package/dist/components/Section/SectionColumn.vue.js +1 -1
  181. package/dist/components/Section/SectionColumn.vue2.js +4 -0
  182. package/dist/components/Section/SectionColumns.vue.js +1 -1
  183. package/dist/components/Section/SectionColumns.vue2.js +4 -0
  184. package/dist/components/Section/SectionContainer.vue.d.ts +9 -2
  185. package/dist/components/Section/SectionContainer.vue.d.ts.map +1 -1
  186. package/dist/components/Section/SectionContainer.vue.js +5 -11
  187. package/dist/components/Section/SectionContainer.vue2.js +18 -0
  188. package/dist/components/Section/SectionContainer.vue3.js +4 -0
  189. package/dist/components/Section/SectionContainerAccordion.vue.d.ts.map +1 -1
  190. package/dist/components/Section/SectionContainerAccordion.vue.js +3 -3
  191. package/dist/components/Section/SectionContainerAccordion.vue3.js +4 -0
  192. package/dist/components/Section/SectionContent.vue.js +1 -1
  193. package/dist/components/Section/SectionContent.vue3.js +4 -0
  194. package/dist/components/Section/SectionHeader.vue.d.ts +1 -0
  195. package/dist/components/Section/SectionHeader.vue.d.ts.map +1 -1
  196. package/dist/components/Section/SectionHeader.vue.js +3 -3
  197. package/dist/components/Section/SectionHeader.vue2.js +11 -10
  198. package/dist/components/Section/SectionHeader.vue3.js +4 -0
  199. package/dist/components/Section/SectionHeaderTag.vue.js +1 -1
  200. package/dist/components/Section/SectionHeaderTag.vue3.js +4 -0
  201. package/dist/components/SectionFlare/SectionFlare.vue.d.ts +3 -0
  202. package/dist/components/SectionFlare/SectionFlare.vue.d.ts.map +1 -0
  203. package/dist/components/SectionFlare/SectionFlare.vue.js +13 -0
  204. package/dist/components/SectionFlare/SectionFlare.vue2.js +4 -0
  205. package/dist/components/SectionFlare/index.d.ts +2 -0
  206. package/dist/components/SectionFlare/index.d.ts.map +1 -0
  207. package/dist/components/ShowMoreButton.vue.d.ts.map +1 -1
  208. package/dist/components/ShowMoreButton.vue.js +3 -3
  209. package/dist/components/ShowMoreButton.vue2.js +12 -12
  210. package/dist/components/ShowMoreButton.vue3.js +4 -0
  211. package/dist/features/Operation/Operation.vue.d.ts +11 -7
  212. package/dist/features/Operation/Operation.vue.d.ts.map +1 -1
  213. package/dist/features/Operation/Operation.vue.js +66 -48
  214. package/dist/features/Operation/components/ContentTypeSelect.vue.d.ts.map +1 -1
  215. package/dist/features/Operation/components/ContentTypeSelect.vue.js +28 -30
  216. package/dist/features/Operation/components/ParameterHeaders.vue.js +1 -1
  217. package/dist/features/Operation/components/ParameterHeaders.vue3.js +4 -0
  218. package/dist/features/Operation/components/ParameterList.vue.js +1 -1
  219. package/dist/features/Operation/components/ParameterList.vue3.js +4 -0
  220. package/dist/features/Operation/components/ParameterListItem.vue.d.ts.map +1 -1
  221. package/dist/features/Operation/components/ParameterListItem.vue.js +2 -2
  222. package/dist/features/Operation/components/ParameterListItem.vue2.js +31 -29
  223. package/dist/features/Operation/components/ParameterListItem.vue3.js +4 -0
  224. package/dist/features/Operation/components/RequestBody.vue.js +1 -1
  225. package/dist/features/Operation/components/RequestBody.vue3.js +4 -0
  226. package/dist/features/Operation/components/callbacks/Callback.vue.d.ts +8 -6
  227. package/dist/features/Operation/components/callbacks/Callback.vue.d.ts.map +1 -1
  228. package/dist/features/Operation/components/callbacks/Callback.vue.js +4 -4
  229. package/dist/features/Operation/components/callbacks/Callback.vue2.js +22 -29
  230. package/dist/features/Operation/components/callbacks/Callback.vue3.js +4 -0
  231. package/dist/features/Operation/components/callbacks/Callbacks.vue.d.ts +5 -3
  232. package/dist/features/Operation/components/callbacks/Callbacks.vue.d.ts.map +1 -1
  233. package/dist/features/Operation/components/callbacks/Callbacks.vue.js +25 -18
  234. package/dist/features/Operation/layouts/ClassicLayout.vue.d.ts +17 -12
  235. package/dist/features/Operation/layouts/ClassicLayout.vue.d.ts.map +1 -1
  236. package/dist/features/Operation/layouts/ClassicLayout.vue.js +2 -2
  237. package/dist/features/Operation/layouts/ClassicLayout.vue2.js +178 -162
  238. package/dist/features/Operation/layouts/ClassicLayout.vue3.js +4 -0
  239. package/dist/features/Operation/layouts/ModernLayout.vue.d.ts +18 -13
  240. package/dist/features/Operation/layouts/ModernLayout.vue.d.ts.map +1 -1
  241. package/dist/features/Operation/layouts/ModernLayout.vue.js +3 -3
  242. package/dist/features/Operation/layouts/ModernLayout.vue2.js +132 -126
  243. package/dist/features/Operation/layouts/ModernLayout.vue3.js +4 -0
  244. package/dist/features/Search/SearchModal.vue.js +4 -4
  245. package/dist/features/Search/SearchModal.vue2.js +9 -9
  246. package/dist/features/Search/SearchModal.vue3.js +4 -0
  247. package/dist/features/api-client-modal/ApiClientModal.vue.d.ts.map +1 -1
  248. package/dist/features/api-client-modal/useApiClient.d.ts +5188 -5128
  249. package/dist/features/api-client-modal/useApiClient.d.ts.map +1 -1
  250. package/dist/features/base-url/BaseUrl.vue.d.ts.map +1 -1
  251. package/dist/features/base-url/BaseUrl.vue.js +26 -26
  252. package/dist/features/download-link/DownloadLink.vue.js +2 -2
  253. package/dist/features/download-link/DownloadLink.vue3.js +4 -0
  254. package/dist/features/example-responses/ExampleResponse.vue.d.ts +4 -2
  255. package/dist/features/example-responses/ExampleResponse.vue.d.ts.map +1 -1
  256. package/dist/features/example-responses/ExampleResponse.vue.js +3 -3
  257. package/dist/features/example-responses/ExampleResponse.vue2.js +15 -14
  258. package/dist/features/example-responses/ExampleResponse.vue3.js +4 -0
  259. package/dist/features/example-responses/ExampleResponseTab.vue.js +3 -3
  260. package/dist/features/example-responses/ExampleResponseTab.vue3.js +4 -0
  261. package/dist/features/example-responses/ExampleResponseTabList.vue.js +2 -2
  262. package/dist/features/example-responses/ExampleResponseTabList.vue3.js +4 -0
  263. package/dist/features/example-responses/ExampleResponses.vue.d.ts +3 -2
  264. package/dist/features/example-responses/ExampleResponses.vue.d.ts.map +1 -1
  265. package/dist/features/example-responses/ExampleResponses.vue.js +4 -4
  266. package/dist/features/example-responses/ExampleResponses.vue2.js +110 -104
  267. package/dist/features/example-responses/ExampleResponses.vue3.js +4 -0
  268. package/dist/features/external-docs/ExternalDocs.vue.d.ts +7 -0
  269. package/dist/features/external-docs/ExternalDocs.vue.d.ts.map +1 -0
  270. package/dist/features/external-docs/ExternalDocs.vue.js +36 -0
  271. package/dist/features/external-docs/ExternalDocs.vue2.js +4 -0
  272. package/dist/features/external-docs/index.d.ts +2 -0
  273. package/dist/features/external-docs/index.d.ts.map +1 -0
  274. package/dist/features/info-object/Contact.vue.d.ts +7 -0
  275. package/dist/features/info-object/Contact.vue.d.ts.map +1 -0
  276. package/dist/features/info-object/Contact.vue.js +44 -0
  277. package/dist/features/info-object/Contact.vue2.js +4 -0
  278. package/dist/features/info-object/License.vue.d.ts +7 -0
  279. package/dist/features/info-object/License.vue.d.ts.map +1 -0
  280. package/dist/features/info-object/License.vue.js +37 -0
  281. package/dist/features/info-object/License.vue2.js +4 -0
  282. package/dist/features/info-object/TermsOfService.vue.d.ts +7 -0
  283. package/dist/features/info-object/TermsOfService.vue.d.ts.map +1 -0
  284. package/dist/features/info-object/TermsOfService.vue.js +30 -0
  285. package/dist/features/info-object/TermsOfService.vue2.js +4 -0
  286. package/dist/features/info-object/index.d.ts +4 -0
  287. package/dist/features/info-object/index.d.ts.map +1 -0
  288. package/dist/features/sidebar/components/Sidebar.vue.js +3 -3
  289. package/dist/features/sidebar/components/Sidebar.vue3.js +4 -0
  290. package/dist/features/sidebar/components/SidebarElement.vue.js +3 -3
  291. package/dist/features/sidebar/components/SidebarElement.vue3.js +4 -0
  292. package/dist/features/sidebar/components/SidebarGroup.vue.js +1 -1
  293. package/dist/features/sidebar/components/SidebarGroup.vue3.js +4 -0
  294. package/dist/features/sidebar/components/SidebarHttpBadge.vue.js +1 -1
  295. package/dist/features/sidebar/components/SidebarHttpBadge.vue3.js +4 -0
  296. package/dist/features/sidebar/helpers/create-sidebar.js +12 -12
  297. package/dist/features/test-request-button/TestRequestButton.vue.d.ts +3 -2
  298. package/dist/features/test-request-button/TestRequestButton.vue.d.ts.map +1 -1
  299. package/dist/features/test-request-button/TestRequestButton.vue.js +3 -3
  300. package/dist/features/test-request-button/TestRequestButton.vue2.js +21 -19
  301. package/dist/features/test-request-button/TestRequestButton.vue3.js +4 -0
  302. package/dist/features/traverse-schema/index.d.ts +2 -1
  303. package/dist/features/traverse-schema/index.d.ts.map +1 -1
  304. package/dist/helpers/convert-security-scheme.js +23 -0
  305. package/dist/helpers/test-utils.d.ts +51 -0
  306. package/dist/helpers/test-utils.d.ts.map +1 -0
  307. package/dist/index.d.ts +1 -1
  308. package/dist/index.d.ts.map +1 -1
  309. package/dist/index.js +24 -23
  310. package/dist/style.css +1 -1
  311. package/dist/types.d.ts +5 -0
  312. package/dist/types.d.ts.map +1 -1
  313. package/dist/v2/ApiReferenceWorkspace.vue.d.ts +4 -2
  314. package/dist/v2/ApiReferenceWorkspace.vue.d.ts.map +1 -1
  315. package/dist/v2/ApiReferenceWorkspace.vue.js +100 -83
  316. package/dist/v2/ApiReferenceWorkspace.vue2.js +4 -0
  317. package/dist/v2/ApiReferenceWorkspace.vue3.js +1 -1
  318. package/dist/v2/blocks/scalar-request-example-block/components/ExamplePicker.vue.d.ts +2 -4
  319. package/dist/v2/blocks/scalar-request-example-block/components/ExamplePicker.vue.d.ts.map +1 -1
  320. package/dist/v2/blocks/scalar-request-example-block/components/ExamplePicker.vue.js +4 -0
  321. package/dist/v2/blocks/scalar-request-example-block/components/ExamplePicker.vue2.js +72 -0
  322. package/dist/v2/blocks/scalar-request-example-block/components/RequestExample.vue.d.ts +4 -13
  323. package/dist/v2/blocks/scalar-request-example-block/components/RequestExample.vue.d.ts.map +1 -1
  324. package/dist/v2/blocks/scalar-request-example-block/components/RequestExample.vue.js +7 -0
  325. package/dist/v2/blocks/scalar-request-example-block/components/RequestExample.vue2.js +231 -0
  326. package/dist/v2/blocks/scalar-request-example-block/components/RequestExample.vue3.js +4 -0
  327. package/dist/v2/blocks/scalar-request-example-block/helpers/find-client.d.ts +1 -0
  328. package/dist/v2/blocks/scalar-request-example-block/helpers/find-client.d.ts.map +1 -1
  329. package/dist/v2/blocks/scalar-request-example-block/helpers/find-client.js +21 -3
  330. package/dist/v2/blocks/scalar-request-example-block/helpers/generate-client-options.d.ts +12 -13
  331. package/dist/v2/blocks/scalar-request-example-block/helpers/generate-client-options.d.ts.map +1 -1
  332. package/dist/v2/blocks/scalar-request-example-block/helpers/generate-client-options.js +33 -0
  333. package/dist/v2/blocks/scalar-request-example-block/helpers/generate-code-snippet.js +29 -0
  334. package/dist/v2/blocks/scalar-request-example-block/helpers/get-secrets.js +10 -0
  335. package/dist/v2/blocks/scalar-request-example-block/index.d.ts +2 -2
  336. package/dist/v2/blocks/scalar-request-example-block/types.d.ts +11 -3
  337. package/dist/v2/blocks/scalar-request-example-block/types.d.ts.map +1 -1
  338. package/dist/v2/events/definitions.js +7 -0
  339. package/dist/v2/events/index.d.ts +1 -1
  340. package/dist/v2/events/listeners.d.ts +1 -1
  341. package/package.json +18 -18
  342. package/LICENSE +0 -21
  343. package/dist/blocks/constants.js +0 -6
  344. package/dist/blocks/helpers/getPointer.js +0 -12
  345. package/dist/blocks/hooks/useBlockProps.d.ts +0 -31
  346. package/dist/blocks/hooks/useBlockProps.d.ts.map +0 -1
  347. package/dist/blocks/hooks/useBlockProps.js +0 -24
  348. package/dist/components/Content/ClientLibraries/useFeaturedHttpClients.d.ts +0 -16
  349. package/dist/components/Content/ClientLibraries/useFeaturedHttpClients.d.ts.map +0 -1
  350. package/dist/components/Content/ClientLibraries/useFeaturedHttpClients.js +0 -36
  351. package/dist/components/Content/Lazy/Lazy.vue.d.ts.map +0 -1
  352. package/dist/components/Content/Lazy/Lazy.vue2.js +0 -22
  353. package/dist/components/Content/Lazy/Loading.vue.d.ts +0 -18
  354. package/dist/components/Content/Lazy/Loading.vue.d.ts.map +0 -1
  355. package/dist/components/Content/Lazy/Loading.vue.js +0 -163
  356. package/dist/components/Content/Lazy/Loading.vue3.js +0 -5
  357. package/dist/components/Content/Lazy/index.d.ts +0 -3
  358. package/dist/components/Content/Lazy/index.d.ts.map +0 -1
  359. package/dist/components/Content/Lazy/lazyBus.d.ts +0 -4
  360. package/dist/components/Content/Lazy/lazyBus.d.ts.map +0 -1
  361. package/dist/components/Content/Lazy/lazyBus.js +0 -5
  362. package/dist/components/Content/Models/ModelsAccordion.vue.d.ts.map +0 -1
  363. package/dist/components/Content/Models/ModelsAccordion.vue.js +0 -7
  364. package/dist/components/Content/Tag/OperationsList.vue.d.ts.map +0 -1
  365. package/dist/components/Content/Tag/OperationsList.vue.js +0 -7
  366. package/dist/components/Content/Tag/OperationsList.vue2.js +0 -58
  367. package/dist/components/Content/Tag/OperationsListItem.vue.d.ts.map +0 -1
  368. package/dist/components/Content/Tag/OperationsListItem.vue.js +0 -7
  369. package/dist/components/Content/Tag/OperationsListItem.vue2.js +0 -67
  370. package/dist/components/Content/Tag/Tag.vue.d.ts.map +0 -1
  371. package/dist/components/Content/Tag/Tag.vue.js +0 -99
  372. package/dist/components/Content/Tag/TagAccordion.vue.d.ts.map +0 -1
  373. package/dist/components/Content/Tag/TagAccordion.vue.js +0 -7
  374. package/dist/components/Content/Tag/TagAccordion.vue2.js +0 -50
  375. package/dist/components/Content/Tag/TagList.vue.d.ts +0 -22
  376. package/dist/components/Content/Tag/TagList.vue.d.ts.map +0 -1
  377. package/dist/components/Content/Tag/TagList.vue.js +0 -73
  378. package/dist/components/Content/Tag/TagList.vue2.js +0 -4
  379. package/dist/components/Content/Tag/TagSection.vue.d.ts.map +0 -1
  380. package/dist/components/Content/Tag/TagSection.vue.js +0 -7
  381. package/dist/components/Content/Tag/TagSection.vue2.js +0 -67
  382. package/dist/components/Content/Tag/index.d.ts +0 -3
  383. package/dist/components/Content/Tag/index.d.ts.map +0 -1
  384. package/dist/features/example-request/ExamplePicker.vue.d.ts +0 -13
  385. package/dist/features/example-request/ExamplePicker.vue.d.ts.map +0 -1
  386. package/dist/features/example-request/ExamplePicker.vue.js +0 -7
  387. package/dist/features/example-request/ExamplePicker.vue2.js +0 -57
  388. package/dist/features/example-request/ExampleRequest.vue.d.ts +0 -85
  389. package/dist/features/example-request/ExampleRequest.vue.d.ts.map +0 -1
  390. package/dist/features/example-request/ExampleRequest.vue.js +0 -7
  391. package/dist/features/example-request/ExampleRequest.vue2.js +0 -348
  392. package/dist/features/example-request/TextSelect.vue.d.ts +0 -34
  393. package/dist/features/example-request/TextSelect.vue.d.ts.map +0 -1
  394. package/dist/features/example-request/TextSelect.vue.js +0 -48
  395. package/dist/features/example-request/TextSelect.vue3.js +0 -5
  396. package/dist/features/example-request/index.d.ts +0 -3
  397. package/dist/features/example-request/index.d.ts.map +0 -1
  398. package/dist/stores/useHttpClientStore.d.ts +0 -43
  399. package/dist/stores/useHttpClientStore.d.ts.map +0 -1
  400. package/dist/stores/useHttpClientStore.js +0 -70
  401. package/dist/v2/hooks/useStore.d.ts +0 -9
  402. package/dist/v2/hooks/useStore.d.ts.map +0 -1
  403. /package/dist/components/Content/{Tag → Tags}/Tag.vue2.js +0 -0
  404. /package/dist/components/{Content/Lazy → Lazy}/Lazy.vue.js +0 -0
@@ -0,0 +1,231 @@
1
+ import { defineComponent as N, computed as i, ref as g, watch as R, useId as z, createBlock as S, createCommentVNode as b, openBlock as m, unref as s, withCtx as r, createVNode as n, createSlots as H, createElementVNode as v, createElementBlock as q, renderSlot as h, toDisplayString as K } from "vue";
2
+ import { ScalarCard as $, ScalarCardHeader as M, ScalarCombobox as W, ScalarButton as D, ScalarCardSection as E, ScalarCodeBlock as F, ScalarCardFooter as U } from "@scalar/components";
3
+ import { freezeElement as A } from "@scalar/helpers/dom/freeze-element";
4
+ import { ScalarIconCaretDown as G } from "@scalar/icons";
5
+ import { isReference as J } from "@scalar/workspace-store/schemas/v3.1/type-guard";
6
+ import { findClient as V } from "../helpers/find-client.js";
7
+ import { generateCustomId as B } from "../helpers/generate-client-options.js";
8
+ import { generateCodeSnippet as P } from "../helpers/generate-code-snippet.js";
9
+ import { getSecrets as Q } from "../helpers/get-secrets.js";
10
+ import X from "./ExamplePicker.vue2.js";
11
+ import T from "../../../../components/HttpMethod/HttpMethod.vue.js";
12
+ import { emitCustomEvent as O } from "../../../events/definitions.js";
13
+ const Y = ["innerHTML"], Z = { class: "text-base font-normal" }, _ = ["id"], ee = {
14
+ key: 0,
15
+ class: "request-card-footer-addon"
16
+ }, te = { class: "request-header" }, le = {}, ve = /* @__PURE__ */ N({
17
+ ...le,
18
+ __name: "RequestExample",
19
+ props: {
20
+ clientOptions: {},
21
+ selectedClient: {},
22
+ selectedServer: { default: () => ({ url: "/" }) },
23
+ selectedContentType: {},
24
+ selectedExample: {},
25
+ securitySchemes: { default: () => [] },
26
+ method: {},
27
+ path: {},
28
+ operation: {},
29
+ fallback: { type: Boolean },
30
+ generateLabel: { type: Function }
31
+ },
32
+ setup(o) {
33
+ const c = i(() => {
34
+ var a, p;
35
+ if (J(o.operation.requestBody))
36
+ return {};
37
+ const t = ((a = o.operation.requestBody) == null ? void 0 : a.content) ?? {}, e = o.selectedContentType || Object.keys(t)[0];
38
+ return ((p = t[e]) == null ? void 0 : p.examples) ?? {};
39
+ }), y = g(
40
+ o.selectedExample ?? Object.keys(c.value)[0]
41
+ ), C = i(() => [
42
+ "x-custom-examples",
43
+ "x-codeSamples",
44
+ "x-code-samples"
45
+ ].flatMap(
46
+ (e) => o.operation[e] ?? []
47
+ )), f = i(() => C.value.length ? [
48
+ {
49
+ label: "Code Examples",
50
+ options: C.value.map((e) => {
51
+ const l = B(e), a = e.label || e.lang || l;
52
+ return {
53
+ id: l,
54
+ lang: e.lang || "plaintext",
55
+ title: a,
56
+ label: a
57
+ };
58
+ })
59
+ },
60
+ ...o.clientOptions
61
+ ] : o.clientOptions), u = g(
62
+ V(f.value, o.selectedClient) ?? null
63
+ );
64
+ R(
65
+ () => o.selectedClient,
66
+ (t) => {
67
+ const e = V(f.value, t);
68
+ e && (u.value = e);
69
+ }
70
+ );
71
+ const k = i(() => {
72
+ var t, e, l;
73
+ try {
74
+ if ((t = u.value) != null && t.id.startsWith("custom"))
75
+ return ((e = C.value.find(
76
+ (I) => {
77
+ var x;
78
+ return B(I) === ((x = u.value) == null ? void 0 : x.id);
79
+ }
80
+ )) == null ? void 0 : e.source) ?? "Custom example not found";
81
+ const a = c.value[y.value || ""], p = (a == null ? void 0 : a.value) ?? (a == null ? void 0 : a.summary);
82
+ return P({
83
+ clientId: (l = u.value) == null ? void 0 : l.id,
84
+ operation: o.operation,
85
+ method: o.method,
86
+ server: o.selectedServer,
87
+ securitySchemes: o.securitySchemes,
88
+ contentType: o.selectedContentType,
89
+ path: o.path,
90
+ example: p
91
+ });
92
+ } catch (a) {
93
+ return console.error("[generateSnippet]", a), "";
94
+ }
95
+ }), w = i(() => Q(o.securitySchemes)), d = g(null), L = (t) => {
96
+ var e;
97
+ if (d.value) {
98
+ const l = A(d.value.$el);
99
+ setTimeout(() => {
100
+ l();
101
+ }, 300);
102
+ }
103
+ u.value = t, t.id.startsWith("custom") || O((e = d.value) == null ? void 0 : e.$el, "scalar-update-selected-client", t.id);
104
+ }, j = z();
105
+ return (t, e) => k.value ? (m(), S(s($), {
106
+ key: 0,
107
+ class: "request-card dark-mode",
108
+ ref_key: "elem",
109
+ ref: d
110
+ }, {
111
+ default: r(() => [
112
+ n(s(M), { class: "pr-2.5" }, H({
113
+ default: r(() => [
114
+ e[3] || (e[3] = v("span", { class: "sr-only" }, "Request Example for", -1)),
115
+ n(s(T), {
116
+ as: "span",
117
+ class: "request-method",
118
+ method: t.method
119
+ }, null, 8, ["method"]),
120
+ t.generateLabel ? (m(), q("span", {
121
+ key: 0,
122
+ innerHTML: t.generateLabel()
123
+ }, null, 8, Y)) : h(t.$slots, "header", { key: 1 }, void 0, !0)
124
+ ]),
125
+ _: 2
126
+ }, [
127
+ f.value.length ? {
128
+ name: "actions",
129
+ fn: r(() => [
130
+ n(s(W), {
131
+ class: "max-h-80",
132
+ modelValue: u.value,
133
+ options: f.value,
134
+ teleport: "",
135
+ placement: "bottom-end",
136
+ "onUpdate:modelValue": e[0] || (e[0] = (l) => L(l))
137
+ }, {
138
+ default: r(() => [
139
+ n(s(D), {
140
+ "data-testid": "client-picker",
141
+ class: "text-c-2 hover:text-c-1 flex h-full w-fit gap-1.5 px-0.5",
142
+ fullWidth: "",
143
+ variant: "ghost"
144
+ }, {
145
+ default: r(() => [
146
+ v("span", Z, K(u.value.title), 1),
147
+ n(s(G), {
148
+ weight: "bold",
149
+ class: "ui-open:rotate-180 mt-0.25 size-3 transition-transform duration-100"
150
+ })
151
+ ]),
152
+ _: 1
153
+ })
154
+ ]),
155
+ _: 1
156
+ }, 8, ["modelValue", "options"])
157
+ ]),
158
+ key: "0"
159
+ } : void 0
160
+ ]), 1024),
161
+ n(s(E), { class: "request-editor-section custom-scroll p-0" }, {
162
+ default: r(() => {
163
+ var l;
164
+ return [
165
+ v("div", {
166
+ id: `${s(j)}-example`,
167
+ class: "code-snippet"
168
+ }, [
169
+ n(s(F), {
170
+ class: "bg-b-2 !min-h-full -outline-offset-2",
171
+ content: k.value,
172
+ hideCredentials: w.value,
173
+ lang: (l = u.value) == null ? void 0 : l.lang,
174
+ lineNumbers: ""
175
+ }, null, 8, ["content", "hideCredentials", "lang"])
176
+ ], 8, _)
177
+ ];
178
+ }),
179
+ _: 1
180
+ }),
181
+ Object.keys(c.value).length || t.$slots.footer ? (m(), S(s(U), {
182
+ key: 0,
183
+ class: "request-card-footer bg-b-3"
184
+ }, {
185
+ default: r(() => [
186
+ Object.keys(c.value).length ? (m(), q("div", ee, [
187
+ n(X, {
188
+ examples: c.value,
189
+ modelValue: y.value,
190
+ "onUpdate:modelValue": [
191
+ e[1] || (e[1] = (l) => y.value = l),
192
+ e[2] || (e[2] = (l) => {
193
+ var a;
194
+ return s(O)((a = d.value) == null ? void 0 : a.$el, "scalar-update-selected-example", l);
195
+ })
196
+ ]
197
+ }, null, 8, ["examples", "modelValue"])
198
+ ])) : b("", !0),
199
+ h(t.$slots, "footer", {}, void 0, !0)
200
+ ]),
201
+ _: 3
202
+ })) : b("", !0)
203
+ ]),
204
+ _: 3
205
+ }, 512)) : t.fallback ? (m(), S(s($), {
206
+ key: 1,
207
+ class: "request-card dark-mode"
208
+ }, {
209
+ default: r(() => [
210
+ n(s(E), { class: "request-card-simple" }, {
211
+ default: r(() => [
212
+ v("div", te, [
213
+ n(s(T), {
214
+ as: "span",
215
+ class: "request-method",
216
+ method: t.method
217
+ }, null, 8, ["method"]),
218
+ h(t.$slots, "header", {}, void 0, !0)
219
+ ]),
220
+ h(t.$slots, "footer", {}, void 0, !0)
221
+ ]),
222
+ _: 3
223
+ })
224
+ ]),
225
+ _: 3
226
+ })) : b("", !0);
227
+ }
228
+ });
229
+ export {
230
+ ve as default
231
+ };
@@ -0,0 +1,4 @@
1
+ const e = "";
2
+ export {
3
+ e as default
4
+ };
@@ -1,5 +1,6 @@
1
1
  import type { ClientOption, ClientOptionGroup } from '../../../../v2/blocks/scalar-request-example-block/types';
2
2
  import { type AvailableClients } from '@scalar/snippetz';
3
+ export declare const DEFAULT_CLIENT = "shell/curl";
3
4
  /** Type guard to check if a string is a valid client id */
4
5
  export declare const isClient: (id: any) => id is AvailableClients[number];
5
6
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"find-client.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-request-example-block/helpers/find-client.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,gDAAgD,CAAA;AACrG,OAAO,EAAqB,KAAK,gBAAgB,EAAE,MAAM,kBAAkB,CAAA;AAI3E,2DAA2D;AAC3D,eAAO,MAAM,QAAQ,OAAQ,GAAG,KAAG,EAAE,IAAI,gBAAgB,CAAC,MAAM,CAAmC,CAAA;AAEnG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,eAAO,MAAM,UAAU,iBACP,iBAAiB,EAAE,aACtB,gBAAgB,CAAC,MAAM,CAAC,GAAG,SAAS,KAC9C,YAwBF,CAAA"}
1
+ {"version":3,"file":"find-client.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-request-example-block/helpers/find-client.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,gDAAgD,CAAA;AACrG,OAAO,EAAqB,KAAK,gBAAgB,EAAE,MAAM,kBAAkB,CAAA;AAE3E,eAAO,MAAM,cAAc,eAAe,CAAA;AAE1C,2DAA2D;AAC3D,eAAO,MAAM,QAAQ,OAAQ,GAAG,KAAG,EAAE,IAAI,gBAAgB,CAAC,MAAM,CAAmC,CAAA;AAEnG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,eAAO,MAAM,UAAU,iBACP,iBAAiB,EAAE,aACtB,gBAAgB,CAAC,MAAM,CAAC,GAAG,SAAS,KAC9C,YAwBF,CAAA"}
@@ -1,5 +1,23 @@
1
- import { AVAILABLE_CLIENTS as o } from "@scalar/snippetz";
2
- const e = (i) => o.includes(i);
1
+ import { AVAILABLE_CLIENTS as c } from "@scalar/snippetz";
2
+ const d = "shell/curl", u = (o) => c.includes(o), e = (o, r) => {
3
+ var f;
4
+ const n = (f = o[0]) == null ? void 0 : f.options[0];
5
+ if (r)
6
+ for (const i of o) {
7
+ const t = i.options.find((s) => s.id === r);
8
+ if (t)
9
+ return t;
10
+ }
11
+ if (!(n != null && n.id.startsWith("custom")))
12
+ for (const i of o) {
13
+ const t = i.options.find((s) => s.id === d);
14
+ if (t)
15
+ return t;
16
+ }
17
+ return n;
18
+ };
3
19
  export {
4
- e as isClient
20
+ d as DEFAULT_CLIENT,
21
+ e as findClient,
22
+ u as isClient
5
23
  };
@@ -1,21 +1,20 @@
1
1
  import type { ClientOptionGroup } from '../../../../v2/blocks/scalar-request-example-block/types';
2
2
  import type { XCodeSample } from '@scalar/openapi-types/schemas/extensions';
3
- import { type AvailableClients } from '@scalar/snippetz';
3
+ import type { ApiReferenceConfiguration } from '@scalar/types/api-reference';
4
4
  /** Helper to generate an ID for custom code samples */
5
5
  export declare const generateCustomId: (example: XCodeSample) => string;
6
6
  /**
7
- * Generates client options for the request example block by combining built-in snippets
8
- * with custom code samples. This function creates a structured list of available
9
- * client options that can be used to generate code examples for different programming
10
- * languages and frameworks.
7
+ * Generates client options for the request example block by filtering and organizing
8
+ * built-in snippets based on the hiddenClients configuration. This function creates
9
+ * a structured list of available client options that can be used to generate code
10
+ * examples for different programming languages and frameworks.
11
11
  *
12
- * The function filters built-in clients based on the allowedClients parameter and
13
- * groups them by their category (e.g., JavaScript, Python, etc.). Custom code samples
14
- * are added as a separate "Code Examples" group at the top of the list.
15
- *
16
- * @param customRequestExamples - Array of custom code samples to include in the options
17
- * @param allowedClients - Optional array of allowed client IDs to filter built-in clients
18
- * @returns Array of client option groups, each containing a label and array of client options
12
+ * The function filters built-in clients based on the hiddenClients parameter and
13
+ * groups them by their category (e.g., JavaScript, Python, etc.). The hiddenClients
14
+ * parameter supports multiple formats:
15
+ * - boolean: true to hide all clients
16
+ * - array: ['fetch', 'axios'] to hide specific clients across all categories
17
+ * - object: { node: true, python: ['requests'] } to hide entire categories or specific clients within categories
19
18
  */
20
- export declare const generateClientOptions: (customRequestExamples: XCodeSample[], allowedClients?: AvailableClients[number][]) => ClientOptionGroup[];
19
+ export declare const generateClientOptions: (hiddenClients: ApiReferenceConfiguration["hiddenClients"]) => ClientOptionGroup[];
21
20
  //# sourceMappingURL=generate-client-options.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"generate-client-options.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-request-example-block/helpers/generate-client-options.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gDAAgD,CAAA;AACvF,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,0CAA0C,CAAA;AAC3E,OAAO,EAAY,KAAK,gBAAgB,EAAiB,MAAM,kBAAkB,CAAA;AAGjF,uDAAuD;AACvD,eAAO,MAAM,gBAAgB,YAAa,WAAW,WAA6B,CAAA;AAElF;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,qBAAqB,0BACT,WAAW,EAAE,mBACnB,gBAAgB,CAAC,MAAM,CAAC,EAAE,KAC1C,iBAAiB,EAqDnB,CAAA"}
1
+ {"version":3,"file":"generate-client-options.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-request-example-block/helpers/generate-client-options.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gDAAgD,CAAA;AACvF,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,0CAA0C,CAAA;AAE3E,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAA;AAG5E,uDAAuD;AACvD,eAAO,MAAM,gBAAgB,YAAa,WAAW,WAA6B,CAAA;AAElF;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,qBAAqB,kBACjB,yBAAyB,CAAC,eAAe,CAAC,KACxD,iBAAiB,EAwDnB,CAAA"}
@@ -0,0 +1,33 @@
1
+ import { snippetz as l } from "@scalar/snippetz";
2
+ import { capitalize as o } from "vue";
3
+ const y = (t) => `custom/${t.lang}`, m = (t) => t === !0 ? [] : l().clients().flatMap((e) => {
4
+ const n = e.clients.flatMap((r) => {
5
+ const c = `${e.key}/${r.client}`;
6
+ if (Array.isArray(t) && t.includes(r.client))
7
+ return [];
8
+ if (typeof t == "object" && t !== null) {
9
+ const i = t[e.key];
10
+ if (i === !0)
11
+ return [];
12
+ if (Array.isArray(i) && i.includes(r.client))
13
+ return [];
14
+ }
15
+ return {
16
+ id: c,
17
+ lang: r.client === "curl" ? "curl" : e.key,
18
+ title: `${o(e.title)} ${r.title}`,
19
+ label: r.title,
20
+ targetKey: e.key,
21
+ targetTitle: e.title,
22
+ clientKey: r.client
23
+ };
24
+ });
25
+ return n.length === 0 ? [] : {
26
+ label: e.title,
27
+ options: n
28
+ };
29
+ });
30
+ export {
31
+ m as generateClientOptions,
32
+ y as generateCustomId
33
+ };
@@ -0,0 +1,29 @@
1
+ import { operationToHar as u } from "@scalar/oas-utils/helpers/operation-to-har";
2
+ import { isReference as d } from "@scalar/workspace-store/schemas/v3.1/type-guard";
3
+ import { getSnippet as l } from "@scalar/api-client/views/Components/CodeSnippet";
4
+ const S = ({
5
+ clientId: t,
6
+ operation: e,
7
+ method: o,
8
+ path: n,
9
+ example: i,
10
+ contentType: p,
11
+ server: s,
12
+ securitySchemes: a
13
+ }) => {
14
+ if (d(e))
15
+ return "";
16
+ const c = u({
17
+ operation: e,
18
+ contentType: p,
19
+ method: o,
20
+ path: n,
21
+ server: s,
22
+ securitySchemes: a,
23
+ example: i
24
+ }), [m, f] = t.split("/"), [r, g] = l(m, f, c);
25
+ return r ? r.message ?? "Error generating code snippet" : g;
26
+ };
27
+ export {
28
+ S as generateCodeSnippet
29
+ };
@@ -0,0 +1,10 @@
1
+ import { isDefined as o } from "@scalar/helpers/array/is-defined";
2
+ const e = (t) => t.flatMap((r) => r.type === "apiKey" ? r["x-scalar-secret-token"] : (r == null ? void 0 : r.type) === "http" ? [
3
+ r["x-scalar-secret-token"],
4
+ r["x-scalar-secret-username"],
5
+ r["x-scalar-secret-password"],
6
+ btoa(`${r["x-scalar-secret-username"]}:${r["x-scalar-secret-password"]}`)
7
+ ] : r.type === "oauth2" ? Object.values(r.flows).map((a) => a["x-scalar-secret-token"]) : []).filter(o);
8
+ export {
9
+ e as getSecrets
10
+ };
@@ -1,3 +1,3 @@
1
- export { default as RequestExample } from './components/RequestExample.vue';
2
- export { default as ExamplePicker } from './components/ExamplePicker.vue';
1
+ export { default as RequestExample } from './components/RequestExample.vue.js';
2
+ export { default as ExamplePicker } from './components/ExamplePicker.vue.js';
3
3
  //# sourceMappingURL=index.d.ts.map
@@ -1,15 +1,23 @@
1
1
  import type { ScalarComboboxOption, ScalarComboboxOptionGroup } from '@scalar/components';
2
- import type { TargetId } from '@scalar/snippetz';
2
+ import type { AvailableClients, ClientId, TargetId } from '@scalar/snippetz';
3
3
  /**
4
4
  * Represents a client option in the request example block.
5
5
  * Extends the base combobox option with language-specific information
6
6
  * for generating code examples in different programming languages.
7
7
  */
8
8
  export type ClientOption = ScalarComboboxOption & {
9
- /** The programming language or tool for code generation (e.g., 'javascript', 'python', 'curl') */
9
+ /** A more specific ID */
10
+ id: AvailableClients[number];
11
+ /** Programming language or tool for code generation (e.g., 'javascript', 'python', 'curl') */
10
12
  lang: TargetId | 'curl' | 'plaintext';
11
- /** The title shows when the client is selected in the dropdown */
13
+ /** Title shows when the client is selected in the dropdown */
12
14
  title: string;
15
+ /** Target key for the client, differs from the lang due to the curl thing */
16
+ targetKey: TargetId;
17
+ /** Title of the target */
18
+ targetTitle: string;
19
+ /** Client key for the client */
20
+ clientKey: ClientId<TargetId>;
13
21
  };
14
22
  /**
15
23
  * Augments the base combobox option group with ClientOptions
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/v2/blocks/scalar-request-example-block/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,yBAAyB,EAAE,MAAM,oBAAoB,CAAA;AACzF,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAA;AAEhD;;;;GAIG;AACH,MAAM,MAAM,YAAY,GAAG,oBAAoB,GAAG;IAChD,kGAAkG;IAClG,IAAI,EAAE,QAAQ,GAAG,MAAM,GAAG,WAAW,CAAA;IACrC,kEAAkE;IAClE,KAAK,EAAE,MAAM,CAAA;CACd,CAAA;AAED;;GAEG;AACH,MAAM,MAAM,iBAAiB,GAAG,IAAI,CAAC,yBAAyB,EAAE,SAAS,CAAC,GAAG;IAC3E,wDAAwD;IACxD,OAAO,EAAE,YAAY,EAAE,CAAA;CACxB,CAAA"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/v2/blocks/scalar-request-example-block/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,yBAAyB,EAAE,MAAM,oBAAoB,CAAA;AACzF,OAAO,KAAK,EAAE,gBAAgB,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAA;AAE5E;;;;GAIG;AACH,MAAM,MAAM,YAAY,GAAG,oBAAoB,GAAG;IAChD,yBAAyB;IACzB,EAAE,EAAE,gBAAgB,CAAC,MAAM,CAAC,CAAA;IAC5B,8FAA8F;IAC9F,IAAI,EAAE,QAAQ,GAAG,MAAM,GAAG,WAAW,CAAA;IACrC,8DAA8D;IAC9D,KAAK,EAAE,MAAM,CAAA;IACb,6EAA6E;IAC7E,SAAS,EAAE,QAAQ,CAAA;IACnB,0BAA0B;IAC1B,WAAW,EAAE,MAAM,CAAA;IACnB,gCAAgC;IAChC,SAAS,EAAE,QAAQ,CAAC,QAAQ,CAAC,CAAA;CAC9B,CAAA;AAED;;GAEG;AACH,MAAM,MAAM,iBAAiB,GAAG,IAAI,CAAC,yBAAyB,EAAE,SAAS,CAAC,GAAG;IAC3E,wDAAwD;IACxD,OAAO,EAAE,YAAY,EAAE,CAAA;CACxB,CAAA"}
@@ -0,0 +1,7 @@
1
+ function o(e, t, n) {
2
+ const c = new CustomEvent(t, { detail: n, bubbles: !0, composed: !0, cancelable: !0 });
3
+ e.dispatchEvent(c);
4
+ }
5
+ export {
6
+ o as emitCustomEvent
7
+ };
@@ -1,3 +1,3 @@
1
- export { type ApiReferenceEvents, type ApiReferenceEvent, emitCustomEvent } from './definitions';
1
+ export { type ApiReferenceEvents, type ApiReferenceEvent, emitCustomEvent } from './definitions.js';
2
2
  export { onCustomEvent } from './listeners.js';
3
3
  //# sourceMappingURL=index.d.ts.map
@@ -1,4 +1,4 @@
1
- import type { ApiReferenceEvent, ApiReferenceEvents } from './definitions';
1
+ import type { ApiReferenceEvent, ApiReferenceEvents } from './definitions.js';
2
2
  import { type Ref } from 'vue';
3
3
  /**
4
4
  * Vue wrapper for attaching and removing event listeners
package/package.json CHANGED
@@ -20,7 +20,7 @@
20
20
  "vue",
21
21
  "vue3"
22
22
  ],
23
- "version": "1.32.9",
23
+ "version": "1.33.0",
24
24
  "engines": {
25
25
  "node": ">=20"
26
26
  },
@@ -46,7 +46,7 @@
46
46
  "@floating-ui/vue": "^1.1.7",
47
47
  "@headlessui/vue": "^1.7.23",
48
48
  "@unhead/vue": "^1.11.20",
49
- "@vueuse/core": "^10.10.0",
49
+ "@vueuse/core": "^11.2.0",
50
50
  "flatted": "^3.3.3",
51
51
  "fuse.js": "^7.1.0",
52
52
  "github-slugger": "^2.0.0",
@@ -54,40 +54,40 @@
54
54
  "nanoid": "5.1.5",
55
55
  "vue": "^3.5.17",
56
56
  "zod": "3.24.1",
57
- "@scalar/code-highlight": "0.1.8",
58
- "@scalar/api-client": "2.5.18",
59
- "@scalar/helpers": "0.0.6",
60
- "@scalar/components": "0.14.19",
57
+ "@scalar/code-highlight": "0.1.9",
58
+ "@scalar/components": "0.14.21",
59
+ "@scalar/helpers": "0.0.7",
61
60
  "@scalar/icons": "0.4.6",
62
- "@scalar/openapi-parser": "0.18.1",
63
- "@scalar/object-utils": "1.2.2",
64
- "@scalar/openapi-types": "0.3.6",
65
- "@scalar/types": "0.2.9",
66
- "@scalar/oas-utils": "0.4.14",
67
- "@scalar/themes": "0.13.10",
61
+ "@scalar/object-utils": "1.2.3",
62
+ "@scalar/openapi-parser": "0.18.3",
63
+ "@scalar/api-client": "2.5.20",
64
+ "@scalar/oas-utils": "0.4.16",
65
+ "@scalar/openapi-types": "0.3.7",
66
+ "@scalar/snippetz": "0.4.4",
67
+ "@scalar/themes": "0.13.12",
68
+ "@scalar/types": "0.2.11",
68
69
  "@scalar/use-hooks": "0.2.4",
69
- "@scalar/snippetz": "0.4.2",
70
70
  "@scalar/use-toasts": "0.8.0",
71
- "@scalar/workspace-store": "0.10.1"
71
+ "@scalar/workspace-store": "0.11.0"
72
72
  },
73
73
  "devDependencies": {
74
74
  "@tailwindcss/vite": "^4.1.7",
75
75
  "@types/react": "^19.1.8",
76
76
  "@types/react-dom": "^19.1.6",
77
- "@vitejs/plugin-vue": "^5.0.4",
77
+ "@vitejs/plugin-vue": "^5.2.4",
78
78
  "@vue/server-renderer": "^3.5.17",
79
79
  "@vue/test-utils": "^2.4.1",
80
80
  "react": "^19.1.0",
81
81
  "react-dom": "^19.1.0",
82
82
  "rollup-plugin-webpack-stats": "^0.2.5",
83
83
  "tailwindcss": "^4.1.7",
84
- "vite": "5.4.19",
84
+ "vite": "6.1.6",
85
85
  "vite-plugin-banner": "^0.7.1",
86
86
  "vite-plugin-css-injected-by-js": "^3.4.0",
87
- "vitest": "^1.6.1",
87
+ "vitest": "^3.2.4",
88
88
  "@scalar/build-tooling": "0.2.4",
89
89
  "@scalar/react-renderer": "0.2.1",
90
- "@scalar/galaxy": "0.5.4"
90
+ "@scalar/galaxy": "0.5.5"
91
91
  },
92
92
  "scripts": {
93
93
  "build": "pnpm build:default && pnpm build:standalone && pnpm types:build && tsc-alias -p tsconfig.build.json",
package/LICENSE DELETED
@@ -1,21 +0,0 @@
1
- MIT License
2
-
3
- Copyright (c) 2023-present Scalar
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
@@ -1,6 +0,0 @@
1
- const t = {
2
- EMPTY_PATH: "Path cannot be empty. Please provide a path to the operation you want to display."
3
- };
4
- export {
5
- t as ERRORS
6
- };
@@ -1,12 +0,0 @@
1
- import { ERRORS as n } from "../constants.js";
2
- import { escapeJsonPointer as e } from "@scalar/openapi-parser";
3
- function m(o) {
4
- o.unshift("#");
5
- const r = o.map((t) => e(t.trim())).filter(Boolean).join("/");
6
- if (r === "#")
7
- throw new Error(n.EMPTY_PATH);
8
- return r;
9
- }
10
- export {
11
- m as getPointer
12
- };
@@ -1,31 +0,0 @@
1
- import type { createWorkspaceStore } from '@scalar/api-client/store';
2
- import type { Collection } from '@scalar/oas-utils/entities/spec';
3
- import type { Request as RequestEntity } from '@scalar/oas-utils/entities/spec';
4
- import { type ComputedRef } from 'vue';
5
- export type StoreContext = ReturnType<typeof createWorkspaceStore>;
6
- export type BlockProps = {
7
- /**
8
- * The store created by `createStore`
9
- */
10
- store: StoreContext | undefined;
11
- /**
12
- * The JSON pointer to the operation to use
13
- *
14
- * @example
15
- * ```
16
- * #/paths/test/get
17
- * ```
18
- */
19
- location: `#/${string}`;
20
- /**
21
- * The collection to use
22
- */
23
- collection: Collection;
24
- };
25
- /**
26
- * Provides computed properties for the block, based on the standardized interface of the `createStore` function.
27
- */
28
- export declare function useBlockProps({ store, location, collection }: BlockProps): {
29
- operation: ComputedRef<RequestEntity | undefined>;
30
- };
31
- //# sourceMappingURL=useBlockProps.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useBlockProps.d.ts","sourceRoot":"","sources":["../../../src/blocks/hooks/useBlockProps.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAA;AACpE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAA;AACjE,OAAO,KAAK,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,iCAAiC,CAAA;AAE/E,OAAO,EAAE,KAAK,WAAW,EAAY,MAAM,KAAK,CAAA;AAGhD,MAAM,MAAM,YAAY,GAAG,UAAU,CAAC,OAAO,oBAAoB,CAAC,CAAA;AAElE,MAAM,MAAM,UAAU,GAAG;IACvB;;OAEG;IACH,KAAK,EAAE,YAAY,GAAG,SAAS,CAAA;IAC/B;;;;;;;OAOG;IACH,QAAQ,EAAE,KAAK,MAAM,EAAE,CAAA;IACvB;;OAEG;IACH,UAAU,EAAE,UAAU,CAAA;CACvB,CAAA;AAED;;GAEG;AACH,wBAAgB,aAAa,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,UAAU,EAAE,EAAE,UAAU,GAAG;IAC1E,SAAS,EAAE,WAAW,CAAC,aAAa,GAAG,SAAS,CAAC,CAAA;CAClD,CAgCA"}
@@ -1,24 +0,0 @@
1
- import { unescapeJsonPointer as a } from "@scalar/openapi-parser";
2
- import { computed as p } from "vue";
3
- function d({ store: t, location: e, collection: o }) {
4
- return {
5
- operation: p(() => {
6
- if (!(t != null && t.collections) || !t.requests)
7
- return;
8
- const n = Object.values(t.requests).filter(
9
- (s) => o.requests.includes(s.uid)
10
- );
11
- if (!e.startsWith("#/paths/") && !e.startsWith("#/webhooks/"))
12
- throw new Error(
13
- "Invalid location, try using #/paths/$YOUR_ENDPOINT/$HTTP_METHOD. You can use the getPointer helper to generate a valid location: getPointer(['paths', '/planets/{planetId}', 'get'])"
14
- );
15
- return n.find((s) => {
16
- const r = a(e.split("/")[2]), i = e.split("/")[3].toLocaleLowerCase();
17
- return s.method === i && s.path === r;
18
- });
19
- })
20
- };
21
- }
22
- export {
23
- d as useBlockProps
24
- };