@scalar/api-reference 1.49.3 → 1.49.4

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 (620) hide show
  1. package/CHANGELOG.md +9 -0
  2. package/dist/_virtual/_plugin-vue_export-helper.js +8 -0
  3. package/dist/blocks/index.js +4 -2
  4. package/dist/blocks/scalar-client-selector-block/components/ClientDropdown.vue.d.ts.map +1 -1
  5. package/dist/blocks/scalar-client-selector-block/components/ClientDropdown.vue.js +9 -0
  6. package/dist/blocks/scalar-client-selector-block/components/ClientDropdown.vue.js.map +1 -0
  7. package/dist/blocks/scalar-client-selector-block/components/ClientDropdown.vue.script.js +106 -0
  8. package/dist/blocks/scalar-client-selector-block/components/ClientDropdown.vue.script.js.map +1 -0
  9. package/dist/blocks/scalar-client-selector-block/components/ClientSelector.vue.js +9 -0
  10. package/dist/blocks/scalar-client-selector-block/components/ClientSelector.vue.js.map +1 -0
  11. package/dist/blocks/scalar-client-selector-block/components/ClientSelector.vue.script.js +121 -0
  12. package/dist/blocks/scalar-client-selector-block/components/ClientSelector.vue.script.js.map +1 -0
  13. package/dist/blocks/scalar-client-selector-block/helpers/featured-clients.js +27 -0
  14. package/dist/blocks/scalar-client-selector-block/helpers/featured-clients.js.map +1 -0
  15. package/dist/blocks/scalar-client-selector-block/index.d.ts +1 -1
  16. package/dist/blocks/scalar-info-block/components/DownloadLink.vue.js +9 -0
  17. package/dist/blocks/scalar-info-block/components/DownloadLink.vue.js.map +1 -0
  18. package/dist/blocks/scalar-info-block/components/DownloadLink.vue.script.js +55 -0
  19. package/dist/blocks/scalar-info-block/components/DownloadLink.vue.script.js.map +1 -0
  20. package/dist/blocks/scalar-info-block/components/InfoBlock.vue.js +7 -0
  21. package/dist/blocks/scalar-info-block/components/InfoBlock.vue.js.map +1 -0
  22. package/dist/blocks/scalar-info-block/components/InfoBlock.vue.script.js +69 -0
  23. package/dist/blocks/scalar-info-block/components/InfoBlock.vue.script.js.map +1 -0
  24. package/dist/blocks/scalar-info-block/components/InfoDescription.vue.js +9 -0
  25. package/dist/blocks/scalar-info-block/components/InfoDescription.vue.js.map +1 -0
  26. package/dist/blocks/scalar-info-block/components/InfoDescription.vue.script.js +68 -0
  27. package/dist/blocks/scalar-info-block/components/InfoDescription.vue.script.js.map +1 -0
  28. package/dist/blocks/scalar-info-block/components/InfoLinks.vue.js +7 -0
  29. package/dist/blocks/scalar-info-block/components/InfoLinks.vue.js.map +1 -0
  30. package/dist/blocks/scalar-info-block/components/InfoLinks.vue.script.js +40 -0
  31. package/dist/blocks/scalar-info-block/components/InfoLinks.vue.script.js.map +1 -0
  32. package/dist/blocks/scalar-info-block/components/InfoMarkdownSection.vue.js +7 -0
  33. package/dist/blocks/scalar-info-block/components/InfoMarkdownSection.vue.js.map +1 -0
  34. package/dist/blocks/scalar-info-block/components/InfoMarkdownSection.vue.script.js +35 -0
  35. package/dist/blocks/scalar-info-block/components/InfoMarkdownSection.vue.script.js.map +1 -0
  36. package/dist/blocks/scalar-info-block/components/InfoVersion.vue.js +7 -0
  37. package/dist/blocks/scalar-info-block/components/InfoVersion.vue.js.map +1 -0
  38. package/dist/blocks/scalar-info-block/components/InfoVersion.vue.script.js +25 -0
  39. package/dist/blocks/scalar-info-block/components/InfoVersion.vue.script.js.map +1 -0
  40. package/dist/blocks/scalar-info-block/components/IntroductionCard.vue.js +9 -0
  41. package/dist/blocks/scalar-info-block/components/IntroductionCard.vue.js.map +1 -0
  42. package/dist/blocks/scalar-info-block/components/IntroductionCard.vue.script.js +15 -0
  43. package/dist/blocks/scalar-info-block/components/IntroductionCard.vue.script.js.map +1 -0
  44. package/dist/blocks/scalar-info-block/components/IntroductionCardItem.vue.js +14 -0
  45. package/dist/blocks/scalar-info-block/components/IntroductionCardItem.vue.js.map +1 -0
  46. package/dist/blocks/scalar-info-block/components/IntroductionLayout.vue.js +9 -0
  47. package/dist/blocks/scalar-info-block/components/IntroductionLayout.vue.js.map +1 -0
  48. package/dist/blocks/scalar-info-block/components/IntroductionLayout.vue.script.js +92 -0
  49. package/dist/blocks/scalar-info-block/components/IntroductionLayout.vue.script.js.map +1 -0
  50. package/dist/blocks/scalar-info-block/components/OpenApiVersion.vue.js +7 -0
  51. package/dist/blocks/scalar-info-block/components/OpenApiVersion.vue.js.map +1 -0
  52. package/dist/blocks/scalar-info-block/components/OpenApiVersion.vue.script.js +19 -0
  53. package/dist/blocks/scalar-info-block/components/OpenApiVersion.vue.script.js.map +1 -0
  54. package/dist/blocks/scalar-info-block/index.d.ts +2 -2
  55. package/dist/blocks/scalar-server-selector-block/components/Selector.vue.js +7 -0
  56. package/dist/blocks/scalar-server-selector-block/components/Selector.vue.js.map +1 -0
  57. package/dist/blocks/scalar-server-selector-block/components/Selector.vue.script.js +71 -0
  58. package/dist/blocks/scalar-server-selector-block/components/Selector.vue.script.js.map +1 -0
  59. package/dist/blocks/scalar-server-selector-block/components/ServerSelector.vue.js +7 -0
  60. package/dist/blocks/scalar-server-selector-block/components/ServerSelector.vue.js.map +1 -0
  61. package/dist/blocks/scalar-server-selector-block/components/ServerSelector.vue.script.js +69 -0
  62. package/dist/blocks/scalar-server-selector-block/components/ServerSelector.vue.script.js.map +1 -0
  63. package/dist/blocks/scalar-server-selector-block/index.d.ts +1 -1
  64. package/dist/browser/standalone.js +35377 -34973
  65. package/dist/browser/webpack-stats.json +1 -1
  66. package/dist/components/AgentScalar/AgentScalarButton.vue.js +7 -0
  67. package/dist/components/AgentScalar/AgentScalarButton.vue.js.map +1 -0
  68. package/dist/components/AgentScalar/AgentScalarButton.vue.script.js +21 -0
  69. package/dist/components/AgentScalar/AgentScalarButton.vue.script.js.map +1 -0
  70. package/dist/components/AgentScalar/AgentScalarChatInterface.vue.js +7 -0
  71. package/dist/components/AgentScalar/AgentScalarChatInterface.vue.js.map +1 -0
  72. package/dist/{AgentScalarChatInterface-MUbtSqMw.js → components/AgentScalar/AgentScalarChatInterface.vue.script.js} +5 -6
  73. package/dist/components/AgentScalar/AgentScalarChatInterface.vue.script.js.map +1 -0
  74. package/dist/components/AgentScalar/AgentScalarDrawer.vue.d.ts +0 -1
  75. package/dist/components/AgentScalar/AgentScalarDrawer.vue.d.ts.map +1 -1
  76. package/dist/components/AgentScalar/AgentScalarDrawer.vue.js +9 -0
  77. package/dist/components/AgentScalar/AgentScalarDrawer.vue.js.map +1 -0
  78. package/dist/components/AgentScalar/AgentScalarDrawer.vue.script.js +65 -0
  79. package/dist/components/AgentScalar/AgentScalarDrawer.vue.script.js.map +1 -0
  80. package/dist/components/AgentScalar/OpenMCPButton.vue.js +9 -0
  81. package/dist/components/AgentScalar/OpenMCPButton.vue.js.map +1 -0
  82. package/dist/components/AgentScalar/OpenMCPButton.vue.script.js +184 -0
  83. package/dist/components/AgentScalar/OpenMCPButton.vue.script.js.map +1 -0
  84. package/dist/components/AgentScalar/index.d.ts +3 -3
  85. package/dist/components/Anchor/Anchor.vue.js +7 -0
  86. package/dist/components/Anchor/Anchor.vue.js.map +1 -0
  87. package/dist/components/Anchor/Anchor.vue.script.js +40 -0
  88. package/dist/components/Anchor/Anchor.vue.script.js.map +1 -0
  89. package/dist/components/Anchor/WithBreadcrumb.vue.js +7 -0
  90. package/dist/components/Anchor/WithBreadcrumb.vue.js.map +1 -0
  91. package/dist/components/Anchor/WithBreadcrumb.vue.script.js +32 -0
  92. package/dist/components/Anchor/WithBreadcrumb.vue.script.js.map +1 -0
  93. package/dist/components/Anchor/index.d.ts +2 -2
  94. package/dist/components/ApiReference.vue.d.ts.map +1 -1
  95. package/dist/components/ApiReference.vue.js +12 -0
  96. package/dist/components/ApiReference.vue.js.map +1 -0
  97. package/dist/components/ApiReference.vue.script.js +662 -0
  98. package/dist/components/ApiReference.vue.script.js.map +1 -0
  99. package/dist/components/Badge/Badge.vue.js +9 -0
  100. package/dist/components/Badge/Badge.vue.js.map +1 -0
  101. package/dist/components/Badge/Badge.vue.script.js +22 -0
  102. package/dist/components/Badge/Badge.vue.script.js.map +1 -0
  103. package/dist/components/Badge/index.d.ts +1 -1
  104. package/dist/components/ClassicHeader.vue.js +16 -0
  105. package/dist/components/ClassicHeader.vue.js.map +1 -0
  106. package/dist/components/Content/Auth/Auth.vue.js +7 -0
  107. package/dist/components/Content/Auth/Auth.vue.js.map +1 -0
  108. package/dist/components/Content/Auth/Auth.vue.script.js +70 -0
  109. package/dist/components/Content/Auth/Auth.vue.script.js.map +1 -0
  110. package/dist/components/Content/Auth/helpers/get-default-security.js +64 -0
  111. package/dist/components/Content/Auth/helpers/get-default-security.js.map +1 -0
  112. package/dist/components/Content/Auth/index.d.ts +1 -1
  113. package/dist/components/Content/Content.vue.js +8 -0
  114. package/dist/components/Content/Content.vue.js.map +1 -0
  115. package/dist/components/Content/Content.vue.script.js +192 -0
  116. package/dist/components/Content/Content.vue.script.js.map +1 -0
  117. package/dist/components/Content/Models/Model.vue.js +7 -0
  118. package/dist/components/Content/Models/Model.vue.js.map +1 -0
  119. package/dist/components/Content/Models/Model.vue.script.js +61 -0
  120. package/dist/components/Content/Models/Model.vue.script.js.map +1 -0
  121. package/dist/components/Content/Models/ModelTag.vue.js +7 -0
  122. package/dist/components/Content/Models/ModelTag.vue.js.map +1 -0
  123. package/dist/components/Content/Models/ModelTag.vue.script.js +69 -0
  124. package/dist/components/Content/Models/ModelTag.vue.script.js.map +1 -0
  125. package/dist/components/Content/Models/components/ClassicLayout.vue.js +9 -0
  126. package/dist/components/Content/Models/components/ClassicLayout.vue.js.map +1 -0
  127. package/dist/components/Content/Models/components/ClassicLayout.vue.script.js +81 -0
  128. package/dist/components/Content/Models/components/ClassicLayout.vue.script.js.map +1 -0
  129. package/dist/components/Content/Models/components/ModernLayout.vue.js +7 -0
  130. package/dist/components/Content/Models/components/ModernLayout.vue.js.map +1 -0
  131. package/dist/components/Content/Models/components/ModernLayout.vue.script.js +66 -0
  132. package/dist/components/Content/Models/components/ModernLayout.vue.script.js.map +1 -0
  133. package/dist/components/Content/Models/index.d.ts +2 -2
  134. package/dist/components/Content/Operations/TraversedEntry.vue.js +7 -0
  135. package/dist/components/Content/Operations/TraversedEntry.vue.js.map +1 -0
  136. package/dist/components/Content/Operations/TraversedEntry.vue.script.js +213 -0
  137. package/dist/components/Content/Operations/TraversedEntry.vue.script.js.map +1 -0
  138. package/dist/components/Content/Schema/RenderString.vue.js +7 -0
  139. package/dist/components/Content/Schema/RenderString.vue.js.map +1 -0
  140. package/dist/components/Content/Schema/RenderString.vue.script.js +36 -0
  141. package/dist/components/Content/Schema/RenderString.vue.script.js.map +1 -0
  142. package/dist/components/Content/Schema/Schema.vue.js +9 -0
  143. package/dist/components/Content/Schema/Schema.vue.js.map +1 -0
  144. package/dist/components/Content/Schema/Schema.vue.script.js +184 -0
  145. package/dist/components/Content/Schema/Schema.vue.script.js.map +1 -0
  146. package/dist/components/Content/Schema/SchemaComposition.vue.d.ts +1 -1
  147. package/dist/components/Content/Schema/SchemaComposition.vue.js +7 -0
  148. package/dist/components/Content/Schema/SchemaComposition.vue.js.map +1 -0
  149. package/dist/components/Content/Schema/SchemaComposition.vue.script.js +146 -0
  150. package/dist/components/Content/Schema/SchemaComposition.vue.script.js.map +1 -0
  151. package/dist/components/Content/Schema/SchemaEnumPropertyItem.vue.js +9 -0
  152. package/dist/components/Content/Schema/SchemaEnumPropertyItem.vue.js.map +1 -0
  153. package/dist/components/Content/Schema/SchemaEnumPropertyItem.vue.script.js +29 -0
  154. package/dist/components/Content/Schema/SchemaEnumPropertyItem.vue.script.js.map +1 -0
  155. package/dist/components/Content/Schema/SchemaEnums.vue.js +9 -0
  156. package/dist/components/Content/Schema/SchemaEnums.vue.js.map +1 -0
  157. package/dist/components/Content/Schema/SchemaEnums.vue.script.js +108 -0
  158. package/dist/components/Content/Schema/SchemaEnums.vue.script.js.map +1 -0
  159. package/dist/components/Content/Schema/SchemaHeading.vue.js +9 -0
  160. package/dist/components/Content/Schema/SchemaHeading.vue.js.map +1 -0
  161. package/dist/components/Content/Schema/SchemaHeading.vue.script.js +45 -0
  162. package/dist/components/Content/Schema/SchemaHeading.vue.script.js.map +1 -0
  163. package/dist/components/Content/Schema/SchemaObjectExampleCodeBlock.vue.js +7 -0
  164. package/dist/components/Content/Schema/SchemaObjectExampleCodeBlock.vue.js.map +1 -0
  165. package/dist/components/Content/Schema/SchemaObjectExampleCodeBlock.vue.script.js +55 -0
  166. package/dist/components/Content/Schema/SchemaObjectExampleCodeBlock.vue.script.js.map +1 -0
  167. package/dist/components/Content/Schema/SchemaObjectProperties.vue.js +7 -0
  168. package/dist/components/Content/Schema/SchemaObjectProperties.vue.js.map +1 -0
  169. package/dist/components/Content/Schema/SchemaObjectProperties.vue.script.js +161 -0
  170. package/dist/components/Content/Schema/SchemaObjectProperties.vue.script.js.map +1 -0
  171. package/dist/components/Content/Schema/SchemaProperty.vue.js +9 -0
  172. package/dist/components/Content/Schema/SchemaProperty.vue.js.map +1 -0
  173. package/dist/components/Content/Schema/SchemaProperty.vue.script.js +256 -0
  174. package/dist/components/Content/Schema/SchemaProperty.vue.script.js.map +1 -0
  175. package/dist/components/Content/Schema/SchemaPropertyDefault.vue.js +9 -0
  176. package/dist/components/Content/Schema/SchemaPropertyDefault.vue.js.map +1 -0
  177. package/dist/components/Content/Schema/SchemaPropertyDefault.vue.script.js +35 -0
  178. package/dist/components/Content/Schema/SchemaPropertyDefault.vue.script.js.map +1 -0
  179. package/dist/components/Content/Schema/SchemaPropertyDetail.vue.js +9 -0
  180. package/dist/components/Content/Schema/SchemaPropertyDetail.vue.js.map +1 -0
  181. package/dist/components/Content/Schema/SchemaPropertyDetail.vue.script.js +30 -0
  182. package/dist/components/Content/Schema/SchemaPropertyDetail.vue.script.js.map +1 -0
  183. package/dist/components/Content/Schema/SchemaPropertyExamples.vue.js +9 -0
  184. package/dist/components/Content/Schema/SchemaPropertyExamples.vue.js.map +1 -0
  185. package/dist/components/Content/Schema/SchemaPropertyExamples.vue.script.js +67 -0
  186. package/dist/components/Content/Schema/SchemaPropertyExamples.vue.script.js.map +1 -0
  187. package/dist/components/Content/Schema/SchemaPropertyHeading.vue.js +9 -0
  188. package/dist/components/Content/Schema/SchemaPropertyHeading.vue.js.map +1 -0
  189. package/dist/components/Content/Schema/SchemaPropertyHeading.vue.script.js +251 -0
  190. package/dist/components/Content/Schema/SchemaPropertyHeading.vue.script.js.map +1 -0
  191. package/dist/components/Content/Schema/helpers/format-example.js +26 -0
  192. package/dist/components/Content/Schema/helpers/format-example.js.map +1 -0
  193. package/dist/components/Content/Schema/helpers/format-value.js +22 -0
  194. package/dist/components/Content/Schema/helpers/format-value.js.map +1 -0
  195. package/dist/components/Content/Schema/helpers/get-compositions-to-render.d.ts +1 -1
  196. package/dist/components/Content/Schema/helpers/get-compositions-to-render.js +32 -0
  197. package/dist/components/Content/Schema/helpers/get-compositions-to-render.js.map +1 -0
  198. package/dist/components/Content/Schema/helpers/get-enum-values.js +22 -0
  199. package/dist/components/Content/Schema/helpers/get-enum-values.js.map +1 -0
  200. package/dist/components/Content/Schema/helpers/get-property-description.js +36 -0
  201. package/dist/components/Content/Schema/helpers/get-property-description.js.map +1 -0
  202. package/dist/components/Content/Schema/helpers/get-ref-name.js +19 -0
  203. package/dist/components/Content/Schema/helpers/get-ref-name.js.map +1 -0
  204. package/dist/components/Content/Schema/helpers/get-schema-type.js +49 -0
  205. package/dist/components/Content/Schema/helpers/get-schema-type.js.map +1 -0
  206. package/dist/components/Content/Schema/helpers/has-complex-array-items.js +53 -0
  207. package/dist/components/Content/Schema/helpers/has-complex-array-items.js.map +1 -0
  208. package/dist/components/Content/Schema/helpers/is-empty-schema-object.js +18 -0
  209. package/dist/components/Content/Schema/helpers/is-empty-schema-object.js.map +1 -0
  210. package/dist/components/Content/Schema/helpers/is-type-object.js +18 -0
  211. package/dist/components/Content/Schema/helpers/is-type-object.js.map +1 -0
  212. package/dist/components/Content/Schema/helpers/merge-all-of-schemas.js +175 -0
  213. package/dist/components/Content/Schema/helpers/merge-all-of-schemas.js.map +1 -0
  214. package/dist/components/Content/Schema/helpers/optimize-value-for-display.js +68 -0
  215. package/dist/components/Content/Schema/helpers/optimize-value-for-display.js.map +1 -0
  216. package/dist/components/Content/Schema/helpers/schema-composition.js +11 -0
  217. package/dist/components/Content/Schema/helpers/schema-composition.js.map +1 -0
  218. package/dist/components/Content/Schema/helpers/schema-name.js +23 -0
  219. package/dist/components/Content/Schema/helpers/schema-name.js.map +1 -0
  220. package/dist/components/Content/Schema/helpers/should-display-description.js +17 -0
  221. package/dist/components/Content/Schema/helpers/should-display-description.js.map +1 -0
  222. package/dist/components/Content/Schema/helpers/should-display-heading.js +18 -0
  223. package/dist/components/Content/Schema/helpers/should-display-heading.js.map +1 -0
  224. package/dist/components/Content/Schema/helpers/should-render-array-item-composition.js +20 -0
  225. package/dist/components/Content/Schema/helpers/should-render-array-item-composition.js.map +1 -0
  226. package/dist/components/Content/Schema/helpers/sort-property-names.js +45 -0
  227. package/dist/components/Content/Schema/helpers/sort-property-names.js.map +1 -0
  228. package/dist/components/Content/Schema/index.d.ts +4 -4
  229. package/dist/components/Content/Tags/Tag.vue.js +7 -0
  230. package/dist/components/Content/Tags/Tag.vue.js.map +1 -0
  231. package/dist/components/Content/Tags/Tag.vue.script.js +56 -0
  232. package/dist/components/Content/Tags/Tag.vue.script.js.map +1 -0
  233. package/dist/components/Content/Tags/components/ClassicLayout.vue.js +9 -0
  234. package/dist/components/Content/Tags/components/ClassicLayout.vue.js.map +1 -0
  235. package/dist/components/Content/Tags/components/ClassicLayout.vue.script.js +49 -0
  236. package/dist/components/Content/Tags/components/ClassicLayout.vue.script.js.map +1 -0
  237. package/dist/components/Content/Tags/components/ModernLayout.vue.js +9 -0
  238. package/dist/components/Content/Tags/components/ModernLayout.vue.js.map +1 -0
  239. package/dist/components/Content/Tags/components/ModernLayout.vue.script.js +63 -0
  240. package/dist/components/Content/Tags/components/ModernLayout.vue.script.js.map +1 -0
  241. package/dist/components/Content/Tags/components/TagSection.vue.js +7 -0
  242. package/dist/components/Content/Tags/components/TagSection.vue.js.map +1 -0
  243. package/dist/components/Content/Tags/components/TagSection.vue.script.js +78 -0
  244. package/dist/components/Content/Tags/components/TagSection.vue.script.js.map +1 -0
  245. package/dist/components/Content/Tags/index.d.ts +1 -1
  246. package/dist/components/Content/index.d.ts +2 -2
  247. package/dist/components/GettingStarted.vue.js +9 -0
  248. package/dist/components/GettingStarted.vue.js.map +1 -0
  249. package/dist/components/GettingStarted.vue.script.js +71 -0
  250. package/dist/components/GettingStarted.vue.script.js.map +1 -0
  251. package/dist/components/HttpMethod/HttpMethod.vue.js +7 -0
  252. package/dist/components/HttpMethod/HttpMethod.vue.js.map +1 -0
  253. package/dist/components/HttpMethod/HttpMethod.vue.script.js +33 -0
  254. package/dist/components/HttpMethod/HttpMethod.vue.script.js.map +1 -0
  255. package/dist/components/HttpMethod/index.d.ts +1 -1
  256. package/dist/components/IntersectionObserver.vue.js +7 -0
  257. package/dist/components/IntersectionObserver.vue.js.map +1 -0
  258. package/dist/components/IntersectionObserver.vue.script.js +45 -0
  259. package/dist/components/IntersectionObserver.vue.script.js.map +1 -0
  260. package/dist/components/Lazy/Lazy.vue.js +7 -0
  261. package/dist/components/Lazy/Lazy.vue.js.map +1 -0
  262. package/dist/components/Lazy/Lazy.vue.script.js +101 -0
  263. package/dist/components/Lazy/Lazy.vue.script.js.map +1 -0
  264. package/dist/components/LinkList/LinkList.vue.js +9 -0
  265. package/dist/components/LinkList/LinkList.vue.js.map +1 -0
  266. package/dist/components/LinkList/LinkList.vue.script.js +53 -0
  267. package/dist/components/LinkList/LinkList.vue.script.js.map +1 -0
  268. package/dist/components/LinkList/index.d.ts +1 -1
  269. package/dist/components/LoadingSkeleton.vue.js +9 -0
  270. package/dist/components/LoadingSkeleton.vue.js.map +1 -0
  271. package/dist/components/LoadingSkeleton.vue.script.js +20 -0
  272. package/dist/components/LoadingSkeleton.vue.script.js.map +1 -0
  273. package/dist/components/MobileHeader.vue.d.ts.map +1 -1
  274. package/dist/components/MobileHeader.vue.js +7 -0
  275. package/dist/components/MobileHeader.vue.js.map +1 -0
  276. package/dist/components/MobileHeader.vue.script.js +43 -0
  277. package/dist/components/MobileHeader.vue.script.js.map +1 -0
  278. package/dist/components/OperationPath.vue.js +9 -0
  279. package/dist/components/OperationPath.vue.js.map +1 -0
  280. package/dist/components/OperationPath.vue.script.js +24 -0
  281. package/dist/components/OperationPath.vue.script.js.map +1 -0
  282. package/dist/components/OperationsList/OperationsList.vue.js +9 -0
  283. package/dist/components/OperationsList/OperationsList.vue.js.map +1 -0
  284. package/dist/components/OperationsList/OperationsList.vue.script.js +49 -0
  285. package/dist/components/OperationsList/OperationsList.vue.script.js.map +1 -0
  286. package/dist/components/OperationsList/OperationsListItem.vue.js +9 -0
  287. package/dist/components/OperationsList/OperationsListItem.vue.js.map +1 -0
  288. package/dist/components/OperationsList/OperationsListItem.vue.script.js +51 -0
  289. package/dist/components/OperationsList/OperationsListItem.vue.script.js.map +1 -0
  290. package/dist/components/OperationsList/index.d.ts +1 -1
  291. package/dist/components/RenderPlugins/RenderPlugins.vue.js +7 -0
  292. package/dist/components/RenderPlugins/RenderPlugins.vue.js.map +1 -0
  293. package/dist/components/RenderPlugins/RenderPlugins.vue.script.js +44 -0
  294. package/dist/components/RenderPlugins/RenderPlugins.vue.script.js.map +1 -0
  295. package/dist/components/RenderPlugins/index.d.ts +1 -1
  296. package/dist/components/ScreenReader.vue.js +9 -0
  297. package/dist/components/ScreenReader.vue.js.map +1 -0
  298. package/dist/components/ScreenReader.vue.script.js +22 -0
  299. package/dist/components/ScreenReader.vue.script.js.map +1 -0
  300. package/dist/components/Section/CompactSection.vue.js +9 -0
  301. package/dist/components/Section/CompactSection.vue.js.map +1 -0
  302. package/dist/components/Section/CompactSection.vue.script.js +56 -0
  303. package/dist/components/Section/CompactSection.vue.script.js.map +1 -0
  304. package/dist/components/Section/Section.vue.js +9 -0
  305. package/dist/components/Section/Section.vue.js.map +1 -0
  306. package/dist/components/Section/Section.vue.script.js +23 -0
  307. package/dist/components/Section/Section.vue.script.js.map +1 -0
  308. package/dist/components/Section/SectionAccordion.vue.js +9 -0
  309. package/dist/components/Section/SectionAccordion.vue.js.map +1 -0
  310. package/dist/components/Section/SectionAccordion.vue.script.js +60 -0
  311. package/dist/components/Section/SectionAccordion.vue.script.js.map +1 -0
  312. package/dist/components/Section/SectionColumn.vue.js +14 -0
  313. package/dist/components/Section/SectionColumn.vue.js.map +1 -0
  314. package/dist/components/Section/SectionColumns.vue.js +14 -0
  315. package/dist/components/Section/SectionColumns.vue.js.map +1 -0
  316. package/dist/components/Section/SectionContainer.vue.js +9 -0
  317. package/dist/components/Section/SectionContainer.vue.js.map +1 -0
  318. package/dist/components/Section/SectionContainer.vue.script.js +19 -0
  319. package/dist/components/Section/SectionContainer.vue.script.js.map +1 -0
  320. package/dist/components/Section/SectionContainerAccordion.vue.js +9 -0
  321. package/dist/components/Section/SectionContainerAccordion.vue.js.map +1 -0
  322. package/dist/components/Section/SectionContainerAccordion.vue.script.js +40 -0
  323. package/dist/components/Section/SectionContainerAccordion.vue.script.js.map +1 -0
  324. package/dist/components/Section/SectionContent.vue.js +9 -0
  325. package/dist/components/Section/SectionContent.vue.js.map +1 -0
  326. package/dist/components/Section/SectionContent.vue.script.js +23 -0
  327. package/dist/components/Section/SectionContent.vue.script.js.map +1 -0
  328. package/dist/components/Section/SectionHeader.vue.js +9 -0
  329. package/dist/components/Section/SectionHeader.vue.js.map +1 -0
  330. package/dist/components/Section/SectionHeader.vue.script.js +23 -0
  331. package/dist/components/Section/SectionHeader.vue.script.js.map +1 -0
  332. package/dist/components/Section/SectionHeaderTag.vue.js +9 -0
  333. package/dist/components/Section/SectionHeaderTag.vue.js.map +1 -0
  334. package/dist/components/Section/SectionHeaderTag.vue.script.js +18 -0
  335. package/dist/components/Section/SectionHeaderTag.vue.script.js.map +1 -0
  336. package/dist/components/Section/index.d.ts +10 -10
  337. package/dist/components/SectionFlare/SectionFlare.vue.js +14 -0
  338. package/dist/components/SectionFlare/SectionFlare.vue.js.map +1 -0
  339. package/dist/components/SectionFlare/index.d.ts +1 -1
  340. package/dist/components/ShowMoreButton.vue.js +9 -0
  341. package/dist/components/ShowMoreButton.vue.js.map +1 -0
  342. package/dist/components/ShowMoreButton.vue.script.js +22 -0
  343. package/dist/components/ShowMoreButton.vue.script.js.map +1 -0
  344. package/dist/components/index.d.ts +5 -5
  345. package/dist/components/index.js +20 -102
  346. package/dist/{urls-gPTXGgbj.js → consts/urls.js} +2 -2
  347. package/dist/consts/urls.js.map +1 -0
  348. package/dist/features/Operation/Operation.vue.js +7 -0
  349. package/dist/features/Operation/Operation.vue.js.map +1 -0
  350. package/dist/features/Operation/Operation.vue.script.js +115 -0
  351. package/dist/features/Operation/Operation.vue.script.js.map +1 -0
  352. package/dist/features/Operation/components/ContentTypeSelect.vue.js +7 -0
  353. package/dist/features/Operation/components/ContentTypeSelect.vue.js.map +1 -0
  354. package/dist/features/Operation/components/ContentTypeSelect.vue.script.js +75 -0
  355. package/dist/features/Operation/components/ContentTypeSelect.vue.script.js.map +1 -0
  356. package/dist/features/Operation/components/Header.vue.js +7 -0
  357. package/dist/features/Operation/components/Header.vue.js.map +1 -0
  358. package/dist/features/Operation/components/Header.vue.script.js +42 -0
  359. package/dist/features/Operation/components/Header.vue.script.js.map +1 -0
  360. package/dist/features/Operation/components/Headers.vue.js +9 -0
  361. package/dist/features/Operation/components/Headers.vue.js.map +1 -0
  362. package/dist/features/Operation/components/Headers.vue.script.js +58 -0
  363. package/dist/features/Operation/components/Headers.vue.script.js.map +1 -0
  364. package/dist/features/Operation/components/OperationParameters.vue.d.ts +1 -1
  365. package/dist/features/Operation/components/OperationParameters.vue.js +7 -0
  366. package/dist/features/Operation/components/OperationParameters.vue.js.map +1 -0
  367. package/dist/features/Operation/components/OperationParameters.vue.script.js +108 -0
  368. package/dist/features/Operation/components/OperationParameters.vue.script.js.map +1 -0
  369. package/dist/features/Operation/components/OperationResponses.vue.d.ts +1 -1
  370. package/dist/features/Operation/components/OperationResponses.vue.js +7 -0
  371. package/dist/features/Operation/components/OperationResponses.vue.js.map +1 -0
  372. package/dist/features/Operation/components/OperationResponses.vue.script.js +48 -0
  373. package/dist/features/Operation/components/OperationResponses.vue.script.js.map +1 -0
  374. package/dist/features/Operation/components/ParameterList.vue.d.ts +1 -1
  375. package/dist/features/Operation/components/ParameterList.vue.js +7 -0
  376. package/dist/features/Operation/components/ParameterList.vue.js.map +1 -0
  377. package/dist/features/Operation/components/ParameterList.vue.script.js +53 -0
  378. package/dist/features/Operation/components/ParameterList.vue.script.js.map +1 -0
  379. package/dist/features/Operation/components/ParameterListItem.vue.d.ts +1 -1
  380. package/dist/features/Operation/components/ParameterListItem.vue.js +9 -0
  381. package/dist/features/Operation/components/ParameterListItem.vue.js.map +1 -0
  382. package/dist/features/Operation/components/ParameterListItem.vue.script.js +161 -0
  383. package/dist/features/Operation/components/ParameterListItem.vue.script.js.map +1 -0
  384. package/dist/features/Operation/components/RequestBody.vue.js +9 -0
  385. package/dist/features/Operation/components/RequestBody.vue.js.map +1 -0
  386. package/dist/features/Operation/components/RequestBody.vue.script.js +154 -0
  387. package/dist/features/Operation/components/RequestBody.vue.script.js.map +1 -0
  388. package/dist/features/Operation/components/callbacks/Callback.vue.d.ts +1 -1
  389. package/dist/features/Operation/components/callbacks/Callback.vue.js +9 -0
  390. package/dist/features/Operation/components/callbacks/Callback.vue.js.map +1 -0
  391. package/dist/features/Operation/components/callbacks/Callback.vue.script.js +62 -0
  392. package/dist/features/Operation/components/callbacks/Callback.vue.script.js.map +1 -0
  393. package/dist/features/Operation/components/callbacks/Callbacks.vue.d.ts +1 -1
  394. package/dist/features/Operation/components/callbacks/Callbacks.vue.js +7 -0
  395. package/dist/features/Operation/components/callbacks/Callbacks.vue.js.map +1 -0
  396. package/dist/features/Operation/components/callbacks/Callbacks.vue.script.js +67 -0
  397. package/dist/features/Operation/components/callbacks/Callbacks.vue.script.js.map +1 -0
  398. package/dist/features/Operation/helpers/filter-selected-security.js +30 -0
  399. package/dist/features/Operation/helpers/filter-selected-security.js.map +1 -0
  400. package/dist/features/Operation/helpers/get-first-server.js +27 -0
  401. package/dist/features/Operation/helpers/get-first-server.js.map +1 -0
  402. package/dist/features/Operation/index.d.ts +1 -1
  403. package/dist/features/Operation/layouts/ClassicLayout.vue.d.ts +1 -1
  404. package/dist/features/Operation/layouts/ClassicLayout.vue.js +9 -0
  405. package/dist/features/Operation/layouts/ClassicLayout.vue.js.map +1 -0
  406. package/dist/features/Operation/layouts/ClassicLayout.vue.script.js +243 -0
  407. package/dist/features/Operation/layouts/ClassicLayout.vue.script.js.map +1 -0
  408. package/dist/features/Operation/layouts/ModernLayout.vue.d.ts +1 -1
  409. package/dist/features/Operation/layouts/ModernLayout.vue.js +9 -0
  410. package/dist/features/Operation/layouts/ModernLayout.vue.js.map +1 -0
  411. package/dist/features/Operation/layouts/ModernLayout.vue.script.js +243 -0
  412. package/dist/features/Operation/layouts/ModernLayout.vue.script.js.map +1 -0
  413. package/dist/features/Search/components/SearchButton.vue.js +7 -0
  414. package/dist/features/Search/components/SearchButton.vue.js.map +1 -0
  415. package/dist/features/Search/components/SearchButton.vue.script.js +77 -0
  416. package/dist/features/Search/components/SearchButton.vue.script.js.map +1 -0
  417. package/dist/features/Search/components/SearchModal.vue.js +9 -0
  418. package/dist/features/Search/components/SearchModal.vue.js.map +1 -0
  419. package/dist/features/Search/components/SearchModal.vue.script.js +115 -0
  420. package/dist/features/Search/components/SearchModal.vue.script.js.map +1 -0
  421. package/dist/features/Search/components/SearchResult.vue.js +7 -0
  422. package/dist/features/Search/components/SearchResult.vue.js.map +1 -0
  423. package/dist/features/Search/components/SearchResult.vue.script.js +69 -0
  424. package/dist/features/Search/components/SearchResult.vue.script.js.map +1 -0
  425. package/dist/features/Search/helpers/create-fuse-instance.js +52 -0
  426. package/dist/features/Search/helpers/create-fuse-instance.js.map +1 -0
  427. package/dist/features/Search/helpers/create-search-index.js +127 -0
  428. package/dist/features/Search/helpers/create-search-index.js.map +1 -0
  429. package/dist/features/Search/hooks/useSearchIndex.js +31 -0
  430. package/dist/features/Search/hooks/useSearchIndex.js.map +1 -0
  431. package/dist/features/Search/index.d.ts +2 -2
  432. package/dist/features/Search/types.d.ts +1 -1
  433. package/dist/features/ask-agent-button/AskAgentButton.vue.js +9 -0
  434. package/dist/features/ask-agent-button/AskAgentButton.vue.js.map +1 -0
  435. package/dist/features/ask-agent-button/AskAgentButton.vue.script.js +49 -0
  436. package/dist/features/ask-agent-button/AskAgentButton.vue.script.js.map +1 -0
  437. package/dist/features/developer-tools/DeveloperTools.vue.js +7 -0
  438. package/dist/features/developer-tools/DeveloperTools.vue.js.map +1 -0
  439. package/dist/features/developer-tools/DeveloperTools.vue.script.js +49 -0
  440. package/dist/features/developer-tools/DeveloperTools.vue.script.js.map +1 -0
  441. package/dist/features/developer-tools/components/ApiReferenceToolbarBlurb.vue.js +13 -0
  442. package/dist/features/developer-tools/components/ApiReferenceToolbarBlurb.vue.js.map +1 -0
  443. package/dist/features/developer-tools/components/ApiReferenceToolbarConfigLayout.vue.js +7 -0
  444. package/dist/features/developer-tools/components/ApiReferenceToolbarConfigLayout.vue.js.map +1 -0
  445. package/dist/features/developer-tools/components/ApiReferenceToolbarConfigLayout.vue.script.js +38 -0
  446. package/dist/features/developer-tools/components/ApiReferenceToolbarConfigLayout.vue.script.js.map +1 -0
  447. package/dist/features/developer-tools/components/ApiReferenceToolbarConfigLayoutOptions.vue.js +7 -0
  448. package/dist/features/developer-tools/components/ApiReferenceToolbarConfigLayoutOptions.vue.js.map +1 -0
  449. package/dist/features/developer-tools/components/ApiReferenceToolbarConfigLayoutOptions.vue.script.js +112 -0
  450. package/dist/features/developer-tools/components/ApiReferenceToolbarConfigLayoutOptions.vue.script.js.map +1 -0
  451. package/dist/features/developer-tools/components/ApiReferenceToolbarConfigTheme.vue.js +7 -0
  452. package/dist/features/developer-tools/components/ApiReferenceToolbarConfigTheme.vue.js.map +1 -0
  453. package/dist/features/developer-tools/components/ApiReferenceToolbarConfigTheme.vue.script.js +60 -0
  454. package/dist/features/developer-tools/components/ApiReferenceToolbarConfigTheme.vue.script.js.map +1 -0
  455. package/dist/features/developer-tools/components/ApiReferenceToolbarPopover.vue.js +7 -0
  456. package/dist/features/developer-tools/components/ApiReferenceToolbarPopover.vue.js.map +1 -0
  457. package/dist/features/developer-tools/components/ApiReferenceToolbarPopover.vue.script.js +35 -0
  458. package/dist/features/developer-tools/components/ApiReferenceToolbarPopover.vue.script.js.map +1 -0
  459. package/dist/features/developer-tools/components/ApiReferenceToolbarRegisterButton.vue.js +7 -0
  460. package/dist/features/developer-tools/components/ApiReferenceToolbarRegisterButton.vue.js.map +1 -0
  461. package/dist/features/developer-tools/components/ApiReferenceToolbarRegisterButton.vue.script.js +68 -0
  462. package/dist/features/developer-tools/components/ApiReferenceToolbarRegisterButton.vue.script.js.map +1 -0
  463. package/dist/features/developer-tools/components/ApiReferenceToolbarShareRegister.vue.js +7 -0
  464. package/dist/features/developer-tools/components/ApiReferenceToolbarShareRegister.vue.js.map +1 -0
  465. package/dist/features/developer-tools/components/ApiReferenceToolbarShareRegister.vue.script.js +80 -0
  466. package/dist/features/developer-tools/components/ApiReferenceToolbarShareRegister.vue.script.js.map +1 -0
  467. package/dist/features/developer-tools/components/ApiReferenceToolbarShareTemporary.vue.js +7 -0
  468. package/dist/features/developer-tools/components/ApiReferenceToolbarShareTemporary.vue.js.map +1 -0
  469. package/dist/features/developer-tools/components/ApiReferenceToolbarShareTemporary.vue.script.js +66 -0
  470. package/dist/features/developer-tools/components/ApiReferenceToolbarShareTemporary.vue.script.js.map +1 -0
  471. package/dist/features/developer-tools/components/ApiReferenceToolbarTitle.vue.js +7 -0
  472. package/dist/features/developer-tools/components/ApiReferenceToolbarTitle.vue.js.map +1 -0
  473. package/dist/features/developer-tools/components/ApiReferenceToolbarTitle.vue.script.js +44 -0
  474. package/dist/features/developer-tools/components/ApiReferenceToolbarTitle.vue.script.js.map +1 -0
  475. package/dist/features/developer-tools/components/DeployApiReference.vue.js +7 -0
  476. package/dist/features/developer-tools/components/DeployApiReference.vue.js.map +1 -0
  477. package/dist/features/developer-tools/components/DeployApiReference.vue.script.js +26 -0
  478. package/dist/features/developer-tools/components/DeployApiReference.vue.script.js.map +1 -0
  479. package/dist/features/developer-tools/components/ModifyConfiguration.vue.js +7 -0
  480. package/dist/features/developer-tools/components/ModifyConfiguration.vue.js.map +1 -0
  481. package/dist/features/developer-tools/components/ModifyConfiguration.vue.script.js +86 -0
  482. package/dist/features/developer-tools/components/ModifyConfiguration.vue.script.js.map +1 -0
  483. package/dist/features/developer-tools/components/ShareApiReference.vue.js +7 -0
  484. package/dist/features/developer-tools/components/ShareApiReference.vue.js.map +1 -0
  485. package/dist/features/developer-tools/components/ShareApiReference.vue.script.js +26 -0
  486. package/dist/features/developer-tools/components/ShareApiReference.vue.script.js.map +1 -0
  487. package/dist/features/developer-tools/index.d.ts +1 -1
  488. package/dist/features/example-responses/ExampleResponse.vue.js +9 -0
  489. package/dist/features/example-responses/ExampleResponse.vue.js.map +1 -0
  490. package/dist/features/example-responses/ExampleResponse.vue.script.js +56 -0
  491. package/dist/features/example-responses/ExampleResponse.vue.script.js.map +1 -0
  492. package/dist/features/example-responses/ExampleResponseTab.vue.js +9 -0
  493. package/dist/features/example-responses/ExampleResponseTab.vue.js.map +1 -0
  494. package/dist/features/example-responses/ExampleResponseTab.vue.script.js +21 -0
  495. package/dist/features/example-responses/ExampleResponseTab.vue.script.js.map +1 -0
  496. package/dist/features/example-responses/ExampleResponseTabList.vue.js +9 -0
  497. package/dist/features/example-responses/ExampleResponseTabList.vue.js.map +1 -0
  498. package/dist/features/example-responses/ExampleResponseTabList.vue.script.js +31 -0
  499. package/dist/features/example-responses/ExampleResponseTabList.vue.script.js.map +1 -0
  500. package/dist/features/example-responses/ExampleResponses.vue.js +9 -0
  501. package/dist/features/example-responses/ExampleResponses.vue.js.map +1 -0
  502. package/dist/features/example-responses/ExampleResponses.vue.script.js +157 -0
  503. package/dist/features/example-responses/ExampleResponses.vue.script.js.map +1 -0
  504. package/dist/features/example-responses/ExampleSchema.vue.js +7 -0
  505. package/dist/features/example-responses/ExampleSchema.vue.js.map +1 -0
  506. package/dist/features/example-responses/ExampleSchema.vue.script.js +42 -0
  507. package/dist/features/example-responses/ExampleSchema.vue.script.js.map +1 -0
  508. package/dist/features/example-responses/has-response-content.js +37 -0
  509. package/dist/features/example-responses/has-response-content.js.map +1 -0
  510. package/dist/features/example-responses/index.d.ts +1 -1
  511. package/dist/features/external-docs/ExternalDocs.vue.js +7 -0
  512. package/dist/features/external-docs/ExternalDocs.vue.js.map +1 -0
  513. package/dist/features/external-docs/ExternalDocs.vue.script.js +37 -0
  514. package/dist/features/external-docs/ExternalDocs.vue.script.js.map +1 -0
  515. package/dist/features/external-docs/index.d.ts +1 -1
  516. package/dist/features/index.d.ts +2 -2
  517. package/dist/features/index.js +4 -3
  518. package/dist/features/info-object/Contact.vue.js +7 -0
  519. package/dist/features/info-object/Contact.vue.js.map +1 -0
  520. package/dist/features/info-object/Contact.vue.script.js +37 -0
  521. package/dist/features/info-object/Contact.vue.script.js.map +1 -0
  522. package/dist/features/info-object/License.vue.js +7 -0
  523. package/dist/features/info-object/License.vue.js.map +1 -0
  524. package/dist/features/info-object/License.vue.script.js +32 -0
  525. package/dist/features/info-object/License.vue.script.js.map +1 -0
  526. package/dist/features/info-object/TermsOfService.vue.js +7 -0
  527. package/dist/features/info-object/TermsOfService.vue.js.map +1 -0
  528. package/dist/features/info-object/TermsOfService.vue.script.js +29 -0
  529. package/dist/features/info-object/TermsOfService.vue.script.js.map +1 -0
  530. package/dist/features/info-object/index.d.ts +3 -3
  531. package/dist/features/multiple-documents/DocumentSelector.vue.js +7 -0
  532. package/dist/features/multiple-documents/DocumentSelector.vue.js.map +1 -0
  533. package/dist/features/multiple-documents/DocumentSelector.vue.script.js +48 -0
  534. package/dist/features/multiple-documents/DocumentSelector.vue.script.js.map +1 -0
  535. package/dist/features/specification-extension/SpecificationExtension.vue.js +7 -0
  536. package/dist/features/specification-extension/SpecificationExtension.vue.js.map +1 -0
  537. package/dist/features/specification-extension/SpecificationExtension.vue.script.js +56 -0
  538. package/dist/features/specification-extension/SpecificationExtension.vue.script.js.map +1 -0
  539. package/dist/features/specification-extension/helpers.js +15 -0
  540. package/dist/features/specification-extension/helpers.js.map +1 -0
  541. package/dist/features/specification-extension/index.d.ts +2 -2
  542. package/dist/features/test-request-button/TestRequestButton.vue.js +9 -0
  543. package/dist/features/test-request-button/TestRequestButton.vue.js.map +1 -0
  544. package/dist/features/test-request-button/TestRequestButton.vue.script.js +47 -0
  545. package/dist/features/test-request-button/TestRequestButton.vue.script.js.map +1 -0
  546. package/dist/features/test-request-button/index.d.ts +1 -1
  547. package/dist/features/x-badges/XBadges.vue.js +7 -0
  548. package/dist/features/x-badges/XBadges.vue.js.map +1 -0
  549. package/dist/features/x-badges/XBadges.vue.script.js +31 -0
  550. package/dist/features/x-badges/XBadges.vue.script.js.map +1 -0
  551. package/dist/features/x-badges/index.d.ts +1 -1
  552. package/dist/helpers/color-mode.js +15 -0
  553. package/dist/helpers/color-mode.js.map +1 -0
  554. package/dist/helpers/download.js +77 -0
  555. package/dist/helpers/download.js.map +1 -0
  556. package/dist/helpers/id-routing.js +107 -0
  557. package/dist/helpers/id-routing.js.map +1 -0
  558. package/dist/helpers/index.d.ts +8 -8
  559. package/dist/helpers/index.js +8 -2
  560. package/dist/{lazy-bus-CV8Ox5hD.js → helpers/lazy-bus.js} +3 -106
  561. package/dist/helpers/lazy-bus.js.map +1 -0
  562. package/dist/helpers/load-from-perssistance.js +23 -0
  563. package/dist/helpers/load-from-perssistance.js.map +1 -0
  564. package/dist/helpers/map-config-plugins.js +44 -0
  565. package/dist/helpers/map-config-plugins.js.map +1 -0
  566. package/dist/helpers/map-config-to-workspace-store.js +24 -0
  567. package/dist/helpers/map-config-to-workspace-store.js.map +1 -0
  568. package/dist/helpers/normalize-configurations.js +66 -0
  569. package/dist/helpers/normalize-configurations.js.map +1 -0
  570. package/dist/helpers/openapi.js +132 -0
  571. package/dist/helpers/openapi.js.map +1 -0
  572. package/dist/{storage--3JuzjCI.js → helpers/storage.js} +2 -2
  573. package/dist/helpers/storage.js.map +1 -0
  574. package/dist/helpers/upload-temp-document.js +24 -0
  575. package/dist/helpers/upload-temp-document.js.map +1 -0
  576. package/dist/hooks/index.d.ts +2 -2
  577. package/dist/hooks/index.js +2 -2
  578. package/dist/{use-agent-Bnm1de0n.js → hooks/use-agent.js} +2 -2
  579. package/dist/hooks/use-agent.js.map +1 -0
  580. package/dist/{use-intersection-8QqPi2O-.js → hooks/use-intersection.js} +2 -2
  581. package/dist/hooks/use-intersection.js.map +1 -0
  582. package/dist/index.d.ts +4 -4
  583. package/dist/index.js +6 -6
  584. package/dist/plugins/hooks/usePluginManager.d.ts +1 -1
  585. package/dist/plugins/hooks/usePluginManager.js +16 -0
  586. package/dist/plugins/hooks/usePluginManager.js.map +1 -0
  587. package/dist/plugins/index.d.ts +3 -3
  588. package/dist/plugins/index.js +3 -1
  589. package/dist/plugins/persistance-plugin.js +39 -0
  590. package/dist/plugins/persistance-plugin.js.map +1 -0
  591. package/dist/plugins/plugin-manager.js +32 -0
  592. package/dist/plugins/plugin-manager.js.map +1 -0
  593. package/dist/ssr.js +6 -6
  594. package/dist/standalone/lib/html-api.js +73 -0
  595. package/dist/standalone/lib/html-api.js.map +1 -0
  596. package/dist/style.css +7878 -6432
  597. package/package.json +11 -11
  598. package/dist/AgentScalarChatInterface-MUbtSqMw.js.map +0 -1
  599. package/dist/ExternalDocs-phu7GxpZ.js +0 -272
  600. package/dist/ExternalDocs-phu7GxpZ.js.map +0 -1
  601. package/dist/MobileHeader-DAm6yQX0.js +0 -1373
  602. package/dist/MobileHeader-DAm6yQX0.js.map +0 -1
  603. package/dist/Operation-CvpVIkc3.js +0 -3829
  604. package/dist/Operation-CvpVIkc3.js.map +0 -1
  605. package/dist/SearchButton-xzhIpMCZ.js +0 -621
  606. package/dist/SearchButton-xzhIpMCZ.js.map +0 -1
  607. package/dist/ServerSelector-5y29y2BJ.js +0 -852
  608. package/dist/ServerSelector-5y29y2BJ.js.map +0 -1
  609. package/dist/components/index.js.map +0 -1
  610. package/dist/lazy-bus-CV8Ox5hD.js.map +0 -1
  611. package/dist/normalize-configurations-DcVpOEjD.js +0 -232
  612. package/dist/normalize-configurations-DcVpOEjD.js.map +0 -1
  613. package/dist/plugins-4EyiUD_A.js +0 -80
  614. package/dist/plugins-4EyiUD_A.js.map +0 -1
  615. package/dist/src-DJwsRvMU.js +0 -1686
  616. package/dist/src-DJwsRvMU.js.map +0 -1
  617. package/dist/storage--3JuzjCI.js.map +0 -1
  618. package/dist/urls-gPTXGgbj.js.map +0 -1
  619. package/dist/use-agent-Bnm1de0n.js.map +0 -1
  620. package/dist/use-intersection-8QqPi2O-.js.map +0 -1
