@scalar/api-reference 1.36.1 → 1.37.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 (278) hide show
  1. package/CHANGELOG.md +63 -0
  2. package/dist/browser/standalone.js +26246 -25660
  3. package/dist/browser/webpack-stats.json +1 -1
  4. package/dist/components/ApiReferenceContent.vue.d.ts +34 -0
  5. package/dist/components/ApiReferenceContent.vue.d.ts.map +1 -0
  6. package/dist/components/ApiReferenceContent.vue.js +8 -0
  7. package/dist/components/ApiReferenceContent.vue2.js +148 -0
  8. package/dist/components/ApiReferenceLayout.vue.d.ts.map +1 -1
  9. package/dist/components/ApiReferenceLayout.vue.js +2 -2
  10. package/dist/components/ApiReferenceLayout.vue2.js +239 -219
  11. package/dist/components/Content/ClientLibraries/ClientLibraries.vue.d.ts +2 -2
  12. package/dist/components/Content/ClientLibraries/ClientLibraries.vue.d.ts.map +1 -1
  13. package/dist/components/Content/ClientLibraries/ClientSelector.vue.d.ts +1 -1
  14. package/dist/components/Content/ClientLibraries/ClientSelector.vue.d.ts.map +1 -1
  15. package/dist/components/Content/ClientLibraries/featured-clients.d.ts +1 -1
  16. package/dist/components/Content/ClientLibraries/featured-clients.d.ts.map +1 -1
  17. package/dist/components/Content/Content.vue.d.ts +21 -3
  18. package/dist/components/Content/Content.vue.d.ts.map +1 -1
  19. package/dist/components/Content/Content.vue.js +132 -95
  20. package/dist/components/Content/Models/ClassicLayout.vue.d.ts +4 -2
  21. package/dist/components/Content/Models/ClassicLayout.vue.d.ts.map +1 -1
  22. package/dist/components/Content/Models/ClassicLayout.vue.js +2 -2
  23. package/dist/components/Content/Models/ClassicLayout.vue2.js +28 -28
  24. package/dist/components/Content/Models/Models.vue.d.ts +10 -2
  25. package/dist/components/Content/Models/Models.vue.d.ts.map +1 -1
  26. package/dist/components/Content/Models/Models.vue.js +25 -27
  27. package/dist/components/Content/Models/ModernLayout.vue.d.ts +6 -2
  28. package/dist/components/Content/Models/ModernLayout.vue.d.ts.map +1 -1
  29. package/dist/components/Content/Models/ModernLayout.vue.js +1 -1
  30. package/dist/components/Content/Models/ModernLayout.vue2.js +30 -29
  31. package/dist/components/Content/Operations/TraversedEntry.vue.d.ts +20 -6
  32. package/dist/components/Content/Operations/TraversedEntry.vue.d.ts.map +1 -1
  33. package/dist/components/Content/Operations/TraversedEntry.vue.js +58 -46
  34. package/dist/components/Content/Operations/get-current-index.d.ts +1 -1
  35. package/dist/components/Content/Operations/get-current-index.d.ts.map +1 -1
  36. package/dist/components/Content/Schema/Schema.vue.js +2 -2
  37. package/dist/components/Content/Schema/Schema.vue2.js +24 -24
  38. package/dist/components/Content/Schema/helpers/get-ref-name.d.ts.map +1 -1
  39. package/dist/components/Content/Schema/helpers/get-ref-name.js +9 -7
  40. package/dist/components/Content/Schema/helpers/merge-all-of-schemas.js +1 -1
  41. package/dist/components/Content/Schema/helpers/schema-name.d.ts.map +1 -1
  42. package/dist/components/Content/Schema/helpers/schema-name.js +15 -14
  43. package/dist/components/Content/Tags/ClassicLayout.vue.d.ts +1 -1
  44. package/dist/components/Content/Tags/ClassicLayout.vue.d.ts.map +1 -1
  45. package/dist/components/Content/Tags/ClassicLayout.vue.js +2 -2
  46. package/dist/components/Content/Tags/ModernLayout.vue.d.ts +3 -1
  47. package/dist/components/Content/Tags/ModernLayout.vue.d.ts.map +1 -1
  48. package/dist/components/Content/Tags/ModernLayout.vue.js +1 -1
  49. package/dist/components/Content/Tags/ModernLayout.vue2.js +34 -30
  50. package/dist/components/Content/Tags/Tag.vue.d.ts +3 -1
  51. package/dist/components/Content/Tags/Tag.vue.d.ts.map +1 -1
  52. package/dist/components/Content/Tags/Tag.vue.js +14 -12
  53. package/dist/components/Content/Tags/TagSection.vue.d.ts +2 -1
  54. package/dist/components/Content/Tags/TagSection.vue.d.ts.map +1 -1
  55. package/dist/components/Content/Tags/TagSection.vue.js +49 -52
  56. package/dist/components/OperationsList/OperationsList.vue.d.ts +1 -1
  57. package/dist/components/OperationsList/OperationsList.vue.d.ts.map +1 -1
  58. package/dist/components/OperationsList/OperationsList.vue.js +1 -1
  59. package/dist/components/OperationsList/OperationsListItem.vue.d.ts +1 -1
  60. package/dist/components/OperationsList/OperationsListItem.vue.d.ts.map +1 -1
  61. package/dist/components/OperationsList/OperationsListItem.vue.js +2 -2
  62. package/dist/components/Section/Section.vue.js +1 -1
  63. package/dist/components/Section/SectionContainerAccordion.vue.js +2 -2
  64. package/dist/components/ShowMoreButton.vue.d.ts +1 -0
  65. package/dist/components/ShowMoreButton.vue.d.ts.map +1 -1
  66. package/dist/components/ShowMoreButton.vue.js +2 -2
  67. package/dist/components/ShowMoreButton.vue2.js +12 -12
  68. package/dist/consts/urls.d.ts +17 -0
  69. package/dist/consts/urls.d.ts.map +1 -0
  70. package/dist/consts/urls.js +7 -0
  71. package/dist/features/Operation/Operation.vue.d.ts +21 -9
  72. package/dist/features/Operation/Operation.vue.d.ts.map +1 -1
  73. package/dist/features/Operation/Operation.vue.js +42 -53
  74. package/dist/features/Operation/components/Header.vue.d.ts +2 -2
  75. package/dist/features/Operation/components/Header.vue.d.ts.map +1 -1
  76. package/dist/features/Operation/components/Header.vue.js +9 -8
  77. package/dist/features/Operation/components/Headers.vue.d.ts +2 -2
  78. package/dist/features/Operation/components/Headers.vue.d.ts.map +1 -1
  79. package/dist/features/Operation/components/Headers.vue.js +1 -1
  80. package/dist/features/Operation/components/Headers.vue2.js +35 -33
  81. package/dist/features/Operation/components/OperationParameters.vue.d.ts +4 -0
  82. package/dist/features/Operation/components/OperationParameters.vue.d.ts.map +1 -1
  83. package/dist/features/Operation/components/OperationParameters.vue.js +37 -31
  84. package/dist/features/Operation/components/OperationResponses.vue.d.ts +5 -1
  85. package/dist/features/Operation/components/OperationResponses.vue.d.ts.map +1 -1
  86. package/dist/features/Operation/components/OperationResponses.vue.js +16 -17
  87. package/dist/features/Operation/components/ParameterList.vue.d.ts +6 -2
  88. package/dist/features/Operation/components/ParameterList.vue.d.ts.map +1 -1
  89. package/dist/features/Operation/components/ParameterList.vue.js +17 -19
  90. package/dist/features/Operation/components/ParameterListItem.vue.d.ts +6 -2
  91. package/dist/features/Operation/components/ParameterListItem.vue.d.ts.map +1 -1
  92. package/dist/features/Operation/components/ParameterListItem.vue.js +3 -3
  93. package/dist/features/Operation/components/ParameterListItem.vue2.js +64 -65
  94. package/dist/features/Operation/components/RequestBody.vue.d.ts +4 -0
  95. package/dist/features/Operation/components/RequestBody.vue.d.ts.map +1 -1
  96. package/dist/features/Operation/components/RequestBody.vue.js +2 -2
  97. package/dist/features/Operation/components/RequestBody.vue2.js +65 -65
  98. package/dist/features/Operation/components/callbacks/Callback.vue.d.ts +4 -0
  99. package/dist/features/Operation/components/callbacks/Callback.vue.d.ts.map +1 -1
  100. package/dist/features/Operation/components/callbacks/Callback.vue.js +2 -2
  101. package/dist/features/Operation/components/callbacks/Callback.vue2.js +29 -22
  102. package/dist/features/Operation/components/callbacks/Callbacks.vue.d.ts +6 -0
  103. package/dist/features/Operation/components/callbacks/Callbacks.vue.d.ts.map +1 -1
  104. package/dist/features/Operation/components/callbacks/Callbacks.vue.js +18 -16
  105. package/dist/features/Operation/layouts/ClassicLayout.vue.d.ts +11 -5
  106. package/dist/features/Operation/layouts/ClassicLayout.vue.d.ts.map +1 -1
  107. package/dist/features/Operation/layouts/ClassicLayout.vue.js +3 -3
  108. package/dist/features/Operation/layouts/ClassicLayout.vue2.js +99 -90
  109. package/dist/features/Operation/layouts/ModernLayout.vue.d.ts +12 -5
  110. package/dist/features/Operation/layouts/ModernLayout.vue.d.ts.map +1 -1
  111. package/dist/features/Operation/layouts/ModernLayout.vue.js +2 -2
  112. package/dist/features/Operation/layouts/ModernLayout.vue2.js +99 -87
  113. package/dist/features/Search/helpers/create-search-index.d.ts +2 -1
  114. package/dist/features/Search/helpers/create-search-index.d.ts.map +1 -1
  115. package/dist/features/Search/types.d.ts +1 -1
  116. package/dist/features/Search/types.d.ts.map +1 -1
  117. package/dist/features/api-client-modal/ApiClientModal.vue.d.ts.map +1 -1
  118. package/dist/features/api-client-modal/ApiClientModal.vue.js +23 -26
  119. package/dist/features/api-client-modal/useApiClient.d.ts +3032 -2888
  120. package/dist/features/api-client-modal/useApiClient.d.ts.map +1 -1
  121. package/dist/features/document-source/hooks/useDocumentFetcher.d.ts.map +1 -1
  122. package/dist/features/document-source/hooks/useDocumentFetcher.js +13 -11
  123. package/dist/features/document-source/hooks/useDocumentSource.d.ts +1 -1
  124. package/dist/features/document-source/hooks/useDocumentSource.d.ts.map +1 -1
  125. package/dist/features/example-responses/ExampleResponse.vue.d.ts.map +1 -1
  126. package/dist/features/example-responses/ExampleResponse.vue.js +3 -3
  127. package/dist/features/example-responses/ExampleResponse.vue2.js +26 -18
  128. package/dist/features/example-responses/ExampleResponses.vue.d.ts.map +1 -1
  129. package/dist/features/example-responses/ExampleResponses.vue.js +2 -2
  130. package/dist/features/example-responses/ExampleResponses.vue2.js +53 -53
  131. package/dist/features/multiple-documents/useMultipleDocuments.d.ts +11 -6
  132. package/dist/features/multiple-documents/useMultipleDocuments.d.ts.map +1 -1
  133. package/dist/features/multiple-documents/useMultipleDocuments.js +57 -48
  134. package/dist/features/test-request-button/TestRequestButton.vue.d.ts.map +1 -1
  135. package/dist/features/test-request-button/TestRequestButton.vue.js +2 -2
  136. package/dist/features/test-request-button/TestRequestButton.vue2.js +15 -21
  137. package/dist/features/toolbar/ApiReferenceToolbar.vue.d.ts +16 -0
  138. package/dist/features/toolbar/ApiReferenceToolbar.vue.d.ts.map +1 -0
  139. package/dist/features/toolbar/ApiReferenceToolbar.vue.js +43 -0
  140. package/dist/features/toolbar/ApiReferenceToolbar.vue2.js +4 -0
  141. package/dist/features/toolbar/ApiReferenceToolbarBlurb.vue.d.ts +13 -0
  142. package/dist/features/toolbar/ApiReferenceToolbarBlurb.vue.d.ts.map +1 -0
  143. package/dist/features/toolbar/ApiReferenceToolbarBlurb.vue.js +12 -0
  144. package/dist/features/toolbar/ApiReferenceToolbarConfig.vue.d.ts +14 -0
  145. package/dist/features/toolbar/ApiReferenceToolbarConfig.vue.d.ts.map +1 -0
  146. package/dist/features/toolbar/ApiReferenceToolbarConfig.vue.js +95 -0
  147. package/dist/features/toolbar/ApiReferenceToolbarConfig.vue2.js +4 -0
  148. package/dist/features/toolbar/ApiReferenceToolbarConfigLayout.vue.d.ts +10 -0
  149. package/dist/features/toolbar/ApiReferenceToolbarConfigLayout.vue.d.ts.map +1 -0
  150. package/dist/features/toolbar/ApiReferenceToolbarConfigLayout.vue.js +27 -0
  151. package/dist/features/toolbar/ApiReferenceToolbarConfigLayout.vue2.js +4 -0
  152. package/dist/features/toolbar/ApiReferenceToolbarConfigLayoutOptions.vue.d.ts +25 -0
  153. package/dist/features/toolbar/ApiReferenceToolbarConfigLayoutOptions.vue.d.ts.map +1 -0
  154. package/dist/features/toolbar/ApiReferenceToolbarConfigLayoutOptions.vue.js +123 -0
  155. package/dist/features/toolbar/ApiReferenceToolbarConfigLayoutOptions.vue2.js +4 -0
  156. package/dist/features/toolbar/ApiReferenceToolbarConfigTheme.vue.d.ts +11 -0
  157. package/dist/features/toolbar/ApiReferenceToolbarConfigTheme.vue.d.ts.map +1 -0
  158. package/dist/features/toolbar/ApiReferenceToolbarConfigTheme.vue.js +41 -0
  159. package/dist/features/toolbar/ApiReferenceToolbarConfigTheme.vue2.js +4 -0
  160. package/dist/features/toolbar/ApiReferenceToolbarPopover.vue.d.ts +26 -0
  161. package/dist/features/toolbar/ApiReferenceToolbarPopover.vue.d.ts.map +1 -0
  162. package/dist/features/toolbar/ApiReferenceToolbarPopover.vue.js +46 -0
  163. package/dist/features/toolbar/ApiReferenceToolbarPopover.vue2.js +4 -0
  164. package/dist/features/toolbar/ApiReferenceToolbarRegisterButton.vue.d.ts +25 -0
  165. package/dist/features/toolbar/ApiReferenceToolbarRegisterButton.vue.d.ts.map +1 -0
  166. package/dist/features/toolbar/ApiReferenceToolbarRegisterButton.vue.js +58 -0
  167. package/dist/features/toolbar/ApiReferenceToolbarRegisterButton.vue2.js +4 -0
  168. package/dist/features/toolbar/ApiReferenceToolbarSdks.vue.d.ts +7 -0
  169. package/dist/features/toolbar/ApiReferenceToolbarSdks.vue.d.ts.map +1 -0
  170. package/dist/features/toolbar/ApiReferenceToolbarSdks.vue.js +84 -0
  171. package/dist/features/toolbar/ApiReferenceToolbarSdks.vue2.js +4 -0
  172. package/dist/features/toolbar/ApiReferenceToolbarShare.vue.d.ts +7 -0
  173. package/dist/features/toolbar/ApiReferenceToolbarShare.vue.d.ts.map +1 -0
  174. package/dist/features/toolbar/ApiReferenceToolbarShare.vue.js +42 -0
  175. package/dist/features/toolbar/ApiReferenceToolbarShare.vue2.js +4 -0
  176. package/dist/features/toolbar/ApiReferenceToolbarShareRegister.vue.d.ts +7 -0
  177. package/dist/features/toolbar/ApiReferenceToolbarShareRegister.vue.d.ts.map +1 -0
  178. package/dist/features/toolbar/ApiReferenceToolbarShareRegister.vue.js +56 -0
  179. package/dist/features/toolbar/ApiReferenceToolbarShareRegister.vue2.js +4 -0
  180. package/dist/{v2/blocks/scalar-request-example-block/components/ExamplePicker.vue.d.ts → features/toolbar/ApiReferenceToolbarShareTemporary.vue.d.ts} +6 -6
  181. package/dist/features/toolbar/ApiReferenceToolbarShareTemporary.vue.d.ts.map +1 -0
  182. package/dist/features/toolbar/ApiReferenceToolbarShareTemporary.vue.js +83 -0
  183. package/dist/features/toolbar/ApiReferenceToolbarShareTemporary.vue2.js +4 -0
  184. package/dist/features/toolbar/ApiReferenceToolbarTitle.vue.d.ts +3 -0
  185. package/dist/features/toolbar/ApiReferenceToolbarTitle.vue.d.ts.map +1 -0
  186. package/dist/features/toolbar/ApiReferenceToolbarTitle.vue.js +51 -0
  187. package/dist/features/toolbar/ApiReferenceToolbarTitle.vue2.js +4 -0
  188. package/dist/features/toolbar/uploadTempDocument.d.ts +3 -0
  189. package/dist/features/toolbar/uploadTempDocument.d.ts.map +1 -0
  190. package/dist/features/toolbar/uploadTempDocument.js +21 -0
  191. package/dist/helpers/test-utils.d.ts +3 -365
  192. package/dist/helpers/test-utils.d.ts.map +1 -1
  193. package/dist/hooks/useNavState.d.ts +4 -2
  194. package/dist/hooks/useNavState.d.ts.map +1 -1
  195. package/dist/hooks/useNavState.js +31 -27
  196. package/dist/index.d.ts +1 -0
  197. package/dist/index.d.ts.map +1 -1
  198. package/dist/index.js +21 -19
  199. package/dist/style.css +1 -1
  200. package/dist/types.d.ts.map +1 -1
  201. package/dist/v2/ApiReferenceWorkspace.vue.d.ts +6 -6
  202. package/dist/v2/ApiReferenceWorkspace.vue.d.ts.map +1 -1
  203. package/dist/v2/ApiReferenceWorkspace.vue.js +93 -79
  204. package/dist/v2/blocks/scalar-client-selector-block/components/ClientDropdown.vue.d.ts +1 -1
  205. package/dist/v2/blocks/scalar-client-selector-block/components/ClientDropdown.vue.d.ts.map +1 -1
  206. package/dist/v2/blocks/scalar-client-selector-block/components/ClientDropdown.vue.js +2 -2
  207. package/dist/v2/blocks/scalar-client-selector-block/components/ClientDropdown.vue2.js +11 -11
  208. package/dist/v2/blocks/scalar-client-selector-block/components/ClientSelector.vue.d.ts +2 -2
  209. package/dist/v2/blocks/scalar-client-selector-block/components/ClientSelector.vue.d.ts.map +1 -1
  210. package/dist/v2/blocks/scalar-client-selector-block/components/ClientSelector.vue.js +2 -2
  211. package/dist/v2/blocks/scalar-client-selector-block/components/ClientSelector.vue2.js +10 -10
  212. package/dist/v2/blocks/scalar-client-selector-block/helpers/featured-clients.d.ts +1 -1
  213. package/dist/v2/blocks/scalar-client-selector-block/helpers/featured-clients.d.ts.map +1 -1
  214. package/dist/v2/blocks/scalar-info-block/components/DownloadLink.vue.d.ts +3 -0
  215. package/dist/v2/blocks/scalar-info-block/components/DownloadLink.vue.d.ts.map +1 -1
  216. package/dist/v2/blocks/scalar-info-block/components/DownloadLink.vue.js +2 -2
  217. package/dist/v2/blocks/scalar-info-block/components/DownloadLink.vue2.js +32 -31
  218. package/dist/v2/blocks/scalar-info-block/components/InfoBlock.vue.d.ts +15 -8
  219. package/dist/v2/blocks/scalar-info-block/components/InfoBlock.vue.d.ts.map +1 -1
  220. package/dist/v2/blocks/scalar-info-block/components/InfoBlock.vue.js +25 -20
  221. package/dist/v2/blocks/scalar-info-block/components/IntroductionLayout.vue.d.ts +8 -7
  222. package/dist/v2/blocks/scalar-info-block/components/IntroductionLayout.vue.d.ts.map +1 -1
  223. package/dist/v2/blocks/scalar-info-block/components/IntroductionLayout.vue.js +1 -1
  224. package/dist/v2/blocks/scalar-info-block/components/IntroductionLayout.vue2.js +27 -32
  225. package/dist/v2/blocks/scalar-server-selector-block/components/Selector.vue.d.ts +2 -22
  226. package/dist/v2/blocks/scalar-server-selector-block/components/Selector.vue.d.ts.map +1 -1
  227. package/dist/v2/blocks/scalar-sidebar-block/components/SidebarBlock.vue.d.ts +8 -0
  228. package/dist/v2/blocks/scalar-sidebar-block/components/SidebarBlock.vue.d.ts.map +1 -1
  229. package/dist/v2/blocks/scalar-sidebar-block/components/SidebarBlock.vue.js +2 -2
  230. package/dist/v2/blocks/scalar-sidebar-block/components/SidebarBlock.vue2.js +70 -65
  231. package/dist/v2/blocks/scalar-sidebar-block/components/SidebarElement.vue.d.ts +9 -1
  232. package/dist/v2/blocks/scalar-sidebar-block/components/SidebarElement.vue.d.ts.map +1 -1
  233. package/dist/v2/blocks/scalar-sidebar-block/components/SidebarElement.vue.js +2 -2
  234. package/dist/v2/blocks/scalar-sidebar-block/components/SidebarElement.vue2.js +60 -57
  235. package/dist/v2/blocks/scalar-sidebar-block/helpers/create-sidebar.d.ts +3 -365
  236. package/dist/v2/blocks/scalar-sidebar-block/helpers/create-sidebar.d.ts.map +1 -1
  237. package/dist/v2/blocks/scalar-sidebar-block/helpers/generate-reverse-index.d.ts +3 -183
  238. package/dist/v2/blocks/scalar-sidebar-block/helpers/generate-reverse-index.d.ts.map +1 -1
  239. package/dist/v2/helpers/map-configuration.d.ts +22 -22
  240. package/dist/v2/helpers/map-configuration.d.ts.map +1 -1
  241. package/package.json +21 -18
  242. package/dist/components/Content/Operations/TraversedEntryContainer.vue.d.ts +0 -13
  243. package/dist/components/Content/Operations/TraversedEntryContainer.vue.d.ts.map +0 -1
  244. package/dist/components/Content/Operations/TraversedEntryContainer.vue.js +0 -52
  245. package/dist/components/Content/Operations/TraversedEntryContainer.vue2.js +0 -4
  246. package/dist/components/Content/Operations/index.d.ts +0 -2
  247. package/dist/components/Content/Operations/index.d.ts.map +0 -1
  248. package/dist/hooks/useConfig.d.ts +0 -9
  249. package/dist/hooks/useConfig.d.ts.map +0 -1
  250. package/dist/hooks/useConfig.js +0 -10
  251. package/dist/legacy/stores/index.d.ts +0 -2
  252. package/dist/legacy/stores/index.d.ts.map +0 -1
  253. package/dist/legacy/stores/useExampleStore.d.ts +0 -5
  254. package/dist/legacy/stores/useExampleStore.d.ts.map +0 -1
  255. package/dist/legacy/stores/useExampleStore.js +0 -8
  256. package/dist/v2/blocks/scalar-request-example-block/components/ExamplePicker.vue.d.ts.map +0 -1
  257. package/dist/v2/blocks/scalar-request-example-block/components/ExamplePicker.vue.js +0 -4
  258. package/dist/v2/blocks/scalar-request-example-block/components/ExamplePicker.vue2.js +0 -55
  259. package/dist/v2/blocks/scalar-request-example-block/components/RequestExample.vue.d.ts +0 -79
  260. package/dist/v2/blocks/scalar-request-example-block/components/RequestExample.vue.d.ts.map +0 -1
  261. package/dist/v2/blocks/scalar-request-example-block/components/RequestExample.vue.js +0 -7
  262. package/dist/v2/blocks/scalar-request-example-block/components/RequestExample.vue2.js +0 -236
  263. package/dist/v2/blocks/scalar-request-example-block/helpers/find-client.d.ts +0 -41
  264. package/dist/v2/blocks/scalar-request-example-block/helpers/find-client.d.ts.map +0 -1
  265. package/dist/v2/blocks/scalar-request-example-block/helpers/find-client.js +0 -22
  266. package/dist/v2/blocks/scalar-request-example-block/helpers/generate-client-options.d.ts +0 -20
  267. package/dist/v2/blocks/scalar-request-example-block/helpers/generate-client-options.d.ts.map +0 -1
  268. package/dist/v2/blocks/scalar-request-example-block/helpers/generate-client-options.js +0 -33
  269. package/dist/v2/blocks/scalar-request-example-block/helpers/generate-code-snippet.d.ts +0 -17
  270. package/dist/v2/blocks/scalar-request-example-block/helpers/generate-code-snippet.d.ts.map +0 -1
  271. package/dist/v2/blocks/scalar-request-example-block/helpers/generate-code-snippet.js +0 -26
  272. package/dist/v2/blocks/scalar-request-example-block/helpers/get-secrets.d.ts +0 -4
  273. package/dist/v2/blocks/scalar-request-example-block/helpers/get-secrets.d.ts.map +0 -1
  274. package/dist/v2/blocks/scalar-request-example-block/helpers/get-secrets.js +0 -10
  275. package/dist/v2/blocks/scalar-request-example-block/index.d.ts +0 -3
  276. package/dist/v2/blocks/scalar-request-example-block/index.d.ts.map +0 -1
  277. package/dist/v2/blocks/scalar-request-example-block/types.d.ts +0 -29
  278. package/dist/v2/blocks/scalar-request-example-block/types.d.ts.map +0 -1
