@scalar/api-reference 1.32.10 → 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 (345) hide show
  1. package/CHANGELOG.md +70 -0
  2. package/dist/browser/standalone.js +15385 -15039
  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 +107 -104
  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.js +1 -1
  16. package/dist/components/Badge/Badge.vue2.js +4 -0
  17. package/dist/components/ClassicHeader.vue.js +1 -1
  18. package/dist/components/ClassicHeader.vue2.js +4 -0
  19. package/dist/components/Content/ClientLibraries/ClientLibraries.vue.d.ts +14 -1
  20. package/dist/components/Content/ClientLibraries/ClientLibraries.vue.d.ts.map +1 -1
  21. package/dist/components/Content/ClientLibraries/ClientLibraries.vue.js +3 -3
  22. package/dist/components/Content/ClientLibraries/ClientLibraries.vue2.js +74 -84
  23. package/dist/components/Content/ClientLibraries/ClientLibraries.vue3.js +4 -0
  24. package/dist/components/Content/ClientLibraries/ClientSelector.vue.d.ts +8 -0
  25. package/dist/components/Content/ClientLibraries/ClientSelector.vue.d.ts.map +1 -1
  26. package/dist/components/Content/ClientLibraries/ClientSelector.vue.js +2 -2
  27. package/dist/components/Content/ClientLibraries/ClientSelector.vue2.js +81 -80
  28. package/dist/components/Content/ClientLibraries/ClientSelector.vue3.js +4 -0
  29. package/dist/components/Content/ClientLibraries/featured-clients.d.ts +11 -0
  30. package/dist/components/Content/ClientLibraries/featured-clients.d.ts.map +1 -0
  31. package/dist/components/Content/ClientLibraries/featured-clients.js +17 -0
  32. package/dist/components/Content/Content.vue.d.ts +5 -6
  33. package/dist/components/Content/Content.vue.d.ts.map +1 -1
  34. package/dist/components/Content/Content.vue.js +49 -6
  35. package/dist/components/Content/Content.vue2.js +2 -160
  36. package/dist/components/Content/Content.vue3.js +5 -0
  37. package/dist/components/Content/Introduction/Description.vue.js +1 -1
  38. package/dist/components/Content/Introduction/Description.vue3.js +4 -0
  39. package/dist/components/Content/Introduction/Introduction.vue.d.ts +7 -17
  40. package/dist/components/Content/Introduction/Introduction.vue.d.ts.map +1 -1
  41. package/dist/components/Content/Introduction/Introduction.vue.js +3 -3
  42. package/dist/components/Content/Introduction/Introduction.vue2.js +103 -150
  43. package/dist/components/Content/Introduction/Introduction.vue3.js +4 -0
  44. package/dist/components/Content/Introduction/IntroductionSection.vue.d.ts +25 -0
  45. package/dist/components/Content/Introduction/IntroductionSection.vue.d.ts.map +1 -0
  46. package/dist/components/Content/Introduction/IntroductionSection.vue.js +7 -0
  47. package/dist/components/Content/Introduction/IntroductionSection.vue2.js +159 -0
  48. package/dist/components/Content/Introduction/IntroductionSection.vue3.js +4 -0
  49. package/dist/components/Content/Models/{ModelsAccordion.vue.d.ts → ClassicLayout.vue.d.ts} +2 -2
  50. package/dist/components/Content/Models/ClassicLayout.vue.d.ts.map +1 -0
  51. package/dist/components/Content/Models/ClassicLayout.vue.js +7 -0
  52. package/dist/components/Content/Models/{ModelsAccordion.vue2.js → ClassicLayout.vue2.js} +30 -30
  53. package/dist/components/Content/Models/ClassicLayout.vue3.js +4 -0
  54. package/dist/components/Content/Models/Models.vue.d.ts +3 -1
  55. package/dist/components/Content/Models/Models.vue.d.ts.map +1 -1
  56. package/dist/components/Content/Models/Models.vue.js +38 -5
  57. package/dist/components/Content/Models/Models.vue2.js +2 -114
  58. package/dist/components/Content/Models/ModernLayout.vue.d.ts +7 -0
  59. package/dist/components/Content/Models/ModernLayout.vue.d.ts.map +1 -0
  60. package/dist/components/Content/Models/ModernLayout.vue.js +7 -0
  61. package/dist/components/Content/Models/ModernLayout.vue2.js +100 -0
  62. package/dist/components/Content/Models/ModernLayout.vue3.js +4 -0
  63. package/dist/components/Content/Models/index.d.ts +0 -1
  64. package/dist/components/Content/Models/index.d.ts.map +1 -1
  65. package/dist/components/Content/Operations/TraversedEntry.vue.d.ts +21 -0
  66. package/dist/components/Content/Operations/TraversedEntry.vue.d.ts.map +1 -0
  67. package/dist/components/Content/Operations/TraversedEntry.vue.js +95 -0
  68. package/dist/components/Content/Operations/TraversedEntry.vue2.js +4 -0
  69. package/dist/components/Content/Operations/TraversedEntryContainer.vue.d.ts +17 -0
  70. package/dist/components/Content/Operations/TraversedEntryContainer.vue.d.ts.map +1 -0
  71. package/dist/components/Content/Operations/TraversedEntryContainer.vue.js +56 -0
  72. package/dist/components/Content/Operations/TraversedEntryContainer.vue2.js +4 -0
  73. package/dist/components/Content/Operations/index.d.ts +2 -0
  74. package/dist/components/Content/Operations/index.d.ts.map +1 -0
  75. package/dist/components/Content/Schema/Schema.vue.js +1 -1
  76. package/dist/components/Content/Schema/Schema.vue3.js +4 -0
  77. package/dist/components/Content/Schema/SchemaComposition.vue.d.ts.map +1 -1
  78. package/dist/components/Content/Schema/SchemaEnumPropertyItem.vue.d.ts.map +1 -1
  79. package/dist/components/Content/Schema/SchemaEnumPropertyItem.vue.js +3 -3
  80. package/dist/components/Content/Schema/SchemaEnumPropertyItem.vue3.js +4 -0
  81. package/dist/components/Content/Schema/SchemaEnumValues.vue.d.ts.map +1 -1
  82. package/dist/components/Content/Schema/SchemaEnumValues.vue.js +3 -3
  83. package/dist/components/Content/Schema/SchemaEnumValues.vue2.js +63 -68
  84. package/dist/components/Content/Schema/SchemaEnumValues.vue3.js +4 -0
  85. package/dist/components/Content/Schema/SchemaHeading.vue.d.ts.map +1 -1
  86. package/dist/components/Content/Schema/SchemaHeading.vue.js +4 -4
  87. package/dist/components/Content/Schema/SchemaHeading.vue2.js +23 -22
  88. package/dist/components/Content/Schema/SchemaHeading.vue3.js +4 -0
  89. package/dist/components/Content/Schema/SchemaProperty.vue.d.ts.map +1 -1
  90. package/dist/components/Content/Schema/SchemaProperty.vue.js +2 -2
  91. package/dist/components/Content/Schema/SchemaProperty.vue2.js +34 -33
  92. package/dist/components/Content/Schema/SchemaProperty.vue3.js +4 -0
  93. package/dist/components/Content/Schema/SchemaPropertyDetail.vue.d.ts.map +1 -1
  94. package/dist/components/Content/Schema/SchemaPropertyDetail.vue.js +2 -2
  95. package/dist/components/Content/Schema/SchemaPropertyDetail.vue3.js +4 -0
  96. package/dist/components/Content/Schema/SchemaPropertyExamples.vue.js +3 -3
  97. package/dist/components/Content/Schema/SchemaPropertyExamples.vue3.js +4 -0
  98. package/dist/components/Content/Schema/SchemaPropertyHeading.vue.d.ts.map +1 -1
  99. package/dist/components/Content/Schema/SchemaPropertyHeading.vue.js +3 -3
  100. package/dist/components/Content/Schema/SchemaPropertyHeading.vue2.js +26 -23
  101. package/dist/components/Content/Schema/SchemaPropertyHeading.vue3.js +4 -0
  102. package/dist/components/Content/Schema/helpers/merge-all-of-schemas.d.ts +2 -1
  103. package/dist/components/Content/Schema/helpers/merge-all-of-schemas.d.ts.map +1 -1
  104. package/dist/components/Content/Schema/helpers/merge-all-of-schemas.js +59 -52
  105. package/dist/components/Content/Schema/helpers/optimize-value-for-display.d.ts.map +1 -1
  106. package/dist/components/Content/Schema/helpers/optimize-value-for-display.js +24 -20
  107. package/dist/components/Content/Schema/helpers/schema-name.d.ts +1 -1
  108. package/dist/components/Content/Schema/helpers/schema-name.d.ts.map +1 -1
  109. package/dist/components/Content/{Tag/TagAccordion.vue.d.ts → Tags/ClassicLayout.vue.d.ts} +3 -3
  110. package/dist/components/Content/Tags/ClassicLayout.vue.d.ts.map +1 -0
  111. package/dist/components/Content/Tags/ClassicLayout.vue.js +7 -0
  112. package/dist/components/Content/Tags/ClassicLayout.vue2.js +51 -0
  113. package/dist/components/Content/Tags/ClassicLayout.vue3.js +4 -0
  114. package/dist/components/Content/{Tag/TagSection.vue.d.ts → Tags/ModernLayout.vue.d.ts} +17 -13
  115. package/dist/components/Content/Tags/ModernLayout.vue.d.ts.map +1 -0
  116. package/dist/components/Content/Tags/ModernLayout.vue.js +7 -0
  117. package/dist/components/Content/Tags/ModernLayout.vue2.js +69 -0
  118. package/dist/components/Content/Tags/ModernLayout.vue3.js +4 -0
  119. package/dist/components/Content/Tags/Tag.vue.d.ts +25 -0
  120. package/dist/components/Content/Tags/Tag.vue.d.ts.map +1 -0
  121. package/dist/components/Content/Tags/Tag.vue.js +27 -0
  122. package/dist/components/Content/{Tag/Tag.vue.d.ts → Tags/TagSection.vue.d.ts} +3 -6
  123. package/dist/components/Content/Tags/TagSection.vue.d.ts.map +1 -0
  124. package/dist/components/Content/Tags/TagSection.vue.js +104 -0
  125. package/dist/components/Content/Tags/TagSection.vue2.js +4 -0
  126. package/dist/components/Content/Tags/index.d.ts +2 -0
  127. package/dist/components/Content/Tags/index.d.ts.map +1 -0
  128. package/dist/components/GettingStarted.vue.js +1 -1
  129. package/dist/components/GettingStarted.vue3.js +4 -0
  130. package/dist/components/HttpMethod/HttpMethod.vue.d.ts.map +1 -1
  131. package/dist/components/HttpMethod/HttpMethod.vue.js +8 -6
  132. package/dist/components/{Content/Lazy → Lazy}/Lazy.vue.d.ts +1 -10
  133. package/dist/components/Lazy/Lazy.vue.d.ts.map +1 -0
  134. package/dist/components/Lazy/Lazy.vue2.js +25 -0
  135. package/dist/components/Lazy/index.d.ts +3 -0
  136. package/dist/components/Lazy/index.d.ts.map +1 -0
  137. package/dist/components/Lazy/lazyBus.d.ts +8 -0
  138. package/dist/components/Lazy/lazyBus.d.ts.map +1 -0
  139. package/dist/components/Lazy/lazyBus.js +7 -0
  140. package/dist/components/LinkList/LinkList.vue.d.ts +3 -1
  141. package/dist/components/LinkList/LinkList.vue.d.ts.map +1 -1
  142. package/dist/components/LinkList/LinkList.vue.js +5 -10
  143. package/dist/components/LinkList/LinkList.vue2.js +32 -0
  144. package/dist/components/LinkList/LinkList.vue3.js +4 -0
  145. package/dist/components/LoadingSkeleton.vue.d.ts.map +1 -1
  146. package/dist/components/LoadingSkeleton.vue.js +3 -3
  147. package/dist/components/LoadingSkeleton.vue3.js +4 -0
  148. package/dist/components/MobileHeader.vue.js +1 -1
  149. package/dist/components/MobileHeader.vue3.js +4 -0
  150. package/dist/components/OperationPath.vue.js +1 -1
  151. package/dist/components/OperationPath.vue3.js +4 -0
  152. package/dist/components/{Content/Tag → OperationsList}/OperationsList.vue.d.ts +2 -5
  153. package/dist/components/OperationsList/OperationsList.vue.d.ts.map +1 -0
  154. package/dist/components/OperationsList/OperationsList.vue.js +7 -0
  155. package/dist/components/OperationsList/OperationsList.vue2.js +60 -0
  156. package/dist/components/OperationsList/OperationsList.vue3.js +4 -0
  157. package/dist/components/{Content/Tag → OperationsList}/OperationsListItem.vue.d.ts +2 -4
  158. package/dist/components/OperationsList/OperationsListItem.vue.d.ts.map +1 -0
  159. package/dist/components/OperationsList/OperationsListItem.vue.js +7 -0
  160. package/dist/components/OperationsList/OperationsListItem.vue2.js +63 -0
  161. package/dist/components/OperationsList/OperationsListItem.vue3.js +4 -0
  162. package/dist/components/OperationsList/index.d.ts +2 -0
  163. package/dist/components/OperationsList/index.d.ts.map +1 -0
  164. package/dist/components/ScreenReader.vue.js +1 -1
  165. package/dist/components/ScreenReader.vue3.js +4 -0
  166. package/dist/components/Section/CompactSection.vue.d.ts.map +1 -1
  167. package/dist/components/Section/CompactSection.vue.js +3 -3
  168. package/dist/components/Section/CompactSection.vue2.js +35 -36
  169. package/dist/components/Section/CompactSection.vue3.js +4 -0
  170. package/dist/components/Section/Section.vue.js +1 -1
  171. package/dist/components/Section/Section.vue3.js +4 -0
  172. package/dist/components/Section/SectionAccordion.vue.d.ts.map +1 -1
  173. package/dist/components/Section/SectionAccordion.vue.js +3 -3
  174. package/dist/components/Section/SectionAccordion.vue2.js +42 -36
  175. package/dist/components/Section/SectionAccordion.vue3.js +4 -0
  176. package/dist/components/Section/SectionColumn.vue.js +1 -1
  177. package/dist/components/Section/SectionColumn.vue2.js +4 -0
  178. package/dist/components/Section/SectionColumns.vue.js +1 -1
  179. package/dist/components/Section/SectionColumns.vue2.js +4 -0
  180. package/dist/components/Section/SectionContainer.vue.d.ts +9 -2
  181. package/dist/components/Section/SectionContainer.vue.d.ts.map +1 -1
  182. package/dist/components/Section/SectionContainer.vue.js +5 -11
  183. package/dist/components/Section/SectionContainer.vue2.js +18 -0
  184. package/dist/components/Section/SectionContainer.vue3.js +4 -0
  185. package/dist/components/Section/SectionContainerAccordion.vue.d.ts.map +1 -1
  186. package/dist/components/Section/SectionContainerAccordion.vue.js +3 -3
  187. package/dist/components/Section/SectionContainerAccordion.vue3.js +4 -0
  188. package/dist/components/Section/SectionContent.vue.js +1 -1
  189. package/dist/components/Section/SectionContent.vue3.js +4 -0
  190. package/dist/components/Section/SectionHeader.vue.js +1 -1
  191. package/dist/components/Section/SectionHeader.vue3.js +4 -0
  192. package/dist/components/Section/SectionHeaderTag.vue.js +1 -1
  193. package/dist/components/Section/SectionHeaderTag.vue3.js +4 -0
  194. package/dist/components/SectionFlare/SectionFlare.vue.d.ts +3 -0
  195. package/dist/components/SectionFlare/SectionFlare.vue.d.ts.map +1 -0
  196. package/dist/components/SectionFlare/SectionFlare.vue.js +13 -0
  197. package/dist/components/SectionFlare/SectionFlare.vue2.js +4 -0
  198. package/dist/components/SectionFlare/index.d.ts +2 -0
  199. package/dist/components/SectionFlare/index.d.ts.map +1 -0
  200. package/dist/components/ShowMoreButton.vue.d.ts.map +1 -1
  201. package/dist/components/ShowMoreButton.vue.js +3 -3
  202. package/dist/components/ShowMoreButton.vue2.js +12 -12
  203. package/dist/components/ShowMoreButton.vue3.js +4 -0
  204. package/dist/features/Operation/Operation.vue.d.ts +5 -1
  205. package/dist/features/Operation/Operation.vue.d.ts.map +1 -1
  206. package/dist/features/Operation/Operation.vue.js +55 -38
  207. package/dist/features/Operation/components/ContentTypeSelect.vue.d.ts.map +1 -1
  208. package/dist/features/Operation/components/ContentTypeSelect.vue.js +28 -30
  209. package/dist/features/Operation/components/ParameterHeaders.vue.js +1 -1
  210. package/dist/features/Operation/components/ParameterHeaders.vue3.js +4 -0
  211. package/dist/features/Operation/components/ParameterList.vue.js +1 -1
  212. package/dist/features/Operation/components/ParameterList.vue3.js +4 -0
  213. package/dist/features/Operation/components/ParameterListItem.vue.d.ts.map +1 -1
  214. package/dist/features/Operation/components/ParameterListItem.vue.js +2 -2
  215. package/dist/features/Operation/components/ParameterListItem.vue2.js +31 -29
  216. package/dist/features/Operation/components/ParameterListItem.vue3.js +4 -0
  217. package/dist/features/Operation/components/RequestBody.vue.js +1 -1
  218. package/dist/features/Operation/components/RequestBody.vue3.js +4 -0
  219. package/dist/features/Operation/components/callbacks/Callback.vue.d.ts.map +1 -1
  220. package/dist/features/Operation/components/callbacks/Callback.vue.js +3 -3
  221. package/dist/features/Operation/components/callbacks/Callback.vue2.js +9 -9
  222. package/dist/features/Operation/components/callbacks/Callback.vue3.js +4 -0
  223. package/dist/features/Operation/components/callbacks/Callbacks.vue.d.ts.map +1 -1
  224. package/dist/features/Operation/components/callbacks/Callbacks.vue.js +20 -28
  225. package/dist/features/Operation/layouts/ClassicLayout.vue.d.ts +6 -0
  226. package/dist/features/Operation/layouts/ClassicLayout.vue.d.ts.map +1 -1
  227. package/dist/features/Operation/layouts/ClassicLayout.vue.js +2 -2
  228. package/dist/features/Operation/layouts/ClassicLayout.vue2.js +77 -62
  229. package/dist/features/Operation/layouts/ClassicLayout.vue3.js +4 -0
  230. package/dist/features/Operation/layouts/ModernLayout.vue.d.ts +6 -0
  231. package/dist/features/Operation/layouts/ModernLayout.vue.d.ts.map +1 -1
  232. package/dist/features/Operation/layouts/ModernLayout.vue.js +3 -3
  233. package/dist/features/Operation/layouts/ModernLayout.vue2.js +94 -81
  234. package/dist/features/Operation/layouts/ModernLayout.vue3.js +4 -0
  235. package/dist/features/Search/SearchModal.vue.js +4 -4
  236. package/dist/features/Search/SearchModal.vue2.js +9 -9
  237. package/dist/features/Search/SearchModal.vue3.js +4 -0
  238. package/dist/features/api-client-modal/ApiClientModal.vue.d.ts.map +1 -1
  239. package/dist/features/api-client-modal/useApiClient.d.ts +414 -354
  240. package/dist/features/api-client-modal/useApiClient.d.ts.map +1 -1
  241. package/dist/features/download-link/DownloadLink.vue.js +2 -2
  242. package/dist/features/download-link/DownloadLink.vue3.js +4 -0
  243. package/dist/features/example-responses/ExampleResponse.vue.d.ts +4 -2
  244. package/dist/features/example-responses/ExampleResponse.vue.d.ts.map +1 -1
  245. package/dist/features/example-responses/ExampleResponse.vue.js +3 -3
  246. package/dist/features/example-responses/ExampleResponse.vue2.js +15 -14
  247. package/dist/features/example-responses/ExampleResponse.vue3.js +4 -0
  248. package/dist/features/example-responses/ExampleResponseTab.vue.js +1 -1
  249. package/dist/features/example-responses/ExampleResponseTab.vue3.js +4 -0
  250. package/dist/features/example-responses/ExampleResponseTabList.vue.js +1 -1
  251. package/dist/features/example-responses/ExampleResponseTabList.vue3.js +4 -0
  252. package/dist/features/example-responses/ExampleResponses.vue.d.ts +3 -2
  253. package/dist/features/example-responses/ExampleResponses.vue.d.ts.map +1 -1
  254. package/dist/features/example-responses/ExampleResponses.vue.js +4 -4
  255. package/dist/features/example-responses/ExampleResponses.vue2.js +107 -104
  256. package/dist/features/example-responses/ExampleResponses.vue3.js +4 -0
  257. package/dist/features/info-object/License.vue.d.ts.map +1 -1
  258. package/dist/features/info-object/License.vue.js +18 -15
  259. package/dist/features/sidebar/components/Sidebar.vue.js +3 -3
  260. package/dist/features/sidebar/components/Sidebar.vue3.js +4 -0
  261. package/dist/features/sidebar/components/SidebarElement.vue.js +3 -3
  262. package/dist/features/sidebar/components/SidebarElement.vue3.js +4 -0
  263. package/dist/features/sidebar/components/SidebarGroup.vue.js +1 -1
  264. package/dist/features/sidebar/components/SidebarGroup.vue3.js +4 -0
  265. package/dist/features/sidebar/components/SidebarHttpBadge.vue.js +1 -1
  266. package/dist/features/sidebar/components/SidebarHttpBadge.vue3.js +4 -0
  267. package/dist/features/sidebar/helpers/create-sidebar.js +12 -12
  268. package/dist/features/test-request-button/TestRequestButton.vue.js +1 -1
  269. package/dist/features/test-request-button/TestRequestButton.vue3.js +4 -0
  270. package/dist/features/traverse-schema/index.d.ts +2 -1
  271. package/dist/features/traverse-schema/index.d.ts.map +1 -1
  272. package/dist/helpers/test-utils.d.ts +51 -0
  273. package/dist/helpers/test-utils.d.ts.map +1 -0
  274. package/dist/index.d.ts +1 -0
  275. package/dist/index.d.ts.map +1 -1
  276. package/dist/index.js +24 -21
  277. package/dist/style.css +1 -1
  278. package/dist/types.d.ts +5 -0
  279. package/dist/types.d.ts.map +1 -1
  280. package/dist/v2/ApiReferenceWorkspace.vue.d.ts +1 -1
  281. package/dist/v2/ApiReferenceWorkspace.vue.d.ts.map +1 -1
  282. package/dist/v2/ApiReferenceWorkspace.vue.js +83 -93
  283. package/dist/v2/ApiReferenceWorkspace.vue2.js +4 -0
  284. package/dist/v2/ApiReferenceWorkspace.vue3.js +1 -1
  285. package/dist/v2/blocks/scalar-request-example-block/components/ExamplePicker.vue.d.ts +2 -2
  286. package/dist/v2/blocks/scalar-request-example-block/components/ExamplePicker.vue.d.ts.map +1 -1
  287. package/dist/v2/blocks/scalar-request-example-block/components/ExamplePicker.vue2.js +32 -29
  288. package/dist/v2/blocks/scalar-request-example-block/components/RequestExample.vue.d.ts +4 -13
  289. package/dist/v2/blocks/scalar-request-example-block/components/RequestExample.vue.d.ts.map +1 -1
  290. package/dist/v2/blocks/scalar-request-example-block/components/RequestExample.vue.js +3 -3
  291. package/dist/v2/blocks/scalar-request-example-block/components/RequestExample.vue2.js +185 -181
  292. package/dist/v2/blocks/scalar-request-example-block/components/RequestExample.vue3.js +4 -0
  293. package/dist/v2/blocks/scalar-request-example-block/helpers/find-client.d.ts +1 -0
  294. package/dist/v2/blocks/scalar-request-example-block/helpers/find-client.d.ts.map +1 -1
  295. package/dist/v2/blocks/scalar-request-example-block/helpers/find-client.js +1 -0
  296. package/dist/v2/blocks/scalar-request-example-block/helpers/generate-client-options.d.ts +12 -13
  297. package/dist/v2/blocks/scalar-request-example-block/helpers/generate-client-options.d.ts.map +1 -1
  298. package/dist/v2/blocks/scalar-request-example-block/helpers/generate-client-options.js +28 -30
  299. package/dist/v2/blocks/scalar-request-example-block/types.d.ts +11 -3
  300. package/dist/v2/blocks/scalar-request-example-block/types.d.ts.map +1 -1
  301. package/package.json +19 -19
  302. package/dist/components/Content/ClientLibraries/useFeaturedHttpClients.d.ts +0 -16
  303. package/dist/components/Content/ClientLibraries/useFeaturedHttpClients.d.ts.map +0 -1
  304. package/dist/components/Content/ClientLibraries/useFeaturedHttpClients.js +0 -36
  305. package/dist/components/Content/Lazy/Lazy.vue.d.ts.map +0 -1
  306. package/dist/components/Content/Lazy/Lazy.vue2.js +0 -22
  307. package/dist/components/Content/Lazy/Loading.vue.d.ts +0 -18
  308. package/dist/components/Content/Lazy/Loading.vue.d.ts.map +0 -1
  309. package/dist/components/Content/Lazy/Loading.vue.js +0 -163
  310. package/dist/components/Content/Lazy/Loading.vue3.js +0 -5
  311. package/dist/components/Content/Lazy/index.d.ts +0 -3
  312. package/dist/components/Content/Lazy/index.d.ts.map +0 -1
  313. package/dist/components/Content/Lazy/lazyBus.d.ts +0 -4
  314. package/dist/components/Content/Lazy/lazyBus.d.ts.map +0 -1
  315. package/dist/components/Content/Lazy/lazyBus.js +0 -5
  316. package/dist/components/Content/Models/ModelsAccordion.vue.d.ts.map +0 -1
  317. package/dist/components/Content/Models/ModelsAccordion.vue.js +0 -7
  318. package/dist/components/Content/Tag/OperationsList.vue.d.ts.map +0 -1
  319. package/dist/components/Content/Tag/OperationsList.vue.js +0 -7
  320. package/dist/components/Content/Tag/OperationsList.vue2.js +0 -58
  321. package/dist/components/Content/Tag/OperationsListItem.vue.d.ts.map +0 -1
  322. package/dist/components/Content/Tag/OperationsListItem.vue.js +0 -7
  323. package/dist/components/Content/Tag/OperationsListItem.vue2.js +0 -67
  324. package/dist/components/Content/Tag/Tag.vue.d.ts.map +0 -1
  325. package/dist/components/Content/Tag/Tag.vue.js +0 -99
  326. package/dist/components/Content/Tag/TagAccordion.vue.d.ts.map +0 -1
  327. package/dist/components/Content/Tag/TagAccordion.vue.js +0 -7
  328. package/dist/components/Content/Tag/TagAccordion.vue2.js +0 -50
  329. package/dist/components/Content/Tag/TagList.vue.d.ts +0 -22
  330. package/dist/components/Content/Tag/TagList.vue.d.ts.map +0 -1
  331. package/dist/components/Content/Tag/TagList.vue.js +0 -73
  332. package/dist/components/Content/Tag/TagList.vue2.js +0 -4
  333. package/dist/components/Content/Tag/TagSection.vue.d.ts.map +0 -1
  334. package/dist/components/Content/Tag/TagSection.vue.js +0 -7
  335. package/dist/components/Content/Tag/TagSection.vue2.js +0 -67
  336. package/dist/components/Content/Tag/index.d.ts +0 -3
  337. package/dist/components/Content/Tag/index.d.ts.map +0 -1
  338. package/dist/stores/useHttpClientStore.d.ts +0 -43
  339. package/dist/stores/useHttpClientStore.d.ts.map +0 -1
  340. package/dist/stores/useHttpClientStore.js +0 -70
  341. package/dist/v2/hooks/useStore.d.ts +0 -9
  342. package/dist/v2/hooks/useStore.d.ts.map +0 -1
  343. package/dist/v2/hooks/useStore.js +0 -14
  344. /package/dist/components/Content/{Tag → Tags}/Tag.vue2.js +0 -0
  345. /package/dist/components/{Content/Lazy → Lazy}/Lazy.vue.js +0 -0