@@ -0,0 +1,48 @@
1
+ import { computed, createCommentVNode, createElementBlock, createElementVNode, createVNode, defineComponent, normalizeClass, openBlock, toDisplayString, unref, withCtx } from "vue";
2
+ import { ScalarListbox } from "@scalar/components";
3
+ import { ScalarIconCaretDown } from "@scalar/icons";
4
+ //#region src/features/multiple-documents/DocumentSelector.vue?vue&type=script&setup=true&lang.ts
5
+ var _hoisted_1 = {
6
+ key: 0,
7
+ class: "document-selector p-3 pb-0"
8
+ };
9
+ var _hoisted_2 = {
10
+ class: "group/dropdown-label text-c-2 hover:text-c-1 flex w-full cursor-pointer items-center gap-1 font-medium",
11
+ type: "button"
12
+ };
13
+ var _hoisted_3 = { class: "overflow-hidden text-base text-ellipsis" };
14
+ var DocumentSelector_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
15
+ __name: "DocumentSelector",
16
+ props: {
17
+ options: {},
18
+ modelValue: {}
19
+ },
20
+ emits: ["update:modelValue"],
21
+ setup(__props, { emit: __emit }) {
22
+ const props = __props;
23
+ const emit = __emit;
24
+ const formattedOptions = computed(() => props.options.map((o) => ({
25
+ id: o.id,
26
+ label: o.label
27
+ })));
28
+ const selected = computed(() => formattedOptions.value.find((o) => o.id === props.modelValue));
29
+ return (_ctx, _cache) => {
30
+ return __props.options.length > 1 ? (openBlock(), createElementBlock("div", _hoisted_1, [createVNode(unref(ScalarListbox), {
31
+ modelValue: selected.value,
32
+ options: formattedOptions.value,
33
+ resize: "",
34
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = (e) => emit("update:modelValue", e.id))
35
+ }, {
36
+ default: withCtx(({ open }) => [createElementVNode("button", _hoisted_2, [createElementVNode("span", _hoisted_3, toDisplayString(selected.value?.label || "Select API"), 1), createVNode(unref(ScalarIconCaretDown), {
37
+ class: normalizeClass(["size-3 text-current transition-transform", { "rotate-180": open }]),
38
+ weight: "bold"
39
+ }, null, 8, ["class"])])]),
40
+ _: 1
41
+ }, 8, ["modelValue", "options"])])) : createCommentVNode("", true);
42
+ };
43
+ }
44
+ });
45
+ //#endregion
46
+ export { DocumentSelector_vue_vue_type_script_setup_true_lang_default as default };
47
+
48
+ //# sourceMappingURL=DocumentSelector.vue.script.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DocumentSelector.vue.script.js","names":[],"sources":["../../../src/features/multiple-documents/DocumentSelector.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { ScalarListbox } from '@scalar/components'\nimport { ScalarIconCaretDown } from '@scalar/icons'\nimport { computed } from 'vue'\n\nconst props = defineProps<{\n options: { label: string; id: string }[]\n modelValue?: string\n}>()\n\nconst emit = defineEmits<{\n (e: 'update:modelValue', id: string): void\n}>()\n\nconst formattedOptions = computed(() =>\n props.options.map((o) => ({ id: o.id, label: o.label })),\n)\n\nconst selected = computed(() =>\n formattedOptions.value.find((o) => o.id === props.modelValue),\n)\n</script>\n\n<template>\n <div\n v-if=\"options.length > 1\"\n class=\"document-selector p-3 pb-0\">\n <ScalarListbox\n v-slot=\"{ open }\"\n :modelValue=\"selected\"\n :options=\"formattedOptions\"\n resize\n @update:modelValue=\"(e) => emit('update:modelValue', e.id)\">\n <button\n class=\"group/dropdown-label text-c-2 hover:text-c-1 flex w-full cursor-pointer items-center gap-1 font-medium\"\n type=\"button\">\n <span class=\"overflow-hidden text-base text-ellipsis\">\n {{ selected?.label || 'Select API' }}\n </span>\n <ScalarIconCaretDown\n class=\"size-3 text-current transition-transform\"\n :class=\"{ 'rotate-180': open }\"\n weight=\"bold\" />\n </button>\n </ScalarListbox>\n </div>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;EAKA,MAAM,QAAQ;EAKd,MAAM,OAAO;EAIb,MAAM,mBAAmB,eACvB,MAAM,QAAQ,KAAK,OAAO;GAAE,IAAI,EAAE;GAAI,OAAO,EAAE;GAAO,EAAE,CAC1D;EAEA,MAAM,WAAW,eACf,iBAAiB,MAAM,MAAM,MAAM,EAAE,OAAO,MAAM,WAAW,CAC/D;;UAKU,QAAA,QAAQ,SAAM,KAAA,WAAA,EADtB,mBAqBM,OArBN,YAqBM,CAlBJ,YAiBgB,MAAA,cAAA,EAAA;IAfb,YAAY,SAAA;IACZ,SAAS,iBAAA;IACV,QAAA;IACC,uBAAiB,OAAA,OAAA,OAAA,MAAG,MAAM,KAAI,qBAAsB,EAAE,GAAE;;sBAWhD,EAfC,WAAI,CAKd,mBAUS,UAVT,YAUS,CAPP,mBAEO,QAFP,YAEO,gBADF,SAAA,OAAU,SAAK,aAAA,EAAA,EAAA,EAEpB,YAGkB,MAAA,oBAAA,EAAA;KAFhB,OAAK,eAAA,CAAC,4CAA0C,EAAA,cACxB,MAAI,CAAA,CAAA;KAC5B,QAAO"}
@@ -0,0 +1,7 @@
1
+ import SpecificationExtension_vue_vue_type_script_setup_true_lang_default from "./SpecificationExtension.vue.script.js";
2
+ //#region src/features/specification-extension/SpecificationExtension.vue
3
+ var SpecificationExtension_default = SpecificationExtension_vue_vue_type_script_setup_true_lang_default;
4
+ //#endregion
5
+ export { SpecificationExtension_default as default };
6
+
7
+ //# sourceMappingURL=SpecificationExtension.vue.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SpecificationExtension.vue.js","names":[],"sources":["../../../src/features/specification-extension/SpecificationExtension.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { ScalarErrorBoundary } from '@scalar/components'\nimport { computed } from 'vue'\n\nimport { usePluginManager } from '@/plugins'\n\nconst { value } = defineProps<{\n /**\n * Any value that can contain OpenAPI specification extensions.\n */\n value: Record<string, unknown> | undefined\n}>()\n\nconst { getSpecificationExtensions } = usePluginManager()\n\n/**\n * Extract registered OpenAPI extension names\n */\nfunction getCustomExtensionNames(\n value: Record<string, any> | undefined,\n): `x-${string}`[] {\n return Object.keys(value ?? {}).filter((item) =>\n item.startsWith('x-'),\n ) as `x-${string}`[]\n}\n\n/**\n * Get the components for the specification extensions\n */\nfunction getCustomOpenApiExtensionComponents(extensionNames: `x-${string}`[]) {\n return extensionNames\n .flatMap((name) => getSpecificationExtensions(name))\n .filter((extension) => extension.component)\n}\n\n/**\n * Get the names of custom extensions from the provided value.\n */\nconst customExtensionNames = computed(() => getCustomExtensionNames(value))\n\n/**\n * Get the components for the custom extensions.\n */\nconst customExtensions = computed(() =>\n getCustomOpenApiExtensionComponents(customExtensionNames.value),\n)\n</script>\n\n<template>\n <template v-if=\"typeof value === 'object' && customExtensions.length\">\n <div class=\"text-base\">\n <template v-for=\"extension in customExtensions\">\n <ScalarErrorBoundary>\n <template v-if=\"extension.renderer\">\n <!-- Custom rendering -->\n <component\n :is=\"extension.renderer\"\n v-bind=\"{\n [extension.name]: value?.[extension.name],\n component: extension.component,\n }\" />\n </template>\n <template v-else>\n <!-- Vue rendering -->\n <component\n :is=\"extension.component\"\n v-bind=\"{ [extension.name]: value?.[extension.name] }\" />\n </template>\n </ScalarErrorBoundary>\n </template>\n </div>\n </template>\n</template>\n"],"mappings":""}
@@ -0,0 +1,56 @@
1
+ import { usePluginManager } from "../../plugins/hooks/usePluginManager.js";
2
+ import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, defineComponent, mergeProps, openBlock, renderList, resolveDynamicComponent, unref, withCtx } from "vue";
3
+ import { ScalarErrorBoundary } from "@scalar/components";
4
+ //#region src/features/specification-extension/SpecificationExtension.vue?vue&type=script&setup=true&lang.ts
5
+ var _hoisted_1 = {
6
+ key: 0,
7
+ class: "text-base"
8
+ };
9
+ var SpecificationExtension_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
10
+ __name: "SpecificationExtension",
11
+ props: { value: {} },
12
+ setup(__props) {
13
+ const { getSpecificationExtensions } = usePluginManager();
14
+ /**
15
+ * Extract registered OpenAPI extension names
16
+ */
17
+ function getCustomExtensionNames(value) {
18
+ return Object.keys(value ?? {}).filter((item) => item.startsWith("x-"));
19
+ }
20
+ /**
21
+ * Get the components for the specification extensions
22
+ */
23
+ function getCustomOpenApiExtensionComponents(extensionNames) {
24
+ return extensionNames.flatMap((name) => getSpecificationExtensions(name)).filter((extension) => extension.component);
25
+ }
26
+ /**
27
+ * Get the names of custom extensions from the provided value.
28
+ */
29
+ const customExtensionNames = computed(() => getCustomExtensionNames(__props.value));
30
+ /**
31
+ * Get the components for the custom extensions.
32
+ */
33
+ const customExtensions = computed(() => getCustomOpenApiExtensionComponents(customExtensionNames.value));
34
+ return (_ctx, _cache) => {
35
+ return typeof __props.value === "object" && customExtensions.value.length ? (openBlock(), createElementBlock("div", _hoisted_1, [(openBlock(true), createElementBlock(Fragment, null, renderList(customExtensions.value, (extension) => {
36
+ return openBlock(), createBlock(unref(ScalarErrorBoundary), null, {
37
+ default: withCtx(() => [extension.renderer ? (openBlock(), createBlock(resolveDynamicComponent(extension.renderer), mergeProps({
38
+ key: 0,
39
+ ref_for: true
40
+ }, {
41
+ [extension.name]: __props.value?.[extension.name],
42
+ component: extension.component
43
+ }), null, 16)) : (openBlock(), createBlock(resolveDynamicComponent(extension.component), mergeProps({
44
+ key: 1,
45
+ ref_for: true
46
+ }, { [extension.name]: __props.value?.[extension.name] }), null, 16))]),
47
+ _: 2
48
+ }, 1024);
49
+ }), 256))])) : createCommentVNode("", true);
50
+ };
51
+ }
52
+ });
53
+ //#endregion
54
+ export { SpecificationExtension_vue_vue_type_script_setup_true_lang_default as default };
55
+
56
+ //# sourceMappingURL=SpecificationExtension.vue.script.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SpecificationExtension.vue.script.js","names":[],"sources":["../../../src/features/specification-extension/SpecificationExtension.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { ScalarErrorBoundary } from '@scalar/components'\nimport { computed } from 'vue'\n\nimport { usePluginManager } from '@/plugins'\n\nconst { value } = defineProps<{\n /**\n * Any value that can contain OpenAPI specification extensions.\n */\n value: Record<string, unknown> | undefined\n}>()\n\nconst { getSpecificationExtensions } = usePluginManager()\n\n/**\n * Extract registered OpenAPI extension names\n */\nfunction getCustomExtensionNames(\n value: Record<string, any> | undefined,\n): `x-${string}`[] {\n return Object.keys(value ?? {}).filter((item) =>\n item.startsWith('x-'),\n ) as `x-${string}`[]\n}\n\n/**\n * Get the components for the specification extensions\n */\nfunction getCustomOpenApiExtensionComponents(extensionNames: `x-${string}`[]) {\n return extensionNames\n .flatMap((name) => getSpecificationExtensions(name))\n .filter((extension) => extension.component)\n}\n\n/**\n * Get the names of custom extensions from the provided value.\n */\nconst customExtensionNames = computed(() => getCustomExtensionNames(value))\n\n/**\n * Get the components for the custom extensions.\n */\nconst customExtensions = computed(() =>\n getCustomOpenApiExtensionComponents(customExtensionNames.value),\n)\n</script>\n\n<template>\n <template v-if=\"typeof value === 'object' && customExtensions.length\">\n <div class=\"text-base\">\n <template v-for=\"extension in customExtensions\">\n <ScalarErrorBoundary>\n <template v-if=\"extension.renderer\">\n <!-- Custom rendering -->\n <component\n :is=\"extension.renderer\"\n v-bind=\"{\n [extension.name]: value?.[extension.name],\n component: extension.component,\n }\" />\n </template>\n <template v-else>\n <!-- Vue rendering -->\n <component\n :is=\"extension.component\"\n v-bind=\"{ [extension.name]: value?.[extension.name] }\" />\n </template>\n </ScalarErrorBoundary>\n </template>\n </div>\n </template>\n</template>\n"],"mappings":";;;;;;;;;;;;EAaA,MAAM,EAAE,+BAA+B,kBAAiB;;;;EAKxD,SAAS,wBACP,OACiB;AACjB,UAAO,OAAO,KAAK,SAAS,EAAE,CAAC,CAAC,QAAQ,SACtC,KAAK,WAAW,KAAK,CACtB;;;;;EAMH,SAAS,oCAAoC,gBAAiC;AAC5E,UAAO,eACJ,SAAS,SAAS,2BAA2B,KAAK,CAAA,CAClD,QAAQ,cAAc,UAAU,UAAS;;;;;EAM9C,MAAM,uBAAuB,eAAe,wBAAwB,QAAA,MAAM,CAAA;;;;EAK1E,MAAM,mBAAmB,eACvB,oCAAoC,qBAAqB,MAAM,CACjE;;iBAIyB,QAAA,UAAK,YAAiB,iBAAA,MAAiB,UAAA,WAAA,EAC5D,mBAoBM,OApBN,YAoBM,EAAA,UAAA,KAAA,EAnBJ,mBAkBW,UAAA,MAAA,WAlBmB,iBAAA,QAAb,cAAS;wBACxB,YAgBsB,MAAA,oBAAA,EAAA,MAAA;4BAPT,CARK,UAAU,YAAA,WAAA,EAExB,YAKO,wBAJA,UAAU,SAAQ,EADzB,WAKO;;;;OAHsB,UAAU,OAAO,QAAA,QAAQ,UAAU;iBAAkC,UAAU;oCAO5G,YAE2D,wBADpD,UAAU,UAAS,EAD1B,WAE2D;;;WAA9C,UAAU,OAAO,QAAA,QAAQ,UAAU,OAAI,CAAA,EAAA,MAAA,GAAA,EAAA,CAAA"}
@@ -0,0 +1,15 @@
1
+ //#region src/features/specification-extension/helpers.ts
2
+ /**
3
+ * Utility function to extract all keys starting with 'x-' (OpenAPI extensions) from an object.
4
+ *
5
+ * @param object - The object from which to extract extension keys.
6
+ * @returns An object containing only the entries whose keys start with 'x-'.
7
+ */
8
+ var getXKeysFromObject = (object) => {
9
+ if (!object) return {};
10
+ return Object.fromEntries(Object.entries(object).filter(([key]) => key.startsWith("x-")));
11
+ };
12
+ //#endregion
13
+ export { getXKeysFromObject };
14
+
15
+ //# sourceMappingURL=helpers.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"helpers.js","names":[],"sources":["../../../src/features/specification-extension/helpers.ts"],"sourcesContent":["/**\n * Utility function to extract all keys starting with 'x-' (OpenAPI extensions) from an object.\n *\n * @param object - The object from which to extract extension keys.\n * @returns An object containing only the entries whose keys start with 'x-'.\n */\nexport const getXKeysFromObject = (object?: Record<string, unknown>) => {\n if (!object) {\n // Return an empty object if input is undefined or null\n return {}\n }\n // Filter and return only the entries whose keys start with 'x-'\n return Object.fromEntries(Object.entries(object).filter(([key]) => key.startsWith('x-')))\n}\n"],"mappings":";;;;;;;AAMA,IAAa,sBAAsB,WAAqC;AACtE,KAAI,CAAC,OAEH,QAAO,EAAE;AAGX,QAAO,OAAO,YAAY,OAAO,QAAQ,OAAO,CAAC,QAAQ,CAAC,SAAS,IAAI,WAAW,KAAK,CAAC,CAAC"}
@@ -1,3 +1,3 @@
1
- export { getXKeysFromObject } from './helpers';
2
- export { default as SpecificationExtension } from './SpecificationExtension.vue';
1
+ export { getXKeysFromObject } from './helpers.js';
2
+ export { default as SpecificationExtension } from './SpecificationExtension.vue.js';
3
3
  //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,9 @@