@@ -1,15 +1,20 @@
1
- import type { NavState } from '../../hooks/useNavState.js';
2
- import { type AnyApiReferenceConfiguration, type ApiReferenceConfiguration, type SpecConfiguration } from '@scalar/types/api-reference';
3
- import { type Ref } from 'vue';
1
+ import { type AnyApiReferenceConfiguration, type ApiReferenceConfiguration, type SpecConfiguration, apiReferenceConfigurationSchema } from '@scalar/types/api-reference';
2
+ import { type ComputedRef, type Ref } from 'vue';
3
+ import type { z } from 'zod';
4
4
  type UseMultipleDocumentsProps = {
5
5
  /**
6
6
  * Configuration for the API reference.
7
7
  * Can be a single configuration or an array of configurations for multiple documents.
8
8
  */
9
9
  configuration: Ref<AnyApiReferenceConfiguration | undefined>;
10
+ /** Configuration options to apply over the currently selected configuration */
11
+ configurationOverrides?: Ref<Partial<ApiReferenceConfiguration> | undefined>;
10
12
  /** The initial index to pre-select a document, if there is no query parameter available */
11
13
  initialIndex?: number;
12
- } & NavState;
14
+ isIntersectionEnabled: Ref<boolean>;
15
+ hash: Ref<string>;
16
+ hashPrefix: Ref<string>;
17
+ };
13
18
  /**
14
19
  * Take any configuration and return a flat array of configurations.
15
20
  */
