@scalar/api-reference 1.57.2 → 1.57.3

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 (240) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/dist/blocks/scalar-client-selector-block/components/ClientDropdown.vue.d.ts.map +1 -1
  3. package/dist/blocks/scalar-client-selector-block/components/ClientDropdown.vue.js +1 -1
  4. package/dist/blocks/scalar-client-selector-block/components/ClientDropdown.vue.js.map +1 -1
  5. package/dist/blocks/scalar-client-selector-block/components/ClientDropdown.vue.script.js +2 -1
  6. package/dist/blocks/scalar-client-selector-block/components/ClientDropdown.vue.script.js.map +1 -1
  7. package/dist/blocks/scalar-client-selector-block/components/ClientSelector.vue.d.ts.map +1 -1
  8. package/dist/blocks/scalar-client-selector-block/components/ClientSelector.vue.js +1 -1
  9. package/dist/blocks/scalar-client-selector-block/components/ClientSelector.vue.js.map +1 -1
  10. package/dist/blocks/scalar-client-selector-block/components/ClientSelector.vue.script.js +2 -1
  11. package/dist/blocks/scalar-client-selector-block/components/ClientSelector.vue.script.js.map +1 -1
  12. package/dist/blocks/scalar-info-block/components/InfoBlock.vue.d.ts +2 -1
  13. package/dist/blocks/scalar-info-block/components/InfoBlock.vue.d.ts.map +1 -1
  14. package/dist/blocks/scalar-info-block/components/InfoBlock.vue.js.map +1 -1
  15. package/dist/blocks/scalar-info-block/components/InfoBlock.vue.script.js.map +1 -1
  16. package/dist/blocks/scalar-info-block/components/InfoLinks.vue.d.ts +2 -1
  17. package/dist/blocks/scalar-info-block/components/InfoLinks.vue.d.ts.map +1 -1
  18. package/dist/blocks/scalar-info-block/components/InfoLinks.vue.js.map +1 -1
  19. package/dist/blocks/scalar-info-block/components/InfoLinks.vue.script.js +2 -1
  20. package/dist/blocks/scalar-info-block/components/InfoLinks.vue.script.js.map +1 -1
  21. package/dist/blocks/scalar-info-block/components/InfoMarkdownSection.vue.js.map +1 -1
  22. package/dist/blocks/scalar-info-block/components/InfoMarkdownSection.vue.script.js +1 -1
  23. package/dist/blocks/scalar-info-block/components/InfoMarkdownSection.vue.script.js.map +1 -1
  24. package/dist/blocks/scalar-info-block/components/IntroductionLayout.vue.d.ts +2 -1
  25. package/dist/blocks/scalar-info-block/components/IntroductionLayout.vue.d.ts.map +1 -1
  26. package/dist/blocks/scalar-info-block/components/IntroductionLayout.vue.js +1 -1
  27. package/dist/blocks/scalar-info-block/components/IntroductionLayout.vue.js.map +1 -1
  28. package/dist/blocks/scalar-info-block/components/IntroductionLayout.vue.script.js.map +1 -1
  29. package/dist/blocks/scalar-server-selector-block/components/Selector.vue.d.ts.map +1 -1
  30. package/dist/blocks/scalar-server-selector-block/components/Selector.vue.js.map +1 -1
  31. package/dist/blocks/scalar-server-selector-block/components/Selector.vue.script.js +2 -1
  32. package/dist/blocks/scalar-server-selector-block/components/Selector.vue.script.js.map +1 -1
  33. package/dist/blocks/scalar-server-selector-block/components/ServerSelector.vue.js.map +1 -1
  34. package/dist/blocks/scalar-server-selector-block/components/ServerSelector.vue.script.js +1 -1
  35. package/dist/blocks/scalar-server-selector-block/components/ServerSelector.vue.script.js.map +1 -1
  36. package/dist/browser/standalone.js +282 -268
  37. package/dist/browser/webpack-stats.json +1 -1
  38. package/dist/components/AgentScalar/AgentScalarDrawer.vue.js +1 -1
  39. package/dist/components/AgentScalar/AgentScalarDrawer.vue.js.map +1 -1
  40. package/dist/components/AgentScalar/AgentScalarDrawer.vue.script.js +1 -1
  41. package/dist/components/AgentScalar/AgentScalarDrawer.vue.script.js.map +1 -1
  42. package/dist/components/AgentScalar/OpenMCPButton.vue.js +1 -1
  43. package/dist/components/AgentScalar/OpenMCPButton.vue.js.map +1 -1
  44. package/dist/components/AgentScalar/OpenMCPButton.vue.script.js +1 -1
  45. package/dist/components/AgentScalar/OpenMCPButton.vue.script.js.map +1 -1
  46. package/dist/components/Anchor/Anchor.vue.d.ts.map +1 -1
  47. package/dist/components/Anchor/Anchor.vue.js.map +1 -1
  48. package/dist/components/Anchor/Anchor.vue.script.js +2 -1
  49. package/dist/components/Anchor/Anchor.vue.script.js.map +1 -1
  50. package/dist/components/ApiReference.vue.js +1 -1
  51. package/dist/components/ApiReference.vue.js.map +1 -1
  52. package/dist/components/ApiReference.vue.script.js +6 -4
  53. package/dist/components/ApiReference.vue.script.js.map +1 -1
  54. package/dist/components/Content/Content.vue.js.map +1 -1
  55. package/dist/components/Content/Content.vue.script.js +1 -1
  56. package/dist/components/Content/Content.vue.script.js.map +1 -1
  57. package/dist/components/Content/Models/components/ModernLayout.vue.js.map +1 -1
  58. package/dist/components/Content/Models/components/ModernLayout.vue.script.js +1 -1
  59. package/dist/components/Content/Models/components/ModernLayout.vue.script.js.map +1 -1
  60. package/dist/components/Content/Schema/Schema.vue.d.ts.map +1 -1
  61. package/dist/components/Content/Schema/Schema.vue.js +1 -1
  62. package/dist/components/Content/Schema/Schema.vue.js.map +1 -1
  63. package/dist/components/Content/Schema/Schema.vue.script.js +2 -1
  64. package/dist/components/Content/Schema/Schema.vue.script.js.map +1 -1
  65. package/dist/components/Content/Schema/SchemaComposition.vue.d.ts.map +1 -1
  66. package/dist/components/Content/Schema/SchemaComposition.vue.js.map +1 -1
  67. package/dist/components/Content/Schema/SchemaComposition.vue.script.js +1 -1
  68. package/dist/components/Content/Schema/SchemaComposition.vue.script.js.map +1 -1
  69. package/dist/components/Content/Schema/SchemaEnumPropertyItem.vue.d.ts.map +1 -1
  70. package/dist/components/Content/Schema/SchemaEnumPropertyItem.vue.js +1 -1
  71. package/dist/components/Content/Schema/SchemaEnumPropertyItem.vue.js.map +1 -1
  72. package/dist/components/Content/Schema/SchemaEnumPropertyItem.vue.script.js +2 -1
  73. package/dist/components/Content/Schema/SchemaEnumPropertyItem.vue.script.js.map +1 -1
  74. package/dist/components/Content/Schema/SchemaEnums.vue.js +1 -1
  75. package/dist/components/Content/Schema/SchemaEnums.vue.js.map +1 -1
  76. package/dist/components/Content/Schema/SchemaEnums.vue.script.js +1 -1
  77. package/dist/components/Content/Schema/SchemaEnums.vue.script.js.map +1 -1
  78. package/dist/components/Content/Schema/SchemaHeading.vue.js +1 -1
  79. package/dist/components/Content/Schema/SchemaHeading.vue.js.map +1 -1
  80. package/dist/components/Content/Schema/SchemaHeading.vue.script.js +1 -1
  81. package/dist/components/Content/Schema/SchemaHeading.vue.script.js.map +1 -1
  82. package/dist/components/Content/Schema/SchemaObjectExampleCodeBlock.vue.js.map +1 -1
  83. package/dist/components/Content/Schema/SchemaObjectExampleCodeBlock.vue.script.js +2 -1
  84. package/dist/components/Content/Schema/SchemaObjectExampleCodeBlock.vue.script.js.map +1 -1
  85. package/dist/components/Content/Schema/SchemaProperty.vue.d.ts.map +1 -1
  86. package/dist/components/Content/Schema/SchemaProperty.vue.js +1 -1
  87. package/dist/components/Content/Schema/SchemaProperty.vue.js.map +1 -1
  88. package/dist/components/Content/Schema/SchemaProperty.vue.script.js +2 -1
  89. package/dist/components/Content/Schema/SchemaProperty.vue.script.js.map +1 -1
  90. package/dist/components/Content/Schema/SchemaPropertyDefault.vue.js +1 -1
  91. package/dist/components/Content/Schema/SchemaPropertyDefault.vue.js.map +1 -1
  92. package/dist/components/Content/Schema/SchemaPropertyDefault.vue.script.js +1 -1
  93. package/dist/components/Content/Schema/SchemaPropertyDefault.vue.script.js.map +1 -1
  94. package/dist/components/Content/Schema/SchemaPropertyExamples.vue.d.ts.map +1 -1
  95. package/dist/components/Content/Schema/SchemaPropertyExamples.vue.js +1 -1
  96. package/dist/components/Content/Schema/SchemaPropertyExamples.vue.js.map +1 -1
  97. package/dist/components/Content/Schema/SchemaPropertyExamples.vue.script.js +16 -5
  98. package/dist/components/Content/Schema/SchemaPropertyExamples.vue.script.js.map +1 -1
  99. package/dist/components/Content/Schema/SchemaPropertyHeading.vue.d.ts.map +1 -1
  100. package/dist/components/Content/Schema/SchemaPropertyHeading.vue.js +1 -1
  101. package/dist/components/Content/Schema/SchemaPropertyHeading.vue.js.map +1 -1
  102. package/dist/components/Content/Schema/SchemaPropertyHeading.vue.script.js +3 -3
  103. package/dist/components/Content/Schema/SchemaPropertyHeading.vue.script.js.map +1 -1
  104. package/dist/components/Content/Schema/helpers/format-example.d.ts.map +1 -1
  105. package/dist/components/Content/Schema/helpers/format-example.js +12 -8
  106. package/dist/components/Content/Schema/helpers/format-example.js.map +1 -1
  107. package/dist/components/Content/Tags/components/ClassicLayout.vue.js +1 -1
  108. package/dist/components/Content/Tags/components/ClassicLayout.vue.js.map +1 -1
  109. package/dist/components/Content/Tags/components/ClassicLayout.vue.script.js +1 -1
  110. package/dist/components/Content/Tags/components/ClassicLayout.vue.script.js.map +1 -1
  111. package/dist/components/Content/Tags/components/TagSection.vue.js.map +1 -1
  112. package/dist/components/Content/Tags/components/TagSection.vue.script.js +1 -1
  113. package/dist/components/Content/Tags/components/TagSection.vue.script.js.map +1 -1
  114. package/dist/components/GettingStarted.vue.js +1 -1
  115. package/dist/components/GettingStarted.vue.js.map +1 -1
  116. package/dist/components/GettingStarted.vue.script.js +4 -4
  117. package/dist/components/GettingStarted.vue.script.js.map +1 -1
  118. package/dist/components/MobileHeader.vue.d.ts.map +1 -1
  119. package/dist/components/MobileHeader.vue.js.map +1 -1
  120. package/dist/components/MobileHeader.vue.script.js +2 -1
  121. package/dist/components/MobileHeader.vue.script.js.map +1 -1
  122. package/dist/components/OperationsList/OperationsList.vue.js +1 -1
  123. package/dist/components/OperationsList/OperationsList.vue.js.map +1 -1
  124. package/dist/components/OperationsList/OperationsList.vue.script.js +1 -1
  125. package/dist/components/OperationsList/OperationsList.vue.script.js.map +1 -1
  126. package/dist/components/RenderPlugins/RenderPlugins.vue.js.map +1 -1
  127. package/dist/components/RenderPlugins/RenderPlugins.vue.script.js +1 -1
  128. package/dist/components/RenderPlugins/RenderPlugins.vue.script.js.map +1 -1
  129. package/dist/features/Operation/components/ContentTypeSelect.vue.d.ts.map +1 -1
  130. package/dist/features/Operation/components/ContentTypeSelect.vue.js.map +1 -1
  131. package/dist/features/Operation/components/ContentTypeSelect.vue.script.js +3 -1
  132. package/dist/features/Operation/components/ContentTypeSelect.vue.script.js.map +1 -1
  133. package/dist/features/Operation/components/Headers.vue.js +1 -1
  134. package/dist/features/Operation/components/Headers.vue.js.map +1 -1
  135. package/dist/features/Operation/components/Headers.vue.script.js +1 -1
  136. package/dist/features/Operation/components/Headers.vue.script.js.map +1 -1
  137. package/dist/features/Operation/components/ParameterListItem.vue.js +1 -1
  138. package/dist/features/Operation/components/ParameterListItem.vue.js.map +1 -1
  139. package/dist/features/Operation/components/ParameterListItem.vue.script.js +2 -1
  140. package/dist/features/Operation/components/ParameterListItem.vue.script.js.map +1 -1
  141. package/dist/features/Operation/components/RequestBody.vue.js +1 -1
  142. package/dist/features/Operation/components/RequestBody.vue.js.map +1 -1
  143. package/dist/features/Operation/components/RequestBody.vue.script.js +1 -1
  144. package/dist/features/Operation/components/RequestBody.vue.script.js.map +1 -1
  145. package/dist/features/Operation/components/SecurityRequirementBadge.vue.js.map +1 -1
  146. package/dist/features/Operation/components/SecurityRequirementBadge.vue.script.js +1 -1
  147. package/dist/features/Operation/components/SecurityRequirementBadge.vue.script.js.map +1 -1
  148. package/dist/features/Operation/layouts/ClassicLayout.vue.d.ts.map +1 -1
  149. package/dist/features/Operation/layouts/ClassicLayout.vue.js +1 -1
  150. package/dist/features/Operation/layouts/ClassicLayout.vue.js.map +1 -1
  151. package/dist/features/Operation/layouts/ClassicLayout.vue.script.js +3 -1
  152. package/dist/features/Operation/layouts/ClassicLayout.vue.script.js.map +1 -1
  153. package/dist/features/Operation/layouts/ModernLayout.vue.d.ts.map +1 -1
  154. package/dist/features/Operation/layouts/ModernLayout.vue.js +1 -1
  155. package/dist/features/Operation/layouts/ModernLayout.vue.js.map +1 -1
  156. package/dist/features/Operation/layouts/ModernLayout.vue.script.js +2 -1
  157. package/dist/features/Operation/layouts/ModernLayout.vue.script.js.map +1 -1
  158. package/dist/features/Search/components/SearchButton.vue.d.ts.map +1 -1
  159. package/dist/features/Search/components/SearchButton.vue.js.map +1 -1
  160. package/dist/features/Search/components/SearchButton.vue.script.js +3 -1
  161. package/dist/features/Search/components/SearchButton.vue.script.js.map +1 -1
  162. package/dist/features/Search/components/SearchModal.vue.d.ts +1 -1
  163. package/dist/features/Search/components/SearchModal.vue.d.ts.map +1 -1
  164. package/dist/features/Search/components/SearchModal.vue.js +1 -1
  165. package/dist/features/Search/components/SearchModal.vue.js.map +1 -1
  166. package/dist/features/Search/components/SearchModal.vue.script.js +3 -1
  167. package/dist/features/Search/components/SearchModal.vue.script.js.map +1 -1
  168. package/dist/features/Search/components/SearchResult.vue.js.map +1 -1
  169. package/dist/features/Search/components/SearchResult.vue.script.js +1 -1
  170. package/dist/features/Search/components/SearchResult.vue.script.js.map +1 -1
  171. package/dist/features/developer-tools/components/ApiReferenceToolbarConfigLayout.vue.js.map +1 -1
  172. package/dist/features/developer-tools/components/ApiReferenceToolbarConfigLayout.vue.script.js +1 -1
  173. package/dist/features/developer-tools/components/ApiReferenceToolbarConfigLayout.vue.script.js.map +1 -1
  174. package/dist/features/developer-tools/components/ApiReferenceToolbarConfigLayoutOptions.vue.d.ts.map +1 -1
  175. package/dist/features/developer-tools/components/ApiReferenceToolbarConfigLayoutOptions.vue.js.map +1 -1
  176. package/dist/features/developer-tools/components/ApiReferenceToolbarConfigLayoutOptions.vue.script.js +2 -1
  177. package/dist/features/developer-tools/components/ApiReferenceToolbarConfigLayoutOptions.vue.script.js.map +1 -1
  178. package/dist/features/developer-tools/components/ApiReferenceToolbarConfigTheme.vue.d.ts.map +1 -1
  179. package/dist/features/developer-tools/components/ApiReferenceToolbarConfigTheme.vue.js.map +1 -1
  180. package/dist/features/developer-tools/components/ApiReferenceToolbarConfigTheme.vue.script.js +4 -1
  181. package/dist/features/developer-tools/components/ApiReferenceToolbarConfigTheme.vue.script.js.map +1 -1
  182. package/dist/features/developer-tools/components/ApiReferenceToolbarPopover.vue.d.ts.map +1 -1
  183. package/dist/features/developer-tools/components/ApiReferenceToolbarPopover.vue.js.map +1 -1
  184. package/dist/features/developer-tools/components/ApiReferenceToolbarPopover.vue.script.js +2 -1
  185. package/dist/features/developer-tools/components/ApiReferenceToolbarPopover.vue.script.js.map +1 -1
  186. package/dist/features/developer-tools/components/ApiReferenceToolbarRegisterButton.vue.d.ts.map +1 -1
  187. package/dist/features/developer-tools/components/ApiReferenceToolbarRegisterButton.vue.js.map +1 -1
  188. package/dist/features/developer-tools/components/ApiReferenceToolbarRegisterButton.vue.script.js +2 -1
  189. package/dist/features/developer-tools/components/ApiReferenceToolbarRegisterButton.vue.script.js.map +1 -1
  190. package/dist/features/developer-tools/components/ApiReferenceToolbarShareTemporary.vue.d.ts.map +1 -1
  191. package/dist/features/developer-tools/components/ApiReferenceToolbarShareTemporary.vue.js.map +1 -1
  192. package/dist/features/developer-tools/components/ApiReferenceToolbarShareTemporary.vue.script.js +3 -1
  193. package/dist/features/developer-tools/components/ApiReferenceToolbarShareTemporary.vue.script.js.map +1 -1
  194. package/dist/features/developer-tools/components/ApiReferenceToolbarTitle.vue.js.map +1 -1
  195. package/dist/features/developer-tools/components/ApiReferenceToolbarTitle.vue.script.js +1 -1
  196. package/dist/features/developer-tools/components/ApiReferenceToolbarTitle.vue.script.js.map +1 -1
  197. package/dist/features/developer-tools/components/DeployApiReference.vue.js.map +1 -1
  198. package/dist/features/developer-tools/components/DeployApiReference.vue.script.js +1 -1
  199. package/dist/features/developer-tools/components/DeployApiReference.vue.script.js.map +1 -1
  200. package/dist/features/developer-tools/components/ModifyConfiguration.vue.d.ts.map +1 -1
  201. package/dist/features/developer-tools/components/ModifyConfiguration.vue.js.map +1 -1
  202. package/dist/features/developer-tools/components/ModifyConfiguration.vue.script.js +2 -1
  203. package/dist/features/developer-tools/components/ModifyConfiguration.vue.script.js.map +1 -1
  204. package/dist/features/developer-tools/components/ShareApiReference.vue.js.map +1 -1
  205. package/dist/features/developer-tools/components/ShareApiReference.vue.script.js +1 -1
  206. package/dist/features/developer-tools/components/ShareApiReference.vue.script.js.map +1 -1
  207. package/dist/features/example-responses/ExampleResponse.vue.d.ts.map +1 -1
  208. package/dist/features/example-responses/ExampleResponse.vue.js +1 -1
  209. package/dist/features/example-responses/ExampleResponse.vue.js.map +1 -1
  210. package/dist/features/example-responses/ExampleResponse.vue.script.js +2 -1
  211. package/dist/features/example-responses/ExampleResponse.vue.script.js.map +1 -1
  212. package/dist/features/example-responses/ExampleResponseTabList.vue.js +1 -1
  213. package/dist/features/example-responses/ExampleResponseTabList.vue.js.map +1 -1
  214. package/dist/features/example-responses/ExampleResponseTabList.vue.script.js +1 -1
  215. package/dist/features/example-responses/ExampleResponseTabList.vue.script.js.map +1 -1
  216. package/dist/features/example-responses/ExampleResponses.vue.js +1 -1
  217. package/dist/features/example-responses/ExampleResponses.vue.js.map +1 -1
  218. package/dist/features/example-responses/ExampleResponses.vue.script.js +3 -1
  219. package/dist/features/example-responses/ExampleResponses.vue.script.js.map +1 -1
  220. package/dist/features/example-responses/ExampleSchema.vue.d.ts.map +1 -1
  221. package/dist/features/example-responses/ExampleSchema.vue.js.map +1 -1
  222. package/dist/features/example-responses/ExampleSchema.vue.script.js +2 -1
  223. package/dist/features/example-responses/ExampleSchema.vue.script.js.map +1 -1
  224. package/dist/features/info-object/Contact.vue.js.map +1 -1
  225. package/dist/features/info-object/Contact.vue.script.js +1 -1
  226. package/dist/features/info-object/Contact.vue.script.js.map +1 -1
  227. package/dist/features/info-object/License.vue.d.ts +2 -1
  228. package/dist/features/info-object/License.vue.d.ts.map +1 -1
  229. package/dist/features/info-object/License.vue.js.map +1 -1
  230. package/dist/features/info-object/License.vue.script.js +7 -7
  231. package/dist/features/info-object/License.vue.script.js.map +1 -1
  232. package/dist/features/multiple-documents/DocumentSelector.vue.js.map +1 -1
  233. package/dist/features/multiple-documents/DocumentSelector.vue.script.js +1 -1
  234. package/dist/features/multiple-documents/DocumentSelector.vue.script.js.map +1 -1
  235. package/dist/features/specification-extension/SpecificationExtension.vue.js.map +1 -1
  236. package/dist/features/specification-extension/SpecificationExtension.vue.script.js +1 -1
  237. package/dist/features/specification-extension/SpecificationExtension.vue.script.js.map +1 -1
  238. package/dist/style.css +567 -567
  239. package/dist/vue-styles.css +350 -350
  240. package/package.json +15 -15