1
+ import _plugin_vue_export_helper_default from "../../_virtual/_plugin-vue_export-helper.js";
2
+ import TestRequestButton_vue_vue_type_script_setup_true_lang_default from "./TestRequestButton.vue.script.js";
3
+ /* empty css */
4
+ //#region src/features/test-request-button/TestRequestButton.vue
5
+ var TestRequestButton_default = /* @__PURE__ */ _plugin_vue_export_helper_default(TestRequestButton_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-342ba62a"]]);
6
+ //#endregion
7
+ export { TestRequestButton_default as default };
8
+
9
+ //# sourceMappingURL=TestRequestButton.vue.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TestRequestButton.vue.js","names":[],"sources":["../../../src/features/test-request-button/TestRequestButton.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport type { HttpMethod } from '@scalar/helpers/http/http-methods'\nimport { ScalarIconPlay } from '@scalar/icons'\nimport type { WorkspaceEventBus } from '@scalar/workspace-store/events'\n\nimport ScreenReader from '@/components/ScreenReader.vue'\n\nconst { id, method, path, eventBus, exampleName } = defineProps<{\n id: string\n method: HttpMethod\n path: string\n eventBus: WorkspaceEventBus\n exampleName?: string\n}>()\n\n/** Route via ID and optionally with example name */\nconst handleClick = () => {\n // Include exampleName in payload if provided\n const payload = {\n id,\n ...(exampleName && { exampleName }),\n }\n eventBus.emit('ui:open:client-modal', payload)\n}\n</script>\n<template>\n <!-- Render the Test Request Button -->\n <button\n class=\"show-api-client-button\"\n :method=\"method\"\n type=\"button\"\n @click.stop=\"handleClick\">\n <ScalarIconPlay\n class=\"size-3\"\n weight=\"fill\" />\n <span>Test Request</span>\n <ScreenReader>({{ method }} {{ path }})</ScreenReader>\n </button>\n</template>\n<style scoped>\n.show-api-client-button {\n appearance: none;\n border: none;\n padding: 1px 6px;\n white-space: nowrap;\n border-radius: var(--scalar-radius);\n display: flex;\n justify-content: center;\n align-items: center;\n font-weight: var(--scalar-semibold);\n font-size: var(--scalar-small);\n line-height: 22px;\n color: var(--scalar-background-2);\n font-family: var(--scalar-font);\n background: var(--scalar-button-1);\n position: relative;\n cursor: pointer;\n box-sizing: border-box;\n box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.1);\n\n outline-offset: 2px;\n}\n.show-api-client-button span,\n.show-api-client-button svg {\n fill: currentColor;\n color: var(--scalar-button-1-color);\n z-index: 1;\n}\n.show-api-client-button:hover {\n background: var(--scalar-button-1-hover);\n}\n.show-api-client-button svg {\n margin-right: 4px;\n}\n</style>\n"],"mappings":""}
@@ -0,0 +1,47 @@
1
+ import ScreenReader_default from "../../components/ScreenReader.vue.js";
2
+ import { createElementBlock, createElementVNode, createTextVNode, createVNode, defineComponent, openBlock, toDisplayString, unref, withCtx, withModifiers } from "vue";
3
+ import { ScalarIconPlay } from "@scalar/icons";
4
+ //#region src/features/test-request-button/TestRequestButton.vue?vue&type=script&setup=true&lang.ts
5
+ var _hoisted_1 = ["method"];
6
+ var TestRequestButton_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
7
+ __name: "TestRequestButton",
8
+ props: {
9
+ id: {},
10
+ method: {},
11
+ path: {},
12
+ eventBus: {},
13
+ exampleName: {}
14
+ },
15
+ setup(__props) {
16
+ /** Route via ID and optionally with example name */
17
+ const handleClick = () => {
18
+ const payload = {
19
+ id: __props.id,
20
+ ...__props.exampleName && { exampleName: __props.exampleName }
21
+ };
22
+ __props.eventBus.emit("ui:open:client-modal", payload);
23
+ };
24
+ return (_ctx, _cache) => {
25
+ return openBlock(), createElementBlock("button", {
26
+ class: "show-api-client-button",
27
+ method: __props.method,
28
+ type: "button",
29
+ onClick: withModifiers(handleClick, ["stop"])
30
+ }, [
31
+ createVNode(unref(ScalarIconPlay), {
32
+ class: "size-3",
33
+ weight: "fill"
34
+ }),
35
+ _cache[0] || (_cache[0] = createElementVNode("span", null, "Test Request", -1)),
36
+ createVNode(ScreenReader_default, null, {
37
+ default: withCtx(() => [createTextVNode("(" + toDisplayString(__props.method) + " " + toDisplayString(__props.path) + ")", 1)]),
38
+ _: 1
39
+ })
40
+ ], 8, _hoisted_1);
41
+ };
42
+ }
43
+ });
44
+ //#endregion
45
+ export { TestRequestButton_vue_vue_type_script_setup_true_lang_default as default };
46
+
47
+ //# sourceMappingURL=TestRequestButton.vue.script.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TestRequestButton.vue.script.js","names":[],"sources":["../../../src/features/test-request-button/TestRequestButton.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport type { HttpMethod } from '@scalar/helpers/http/http-methods'\nimport { ScalarIconPlay } from '@scalar/icons'\nimport type { WorkspaceEventBus } from '@scalar/workspace-store/events'\n\nimport ScreenReader from '@/components/ScreenReader.vue'\n\nconst { id, method, path, eventBus, exampleName } = defineProps<{\n id: string\n method: HttpMethod\n path: string\n eventBus: WorkspaceEventBus\n exampleName?: string\n}>()\n\n/** Route via ID and optionally with example name */\nconst handleClick = () => {\n // Include exampleName in payload if provided\n const payload = {\n id,\n ...(exampleName && { exampleName }),\n }\n eventBus.emit('ui:open:client-modal', payload)\n}\n</script>\n<template>\n <!-- Render the Test Request Button -->\n <button\n class=\"show-api-client-button\"\n :method=\"method\"\n type=\"button\"\n @click.stop=\"handleClick\">\n <ScalarIconPlay\n class=\"size-3\"\n weight=\"fill\" />\n <span>Test Request</span>\n <ScreenReader>({{ method }} {{ path }})</ScreenReader>\n </button>\n</template>\n<style scoped>\n.show-api-client-button {\n appearance: none;\n border: none;\n padding: 1px 6px;\n white-space: nowrap;\n border-radius: var(--scalar-radius);\n display: flex;\n justify-content: center;\n align-items: center;\n font-weight: var(--scalar-semibold);\n font-size: var(--scalar-small);\n line-height: 22px;\n color: var(--scalar-background-2);\n font-family: var(--scalar-font);\n background: var(--scalar-button-1);\n position: relative;\n cursor: pointer;\n box-sizing: border-box;\n box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.1);\n\n outline-offset: 2px;\n}\n.show-api-client-button span,\n.show-api-client-button svg {\n fill: currentColor;\n color: var(--scalar-button-1-color);\n z-index: 1;\n}\n.show-api-client-button:hover {\n background: var(--scalar-button-1-hover);\n}\n.show-api-client-button svg {\n margin-right: 4px;\n}\n</style>\n"],"mappings":";;;;;;;;;;;;;;;;EAgBA,MAAM,oBAAoB;GAExB,MAAM,UAAU;IACd,IAAC,QAAA;IACD,GAAI,QAAA,eAAe,EAAE,aAAU,QAAA,aAAG;IACpC;AACA,WAAA,SAAS,KAAK,wBAAwB,QAAO;;;uBAK7C,mBAUS,UAAA;IATP,OAAM;IACL,QAAQ,QAAA;IACT,MAAK;IACJ,SAAK,cAAO,aAAW,CAAA,OAAA,CAAA;;IACxB,YAEkB,MAAA,eAAA,EAAA;KADhB,OAAM;KACN,QAAO;;8BACT,mBAAyB,QAAA,MAAnB,gBAAY,GAAA;IAClB,YAAsD,sBAAA,MAAA;4BAAvC,CAAA,gBAAD,MAAC,gBAAG,QAAA,OAAM,GAAG,MAAC,gBAAG,QAAA,KAAI,GAAG,KAAC,EAAA,CAAA,CAAA"}
@@ -1,2 +1,2 @@
1
- export { default as TestRequestButton } from './TestRequestButton.vue';
1
+ export { default as TestRequestButton } from './TestRequestButton.vue.js';
2
2
  //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,7 @@