@@ -19,8 +24,8 @@ export declare const normalizeConfigurations: (configuration: AnyApiReferenceCon
19
24
  *
20
25
  * @deprecated
21
26
  */
22
- export declare const useMultipleDocuments: ({ configuration, initialIndex, isIntersectionEnabled, hash, hashPrefix, }: UseMultipleDocumentsProps) => {
23
- selectedConfiguration: Ref<Partial<ApiReferenceConfiguration> & SpecConfiguration>;
27
+ export declare const useMultipleDocuments: ({ configuration, configurationOverrides, initialIndex, isIntersectionEnabled, hash, hashPrefix, }: UseMultipleDocumentsProps) => {
28
+ selectedConfiguration: ComputedRef<z.infer<typeof apiReferenceConfigurationSchema>>;
24
29
  availableDocuments: Ref<SpecConfiguration[]>;
25
30
  selectedDocumentIndex: Ref<number>;
26
31
  isIntersectionEnabled: Ref<boolean>;
@@ -1 +1 @@
1
- {"version":3,"file":"useMultipleDocuments.d.ts","sourceRoot":"","sources":["../../../src/features/multiple-documents/useMultipleDocuments.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAA;AAEnD,OAAO,EACL,KAAK,4BAA4B,EACjC,KAAK,yBAAyB,EAC9B,KAAK,iBAAiB,EAEvB,MAAM,6BAA6B,CAAA;AAGpC,OAAO,EAAE,KAAK,GAAG,EAAwB,MAAM,KAAK,CAAA;AAKpD,KAAK,yBAAyB,GAAG;IAC/B;;;OAGG;IACH,aAAa,EAAE,GAAG,CAAC,4BAA4B,GAAG,SAAS,CAAC,CAAA;IAC5D,2FAA2F;IAC3F,YAAY,CAAC,EAAE,MAAM,CAAA;CACtB,GAAG,QAAQ,CAAA;AAIZ;;GAEG;AACH,eAAO,MAAM,uBAAuB,GAClC,eAAe,4BAA4B,GAAG,SAAS,KACtD,iBAAiB,EA6BnB,CAAA;AA0CD;;;;GAIG;AACH,eAAO,MAAM,oBAAoB,GAAI,2EAMlC,yBAAyB,KAAG;IAC7B,qBAAqB,EAAE,GAAG,CAAC,OAAO,CAAC,yBAAyB,CAAC,GAAG,iBAAiB,CAAC,CAAA;IAClF,kBAAkB,EAAE,GAAG,CAAC,iBAAiB,EAAE,CAAC,CAAA;IAC5C,qBAAqB,EAAE,GAAG,CAAC,MAAM,CAAC,CAAA;IAClC,qBAAqB,EAAE,GAAG,CAAC,OAAO,CAAC,CAAA;IACnC,IAAI,EAAE,GAAG,CAAC,MAAM,CAAC,CAAA;IACjB,UAAU,EAAE,GAAG,CAAC,MAAM,CAAC,CAAA;CAmIxB,CAAA"}
1
+ {"version":3,"file":"useMultipleDocuments.d.ts","sourceRoot":"","sources":["../../../src/features/multiple-documents/useMultipleDocuments.ts"],"names":[],"mappings":"AACA,OAAO,EACL,KAAK,4BAA4B,EACjC,KAAK,yBAAyB,EAC9B,KAAK,iBAAiB,EACtB,+BAA+B,EAEhC,MAAM,6BAA6B,CAAA;AAEpC,OAAO,EAAE,KAAK,WAAW,EAAE,KAAK,GAAG,EAAwB,MAAM,KAAK,CAAA;AACtE,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAK5B,KAAK,yBAAyB,GAAG;IAC/B;;;OAGG;IACH,aAAa,EAAE,GAAG,CAAC,4BAA4B,GAAG,SAAS,CAAC,CAAA;IAC5D,+EAA+E;IAC/E,sBAAsB,CAAC,EAAE,GAAG,CAAC,OAAO,CAAC,yBAAyB,CAAC,GAAG,SAAS,CAAC,CAAA;IAC5E,2FAA2F;IAC3F,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,qBAAqB,EAAE,GAAG,CAAC,OAAO,CAAC,CAAA;IACnC,IAAI,EAAE,GAAG,CAAC,MAAM,CAAC,CAAA;IACjB,UAAU,EAAE,GAAG,CAAC,MAAM,CAAC,CAAA;CACxB,CAAA;AAID;;GAEG;AACH,eAAO,MAAM,uBAAuB,GAClC,eAAe,4BAA4B,GAAG,SAAS,KACtD,iBAAiB,EA6BnB,CAAA;AA0CD;;;;GAIG;AACH,eAAO,MAAM,oBAAoB,GAAI,mGAOlC,yBAAyB,KAAG;IAC7B,qBAAqB,EAAE,WAAW,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,+BAA+B,CAAC,CAAC,CAAA;IACnF,kBAAkB,EAAE,GAAG,CAAC,iBAAiB,EAAE,CAAC,CAAA;IAC5C,qBAAqB,EAAE,GAAG,CAAC,MAAM,CAAC,CAAA;IAClC,qBAAqB,EAAE,GAAG,CAAC,OAAO,CAAC,CAAA;IACnC,IAAI,EAAE,GAAG,CAAC,MAAM,CAAC,CAAA;IACjB,UAAU,EAAE,GAAG,CAAC,MAAM,CAAC,CAAA;CAwIxB,CAAA"}
@@ -1,82 +1,91 @@
1
- import { isDefined as S } from "@scalar/oas-utils/helpers";
2
- import { isConfigurationWithSources as w } from "@scalar/types/api-reference";
3
- import y from "github-slugger";
4
- import { computed as m, ref as R, watch as b } from "vue";
5
- const v = "api", g = new y(), A = (t) => t ? (Array.isArray(t) ? t : [t]).flatMap((r) => {
6
- if (w(r)) {
7
- const { sources: o, ...n } = r;
8
- return o?.map((p) => ({ ...n, ...p })) ?? [];
1
+ import { isDefined as y } from "@scalar/oas-utils/helpers";
2
+ import { isConfigurationWithSources as h, apiReferenceConfigurationSchema as v } from "@scalar/types/api-reference";
3
+ import R from "github-slugger";
4
+ import { computed as m, ref as D, watch as b } from "vue";
5
+ const g = "api", w = new R(), A = (t) => t ? (Array.isArray(t) ? t : [t]).flatMap((u) => {
6
+ if (h(u)) {
7
+ const { sources: o, ...f } = u;
8
+ return o?.map((n) => ({ ...f, ...n })) ?? [];
9
9
  }
10
- return [r];
11
- }).map((r, o) => r && D(r, o)).filter(S) : [], D = (t, u = 0) => {
10
+ return [u];
11
+ }).map((u, o) => u && C(u, o)).filter(y) : [], C = (t, i = 0) => {
12
12
  const e = {
13
13
  ...t,
14
14
  // @ts-expect-error this is before parsing so we transform the old style
15
15
  ...t.spec ?? {}
16
16
  };
17
17
  if (!(!e?.url && !e?.content))
18
- return g.reset(), e.title ? {
18
+ return w.reset(), e.title ? {
19
19
  ...e,
20
- slug: e.slug || g.slug(e.title),
20
+ slug: e.slug || w.slug(e.title),
21
21
  title: e.title
22
22
  } : e.slug ? {
23
23
  ...e,
24
24
  title: e.slug
25
25
  } : {
26
26
  ...e,
27
- slug: `api-${u + 1}`,
28
- title: `API #${u + 1}`
27
+ slug: `api-${i + 1}`,
28
+ title: `API #${i + 1}`
29
29
  };
30
- }, N = ({
30
+ }, U = ({
31
31
  configuration: t,
32
- initialIndex: u,
33
- isIntersectionEnabled: e,
34
- hash: r,
35
- hashPrefix: o
32
+ configurationOverrides: i,
33
+ initialIndex: e,
34
+ isIntersectionEnabled: u,
35
+ hash: o,
36
+ hashPrefix: f
36
37
  }) => {
37
- const n = m(() => A(t.value)), a = R((() => {
38
+ const n = m(() => A(t.value)), s = D((() => {
38
39
  if (typeof window > "u")
39
- return typeof u == "number" ? u : 0;
40
- const l = new URL(window.location.href).searchParams.get(v);
41
- if (l) {
42
- const s = n.value.findIndex((h) => h.slug === l);
43
- if (s !== -1)
44
- return s;
45
- const d = Number.parseInt(l, 10);
40
+ return typeof e == "number" ? e : 0;
41
+ const r = new URL(window.location.href).searchParams.get(g);
42
+ if (r) {
43
+ const l = n.value.findIndex((S) => S.slug === r);
44
+ if (l !== -1)
45
+ return l;
46
+ const d = Number.parseInt(r, 10);
46
47
  if (!isNaN(d) && d >= 0 && d < n.value.length)
47
48
  return d;
48
49
  }
49
- const c = n.value.findIndex((s) => "default" in s && s.default === !0);
50
- return c !== -1 ? c : typeof u == "number" ? u : 0;
51
- })()), i = m(() => t.value && w(t.value) ? {
52
- ...t.value,
53
- ...t.value?.sources?.[a.value],
54
- ...n.value[a.value]
55
- } : {
56
- ...[t.value].flat()[a.value] ?? {},
57
- ...n.value[a.value]
50
+ const p = n.value.findIndex((l) => "default" in l && l.default === !0);
51
+ return p !== -1 ? p : typeof e == "number" ? e : 0;
52
+ })()), c = m(() => {
53
+ const a = i?.value ?? {};
54
+ if (t.value && h(t.value))
55
+ return v.parse({
56
+ ...t.value,
57
+ ...t.value?.sources?.[s.value],
58
+ ...n.value[s.value],
59
+ ...a
60
+ });
61
+ const r = [t.value].flat()[s.value] ?? {};
62
+ return v.parse({
63
+ ...r,
64
+ ...n.value[s.value],
65
+ ...a
66
+ });
58
67
  });
59
68
  return b(
60
- a,
61
- (f) => {
69
+ s,
70
+ (a) => {
62
71
  if (typeof window > "u" || n.value.length === 1)
63
72
  return;
64
- const l = new URL(window.location.href), c = n.value[f];
65
- i.value.pathRouting && (l.pathname = i.value.pathRouting?.basePath ?? "");
66
- const s = c?.slug ?? f.toString();
67
- l.searchParams.set(v, s), l.hash = "", window.history.replaceState({}, "", l.toString()), r.value = "", o.value = "", e.value = !1, typeof window < "u" && window.scrollTo({ top: 0, behavior: "instant" }), i.value.onDocumentSelect?.();
73
+ const r = new URL(window.location.href), p = n.value[a];
74
+ c.value.pathRouting && (r.pathname = c.value.pathRouting?.basePath ?? "");
75
+ const l = p?.slug ?? a.toString();
76
+ r.searchParams.set(g, l), r.hash = "", window.history.replaceState({}, "", r.toString()), o.value = "", f.value = "", u.value = !1, typeof window < "u" && window.scrollTo({ top: 0, behavior: "instant" }), typeof c.value.onDocumentSelect == "function" && c.value.onDocumentSelect?.();
68
77
  },
69
78
  { flush: "sync" }
70
79
  ), {
71
- selectedConfiguration: i,
80
+ selectedConfiguration: c,
72
81
  availableDocuments: n,
73
- selectedDocumentIndex: a,
74
- isIntersectionEnabled: e,
75
- hash: r,
76
- hashPrefix: o
82
+ selectedDocumentIndex: s,
83
+ isIntersectionEnabled: u,
84
+ hash: o,
85
+ hashPrefix: f
77
86
  };
78
87
  };
79
88
  export {
80
89
  A as normalizeConfigurations,
81
- N as useMultipleDocuments
90
+ U as useMultipleDocuments
82
91
  };
@@ -1 +1 @@
1
- {"version":3,"file":"TestRequestButton.vue.d.ts","sourceRoot":"","sources":["../../../src/features/test-request-button/TestRequestButton.vue"],"names":[],"mappings":"AAmFA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mCAAmC,CAAA;AAQnE,KAAK,WAAW,GAAG;IACjB,MAAM,EAAE,UAAU,CAAA;IAClB,IAAI,EAAE,MAAM,CAAA;CACb,CAAC;;AA0FF,wBAMG"}
1
+ {"version":3,"file":"TestRequestButton.vue.d.ts","sourceRoot":"","sources":["../../../src/features/test-request-button/TestRequestButton.vue"],"names":[],"mappings":"AAyEA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mCAAmC,CAAA;AAMnE,KAAK,WAAW,GAAG;IACjB,MAAM,EAAE,UAAU,CAAA;IAClB,IAAI,EAAE,MAAM,CAAA;CACb,CAAC;;AAgFF,wBAMG"}
@@ -1,7 +1,7 @@
1
1
  import t from "./TestRequestButton.vue2.js";
2
2
  /* empty css */
3
3
  import o from "../../_virtual/_plugin-vue_export-helper.js";
4
- const c = /* @__PURE__ */ o(t, [["__scopeId", "data-v-976c9c1f"]]);
4
+ const a = /* @__PURE__ */ o(t, [["__scopeId", "data-v-53a06e4f"]]);
5
5
  export {
6
- c as default
6
+ a as default
7
7
  };
@@ -1,46 +1,40 @@
1
- import { defineComponent as c, computed as d, createElementBlock as n, openBlock as i, withModifiers as h, createVNode as s, createElementVNode as f, unref as k, withCtx as C, createTextVNode as l, toDisplayString as r, Fragment as g } from "vue";
2
- import { ScalarIconPlay as y } from "@scalar/icons";
3
- import B from "../../components/ScreenReader.vue.js";
4
- import { useConfig as b } from "../../hooks/useConfig.js";
5
- import { useApiClient as w } from "../api-client-modal/useApiClient.js";
6
- const R = ["method"], S = /* @__PURE__ */ c({
1
+ import { defineComponent as r, createElementBlock as s, openBlock as m, withModifiers as p, createVNode as n, createElementVNode as d, unref as c, withCtx as h, createTextVNode as u, toDisplayString as l } from "vue";
2
+ import { ScalarIconPlay as f } from "@scalar/icons";
3
+ import C from "../../components/ScreenReader.vue.js";
4
+ import { useApiClient as k } from "../api-client-modal/useApiClient.js";
5
+ const w = ["method"], R = /* @__PURE__ */ r({
7
6
  __name: "TestRequestButton",
8
7
  props: {
9
8
  method: {},
10
9
  path: {}
11
10
  },
12
11
  setup(t) {
13
- const { client: a } = w(), m = b(), u = d(
14
- () => m.value.hideTestRequestButton !== !0
15
- ), p = () => {
12
+ const { client: a } = k(), i = () => {
16
13
  a.value?.open({
17
14
  method: t.method,
18
15
  path: t.path
19
16
  });
20
17
  };
21
- return (e, o) => u.value ? (i(), n("button", {
22
- key: 0,
18
+ return (e, o) => (m(), s("button", {
23
19
  class: "show-api-client-button",
24
20
  method: e.method,
25
21
  type: "button",
26
- onClick: h(p, ["stop"])
22
+ onClick: p(i, ["stop"])
27
23
  }, [
28
- s(k(y), {
24
+ n(c(f), {
29
25
  class: "size-3",
30
26
  weight: "fill"
31
27
  }),
32
- o[0] || (o[0] = f("span", null, "Test Request", -1)),
33
- s(B, null, {
34
- default: C(() => [
35
- l("(" + r(e.method) + " " + r(e.path) + ")", 1)
28
+ o[0] || (o[0] = d("span", null, "Test Request", -1)),
29
+ n(C, null, {
30
+ default: h(() => [
31
+ u("(" + l(e.method) + " " + l(e.path) + ")", 1)
36
32
  ]),
37
33
  _: 1
38
34
  })
39
- ], 8, R)) : (i(), n(g, { key: 1 }, [
40
- l(" ")
41
- ], 64));
35
+ ], 8, w));
42
36
  }
43
37
  });
44
38
  export {
45
- S as default
39
+ R as default
46
40
  };
@@ -0,0 +1,16 @@
1
+ import type { ApiReferenceConfiguration } from '@scalar/types';
2
+ import type { WorkspaceStore } from '@scalar/workspace-store/client';
3
+ type __VLS_Props = {
4
+ workspace?: WorkspaceStore;
5
+ configuration?: Partial<ApiReferenceConfiguration>;
6
+ };
7
+ type __VLS_PublicProps = __VLS_Props & {
8
+ 'overrides'?: Partial<ApiReferenceConfiguration>;
9
+ };
10
+ declare const _default: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
11
+ "update:overrides": (value: Partial<ApiReferenceConfiguration> | undefined) => any;
12
+ }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
13
+ "onUpdate:overrides"?: ((value: Partial<ApiReferenceConfiguration> | undefined) => any) | undefined;
14
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
15
+ export default _default;
16
+ //# sourceMappingURL=ApiReferenceToolbar.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ApiReferenceToolbar.vue.d.ts","sourceRoot":"","sources":["../../../src/features/toolbar/ApiReferenceToolbar.vue"],"names":[],"mappings":"AAyDA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,eAAe,CAAA;AAC9D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAA;AAQpE,KAAK,WAAW,GAAG;IACjB,SAAS,CAAC,EAAE,cAAc,CAAA;IAC1B,aAAa,CAAC,EAAE,OAAO,CAAC,yBAAyB,CAAC,CAAA;CACnD,CAAC;AAyBF,KAAK,iBAAiB,GAAG,WAAW,GAAG;IACvC,WAAW,CAAC,EAAE,OAAO,CAAC,yBAAyB,CAAC,CAAC;CAChD,CAAC;;;;;;AAoGF,wBAOG"}
@@ -0,0 +1,43 @@
1
+ import { defineComponent as d, mergeModels as m, useModel as u, computed as p, createElementBlock as n, createCommentVNode as s, openBlock as a, createElementVNode as c, createVNode as o, Fragment as w } from "vue";
2
+ import { isLocalUrl as v } from "@scalar/helpers/url/is-local-url";
3
+ import k from "./ApiReferenceToolbarConfig.vue.js";
4
+ import b from "./ApiReferenceToolbarSdks.vue.js";
5
+ import h from "./ApiReferenceToolbarShare.vue.js";
6
+ import _ from "./ApiReferenceToolbarTitle.vue.js";
7
+ const g = {
8
+ key: 0,
9
+ "aria-label": "Developer Tools",
10
+ class: "api-reference-toolbar h-header bg-b-1 sticky top-0 z-10 flex justify-center border-b px-15"
11
+ }, x = { class: "-mx-2 flex max-w-(--refs-content-max-width) flex-1 items-center" }, y = { class: "flex flex-1 items-center" }, C = /* @__PURE__ */ d({
12
+ __name: "ApiReferenceToolbar",
13
+ props: /* @__PURE__ */ m({
14
+ workspace: {},
15
+ configuration: {}
16
+ }, {
17
+ overrides: {},
18
+ overridesModifiers: {}
19
+ }),
20
+ emits: ["update:overrides"],
21
+ setup(r) {
22
+ const t = u(r, "overrides"), l = p(() => r.configuration?.showToolbar === "always" ? !0 : r.configuration?.showToolbar === "never" || typeof window > "u" ? !1 : v(window.location.href));
23
+ return (e, i) => l.value ? (a(), n("header", g, [
24
+ c("div", x, [
25
+ c("div", y, [
26
+ o(_)
27
+ ]),
28
+ e.workspace ? (a(), n(w, { key: 0 }, [
29
+ o(h, { workspace: e.workspace }, null, 8, ["workspace"]),
30
+ o(b, { workspace: e.workspace }, null, 8, ["workspace"])
31
+ ], 64)) : s("", !0),
32
+ o(k, {
33
+ overrides: t.value,
34
+ "onUpdate:overrides": i[0] || (i[0] = (f) => t.value = f),
35
+ configuration: e.configuration
36
+ }, null, 8, ["overrides", "configuration"])
37
+ ])
38
+ ])) : s("", !0);
39
+ }
40
+ });
41
+ export {
42
+ C as default
43
+ };
@@ -0,0 +1,4 @@
1
+ import f from "./ApiReferenceToolbar.vue.js";
2
+ export {
3
+ f as default
4
+ };
@@ -0,0 +1,13 @@
1
+ declare var __VLS_1: {};
2
+ type __VLS_Slots = {} & {
3
+ default?: (props: typeof __VLS_1) => any;
4
+ };
5
+ declare const __VLS_component: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
6
+ declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
7
+ export default _default;
8
+ type __VLS_WithSlots<T, S> = T & {
9
+ new (): {
10
+ $slots: S;
11
+ };
12
+ };
13
+ //# sourceMappingURL=ApiReferenceToolbarBlurb.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ApiReferenceToolbarBlurb.vue.d.ts","sourceRoot":"","sources":["../../../src/features/toolbar/ApiReferenceToolbarBlurb.vue"],"names":[],"mappings":"AA6BA,QAAA,IAAI,OAAO,IAAW,CAAE;AACxB,KAAK,WAAW,GAAG,EAAE,GACnB;IAAE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,OAAO,KAAK,GAAG,CAAA;CAAE,CAAC;AAkB/C,QAAA,MAAM,eAAe,+QAKnB,CAAC;wBACkB,eAAe,CAAC,OAAO,eAAe,EAAE,WAAW,CAAC;AAAzE,wBAA0E;AAE1E,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
@@ -0,0 +1,12 @@
1
+ import { createElementBlock as t, openBlock as o, renderSlot as r } from "vue";
2
+ import c from "../../_virtual/_plugin-vue_export-helper.js";
3
+ const n = {}, l = { class: "text-c-3 [&_code]:font-code [&_a:hover]:text-c-1 text-center leading-normal [&_a]:underline" };
4
+ function a(e, s) {
5
+ return o(), t("p", l, [
6
+ r(e.$slots, "default")
7
+ ]);
8
+ }
9
+ const f = /* @__PURE__ */ c(n, [["render", a]]);
10
+ export {
11
+ f as default
12
+ };
@@ -0,0 +1,14 @@
1
+ import type { ApiReferenceConfiguration } from '@scalar/types';
2
+ type __VLS_Props = {
3
+ configuration?: Partial<ApiReferenceConfiguration>;
4
+ };
5
+ type __VLS_PublicProps = __VLS_Props & {
6
+ 'overrides'?: Partial<ApiReferenceConfiguration>;
7
+ };
8
+ declare const _default: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
9
+ "update:overrides": (value: Partial<ApiReferenceConfiguration> | undefined) => any;
10
+ }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
11
+ "onUpdate:overrides"?: ((value: Partial<ApiReferenceConfiguration> | undefined) => any) | undefined;
12
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
13
+ export default _default;
14
+ //# sourceMappingURL=ApiReferenceToolbarConfig.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ApiReferenceToolbarConfig.vue.d.ts","sourceRoot":"","sources":["../../../src/features/toolbar/ApiReferenceToolbarConfig.vue"],"names":[],"mappings":"AA6EA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,eAAe,CAAA;AAQ9D,KAAK,WAAW,GAAG;IACjB,aAAa,CAAC,EAAE,OAAO,CAAC,yBAAyB,CAAC,CAAA;CACnD,CAAC;AA2BF,KAAK,iBAAiB,GAAG,WAAW,GAAG;IACvC,WAAW,CAAC,EAAE,OAAO,CAAC,yBAAyB,CAAC,CAAC;CAChD,CAAC;;;;;;AA4JF,wBAOG"}
@@ -0,0 +1,95 @@
1
+ import { defineComponent as p, mergeModels as g, useModel as V, computed as m, createBlock as b, openBlock as c, withCtx as l, createVNode as t, createElementVNode as x, unref as u, createTextVNode as r } from "vue";
2
+ import { ScalarFormSection as y, ScalarCodeBlock as C, ScalarFormField as d } from "@scalar/components";
3
+ import { prettyPrintJson as S } from "@scalar/oas-utils/helpers";
4
+ import $ from "./ApiReferenceToolbarConfigLayout.vue.js";
5
+ import k from "./ApiReferenceToolbarConfigLayoutOptions.vue.js";
6
+ import B from "./ApiReferenceToolbarConfigTheme.vue.js";
7
+ import F from "./ApiReferenceToolbarPopover.vue.js";
8
+ const M = { class: "flex flex-col gap-4" }, E = /* @__PURE__ */ p({
9
+ __name: "ApiReferenceToolbarConfig",
10
+ props: /* @__PURE__ */ g({
11
+ configuration: {}
12
+ }, {
13
+ overrides: {},
14
+ overridesModifiers: {}
15
+ }),
16
+ emits: ["update:overrides"],
17
+ setup(i) {
18
+ const o = V(i, "overrides"), v = m(() => S({
19
+ ...o.value,
20
+ // Make sure the overrides are first
21
+ ...i.configuration,
22
+ ...o.value
23
+ // But also that they override the configuration
24
+ })), f = m({
25
+ get: () => o.value?.theme ?? i.configuration?.theme ?? "default",
26
+ set: (a) => o.value = { ...o.value, theme: a }
27
+ }), s = m({
28
+ get: () => o.value?.layout ?? i.configuration?.layout ?? "modern",
29
+ set: (a) => o.value = { ...o.value, layout: a }
30
+ });
31
+ return (a, e) => (c(), b(F, { class: "w-120" }, {
32
+ label: l(() => e[3] || (e[3] = [
33
+ r("Configure")
34
+ ])),
35
+ default: l(() => [
36
+ t(u(y), null, {
37
+ label: l(() => e[4] || (e[4] = [
38
+ r("Scalar Configuration")
39
+ ])),
40
+ default: l(() => [
41
+ t(u(C), {
42
+ class: "bg-b-1.5 max-h-40 rounded border text-sm",
43
+ content: v.value,
44
+ lang: "json"
45
+ }, null, 8, ["content"])
46
+ ]),
47
+ _: 1
48
+ }),
49
+ x("div", M, [
50
+ t(u(d), null, {
51
+ label: l(() => e[5] || (e[5] = [
52
+ r("Theme")
53
+ ])),
54
+ default: l(() => [
55
+ t(B, {
56
+ modelValue: f.value,
57
+ "onUpdate:modelValue": e[0] || (e[0] = (n) => f.value = n)
58
+ }, null, 8, ["modelValue"])
59
+ ]),
60
+ _: 1
61
+ }),
62
+ t(u(d), null, {
63
+ label: l(() => e[6] || (e[6] = [
64
+ r("Layout")
65
+ ])),
66
+ default: l(() => [
67
+ t($, {
68
+ modelValue: s.value,
69
+ "onUpdate:modelValue": e[1] || (e[1] = (n) => s.value = n)
70
+ }, null, 8, ["modelValue"])
71
+ ]),
72
+ _: 1
73
+ }),
74
+ t(u(d), { is: "div" }, {
75
+ label: l(() => e[7] || (e[7] = [
76
+ r("Layout Options")
77
+ ])),
78
+ default: l(() => [
79
+ t(k, {
80
+ configuration: a.configuration,
81
+ modelValue: o.value,
82
+ "onUpdate:modelValue": e[2] || (e[2] = (n) => o.value = n)
83
+ }, null, 8, ["configuration", "modelValue"])
84
+ ]),
85
+ _: 1
86
+ })
87
+ ])
88
+ ]),
89
+ _: 1
90
+ }));
91
+ }
92
+ });
93
+ export {
94
+ E as default
95
+ };
@@ -0,0 +1,4 @@
1
+ import f from "./ApiReferenceToolbarConfig.vue.js";
2
+ export {
3
+ f as default
4
+ };
@@ -0,0 +1,10 @@
1
+ type __VLS_PublicProps = {
2
+ modelValue?: 'modern' | 'classic';
3
+ };
4
+ declare const _default: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
5
+ "update:modelValue": (value: "modern" | "classic" | undefined) => any;
6
+ }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
7
+ "onUpdate:modelValue"?: ((value: "modern" | "classic" | undefined) => any) | undefined;
8
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
9
+ export default _default;
10
+ //# sourceMappingURL=ApiReferenceToolbarConfigLayout.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ApiReferenceToolbarConfigLayout.vue.d.ts","sourceRoot":"","sources":["../../../src/features/toolbar/ApiReferenceToolbarConfigLayout.vue"],"names":[],"mappings":"AAsDA,KAAK,iBAAiB,GAAG;IACzB,UAAU,CAAC,EAAE,QAAQ,GAAG,SAAS,CAAC;CACjC,CAAC;;;;;;AA8CF,wBAOG"}
@@ -0,0 +1,27 @@
1
+ import { defineComponent as r, useModel as m, computed as c, createBlock as i, openBlock as p, unref as f } from "vue";
2
+ import { ScalarCheckboxRadioGroup as v } from "@scalar/components";
3
+ const b = /* @__PURE__ */ r({
4
+ __name: "ApiReferenceToolbarConfigLayout",
5
+ props: {
6
+ modelValue: {},
7
+ modelModifiers: {}
8
+ },
9
+ emits: ["update:modelValue"],
10
+ setup(u) {
11
+ const e = { label: "Modern", value: "modern" }, o = { label: "Classic", value: "classic" }, s = [
12
+ e,
13
+ o
14
+ ], l = m(u, "modelValue"), a = c({
15
+ get: () => l.value === "modern" ? e : o,
16
+ set: (t) => l.value = t.value
17
+ });
18
+ return (t, n) => (p(), i(f(v), {
19
+ modelValue: a.value,
20
+ "onUpdate:modelValue": n[0] || (n[0] = (d) => a.value = d),
21
+ options: s
22
+ }, null, 8, ["modelValue"]));
23
+ }
24
+ });
25
+ export {
26
+ b as default
27
+ };
@@ -0,0 +1,4 @@
1
+ import f from "./ApiReferenceToolbarConfigLayout.vue.js";
2
+ export {
3
+ f as default
4
+ };
@@ -0,0 +1,25 @@
1
+ import type { ApiReferenceConfiguration } from '@scalar/types';
2
+ type LayoutOptions = {
3
+ showSidebar?: boolean;
4
+ defaultOpenAllTags?: boolean;
5
+ expandAllModelSections?: boolean;
6
+ expandAllResponses?: boolean;
7
+ hideClientButton?: boolean;
8
+ hideDarkModeToggle?: boolean;
9
+ hideModels?: boolean;
10
+ hideSearch?: boolean;
11
+ hideTestRequestButton?: boolean;
12
+ };
13
+ type __VLS_Props = {
14
+ configuration?: Partial<ApiReferenceConfiguration>;
15
+ };
16
+ type __VLS_PublicProps = __VLS_Props & {
17
+ modelValue?: LayoutOptions;
18
+ };
19
+ declare const _default: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
20
+ "update:modelValue": (value: LayoutOptions) => any;
21
+ }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
22
+ "onUpdate:modelValue"?: ((value: LayoutOptions) => any) | undefined;
23
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
24
+ export default _default;
25
+ //# sourceMappingURL=ApiReferenceToolbarConfigLayoutOptions.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ApiReferenceToolbarConfigLayoutOptions.vue.d.ts","sourceRoot":"","sources":["../../../src/features/toolbar/ApiReferenceToolbarConfigLayoutOptions.vue"],"names":[],"mappings":"AA8FA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,eAAe,CAAA;AAE9D,KAAK,aAAa,GAAG;IACnB,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,kBAAkB,CAAC,EAAE,OAAO,CAAA;IAC5B,sBAAsB,CAAC,EAAE,OAAO,CAAA;IAChC,kBAAkB,CAAC,EAAE,OAAO,CAAA;IAC5B,gBAAgB,CAAC,EAAE,OAAO,CAAA;IAC1B,kBAAkB,CAAC,EAAE,OAAO,CAAA;IAC5B,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,qBAAqB,CAAC,EAAE,OAAO,CAAA;CAChC,CAAA;AAED,KAAK,WAAW,GAAG;IACjB,aAAa,CAAC,EAAE,OAAO,CAAC,yBAAyB,CAAC,CAAA;CACnD,CAAC;AA8BF,KAAK,iBAAiB,GAAG,WAAW,GAAG;IACvC,UAAU,CAAC,EAAE,aAAa,CAAC;CAC1B,CAAC;;;;;;AA8MF,wBAOG"}