package/dist/types.d.ts CHANGED
@@ -1,5 +1,6 @@
1
1
  import type { AnyApiReferenceConfiguration, ApiReferenceConfiguration } from '@scalar/types/api-reference';
2
2
  import type { OpenAPIV3_1, Spec } from '@scalar/types/legacy';
3
+ import type { WorkspaceStore } from '@scalar/workspace-store/client';
3
4
  export type { ApiReferenceConfiguration };
4
5
  export type ReferenceProps = {
5
6
  configuration?: AnyApiReferenceConfiguration;
@@ -36,6 +37,10 @@ export type ReferenceLayoutProps = {
36
37
  * @deprecated Use `originalDocument` instead.
37
38
  */
38
39
  rawSpec?: string;
40
+ /**
41
+ * @deprecated this is just temporary until we switch to the new store, we prop drill it down
42
+ */
43
+ store: WorkspaceStore;
39
44
  };
40
45
  export type GettingStartedExamples = 'Petstore' | 'CoinMarketCap';
41
46
  export type ContentProperties = {
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,4BAA4B,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAA;AAC1G,OAAO,KAAK,EAAE,WAAW,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAA;AAE7D,YAAY,EAAE,yBAAyB,EAAE,CAAA;AAEzC,MAAM,MAAM,cAAc,GAAG;IAC3B,aAAa,CAAC,EAAE,4BAA4B,CAAA;CAC7C,CAAA;AAED;;GAEG;AACH,MAAM,MAAM,oBAAoB,GAAG;IACjC,aAAa,EAAE,OAAO,CAAC,yBAAyB,CAAC,CAAA;IACjD;;;;;;;;;;;;OAYG;IACH,oBAAoB,CAAC,EAAE,WAAW,CAAC,QAAQ,CAAA;IAC3C;;OAEG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB,MAAM,EAAE,OAAO,CAAA;IACf;;OAEG;IACH,UAAU,CAAC,EAAE,IAAI,CAAA;IACjB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAA;CACjB,CAAA;AAED,MAAM,MAAM,sBAAsB,GAAG,UAAU,GAAG,eAAe,CAAA;AAEjE,MAAM,MAAM,iBAAiB,GAAG;IAC9B,CAAC,GAAG,EAAE,MAAM,GAAG;QACb,IAAI,EAAE,MAAM,CAAA;QACZ,MAAM,CAAC,EAAE,MAAM,CAAA;QACf,OAAO,CAAC,EAAE,GAAG,CAAA;QACb,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAA;QACnB,IAAI,CAAC,EAAE,MAAM,EAAE,CAAA;QACf,WAAW,CAAC,EAAE,MAAM,CAAA;QACpB,UAAU,CAAC,EAAE,iBAAiB,CAAA;KAC/B,CAAA;CACF,CAAA;AAED,MAAM,MAAM,aAAa,GAAG;IAC1B,MAAM,CAAC,EAAE;QACP,IAAI,EAAE,MAAM,CAAA;QACZ,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAA;QACnB,UAAU,EAAE,iBAAiB,CAAA;KAC9B,CAAA;CACF,CAAA;AACD,2DAA2D;AAC3D,MAAM,MAAM,mBAAmB,GAC3B,QAAQ,GACR,QAAQ,GACR,QAAQ,GACR,eAAe,GACf,aAAa,GACb,eAAe,GACf,aAAa,CAAA;AAEjB,MAAM,MAAM,oBAAoB,GAAG;KAChC,CAAC,IAAI,mBAAmB,GAAG,CAAC,KAAK,EAAE,kBAAkB,KAAK,GAAG;CAC/D,CAAA;AAED,MAAM,MAAM,oBAAoB,GAAG;IACjC,mBAAmB,EAAE,GAAG,CAAA;CACzB,CAAA;AAED,MAAM,MAAM,kBAAkB,GAAG;IAC/B,IAAI,EAAE,IAAI,CAAA;IACV,UAAU,EAAE,MAAM,CAAA;CACnB,CAAA"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,4BAA4B,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAA;AAC1G,OAAO,KAAK,EAAE,WAAW,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAA;AAC7D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAA;AAEpE,YAAY,EAAE,yBAAyB,EAAE,CAAA;AAEzC,MAAM,MAAM,cAAc,GAAG;IAC3B,aAAa,CAAC,EAAE,4BAA4B,CAAA;CAC7C,CAAA;AAED;;GAEG;AACH,MAAM,MAAM,oBAAoB,GAAG;IACjC,aAAa,EAAE,OAAO,CAAC,yBAAyB,CAAC,CAAA;IACjD;;;;;;;;;;;;OAYG;IACH,oBAAoB,CAAC,EAAE,WAAW,CAAC,QAAQ,CAAA;IAC3C;;OAEG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB,MAAM,EAAE,OAAO,CAAA;IACf;;OAEG;IACH,UAAU,CAAC,EAAE,IAAI,CAAA;IACjB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB;;OAEG;IACH,KAAK,EAAE,cAAc,CAAA;CACtB,CAAA;AAED,MAAM,MAAM,sBAAsB,GAAG,UAAU,GAAG,eAAe,CAAA;AAEjE,MAAM,MAAM,iBAAiB,GAAG;IAC9B,CAAC,GAAG,EAAE,MAAM,GAAG;QACb,IAAI,EAAE,MAAM,CAAA;QACZ,MAAM,CAAC,EAAE,MAAM,CAAA;QACf,OAAO,CAAC,EAAE,GAAG,CAAA;QACb,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAA;QACnB,IAAI,CAAC,EAAE,MAAM,EAAE,CAAA;QACf,WAAW,CAAC,EAAE,MAAM,CAAA;QACpB,UAAU,CAAC,EAAE,iBAAiB,CAAA;KAC/B,CAAA;CACF,CAAA;AAED,MAAM,MAAM,aAAa,GAAG;IAC1B,MAAM,CAAC,EAAE;QACP,IAAI,EAAE,MAAM,CAAA;QACZ,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAA;QACnB,UAAU,EAAE,iBAAiB,CAAA;KAC9B,CAAA;CACF,CAAA;AACD,2DAA2D;AAC3D,MAAM,MAAM,mBAAmB,GAC3B,QAAQ,GACR,QAAQ,GACR,QAAQ,GACR,eAAe,GACf,aAAa,GACb,eAAe,GACf,aAAa,CAAA;AAEjB,MAAM,MAAM,oBAAoB,GAAG;KAChC,CAAC,IAAI,mBAAmB,GAAG,CAAC,KAAK,EAAE,kBAAkB,KAAK,GAAG;CAC/D,CAAA;AAED,MAAM,MAAM,oBAAoB,GAAG;IACjC,mBAAmB,EAAE,GAAG,CAAA;CACzB,CAAA;AAED,MAAM,MAAM,kBAAkB,GAAG;IAC/B,IAAI,EAAE,IAAI,CAAA;IACV,UAAU,EAAE,MAAM,CAAA;CACnB,CAAA"}
@@ -2,7 +2,7 @@ import type { AnyApiReferenceConfiguration } from '@scalar/types';
2
2
  import { type WorkspaceStore } from '@scalar/workspace-store/client';
3
3
  type __VLS_Props = {
4
4
  configuration?: AnyApiReferenceConfiguration;
5
- getWorkspaceStore: () => WorkspaceStore;
5
+ store: WorkspaceStore;
6
6
  };
7
7
  declare function __VLS_template(): {
8
8
  attrs: Partial<{}>;
@@ -1 +1 @@
1
- {"version":3,"file":"ApiReferenceWorkspace.vue.d.ts","sourceRoot":"","sources":["../../src/v2/ApiReferenceWorkspace.vue"],"names":[],"mappings":"AAuXA,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,eAAe,CAAA;AAGjE,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,gCAAgC,CAAA;AA2BpE,KAAK,WAAW,GAAG;IACjB,aAAa,CAAC,EAAE,4BAA4B,CAAA;IAC5C,iBAAiB,EAAE,MAAM,cAAc,CAAA;CACxC,CAAC;AAwQF,iBAAS,cAAc;WA8GT,OAAO,IAA6B;;wBAXrB,GAAG;wBACH,GAAG;iCACM,GAAG;;;;;;EAcxC;AAgBD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe,kSAMnB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAWpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
1
+ {"version":3,"file":"ApiReferenceWorkspace.vue.d.ts","sourceRoot":"","sources":["../../src/v2/ApiReferenceWorkspace.vue"],"names":[],"mappings":"AAkVA,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,eAAe,CAAA;AAEjE,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,gCAAgC,CAAA;AA0BpE,KAAK,WAAW,GAAG;IACjB,aAAa,CAAC,EAAE,4BAA4B,CAAA;IAC5C,KAAK,EAAE,cAAc,CAAA;CACtB,CAAC;AAkOF,iBAAS,cAAc;WA8GT,OAAO,IAA6B;;wBAXrB,GAAG;wBACH,GAAG;iCACM,GAAG;;;;;;EAcxC;AAgBD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe,kSAMnB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAWpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
@@ -1,57 +1,57 @@
1
- import { defineComponent as b, ref as p, toRef as A, provide as B, useTemplateRef as P, onServerPrefetch as V, onMounted as F, watch as n, computed as H, createElementBlock as U, openBlock as y, createBlock as W, createCommentVNode as Y, createVNode as D, unref as l, resolveDynamicComponent as O, withCtx as i, createTextVNode as j, toDisplayString as w, renderSlot as v, isRef as J } from "vue";
2
- import { safeLocalStorage as S, REFERENCE_LS_KEYS as g } from "@scalar/helpers/object/local-storage";
3
- import { parseJsonOrYaml as q, redirectToProxy as z } from "@scalar/oas-utils/helpers";
4
- import { useColorMode as G } from "@scalar/use-hooks/useColorMode";
5
- import { useSeoMeta as Q } from "@unhead/vue";
6
- import { useFavicon as X } from "@vueuse/core";
7
- import Z from "../components/ApiReferenceLayout.vue.js";
8
- import { NAV_STATE_SYMBOL as ee } from "../hooks/useNavState.js";
9
- import { useHttpClientStore as te } from "../stores/useHttpClientStore.js";
10
- import { isClient as k } from "./blocks/scalar-request-example-block/helpers/find-client.js";
11
- import { useStore as oe } from "./hooks/useStore.js";
12
- import { useMultipleDocuments as ae } from "../features/multiple-documents/useMultipleDocuments.js";
13
- import { onCustomEvent as C } from "./events/listeners.js";
14
- import re from "../features/multiple-documents/DocumentSelector.vue.js";
15
- const xe = /* @__PURE__ */ b({
1
+ import { defineComponent as N, ref as p, toRef as _, provide as $, useTemplateRef as P, onServerPrefetch as V, onBeforeMount as A, onMounted as B, watch as s, computed as w, createElementBlock as U, openBlock as E, createBlock as K, createCommentVNode as Y, createVNode as D, unref as r, resolveDynamicComponent as F, withCtx as u, createTextVNode as O, toDisplayString as j, renderSlot as v, isRef as H } from "vue";
2
+ import { safeLocalStorage as x, REFERENCE_LS_KEYS as h } from "@scalar/helpers/object/local-storage";
3
+ import { makeUrlAbsolute as J } from "@scalar/helpers/url/make-url-absolute";
4
+ import { parseJsonOrYaml as W, redirectToProxy as q } from "@scalar/oas-utils/helpers";
5
+ import { useColorMode as z } from "@scalar/use-hooks/useColorMode";
6
+ import { useSeoMeta as G } from "@unhead/vue";
7
+ import { useFavicon as Q } from "@vueuse/core";
8
+ import X from "../components/ApiReferenceLayout.vue.js";
9
+ import { NAV_STATE_SYMBOL as Z } from "../hooks/useNavState.js";
10
+ import { isClient as y } from "./blocks/scalar-request-example-block/helpers/find-client.js";
11
+ import { useMultipleDocuments as ee } from "../features/multiple-documents/useMultipleDocuments.js";
12
+ import { onCustomEvent as k } from "./events/listeners.js";
13
+ import te from "../features/multiple-documents/DocumentSelector.vue.js";
14
+ const ve = /* @__PURE__ */ N({
16
15
  __name: "ApiReferenceWorkspace",
17
16
  props: {
18
17
  configuration: {},
19
- getWorkspaceStore: { type: Function }
18
+ store: {}
20
19
  },
21
- setup(h) {
22
- const E = h, {
23
- availableDocuments: u,
20
+ setup(M) {
21
+ const C = M, {
22
+ availableDocuments: d,
24
23
  selectedConfiguration: a,
25
- selectedDocumentIndex: d,
26
- isIntersectionEnabled: M,
27
- hash: T,
28
- hashPrefix: I
29
- } = ae({
30
- configuration: A(E, "configuration"),
24
+ selectedDocumentIndex: i,
25
+ isIntersectionEnabled: S,
26
+ hash: g,
27
+ hashPrefix: T
28
+ } = ee({
29
+ configuration: _(C, "configuration"),
31
30
  isIntersectionEnabled: p(!1),
32
31
  hash: p(""),
33
32
  hashPrefix: p("")
34
- }), { httpClient: $, setExcludedClients: L, setDefaultHttpClient: x } = te(), K = (e, t) => fetch(
35
- z(a.value.proxyUrl, e.toString()),
33
+ }), b = (e, t) => fetch(
34
+ q(a.value.proxyUrl, e.toString()),
36
35
  t
37
36
  );
38
- B(ee, { isIntersectionEnabled: M, hash: T, hashPrefix: I });
39
- const c = P("root"), o = E.getWorkspaceStore();
40
- oe(o);
41
- const f = u, m = (e) => {
37
+ $(Z, { isIntersectionEnabled: S, hash: g, hashPrefix: T });
38
+ const c = P("root"), o = C.store, f = d, m = (e) => {
39
+ var t;
42
40
  if (o.workspace.documents[e.slug ?? "default"] === void 0) {
43
41
  if (e.content) {
44
- const t = typeof e.content == "string" ? q(e.content) : e.content;
42
+ const n = typeof e.content == "string" ? W(e.content) : e.content;
45
43
  return o.addDocumentSync({
46
44
  name: e.slug ?? "default",
47
- document: typeof t == "function" ? t() : t
45
+ document: typeof n == "function" ? n() : n
48
46
  });
49
47
  }
50
48
  if (e.url)
51
49
  return o.addDocument({
52
50
  name: e.slug ?? "default",
53
- url: e.url,
54
- fetch: K
51
+ url: J(e.url, {
52
+ basePath: (t = a.value.pathRouting) == null ? void 0 : t.basePath
53
+ }),
54
+ fetch: b
55
55
  });
56
56
  }
57
57
  };
@@ -61,110 +61,100 @@ const xe = /* @__PURE__ */ b({
61
61
  f.value.forEach((e) => {
62
62
  e.url && m(e);
63
63
  });
64
- }), F(() => {
65
- f.value.forEach((t) => {
66
- t.url && m(t);
67
- });
68
- const e = S().getItem(
69
- g.SELECTED_CLIENT
64
+ }), A(() => {
65
+ const e = x().getItem(
66
+ h.SELECTED_CLIENT
70
67
  );
71
- k(e) && !o.workspace["x-scalar-default-client"] && o.update("x-scalar-default-client", e);
72
- }), C(c, "scalar-update-dark-mode", (e) => {
68
+ y(e) && !o.workspace["x-scalar-default-client"] && o.update("x-scalar-default-client", e);
69
+ }), B(() => {
70
+ f.value.forEach((e) => {
71
+ e.url && m(e);
72
+ });
73
+ }), k(c, "scalar-update-dark-mode", (e) => {
73
74
  o.update("x-scalar-dark-mode", e.detail.value);
74
- }), C(c, "scalar-update-active-document", (e) => {
75
+ }), k(c, "scalar-update-active-document", (e) => {
75
76
  o.update("x-scalar-active-document", e.detail.value);
76
- }), C(c, "scalar-update-selected-client", (e) => {
77
- o.update("x-scalar-default-client", e.detail), S().setItem(g.SELECTED_CLIENT, e.detail);
78
- const [t, r] = e.detail.split("/");
79
- x({
80
- targetKey: t,
81
- clientKey: r
82
- });
83
- }), n(
84
- () => a.value.hiddenClients,
85
- (e) => e && L(e)
86
- ), n($, (e) => {
87
- var r;
88
- const t = `${e.targetKey}/${e.clientKey}`;
89
- e && ((r = o.workspace.activeDocument) == null ? void 0 : r["x-scalar-default-client"]) !== t && k(t) && o.update("x-scalar-default-client", t);
90
- }), n(
77
+ }), k(c, "scalar-update-selected-client", (e) => {
78
+ o.update("x-scalar-default-client", e.detail), x().setItem(h.SELECTED_CLIENT, e.detail);
79
+ }), s(
91
80
  () => a.value.defaultHttpClient,
92
81
  (e) => {
93
82
  if (e) {
94
- const { targetKey: t, clientKey: r } = e, s = `${t}/${r}`;
95
- k(s) && o.update("x-scalar-default-client", s), x(e);
83
+ const { targetKey: t, clientKey: n } = e, l = `${t}/${n}`;
84
+ y(l) && o.update("x-scalar-default-client", l);
96
85
  }
97
86
  },
98
87
  { immediate: !0 }
99
88
  );
100
- const { toggleColorMode: N, isDarkMode: R } = G({
89
+ const { toggleColorMode: I, isDarkMode: L } = z({
101
90
  initialColorMode: a.value.darkMode ? "dark" : void 0,
102
91
  overrideColorMode: a.value.forceDarkModeState
103
92
  });
104
- n(
93
+ s(
105
94
  () => a.value.darkMode,
106
95
  (e) => o.update("x-scalar-dark-mode", !!e)
107
- ), n(
108
- () => R.value,
96
+ ), s(
97
+ () => L.value,
109
98
  (e) => o.update("x-scalar-dark-mode", e),
110
99
  { immediate: !0 }
111
- ), n(
112
- () => d.value,
100
+ ), s(
101
+ () => i.value,
113
102
  (e) => {
114
103
  var t;
115
104
  return o.update(
116
105
  "x-scalar-active-document",
117
- (t = u.value[e]) == null ? void 0 : t.slug
106
+ (t = d.value[e]) == null ? void 0 : t.slug
118
107
  );
119
108
  },
120
109
  { immediate: !0 }
121
- ), n(
122
- () => u.value,
110
+ ), s(
111
+ () => d.value,
123
112
  (e) => {
124
113
  e.forEach(m);
125
114
  }
126
- ), a.value.metaData && Q(a.value.metaData);
127
- const _ = H(() => a.value.favicon);
128
- return X(_), (e, t) => {
129
- var r;
130
- return y(), U("div", {
115
+ ), a.value.metaData && G(a.value.metaData);
116
+ const R = w(() => a.value.favicon);
117
+ return Q(R), (e, t) => {
118
+ var n;
119
+ return E(), U("div", {
131
120
  ref_key: "root",
132
121
  ref: c
133
122
  }, [
134
- (r = l(a)) != null && r.customCss ? (y(), W(O("style"), { key: 0 }, {
135
- default: i(() => [
136
- j(w(l(a).customCss), 1)
123
+ (n = r(a)) != null && n.customCss ? (E(), K(F("style"), { key: 0 }, {
124
+ default: u(() => [
125
+ O(j(r(a).customCss), 1)
137
126
  ]),
138
127
  _: 1
139
128
  })) : Y("", !0),
140
- D(Z, {
141
- configuration: l(a),
142
- isDark: !!l(o).workspace["x-scalar-dark-mode"],
143
- onToggleDarkMode: t[1] || (t[1] = () => l(N)()),
144
- onUpdateContent: t[2] || (t[2] = (s) => e.$emit("updateContent", s))
129
+ D(X, {
130
+ configuration: r(a),
131
+ isDark: !!r(o).workspace["x-scalar-dark-mode"],
132
+ store: r(o),
133
+ onToggleDarkMode: t[1] || (t[1] = () => r(I)()),
134
+ onUpdateContent: t[2] || (t[2] = (l) => e.$emit("updateContent", l))
145
135
  }, {
146
- footer: i(() => [
136
+ footer: u(() => [
147
137
  v(e.$slots, "footer")
148
138
  ]),
149
- "content-end": i(() => [
139
+ "content-end": u(() => [
150
140
  v(e.$slots, "footer")
151
141
  ]),
152
- "document-selector": i(() => [
153
- D(l(re), {
154
- modelValue: l(d),
155
- "onUpdate:modelValue": t[0] || (t[0] = (s) => J(d) ? d.value = s : null),
156
- options: l(u)
142
+ "document-selector": u(() => [
143
+ D(r(te), {
144
+ modelValue: r(i),
145
+ "onUpdate:modelValue": t[0] || (t[0] = (l) => H(i) ? i.value = l : null),
146
+ options: r(d)
157
147
  }, null, 8, ["modelValue", "options"])
158
148
  ]),
159
- "sidebar-start": i(() => [
149
+ "sidebar-start": u(() => [
160
150
  v(e.$slots, "sidebar-start")
161
151
  ]),
162
152
  _: 3
163
- }, 8, ["configuration", "isDark"])
153
+ }, 8, ["configuration", "isDark", "store"])
164
154
  ], 512);
165
155
  };
166
156
  }
167
157
  });
168
158
  export {
169
- xe as default
159
+ ve as default
170
160
  };
@@ -0,0 +1,4 @@
1
+ const e = "";
2
+ export {
3
+ e as default
4
+ };
@@ -1,5 +1,5 @@
1
1
  import o from "./ApiReferenceWorkspace.vue.js";
2
- /* empty css */
2
+ import "./ApiReferenceWorkspace.vue2.js";
3
3
  export {
4
4
  o as default
5
5
  };
@@ -1,6 +1,6 @@
1
- import type { ExampleObject } from '@scalar/workspace-store/schemas/v3.1/strict/example';
1
+ import type { MediaTypeObject } from '@scalar/workspace-store/schemas/v3.1/strict/media-header-encoding';
2
2
  type __VLS_Props = {
3
- examples: Record<string, ExampleObject>;
3
+ examples: MediaTypeObject['examples'];
4
4
  };
5
5
  type __VLS_PublicProps = {
6
6
  modelValue: string;
@@ -1 +1 @@
1
- {"version":3,"file":"ExamplePicker.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-request-example-block/components/ExamplePicker.vue"],"names":[],"mappings":"AA+EA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qDAAqD,CAAA;AAIxF,KAAK,WAAW,GAAG;IACjB,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,CAAA;CACxC,CAAC;AAqCF,KAAK,iBAAiB,GAAG;IACzB,UAAU,EAAE,MAAM,CAAC;CAClB,GAAG,WAAW,CAAC;;oBAjCO,MAAM,GAAG,IAAI;;;;;;;AAkLpC,wBASG"}
1
+ {"version":3,"file":"ExamplePicker.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-request-example-block/components/ExamplePicker.vue"],"names":[],"mappings":"AAmFA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mEAAmE,CAAA;AAIxG,KAAK,WAAW,GAAG;IACjB,QAAQ,EAAE,eAAe,CAAC,UAAU,CAAC,CAAA;CACtC,CAAC;AAwCF,KAAK,iBAAiB,GAAG;IACzB,UAAU,EAAE,MAAM,CAAC;CAClB,GAAG,WAAW,CAAC;;oBAjCO,MAAM,GAAG,IAAI;;;;;;;AAuLpC,wBASG"}
@@ -1,61 +1,64 @@
1
- import { defineComponent as h, mergeModels as _, useModel as v, createBlock as p, openBlock as s, unref as t, withCtx as o, createVNode as c, createElementVNode as m, toDisplayString as d, createElementBlock as w, Fragment as g, renderList as C, normalizeClass as S } from "vue";
2
- import { ScalarDropdown as b, ScalarButton as k, ScalarDropdownItem as E, ScalarIcon as V } from "@scalar/components";
1
+ import { defineComponent as h, mergeModels as w, useModel as _, createBlock as u, openBlock as c, unref as t, withCtx as r, createVNode as i, createElementVNode as m, toDisplayString as p, createElementBlock as g, Fragment as v, renderList as b, normalizeClass as C } from "vue";
2
+ import { ScalarDropdown as S, ScalarButton as k, ScalarDropdownItem as E, ScalarIcon as V } from "@scalar/components";
3
3
  import { ScalarIconCaretDown as B } from "@scalar/icons";
4
- const D = { class: "overflow-hidden text-ellipsis" }, j = /* @__PURE__ */ h({
4
+ const D = { class: "overflow-hidden text-ellipsis" }, N = /* @__PURE__ */ h({
5
5
  __name: "ExamplePicker",
6
- props: /* @__PURE__ */ _({
6
+ props: /* @__PURE__ */ w({
7
7
  examples: {}
8
8
  }, {
9
- modelValue: { required: !0 },
9
+ modelValue: {
10
+ required: !0
11
+ },
10
12
  modelModifiers: {}
11
13
  }),
12
14
  emits: ["update:modelValue"],
13
- setup(i, { expose: u }) {
14
- const f = i, a = v(i, "modelValue"), n = (e) => {
15
- if (!e)
16
- return "Select an example";
17
- const l = f.examples[e];
18
- return (l == null ? void 0 : l.summary) ?? e;
15
+ setup(d, { expose: f }) {
16
+ const a = _(d, "modelValue"), o = (e) => {
17
+ var n, s;
18
+ return e ? ((s = (n = d.examples) == null ? void 0 : n[e]) == null ? void 0 : s.summary) ?? e : "Select an example";
19
19
  }, x = (e) => {
20
20
  a.value = e;
21
21
  };
22
- return u({
23
- getLabel: n,
22
+ return f({
23
+ getLabel: o,
24
24
  selectedExampleKey: a
25
- }), (e, l) => (s(), p(t(b), { placement: "bottom-start" }, {
26
- items: o(() => [
27
- (s(!0), w(g, null, C(e.examples, (I, r) => (s(), p(t(E), {
28
- key: r,
29
- onClick: (M) => x(r)
25
+ }), (e, n) => (c(), u(t(S), { placement: "bottom-start" }, {
26
+ items: r(() => [
27
+ (c(!0), g(v, null, b(e.examples, (s, l) => (c(), u(t(E), {
28
+ key: l,
29
+ onClick: (z) => x(l)
30
30
  }, {
31
- default: o(() => [
31
+ default: r(() => [
32
32
  m("div", {
33
- class: S([
33
+ class: C([
34
34
  "flex h-4 w-4 items-center justify-center rounded-full p-[3px]",
35
- a.value === r ? "bg-c-accent text-b-1" : "shadow-border text-transparent"
35
+ a.value === l ? "bg-c-accent text-b-1" : "shadow-border text-transparent"
36
36
  ])
37
37
  }, [
38
- c(t(V), {
38
+ i(t(V), {
39
39
  class: "size-2.5",
40
40
  icon: "Checkmark",
41
41
  thickness: "3"
42
42
  })
43
43
  ], 2),
44
- m("span", D, d(n(r)), 1)
44
+ m("span", D, p(o(l)), 1)
45
45
  ]),
46
46
  _: 2
47
47
  }, 1032, ["onClick"]))), 128))
48
48
  ]),
49
- default: o(() => [
50
- c(t(k), {
49
+ default: r(() => [
50
+ i(t(k), {
51
51
  "data-testid": "example-picker",
52
52
  class: "text-c-2 hover:text-c-1 flex h-full w-fit gap-1.5 px-1.5 py-0.75 text-base font-normal",
53
53
  fullWidth: "",
54
54
  variant: "ghost"
55
55
  }, {
56
- default: o(() => [
57
- m("span", null, d(n(a.value)), 1),
58
- c(t(B))
56
+ default: r(() => [
57
+ m("span", null, p(o(a.value)), 1),
58
+ i(t(B), {
59
+ weight: "bold",
60
+ class: "ui-open:rotate-180 mt-0.25 size-3 transition-transform duration-100"
61
+ })
59
62
  ]),
60
63
  _: 1
61
64
  })
@@ -65,5 +68,5 @@ const D = { class: "overflow-hidden text-ellipsis" }, j = /* @__PURE__ */ h({
65
68
  }
66
69
  });
67
70
  export {
68
- j as default
71
+ N as default
69
72
  };
@@ -4,20 +4,16 @@ import type { OperationObject } from '@scalar/workspace-store/schemas/v3.1/stric
4
4
  import type { SecuritySchemeObject } from '@scalar/workspace-store/schemas/v3.1/strict/security-scheme';
5
5
  import type { ServerObject } from '@scalar/workspace-store/schemas/v3.1/strict/server';
6
6
  import { type Dereference } from '@scalar/workspace-store/schemas/v3.1/type-guard';
7
+ import type { ClientOptionGroup } from '../../../../v2/blocks/scalar-request-example-block/types';
7
8
  export type RequestExampleProps = {
8
9
  /**
9
- * List of all allowed clients, this will determine which clients are available in the dropdown
10
- *
11
- * For the complete list:
12
- * @see https://github.com/scalar/scalar/blob/main/packages/types/src/snippetz/snippetz.ts#L8
13
- *
14
- * @defaults to all available clients + any included custom code examples
10
+ * List of all http clients formatted into option groups for the client selector
15
11
  */
16
- allowedClients?: AvailableClients[number][];
12
+ clientOptions: ClientOptionGroup[];
17
13
  /**
18
14
  * Pre-selected client, this will determine which client is initially selected in the dropdown
19
15
  *
20
- * @defaults to js/fetch or a custom sample if one is available
16
+ * @defaults to shell/curl or a custom sample if one is available
21
17
  */
22
18
  selectedClient?: AvailableClients[number];
23
19
  /**
@@ -59,11 +55,6 @@ export type RequestExampleProps = {
59
55
  * A method to generate the label of the block, should return an html string
60
56
  */
61
57
  generateLabel?: () => string;
62
- /**
63
- * Whether to hide the client selector
64
- * @default false
65
- */
66
- hideClientSelector?: boolean;
67
58
  };
68
59
  /**
69
60
  * Request Example
@@ -1 +1 @@
1
- {"version":3,"file":"RequestExample.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-request-example-block/components/RequestExample.vue"],"names":[],"mappings":"AAiZA,OAAO,KAAK,EAAE,UAAU,IAAI,cAAc,EAAE,MAAM,mCAAmC,CAAA;AAGrF,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,kBAAkB,CAAA;AAExD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,6DAA6D,CAAA;AAClG,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,6DAA6D,CAAA;AACvG,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oDAAoD,CAAA;AACtF,OAAO,EAEL,KAAK,WAAW,EACjB,MAAM,iDAAiD,CAAA;AAoBxD,MAAM,MAAM,mBAAmB,GAAG;IAChC;;;;;;;OAOG;IACH,cAAc,CAAC,EAAE,gBAAgB,CAAC,MAAM,CAAC,EAAE,CAAA;IAC3C;;;;OAIG;IACH,cAAc,CAAC,EAAE,gBAAgB,CAAC,MAAM,CAAC,CAAA;IACzC;;OAEG;IACH,cAAc,CAAC,EAAE,YAAY,GAAG,SAAS,CAAA;IACzC;;;;;OAKG;IACH,mBAAmB,CAAC,EAAE,MAAM,CAAA;IAC5B;;OAEG;IACH,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB;;OAEG;IACH,eAAe,CAAC,EAAE,oBAAoB,EAAE,CAAA;IACxC;;OAEG;IACH,MAAM,EAAE,cAAc,CAAA;IACtB;;OAEG;IACH,IAAI,EAAE,MAAM,CAAA;IACZ;;OAEG;IACH,SAAS,EAAE,WAAW,CAAC,eAAe,CAAC,CAAA;IACvC;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,MAAM,CAAA;IAC5B;;;OAGG;IACH,kBAAkB,CAAC,EAAE,OAAO,CAAA;CAC7B,CAAA;AAED;;;;;;;;GAQG;;YAoBO,MAAM,OAAO;YACb,MAAM,OAAO;;YADb,MAAM,OAAO;YACb,MAAM,OAAO;;AApBvB,wBA0bC;AAWD,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
1
+ {"version":3,"file":"RequestExample.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-request-example-block/components/RequestExample.vue"],"names":[],"mappings":"AAuZA,OAAO,KAAK,EAAE,UAAU,IAAI,cAAc,EAAE,MAAM,mCAAmC,CAAA;AAGrF,OAAO,EAAE,KAAK,gBAAgB,EAAiB,MAAM,kBAAkB,CAAA;AAEvE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,6DAA6D,CAAA;AAClG,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,6DAA6D,CAAA;AACvG,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oDAAoD,CAAA;AACtF,OAAO,EAEL,KAAK,WAAW,EACjB,MAAM,iDAAiD,CAAA;AAQxD,OAAO,KAAK,EAEV,iBAAiB,EAClB,MAAM,gDAAgD,CAAA;AAOvD,MAAM,MAAM,mBAAmB,GAAG;IAChC;;OAEG;IACH,aAAa,EAAE,iBAAiB,EAAE,CAAA;IAClC;;;;OAIG;IACH,cAAc,CAAC,EAAE,gBAAgB,CAAC,MAAM,CAAC,CAAA;IACzC;;OAEG;IACH,cAAc,CAAC,EAAE,YAAY,GAAG,SAAS,CAAA;IACzC;;;;;OAKG;IACH,mBAAmB,CAAC,EAAE,MAAM,CAAA;IAC5B;;OAEG;IACH,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB;;OAEG;IACH,eAAe,CAAC,EAAE,oBAAoB,EAAE,CAAA;IACxC;;OAEG;IACH,MAAM,EAAE,cAAc,CAAA;IACtB;;OAEG;IACH,IAAI,EAAE,MAAM,CAAA;IACZ;;OAEG;IACH,SAAS,EAAE,WAAW,CAAC,eAAe,CAAC,CAAA;IACvC;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,MAAM,CAAA;CAC7B,CAAA;AAED;;;;;;;;GAQG;;YAmBO,MAAM,OAAO;YACb,MAAM,OAAO;;YADb,MAAM,OAAO;YACb,MAAM,OAAO;;AAnBvB,wBAicC;AAWD,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
@@ -1,7 +1,7 @@
1
1
  import o from "./RequestExample.vue2.js";
2
- /* empty css */
2
+ import "./RequestExample.vue3.js";
3
3
  import t from "../../../../_virtual/_plugin-vue_export-helper.js";
4
- const r = /* @__PURE__ */ t(o, [["__scopeId", "data-v-03733855"]]);
4
+ const p = /* @__PURE__ */ t(o, [["__scopeId", "data-v-f42f9860"]]);
5
5
  export {
6
- r as default
6
+ p as default
7
7
  };