1
+ import XBadges_vue_vue_type_script_setup_true_lang_default from "./XBadges.vue.script.js";
2
+ //#region src/features/x-badges/XBadges.vue
3
+ var XBadges_default = XBadges_vue_vue_type_script_setup_true_lang_default;
4
+ //#endregion
5
+ export { XBadges_default as default };
6
+
7
+ //# sourceMappingURL=XBadges.vue.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"XBadges.vue.js","names":[],"sources":["../../../src/features/x-badges/XBadges.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport type { XBadge } from '@scalar/workspace-store/schemas/extensions/operation'\nimport { computed } from 'vue'\n\nimport { Badge } from '@/components/Badge'\n\nconst { position, badges } = defineProps<{\n position: 'before' | 'after'\n badges: XBadge[] | unknown\n}>()\n\nconst filteredBadges = computed<XBadge[]>(() => {\n if (Array.isArray(badges)) {\n return badges.filter(\n (badge) =>\n badge.position === position ||\n (position === 'after' && !badge.position),\n )\n }\n\n return []\n})\n</script>\n\n<template>\n <template v-if=\"filteredBadges.length\">\n <template\n v-for=\"badge in filteredBadges\"\n :key=\"badge.name\">\n <Badge :color=\"badge.color\">\n {{ badge.name }}\n </Badge>\n </template>\n </template>\n</template>\n"],"mappings":""}
@@ -0,0 +1,31 @@
1
+ import Badge_default from "../../components/Badge/Badge.vue.js";
2
+ import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createTextVNode, defineComponent, openBlock, renderList, toDisplayString, unref, withCtx } from "vue";
3
+ //#region src/features/x-badges/XBadges.vue?vue&type=script&setup=true&lang.ts
4
+ var XBadges_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
5
+ __name: "XBadges",
6
+ props: {
7
+ position: {},
8
+ badges: {}
9
+ },
10
+ setup(__props) {
11
+ const filteredBadges = computed(() => {
12
+ if (Array.isArray(__props.badges)) return __props.badges.filter((badge) => badge.position === __props.position || __props.position === "after" && !badge.position);
13
+ return [];
14
+ });
15
+ return (_ctx, _cache) => {
16
+ return filteredBadges.value.length ? (openBlock(true), createElementBlock(Fragment, { key: 0 }, renderList(filteredBadges.value, (badge) => {
17
+ return openBlock(), createBlock(unref(Badge_default), {
18
+ key: badge.name,
19
+ color: badge.color
20
+ }, {
21
+ default: withCtx(() => [createTextVNode(toDisplayString(badge.name), 1)]),
22
+ _: 2
23
+ }, 1032, ["color"]);
24
+ }), 128)) : createCommentVNode("", true);
25
+ };
26
+ }
27
+ });
28
+ //#endregion
29
+ export { XBadges_vue_vue_type_script_setup_true_lang_default as default };
30
+
31
+ //# sourceMappingURL=XBadges.vue.script.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"XBadges.vue.script.js","names":[],"sources":["../../../src/features/x-badges/XBadges.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport type { XBadge } from '@scalar/workspace-store/schemas/extensions/operation'\nimport { computed } from 'vue'\n\nimport { Badge } from '@/components/Badge'\n\nconst { position, badges } = defineProps<{\n position: 'before' | 'after'\n badges: XBadge[] | unknown\n}>()\n\nconst filteredBadges = computed<XBadge[]>(() => {\n if (Array.isArray(badges)) {\n return badges.filter(\n (badge) =>\n badge.position === position ||\n (position === 'after' && !badge.position),\n )\n }\n\n return []\n})\n</script>\n\n<template>\n <template v-if=\"filteredBadges.length\">\n <template\n v-for=\"badge in filteredBadges\"\n :key=\"badge.name\">\n <Badge :color=\"badge.color\">\n {{ badge.name }}\n </Badge>\n </template>\n </template>\n</template>\n"],"mappings":";;;;;;;;;;EAWA,MAAM,iBAAiB,eAAyB;AAC9C,OAAI,MAAM,QAAQ,QAAA,OAAO,CACvB,QAAO,QAAA,OAAO,QACX,UACC,MAAM,aAAa,QAAA,YAClB,QAAA,aAAa,WAAW,CAAC,MAAM,SACpC;AAGF,UAAO,EAAC;IACT;;UAIiB,eAAA,MAAe,UAAA,UAAA,KAAA,EAC7B,mBAMW,UAAA,EAAA,KAAA,GAAA,EAAA,WALO,eAAA,QAAT,UAAK;wBAEZ,YAEQ,MAAA,cAAA,EAAA;UAHF,MAAM;KACJ,OAAO,MAAM;;4BACH,CAAA,gBAAA,gBAAb,MAAM,KAAI,EAAA,EAAA,CAAA,CAAA"}
@@ -1,2 +1,2 @@
1
- export { default as XBadges } from './XBadges.vue';
1
+ export { default as XBadges } from './XBadges.vue.js';
2
2
  //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,15 @@