package/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # @scalar/api-reference
2
2
 
3
+ ## 1.57.3
4
+
5
+ ### Patch Changes
6
+
7
+ - [#9169](https://github.com/scalar/scalar/pull/9169): feat: add `customFetch` to the api-reference configuration and forward it to the API client so requests (including "Test Request" calls) use the custom fetch — enabling things like `credentials: 'include'`. The previous `fetch` option is deprecated and migrated automatically with a console warning.
8
+ - [#9273](https://github.com/scalar/scalar/pull/9273): fix: render `null`, whitespace-only, and `value`/`externalValue`-shaped schema examples correctly
9
+
3
10
  ## 1.57.2
4
11
 
5
12
  ### Patch Changes
@@ -1 +1 @@
1
- {"version":3,"file":"ClientDropdown.vue.d.ts","sourceRoot":"","sources":["../../../../src/blocks/scalar-client-selector-block/components/ClientDropdown.vue"],"names":[],"mappings":"AA2PA,OAAO,EAGL,KAAK,YAAY,EACjB,KAAK,iBAAiB,EAEvB,MAAM,iDAAiD,CAAA;AAGxD,OAAO,KAAK,EAAE,gBAAgB,EAAY,MAAM,wBAAwB,CAAA;AACxE,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AAKvE,KAAK,WAAW,GAAG;IACf,qBAAqB;IACrB,aAAa,EAAE,iBAAiB,EAAE,CAAA;IAClC,yCAAyC;IACzC,cAAc,CAAC,EAAE,gBAAgB,CAAC,MAAM,CAAC,CAAA;IACzC,+BAA+B;IAC/B,eAAe,EAAE,YAAY,EAAE,CAAA;IAC/B,gBAAgB;IAChB,QAAQ,EAAE,iBAAiB,CAAA;CAC5B,CAAC;AAqPJ,QAAA,MAAM,YAAY,kSAEhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
1
+ {"version":3,"file":"ClientDropdown.vue.d.ts","sourceRoot":"","sources":["../../../../src/blocks/scalar-client-selector-block/components/ClientDropdown.vue"],"names":[],"mappings":"AA4PA,OAAO,EAGL,KAAK,YAAY,EACjB,KAAK,iBAAiB,EAEvB,MAAM,iDAAiD,CAAA;AAIxD,OAAO,KAAK,EAAE,gBAAgB,EAAY,MAAM,wBAAwB,CAAA;AACxE,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AAKvE,KAAK,WAAW,GAAG;IACf,qBAAqB;IACrB,aAAa,EAAE,iBAAiB,EAAE,CAAA;IAClC,yCAAyC;IACzC,cAAc,CAAC,EAAE,gBAAgB,CAAC,MAAM,CAAC,CAAA;IACzC,+BAA+B;IAC/B,eAAe,EAAE,YAAY,EAAE,CAAA;IAC/B,gBAAgB;IAChB,QAAQ,EAAE,iBAAiB,CAAA;CAC5B,CAAC;AAqPJ,QAAA,MAAM,YAAY,kSAEhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
@@ -2,7 +2,7 @@ import _plugin_vue_export_helper_default from "../../../_virtual/_plugin-vue_exp
2
2
  import ClientDropdown_vue_vue_type_script_setup_true_lang_default from "./ClientDropdown.vue.script.js";
3
3
  /* empty css */
4
4
  //#region src/blocks/scalar-client-selector-block/components/ClientDropdown.vue
5
- var ClientDropdown_default = /* @__PURE__ */ _plugin_vue_export_helper_default(ClientDropdown_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-75d206b8"]]);
5
+ var ClientDropdown_default = /* @__PURE__ */ _plugin_vue_export_helper_default(ClientDropdown_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-3150aaa3"]]);
6
6
  //#endregion
7
7
  export { ClientDropdown_default as default };
8
8
 
@@ -1 +1 @@
1
- {"version":3,"file":"ClientDropdown.vue.js","names":[],"sources":["../../../../src/blocks/scalar-client-selector-block/components/ClientDropdown.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { Tab } from '@headlessui/vue'\nimport {\n filterClientsByQuery,\n findClient,\n type ClientOption,\n type ClientOptionGroup,\n type CustomClientOption,\n} from '@scalar/api-client/blocks/operation-code-sample'\nimport { ScalarCombobox, ScalarIcon } from '@scalar/components'\nimport { freezeElement } from '@scalar/helpers/dom/freeze-element'\nimport type { AvailableClients, TargetId } from '@scalar/types/snippetz'\nimport { type WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport { computed, ref } from 'vue'\n\nimport { isFeaturedClient } from '@/blocks/scalar-client-selector-block/helpers/featured-clients'\n\nconst { clientOptions, featuredClients, eventBus, selectedClient } =\n defineProps<{\n /** Client options */\n clientOptions: ClientOptionGroup[]\n /** The currently selected Http Client */\n selectedClient?: AvailableClients[number]\n /** List of featured clients */\n featuredClients: ClientOption[]\n /** Event bus */\n eventBus: WorkspaceEventBus\n }>()\n\nconst containerRef = ref<HTMLElement>()\n\n/**\n * Icons have longer names to appear in icon searches, e.g. \"javascript-js\" instead of just \"javascript\". This function\n * maps the language key to the icon name.\n */\nconst getIconByLanguageKey = (targetKey: TargetId) =>\n `programming-language-${targetKey === 'js' ? 'javascript' : targetKey}` as const\n\n/** Set custom example, or update the selected HTTP client globally */\nconst selectClient = (option: ClientOption | CustomClientOption) => {\n if (!containerRef.value) {\n return\n }\n\n // We need to freeze the ui to prevent scrolling as the clients change\n const unfreeze = freezeElement(containerRef.value)\n setTimeout(() => {\n unfreeze()\n }, 300)\n\n // Update the store\n if (option.clientKey !== 'custom') {\n eventBus.emit('workspace:update:selected-client', option.id)\n }\n}\n\n/** Calculates the targetKey from the selected client id */\nconst selectedTargetKey = computed(\n () => selectedClient?.split('/')[0] as TargetId | undefined,\n)\n</script>\n<template>\n <div\n ref=\"containerRef\"\n class=\"client-libraries-content\">\n <Tab\n v-for=\"featuredClient in featuredClients\"\n :key=\"featuredClient.clientKey\"\n class=\"client-libraries rendered-code-sdks\"\n :class=\"{\n 'client-libraries__active': featuredClient.id === selectedClient,\n }\">\n <div :class=\"`client-libraries-icon__${featuredClient.targetKey}`\">\n <ScalarIcon\n class=\"client-libraries-icon\"\n :icon=\"getIconByLanguageKey(featuredClient.targetKey)\" />\n </div>\n <span class=\"client-libraries-text\">{{\n featuredClient.targetTitle\n }}</span>\n </Tab>\n\n <!-- Client Dropdown -->\n <ScalarCombobox\n :filterFn=\"filterClientsByQuery\"\n :modelValue=\"findClient(clientOptions, selectedClient)\"\n :options=\"clientOptions\"\n placement=\"bottom-end\"\n teleport\n @update:modelValue=\"selectClient($event as ClientOption)\">\n <button\n class=\"client-libraries client-libraries__select\"\n :class=\"{\n 'client-libraries__active':\n selectedClient && !isFeaturedClient(selectedClient),\n }\"\n type=\"button\">\n <div\n aria-hidden=\"true\"\n class=\"client-libraries-icon__more\">\n <template v-if=\"selectedClient && !isFeaturedClient(selectedClient)\">\n <div :class=\"`client-libraries-icon__${selectedTargetKey}`\">\n <ScalarIcon\n v-if=\"selectedTargetKey\"\n class=\"client-libraries-icon\"\n :icon=\"getIconByLanguageKey(selectedTargetKey)\" />\n </div>\n </template>\n <template v-else>\n <svg\n class=\"client-libraries-icon\"\n height=\"50\"\n role=\"presentation\"\n viewBox=\"0 0 50 50\"\n width=\"50\"\n xmlns=\"http://www.w3.org/2000/svg\">\n <g\n fill=\"currentColor\"\n fill-rule=\"nonzero\">\n <path\n d=\"M10.71 25.3a3.87 3.87 0 1 0 7.74 0 3.87 3.87 0 0 0-7.74 0M21.13 25.3a3.87 3.87 0 1 0 7.74 0 3.87 3.87 0 0 0-7.74 0M31.55 25.3a3.87 3.87 0 1 0 7.74 0 3.87 3.87 0 0 0-7.74 0\" />\n </g>\n </svg>\n </template>\n </div>\n <span\n v-if=\"clientOptions.length\"\n class=\"client-libraries-text client-libraries-text-more\">\n More\n </span>\n <span class=\"sr-only\">Select from all clients</span>\n </button>\n </ScalarCombobox>\n </div>\n</template>\n<style scoped>\n.client-libraries-content {\n container: client-libraries-content / inline-size;\n display: flex;\n justify-content: center;\n overflow: hidden;\n padding: 0 12px;\n background-color: var(--scalar-background-1);\n border-left: var(--scalar-border-width) solid var(--scalar-border-color);\n border-right: var(--scalar-border-width) solid var(--scalar-border-color);\n}\n.client-libraries {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 100%;\n position: relative;\n cursor: pointer;\n white-space: nowrap;\n padding: 8px 2px;\n gap: 6px;\n color: var(--scalar-color-3);\n border-bottom: 1px solid transparent;\n user-select: none;\n}\n\n.client-libraries:not(.client-libraries__active):hover:before {\n content: '';\n position: absolute;\n width: calc(100% - 4px);\n height: calc(100% - 4px);\n background: var(--scalar-background-2);\n left: 2px;\n top: 2px;\n z-index: 0;\n border-radius: var(--scalar-radius);\n}\n.client-libraries:active {\n color: var(--scalar-color-1);\n}\n.client-libraries:focus-visible {\n outline: none;\n box-shadow: inset 0 0 0 1px var(--scalar-color-accent);\n}\n/* remove php and c on mobile */\n@media screen and (max-width: 450px) {\n .client-libraries:nth-of-type(4),\n .client-libraries:nth-of-type(5) {\n display: none;\n }\n}\n.client-libraries-icon {\n max-width: 14px;\n max-height: 14px;\n min-width: 14px;\n width: 100%;\n aspect-ratio: 1;\n display: flex;\n align-items: center;\n justify-content: center;\n position: relative;\n box-sizing: border-box;\n color: currentColor;\n}\n.client-libraries-icon__more svg {\n height: initial;\n}\n@container client-libraries-content (width < 400px) {\n .client-libraries__select {\n width: fit-content;\n\n .client-libraries-icon__more + span {\n display: none;\n }\n }\n}\n@container client-libraries-content (width < 380px) {\n .client-libraries {\n width: 100%;\n }\n .client-libraries span {\n display: none;\n }\n}\n.client-libraries__active {\n color: var(--scalar-color-1);\n border-bottom: 1px solid var(--scalar-color-1);\n}\n@keyframes codeloader {\n 0% {\n transform: rotate(0deg);\n }\n to {\n transform: rotate(1turn);\n }\n}\n.client-libraries .client-libraries-text {\n font-size: var(--scalar-small);\n position: relative;\n display: flex;\n align-items: center;\n}\n.client-libraries__active .client-libraries-text {\n color: var(--scalar-color-1);\n font-weight: var(--scalar-semibold);\n}\n@media screen and (max-width: 600px) {\n .references-classic .client-libraries {\n flex-direction: column;\n }\n}\n</style>\n"],"mappings":""}
1
+ {"version":3,"file":"ClientDropdown.vue.js","names":[],"sources":["../../../../src/blocks/scalar-client-selector-block/components/ClientDropdown.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { Tab } from '@headlessui/vue'\nimport {\n filterClientsByQuery,\n findClient,\n type ClientOption,\n type ClientOptionGroup,\n type CustomClientOption,\n} from '@scalar/api-client/blocks/operation-code-sample'\nimport { ScalarCombobox } from '@scalar/components/combobox'\nimport { ScalarIcon } from '@scalar/components/icon'\nimport { freezeElement } from '@scalar/helpers/dom/freeze-element'\nimport type { AvailableClients, TargetId } from '@scalar/types/snippetz'\nimport { type WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport { computed, ref } from 'vue'\n\nimport { isFeaturedClient } from '@/blocks/scalar-client-selector-block/helpers/featured-clients'\n\nconst { clientOptions, featuredClients, eventBus, selectedClient } =\n defineProps<{\n /** Client options */\n clientOptions: ClientOptionGroup[]\n /** The currently selected Http Client */\n selectedClient?: AvailableClients[number]\n /** List of featured clients */\n featuredClients: ClientOption[]\n /** Event bus */\n eventBus: WorkspaceEventBus\n }>()\n\nconst containerRef = ref<HTMLElement>()\n\n/**\n * Icons have longer names to appear in icon searches, e.g. \"javascript-js\" instead of just \"javascript\". This function\n * maps the language key to the icon name.\n */\nconst getIconByLanguageKey = (targetKey: TargetId) =>\n `programming-language-${targetKey === 'js' ? 'javascript' : targetKey}` as const\n\n/** Set custom example, or update the selected HTTP client globally */\nconst selectClient = (option: ClientOption | CustomClientOption) => {\n if (!containerRef.value) {\n return\n }\n\n // We need to freeze the ui to prevent scrolling as the clients change\n const unfreeze = freezeElement(containerRef.value)\n setTimeout(() => {\n unfreeze()\n }, 300)\n\n // Update the store\n if (option.clientKey !== 'custom') {\n eventBus.emit('workspace:update:selected-client', option.id)\n }\n}\n\n/** Calculates the targetKey from the selected client id */\nconst selectedTargetKey = computed(\n () => selectedClient?.split('/')[0] as TargetId | undefined,\n)\n</script>\n<template>\n <div\n ref=\"containerRef\"\n class=\"client-libraries-content\">\n <Tab\n v-for=\"featuredClient in featuredClients\"\n :key=\"featuredClient.clientKey\"\n class=\"client-libraries rendered-code-sdks\"\n :class=\"{\n 'client-libraries__active': featuredClient.id === selectedClient,\n }\">\n <div :class=\"`client-libraries-icon__${featuredClient.targetKey}`\">\n <ScalarIcon\n class=\"client-libraries-icon\"\n :icon=\"getIconByLanguageKey(featuredClient.targetKey)\" />\n </div>\n <span class=\"client-libraries-text\">{{\n featuredClient.targetTitle\n }}</span>\n </Tab>\n\n <!-- Client Dropdown -->\n <ScalarCombobox\n :filterFn=\"filterClientsByQuery\"\n :modelValue=\"findClient(clientOptions, selectedClient)\"\n :options=\"clientOptions\"\n placement=\"bottom-end\"\n teleport\n @update:modelValue=\"selectClient($event as ClientOption)\">\n <button\n class=\"client-libraries client-libraries__select\"\n :class=\"{\n 'client-libraries__active':\n selectedClient && !isFeaturedClient(selectedClient),\n }\"\n type=\"button\">\n <div\n aria-hidden=\"true\"\n class=\"client-libraries-icon__more\">\n <template v-if=\"selectedClient && !isFeaturedClient(selectedClient)\">\n <div :class=\"`client-libraries-icon__${selectedTargetKey}`\">\n <ScalarIcon\n v-if=\"selectedTargetKey\"\n class=\"client-libraries-icon\"\n :icon=\"getIconByLanguageKey(selectedTargetKey)\" />\n </div>\n </template>\n <template v-else>\n <svg\n class=\"client-libraries-icon\"\n height=\"50\"\n role=\"presentation\"\n viewBox=\"0 0 50 50\"\n width=\"50\"\n xmlns=\"http://www.w3.org/2000/svg\">\n <g\n fill=\"currentColor\"\n fill-rule=\"nonzero\">\n <path\n d=\"M10.71 25.3a3.87 3.87 0 1 0 7.74 0 3.87 3.87 0 0 0-7.74 0M21.13 25.3a3.87 3.87 0 1 0 7.74 0 3.87 3.87 0 0 0-7.74 0M31.55 25.3a3.87 3.87 0 1 0 7.74 0 3.87 3.87 0 0 0-7.74 0\" />\n </g>\n </svg>\n </template>\n </div>\n <span\n v-if=\"clientOptions.length\"\n class=\"client-libraries-text client-libraries-text-more\">\n More\n </span>\n <span class=\"sr-only\">Select from all clients</span>\n </button>\n </ScalarCombobox>\n </div>\n</template>\n<style scoped>\n.client-libraries-content {\n container: client-libraries-content / inline-size;\n display: flex;\n justify-content: center;\n overflow: hidden;\n padding: 0 12px;\n background-color: var(--scalar-background-1);\n border-left: var(--scalar-border-width) solid var(--scalar-border-color);\n border-right: var(--scalar-border-width) solid var(--scalar-border-color);\n}\n.client-libraries {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 100%;\n position: relative;\n cursor: pointer;\n white-space: nowrap;\n padding: 8px 2px;\n gap: 6px;\n color: var(--scalar-color-3);\n border-bottom: 1px solid transparent;\n user-select: none;\n}\n\n.client-libraries:not(.client-libraries__active):hover:before {\n content: '';\n position: absolute;\n width: calc(100% - 4px);\n height: calc(100% - 4px);\n background: var(--scalar-background-2);\n left: 2px;\n top: 2px;\n z-index: 0;\n border-radius: var(--scalar-radius);\n}\n.client-libraries:active {\n color: var(--scalar-color-1);\n}\n.client-libraries:focus-visible {\n outline: none;\n box-shadow: inset 0 0 0 1px var(--scalar-color-accent);\n}\n/* remove php and c on mobile */\n@media screen and (max-width: 450px) {\n .client-libraries:nth-of-type(4),\n .client-libraries:nth-of-type(5) {\n display: none;\n }\n}\n.client-libraries-icon {\n max-width: 14px;\n max-height: 14px;\n min-width: 14px;\n width: 100%;\n aspect-ratio: 1;\n display: flex;\n align-items: center;\n justify-content: center;\n position: relative;\n box-sizing: border-box;\n color: currentColor;\n}\n.client-libraries-icon__more svg {\n height: initial;\n}\n@container client-libraries-content (width < 400px) {\n .client-libraries__select {\n width: fit-content;\n\n .client-libraries-icon__more + span {\n display: none;\n }\n }\n}\n@container client-libraries-content (width < 380px) {\n .client-libraries {\n width: 100%;\n }\n .client-libraries span {\n display: none;\n }\n}\n.client-libraries__active {\n color: var(--scalar-color-1);\n border-bottom: 1px solid var(--scalar-color-1);\n}\n@keyframes codeloader {\n 0% {\n transform: rotate(0deg);\n }\n to {\n transform: rotate(1turn);\n }\n}\n.client-libraries .client-libraries-text {\n font-size: var(--scalar-small);\n position: relative;\n display: flex;\n align-items: center;\n}\n.client-libraries__active .client-libraries-text {\n color: var(--scalar-color-1);\n font-weight: var(--scalar-semibold);\n}\n@media screen and (max-width: 600px) {\n .references-classic .client-libraries {\n flex-direction: column;\n }\n}\n</style>\n"],"mappings":""}
@@ -1,8 +1,9 @@
1
1
  import { isFeaturedClient } from "../helpers/featured-clients.js";
2
2
  import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createVNode, defineComponent, normalizeClass, openBlock, ref, renderList, toDisplayString, unref, withCtx } from "vue";
3
3
  import { Tab } from "@headlessui/vue";
4
- import { ScalarCombobox, ScalarIcon } from "@scalar/components";
5
4
  import { filterClientsByQuery, findClient } from "@scalar/api-client/blocks/operation-code-sample";
5
+ import { ScalarCombobox } from "@scalar/components/combobox";
6
+ import { ScalarIcon } from "@scalar/components/icon";
6
7
  import { freezeElement } from "@scalar/helpers/dom/freeze-element";
7
8
  //#region src/blocks/scalar-client-selector-block/components/ClientDropdown.vue?vue&type=script&setup=true&lang.ts
8
9
  var _hoisted_1 = { class: "client-libraries-text" };
@@ -1 +1 @@
1
- {"version":3,"file":"ClientDropdown.vue.script.js","names":[],"sources":["../../../../src/blocks/scalar-client-selector-block/components/ClientDropdown.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { Tab } from '@headlessui/vue'\nimport {\n filterClientsByQuery,\n findClient,\n type ClientOption,\n type ClientOptionGroup,\n type CustomClientOption,\n} from '@scalar/api-client/blocks/operation-code-sample'\nimport { ScalarCombobox, ScalarIcon } from '@scalar/components'\nimport { freezeElement } from '@scalar/helpers/dom/freeze-element'\nimport type { AvailableClients, TargetId } from '@scalar/types/snippetz'\nimport { type WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport { computed, ref } from 'vue'\n\nimport { isFeaturedClient } from '@/blocks/scalar-client-selector-block/helpers/featured-clients'\n\nconst { clientOptions, featuredClients, eventBus, selectedClient } =\n defineProps<{\n /** Client options */\n clientOptions: ClientOptionGroup[]\n /** The currently selected Http Client */\n selectedClient?: AvailableClients[number]\n /** List of featured clients */\n featuredClients: ClientOption[]\n /** Event bus */\n eventBus: WorkspaceEventBus\n }>()\n\nconst containerRef = ref<HTMLElement>()\n\n/**\n * Icons have longer names to appear in icon searches, e.g. \"javascript-js\" instead of just \"javascript\". This function\n * maps the language key to the icon name.\n */\nconst getIconByLanguageKey = (targetKey: TargetId) =>\n `programming-language-${targetKey === 'js' ? 'javascript' : targetKey}` as const\n\n/** Set custom example, or update the selected HTTP client globally */\nconst selectClient = (option: ClientOption | CustomClientOption) => {\n if (!containerRef.value) {\n return\n }\n\n // We need to freeze the ui to prevent scrolling as the clients change\n const unfreeze = freezeElement(containerRef.value)\n setTimeout(() => {\n unfreeze()\n }, 300)\n\n // Update the store\n if (option.clientKey !== 'custom') {\n eventBus.emit('workspace:update:selected-client', option.id)\n }\n}\n\n/** Calculates the targetKey from the selected client id */\nconst selectedTargetKey = computed(\n () => selectedClient?.split('/')[0] as TargetId | undefined,\n)\n</script>\n<template>\n <div\n ref=\"containerRef\"\n class=\"client-libraries-content\">\n <Tab\n v-for=\"featuredClient in featuredClients\"\n :key=\"featuredClient.clientKey\"\n class=\"client-libraries rendered-code-sdks\"\n :class=\"{\n 'client-libraries__active': featuredClient.id === selectedClient,\n }\">\n <div :class=\"`client-libraries-icon__${featuredClient.targetKey}`\">\n <ScalarIcon\n class=\"client-libraries-icon\"\n :icon=\"getIconByLanguageKey(featuredClient.targetKey)\" />\n </div>\n <span class=\"client-libraries-text\">{{\n featuredClient.targetTitle\n }}</span>\n </Tab>\n\n <!-- Client Dropdown -->\n <ScalarCombobox\n :filterFn=\"filterClientsByQuery\"\n :modelValue=\"findClient(clientOptions, selectedClient)\"\n :options=\"clientOptions\"\n placement=\"bottom-end\"\n teleport\n @update:modelValue=\"selectClient($event as ClientOption)\">\n <button\n class=\"client-libraries client-libraries__select\"\n :class=\"{\n 'client-libraries__active':\n selectedClient && !isFeaturedClient(selectedClient),\n }\"\n type=\"button\">\n <div\n aria-hidden=\"true\"\n class=\"client-libraries-icon__more\">\n <template v-if=\"selectedClient && !isFeaturedClient(selectedClient)\">\n <div :class=\"`client-libraries-icon__${selectedTargetKey}`\">\n <ScalarIcon\n v-if=\"selectedTargetKey\"\n class=\"client-libraries-icon\"\n :icon=\"getIconByLanguageKey(selectedTargetKey)\" />\n </div>\n </template>\n <template v-else>\n <svg\n class=\"client-libraries-icon\"\n height=\"50\"\n role=\"presentation\"\n viewBox=\"0 0 50 50\"\n width=\"50\"\n xmlns=\"http://www.w3.org/2000/svg\">\n <g\n fill=\"currentColor\"\n fill-rule=\"nonzero\">\n <path\n d=\"M10.71 25.3a3.87 3.87 0 1 0 7.74 0 3.87 3.87 0 0 0-7.74 0M21.13 25.3a3.87 3.87 0 1 0 7.74 0 3.87 3.87 0 0 0-7.74 0M31.55 25.3a3.87 3.87 0 1 0 7.74 0 3.87 3.87 0 0 0-7.74 0\" />\n </g>\n </svg>\n </template>\n </div>\n <span\n v-if=\"clientOptions.length\"\n class=\"client-libraries-text client-libraries-text-more\">\n More\n </span>\n <span class=\"sr-only\">Select from all clients</span>\n </button>\n </ScalarCombobox>\n </div>\n</template>\n<style scoped>\n.client-libraries-content {\n container: client-libraries-content / inline-size;\n display: flex;\n justify-content: center;\n overflow: hidden;\n padding: 0 12px;\n background-color: var(--scalar-background-1);\n border-left: var(--scalar-border-width) solid var(--scalar-border-color);\n border-right: var(--scalar-border-width) solid var(--scalar-border-color);\n}\n.client-libraries {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 100%;\n position: relative;\n cursor: pointer;\n white-space: nowrap;\n padding: 8px 2px;\n gap: 6px;\n color: var(--scalar-color-3);\n border-bottom: 1px solid transparent;\n user-select: none;\n}\n\n.client-libraries:not(.client-libraries__active):hover:before {\n content: '';\n position: absolute;\n width: calc(100% - 4px);\n height: calc(100% - 4px);\n background: var(--scalar-background-2);\n left: 2px;\n top: 2px;\n z-index: 0;\n border-radius: var(--scalar-radius);\n}\n.client-libraries:active {\n color: var(--scalar-color-1);\n}\n.client-libraries:focus-visible {\n outline: none;\n box-shadow: inset 0 0 0 1px var(--scalar-color-accent);\n}\n/* remove php and c on mobile */\n@media screen and (max-width: 450px) {\n .client-libraries:nth-of-type(4),\n .client-libraries:nth-of-type(5) {\n display: none;\n }\n}\n.client-libraries-icon {\n max-width: 14px;\n max-height: 14px;\n min-width: 14px;\n width: 100%;\n aspect-ratio: 1;\n display: flex;\n align-items: center;\n justify-content: center;\n position: relative;\n box-sizing: border-box;\n color: currentColor;\n}\n.client-libraries-icon__more svg {\n height: initial;\n}\n@container client-libraries-content (width < 400px) {\n .client-libraries__select {\n width: fit-content;\n\n .client-libraries-icon__more + span {\n display: none;\n }\n }\n}\n@container client-libraries-content (width < 380px) {\n .client-libraries {\n width: 100%;\n }\n .client-libraries span {\n display: none;\n }\n}\n.client-libraries__active {\n color: var(--scalar-color-1);\n border-bottom: 1px solid var(--scalar-color-1);\n}\n@keyframes codeloader {\n 0% {\n transform: rotate(0deg);\n }\n to {\n transform: rotate(1turn);\n }\n}\n.client-libraries .client-libraries-text {\n font-size: var(--scalar-small);\n position: relative;\n display: flex;\n align-items: center;\n}\n.client-libraries__active .client-libraries-text {\n color: var(--scalar-color-1);\n font-weight: var(--scalar-semibold);\n}\n@media screen and (max-width: 600px) {\n .references-classic .client-libraries {\n flex-direction: column;\n }\n}\n</style>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA6BA,MAAM,eAAe,KAAiB;;;;;EAMtC,MAAM,wBAAwB,cAC5B,wBAAwB,cAAc,OAAO,eAAe;;EAG9D,MAAM,gBAAgB,WAA8C;AAClE,OAAI,CAAC,aAAa,MAChB;GAIF,MAAM,WAAW,cAAc,aAAa,MAAK;AACjD,oBAAiB;AACf,cAAS;MACR,IAAG;AAGN,OAAI,OAAO,cAAc,SACvB,SAAA,SAAS,KAAK,oCAAoC,OAAO,GAAE;;;EAK/D,MAAM,oBAAoB,eAClB,QAAA,gBAAgB,MAAM,IAAI,CAAC,GACnC;;uBAGE,mBAuEM,OAAA;aAtEA;IAAJ,KAAI;IACJ,OAAM;yBACN,mBAeM,UAAA,MAAA,WAdqB,QAAA,kBAAlB,mBAAc;wBADvB,YAeM,MAAA,IAAA,EAAA;KAbH,KAAK,eAAe;KACrB,OAAK,eAAA,CAAC,uCAAqC,EAAA,4BACG,eAAe,OAAO,QAAA,gBAAA,CAAA,CAAA;;4BAO9D,CAJN,mBAIM,OAAA,EAJA,OAAK,eAAA,0BAA4B,eAAe,YAAS,EAAA,EAAA,CAC7D,YAE2D,MAAA,WAAA,EAAA;MADzD,OAAM;MACL,MAAM,qBAAqB,eAAe,UAAS;iCAExD,mBAES,QAFT,YAES,gBADP,eAAe,YAAW,EAAA,EAAA,CAAA,CAAA;;;cAK9B,YAiDiB,MAAA,eAAA,EAAA;IAhDd,UAAU,MAAA,qBAAoB;IAC9B,YAAY,MAAA,WAAU,CAAC,QAAA,eAAe,QAAA,eAAc;IACpD,SAAS,QAAA;IACV,WAAU;IACV,UAAA;IACC,uBAAiB,OAAA,OAAA,OAAA,MAAA,WAAE,aAAa,OAAM;;2BA0C9B,CAzCT,mBAyCS,UAAA;KAxCP,OAAK,eAAA,CAAC,6CAA2C,EAAA,4BACW,QAAA,kBAAc,CAAK,MAAA,iBAAgB,CAAC,QAAA,eAAc,EAAA,CAAA,CAAA;KAI9G,MAAK;;KACL,mBA2BM,OA3BN,YA2BM,CAxBY,QAAA,kBAAc,CAAK,MAAA,iBAAgB,CAAC,QAAA,eAAc,IAAA,WAAA,EAChE,mBAKM,OAAA;;MALA,OAAK,eAAA,0BAA4B,kBAAA,QAAiB;SAE9C,kBAAA,SAAA,WAAA,EADR,YAGoD,MAAA,WAAA,EAAA;;MADlD,OAAM;MACL,MAAM,qBAAqB,kBAAA,MAAiB;iFAIjD,mBAaM,OAbN,YAaM,CAAA,GAAA,OAAA,OAAA,OAAA,KAAA,CANJ,mBAKI,KAAA;MAJF,MAAK;MACL,aAAU;SACV,mBACoL,QAAA,EAAlL,GAAE,+KAA6K,CAAA,CAAA,EAAA,GAAA,CAAA,EAAA,CAAA,EAAA,CAAA;KAMjL,QAAA,cAAc,UAAA,WAAA,EADtB,mBAIO,QAJP,YAE2D,SAE3D,IAAA,mBAAA,IAAA,KAAA;+BACA,mBAAoD,QAAA,EAA9C,OAAM,WAAS,EAAC,2BAAuB,GAAA"}
1
+ {"version":3,"file":"ClientDropdown.vue.script.js","names":[],"sources":["../../../../src/blocks/scalar-client-selector-block/components/ClientDropdown.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { Tab } from '@headlessui/vue'\nimport {\n filterClientsByQuery,\n findClient,\n type ClientOption,\n type ClientOptionGroup,\n type CustomClientOption,\n} from '@scalar/api-client/blocks/operation-code-sample'\nimport { ScalarCombobox } from '@scalar/components/combobox'\nimport { ScalarIcon } from '@scalar/components/icon'\nimport { freezeElement } from '@scalar/helpers/dom/freeze-element'\nimport type { AvailableClients, TargetId } from '@scalar/types/snippetz'\nimport { type WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport { computed, ref } from 'vue'\n\nimport { isFeaturedClient } from '@/blocks/scalar-client-selector-block/helpers/featured-clients'\n\nconst { clientOptions, featuredClients, eventBus, selectedClient } =\n defineProps<{\n /** Client options */\n clientOptions: ClientOptionGroup[]\n /** The currently selected Http Client */\n selectedClient?: AvailableClients[number]\n /** List of featured clients */\n featuredClients: ClientOption[]\n /** Event bus */\n eventBus: WorkspaceEventBus\n }>()\n\nconst containerRef = ref<HTMLElement>()\n\n/**\n * Icons have longer names to appear in icon searches, e.g. \"javascript-js\" instead of just \"javascript\". This function\n * maps the language key to the icon name.\n */\nconst getIconByLanguageKey = (targetKey: TargetId) =>\n `programming-language-${targetKey === 'js' ? 'javascript' : targetKey}` as const\n\n/** Set custom example, or update the selected HTTP client globally */\nconst selectClient = (option: ClientOption | CustomClientOption) => {\n if (!containerRef.value) {\n return\n }\n\n // We need to freeze the ui to prevent scrolling as the clients change\n const unfreeze = freezeElement(containerRef.value)\n setTimeout(() => {\n unfreeze()\n }, 300)\n\n // Update the store\n if (option.clientKey !== 'custom') {\n eventBus.emit('workspace:update:selected-client', option.id)\n }\n}\n\n/** Calculates the targetKey from the selected client id */\nconst selectedTargetKey = computed(\n () => selectedClient?.split('/')[0] as TargetId | undefined,\n)\n</script>\n<template>\n <div\n ref=\"containerRef\"\n class=\"client-libraries-content\">\n <Tab\n v-for=\"featuredClient in featuredClients\"\n :key=\"featuredClient.clientKey\"\n class=\"client-libraries rendered-code-sdks\"\n :class=\"{\n 'client-libraries__active': featuredClient.id === selectedClient,\n }\">\n <div :class=\"`client-libraries-icon__${featuredClient.targetKey}`\">\n <ScalarIcon\n class=\"client-libraries-icon\"\n :icon=\"getIconByLanguageKey(featuredClient.targetKey)\" />\n </div>\n <span class=\"client-libraries-text\">{{\n featuredClient.targetTitle\n }}</span>\n </Tab>\n\n <!-- Client Dropdown -->\n <ScalarCombobox\n :filterFn=\"filterClientsByQuery\"\n :modelValue=\"findClient(clientOptions, selectedClient)\"\n :options=\"clientOptions\"\n placement=\"bottom-end\"\n teleport\n @update:modelValue=\"selectClient($event as ClientOption)\">\n <button\n class=\"client-libraries client-libraries__select\"\n :class=\"{\n 'client-libraries__active':\n selectedClient && !isFeaturedClient(selectedClient),\n }\"\n type=\"button\">\n <div\n aria-hidden=\"true\"\n class=\"client-libraries-icon__more\">\n <template v-if=\"selectedClient && !isFeaturedClient(selectedClient)\">\n <div :class=\"`client-libraries-icon__${selectedTargetKey}`\">\n <ScalarIcon\n v-if=\"selectedTargetKey\"\n class=\"client-libraries-icon\"\n :icon=\"getIconByLanguageKey(selectedTargetKey)\" />\n </div>\n </template>\n <template v-else>\n <svg\n class=\"client-libraries-icon\"\n height=\"50\"\n role=\"presentation\"\n viewBox=\"0 0 50 50\"\n width=\"50\"\n xmlns=\"http://www.w3.org/2000/svg\">\n <g\n fill=\"currentColor\"\n fill-rule=\"nonzero\">\n <path\n d=\"M10.71 25.3a3.87 3.87 0 1 0 7.74 0 3.87 3.87 0 0 0-7.74 0M21.13 25.3a3.87 3.87 0 1 0 7.74 0 3.87 3.87 0 0 0-7.74 0M31.55 25.3a3.87 3.87 0 1 0 7.74 0 3.87 3.87 0 0 0-7.74 0\" />\n </g>\n </svg>\n </template>\n </div>\n <span\n v-if=\"clientOptions.length\"\n class=\"client-libraries-text client-libraries-text-more\">\n More\n </span>\n <span class=\"sr-only\">Select from all clients</span>\n </button>\n </ScalarCombobox>\n </div>\n</template>\n<style scoped>\n.client-libraries-content {\n container: client-libraries-content / inline-size;\n display: flex;\n justify-content: center;\n overflow: hidden;\n padding: 0 12px;\n background-color: var(--scalar-background-1);\n border-left: var(--scalar-border-width) solid var(--scalar-border-color);\n border-right: var(--scalar-border-width) solid var(--scalar-border-color);\n}\n.client-libraries {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 100%;\n position: relative;\n cursor: pointer;\n white-space: nowrap;\n padding: 8px 2px;\n gap: 6px;\n color: var(--scalar-color-3);\n border-bottom: 1px solid transparent;\n user-select: none;\n}\n\n.client-libraries:not(.client-libraries__active):hover:before {\n content: '';\n position: absolute;\n width: calc(100% - 4px);\n height: calc(100% - 4px);\n background: var(--scalar-background-2);\n left: 2px;\n top: 2px;\n z-index: 0;\n border-radius: var(--scalar-radius);\n}\n.client-libraries:active {\n color: var(--scalar-color-1);\n}\n.client-libraries:focus-visible {\n outline: none;\n box-shadow: inset 0 0 0 1px var(--scalar-color-accent);\n}\n/* remove php and c on mobile */\n@media screen and (max-width: 450px) {\n .client-libraries:nth-of-type(4),\n .client-libraries:nth-of-type(5) {\n display: none;\n }\n}\n.client-libraries-icon {\n max-width: 14px;\n max-height: 14px;\n min-width: 14px;\n width: 100%;\n aspect-ratio: 1;\n display: flex;\n align-items: center;\n justify-content: center;\n position: relative;\n box-sizing: border-box;\n color: currentColor;\n}\n.client-libraries-icon__more svg {\n height: initial;\n}\n@container client-libraries-content (width < 400px) {\n .client-libraries__select {\n width: fit-content;\n\n .client-libraries-icon__more + span {\n display: none;\n }\n }\n}\n@container client-libraries-content (width < 380px) {\n .client-libraries {\n width: 100%;\n }\n .client-libraries span {\n display: none;\n }\n}\n.client-libraries__active {\n color: var(--scalar-color-1);\n border-bottom: 1px solid var(--scalar-color-1);\n}\n@keyframes codeloader {\n 0% {\n transform: rotate(0deg);\n }\n to {\n transform: rotate(1turn);\n }\n}\n.client-libraries .client-libraries-text {\n font-size: var(--scalar-small);\n position: relative;\n display: flex;\n align-items: center;\n}\n.client-libraries__active .client-libraries-text {\n color: var(--scalar-color-1);\n font-weight: var(--scalar-semibold);\n}\n@media screen and (max-width: 600px) {\n .references-classic .client-libraries {\n flex-direction: column;\n }\n}\n</style>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA8BA,MAAM,eAAe,KAAiB;;;;;EAMtC,MAAM,wBAAwB,cAC5B,wBAAwB,cAAc,OAAO,eAAe;;EAG9D,MAAM,gBAAgB,WAA8C;AAClE,OAAI,CAAC,aAAa,MAChB;GAIF,MAAM,WAAW,cAAc,aAAa,MAAK;AACjD,oBAAiB;AACf,cAAS;MACR,IAAG;AAGN,OAAI,OAAO,cAAc,SACvB,SAAA,SAAS,KAAK,oCAAoC,OAAO,GAAE;;;EAK/D,MAAM,oBAAoB,eAClB,QAAA,gBAAgB,MAAM,IAAI,CAAC,GACnC;;uBAGE,mBAuEM,OAAA;aAtEA;IAAJ,KAAI;IACJ,OAAM;yBACN,mBAeM,UAAA,MAAA,WAdqB,QAAA,kBAAlB,mBAAc;wBADvB,YAeM,MAAA,IAAA,EAAA;KAbH,KAAK,eAAe;KACrB,OAAK,eAAA,CAAC,uCAAqC,EAAA,4BACG,eAAe,OAAO,QAAA,gBAAA,CAAA,CAAA;;4BAO9D,CAJN,mBAIM,OAAA,EAJA,OAAK,eAAA,0BAA4B,eAAe,YAAS,EAAA,EAAA,CAC7D,YAE2D,MAAA,WAAA,EAAA;MADzD,OAAM;MACL,MAAM,qBAAqB,eAAe,UAAS;iCAExD,mBAES,QAFT,YAES,gBADP,eAAe,YAAW,EAAA,EAAA,CAAA,CAAA;;;cAK9B,YAiDiB,MAAA,eAAA,EAAA;IAhDd,UAAU,MAAA,qBAAoB;IAC9B,YAAY,MAAA,WAAU,CAAC,QAAA,eAAe,QAAA,eAAc;IACpD,SAAS,QAAA;IACV,WAAU;IACV,UAAA;IACC,uBAAiB,OAAA,OAAA,OAAA,MAAA,WAAE,aAAa,OAAM;;2BA0C9B,CAzCT,mBAyCS,UAAA;KAxCP,OAAK,eAAA,CAAC,6CAA2C,EAAA,4BACW,QAAA,kBAAc,CAAK,MAAA,iBAAgB,CAAC,QAAA,eAAc,EAAA,CAAA,CAAA;KAI9G,MAAK;;KACL,mBA2BM,OA3BN,YA2BM,CAxBY,QAAA,kBAAc,CAAK,MAAA,iBAAgB,CAAC,QAAA,eAAc,IAAA,WAAA,EAChE,mBAKM,OAAA;;MALA,OAAK,eAAA,0BAA4B,kBAAA,QAAiB;SAE9C,kBAAA,SAAA,WAAA,EADR,YAGoD,MAAA,WAAA,EAAA;;MADlD,OAAM;MACL,MAAM,qBAAqB,kBAAA,MAAiB;iFAIjD,mBAaM,OAbN,YAaM,CAAA,GAAA,OAAA,OAAA,OAAA,KAAA,CANJ,mBAKI,KAAA;MAJF,MAAK;MACL,aAAU;SACV,mBACoL,QAAA,EAAlL,GAAE,+KAA6K,CAAA,CAAA,EAAA,GAAA,CAAA,EAAA,CAAA,EAAA,CAAA;KAMjL,QAAA,cAAc,UAAA,WAAA,EADtB,mBAIO,QAJP,YAE2D,SAE3D,IAAA,mBAAA,IAAA,KAAA;+BACA,mBAAoD,QAAA,EAA9C,OAAM,WAAS,EAAC,2BAAuB,GAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"ClientSelector.vue.d.ts","sourceRoot":"","sources":["../../../../src/blocks/scalar-client-selector-block/components/ClientSelector.vue"],"names":[],"mappings":"AAiNA,OAAO,EAEL,KAAK,iBAAiB,EACvB,MAAM,iDAAiD,CAAA;AAExD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAA;AACvD,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AACvE,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,+EAA+E,CAAA;AAU3H,KAAK,WAAW,GAAG;IACjB,6CAA6C;IAC7C,sBAAsB,CAAC,EAAE,sBAAsB,CAAC,2BAA2B,CAAC,CAAA;IAC5E,yDAAyD;IACzD,aAAa,EAAE,iBAAiB,EAAE,CAAA;IAClC,yCAAyC;IACzC,cAAc,CAAC,EAAE,eAAe,CAAA;IAChC,gBAAgB;IAChB,QAAQ,EAAE,iBAAiB,CAAA;CAC5B,CAAC;AA8RF,QAAA,MAAM,YAAY;;oPAGhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
1
+ {"version":3,"file":"ClientSelector.vue.d.ts","sourceRoot":"","sources":["../../../../src/blocks/scalar-client-selector-block/components/ClientSelector.vue"],"names":[],"mappings":"AAkNA,OAAO,EAEL,KAAK,iBAAiB,EACvB,MAAM,iDAAiD,CAAA;AAGxD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAA;AACvD,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AACvE,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,+EAA+E,CAAA;AAU3H,KAAK,WAAW,GAAG;IACjB,6CAA6C;IAC7C,sBAAsB,CAAC,EAAE,sBAAsB,CAAC,2BAA2B,CAAC,CAAA;IAC5E,yDAAyD;IACzD,aAAa,EAAE,iBAAiB,EAAE,CAAA;IAClC,yCAAyC;IACzC,cAAc,CAAC,EAAE,eAAe,CAAA;IAChC,gBAAgB;IAChB,QAAQ,EAAE,iBAAiB,CAAA;CAC5B,CAAC;AA8RF,QAAA,MAAM,YAAY;;oPAGhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
@@ -2,7 +2,7 @@ import _plugin_vue_export_helper_default from "../../../_virtual/_plugin-vue_exp
2
2
  import ClientSelector_vue_vue_type_script_setup_true_lang_default from "./ClientSelector.vue.script.js";
3
3
  /* empty css */
4
4
  //#region src/blocks/scalar-client-selector-block/components/ClientSelector.vue
5
- var ClientSelector_default = /* @__PURE__ */ _plugin_vue_export_helper_default(ClientSelector_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-c6251633"]]);
5
+ var ClientSelector_default = /* @__PURE__ */ _plugin_vue_export_helper_default(ClientSelector_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-570e3418"]]);
6
6
  //#endregion
7
7
  export { ClientSelector_default as default };
8
8
 
@@ -1 +1 @@
1
- {"version":3,"file":"ClientSelector.vue.js","names":[],"sources":["../../../../src/blocks/scalar-client-selector-block/components/ClientSelector.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { TabGroup, TabList, TabPanel, TabPanels } from '@headlessui/vue'\nimport {\n DEFAULT_CLIENT,\n type ClientOptionGroup,\n} from '@scalar/api-client/blocks/operation-code-sample'\nimport { ScalarCodeBlock, ScalarMarkdown } from '@scalar/components'\nimport type { AvailableClient } from '@scalar/snippetz'\nimport { type WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport type { XScalarSdkInstallation } from '@scalar/workspace-store/schemas/extensions/document/x-scalar-sdk-installation'\nimport { computed, useId, useTemplateRef } from 'vue'\n\nimport {\n getFeaturedClients,\n isFeaturedClient,\n} from '@/blocks/scalar-client-selector-block/helpers/featured-clients'\n\nimport ClientDropdown from './ClientDropdown.vue'\n\nconst {\n clientOptions,\n xScalarSdkInstallation,\n eventBus,\n selectedClient = DEFAULT_CLIENT,\n} = defineProps<{\n /** Selected SDK installation instructions */\n xScalarSdkInstallation?: XScalarSdkInstallation['x-scalar-sdk-installation']\n /** Computed list of all available Http Client options */\n clientOptions: ClientOptionGroup[]\n /** The currently selected Http Client */\n selectedClient?: AvailableClient\n /** Event bus */\n eventBus: WorkspaceEventBus\n}>()\n\nconst headingId = useId()\nconst morePanel = useId()\n\n/** Grab the option for the currently selected Http Client */\nconst selectedClientOption = computed(\n () =>\n clientOptions.flatMap(\n (optionGroup) =>\n optionGroup.options.find((option) => option.id === selectedClient) ??\n [],\n )[0],\n)\n\n/** List of featured clients */\nconst featuredClients = computed(() => getFeaturedClients(clientOptions))\n\n/** Currently selected tab index */\nconst tabIndex = computed(() =>\n featuredClients.value.findIndex(\n (featuredClient) => selectedClient === featuredClient.id,\n ),\n)\n\nconst wrapper = useTemplateRef('wrapper-ref')\n\n/** Emit the selected client event on tab */\nconst onTabSelect = (i: number) => {\n const client = featuredClients.value[i]\n\n if (!client || !wrapper.value) {\n return\n }\n\n eventBus.emit('workspace:update:selected-client', client.id)\n}\n\nconst installationInstructions = computed(() => {\n // Check whether we have instructions at all\n if (\n !Array.isArray(xScalarSdkInstallation) ||\n !xScalarSdkInstallation?.length\n ) {\n return undefined\n }\n\n // Find the instructions for the current language\n const instruction = xScalarSdkInstallation.find((instruction) => {\n const targetKey = selectedClient?.split('/')[0]?.toLowerCase()\n return instruction.lang.toLowerCase() === targetKey\n })\n\n // Nothing found?\n if (!instruction) {\n return undefined\n }\n\n // Got it!\n return instruction\n})\n\ndefineExpose({\n selectedClientOption,\n})\n</script>\n<template>\n <div\n v-if=\"clientOptions.length\"\n ref=\"wrapper-ref\">\n <TabGroup\n manual\n :selectedIndex=\"tabIndex\"\n @change=\"onTabSelect\">\n <div\n :id=\"headingId\"\n class=\"client-libraries-heading\">\n Client Libraries\n </div>\n\n <!-- Tabs -->\n <TabList\n :aria-labelledby=\"headingId\"\n class=\"client-libraries-list\">\n <ClientDropdown\n :clientOptions\n :eventBus\n :featuredClients\n :morePanel\n :selectedClient />\n </TabList>\n\n <!-- Content -->\n <TabPanels>\n <template\n v-if=\"\n installationInstructions?.source ||\n installationInstructions?.description\n \">\n <div\n v-if=\"installationInstructions.description\"\n class=\"selected-client card-footer -outline-offset-2\"\n :class=\"installationInstructions.source && 'rounded-b-none'\"\n role=\"tabpanel\"\n tabindex=\"0\">\n <ScalarMarkdown :value=\"installationInstructions.description\" />\n </div>\n <div\n v-if=\"installationInstructions.source\"\n class=\"selected-client card-footer border-t-0 p-0\"\n role=\"tabpanel\"\n tabindex=\"1\">\n <ScalarCodeBlock\n class=\"rounded-b-lg *:first:p-3\"\n :content=\"installationInstructions.source\"\n copy=\"always\"\n lang=\"shell\" />\n </div>\n </template>\n <template v-else-if=\"isFeaturedClient(selectedClient)\">\n <TabPanel\n v-for=\"client in featuredClients\"\n :key=\"client.id\"\n class=\"selected-client card-footer -outline-offset-2\">\n {{ client.title }}\n </TabPanel>\n </template>\n <div\n v-else\n :id=\"morePanel\"\n class=\"selected-client card-footer -outline-offset-2\"\n role=\"tabpanel\"\n tabindex=\"0\">\n {{ selectedClientOption?.title }}\n </div>\n </TabPanels>\n </TabGroup>\n </div>\n</template>\n<style scoped>\n.selected-client {\n color: var(--scalar-color-1);\n font-size: var(--scalar-small);\n font-family: var(--scalar-font-code);\n padding: 9px 12px;\n border-top: none;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n background: var(--scalar-background-1);\n border: var(--scalar-border-width) solid var(--scalar-border-color);\n border-bottom-left-radius: var(--scalar-radius-xl);\n border-bottom-right-radius: var(--scalar-radius-xl);\n min-height: fit-content;\n}\n.client-libraries-heading {\n font-size: var(--scalar-small);\n font-weight: var(--scalar-font-medium);\n color: var(--scalar-color-1);\n padding: 9px 12px;\n background-color: var(--scalar-background-2);\n display: flex;\n align-items: center;\n max-height: 32px;\n border: var(--scalar-border-width) solid var(--scalar-border-color);\n border-top-left-radius: var(--scalar-radius-xl);\n border-top-right-radius: var(--scalar-radius-xl);\n}\n:deep(.scalar-codeblock-pre .hljs) {\n margin-top: 8px;\n}\n</style>\n"],"mappings":""}
1
+ {"version":3,"file":"ClientSelector.vue.js","names":[],"sources":["../../../../src/blocks/scalar-client-selector-block/components/ClientSelector.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { TabGroup, TabList, TabPanel, TabPanels } from '@headlessui/vue'\nimport {\n DEFAULT_CLIENT,\n type ClientOptionGroup,\n} from '@scalar/api-client/blocks/operation-code-sample'\nimport { ScalarCodeBlock } from '@scalar/components/code-block'\nimport { ScalarMarkdown } from '@scalar/components/markdown'\nimport type { AvailableClient } from '@scalar/snippetz'\nimport { type WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport type { XScalarSdkInstallation } from '@scalar/workspace-store/schemas/extensions/document/x-scalar-sdk-installation'\nimport { computed, useId, useTemplateRef } from 'vue'\n\nimport {\n getFeaturedClients,\n isFeaturedClient,\n} from '@/blocks/scalar-client-selector-block/helpers/featured-clients'\n\nimport ClientDropdown from './ClientDropdown.vue'\n\nconst {\n clientOptions,\n xScalarSdkInstallation,\n eventBus,\n selectedClient = DEFAULT_CLIENT,\n} = defineProps<{\n /** Selected SDK installation instructions */\n xScalarSdkInstallation?: XScalarSdkInstallation['x-scalar-sdk-installation']\n /** Computed list of all available Http Client options */\n clientOptions: ClientOptionGroup[]\n /** The currently selected Http Client */\n selectedClient?: AvailableClient\n /** Event bus */\n eventBus: WorkspaceEventBus\n}>()\n\nconst headingId = useId()\nconst morePanel = useId()\n\n/** Grab the option for the currently selected Http Client */\nconst selectedClientOption = computed(\n () =>\n clientOptions.flatMap(\n (optionGroup) =>\n optionGroup.options.find((option) => option.id === selectedClient) ??\n [],\n )[0],\n)\n\n/** List of featured clients */\nconst featuredClients = computed(() => getFeaturedClients(clientOptions))\n\n/** Currently selected tab index */\nconst tabIndex = computed(() =>\n featuredClients.value.findIndex(\n (featuredClient) => selectedClient === featuredClient.id,\n ),\n)\n\nconst wrapper = useTemplateRef('wrapper-ref')\n\n/** Emit the selected client event on tab */\nconst onTabSelect = (i: number) => {\n const client = featuredClients.value[i]\n\n if (!client || !wrapper.value) {\n return\n }\n\n eventBus.emit('workspace:update:selected-client', client.id)\n}\n\nconst installationInstructions = computed(() => {\n // Check whether we have instructions at all\n if (\n !Array.isArray(xScalarSdkInstallation) ||\n !xScalarSdkInstallation?.length\n ) {\n return undefined\n }\n\n // Find the instructions for the current language\n const instruction = xScalarSdkInstallation.find((instruction) => {\n const targetKey = selectedClient?.split('/')[0]?.toLowerCase()\n return instruction.lang.toLowerCase() === targetKey\n })\n\n // Nothing found?\n if (!instruction) {\n return undefined\n }\n\n // Got it!\n return instruction\n})\n\ndefineExpose({\n selectedClientOption,\n})\n</script>\n<template>\n <div\n v-if=\"clientOptions.length\"\n ref=\"wrapper-ref\">\n <TabGroup\n manual\n :selectedIndex=\"tabIndex\"\n @change=\"onTabSelect\">\n <div\n :id=\"headingId\"\n class=\"client-libraries-heading\">\n Client Libraries\n </div>\n\n <!-- Tabs -->\n <TabList\n :aria-labelledby=\"headingId\"\n class=\"client-libraries-list\">\n <ClientDropdown\n :clientOptions\n :eventBus\n :featuredClients\n :morePanel\n :selectedClient />\n </TabList>\n\n <!-- Content -->\n <TabPanels>\n <template\n v-if=\"\n installationInstructions?.source ||\n installationInstructions?.description\n \">\n <div\n v-if=\"installationInstructions.description\"\n class=\"selected-client card-footer -outline-offset-2\"\n :class=\"installationInstructions.source && 'rounded-b-none'\"\n role=\"tabpanel\"\n tabindex=\"0\">\n <ScalarMarkdown :value=\"installationInstructions.description\" />\n </div>\n <div\n v-if=\"installationInstructions.source\"\n class=\"selected-client card-footer border-t-0 p-0\"\n role=\"tabpanel\"\n tabindex=\"1\">\n <ScalarCodeBlock\n class=\"rounded-b-lg *:first:p-3\"\n :content=\"installationInstructions.source\"\n copy=\"always\"\n lang=\"shell\" />\n </div>\n </template>\n <template v-else-if=\"isFeaturedClient(selectedClient)\">\n <TabPanel\n v-for=\"client in featuredClients\"\n :key=\"client.id\"\n class=\"selected-client card-footer -outline-offset-2\">\n {{ client.title }}\n </TabPanel>\n </template>\n <div\n v-else\n :id=\"morePanel\"\n class=\"selected-client card-footer -outline-offset-2\"\n role=\"tabpanel\"\n tabindex=\"0\">\n {{ selectedClientOption?.title }}\n </div>\n </TabPanels>\n </TabGroup>\n </div>\n</template>\n<style scoped>\n.selected-client {\n color: var(--scalar-color-1);\n font-size: var(--scalar-small);\n font-family: var(--scalar-font-code);\n padding: 9px 12px;\n border-top: none;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n background: var(--scalar-background-1);\n border: var(--scalar-border-width) solid var(--scalar-border-color);\n border-bottom-left-radius: var(--scalar-radius-xl);\n border-bottom-right-radius: var(--scalar-radius-xl);\n min-height: fit-content;\n}\n.client-libraries-heading {\n font-size: var(--scalar-small);\n font-weight: var(--scalar-font-medium);\n color: var(--scalar-color-1);\n padding: 9px 12px;\n background-color: var(--scalar-background-2);\n display: flex;\n align-items: center;\n max-height: 32px;\n border: var(--scalar-border-width) solid var(--scalar-border-color);\n border-top-left-radius: var(--scalar-radius-xl);\n border-top-right-radius: var(--scalar-radius-xl);\n}\n:deep(.scalar-codeblock-pre .hljs) {\n margin-top: 8px;\n}\n</style>\n"],"mappings":""}
@@ -2,8 +2,9 @@ import { getFeaturedClients, isFeaturedClient } from "../helpers/featured-client
2
2
  import ClientDropdown_default from "./ClientDropdown.vue.js";
3
3
  import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, createVNode, defineComponent, normalizeClass, openBlock, renderList, toDisplayString, unref, useId, useTemplateRef, withCtx } from "vue";
4
4
  import { TabGroup, TabList, TabPanel, TabPanels } from "@headlessui/vue";
5
- import { ScalarCodeBlock, ScalarMarkdown } from "@scalar/components";
6
5
  import { DEFAULT_CLIENT } from "@scalar/api-client/blocks/operation-code-sample";
6
+ import { ScalarCodeBlock } from "@scalar/components/code-block";
7
+ import { ScalarMarkdown } from "@scalar/components/markdown";
7
8
  //#region src/blocks/scalar-client-selector-block/components/ClientSelector.vue?vue&type=script&setup=true&lang.ts
8
9
  var _hoisted_1 = {
9
10
  key: 0,
@@ -1 +1 @@
1
- {"version":3,"file":"ClientSelector.vue.script.js","names":[],"sources":["../../../../src/blocks/scalar-client-selector-block/components/ClientSelector.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { TabGroup, TabList, TabPanel, TabPanels } from '@headlessui/vue'\nimport {\n DEFAULT_CLIENT,\n type ClientOptionGroup,\n} from '@scalar/api-client/blocks/operation-code-sample'\nimport { ScalarCodeBlock, ScalarMarkdown } from '@scalar/components'\nimport type { AvailableClient } from '@scalar/snippetz'\nimport { type WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport type { XScalarSdkInstallation } from '@scalar/workspace-store/schemas/extensions/document/x-scalar-sdk-installation'\nimport { computed, useId, useTemplateRef } from 'vue'\n\nimport {\n getFeaturedClients,\n isFeaturedClient,\n} from '@/blocks/scalar-client-selector-block/helpers/featured-clients'\n\nimport ClientDropdown from './ClientDropdown.vue'\n\nconst {\n clientOptions,\n xScalarSdkInstallation,\n eventBus,\n selectedClient = DEFAULT_CLIENT,\n} = defineProps<{\n /** Selected SDK installation instructions */\n xScalarSdkInstallation?: XScalarSdkInstallation['x-scalar-sdk-installation']\n /** Computed list of all available Http Client options */\n clientOptions: ClientOptionGroup[]\n /** The currently selected Http Client */\n selectedClient?: AvailableClient\n /** Event bus */\n eventBus: WorkspaceEventBus\n}>()\n\nconst headingId = useId()\nconst morePanel = useId()\n\n/** Grab the option for the currently selected Http Client */\nconst selectedClientOption = computed(\n () =>\n clientOptions.flatMap(\n (optionGroup) =>\n optionGroup.options.find((option) => option.id === selectedClient) ??\n [],\n )[0],\n)\n\n/** List of featured clients */\nconst featuredClients = computed(() => getFeaturedClients(clientOptions))\n\n/** Currently selected tab index */\nconst tabIndex = computed(() =>\n featuredClients.value.findIndex(\n (featuredClient) => selectedClient === featuredClient.id,\n ),\n)\n\nconst wrapper = useTemplateRef('wrapper-ref')\n\n/** Emit the selected client event on tab */\nconst onTabSelect = (i: number) => {\n const client = featuredClients.value[i]\n\n if (!client || !wrapper.value) {\n return\n }\n\n eventBus.emit('workspace:update:selected-client', client.id)\n}\n\nconst installationInstructions = computed(() => {\n // Check whether we have instructions at all\n if (\n !Array.isArray(xScalarSdkInstallation) ||\n !xScalarSdkInstallation?.length\n ) {\n return undefined\n }\n\n // Find the instructions for the current language\n const instruction = xScalarSdkInstallation.find((instruction) => {\n const targetKey = selectedClient?.split('/')[0]?.toLowerCase()\n return instruction.lang.toLowerCase() === targetKey\n })\n\n // Nothing found?\n if (!instruction) {\n return undefined\n }\n\n // Got it!\n return instruction\n})\n\ndefineExpose({\n selectedClientOption,\n})\n</script>\n<template>\n <div\n v-if=\"clientOptions.length\"\n ref=\"wrapper-ref\">\n <TabGroup\n manual\n :selectedIndex=\"tabIndex\"\n @change=\"onTabSelect\">\n <div\n :id=\"headingId\"\n class=\"client-libraries-heading\">\n Client Libraries\n </div>\n\n <!-- Tabs -->\n <TabList\n :aria-labelledby=\"headingId\"\n class=\"client-libraries-list\">\n <ClientDropdown\n :clientOptions\n :eventBus\n :featuredClients\n :morePanel\n :selectedClient />\n </TabList>\n\n <!-- Content -->\n <TabPanels>\n <template\n v-if=\"\n installationInstructions?.source ||\n installationInstructions?.description\n \">\n <div\n v-if=\"installationInstructions.description\"\n class=\"selected-client card-footer -outline-offset-2\"\n :class=\"installationInstructions.source && 'rounded-b-none'\"\n role=\"tabpanel\"\n tabindex=\"0\">\n <ScalarMarkdown :value=\"installationInstructions.description\" />\n </div>\n <div\n v-if=\"installationInstructions.source\"\n class=\"selected-client card-footer border-t-0 p-0\"\n role=\"tabpanel\"\n tabindex=\"1\">\n <ScalarCodeBlock\n class=\"rounded-b-lg *:first:p-3\"\n :content=\"installationInstructions.source\"\n copy=\"always\"\n lang=\"shell\" />\n </div>\n </template>\n <template v-else-if=\"isFeaturedClient(selectedClient)\">\n <TabPanel\n v-for=\"client in featuredClients\"\n :key=\"client.id\"\n class=\"selected-client card-footer -outline-offset-2\">\n {{ client.title }}\n </TabPanel>\n </template>\n <div\n v-else\n :id=\"morePanel\"\n class=\"selected-client card-footer -outline-offset-2\"\n role=\"tabpanel\"\n tabindex=\"0\">\n {{ selectedClientOption?.title }}\n </div>\n </TabPanels>\n </TabGroup>\n </div>\n</template>\n<style scoped>\n.selected-client {\n color: var(--scalar-color-1);\n font-size: var(--scalar-small);\n font-family: var(--scalar-font-code);\n padding: 9px 12px;\n border-top: none;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n background: var(--scalar-background-1);\n border: var(--scalar-border-width) solid var(--scalar-border-color);\n border-bottom-left-radius: var(--scalar-radius-xl);\n border-bottom-right-radius: var(--scalar-radius-xl);\n min-height: fit-content;\n}\n.client-libraries-heading {\n font-size: var(--scalar-small);\n font-weight: var(--scalar-font-medium);\n color: var(--scalar-color-1);\n padding: 9px 12px;\n background-color: var(--scalar-background-2);\n display: flex;\n align-items: center;\n max-height: 32px;\n border: var(--scalar-border-width) solid var(--scalar-border-color);\n border-top-left-radius: var(--scalar-radius-xl);\n border-top-right-radius: var(--scalar-radius-xl);\n}\n:deep(.scalar-codeblock-pre .hljs) {\n margin-top: 8px;\n}\n</style>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;EAmCA,MAAM,YAAY,OAAM;EACxB,MAAM,YAAY,OAAM;;EAGxB,MAAM,uBAAuB,eAEzB,QAAA,cAAc,SACX,gBACC,YAAY,QAAQ,MAAM,WAAW,OAAO,OAAO,QAAA,eAAe,IAClE,EAAE,CACL,CAAC,GACN;;EAGA,MAAM,kBAAkB,eAAe,mBAAmB,QAAA,cAAc,CAAA;;EAGxE,MAAM,WAAW,eACf,gBAAgB,MAAM,WACnB,mBAAmB,QAAA,mBAAmB,eAAe,GACvD,CACH;EAEA,MAAM,UAAU,eAAe,cAAa;;EAG5C,MAAM,eAAe,MAAc;GACjC,MAAM,SAAS,gBAAgB,MAAM;AAErC,OAAI,CAAC,UAAU,CAAC,QAAQ,MACtB;AAGF,WAAA,SAAS,KAAK,oCAAoC,OAAO,GAAE;;EAG7D,MAAM,2BAA2B,eAAe;AAE9C,OACE,CAAC,MAAM,QAAQ,QAAA,uBAAuB,IACtC,CAAC,QAAA,wBAAwB,OAEzB;GAIF,MAAM,cAAc,QAAA,uBAAuB,MAAM,gBAAgB;IAC/D,MAAM,YAAY,QAAA,gBAAgB,MAAM,IAAI,CAAC,IAAI,aAAY;AAC7D,WAAO,YAAY,KAAK,aAAa,KAAK;KAC3C;AAGD,OAAI,CAAC,YACH;AAIF,UAAO;IACR;AAED,WAAa,EACX,sBACD,CAAA;;UAIS,QAAA,cAAc,UAAA,WAAA,EADtB,mBAsEM,OAtEN,YAsEM,CAnEJ,YAkEW,MAAA,SAAA,EAAA;IAjET,QAAA;IACC,eAAe,SAAA;IACf,UAAQ;;2BAKH;KAJN,mBAIM,OAAA;MAHH,IAAI,MAAA,UAAS;MACd,OAAM;QAA2B,sBAEnC,GAAA,WAAA;KAGA,YASU,MAAA,QAAA,EAAA;MARP,mBAAiB,MAAA,UAAS;MAC3B,OAAM;;6BAMc,CALpB,YAKoB,wBAAA;OAJjB,eAAA,QAAA;OACA,UAAA,QAAA;OACA,iBAAA,gBAAA;OACA,WAAA,MAAA,UAAS;OACT,gBAAA,QAAA;;;;;;;;;;KAIL,YA0CY,MAAA,UAAA,EAAA,MAAA;6BAjBC,CAvBU,yBAAA,OAA0B,UAAsB,yBAAA,OAA0B,eAAA,WAAA,EAD/F,mBAwBW,UAAA,EAAA,KAAA,GAAA,EAAA,CAlBD,yBAAA,MAAyB,eAAA,WAAA,EADjC,mBAOM,OAAA;;OALJ,OAAK,eAAA,CAAC,iDACE,yBAAA,MAAyB,UAAM,iBAAA,CAAA;OACvC,MAAK;OACL,UAAS;UACT,YAAgE,MAAA,eAAA,EAAA,EAA/C,OAAO,yBAAA,MAAyB,aAAA,EAAA,MAAA,GAAA,CAAA,QAAA,CAAA,CAAA,EAAA,EAAA,IAAA,mBAAA,IAAA,KAAA,EAG3C,yBAAA,MAAyB,UAAA,WAAA,EADjC,mBAUM,OAVN,YAUM,CALJ,YAIiB,MAAA,gBAAA,EAAA;OAHf,OAAM;OACL,SAAS,yBAAA,MAAyB;OACnC,MAAK;OACL,MAAK;0EAGU,MAAA,iBAAgB,CAAC,QAAA,eAAc,IAAA,UAAA,KAAA,EAClD,mBAKW,UAAA,EAAA,KAAA,GAAA,EAAA,WAJQ,gBAAA,QAAV,WAAM;2BADf,YAKW,MAAA,SAAA,EAAA;QAHR,KAAK,OAAO;QACb,OAAM;;+BACY,CAAA,gBAAA,gBAAf,OAAO,MAAK,EAAA,EAAA,CAAA,CAAA;;;gCAGnB,mBAOM,OAAA;;OALH,IAAI,MAAA,UAAS;OACd,OAAM;OACN,MAAK;OACL,UAAS;yBACN,qBAAA,OAAsB,MAAK,EAAA,GAAA,WAAA,EAAA,CAAA"}
1
+ {"version":3,"file":"ClientSelector.vue.script.js","names":[],"sources":["../../../../src/blocks/scalar-client-selector-block/components/ClientSelector.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { TabGroup, TabList, TabPanel, TabPanels } from '@headlessui/vue'\nimport {\n DEFAULT_CLIENT,\n type ClientOptionGroup,\n} from '@scalar/api-client/blocks/operation-code-sample'\nimport { ScalarCodeBlock } from '@scalar/components/code-block'\nimport { ScalarMarkdown } from '@scalar/components/markdown'\nimport type { AvailableClient } from '@scalar/snippetz'\nimport { type WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport type { XScalarSdkInstallation } from '@scalar/workspace-store/schemas/extensions/document/x-scalar-sdk-installation'\nimport { computed, useId, useTemplateRef } from 'vue'\n\nimport {\n getFeaturedClients,\n isFeaturedClient,\n} from '@/blocks/scalar-client-selector-block/helpers/featured-clients'\n\nimport ClientDropdown from './ClientDropdown.vue'\n\nconst {\n clientOptions,\n xScalarSdkInstallation,\n eventBus,\n selectedClient = DEFAULT_CLIENT,\n} = defineProps<{\n /** Selected SDK installation instructions */\n xScalarSdkInstallation?: XScalarSdkInstallation['x-scalar-sdk-installation']\n /** Computed list of all available Http Client options */\n clientOptions: ClientOptionGroup[]\n /** The currently selected Http Client */\n selectedClient?: AvailableClient\n /** Event bus */\n eventBus: WorkspaceEventBus\n}>()\n\nconst headingId = useId()\nconst morePanel = useId()\n\n/** Grab the option for the currently selected Http Client */\nconst selectedClientOption = computed(\n () =>\n clientOptions.flatMap(\n (optionGroup) =>\n optionGroup.options.find((option) => option.id === selectedClient) ??\n [],\n )[0],\n)\n\n/** List of featured clients */\nconst featuredClients = computed(() => getFeaturedClients(clientOptions))\n\n/** Currently selected tab index */\nconst tabIndex = computed(() =>\n featuredClients.value.findIndex(\n (featuredClient) => selectedClient === featuredClient.id,\n ),\n)\n\nconst wrapper = useTemplateRef('wrapper-ref')\n\n/** Emit the selected client event on tab */\nconst onTabSelect = (i: number) => {\n const client = featuredClients.value[i]\n\n if (!client || !wrapper.value) {\n return\n }\n\n eventBus.emit('workspace:update:selected-client', client.id)\n}\n\nconst installationInstructions = computed(() => {\n // Check whether we have instructions at all\n if (\n !Array.isArray(xScalarSdkInstallation) ||\n !xScalarSdkInstallation?.length\n ) {\n return undefined\n }\n\n // Find the instructions for the current language\n const instruction = xScalarSdkInstallation.find((instruction) => {\n const targetKey = selectedClient?.split('/')[0]?.toLowerCase()\n return instruction.lang.toLowerCase() === targetKey\n })\n\n // Nothing found?\n if (!instruction) {\n return undefined\n }\n\n // Got it!\n return instruction\n})\n\ndefineExpose({\n selectedClientOption,\n})\n</script>\n<template>\n <div\n v-if=\"clientOptions.length\"\n ref=\"wrapper-ref\">\n <TabGroup\n manual\n :selectedIndex=\"tabIndex\"\n @change=\"onTabSelect\">\n <div\n :id=\"headingId\"\n class=\"client-libraries-heading\">\n Client Libraries\n </div>\n\n <!-- Tabs -->\n <TabList\n :aria-labelledby=\"headingId\"\n class=\"client-libraries-list\">\n <ClientDropdown\n :clientOptions\n :eventBus\n :featuredClients\n :morePanel\n :selectedClient />\n </TabList>\n\n <!-- Content -->\n <TabPanels>\n <template\n v-if=\"\n installationInstructions?.source ||\n installationInstructions?.description\n \">\n <div\n v-if=\"installationInstructions.description\"\n class=\"selected-client card-footer -outline-offset-2\"\n :class=\"installationInstructions.source && 'rounded-b-none'\"\n role=\"tabpanel\"\n tabindex=\"0\">\n <ScalarMarkdown :value=\"installationInstructions.description\" />\n </div>\n <div\n v-if=\"installationInstructions.source\"\n class=\"selected-client card-footer border-t-0 p-0\"\n role=\"tabpanel\"\n tabindex=\"1\">\n <ScalarCodeBlock\n class=\"rounded-b-lg *:first:p-3\"\n :content=\"installationInstructions.source\"\n copy=\"always\"\n lang=\"shell\" />\n </div>\n </template>\n <template v-else-if=\"isFeaturedClient(selectedClient)\">\n <TabPanel\n v-for=\"client in featuredClients\"\n :key=\"client.id\"\n class=\"selected-client card-footer -outline-offset-2\">\n {{ client.title }}\n </TabPanel>\n </template>\n <div\n v-else\n :id=\"morePanel\"\n class=\"selected-client card-footer -outline-offset-2\"\n role=\"tabpanel\"\n tabindex=\"0\">\n {{ selectedClientOption?.title }}\n </div>\n </TabPanels>\n </TabGroup>\n </div>\n</template>\n<style scoped>\n.selected-client {\n color: var(--scalar-color-1);\n font-size: var(--scalar-small);\n font-family: var(--scalar-font-code);\n padding: 9px 12px;\n border-top: none;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n background: var(--scalar-background-1);\n border: var(--scalar-border-width) solid var(--scalar-border-color);\n border-bottom-left-radius: var(--scalar-radius-xl);\n border-bottom-right-radius: var(--scalar-radius-xl);\n min-height: fit-content;\n}\n.client-libraries-heading {\n font-size: var(--scalar-small);\n font-weight: var(--scalar-font-medium);\n color: var(--scalar-color-1);\n padding: 9px 12px;\n background-color: var(--scalar-background-2);\n display: flex;\n align-items: center;\n max-height: 32px;\n border: var(--scalar-border-width) solid var(--scalar-border-color);\n border-top-left-radius: var(--scalar-radius-xl);\n border-top-right-radius: var(--scalar-radius-xl);\n}\n:deep(.scalar-codeblock-pre .hljs) {\n margin-top: 8px;\n}\n</style>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAoCA,MAAM,YAAY,OAAM;EACxB,MAAM,YAAY,OAAM;;EAGxB,MAAM,uBAAuB,eAEzB,QAAA,cAAc,SACX,gBACC,YAAY,QAAQ,MAAM,WAAW,OAAO,OAAO,QAAA,eAAe,IAClE,EAAE,CACL,CAAC,GACN;;EAGA,MAAM,kBAAkB,eAAe,mBAAmB,QAAA,cAAc,CAAA;;EAGxE,MAAM,WAAW,eACf,gBAAgB,MAAM,WACnB,mBAAmB,QAAA,mBAAmB,eAAe,GACvD,CACH;EAEA,MAAM,UAAU,eAAe,cAAa;;EAG5C,MAAM,eAAe,MAAc;GACjC,MAAM,SAAS,gBAAgB,MAAM;AAErC,OAAI,CAAC,UAAU,CAAC,QAAQ,MACtB;AAGF,WAAA,SAAS,KAAK,oCAAoC,OAAO,GAAE;;EAG7D,MAAM,2BAA2B,eAAe;AAE9C,OACE,CAAC,MAAM,QAAQ,QAAA,uBAAuB,IACtC,CAAC,QAAA,wBAAwB,OAEzB;GAIF,MAAM,cAAc,QAAA,uBAAuB,MAAM,gBAAgB;IAC/D,MAAM,YAAY,QAAA,gBAAgB,MAAM,IAAI,CAAC,IAAI,aAAY;AAC7D,WAAO,YAAY,KAAK,aAAa,KAAK;KAC3C;AAGD,OAAI,CAAC,YACH;AAIF,UAAO;IACR;AAED,WAAa,EACX,sBACD,CAAA;;UAIS,QAAA,cAAc,UAAA,WAAA,EADtB,mBAsEM,OAtEN,YAsEM,CAnEJ,YAkEW,MAAA,SAAA,EAAA;IAjET,QAAA;IACC,eAAe,SAAA;IACf,UAAQ;;2BAKH;KAJN,mBAIM,OAAA;MAHH,IAAI,MAAA,UAAS;MACd,OAAM;QAA2B,sBAEnC,GAAA,WAAA;KAGA,YASU,MAAA,QAAA,EAAA;MARP,mBAAiB,MAAA,UAAS;MAC3B,OAAM;;6BAMc,CALpB,YAKoB,wBAAA;OAJjB,eAAA,QAAA;OACA,UAAA,QAAA;OACA,iBAAA,gBAAA;OACA,WAAA,MAAA,UAAS;OACT,gBAAA,QAAA;;;;;;;;;;KAIL,YA0CY,MAAA,UAAA,EAAA,MAAA;6BAjBC,CAvBU,yBAAA,OAA0B,UAAsB,yBAAA,OAA0B,eAAA,WAAA,EAD/F,mBAwBW,UAAA,EAAA,KAAA,GAAA,EAAA,CAlBD,yBAAA,MAAyB,eAAA,WAAA,EADjC,mBAOM,OAAA;;OALJ,OAAK,eAAA,CAAC,iDACE,yBAAA,MAAyB,UAAM,iBAAA,CAAA;OACvC,MAAK;OACL,UAAS;UACT,YAAgE,MAAA,eAAA,EAAA,EAA/C,OAAO,yBAAA,MAAyB,aAAA,EAAA,MAAA,GAAA,CAAA,QAAA,CAAA,CAAA,EAAA,EAAA,IAAA,mBAAA,IAAA,KAAA,EAG3C,yBAAA,MAAyB,UAAA,WAAA,EADjC,mBAUM,OAVN,YAUM,CALJ,YAIiB,MAAA,gBAAA,EAAA;OAHf,OAAM;OACL,SAAS,yBAAA,MAAyB;OACnC,MAAK;OACL,MAAK;0EAGU,MAAA,iBAAgB,CAAC,QAAA,eAAc,IAAA,UAAA,KAAA,EAClD,mBAKW,UAAA,EAAA,KAAA,GAAA,EAAA,WAJQ,gBAAA,QAAV,WAAM;2BADf,YAKW,MAAA,SAAA,EAAA;QAHR,KAAK,OAAO;QACb,OAAM;;+BACY,CAAA,gBAAA,gBAAf,OAAO,MAAK,EAAA,EAAA,CAAA,CAAA;;;gCAGnB,mBAOM,OAAA;;OALH,IAAI,MAAA,UAAS;OACd,OAAM;OACN,MAAK;OACL,UAAS;yBACN,qBAAA,OAAsB,MAAK,EAAA,GAAA,WAAA,EAAA,CAAA"}
@@ -1,4 +1,5 @@
1
1
  import type { ApiReferenceConfiguration } from '@scalar/types/api-reference';
2
+ import type { AsyncApiInfoObject } from '@scalar/types/asyncapi/3.1';
2
3
  import type { Heading } from '@scalar/types/legacy';
3
4
  import type { WorkspaceEventBus } from '@scalar/workspace-store/events';
4
5
  import type { ExternalDocumentationObject, InfoObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document';
@@ -8,7 +9,7 @@ type __VLS_Props = {
8
9
  /** Original specification version of the input document (OpenAPI or AsyncAPI). */
9
10
  specificationVersion?: string;
10
11
  /** The Info object from the OpenAPI document. */
11
- info: InfoObject | undefined;
12
+ info: InfoObject | AsyncApiInfoObject | undefined;
12
13
  /** The external documentation object from the OpenAPI document, if present. */
13
14
  externalDocs?: ExternalDocumentationObject;
14
15
  /** OpenAPI extension fields at the document level. */
@@ -1 +1 @@
1
- {"version":3,"file":"InfoBlock.vue.d.ts","sourceRoot":"","sources":["../../../../src/blocks/scalar-info-block/components/InfoBlock.vue"],"names":[],"mappings":"AAuFA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAA;AAC5E,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAA;AACnD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AACvE,OAAO,KAAK,EACV,2BAA2B,EAC3B,UAAU,EACX,MAAM,8DAA8D,CAAA;AAQrE,KAAK,WAAW,GAAG;IACjB,qDAAqD;IACrD,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,kFAAkF;IAClF,oBAAoB,CAAC,EAAE,MAAM,CAAA;IAC7B,iDAAiD;IACjD,IAAI,EAAE,UAAU,GAAG,SAAS,CAAA;IAC5B,+EAA+E;IAC/E,YAAY,CAAC,EAAE,2BAA2B,CAAA;IAC1C,sDAAsD;IACtD,kBAAkB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IAC5C,yDAAyD;IACzD,cAAc,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IACxC,iDAAiD;IACjD,QAAQ,EAAE,iBAAiB,CAAA;IAC3B,iDAAiD;IACjD,oBAAoB,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,MAAM,CAAA;IAClD,8EAA8E;IAC9E,MAAM,CAAC,EAAE,QAAQ,GAAG,SAAS,CAAA;IAC7B,kCAAkC;IAClC,oBAAoB,CAAC,EAAE,yBAAyB,CAAC,sBAAsB,CAAC,CAAA;IACxE,+EAA+E;IAC/E,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,0EAA0E;IAC1E,YAAY,CAAC,EAAE,SAAS,GAAG,UAAU,CAAA;CACtC,CAAC;AAyGF,QAAA,IAAI,QAAQ,IAAY,CAAE;AAC1B,KAAK,WAAW,GAAG,EAAE,GACnB;IAAE,SAAS,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,QAAQ,KAAK,GAAG,CAAA;CAAE,CAAC;AAKlD,QAAA,MAAM,UAAU,kSAEd,CAAC;AACH,QAAA,MAAM,YAAY,EAAS,eAAe,CAAC,OAAO,UAAU,EAAE,WAAW,CAAC,CAAC;wBACtD,OAAO,YAAY;AAAxC,wBAAyC;AACzC,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KACV,CAAA;CACD,CAAC"}
1
+ {"version":3,"file":"InfoBlock.vue.d.ts","sourceRoot":"","sources":["../../../../src/blocks/scalar-info-block/components/InfoBlock.vue"],"names":[],"mappings":"AAwFA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAA;AAC5E,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAA;AACpE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAA;AACnD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AACvE,OAAO,KAAK,EACV,2BAA2B,EAC3B,UAAU,EACX,MAAM,8DAA8D,CAAA;AAQrE,KAAK,WAAW,GAAG;IACjB,qDAAqD;IACrD,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,kFAAkF;IAClF,oBAAoB,CAAC,EAAE,MAAM,CAAA;IAC7B,iDAAiD;IACjD,IAAI,EAAE,UAAU,GAAG,kBAAkB,GAAG,SAAS,CAAA;IACjD,+EAA+E;IAC/E,YAAY,CAAC,EAAE,2BAA2B,CAAA;IAC1C,sDAAsD;IACtD,kBAAkB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IAC5C,yDAAyD;IACzD,cAAc,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IACxC,iDAAiD;IACjD,QAAQ,EAAE,iBAAiB,CAAA;IAC3B,iDAAiD;IACjD,oBAAoB,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,MAAM,CAAA;IAClD,8EAA8E;IAC9E,MAAM,CAAC,EAAE,QAAQ,GAAG,SAAS,CAAA;IAC7B,kCAAkC;IAClC,oBAAoB,CAAC,EAAE,yBAAyB,CAAC,sBAAsB,CAAC,CAAA;IACxE,+EAA+E;IAC/E,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,0EAA0E;IAC1E,YAAY,CAAC,EAAE,SAAS,GAAG,UAAU,CAAA;CACtC,CAAC;AAyGF,QAAA,IAAI,QAAQ,IAAY,CAAE;AAC1B,KAAK,WAAW,GAAG,EAAE,GACnB;IAAE,SAAS,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,QAAQ,KAAK,GAAG,CAAA;CAAE,CAAC;AAKlD,QAAA,MAAM,UAAU,kSAEd,CAAC;AACH,QAAA,MAAM,YAAY,EAAS,eAAe,CAAC,OAAO,UAAU,EAAE,WAAW,CAAC,CAAC;wBACtD,OAAO,YAAY;AAAxC,wBAAyC;AACzC,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KACV,CAAA;CACD,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"InfoBlock.vue.js","names":[],"sources":["../../../../src/blocks/scalar-info-block/components/InfoBlock.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport type { ApiReferenceConfiguration } from '@scalar/types/api-reference'\nimport type { Heading } from '@scalar/types/legacy'\nimport type { WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport type {\n ExternalDocumentationObject,\n InfoObject,\n} from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\nimport { computed } from 'vue'\n\nimport DownloadLink from '@/blocks/scalar-info-block/components/DownloadLink.vue'\n\nimport IntroductionCard from './IntroductionCard.vue'\nimport IntroductionLayout from './IntroductionLayout.vue'\n\nconst {\n headingSlugGenerator,\n layout,\n eventBus,\n documentDownloadType = 'both',\n documentUrl,\n documentType,\n} = defineProps<{\n /** Optional unique identifier for the info block. */\n id?: string\n /** Original specification version of the input document (OpenAPI or AsyncAPI). */\n specificationVersion?: string\n /** The Info object from the OpenAPI document. */\n info: InfoObject | undefined\n /** The external documentation object from the OpenAPI document, if present. */\n externalDocs?: ExternalDocumentationObject\n /** OpenAPI extension fields at the document level. */\n documentExtensions?: Record<string, unknown>\n /** OpenAPI extension fields at the info object level. */\n infoExtensions?: Record<string, unknown>\n /** The event bus for the handling all events. */\n eventBus: WorkspaceEventBus\n /** Heading id generator for Markdown headings */\n headingSlugGenerator: (heading: Heading) => string\n /** Determines the layout style for the info block ('modern' or 'classic'). */\n layout?: 'modern' | 'classic'\n /** The document download type. */\n documentDownloadType?: ApiReferenceConfiguration['documentDownloadType']\n /** URL of the OpenAPI document. Used when documentDownloadType is 'direct'. */\n documentUrl?: string\n /** The kind of document being rendered. Drives download button labels. */\n documentType?: 'openapi' | 'asyncapi'\n}>()\n\n/**\n * Put the selectors in\n * - the after slot for classic layout,\n * - and the aside slot for other layouts.\n */\nconst introCardsSlot = computed(() =>\n layout === 'classic' ? 'after' : 'aside',\n)\n</script>\n\n<template>\n <IntroductionLayout\n :id\n :documentExtensions\n :documentType\n :eventBus=\"eventBus\"\n :externalDocs\n :headingSlugGenerator\n :info\n :infoExtensions\n :specificationVersion>\n <template #[introCardsSlot]>\n <IntroductionCard :row=\"layout === 'classic'\">\n <slot name=\"selectors\" />\n </IntroductionCard>\n </template>\n <template #download-link>\n <DownloadLink\n :documentDownloadType\n :documentType\n :documentUrl\n :eventBus />\n </template>\n </IntroductionLayout>\n</template>\n"],"mappings":""}
1
+ {"version":3,"file":"InfoBlock.vue.js","names":[],"sources":["../../../../src/blocks/scalar-info-block/components/InfoBlock.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport type { ApiReferenceConfiguration } from '@scalar/types/api-reference'\nimport type { AsyncApiInfoObject } from '@scalar/types/asyncapi/3.1'\nimport type { Heading } from '@scalar/types/legacy'\nimport type { WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport type {\n ExternalDocumentationObject,\n InfoObject,\n} from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\nimport { computed } from 'vue'\n\nimport DownloadLink from '@/blocks/scalar-info-block/components/DownloadLink.vue'\n\nimport IntroductionCard from './IntroductionCard.vue'\nimport IntroductionLayout from './IntroductionLayout.vue'\n\nconst {\n headingSlugGenerator,\n layout,\n eventBus,\n documentDownloadType = 'both',\n documentUrl,\n documentType,\n} = defineProps<{\n /** Optional unique identifier for the info block. */\n id?: string\n /** Original specification version of the input document (OpenAPI or AsyncAPI). */\n specificationVersion?: string\n /** The Info object from the OpenAPI document. */\n info: InfoObject | AsyncApiInfoObject | undefined\n /** The external documentation object from the OpenAPI document, if present. */\n externalDocs?: ExternalDocumentationObject\n /** OpenAPI extension fields at the document level. */\n documentExtensions?: Record<string, unknown>\n /** OpenAPI extension fields at the info object level. */\n infoExtensions?: Record<string, unknown>\n /** The event bus for the handling all events. */\n eventBus: WorkspaceEventBus\n /** Heading id generator for Markdown headings */\n headingSlugGenerator: (heading: Heading) => string\n /** Determines the layout style for the info block ('modern' or 'classic'). */\n layout?: 'modern' | 'classic'\n /** The document download type. */\n documentDownloadType?: ApiReferenceConfiguration['documentDownloadType']\n /** URL of the OpenAPI document. Used when documentDownloadType is 'direct'. */\n documentUrl?: string\n /** The kind of document being rendered. Drives download button labels. */\n documentType?: 'openapi' | 'asyncapi'\n}>()\n\n/**\n * Put the selectors in\n * - the after slot for classic layout,\n * - and the aside slot for other layouts.\n */\nconst introCardsSlot = computed(() =>\n layout === 'classic' ? 'after' : 'aside',\n)\n</script>\n\n<template>\n <IntroductionLayout\n :id\n :documentExtensions\n :documentType\n :eventBus=\"eventBus\"\n :externalDocs\n :headingSlugGenerator\n :info\n :infoExtensions\n :specificationVersion>\n <template #[introCardsSlot]>\n <IntroductionCard :row=\"layout === 'classic'\">\n <slot name=\"selectors\" />\n </IntroductionCard>\n </template>\n <template #download-link>\n <DownloadLink\n :documentDownloadType\n :documentType\n :documentUrl\n :eventBus />\n </template>\n </IntroductionLayout>\n</template>\n"],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"file":"InfoBlock.vue.script.js","names":[],"sources":["../../../../src/blocks/scalar-info-block/components/InfoBlock.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport type { ApiReferenceConfiguration } from '@scalar/types/api-reference'\nimport type { Heading } from '@scalar/types/legacy'\nimport type { WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport type {\n ExternalDocumentationObject,\n InfoObject,\n} from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\nimport { computed } from 'vue'\n\nimport DownloadLink from '@/blocks/scalar-info-block/components/DownloadLink.vue'\n\nimport IntroductionCard from './IntroductionCard.vue'\nimport IntroductionLayout from './IntroductionLayout.vue'\n\nconst {\n headingSlugGenerator,\n layout,\n eventBus,\n documentDownloadType = 'both',\n documentUrl,\n documentType,\n} = defineProps<{\n /** Optional unique identifier for the info block. */\n id?: string\n /** Original specification version of the input document (OpenAPI or AsyncAPI). */\n specificationVersion?: string\n /** The Info object from the OpenAPI document. */\n info: InfoObject | undefined\n /** The external documentation object from the OpenAPI document, if present. */\n externalDocs?: ExternalDocumentationObject\n /** OpenAPI extension fields at the document level. */\n documentExtensions?: Record<string, unknown>\n /** OpenAPI extension fields at the info object level. */\n infoExtensions?: Record<string, unknown>\n /** The event bus for the handling all events. */\n eventBus: WorkspaceEventBus\n /** Heading id generator for Markdown headings */\n headingSlugGenerator: (heading: Heading) => string\n /** Determines the layout style for the info block ('modern' or 'classic'). */\n layout?: 'modern' | 'classic'\n /** The document download type. */\n documentDownloadType?: ApiReferenceConfiguration['documentDownloadType']\n /** URL of the OpenAPI document. Used when documentDownloadType is 'direct'. */\n documentUrl?: string\n /** The kind of document being rendered. Drives download button labels. */\n documentType?: 'openapi' | 'asyncapi'\n}>()\n\n/**\n * Put the selectors in\n * - the after slot for classic layout,\n * - and the aside slot for other layouts.\n */\nconst introCardsSlot = computed(() =>\n layout === 'classic' ? 'after' : 'aside',\n)\n</script>\n\n<template>\n <IntroductionLayout\n :id\n :documentExtensions\n :documentType\n :eventBus=\"eventBus\"\n :externalDocs\n :headingSlugGenerator\n :info\n :infoExtensions\n :specificationVersion>\n <template #[introCardsSlot]>\n <IntroductionCard :row=\"layout === 'classic'\">\n <slot name=\"selectors\" />\n </IntroductionCard>\n </template>\n <template #download-link>\n <DownloadLink\n :documentDownloadType\n :documentType\n :documentUrl\n :eventBus />\n </template>\n </IntroductionLayout>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;EAsDA,MAAM,iBAAiB,eACrB,QAAA,WAAW,YAAY,UAAU,QACnC;;uBAIE,YAsBqB,4BAAA;IArBlB,IAAA,QAAA;IACA,oBAAA,QAAA;IACA,cAAA,QAAA;IACA,UAAU,QAAA;IACV,cAAA,QAAA;IACA,sBAAA,QAAA;IACA,MAAA,QAAA;IACA,gBAAA,QAAA;IACA,sBAAA,QAAA;;KACU,eAAA,QAAgB,cAGN,CAFnB,YAEmB,0BAAA,EAFA,KAAK,QAAA,WAAM,WAAA,EAAA;4BACH,CAAzB,WAAyB,KAAA,QAAA,YAAA,CAAA,CAAA;;;IAGlB,iBAAa,cAKR,CAJd,YAIc,sBAAA;KAHX,sBAAA,QAAA;KACA,cAAA,QAAA;KACA,aAAA,QAAA;KACA,UAAA,QAAA"}
1
+ {"version":3,"file":"InfoBlock.vue.script.js","names":[],"sources":["../../../../src/blocks/scalar-info-block/components/InfoBlock.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport type { ApiReferenceConfiguration } from '@scalar/types/api-reference'\nimport type { AsyncApiInfoObject } from '@scalar/types/asyncapi/3.1'\nimport type { Heading } from '@scalar/types/legacy'\nimport type { WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport type {\n ExternalDocumentationObject,\n InfoObject,\n} from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\nimport { computed } from 'vue'\n\nimport DownloadLink from '@/blocks/scalar-info-block/components/DownloadLink.vue'\n\nimport IntroductionCard from './IntroductionCard.vue'\nimport IntroductionLayout from './IntroductionLayout.vue'\n\nconst {\n headingSlugGenerator,\n layout,\n eventBus,\n documentDownloadType = 'both',\n documentUrl,\n documentType,\n} = defineProps<{\n /** Optional unique identifier for the info block. */\n id?: string\n /** Original specification version of the input document (OpenAPI or AsyncAPI). */\n specificationVersion?: string\n /** The Info object from the OpenAPI document. */\n info: InfoObject | AsyncApiInfoObject | undefined\n /** The external documentation object from the OpenAPI document, if present. */\n externalDocs?: ExternalDocumentationObject\n /** OpenAPI extension fields at the document level. */\n documentExtensions?: Record<string, unknown>\n /** OpenAPI extension fields at the info object level. */\n infoExtensions?: Record<string, unknown>\n /** The event bus for the handling all events. */\n eventBus: WorkspaceEventBus\n /** Heading id generator for Markdown headings */\n headingSlugGenerator: (heading: Heading) => string\n /** Determines the layout style for the info block ('modern' or 'classic'). */\n layout?: 'modern' | 'classic'\n /** The document download type. */\n documentDownloadType?: ApiReferenceConfiguration['documentDownloadType']\n /** URL of the OpenAPI document. Used when documentDownloadType is 'direct'. */\n documentUrl?: string\n /** The kind of document being rendered. Drives download button labels. */\n documentType?: 'openapi' | 'asyncapi'\n}>()\n\n/**\n * Put the selectors in\n * - the after slot for classic layout,\n * - and the aside slot for other layouts.\n */\nconst introCardsSlot = computed(() =>\n layout === 'classic' ? 'after' : 'aside',\n)\n</script>\n\n<template>\n <IntroductionLayout\n :id\n :documentExtensions\n :documentType\n :eventBus=\"eventBus\"\n :externalDocs\n :headingSlugGenerator\n :info\n :infoExtensions\n :specificationVersion>\n <template #[introCardsSlot]>\n <IntroductionCard :row=\"layout === 'classic'\">\n <slot name=\"selectors\" />\n </IntroductionCard>\n </template>\n <template #download-link>\n <DownloadLink\n :documentDownloadType\n :documentType\n :documentUrl\n :eventBus />\n </template>\n </IntroductionLayout>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;EAuDA,MAAM,iBAAiB,eACrB,QAAA,WAAW,YAAY,UAAU,QACnC;;uBAIE,YAsBqB,4BAAA;IArBlB,IAAA,QAAA;IACA,oBAAA,QAAA;IACA,cAAA,QAAA;IACA,UAAU,QAAA;IACV,cAAA,QAAA;IACA,sBAAA,QAAA;IACA,MAAA,QAAA;IACA,gBAAA,QAAA;IACA,sBAAA,QAAA;;KACU,eAAA,QAAgB,cAGN,CAFnB,YAEmB,0BAAA,EAFA,KAAK,QAAA,WAAM,WAAA,EAAA;4BACH,CAAzB,WAAyB,KAAA,QAAA,YAAA,CAAA,CAAA;;;IAGlB,iBAAa,cAKR,CAJd,YAIc,sBAAA;KAHX,sBAAA,QAAA;KACA,cAAA,QAAA;KACA,aAAA,QAAA;KACA,UAAA,QAAA"}
@@ -1,6 +1,7 @@
1
+ import type { AsyncApiInfoObject } from '@scalar/types/asyncapi/3.1';
1
2
  import type { ExternalDocumentationObject, InfoObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document';
2
3
  type __VLS_Props = {
3
- info: InfoObject;
4
+ info: InfoObject | AsyncApiInfoObject;
4
5
  externalDocs?: ExternalDocumentationObject;
5
6
  };
6
7
  declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
@@ -1 +1 @@
1
- {"version":3,"file":"InfoLinks.vue.d.ts","sourceRoot":"","sources":["../../../../src/blocks/scalar-info-block/components/InfoLinks.vue"],"names":[],"mappings":"AAiCA,OAAO,KAAK,EACV,2BAA2B,EAC3B,UAAU,EACX,MAAM,8DAA8D,CAAA;AAMrE,KAAK,WAAW,GAAG;IACjB,IAAI,EAAE,UAAU,CAAA;IAChB,YAAY,CAAC,EAAE,2BAA2B,CAAA;CAC3C,CAAC;AAuFF,QAAA,MAAM,YAAY,kSAEhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
1
+ {"version":3,"file":"InfoLinks.vue.d.ts","sourceRoot":"","sources":["../../../../src/blocks/scalar-info-block/components/InfoLinks.vue"],"names":[],"mappings":"AAmCA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAA;AAEpE,OAAO,KAAK,EACV,2BAA2B,EAC3B,UAAU,EACX,MAAM,8DAA8D,CAAA;AAMrE,KAAK,WAAW,GAAG;IACjB,IAAI,EAAE,UAAU,GAAG,kBAAkB,CAAA;IACrC,YAAY,CAAC,EAAE,2BAA2B,CAAA;CAC3C,CAAC;AAwFF,QAAA,MAAM,YAAY,kSAEhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
@@ -1 +1 @@
1
- {"version":3,"file":"InfoLinks.vue.js","names":[],"sources":["../../../../src/blocks/scalar-info-block/components/InfoLinks.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport type {\n ExternalDocumentationObject,\n InfoObject,\n} from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\n\nimport { LinkList } from '@/components/LinkList'\nimport { ExternalDocs } from '@/features/external-docs'\nimport { Contact, License, TermsOfService } from '@/features/info-object'\n\ndefineProps<{\n info: InfoObject\n externalDocs?: ExternalDocumentationObject\n}>()\n</script>\n\n<template>\n <LinkList>\n <ExternalDocs :value=\"externalDocs\" />\n <Contact\n v-if=\"info.contact\"\n :value=\"info.contact\" />\n <License\n v-if=\"info.license\"\n :value=\"info.license\" />\n <TermsOfService\n v-if=\"info.termsOfService\"\n :value=\"info.termsOfService\" />\n </LinkList>\n</template>\n"],"mappings":""}
1
+ {"version":3,"file":"InfoLinks.vue.js","names":[],"sources":["../../../../src/blocks/scalar-info-block/components/InfoLinks.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport type { AsyncApiInfoObject } from '@scalar/types/asyncapi/3.1'\nimport { getResolvedRef } from '@scalar/workspace-store/helpers/get-resolved-ref'\nimport type {\n ExternalDocumentationObject,\n InfoObject,\n} from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\n\nimport { LinkList } from '@/components/LinkList'\nimport { ExternalDocs } from '@/features/external-docs'\nimport { Contact, License, TermsOfService } from '@/features/info-object'\n\ndefineProps<{\n info: InfoObject | AsyncApiInfoObject\n externalDocs?: ExternalDocumentationObject\n}>()\n</script>\n\n<template>\n <LinkList>\n <ExternalDocs :value=\"externalDocs\" />\n <Contact\n v-if=\"info.contact\"\n :value=\"info.contact\" />\n <License\n v-if=\"info.license\"\n :value=\"getResolvedRef(info.license)\" />\n <TermsOfService\n v-if=\"info.termsOfService\"\n :value=\"info.termsOfService\" />\n </LinkList>\n</template>\n"],"mappings":""}
@@ -4,6 +4,7 @@ import Contact_default from "../../../features/info-object/Contact.vue.js";
4
4
  import License_default from "../../../features/info-object/License.vue.js";
5
5
  import TermsOfService_default from "../../../features/info-object/TermsOfService.vue.js";
6
6
  import { createBlock, createCommentVNode, createVNode, defineComponent, openBlock, unref, withCtx } from "vue";
7
+ import { getResolvedRef } from "@scalar/workspace-store/helpers/get-resolved-ref";
7
8
  //#region src/blocks/scalar-info-block/components/InfoLinks.vue?vue&type=script&setup=true&lang.ts
8
9
  var InfoLinks_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
9
10
  __name: "InfoLinks",
@@ -22,7 +23,7 @@ var InfoLinks_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defi
22
23
  }, null, 8, ["value"])) : createCommentVNode("", true),
23
24
  __props.info.license ? (openBlock(), createBlock(unref(License_default), {
24
25
  key: 1,
25
- value: __props.info.license
26
+ value: unref(getResolvedRef)(__props.info.license)
26
27
  }, null, 8, ["value"])) : createCommentVNode("", true),
27
28
  __props.info.termsOfService ? (openBlock(), createBlock(unref(TermsOfService_default), {
28
29
  key: 2,
@@ -1 +1 @@
1
- {"version":3,"file":"InfoLinks.vue.script.js","names":[],"sources":["../../../../src/blocks/scalar-info-block/components/InfoLinks.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport type {\n ExternalDocumentationObject,\n InfoObject,\n} from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\n\nimport { LinkList } from '@/components/LinkList'\nimport { ExternalDocs } from '@/features/external-docs'\nimport { Contact, License, TermsOfService } from '@/features/info-object'\n\ndefineProps<{\n info: InfoObject\n externalDocs?: ExternalDocumentationObject\n}>()\n</script>\n\n<template>\n <LinkList>\n <ExternalDocs :value=\"externalDocs\" />\n <Contact\n v-if=\"info.contact\"\n :value=\"info.contact\" />\n <License\n v-if=\"info.license\"\n :value=\"info.license\" />\n <TermsOfService\n v-if=\"info.termsOfService\"\n :value=\"info.termsOfService\" />\n </LinkList>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;uBAiBE,YAWW,MAAA,iBAAA,EAAA,MAAA;2BAV6B;KAAtC,YAAsC,MAAA,qBAAA,EAAA,EAAvB,OAAO,QAAA,cAAY,EAAA,MAAA,GAAA,CAAA,QAAA,CAAA;KAE1B,QAAA,KAAK,WAAA,WAAA,EADb,YAE0B,MAAA,gBAAA,EAAA;;MAAvB,OAAO,QAAA,KAAK;;KAEP,QAAA,KAAK,WAAA,WAAA,EADb,YAE0B,MAAA,gBAAA,EAAA;;MAAvB,OAAO,QAAA,KAAK;;KAEP,QAAA,KAAK,kBAAA,WAAA,EADb,YAEiC,MAAA,uBAAA,EAAA;;MAA9B,OAAO,QAAA,KAAK"}
1
+ {"version":3,"file":"InfoLinks.vue.script.js","names":[],"sources":["../../../../src/blocks/scalar-info-block/components/InfoLinks.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport type { AsyncApiInfoObject } from '@scalar/types/asyncapi/3.1'\nimport { getResolvedRef } from '@scalar/workspace-store/helpers/get-resolved-ref'\nimport type {\n ExternalDocumentationObject,\n InfoObject,\n} from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\n\nimport { LinkList } from '@/components/LinkList'\nimport { ExternalDocs } from '@/features/external-docs'\nimport { Contact, License, TermsOfService } from '@/features/info-object'\n\ndefineProps<{\n info: InfoObject | AsyncApiInfoObject\n externalDocs?: ExternalDocumentationObject\n}>()\n</script>\n\n<template>\n <LinkList>\n <ExternalDocs :value=\"externalDocs\" />\n <Contact\n v-if=\"info.contact\"\n :value=\"info.contact\" />\n <License\n v-if=\"info.license\"\n :value=\"getResolvedRef(info.license)\" />\n <TermsOfService\n v-if=\"info.termsOfService\"\n :value=\"info.termsOfService\" />\n </LinkList>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;uBAmBE,YAWW,MAAA,iBAAA,EAAA,MAAA;2BAV6B;KAAtC,YAAsC,MAAA,qBAAA,EAAA,EAAvB,OAAO,QAAA,cAAY,EAAA,MAAA,GAAA,CAAA,QAAA,CAAA;KAE1B,QAAA,KAAK,WAAA,WAAA,EADb,YAE0B,MAAA,gBAAA,EAAA;;MAAvB,OAAO,QAAA,KAAK;;KAEP,QAAA,KAAK,WAAA,WAAA,EADb,YAE0C,MAAA,gBAAA,EAAA;;MAAvC,OAAO,MAAA,eAAc,CAAC,QAAA,KAAK,QAAO;;KAE7B,QAAA,KAAK,kBAAA,WAAA,EADb,YAEiC,MAAA,uBAAA,EAAA;;MAA9B,OAAO,QAAA,KAAK"}
@@ -1 +1 @@
1
- {"version":3,"file":"InfoMarkdownSection.vue.js","names":[],"sources":["../../../../src/blocks/scalar-info-block/components/InfoMarkdownSection.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport type { Node } from '@scalar/code-highlight'\nimport { ScalarMarkdown } from '@scalar/components'\nimport type { WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport { useTemplateRef } from 'vue'\n\nimport { useIntersection } from '@/hooks/use-intersection'\n\nconst { eventBus, id } = defineProps<{\n id?: string\n content: string\n transformHeading: (node: Node) => Node\n eventBus: WorkspaceEventBus | null\n}>()\n\nconst element = useTemplateRef<HTMLElement>('element')\n\nuseIntersection(element, () =>\n id ? eventBus?.emit('intersecting:nav-item', { id }) : undefined,\n)\n</script>\n\n<template>\n <div\n :id\n ref=\"element\"\n class=\"introduction-description-heading scroll-mt-16\">\n <ScalarMarkdown\n :transform=\"transformHeading\"\n transformType=\"heading\"\n :value=\"content\"\n withImages />\n </div>\n</template>\n"],"mappings":""}
1
+ {"version":3,"file":"InfoMarkdownSection.vue.js","names":[],"sources":["../../../../src/blocks/scalar-info-block/components/InfoMarkdownSection.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport type { Node } from '@scalar/code-highlight'\nimport { ScalarMarkdown } from '@scalar/components/markdown'\nimport type { WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport { useTemplateRef } from 'vue'\n\nimport { useIntersection } from '@/hooks/use-intersection'\n\nconst { eventBus, id } = defineProps<{\n id?: string\n content: string\n transformHeading: (node: Node) => Node\n eventBus: WorkspaceEventBus | null\n}>()\n\nconst element = useTemplateRef<HTMLElement>('element')\n\nuseIntersection(element, () =>\n id ? eventBus?.emit('intersecting:nav-item', { id }) : undefined,\n)\n</script>\n\n<template>\n <div\n :id\n ref=\"element\"\n class=\"introduction-description-heading scroll-mt-16\">\n <ScalarMarkdown\n :transform=\"transformHeading\"\n transformType=\"heading\"\n :value=\"content\"\n withImages />\n </div>\n</template>\n"],"mappings":""}
@@ -1,6 +1,6 @@
1
1
  import { useIntersection } from "../../../hooks/use-intersection.js";
2
2
  import { createElementBlock, createVNode, defineComponent, openBlock, unref, useTemplateRef } from "vue";
3
- import { ScalarMarkdown } from "@scalar/components";
3
+ import { ScalarMarkdown } from "@scalar/components/markdown";
4
4
  //#region src/blocks/scalar-info-block/components/InfoMarkdownSection.vue?vue&type=script&setup=true&lang.ts
5
5
  var _hoisted_1 = ["id"];
6
6
  var InfoMarkdownSection_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
@@ -1 +1 @@
1
- {"version":3,"file":"InfoMarkdownSection.vue.script.js","names":[],"sources":["../../../../src/blocks/scalar-info-block/components/InfoMarkdownSection.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport type { Node } from '@scalar/code-highlight'\nimport { ScalarMarkdown } from '@scalar/components'\nimport type { WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport { useTemplateRef } from 'vue'\n\nimport { useIntersection } from '@/hooks/use-intersection'\n\nconst { eventBus, id } = defineProps<{\n id?: string\n content: string\n transformHeading: (node: Node) => Node\n eventBus: WorkspaceEventBus | null\n}>()\n\nconst element = useTemplateRef<HTMLElement>('element')\n\nuseIntersection(element, () =>\n id ? eventBus?.emit('intersecting:nav-item', { id }) : undefined,\n)\n</script>\n\n<template>\n <div\n :id\n ref=\"element\"\n class=\"introduction-description-heading scroll-mt-16\">\n <ScalarMarkdown\n :transform=\"transformHeading\"\n transformType=\"heading\"\n :value=\"content\"\n withImages />\n </div>\n</template>\n"],"mappings":";;;;;;;;;;;;;;EAeA,MAAM,UAAU,eAA4B,UAAS;AAErD,kBAAgB,eACd,QAAA,KAAK,QAAA,UAAU,KAAK,yBAAyB,EAAE,IAAC,QAAA,IAAG,CAAC,GAAG,KAAA,EACzD;;uBAIE,mBASM,OAAA;IARH,IAAA,QAAA;aACG;IAAJ,KAAI;IACJ,OAAM;OACN,YAIe,MAAA,eAAA,EAAA;IAHZ,WAAW,QAAA;IACZ,eAAc;IACb,OAAO,QAAA;IACR,YAAA"}
1
+ {"version":3,"file":"InfoMarkdownSection.vue.script.js","names":[],"sources":["../../../../src/blocks/scalar-info-block/components/InfoMarkdownSection.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport type { Node } from '@scalar/code-highlight'\nimport { ScalarMarkdown } from '@scalar/components/markdown'\nimport type { WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport { useTemplateRef } from 'vue'\n\nimport { useIntersection } from '@/hooks/use-intersection'\n\nconst { eventBus, id } = defineProps<{\n id?: string\n content: string\n transformHeading: (node: Node) => Node\n eventBus: WorkspaceEventBus | null\n}>()\n\nconst element = useTemplateRef<HTMLElement>('element')\n\nuseIntersection(element, () =>\n id ? eventBus?.emit('intersecting:nav-item', { id }) : undefined,\n)\n</script>\n\n<template>\n <div\n :id\n ref=\"element\"\n class=\"introduction-description-heading scroll-mt-16\">\n <ScalarMarkdown\n :transform=\"transformHeading\"\n transformType=\"heading\"\n :value=\"content\"\n withImages />\n </div>\n</template>\n"],"mappings":";;;;;;;;;;;;;;EAeA,MAAM,UAAU,eAA4B,UAAS;AAErD,kBAAgB,eACd,QAAA,KAAK,QAAA,UAAU,KAAK,yBAAyB,EAAE,IAAC,QAAA,IAAG,CAAC,GAAG,KAAA,EACzD;;uBAIE,mBASM,OAAA;IARH,IAAA,QAAA;aACG;IAAJ,KAAI;IACJ,OAAM;OACN,YAIe,MAAA,eAAA,EAAA;IAHZ,WAAW,QAAA;IACZ,eAAc;IACb,OAAO,QAAA;IACR,YAAA"}
@@ -1,3 +1,4 @@
1
+ import type { AsyncApiInfoObject } from '@scalar/types/asyncapi/3.1';
1
2
  import type { Heading } from '@scalar/types/legacy';
2
3
  import type { WorkspaceEventBus } from '@scalar/workspace-store/events';
3
4
  import type { ExternalDocumentationObject, InfoObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document';
@@ -5,7 +6,7 @@ type __VLS_Props = {
5
6
  id: string | undefined;
6
7
  documentType?: 'openapi' | 'asyncapi';
7
8
  specificationVersion: string | undefined;
8
- info: InfoObject | undefined;
9
+ info: InfoObject | AsyncApiInfoObject | undefined;
9
10
  externalDocs?: ExternalDocumentationObject;
10
11
  documentExtensions?: Record<string, unknown>;
11
12
  infoExtensions?: Record<string, unknown>;
@@ -1 +1 @@
1
- {"version":3,"file":"IntroductionLayout.vue.d.ts","sourceRoot":"","sources":["../../../../src/blocks/scalar-info-block/components/IntroductionLayout.vue"],"names":[],"mappings":"AAsGA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAA;AACnD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AACvE,OAAO,KAAK,EACV,2BAA2B,EAC3B,UAAU,EACX,MAAM,8DAA8D,CAAA;AAkBrE,KAAK,WAAW,GAAG;IACjB,EAAE,EAAE,MAAM,GAAG,SAAS,CAAA;IACtB,YAAY,CAAC,EAAE,SAAS,GAAG,UAAU,CAAA;IACrC,oBAAoB,EAAE,MAAM,GAAG,SAAS,CAAA;IACxC,IAAI,EAAE,UAAU,GAAG,SAAS,CAAA;IAC5B,YAAY,CAAC,EAAE,2BAA2B,CAAA;IAC1C,kBAAkB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IAC5C,cAAc,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IACxC,oBAAoB,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,MAAM,CAAA;IAClD,QAAQ,EAAE,iBAAiB,GAAG,IAAI,CAAA;CACnC,CAAC;AAgPF,QAAA,IAAI,QAAQ,IAAW,EAAE,QAAQ,IAAW,EAAE,QAAQ,IAAY,CAAE;AACpE,KAAK,WAAW,GAAG,EAAE,GACnB;IAAE,eAAe,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,QAAQ,KAAK,GAAG,CAAA;CAAE,GACrD;IAAE,KAAK,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,QAAQ,KAAK,GAAG,CAAA;CAAE,GAC3C;IAAE,KAAK,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,QAAQ,KAAK,GAAG,CAAA;CAAE,CAAC;AAK9C,QAAA,MAAM,UAAU,kSAEd,CAAC;AACH,QAAA,MAAM,YAAY,EAAS,eAAe,CAAC,OAAO,UAAU,EAAE,WAAW,CAAC,CAAC;wBACtD,OAAO,YAAY;AAAxC,wBAAyC;AACzC,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KACV,CAAA;CACD,CAAC"}
1
+ {"version":3,"file":"IntroductionLayout.vue.d.ts","sourceRoot":"","sources":["../../../../src/blocks/scalar-info-block/components/IntroductionLayout.vue"],"names":[],"mappings":"AAuGA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAA;AACpE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAA;AACnD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AACvE,OAAO,KAAK,EACV,2BAA2B,EAC3B,UAAU,EACX,MAAM,8DAA8D,CAAA;AAkBrE,KAAK,WAAW,GAAG;IACjB,EAAE,EAAE,MAAM,GAAG,SAAS,CAAA;IACtB,YAAY,CAAC,EAAE,SAAS,GAAG,UAAU,CAAA;IACrC,oBAAoB,EAAE,MAAM,GAAG,SAAS,CAAA;IACxC,IAAI,EAAE,UAAU,GAAG,kBAAkB,GAAG,SAAS,CAAA;IACjD,YAAY,CAAC,EAAE,2BAA2B,CAAA;IAC1C,kBAAkB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IAC5C,cAAc,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IACxC,oBAAoB,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,MAAM,CAAA;IAClD,QAAQ,EAAE,iBAAiB,GAAG,IAAI,CAAA;CACnC,CAAC;AAgPF,QAAA,IAAI,QAAQ,IAAW,EAAE,QAAQ,IAAW,EAAE,QAAQ,IAAY,CAAE;AACpE,KAAK,WAAW,GAAG,EAAE,GACnB;IAAE,eAAe,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,QAAQ,KAAK,GAAG,CAAA;CAAE,GACrD;IAAE,KAAK,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,QAAQ,KAAK,GAAG,CAAA;CAAE,GAC3C;IAAE,KAAK,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,QAAQ,KAAK,GAAG,CAAA;CAAE,CAAC;AAK9C,QAAA,MAAM,UAAU,kSAEd,CAAC;AACH,QAAA,MAAM,YAAY,EAAS,eAAe,CAAC,OAAO,UAAU,EAAE,WAAW,CAAC,CAAC;wBACtD,OAAO,YAAY;AAAxC,wBAAyC;AACzC,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KACV,CAAA;CACD,CAAC"}
@@ -2,7 +2,7 @@ import _plugin_vue_export_helper_default from "../../../_virtual/_plugin-vue_exp
2
2
  import IntroductionLayout_vue_vue_type_script_setup_true_lang_default from "./IntroductionLayout.vue.script.js";
3
3
  /* empty css */
4
4
  //#region src/blocks/scalar-info-block/components/IntroductionLayout.vue
5
- var IntroductionLayout_default = /* @__PURE__ */ _plugin_vue_export_helper_default(IntroductionLayout_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-6c24d687"]]);
5
+ var IntroductionLayout_default = /* @__PURE__ */ _plugin_vue_export_helper_default(IntroductionLayout_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-bd137508"]]);
6
6
  //#endregion
7
7
  export { IntroductionLayout_default as default };
8
8
 
@@ -1 +1 @@
1
- {"version":3,"file":"IntroductionLayout.vue.js","names":[],"sources":["../../../../src/blocks/scalar-info-block/components/IntroductionLayout.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport type { Heading } from '@scalar/types/legacy'\nimport type { WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport type {\n ExternalDocumentationObject,\n InfoObject,\n} from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\n\nimport {\n Section,\n SectionColumn,\n SectionColumns,\n SectionContainer,\n SectionContent,\n SectionHeader,\n SectionHeaderTag,\n} from '@/components/Section'\nimport { SpecificationExtension } from '@/features/specification-extension'\n\nimport InfoDescription from './InfoDescription.vue'\nimport InfoLinks from './InfoLinks.vue'\nimport InfoVersion from './InfoVersion.vue'\nimport SpecificationVersion from './SpecificationVersion.vue'\n\ndefineProps<{\n id: string | undefined\n documentType?: 'openapi' | 'asyncapi'\n specificationVersion: string | undefined\n info: InfoObject | undefined\n externalDocs?: ExternalDocumentationObject\n documentExtensions?: Record<string, unknown>\n infoExtensions?: Record<string, unknown>\n headingSlugGenerator: (heading: Heading) => string\n eventBus: WorkspaceEventBus | null\n}>()\n</script>\n\n<template>\n <SectionContainer>\n <!-- If the #after slot is used, we need to add a gap to the section. -->\n <Section\n :id=\"id\"\n aria-label=\"Introduction\"\n class=\"introduction-section z-1 gap-12\"\n @intersecting=\"\n () => id && eventBus?.emit('intersecting:nav-item', { id })\n \">\n <SectionContent :loading=\"!info\">\n <div class=\"flex gap-1.5\">\n <InfoVersion\n v-if=\"info\"\n :version=\"info?.version\" />\n <SpecificationVersion\n :documentType\n :version=\"specificationVersion\" />\n </div>\n <SectionHeader\n :loading=\"!info?.title\"\n tight>\n <SectionHeaderTag :level=\"1\">\n {{ info?.title }}\n </SectionHeaderTag>\n <template #links>\n <InfoLinks\n v-if=\"info\"\n :externalDocs=\"externalDocs\"\n :info=\"info\" />\n </template>\n </SectionHeader>\n <SectionColumns>\n <SectionColumn>\n <slot name=\"download-link\" />\n <InfoDescription\n :description=\"info?.description\"\n :eventBus=\"eventBus\"\n :headingSlugGenerator=\"headingSlugGenerator\" />\n </SectionColumn>\n <SectionColumn v-if=\"$slots.aside\">\n <div class=\"sticky-cards\">\n <slot name=\"aside\" />\n </div>\n </SectionColumn>\n </SectionColumns>\n <SpecificationExtension :value=\"documentExtensions\" />\n <SpecificationExtension :value=\"infoExtensions\" />\n </SectionContent>\n <slot name=\"after\" />\n </Section>\n </SectionContainer>\n</template>\n\n<style scoped>\n.sticky-cards {\n display: flex;\n flex-direction: column;\n position: sticky;\n top: calc(var(--refs-viewport-offset) + 24px);\n}\n</style>\n"],"mappings":""}
1
+ {"version":3,"file":"IntroductionLayout.vue.js","names":[],"sources":["../../../../src/blocks/scalar-info-block/components/IntroductionLayout.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport type { AsyncApiInfoObject } from '@scalar/types/asyncapi/3.1'\nimport type { Heading } from '@scalar/types/legacy'\nimport type { WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport type {\n ExternalDocumentationObject,\n InfoObject,\n} from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\n\nimport {\n Section,\n SectionColumn,\n SectionColumns,\n SectionContainer,\n SectionContent,\n SectionHeader,\n SectionHeaderTag,\n} from '@/components/Section'\nimport { SpecificationExtension } from '@/features/specification-extension'\n\nimport InfoDescription from './InfoDescription.vue'\nimport InfoLinks from './InfoLinks.vue'\nimport InfoVersion from './InfoVersion.vue'\nimport SpecificationVersion from './SpecificationVersion.vue'\n\ndefineProps<{\n id: string | undefined\n documentType?: 'openapi' | 'asyncapi'\n specificationVersion: string | undefined\n info: InfoObject | AsyncApiInfoObject | undefined\n externalDocs?: ExternalDocumentationObject\n documentExtensions?: Record<string, unknown>\n infoExtensions?: Record<string, unknown>\n headingSlugGenerator: (heading: Heading) => string\n eventBus: WorkspaceEventBus | null\n}>()\n</script>\n\n<template>\n <SectionContainer>\n <!-- If the #after slot is used, we need to add a gap to the section. -->\n <Section\n :id=\"id\"\n aria-label=\"Introduction\"\n class=\"introduction-section z-1 gap-12\"\n @intersecting=\"\n () => id && eventBus?.emit('intersecting:nav-item', { id })\n \">\n <SectionContent :loading=\"!info\">\n <div class=\"flex gap-1.5\">\n <InfoVersion\n v-if=\"info\"\n :version=\"info?.version\" />\n <SpecificationVersion\n :documentType\n :version=\"specificationVersion\" />\n </div>\n <SectionHeader\n :loading=\"!info?.title\"\n tight>\n <SectionHeaderTag :level=\"1\">\n {{ info?.title }}\n </SectionHeaderTag>\n <template #links>\n <InfoLinks\n v-if=\"info\"\n :externalDocs=\"externalDocs\"\n :info=\"info\" />\n </template>\n </SectionHeader>\n <SectionColumns>\n <SectionColumn>\n <slot name=\"download-link\" />\n <InfoDescription\n :description=\"info?.description\"\n :eventBus=\"eventBus\"\n :headingSlugGenerator=\"headingSlugGenerator\" />\n </SectionColumn>\n <SectionColumn v-if=\"$slots.aside\">\n <div class=\"sticky-cards\">\n <slot name=\"aside\" />\n </div>\n </SectionColumn>\n </SectionColumns>\n <SpecificationExtension :value=\"documentExtensions\" />\n <SpecificationExtension :value=\"infoExtensions\" />\n </SectionContent>\n <slot name=\"after\" />\n </Section>\n </SectionContainer>\n</template>\n\n<style scoped>\n.sticky-cards {\n display: flex;\n flex-direction: column;\n position: sticky;\n top: calc(var(--refs-viewport-offset) + 24px);\n}\n</style>\n"],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"file":"IntroductionLayout.vue.script.js","names":["$slots"],"sources":["../../../../src/blocks/scalar-info-block/components/IntroductionLayout.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport type { Heading } from '@scalar/types/legacy'\nimport type { WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport type {\n ExternalDocumentationObject,\n InfoObject,\n} from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\n\nimport {\n Section,\n SectionColumn,\n SectionColumns,\n SectionContainer,\n SectionContent,\n SectionHeader,\n SectionHeaderTag,\n} from '@/components/Section'\nimport { SpecificationExtension } from '@/features/specification-extension'\n\nimport InfoDescription from './InfoDescription.vue'\nimport InfoLinks from './InfoLinks.vue'\nimport InfoVersion from './InfoVersion.vue'\nimport SpecificationVersion from './SpecificationVersion.vue'\n\ndefineProps<{\n id: string | undefined\n documentType?: 'openapi' | 'asyncapi'\n specificationVersion: string | undefined\n info: InfoObject | undefined\n externalDocs?: ExternalDocumentationObject\n documentExtensions?: Record<string, unknown>\n infoExtensions?: Record<string, unknown>\n headingSlugGenerator: (heading: Heading) => string\n eventBus: WorkspaceEventBus | null\n}>()\n</script>\n\n<template>\n <SectionContainer>\n <!-- If the #after slot is used, we need to add a gap to the section. -->\n <Section\n :id=\"id\"\n aria-label=\"Introduction\"\n class=\"introduction-section z-1 gap-12\"\n @intersecting=\"\n () => id && eventBus?.emit('intersecting:nav-item', { id })\n \">\n <SectionContent :loading=\"!info\">\n <div class=\"flex gap-1.5\">\n <InfoVersion\n v-if=\"info\"\n :version=\"info?.version\" />\n <SpecificationVersion\n :documentType\n :version=\"specificationVersion\" />\n </div>\n <SectionHeader\n :loading=\"!info?.title\"\n tight>\n <SectionHeaderTag :level=\"1\">\n {{ info?.title }}\n </SectionHeaderTag>\n <template #links>\n <InfoLinks\n v-if=\"info\"\n :externalDocs=\"externalDocs\"\n :info=\"info\" />\n </template>\n </SectionHeader>\n <SectionColumns>\n <SectionColumn>\n <slot name=\"download-link\" />\n <InfoDescription\n :description=\"info?.description\"\n :eventBus=\"eventBus\"\n :headingSlugGenerator=\"headingSlugGenerator\" />\n </SectionColumn>\n <SectionColumn v-if=\"$slots.aside\">\n <div class=\"sticky-cards\">\n <slot name=\"aside\" />\n </div>\n </SectionColumn>\n </SectionColumns>\n <SpecificationExtension :value=\"documentExtensions\" />\n <SpecificationExtension :value=\"infoExtensions\" />\n </SectionContent>\n <slot name=\"after\" />\n </Section>\n </SectionContainer>\n</template>\n\n<style scoped>\n.sticky-cards {\n display: flex;\n flex-direction: column;\n position: sticky;\n top: calc(var(--refs-viewport-offset) + 24px);\n}\n</style>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;uBAsCE,YAkDmB,MAAA,yBAAA,EAAA,MAAA;2BADP,CA/CV,YA+CU,MAAA,gBAAA,EAAA;KA9CP,IAAI,QAAA;KACL,cAAW;KACX,OAAM;KACL,gBAAY,OAAA,OAAA,OAAA,WAAiB,QAAA,MAAM,QAAA,UAAU,KAAI,yBAAA,EAAA,IAA4B,QAAA,IAAE,CAAA;;4BAyC/D,CAtCjB,YAsCiB,MAAA,uBAAA,EAAA,EAtCA,SAAO,CAAG,QAAA,MAAA,EAAA;6BAQnB;OAPN,mBAOM,OAPN,YAOM,CALI,QAAA,QAAA,WAAA,EADR,YAE6B,qBAAA;;QAA1B,SAAS,QAAA,MAAM;iEAClB,YAEoC,8BAAA;QADjC,cAAA,QAAA;QACA,SAAS,QAAA;;OAEd,YAYgB,MAAA,sBAAA,EAAA;QAXb,SAAO,CAAG,QAAA,MAAM;QACjB,OAAA;;QAIW,OAAK,cAIG,CAFT,QAAA,QAAA,WAAA,EADR,YAGiB,mBAAA;;SADd,cAAc,QAAA;SACd,MAAM,QAAA;;+BALQ,CAFnB,YAEmB,MAAA,yBAAA,EAAA,EAFA,OAAO,GAAC,EAAA;gCACR,CAAA,gBAAA,gBAAd,QAAA,MAAM,MAAK,EAAA,EAAA,CAAA,CAAA;;;;;OASlB,YAaiB,MAAA,uBAAA,EAAA,MAAA;+BANC,CANhB,YAMgB,MAAA,sBAAA,EAAA,MAAA;gCALe,CAA7B,WAA6B,KAAA,QAAA,iBAAA,EAAA,EAAA,KAAA,GAAA,KAAA,EAC7B,YAGiD,yBAAA;UAF9C,aAAa,QAAA,MAAM;UACnB,UAAU,QAAA;UACV,sBAAsB,QAAA;;;;;;;YAENA,KAAAA,OAAO,SAAA,WAAA,EAA5B,YAIgB,MAAA,sBAAA,EAAA,EAAA,KAAA,GAAA,EAAA;gCADR,CAFN,mBAEM,OAFN,YAEM,CADJ,WAAqB,KAAA,QAAA,SAAA,EAAA,EAAA,KAAA,GAAA,KAAA,CAAA,CAAA,CAAA,CAAA;;;;;OAI3B,YAAsD,MAAA,+BAAA,EAAA,EAA7B,OAAO,QAAA,oBAAkB,EAAA,MAAA,GAAA,CAAA,QAAA,CAAA;OAClD,YAAkD,MAAA,+BAAA,EAAA,EAAzB,OAAO,QAAA,gBAAc,EAAA,MAAA,GAAA,CAAA,QAAA,CAAA;;;yBAEhD,WAAqB,KAAA,QAAA,SAAA,EAAA,EAAA,KAAA,GAAA,KAAA,CAAA,CAAA"}
1
+ {"version":3,"file":"IntroductionLayout.vue.script.js","names":["$slots"],"sources":["../../../../src/blocks/scalar-info-block/components/IntroductionLayout.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport type { AsyncApiInfoObject } from '@scalar/types/asyncapi/3.1'\nimport type { Heading } from '@scalar/types/legacy'\nimport type { WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport type {\n ExternalDocumentationObject,\n InfoObject,\n} from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\n\nimport {\n Section,\n SectionColumn,\n SectionColumns,\n SectionContainer,\n SectionContent,\n SectionHeader,\n SectionHeaderTag,\n} from '@/components/Section'\nimport { SpecificationExtension } from '@/features/specification-extension'\n\nimport InfoDescription from './InfoDescription.vue'\nimport InfoLinks from './InfoLinks.vue'\nimport InfoVersion from './InfoVersion.vue'\nimport SpecificationVersion from './SpecificationVersion.vue'\n\ndefineProps<{\n id: string | undefined\n documentType?: 'openapi' | 'asyncapi'\n specificationVersion: string | undefined\n info: InfoObject | AsyncApiInfoObject | undefined\n externalDocs?: ExternalDocumentationObject\n documentExtensions?: Record<string, unknown>\n infoExtensions?: Record<string, unknown>\n headingSlugGenerator: (heading: Heading) => string\n eventBus: WorkspaceEventBus | null\n}>()\n</script>\n\n<template>\n <SectionContainer>\n <!-- If the #after slot is used, we need to add a gap to the section. -->\n <Section\n :id=\"id\"\n aria-label=\"Introduction\"\n class=\"introduction-section z-1 gap-12\"\n @intersecting=\"\n () => id && eventBus?.emit('intersecting:nav-item', { id })\n \">\n <SectionContent :loading=\"!info\">\n <div class=\"flex gap-1.5\">\n <InfoVersion\n v-if=\"info\"\n :version=\"info?.version\" />\n <SpecificationVersion\n :documentType\n :version=\"specificationVersion\" />\n </div>\n <SectionHeader\n :loading=\"!info?.title\"\n tight>\n <SectionHeaderTag :level=\"1\">\n {{ info?.title }}\n </SectionHeaderTag>\n <template #links>\n <InfoLinks\n v-if=\"info\"\n :externalDocs=\"externalDocs\"\n :info=\"info\" />\n </template>\n </SectionHeader>\n <SectionColumns>\n <SectionColumn>\n <slot name=\"download-link\" />\n <InfoDescription\n :description=\"info?.description\"\n :eventBus=\"eventBus\"\n :headingSlugGenerator=\"headingSlugGenerator\" />\n </SectionColumn>\n <SectionColumn v-if=\"$slots.aside\">\n <div class=\"sticky-cards\">\n <slot name=\"aside\" />\n </div>\n </SectionColumn>\n </SectionColumns>\n <SpecificationExtension :value=\"documentExtensions\" />\n <SpecificationExtension :value=\"infoExtensions\" />\n </SectionContent>\n <slot name=\"after\" />\n </Section>\n </SectionContainer>\n</template>\n\n<style scoped>\n.sticky-cards {\n display: flex;\n flex-direction: column;\n position: sticky;\n top: calc(var(--refs-viewport-offset) + 24px);\n}\n</style>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;uBAuCE,YAkDmB,MAAA,yBAAA,EAAA,MAAA;2BADP,CA/CV,YA+CU,MAAA,gBAAA,EAAA;KA9CP,IAAI,QAAA;KACL,cAAW;KACX,OAAM;KACL,gBAAY,OAAA,OAAA,OAAA,WAAiB,QAAA,MAAM,QAAA,UAAU,KAAI,yBAAA,EAAA,IAA4B,QAAA,IAAE,CAAA;;4BAyC/D,CAtCjB,YAsCiB,MAAA,uBAAA,EAAA,EAtCA,SAAO,CAAG,QAAA,MAAA,EAAA;6BAQnB;OAPN,mBAOM,OAPN,YAOM,CALI,QAAA,QAAA,WAAA,EADR,YAE6B,qBAAA;;QAA1B,SAAS,QAAA,MAAM;iEAClB,YAEoC,8BAAA;QADjC,cAAA,QAAA;QACA,SAAS,QAAA;;OAEd,YAYgB,MAAA,sBAAA,EAAA;QAXb,SAAO,CAAG,QAAA,MAAM;QACjB,OAAA;;QAIW,OAAK,cAIG,CAFT,QAAA,QAAA,WAAA,EADR,YAGiB,mBAAA;;SADd,cAAc,QAAA;SACd,MAAM,QAAA;;+BALQ,CAFnB,YAEmB,MAAA,yBAAA,EAAA,EAFA,OAAO,GAAC,EAAA;gCACR,CAAA,gBAAA,gBAAd,QAAA,MAAM,MAAK,EAAA,EAAA,CAAA,CAAA;;;;;OASlB,YAaiB,MAAA,uBAAA,EAAA,MAAA;+BANC,CANhB,YAMgB,MAAA,sBAAA,EAAA,MAAA;gCALe,CAA7B,WAA6B,KAAA,QAAA,iBAAA,EAAA,EAAA,KAAA,GAAA,KAAA,EAC7B,YAGiD,yBAAA;UAF9C,aAAa,QAAA,MAAM;UACnB,UAAU,QAAA;UACV,sBAAsB,QAAA;;;;;;;YAENA,KAAAA,OAAO,SAAA,WAAA,EAA5B,YAIgB,MAAA,sBAAA,EAAA,EAAA,KAAA,GAAA,EAAA;gCADR,CAFN,mBAEM,OAFN,YAEM,CADJ,WAAqB,KAAA,QAAA,SAAA,EAAA,EAAA,KAAA,GAAA,KAAA,CAAA,CAAA,CAAA,CAAA;;;;;OAI3B,YAAsD,MAAA,+BAAA,EAAA,EAA7B,OAAO,QAAA,oBAAkB,EAAA,MAAA,GAAA,CAAA,QAAA,CAAA;OAClD,YAAkD,MAAA,+BAAA,EAAA,EAAzB,OAAO,QAAA,gBAAc,EAAA,MAAA,GAAA,CAAA,QAAA,CAAA;;;yBAEhD,WAAqB,KAAA,QAAA,SAAA,EAAA,EAAA,KAAA,GAAA,KAAA,CAAA,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"Selector.vue.d.ts","sourceRoot":"","sources":["../../../../src/blocks/scalar-server-selector-block/components/Selector.vue"],"names":[],"mappings":"AA8EA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,8DAA8D,CAAA;AAGhG,KAAK,WAAW,GAAG;IACjB,8BAA8B;IAC9B,cAAc,EAAE,YAAY,GAAG,IAAI,CAAA;IACnC,wBAAwB;IACxB,OAAO,EAAE,YAAY,EAAE,CAAA;IACvB,qEAAqE;IACrE,MAAM,EAAE,MAAM,CAAA;CACf,CAAC;AA+LF,QAAA,MAAM,YAAY;;;;;;;;;;;;kFAIhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
1
+ {"version":3,"file":"Selector.vue.d.ts","sourceRoot":"","sources":["../../../../src/blocks/scalar-server-selector-block/components/Selector.vue"],"names":[],"mappings":"AAgFA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,8DAA8D,CAAA;AAGhG,KAAK,WAAW,GAAG;IACjB,8BAA8B;IAC9B,cAAc,EAAE,YAAY,GAAG,IAAI,CAAA;IACnC,wBAAwB;IACxB,OAAO,EAAE,YAAY,EAAE,CAAA;IACvB,qEAAqE;IACrE,MAAM,EAAE,MAAM,CAAA;CACf,CAAC;AA+LF,QAAA,MAAM,YAAY;;;;;;;;;;;;kFAIhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
@@ -1 +1 @@
1
- {"version":3,"file":"Selector.vue.js","names":[],"sources":["../../../../src/blocks/scalar-server-selector-block/components/Selector.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { ScalarButton, ScalarListbox } from '@scalar/components'\nimport { ScalarIconCaretDown } from '@scalar/icons'\nimport type { ServerObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\nimport { computed } from 'vue'\n\nconst { target, servers, selectedServer } = defineProps<{\n /** The selected server URL */\n selectedServer: ServerObject | null\n /** Available servers */\n servers: ServerObject[]\n /** The id of the target to use for the popover (e.g. address bar) */\n target: string\n}>()\n\nconst emit = defineEmits<{\n /** Emitted when the selected server changes */\n (e: 'update:modelValue', value: string): void\n}>()\n\nconst serverOptions = computed(() =>\n servers.map((server) => ({\n id: server.url,\n label: server.url,\n })),\n)\n\nconst serverUrlWithoutTrailingSlash = computed(\n () => selectedServer?.url?.replace(/\\/$/, '') || '',\n)\n\nconst selectedServerOption = computed(() =>\n serverOptions.value.find((opt) => opt.id === selectedServer?.url),\n)\n\n// For testing\ndefineExpose({\n servers,\n serverUrlWithoutTrailingSlash,\n serverOptions,\n selectedServer,\n})\n</script>\n<template>\n <ScalarListbox\n v-if=\"serverOptions.length > 1\"\n ref=\"elem\"\n class=\"group\"\n :modelValue=\"selectedServerOption\"\n :options=\"serverOptions\"\n placement=\"bottom-start\"\n resize\n :target=\"target\"\n @update:modelValue=\"(e) => emit('update:modelValue', e.id)\">\n <ScalarButton\n class=\"bg-b-1 text-c-1 h-auto w-full justify-start gap-1.5 overflow-x-auto rounded-t-none !rounded-b-xl px-3 py-1.5 text-base/5.25 font-normal whitespace-nowrap -outline-offset-1\"\n variant=\"ghost\">\n <span class=\"sr-only\">Server:</span>\n <span class=\"overflow-x-auto\">{{\n serverUrlWithoutTrailingSlash || 'Select a server'\n }}</span>\n <ScalarIconCaretDown\n class=\"text-c-2 ui-open:rotate-180 mt-0.25 size-3 transition-transform duration-100\"\n weight=\"bold\" />\n </ScalarButton>\n </ScalarListbox>\n <div\n v-else\n class=\"text-c-1 flex h-auto w-full items-center gap-0.75 !rounded-b-xl px-3 py-1.5 text-base leading-[20px] whitespace-nowrap\">\n <span class=\"sr-only\">Server:</span>\n <span class=\"overflow-x-auto\">{{ serverUrlWithoutTrailingSlash }}</span>\n </div>\n</template>\n"],"mappings":""}
1
+ {"version":3,"file":"Selector.vue.js","names":[],"sources":["../../../../src/blocks/scalar-server-selector-block/components/Selector.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { ScalarButton } from '@scalar/components/button'\nimport { ScalarListbox } from '@scalar/components/listbox'\nimport { ScalarIconCaretDown } from '@scalar/icons'\nimport type { ServerObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\nimport { computed } from 'vue'\n\nconst { target, servers, selectedServer } = defineProps<{\n /** The selected server URL */\n selectedServer: ServerObject | null\n /** Available servers */\n servers: ServerObject[]\n /** The id of the target to use for the popover (e.g. address bar) */\n target: string\n}>()\n\nconst emit = defineEmits<{\n /** Emitted when the selected server changes */\n (e: 'update:modelValue', value: string): void\n}>()\n\nconst serverOptions = computed(() =>\n servers.map((server) => ({\n id: server.url,\n label: server.url,\n })),\n)\n\nconst serverUrlWithoutTrailingSlash = computed(\n () => selectedServer?.url?.replace(/\\/$/, '') || '',\n)\n\nconst selectedServerOption = computed(() =>\n serverOptions.value.find((opt) => opt.id === selectedServer?.url),\n)\n\n// For testing\ndefineExpose({\n servers,\n serverUrlWithoutTrailingSlash,\n serverOptions,\n selectedServer,\n})\n</script>\n<template>\n <ScalarListbox\n v-if=\"serverOptions.length > 1\"\n ref=\"elem\"\n class=\"group\"\n :modelValue=\"selectedServerOption\"\n :options=\"serverOptions\"\n placement=\"bottom-start\"\n resize\n :target=\"target\"\n @update:modelValue=\"(e) => emit('update:modelValue', e.id)\">\n <ScalarButton\n class=\"bg-b-1 text-c-1 h-auto w-full justify-start gap-1.5 overflow-x-auto rounded-t-none !rounded-b-xl px-3 py-1.5 text-base/5.25 font-normal whitespace-nowrap -outline-offset-1\"\n variant=\"ghost\">\n <span class=\"sr-only\">Server:</span>\n <span class=\"overflow-x-auto\">{{\n serverUrlWithoutTrailingSlash || 'Select a server'\n }}</span>\n <ScalarIconCaretDown\n class=\"text-c-2 ui-open:rotate-180 mt-0.25 size-3 transition-transform duration-100\"\n weight=\"bold\" />\n </ScalarButton>\n </ScalarListbox>\n <div\n v-else\n class=\"text-c-1 flex h-auto w-full items-center gap-0.75 !rounded-b-xl px-3 py-1.5 text-base leading-[20px] whitespace-nowrap\">\n <span class=\"sr-only\">Server:</span>\n <span class=\"overflow-x-auto\">{{ serverUrlWithoutTrailingSlash }}</span>\n </div>\n</template>\n"],"mappings":""}
@@ -1,6 +1,7 @@
1
1
  import { computed, createBlock, createElementBlock, createElementVNode, createVNode, defineComponent, openBlock, toDisplayString, unref, withCtx } from "vue";
2
- import { ScalarButton, ScalarListbox } from "@scalar/components";
3
2
  import { ScalarIconCaretDown } from "@scalar/icons";
3
+ import { ScalarButton } from "@scalar/components/button";
4
+ import { ScalarListbox } from "@scalar/components/listbox";
4
5
  //#region src/blocks/scalar-server-selector-block/components/Selector.vue?vue&type=script&setup=true&lang.ts
5
6
  var _hoisted_1 = { class: "overflow-x-auto" };
6
7
  var _hoisted_2 = {
@@ -1 +1 @@
1
- {"version":3,"file":"Selector.vue.script.js","names":[],"sources":["../../../../src/blocks/scalar-server-selector-block/components/Selector.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { ScalarButton, ScalarListbox } from '@scalar/components'\nimport { ScalarIconCaretDown } from '@scalar/icons'\nimport type { ServerObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\nimport { computed } from 'vue'\n\nconst { target, servers, selectedServer } = defineProps<{\n /** The selected server URL */\n selectedServer: ServerObject | null\n /** Available servers */\n servers: ServerObject[]\n /** The id of the target to use for the popover (e.g. address bar) */\n target: string\n}>()\n\nconst emit = defineEmits<{\n /** Emitted when the selected server changes */\n (e: 'update:modelValue', value: string): void\n}>()\n\nconst serverOptions = computed(() =>\n servers.map((server) => ({\n id: server.url,\n label: server.url,\n })),\n)\n\nconst serverUrlWithoutTrailingSlash = computed(\n () => selectedServer?.url?.replace(/\\/$/, '') || '',\n)\n\nconst selectedServerOption = computed(() =>\n serverOptions.value.find((opt) => opt.id === selectedServer?.url),\n)\n\n// For testing\ndefineExpose({\n servers,\n serverUrlWithoutTrailingSlash,\n serverOptions,\n selectedServer,\n})\n</script>\n<template>\n <ScalarListbox\n v-if=\"serverOptions.length > 1\"\n ref=\"elem\"\n class=\"group\"\n :modelValue=\"selectedServerOption\"\n :options=\"serverOptions\"\n placement=\"bottom-start\"\n resize\n :target=\"target\"\n @update:modelValue=\"(e) => emit('update:modelValue', e.id)\">\n <ScalarButton\n class=\"bg-b-1 text-c-1 h-auto w-full justify-start gap-1.5 overflow-x-auto rounded-t-none !rounded-b-xl px-3 py-1.5 text-base/5.25 font-normal whitespace-nowrap -outline-offset-1\"\n variant=\"ghost\">\n <span class=\"sr-only\">Server:</span>\n <span class=\"overflow-x-auto\">{{\n serverUrlWithoutTrailingSlash || 'Select a server'\n }}</span>\n <ScalarIconCaretDown\n class=\"text-c-2 ui-open:rotate-180 mt-0.25 size-3 transition-transform duration-100\"\n weight=\"bold\" />\n </ScalarButton>\n </ScalarListbox>\n <div\n v-else\n class=\"text-c-1 flex h-auto w-full items-center gap-0.75 !rounded-b-xl px-3 py-1.5 text-base leading-[20px] whitespace-nowrap\">\n <span class=\"sr-only\">Server:</span>\n <span class=\"overflow-x-auto\">{{ serverUrlWithoutTrailingSlash }}</span>\n </div>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;EAeA,MAAM,OAAO;EAKb,MAAM,gBAAgB,eACpB,QAAA,QAAQ,KAAK,YAAY;GACvB,IAAI,OAAO;GACX,OAAO,OAAO;GACf,EAAE,CACL;EAEA,MAAM,gCAAgC,eAC9B,QAAA,gBAAgB,KAAK,QAAQ,OAAO,GAAG,IAAI,GACnD;EAEA,MAAM,uBAAuB,eAC3B,cAAc,MAAM,MAAM,QAAQ,IAAI,OAAO,QAAA,gBAAgB,IAAI,CACnE;AAGA,WAAa;GACX,SAAM,QAAA;GACN;GACA;GACA,gBAAa,QAAA;GACd,CAAA;;UAIS,cAAA,MAAc,SAAM,KAAA,WAAA,EAD5B,YAqBgB,MAAA,cAAA,EAAA;;IAnBd,KAAI;IACJ,OAAM;IACL,YAAY,qBAAA;IACZ,SAAS,cAAA;IACV,WAAU;IACV,QAAA;IACC,QAAQ,QAAA;IACR,uBAAiB,OAAA,OAAA,OAAA,MAAG,MAAM,KAAI,qBAAsB,EAAE,GAAE;;2BAW1C,CAVf,YAUe,MAAA,aAAA,EAAA;KATb,OAAM;KACN,SAAQ;;4BAC4B;gCAApC,mBAAoC,QAAA,EAA9B,OAAM,WAAS,EAAC,WAAO,GAAA;MAC7B,mBAES,QAFT,YAES,gBADP,8BAAA,SAA6B,kBAAA,EAAA,EAAA;MAE/B,YAEkB,MAAA,oBAAA,EAAA;OADhB,OAAM;OACN,QAAO;;;;;;;;;;uBAGb,mBAKM,OALN,YAKM,CAAA,OAAA,OAAA,OAAA,KAFJ,mBAAoC,QAAA,EAA9B,OAAM,WAAS,EAAC,WAAO,GAAA,GAC7B,mBAAwE,QAAxE,YAAwE,gBAAvC,8BAAA,MAA6B,EAAA,EAAA,CAAA,CAAA"}
1
+ {"version":3,"file":"Selector.vue.script.js","names":[],"sources":["../../../../src/blocks/scalar-server-selector-block/components/Selector.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { ScalarButton } from '@scalar/components/button'\nimport { ScalarListbox } from '@scalar/components/listbox'\nimport { ScalarIconCaretDown } from '@scalar/icons'\nimport type { ServerObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\nimport { computed } from 'vue'\n\nconst { target, servers, selectedServer } = defineProps<{\n /** The selected server URL */\n selectedServer: ServerObject | null\n /** Available servers */\n servers: ServerObject[]\n /** The id of the target to use for the popover (e.g. address bar) */\n target: string\n}>()\n\nconst emit = defineEmits<{\n /** Emitted when the selected server changes */\n (e: 'update:modelValue', value: string): void\n}>()\n\nconst serverOptions = computed(() =>\n servers.map((server) => ({\n id: server.url,\n label: server.url,\n })),\n)\n\nconst serverUrlWithoutTrailingSlash = computed(\n () => selectedServer?.url?.replace(/\\/$/, '') || '',\n)\n\nconst selectedServerOption = computed(() =>\n serverOptions.value.find((opt) => opt.id === selectedServer?.url),\n)\n\n// For testing\ndefineExpose({\n servers,\n serverUrlWithoutTrailingSlash,\n serverOptions,\n selectedServer,\n})\n</script>\n<template>\n <ScalarListbox\n v-if=\"serverOptions.length > 1\"\n ref=\"elem\"\n class=\"group\"\n :modelValue=\"selectedServerOption\"\n :options=\"serverOptions\"\n placement=\"bottom-start\"\n resize\n :target=\"target\"\n @update:modelValue=\"(e) => emit('update:modelValue', e.id)\">\n <ScalarButton\n class=\"bg-b-1 text-c-1 h-auto w-full justify-start gap-1.5 overflow-x-auto rounded-t-none !rounded-b-xl px-3 py-1.5 text-base/5.25 font-normal whitespace-nowrap -outline-offset-1\"\n variant=\"ghost\">\n <span class=\"sr-only\">Server:</span>\n <span class=\"overflow-x-auto\">{{\n serverUrlWithoutTrailingSlash || 'Select a server'\n }}</span>\n <ScalarIconCaretDown\n class=\"text-c-2 ui-open:rotate-180 mt-0.25 size-3 transition-transform duration-100\"\n weight=\"bold\" />\n </ScalarButton>\n </ScalarListbox>\n <div\n v-else\n class=\"text-c-1 flex h-auto w-full items-center gap-0.75 !rounded-b-xl px-3 py-1.5 text-base leading-[20px] whitespace-nowrap\">\n <span class=\"sr-only\">Server:</span>\n <span class=\"overflow-x-auto\">{{ serverUrlWithoutTrailingSlash }}</span>\n </div>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;EAgBA,MAAM,OAAO;EAKb,MAAM,gBAAgB,eACpB,QAAA,QAAQ,KAAK,YAAY;GACvB,IAAI,OAAO;GACX,OAAO,OAAO;GACf,EAAE,CACL;EAEA,MAAM,gCAAgC,eAC9B,QAAA,gBAAgB,KAAK,QAAQ,OAAO,GAAG,IAAI,GACnD;EAEA,MAAM,uBAAuB,eAC3B,cAAc,MAAM,MAAM,QAAQ,IAAI,OAAO,QAAA,gBAAgB,IAAI,CACnE;AAGA,WAAa;GACX,SAAM,QAAA;GACN;GACA;GACA,gBAAa,QAAA;GACd,CAAA;;UAIS,cAAA,MAAc,SAAM,KAAA,WAAA,EAD5B,YAqBgB,MAAA,cAAA,EAAA;;IAnBd,KAAI;IACJ,OAAM;IACL,YAAY,qBAAA;IACZ,SAAS,cAAA;IACV,WAAU;IACV,QAAA;IACC,QAAQ,QAAA;IACR,uBAAiB,OAAA,OAAA,OAAA,MAAG,MAAM,KAAI,qBAAsB,EAAE,GAAE;;2BAW1C,CAVf,YAUe,MAAA,aAAA,EAAA;KATb,OAAM;KACN,SAAQ;;4BAC4B;gCAApC,mBAAoC,QAAA,EAA9B,OAAM,WAAS,EAAC,WAAO,GAAA;MAC7B,mBAES,QAFT,YAES,gBADP,8BAAA,SAA6B,kBAAA,EAAA,EAAA;MAE/B,YAEkB,MAAA,oBAAA,EAAA;OADhB,OAAM;OACN,QAAO;;;;;;;;;;uBAGb,mBAKM,OALN,YAKM,CAAA,OAAA,OAAA,OAAA,KAFJ,mBAAoC,QAAA,EAA9B,OAAM,WAAS,EAAC,WAAO,GAAA,GAC7B,mBAAwE,QAAxE,YAAwE,gBAAvC,8BAAA,MAA6B,EAAA,EAAA,CAAA,CAAA"}