1
+ //#region src/helpers/color-mode.ts
2
+ /**
3
+ * Gets the system color mode preference from the browser.
4
+ * Falls back to 'light' if running in a non-browser environment.
5
+ *
6
+ * @returns The system preference for dark or light mode.
7
+ */
8
+ var getSystemModePreference = () => {
9
+ if (typeof window === "undefined" || typeof window?.matchMedia !== "function") return "light";
10
+ return window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
11
+ };
12
+ //#endregion
13
+ export { getSystemModePreference };
14
+
15
+ //# sourceMappingURL=color-mode.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"color-mode.js","names":[],"sources":["../../src/helpers/color-mode.ts"],"sourcesContent":["/**\n * Gets the system color mode preference from the browser.\n * Falls back to 'light' if running in a non-browser environment.\n *\n * @returns The system preference for dark or light mode.\n */\nexport const getSystemModePreference = (): 'dark' | 'light' => {\n if (typeof window === 'undefined' || typeof window?.matchMedia !== 'function') {\n return 'light'\n }\n\n return window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light'\n}\n"],"mappings":";;;;;;;AAMA,IAAa,gCAAkD;AAC7D,KAAI,OAAO,WAAW,eAAe,OAAO,QAAQ,eAAe,WACjE,QAAO;AAGT,QAAO,OAAO,WAAW,+BAA+B,CAAC,UAAU,SAAS"}
@@ -0,0 +1,77 @@
1
+ //#region src/helpers/download.ts
2
+ /**
3
+ * Create a click event that works in both browser and test environments
4
+ */
5
+ function createClickEvent() {
6
+ try {
7
+ return new MouseEvent("click", {
8
+ bubbles: true,
9
+ cancelable: true,
10
+ view: window
11
+ });
12
+ } catch {
13
+ return new MouseEvent("click", {
14
+ bubbles: true,
15
+ cancelable: true
16
+ });
17
+ }
18
+ }
19
+ /**
20
+ * Parse YAML or JSON content into a JavaScript object
21
+ */
22
+ async function parseContent(content) {
23
+ try {
24
+ return JSON.parse(content);
25
+ } catch {
26
+ const { parse } = await import("yaml");
27
+ return parse(content, {
28
+ maxAliasCount: 1e4,
29
+ merge: true
30
+ });
31
+ }
32
+ }
33
+ /**
34
+ * Detect if content is JSON or YAML using lightweight string heuristics
35
+ * to avoid the cost of a full JSON.parse call.
36
+ */
37
+ function detectFormat(content) {
38
+ const trimmed = content.trimStart();
39
+ if (trimmed.startsWith("{") || trimmed.startsWith("[")) return "json";
40
+ return "yaml";
41
+ }
42
+ /**
43
+ * Convert content to the target format, returning the original string when
44
+ * no conversion is needed so that YAML comments, custom formatting, and key
45
+ * ordering are preserved.
46
+ */
47
+ async function formatContent(content, inputFormat, outputFormat) {
48
+ if (inputFormat === outputFormat) return content;
49
+ const parsed = await parseContent(content);
50
+ if (outputFormat === "json") return JSON.stringify(parsed, null, 2);
51
+ const { stringify } = await import("yaml");
52
+ return stringify(parsed);
53
+ }
54
+ /**
55
+ * Trigger the download of the OpenAPI document
56
+ */
57
+ async function downloadDocument(content, filename, format) {
58
+ const inputFormat = detectFormat(content);
59
+ const outputFormat = format ?? inputFormat;
60
+ const contentFilename = `${filename ?? "openapi"}.${outputFormat}`;
61
+ const mimeType = outputFormat === "json" ? "application/json" : "application/x-yaml";
62
+ const formattedContent = await formatContent(content, inputFormat, outputFormat);
63
+ const blob = new Blob([formattedContent], { type: mimeType });
64
+ const data = URL.createObjectURL(blob);
65
+ const link = document.createElement("a");
66
+ link.href = data;
67
+ link.download = contentFilename;
68
+ link.dispatchEvent(createClickEvent());
69
+ setTimeout(() => {
70
+ window.URL.revokeObjectURL(data);
71
+ link.remove();
72
+ }, 100);
73
+ }
74
+ //#endregion
75
+ export { downloadDocument };
76
+
77
+ //# sourceMappingURL=download.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"download.js","names":[],"sources":["../../src/helpers/download.ts"],"sourcesContent":["/**\n * Create a click event that works in both browser and test environments\n */\nfunction createClickEvent() {\n try {\n return new MouseEvent('click', {\n bubbles: true,\n cancelable: true,\n view: window,\n })\n } catch {\n // Fallback for test environment\n return new MouseEvent('click', {\n bubbles: true,\n cancelable: true,\n })\n }\n}\n\n/**\n * Parse YAML or JSON content into a JavaScript object\n */\nasync function parseContent(content: string) {\n try {\n return JSON.parse(content)\n } catch {\n const { parse } = await import('yaml')\n return parse(content, {\n maxAliasCount: 10000,\n merge: true,\n })\n }\n}\n\n/**\n * Detect if content is JSON or YAML using lightweight string heuristics\n * to avoid the cost of a full JSON.parse call.\n */\nfunction detectFormat(content: string): 'json' | 'yaml' {\n const trimmed = content.trimStart()\n if (trimmed.startsWith('{') || trimmed.startsWith('[')) {\n return 'json'\n }\n return 'yaml'\n}\n\n/**\n * Convert content to the target format, returning the original string when\n * no conversion is needed so that YAML comments, custom formatting, and key\n * ordering are preserved.\n */\nasync function formatContent(\n content: string,\n inputFormat: 'json' | 'yaml',\n outputFormat: 'json' | 'yaml',\n): Promise<string> {\n if (inputFormat === outputFormat) {\n return content\n }\n\n const parsed = await parseContent(content)\n\n if (outputFormat === 'json') {\n return JSON.stringify(parsed, null, 2)\n }\n\n const { stringify } = await import('yaml')\n return stringify(parsed)\n}\n\n/**\n * Trigger the download of the OpenAPI document\n */\nexport async function downloadDocument(content: string, filename?: string, format?: 'json' | 'yaml') {\n const inputFormat = detectFormat(content)\n const outputFormat = format ?? inputFormat\n const contentFilename = `${filename ?? 'openapi'}.${outputFormat}`\n const mimeType = outputFormat === 'json' ? 'application/json' : 'application/x-yaml'\n\n const formattedContent = await formatContent(content, inputFormat, outputFormat)\n const blob = new Blob([formattedContent], { type: mimeType })\n\n const data = URL.createObjectURL(blob)\n const link = document.createElement('a')\n\n link.href = data\n link.download = contentFilename\n\n // this is necessary as link.click() does not work on the latest firefox\n link.dispatchEvent(createClickEvent())\n\n // For Firefox it is necessary to delay revoking the ObjectURL\n setTimeout(() => {\n window.URL.revokeObjectURL(data)\n link.remove()\n }, 100)\n}\n"],"mappings":";;;;AAGA,SAAS,mBAAmB;AAC1B,KAAI;AACF,SAAO,IAAI,WAAW,SAAS;GAC7B,SAAS;GACT,YAAY;GACZ,MAAM;GACP,CAAC;SACI;AAEN,SAAO,IAAI,WAAW,SAAS;GAC7B,SAAS;GACT,YAAY;GACb,CAAC;;;;;;AAON,eAAe,aAAa,SAAiB;AAC3C,KAAI;AACF,SAAO,KAAK,MAAM,QAAQ;SACpB;EACN,MAAM,EAAE,UAAU,MAAM,OAAO;AAC/B,SAAO,MAAM,SAAS;GACpB,eAAe;GACf,OAAO;GACR,CAAC;;;;;;;AAQN,SAAS,aAAa,SAAkC;CACtD,MAAM,UAAU,QAAQ,WAAW;AACnC,KAAI,QAAQ,WAAW,IAAI,IAAI,QAAQ,WAAW,IAAI,CACpD,QAAO;AAET,QAAO;;;;;;;AAQT,eAAe,cACb,SACA,aACA,cACiB;AACjB,KAAI,gBAAgB,aAClB,QAAO;CAGT,MAAM,SAAS,MAAM,aAAa,QAAQ;AAE1C,KAAI,iBAAiB,OACnB,QAAO,KAAK,UAAU,QAAQ,MAAM,EAAE;CAGxC,MAAM,EAAE,cAAc,MAAM,OAAO;AACnC,QAAO,UAAU,OAAO;;;;;AAM1B,eAAsB,iBAAiB,SAAiB,UAAmB,QAA0B;CACnG,MAAM,cAAc,aAAa,QAAQ;CACzC,MAAM,eAAe,UAAU;CAC/B,MAAM,kBAAkB,GAAG,YAAY,UAAU,GAAG;CACpD,MAAM,WAAW,iBAAiB,SAAS,qBAAqB;CAEhE,MAAM,mBAAmB,MAAM,cAAc,SAAS,aAAa,aAAa;CAChF,MAAM,OAAO,IAAI,KAAK,CAAC,iBAAiB,EAAE,EAAE,MAAM,UAAU,CAAC;CAE7D,MAAM,OAAO,IAAI,gBAAgB,KAAK;CACtC,MAAM,OAAO,SAAS,cAAc,IAAI;AAExC,MAAK,OAAO;AACZ,MAAK,WAAW;AAGhB,MAAK,cAAc,kBAAkB,CAAC;AAGtC,kBAAiB;AACf,SAAO,IAAI,gBAAgB,KAAK;AAChC,OAAK,QAAQ;IACZ,IAAI"}
@@ -0,0 +1,107 @@
1
+ //#region src/helpers/id-routing.ts
2
+ var sanitizeBasePath = (basePath) => {
3
+ return basePath.replace(/^\/+|\/+$/g, "");
4
+ };
5
+ var isHashBasePath = (basePath) => basePath.startsWith("#");
6
+ var sanitizeHashBasePath = (basePath) => {
7
+ return basePath.replace(/^#+/, "").replace(/\/+$/g, "");
8
+ };
9
+ var applySlugPrefix = (base, slugPrefix) => {
10
+ return slugPrefix ? `${slugPrefix}${base ? "/" : ""}${base}` : base;
11
+ };
12
+ var stripBasePathPrefix = (value, basePath) => {
13
+ if (value === basePath) return "";
14
+ if (value.startsWith(`${basePath}/`)) return value.slice(basePath.length + 1);
15
+ return null;
16
+ };
17
+ /** Extracts an element id from the hash when using hash routing */
18
+ var getIdFromHash = (location, slugPrefix) => {
19
+ const url = typeof location === "string" ? new URL(location) : location;
20
+ return applySlugPrefix(decodeURIComponent(url.hash.slice(1)), slugPrefix);
21
+ };
22
+ /** Extracts an element id from the path when using path routing */
23
+ var getIdFromPath = (location, basePath, slugPrefix) => {
24
+ const url = typeof location === "string" ? new URL(location) : location;
25
+ const sanitized = sanitizeBasePath(basePath);
26
+ const basePathWithSlash = sanitized ? `/${sanitized.split("/").map((segment) => encodeURIComponent(segment)).join("/")}` : "";
27
+ if (url.pathname.startsWith(basePathWithSlash)) {
28
+ const remainder = url.pathname.slice(basePathWithSlash.length);
29
+ return applySlugPrefix(decodeURIComponent(remainder.startsWith("/") ? remainder.slice(1) : remainder), slugPrefix);
30
+ }
31
+ return slugPrefix ?? "";
32
+ };
33
+ /** Extracts an element id from a hash-prefixed basePath */
34
+ var getIdFromHashBasePath = (location, basePath, slugPrefix) => {
35
+ const url = typeof location === "string" ? new URL(location) : location;
36
+ const remainder = stripBasePathPrefix(decodeURIComponent(url.hash.slice(1)), sanitizeHashBasePath(basePath));
37
+ if (remainder !== null) return applySlugPrefix(remainder, slugPrefix);
38
+ return slugPrefix ?? "";
39
+ };
40
+ /** Determines whether a URL matches the provided basePath. */
41
+ var matchesBasePath = (location, basePath) => {
42
+ const url = typeof location === "string" ? new URL(location) : location;
43
+ if (isHashBasePath(basePath)) {
44
+ const hash = decodeURIComponent(url.hash);
45
+ return hash === basePath || hash.startsWith(`${basePath}/`);
46
+ }
47
+ const sanitized = sanitizeBasePath(basePath);
48
+ const basePathWithSlash = sanitized ? `/${sanitized.split("/").map((segment) => encodeURIComponent(segment)).join("/")}` : "";
49
+ return url.pathname === basePathWithSlash || url.pathname.startsWith(`${basePathWithSlash}/`);
50
+ };
51
+ /**
52
+ * Extracts a navigation id from a URL based on the routing type
53
+ *
54
+ * @param url - The URL to extract the id from
55
+ * @param basePath - The base path used in path routing
56
+ * @param slugPrefix - If the document slug is not expected in the URL then we must prefix it
57
+ */
58
+ var getIdFromUrl = (url, basePath, slugPrefix) => {
59
+ if (typeof basePath !== "string") return getIdFromHash(url, slugPrefix);
60
+ return isHashBasePath(basePath) ? getIdFromHashBasePath(url, basePath, slugPrefix) : getIdFromPath(url, basePath, slugPrefix);
61
+ };
62
+ /**
63
+ * Strips the first segment from an id and preserves trailing slashes
64
+ * Used in single-document mode where the document slug is not needed in the URL
65
+ *
66
+ * @param id - The full id to process
67
+ * @returns The id with the first segment removed, preserving trailing slash if present
68
+ */
69
+ var stripFirstSegment = (id) => {
70
+ const hasTrailingSlash = id.endsWith("/");
71
+ const result = id.split("/").filter(Boolean).slice(1).join("/");
72
+ return hasTrailingSlash && result ? `${result}/` : result;
73
+ };
74
+ /**
75
+ * Generate a new URL and applies the ID to the path or hash
76
+ * depending on the type of routing used
77
+ *
78
+ * @param id - The id to apply to the URL
79
+ * @param basePath - The base path used in path routing
80
+ * @param isMultiDocument - Whether the document is multi-document or single-document. Single-document documents will strip the document slug from the id
81
+ */
82
+ var makeUrlFromId = (_id, basePath, isMultiDocument) => {
83
+ if (typeof window === "undefined") return;
84
+ /** When there is only 1 document we don't need to include the document name in the URL */
85
+ const id = isMultiDocument ? _id : stripFirstSegment(_id);
86
+ const url = new URL(window.location.href);
87
+ if (typeof basePath === "string") if (isHashBasePath(basePath)) url.hash = [sanitizeHashBasePath(basePath), id].filter(Boolean).join("/");
88
+ else url.pathname = `${sanitizeBasePath(basePath)}/${id}`;
89
+ else url.hash = id;
90
+ return url;
91
+ };
92
+ /** Extracts the schema parameters from the id if they are present */
93
+ var getSchemaParamsFromId = (id) => {
94
+ const matcher = id.match(/(.*)(\.body\.|\.path\.|\.query\.|\.header\.)(.*)/);
95
+ if (matcher && typeof matcher[1] === "string" && typeof matcher[2] === "string") return {
96
+ rawId: matcher[1],
97
+ params: matcher[2].slice(1) + matcher[3]
98
+ };
99
+ return {
100
+ rawId: id,
101
+ params: ""
102
+ };
103
+ };
104
+ //#endregion
105
+ export { getIdFromUrl, getSchemaParamsFromId, makeUrlFromId, matchesBasePath };
106
+
107
+ //# sourceMappingURL=id-routing.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"id-routing.js","names":[],"sources":["../../src/helpers/id-routing.ts"],"sourcesContent":["export const sanitizeBasePath = (basePath: string) => {\n return basePath.replace(/^\\/+|\\/+$/g, '')\n}\n\nconst isHashBasePath = (basePath: string) => basePath.startsWith('#')\n\nconst sanitizeHashBasePath = (basePath: string) => {\n return basePath.replace(/^#+/, '').replace(/\\/+$/g, '')\n}\n\nconst applySlugPrefix = (base: string, slugPrefix: string | undefined) => {\n return slugPrefix ? `${slugPrefix}${base ? '/' : ''}${base}` : base\n}\n\nconst stripBasePathPrefix = (value: string, basePath: string) => {\n if (value === basePath) {\n return ''\n }\n\n if (value.startsWith(`${basePath}/`)) {\n return value.slice(basePath.length + 1)\n }\n\n return null\n}\n\n/** Extracts an element id from the hash when using hash routing */\nexport const getIdFromHash = (location: string | URL, slugPrefix: string | undefined) => {\n const url = typeof location === 'string' ? new URL(location) : location\n\n const base = decodeURIComponent(url.hash.slice(1))\n\n return applySlugPrefix(base, slugPrefix)\n}\n/** Extracts an element id from the path when using path routing */\nexport const getIdFromPath = (location: string | URL, basePath: string, slugPrefix: string | undefined) => {\n const url = typeof location === 'string' ? new URL(location) : location\n const sanitized = sanitizeBasePath(basePath)\n\n // Construct the full basePath with leading slash and encode it for matching\n // We need to encode each segment separately to match how URLs encode pathnames\n const basePathWithSlash = sanitized\n ? `/${sanitized\n .split('/')\n .map((segment) => encodeURIComponent(segment))\n .join('/')}`\n : ''\n\n // Extract the portion after the basePath\n if (url.pathname.startsWith(basePathWithSlash)) {\n const remainder = url.pathname.slice(basePathWithSlash.length)\n const base = decodeURIComponent(remainder.startsWith('/') ? remainder.slice(1) : remainder)\n return applySlugPrefix(base, slugPrefix)\n }\n\n return slugPrefix ?? ''\n}\n\n/** Extracts an element id from a hash-prefixed basePath */\nexport const getIdFromHashBasePath = (location: string | URL, basePath: string, slugPrefix: string | undefined) => {\n const url = typeof location === 'string' ? new URL(location) : location\n const hash = decodeURIComponent(url.hash.slice(1))\n const sanitized = sanitizeHashBasePath(basePath)\n\n const remainder = stripBasePathPrefix(hash, sanitized)\n if (remainder !== null) {\n return applySlugPrefix(remainder, slugPrefix)\n }\n\n return slugPrefix ?? ''\n}\n\n/** Determines whether a URL matches the provided basePath. */\nexport const matchesBasePath = (location: string | URL, basePath: string) => {\n const url = typeof location === 'string' ? new URL(location) : location\n\n if (isHashBasePath(basePath)) {\n const hash = decodeURIComponent(url.hash)\n return hash === basePath || hash.startsWith(`${basePath}/`)\n }\n\n const sanitized = sanitizeBasePath(basePath)\n const basePathWithSlash = sanitized\n ? `/${sanitized\n .split('/')\n .map((segment) => encodeURIComponent(segment))\n .join('/')}`\n : ''\n\n return url.pathname === basePathWithSlash || url.pathname.startsWith(`${basePathWithSlash}/`)\n}\n\n/**\n * Extracts a navigation id from a URL based on the routing type\n *\n * @param url - The URL to extract the id from\n * @param basePath - The base path used in path routing\n * @param slugPrefix - If the document slug is not expected in the URL then we must prefix it\n */\nexport const getIdFromUrl = (url: string | URL, basePath: string | undefined, slugPrefix: string | undefined) => {\n if (typeof basePath !== 'string') {\n return getIdFromHash(url, slugPrefix)\n }\n\n return isHashBasePath(basePath)\n ? getIdFromHashBasePath(url, basePath, slugPrefix)\n : getIdFromPath(url, basePath, slugPrefix)\n}\n\n/**\n * Strips the first segment from an id and preserves trailing slashes\n * Used in single-document mode where the document slug is not needed in the URL\n *\n * @param id - The full id to process\n * @returns The id with the first segment removed, preserving trailing slash if present\n */\nconst stripFirstSegment = (id: string): string => {\n // For preserving trailing slash in the id\n const hasTrailingSlash = id.endsWith('/')\n const segments = id.split('/').filter(Boolean).slice(1)\n const result = segments.join('/')\n\n // Only preserve trailing slash if there's actual content\n return hasTrailingSlash && result ? `${result}/` : result\n}\n\n/**\n * Generate a new URL and applies the ID to the path or hash\n * depending on the type of routing used\n *\n * @param id - The id to apply to the URL\n * @param basePath - The base path used in path routing\n * @param isMultiDocument - Whether the document is multi-document or single-document. Single-document documents will strip the document slug from the id\n */\nexport const makeUrlFromId = (_id: string, basePath: string | undefined, isMultiDocument: boolean) => {\n if (typeof window === 'undefined') {\n return undefined\n }\n\n /** When there is only 1 document we don't need to include the document name in the URL */\n const id = isMultiDocument ? _id : stripFirstSegment(_id)\n const url = new URL(window.location.href)\n\n if (typeof basePath === 'string') {\n if (isHashBasePath(basePath)) {\n const base = sanitizeHashBasePath(basePath)\n url.hash = [base, id].filter(Boolean).join('/')\n } else {\n const base = sanitizeBasePath(basePath)\n url.pathname = `${base}/${id}`\n }\n } else {\n url.hash = id\n }\n\n return url\n}\n\n/** Extracts the schema parameters from the id if they are present */\nexport const getSchemaParamsFromId = (id: string): { rawId: string; params: string } => {\n const matcher = id.match(/(.*)(\\.body\\.|\\.path\\.|\\.query\\.|\\.header\\.)(.*)/)\n\n if (matcher && typeof matcher[1] === 'string' && typeof matcher[2] === 'string') {\n return {\n rawId: matcher[1],\n params: matcher[2].slice(1) + matcher[3],\n }\n }\n return {\n rawId: id,\n params: '',\n }\n}\n"],"mappings":";AAAA,IAAa,oBAAoB,aAAqB;AACpD,QAAO,SAAS,QAAQ,cAAc,GAAG;;AAG3C,IAAM,kBAAkB,aAAqB,SAAS,WAAW,IAAI;AAErE,IAAM,wBAAwB,aAAqB;AACjD,QAAO,SAAS,QAAQ,OAAO,GAAG,CAAC,QAAQ,SAAS,GAAG;;AAGzD,IAAM,mBAAmB,MAAc,eAAmC;AACxE,QAAO,aAAa,GAAG,aAAa,OAAO,MAAM,KAAK,SAAS;;AAGjE,IAAM,uBAAuB,OAAe,aAAqB;AAC/D,KAAI,UAAU,SACZ,QAAO;AAGT,KAAI,MAAM,WAAW,GAAG,SAAS,GAAG,CAClC,QAAO,MAAM,MAAM,SAAS,SAAS,EAAE;AAGzC,QAAO;;;AAIT,IAAa,iBAAiB,UAAwB,eAAmC;CACvF,MAAM,MAAM,OAAO,aAAa,WAAW,IAAI,IAAI,SAAS,GAAG;AAI/D,QAAO,gBAFM,mBAAmB,IAAI,KAAK,MAAM,EAAE,CAAC,EAErB,WAAW;;;AAG1C,IAAa,iBAAiB,UAAwB,UAAkB,eAAmC;CACzG,MAAM,MAAM,OAAO,aAAa,WAAW,IAAI,IAAI,SAAS,GAAG;CAC/D,MAAM,YAAY,iBAAiB,SAAS;CAI5C,MAAM,oBAAoB,YACtB,IAAI,UACD,MAAM,IAAI,CACV,KAAK,YAAY,mBAAmB,QAAQ,CAAC,CAC7C,KAAK,IAAI,KACZ;AAGJ,KAAI,IAAI,SAAS,WAAW,kBAAkB,EAAE;EAC9C,MAAM,YAAY,IAAI,SAAS,MAAM,kBAAkB,OAAO;AAE9D,SAAO,gBADM,mBAAmB,UAAU,WAAW,IAAI,GAAG,UAAU,MAAM,EAAE,GAAG,UAAU,EAC9D,WAAW;;AAG1C,QAAO,cAAc;;;AAIvB,IAAa,yBAAyB,UAAwB,UAAkB,eAAmC;CACjH,MAAM,MAAM,OAAO,aAAa,WAAW,IAAI,IAAI,SAAS,GAAG;CAI/D,MAAM,YAAY,oBAHL,mBAAmB,IAAI,KAAK,MAAM,EAAE,CAAC,EAChC,qBAAqB,SAAS,CAEM;AACtD,KAAI,cAAc,KAChB,QAAO,gBAAgB,WAAW,WAAW;AAG/C,QAAO,cAAc;;;AAIvB,IAAa,mBAAmB,UAAwB,aAAqB;CAC3E,MAAM,MAAM,OAAO,aAAa,WAAW,IAAI,IAAI,SAAS,GAAG;AAE/D,KAAI,eAAe,SAAS,EAAE;EAC5B,MAAM,OAAO,mBAAmB,IAAI,KAAK;AACzC,SAAO,SAAS,YAAY,KAAK,WAAW,GAAG,SAAS,GAAG;;CAG7D,MAAM,YAAY,iBAAiB,SAAS;CAC5C,MAAM,oBAAoB,YACtB,IAAI,UACD,MAAM,IAAI,CACV,KAAK,YAAY,mBAAmB,QAAQ,CAAC,CAC7C,KAAK,IAAI,KACZ;AAEJ,QAAO,IAAI,aAAa,qBAAqB,IAAI,SAAS,WAAW,GAAG,kBAAkB,GAAG;;;;;;;;;AAU/F,IAAa,gBAAgB,KAAmB,UAA8B,eAAmC;AAC/G,KAAI,OAAO,aAAa,SACtB,QAAO,cAAc,KAAK,WAAW;AAGvC,QAAO,eAAe,SAAS,GAC3B,sBAAsB,KAAK,UAAU,WAAW,GAChD,cAAc,KAAK,UAAU,WAAW;;;;;;;;;AAU9C,IAAM,qBAAqB,OAAuB;CAEhD,MAAM,mBAAmB,GAAG,SAAS,IAAI;CAEzC,MAAM,SADW,GAAG,MAAM,IAAI,CAAC,OAAO,QAAQ,CAAC,MAAM,EAAE,CAC/B,KAAK,IAAI;AAGjC,QAAO,oBAAoB,SAAS,GAAG,OAAO,KAAK;;;;;;;;;;AAWrD,IAAa,iBAAiB,KAAa,UAA8B,oBAA6B;AACpG,KAAI,OAAO,WAAW,YACpB;;CAIF,MAAM,KAAK,kBAAkB,MAAM,kBAAkB,IAAI;CACzD,MAAM,MAAM,IAAI,IAAI,OAAO,SAAS,KAAK;AAEzC,KAAI,OAAO,aAAa,SACtB,KAAI,eAAe,SAAS,CAE1B,KAAI,OAAO,CADE,qBAAqB,SAAS,EACzB,GAAG,CAAC,OAAO,QAAQ,CAAC,KAAK,IAAI;KAG/C,KAAI,WAAW,GADF,iBAAiB,SAAS,CAChB,GAAG;KAG5B,KAAI,OAAO;AAGb,QAAO;;;AAIT,IAAa,yBAAyB,OAAkD;CACtF,MAAM,UAAU,GAAG,MAAM,mDAAmD;AAE5E,KAAI,WAAW,OAAO,QAAQ,OAAO,YAAY,OAAO,QAAQ,OAAO,SACrE,QAAO;EACL,OAAO,QAAQ;EACf,QAAQ,QAAQ,GAAG,MAAM,EAAE,GAAG,QAAQ;EACvC;AAEH,QAAO;EACL,OAAO;EACP,QAAQ;EACT"}
@@ -1,9 +1,9 @@
1
- export { getSystemModePreference } from './color-mode';
2
- export { downloadDocument } from './download';
3
- export { getIdFromUrl, makeUrlFromId } from './id-routing';
4
- export { addToPriorityQueue, blockIntersection, firstLazyLoadComplete, intersectionEnabled, scrollToLazy, } from './lazy-bus';
5
- export { loadAuthFromStorage, loadClientFromStorage } from './load-from-perssistance';
6
- export { mapConfigPlugins } from './map-config-plugins';
7
- export { mapConfigToWorkspaceStore } from './map-config-to-workspace-store';
8
- export { type NormalizedConfiguration, normalizeConfigurations } from './normalize-configurations';
1
+ export { getSystemModePreference } from './color-mode.js';
2
+ export { downloadDocument } from './download.js';
3
+ export { getIdFromUrl, makeUrlFromId } from './id-routing.js';
4
+ export { addToPriorityQueue, blockIntersection, firstLazyLoadComplete, intersectionEnabled, scrollToLazy, } from './lazy-bus.js';
5
+ export { loadAuthFromStorage, loadClientFromStorage } from './load-from-perssistance.js';
6
+ export { mapConfigPlugins } from './map-config-plugins.js';
7
+ export { mapConfigToWorkspaceStore } from './map-config-to-workspace-store.js';
8
+ export { type NormalizedConfiguration, normalizeConfigurations } from './normalize-configurations.js';
9
9
  //# sourceMappingURL=index.d.ts.map
@@ -1,3 +1,9 @@
1
- import { a as intersectionEnabled, c as scrollToLazy, d as getIdFromUrl, f as makeUrlFromId, n as blockIntersection, r as firstLazyLoadComplete, t as addToPriorityQueue } from "../lazy-bus-CV8Ox5hD.js";
2
- import { a as loadClientFromStorage, i as loadAuthFromStorage, n as mapConfigToWorkspaceStore, o as downloadDocument, r as mapConfigPlugins, s as getSystemModePreference, t as normalizeConfigurations } from "../normalize-configurations-DcVpOEjD.js";
1
+ import { getIdFromUrl, makeUrlFromId } from "./id-routing.js";
2
+ import { addToPriorityQueue, blockIntersection, firstLazyLoadComplete, intersectionEnabled, scrollToLazy } from "./lazy-bus.js";
3
+ import { getSystemModePreference } from "./color-mode.js";
4
+ import { downloadDocument } from "./download.js";
5
+ import { loadAuthFromStorage, loadClientFromStorage } from "./load-from-perssistance.js";
6
+ import { mapConfigPlugins } from "./map-config-plugins.js";
7
+ import { mapConfigToWorkspaceStore } from "./map-config-to-workspace-store.js";
8
+ import { normalizeConfigurations } from "./normalize-configurations.js";
3
9
  export { addToPriorityQueue, blockIntersection, downloadDocument, firstLazyLoadComplete, getIdFromUrl, getSystemModePreference, intersectionEnabled, loadAuthFromStorage, loadClientFromStorage, makeUrlFromId, mapConfigPlugins, mapConfigToWorkspaceStore, normalizeConfigurations, scrollToLazy };