@scalar/api-reference 1.49.0 → 1.49.1

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 (365) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/dist/AgentScalarChatInterface-MUbtSqMw.js +41 -0
  3. package/dist/AgentScalarChatInterface-MUbtSqMw.js.map +1 -0
  4. package/dist/ExternalDocs-phu7GxpZ.js +272 -0
  5. package/dist/ExternalDocs-phu7GxpZ.js.map +1 -0
  6. package/dist/MobileHeader-B71jYJdT.js +1373 -0
  7. package/dist/MobileHeader-B71jYJdT.js.map +1 -0
  8. package/dist/Operation-CixLVfKd.js +3827 -0
  9. package/dist/Operation-CixLVfKd.js.map +1 -0
  10. package/dist/SearchButton-xzhIpMCZ.js +621 -0
  11. package/dist/SearchButton-xzhIpMCZ.js.map +1 -0
  12. package/dist/ServerSelector-5y29y2BJ.js +852 -0
  13. package/dist/ServerSelector-5y29y2BJ.js.map +1 -0
  14. package/dist/blocks/index.js +3 -10
  15. package/dist/blocks/scalar-client-selector-block/index.d.ts +1 -1
  16. package/dist/blocks/scalar-info-block/index.d.ts +2 -2
  17. package/dist/blocks/scalar-server-selector-block/index.d.ts +1 -1
  18. package/dist/browser/standalone.js +40759 -34701
  19. package/dist/browser/webpack-stats.json +1 -1
  20. package/dist/components/AgentScalar/index.d.ts +3 -3
  21. package/dist/components/Anchor/index.d.ts +2 -2
  22. package/dist/components/Badge/index.d.ts +1 -1
  23. package/dist/components/Content/Auth/index.d.ts +1 -1
  24. package/dist/components/Content/Models/index.d.ts +2 -2
  25. package/dist/components/Content/Schema/Schema.vue.d.ts +1 -1
  26. package/dist/components/Content/Schema/SchemaComposition.vue.d.ts +2 -2
  27. package/dist/components/Content/Schema/SchemaObjectProperties.vue.d.ts +1 -1
  28. package/dist/components/Content/Schema/SchemaProperty.vue.d.ts +1 -1
  29. package/dist/components/Content/Schema/SchemaPropertyExamples.vue.d.ts.map +1 -1
  30. package/dist/components/Content/Schema/SchemaPropertyHeading.vue.d.ts.map +1 -1
  31. package/dist/components/Content/Schema/helpers/get-compositions-to-render.d.ts +1 -1
  32. package/dist/components/Content/Schema/index.d.ts +4 -4
  33. package/dist/components/Content/Tags/index.d.ts +1 -1
  34. package/dist/components/Content/index.d.ts +2 -2
  35. package/dist/components/HttpMethod/index.d.ts +1 -1
  36. package/dist/components/LinkList/index.d.ts +1 -1
  37. package/dist/components/OperationsList/index.d.ts +1 -1
  38. package/dist/components/RenderPlugins/index.d.ts +1 -1
  39. package/dist/components/Section/index.d.ts +10 -10
  40. package/dist/components/SectionFlare/index.d.ts +1 -1
  41. package/dist/components/index.d.ts +5 -5
  42. package/dist/components/index.js +102 -42
  43. package/dist/components/index.js.map +1 -0
  44. package/dist/features/Operation/components/OperationParameters.vue.d.ts +1 -1
  45. package/dist/features/Operation/components/OperationResponses.vue.d.ts +1 -1
  46. package/dist/features/Operation/components/ParameterList.vue.d.ts +1 -1
  47. package/dist/features/Operation/components/ParameterListItem.vue.d.ts +1 -1
  48. package/dist/features/Operation/components/callbacks/Callback.vue.d.ts +1 -1
  49. package/dist/features/Operation/components/callbacks/Callbacks.vue.d.ts +1 -1
  50. package/dist/features/Operation/index.d.ts +1 -1
  51. package/dist/features/Operation/layouts/ClassicLayout.vue.d.ts +1 -1
  52. package/dist/features/Operation/layouts/ModernLayout.vue.d.ts +1 -1
  53. package/dist/features/Search/components/SearchResult.vue.d.ts +1 -1
  54. package/dist/features/Search/helpers/create-fuse-instance.d.ts +1 -1
  55. package/dist/features/Search/helpers/create-search-index.d.ts +1 -1
  56. package/dist/features/Search/index.d.ts +2 -2
  57. package/dist/features/Search/types.d.ts +1 -1
  58. package/dist/features/developer-tools/index.d.ts +1 -1
  59. package/dist/features/example-responses/index.d.ts +1 -1
  60. package/dist/features/external-docs/index.d.ts +1 -1
  61. package/dist/features/index.d.ts +2 -2
  62. package/dist/features/index.js +4 -10
  63. package/dist/features/info-object/index.d.ts +3 -3
  64. package/dist/features/specification-extension/index.d.ts +2 -2
  65. package/dist/features/test-request-button/index.d.ts +1 -1
  66. package/dist/features/x-badges/index.d.ts +1 -1
  67. package/dist/helpers/download.d.ts +1 -1
  68. package/dist/helpers/download.d.ts.map +1 -1
  69. package/dist/helpers/index.d.ts +8 -8
  70. package/dist/helpers/index.js +3 -24
  71. package/dist/hooks/index.d.ts +2 -2
  72. package/dist/hooks/index.js +3 -8
  73. package/dist/index.d.ts +5 -5
  74. package/dist/index.js +7 -14
  75. package/dist/lazy-bus-CV8Ox5hD.js +333 -0
  76. package/dist/lazy-bus-CV8Ox5hD.js.map +1 -0
  77. package/dist/normalize-configurations-DcVpOEjD.js +232 -0
  78. package/dist/normalize-configurations-DcVpOEjD.js.map +1 -0
  79. package/dist/plugins/hooks/usePluginManager.d.ts +1 -1
  80. package/dist/plugins/index.d.ts +3 -3
  81. package/dist/plugins/index.js +2 -9
  82. package/dist/plugins-4EyiUD_A.js +80 -0
  83. package/dist/plugins-4EyiUD_A.js.map +1 -0
  84. package/dist/src-DqcYVBWI.js +1686 -0
  85. package/dist/src-DqcYVBWI.js.map +1 -0
  86. package/dist/ssr.d.ts +2 -2
  87. package/dist/ssr.js +7 -14
  88. package/dist/storage--3JuzjCI.js +42 -0
  89. package/dist/storage--3JuzjCI.js.map +1 -0
  90. package/dist/style.css +6773 -7332
  91. package/dist/urls-gPTXGgbj.js +17 -0
  92. package/dist/urls-gPTXGgbj.js.map +1 -0
  93. package/dist/use-agent-Bnm1de0n.js +60 -0
  94. package/dist/use-agent-Bnm1de0n.js.map +1 -0
  95. package/dist/use-intersection-8QqPi2O-.js +24 -0
  96. package/dist/use-intersection-8QqPi2O-.js.map +1 -0
  97. package/package.json +25 -27
  98. package/dist/_virtual/_plugin-vue_export-helper.js +0 -10
  99. package/dist/blocks/scalar-client-selector-block/components/ClientDropdown.vue.js +0 -7
  100. package/dist/blocks/scalar-client-selector-block/components/ClientDropdown.vue2.js +0 -123
  101. package/dist/blocks/scalar-client-selector-block/components/ClientSelector.vue.js +0 -7
  102. package/dist/blocks/scalar-client-selector-block/components/ClientSelector.vue2.js +0 -142
  103. package/dist/blocks/scalar-client-selector-block/helpers/featured-clients.js +0 -24
  104. package/dist/blocks/scalar-info-block/components/DownloadLink.vue.js +0 -7
  105. package/dist/blocks/scalar-info-block/components/DownloadLink.vue2.js +0 -63
  106. package/dist/blocks/scalar-info-block/components/InfoBlock.vue.js +0 -59
  107. package/dist/blocks/scalar-info-block/components/InfoBlock.vue2.js +0 -4
  108. package/dist/blocks/scalar-info-block/components/InfoDescription.vue.js +0 -7
  109. package/dist/blocks/scalar-info-block/components/InfoDescription.vue2.js +0 -70
  110. package/dist/blocks/scalar-info-block/components/InfoLinks.vue.js +0 -38
  111. package/dist/blocks/scalar-info-block/components/InfoLinks.vue2.js +0 -4
  112. package/dist/blocks/scalar-info-block/components/InfoMarkdownSection.vue.js +0 -38
  113. package/dist/blocks/scalar-info-block/components/InfoMarkdownSection.vue2.js +0 -4
  114. package/dist/blocks/scalar-info-block/components/InfoVersion.vue.js +0 -28
  115. package/dist/blocks/scalar-info-block/components/InfoVersion.vue2.js +0 -4
  116. package/dist/blocks/scalar-info-block/components/IntroductionCard.vue.js +0 -7
  117. package/dist/blocks/scalar-info-block/components/IntroductionCard.vue2.js +0 -19
  118. package/dist/blocks/scalar-info-block/components/IntroductionCardItem.vue.js +0 -14
  119. package/dist/blocks/scalar-info-block/components/IntroductionLayout.vue.js +0 -7
  120. package/dist/blocks/scalar-info-block/components/IntroductionLayout.vue2.js +0 -112
  121. package/dist/blocks/scalar-info-block/components/OpenApiVersion.vue.js +0 -21
  122. package/dist/blocks/scalar-info-block/components/OpenApiVersion.vue2.js +0 -4
  123. package/dist/blocks/scalar-server-selector-block/components/Selector.vue.js +0 -76
  124. package/dist/blocks/scalar-server-selector-block/components/Selector.vue2.js +0 -4
  125. package/dist/blocks/scalar-server-selector-block/components/ServerSelector.vue.js +0 -72
  126. package/dist/blocks/scalar-server-selector-block/components/ServerSelector.vue2.js +0 -4
  127. package/dist/components/AgentScalar/AgentScalarButton.vue.js +0 -22
  128. package/dist/components/AgentScalar/AgentScalarButton.vue2.js +0 -4
  129. package/dist/components/AgentScalar/AgentScalarChatInterface.vue.js +0 -4
  130. package/dist/components/AgentScalar/AgentScalarChatInterface.vue2.js +0 -29
  131. package/dist/components/AgentScalar/AgentScalarDrawer.vue.js +0 -7
  132. package/dist/components/AgentScalar/AgentScalarDrawer.vue2.js +0 -78
  133. package/dist/components/AgentScalar/OpenMCPButton.vue.js +0 -7
  134. package/dist/components/AgentScalar/OpenMCPButton.vue2.js +0 -191
  135. package/dist/components/Anchor/Anchor.vue.js +0 -51
  136. package/dist/components/Anchor/Anchor.vue2.js +0 -4
  137. package/dist/components/Anchor/WithBreadcrumb.vue.js +0 -41
  138. package/dist/components/Anchor/WithBreadcrumb.vue2.js +0 -4
  139. package/dist/components/ApiReference.vue.js +0 -10
  140. package/dist/components/ApiReference.vue2.js +0 -742
  141. package/dist/components/Badge/Badge.vue.js +0 -7
  142. package/dist/components/Badge/Badge.vue2.js +0 -26
  143. package/dist/components/ClassicHeader.vue.js +0 -21
  144. package/dist/components/Content/Auth/Auth.vue.js +0 -77
  145. package/dist/components/Content/Auth/Auth.vue2.js +0 -4
  146. package/dist/components/Content/Auth/helpers/get-default-security.js +0 -55
  147. package/dist/components/Content/Content.vue.js +0 -171
  148. package/dist/components/Content/Content.vue3.js +0 -5
  149. package/dist/components/Content/Models/Model.vue.js +0 -47
  150. package/dist/components/Content/Models/Model.vue2.js +0 -4
  151. package/dist/components/Content/Models/ModelTag.vue.js +0 -76
  152. package/dist/components/Content/Models/ModelTag.vue2.js +0 -4
  153. package/dist/components/Content/Models/components/ClassicLayout.vue.js +0 -7
  154. package/dist/components/Content/Models/components/ClassicLayout.vue2.js +0 -78
  155. package/dist/components/Content/Models/components/ModernLayout.vue.js +0 -61
  156. package/dist/components/Content/Models/components/ModernLayout.vue2.js +0 -4
  157. package/dist/components/Content/Operations/TraversedEntry.vue.js +0 -146
  158. package/dist/components/Content/Operations/TraversedEntry.vue2.js +0 -4
  159. package/dist/components/Content/Schema/RenderString.vue.js +0 -27
  160. package/dist/components/Content/Schema/RenderString.vue2.js +0 -4
  161. package/dist/components/Content/Schema/Schema.vue.js +0 -7
  162. package/dist/components/Content/Schema/Schema.vue2.js +0 -193
  163. package/dist/components/Content/Schema/SchemaComposition.vue.js +0 -120
  164. package/dist/components/Content/Schema/SchemaComposition.vue2.js +0 -4
  165. package/dist/components/Content/Schema/SchemaEnumPropertyItem.vue.js +0 -7
  166. package/dist/components/Content/Schema/SchemaEnumPropertyItem.vue2.js +0 -36
  167. package/dist/components/Content/Schema/SchemaEnums.vue.js +0 -7
  168. package/dist/components/Content/Schema/SchemaEnums.vue2.js +0 -112
  169. package/dist/components/Content/Schema/SchemaHeading.vue.js +0 -7
  170. package/dist/components/Content/Schema/SchemaHeading.vue2.js +0 -61
  171. package/dist/components/Content/Schema/SchemaObjectExampleCodeBlock.vue.js +0 -66
  172. package/dist/components/Content/Schema/SchemaObjectExampleCodeBlock.vue2.js +0 -4
  173. package/dist/components/Content/Schema/SchemaObjectProperties.vue.js +0 -120
  174. package/dist/components/Content/Schema/SchemaObjectProperties.vue2.js +0 -4
  175. package/dist/components/Content/Schema/SchemaProperty.vue.js +0 -7
  176. package/dist/components/Content/Schema/SchemaProperty.vue2.js +0 -236
  177. package/dist/components/Content/Schema/SchemaPropertyDefault.vue.js +0 -7
  178. package/dist/components/Content/Schema/SchemaPropertyDefault.vue2.js +0 -45
  179. package/dist/components/Content/Schema/SchemaPropertyDetail.vue.js +0 -7
  180. package/dist/components/Content/Schema/SchemaPropertyDetail.vue2.js +0 -40
  181. package/dist/components/Content/Schema/SchemaPropertyExamples.vue.js +0 -7
  182. package/dist/components/Content/Schema/SchemaPropertyExamples.vue2.js +0 -80
  183. package/dist/components/Content/Schema/SchemaPropertyHeading.vue.js +0 -7
  184. package/dist/components/Content/Schema/SchemaPropertyHeading.vue2.js +0 -318
  185. package/dist/components/Content/Schema/helpers/format-example.js +0 -41
  186. package/dist/components/Content/Schema/helpers/format-value.js +0 -35
  187. package/dist/components/Content/Schema/helpers/get-compositions-to-render.js +0 -31
  188. package/dist/components/Content/Schema/helpers/get-enum-values.js +0 -20
  189. package/dist/components/Content/Schema/helpers/get-property-description.js +0 -34
  190. package/dist/components/Content/Schema/helpers/get-ref-name.js +0 -14
  191. package/dist/components/Content/Schema/helpers/get-schema-type.js +0 -47
  192. package/dist/components/Content/Schema/helpers/has-complex-array-items.js +0 -48
  193. package/dist/components/Content/Schema/helpers/is-empty-schema-object.js +0 -13
  194. package/dist/components/Content/Schema/helpers/is-type-object.js +0 -27
  195. package/dist/components/Content/Schema/helpers/merge-all-of-schemas.js +0 -215
  196. package/dist/components/Content/Schema/helpers/optimize-value-for-display.js +0 -64
  197. package/dist/components/Content/Schema/helpers/schema-composition.js +0 -4
  198. package/dist/components/Content/Schema/helpers/schema-name.js +0 -24
  199. package/dist/components/Content/Schema/helpers/should-display-description.js +0 -12
  200. package/dist/components/Content/Schema/helpers/should-display-heading.js +0 -12
  201. package/dist/components/Content/Schema/helpers/should-render-array-item-composition.js +0 -15
  202. package/dist/components/Content/Schema/helpers/sort-property-names.js +0 -71
  203. package/dist/components/Content/Tags/Tag.vue.js +0 -46
  204. package/dist/components/Content/Tags/Tag.vue2.js +0 -4
  205. package/dist/components/Content/Tags/components/ClassicLayout.vue.js +0 -7
  206. package/dist/components/Content/Tags/components/ClassicLayout.vue2.js +0 -57
  207. package/dist/components/Content/Tags/components/ModernLayout.vue.js +0 -7
  208. package/dist/components/Content/Tags/components/ModernLayout.vue2.js +0 -56
  209. package/dist/components/Content/Tags/components/TagSection.vue.js +0 -100
  210. package/dist/components/Content/Tags/components/TagSection.vue2.js +0 -4
  211. package/dist/components/GettingStarted.vue.js +0 -7
  212. package/dist/components/GettingStarted.vue2.js +0 -82
  213. package/dist/components/HttpMethod/HttpMethod.vue.js +0 -34
  214. package/dist/components/HttpMethod/HttpMethod.vue2.js +0 -4
  215. package/dist/components/IntersectionObserver.vue.js +0 -55
  216. package/dist/components/IntersectionObserver.vue2.js +0 -4
  217. package/dist/components/Lazy/Lazy.vue.js +0 -106
  218. package/dist/components/Lazy/Lazy.vue2.js +0 -4
  219. package/dist/components/LinkList/LinkList.vue.js +0 -7
  220. package/dist/components/LinkList/LinkList.vue2.js +0 -48
  221. package/dist/components/LoadingSkeleton.vue.js +0 -7
  222. package/dist/components/LoadingSkeleton.vue2.js +0 -20
  223. package/dist/components/MobileHeader.vue.js +0 -62
  224. package/dist/components/MobileHeader.vue2.js +0 -4
  225. package/dist/components/OperationPath.vue.js +0 -7
  226. package/dist/components/OperationPath.vue2.js +0 -30
  227. package/dist/components/OperationsList/OperationsList.vue.js +0 -7
  228. package/dist/components/OperationsList/OperationsList.vue2.js +0 -61
  229. package/dist/components/OperationsList/OperationsListItem.vue.js +0 -7
  230. package/dist/components/OperationsList/OperationsListItem.vue2.js +0 -68
  231. package/dist/components/RenderPlugins/RenderPlugins.vue.js +0 -43
  232. package/dist/components/RenderPlugins/RenderPlugins.vue2.js +0 -4
  233. package/dist/components/ScreenReader.vue.js +0 -7
  234. package/dist/components/ScreenReader.vue2.js +0 -21
  235. package/dist/components/Section/CompactSection.vue.js +0 -7
  236. package/dist/components/Section/CompactSection.vue2.js +0 -60
  237. package/dist/components/Section/Section.vue.js +0 -7
  238. package/dist/components/Section/Section.vue2.js +0 -23
  239. package/dist/components/Section/SectionAccordion.vue.js +0 -7
  240. package/dist/components/Section/SectionAccordion.vue2.js +0 -76
  241. package/dist/components/Section/SectionColumn.vue.js +0 -14
  242. package/dist/components/Section/SectionColumns.vue.js +0 -14
  243. package/dist/components/Section/SectionContainer.vue.js +0 -7
  244. package/dist/components/Section/SectionContainer.vue2.js +0 -21
  245. package/dist/components/Section/SectionContainerAccordion.vue.js +0 -7
  246. package/dist/components/Section/SectionContainerAccordion.vue2.js +0 -54
  247. package/dist/components/Section/SectionContent.vue.js +0 -7
  248. package/dist/components/Section/SectionContent.vue2.js +0 -22
  249. package/dist/components/Section/SectionHeader.vue.js +0 -7
  250. package/dist/components/Section/SectionHeader.vue2.js +0 -26
  251. package/dist/components/Section/SectionHeaderTag.vue.js +0 -7
  252. package/dist/components/Section/SectionHeaderTag.vue2.js +0 -20
  253. package/dist/components/SectionFlare/SectionFlare.vue.js +0 -14
  254. package/dist/components/ShowMoreButton.vue.js +0 -7
  255. package/dist/components/ShowMoreButton.vue2.js +0 -23
  256. package/dist/consts/urls.js +0 -16
  257. package/dist/features/Operation/Operation.vue.js +0 -100
  258. package/dist/features/Operation/Operation.vue2.js +0 -4
  259. package/dist/features/Operation/components/ContentTypeSelect.vue.js +0 -88
  260. package/dist/features/Operation/components/ContentTypeSelect.vue2.js +0 -4
  261. package/dist/features/Operation/components/Header.vue.js +0 -33
  262. package/dist/features/Operation/components/Header.vue2.js +0 -4
  263. package/dist/features/Operation/components/Headers.vue.js +0 -7
  264. package/dist/features/Operation/components/Headers.vue2.js +0 -71
  265. package/dist/features/Operation/components/OperationParameters.vue.js +0 -92
  266. package/dist/features/Operation/components/OperationParameters.vue2.js +0 -4
  267. package/dist/features/Operation/components/OperationResponses.vue.js +0 -44
  268. package/dist/features/Operation/components/OperationResponses.vue2.js +0 -4
  269. package/dist/features/Operation/components/ParameterList.vue.js +0 -50
  270. package/dist/features/Operation/components/ParameterList.vue2.js +0 -4
  271. package/dist/features/Operation/components/ParameterListItem.vue.js +0 -7
  272. package/dist/features/Operation/components/ParameterListItem.vue2.js +0 -163
  273. package/dist/features/Operation/components/RequestBody.vue.js +0 -7
  274. package/dist/features/Operation/components/RequestBody.vue2.js +0 -164
  275. package/dist/features/Operation/components/callbacks/Callback.vue.js +0 -7
  276. package/dist/features/Operation/components/callbacks/Callback.vue2.js +0 -60
  277. package/dist/features/Operation/components/callbacks/Callbacks.vue.js +0 -63
  278. package/dist/features/Operation/components/callbacks/Callbacks.vue2.js +0 -4
  279. package/dist/features/Operation/helpers/filter-selected-security.js +0 -28
  280. package/dist/features/Operation/helpers/get-first-server.js +0 -25
  281. package/dist/features/Operation/layouts/ClassicLayout.vue.js +0 -7
  282. package/dist/features/Operation/layouts/ClassicLayout.vue2.js +0 -243
  283. package/dist/features/Operation/layouts/ModernLayout.vue.js +0 -7
  284. package/dist/features/Operation/layouts/ModernLayout.vue2.js +0 -256
  285. package/dist/features/Search/components/SearchButton.vue.js +0 -88
  286. package/dist/features/Search/components/SearchButton.vue2.js +0 -4
  287. package/dist/features/Search/components/SearchModal.vue.js +0 -7
  288. package/dist/features/Search/components/SearchModal.vue2.js +0 -120
  289. package/dist/features/Search/components/SearchResult.vue.js +0 -84
  290. package/dist/features/Search/components/SearchResult.vue2.js +0 -4
  291. package/dist/features/Search/helpers/create-fuse-instance.js +0 -43
  292. package/dist/features/Search/helpers/create-search-index.js +0 -119
  293. package/dist/features/Search/hooks/useSearchIndex.js +0 -33
  294. package/dist/features/ask-agent-button/AskAgentButton.vue.js +0 -7
  295. package/dist/features/ask-agent-button/AskAgentButton.vue2.js +0 -51
  296. package/dist/features/developer-tools/DeveloperTools.vue.js +0 -60
  297. package/dist/features/developer-tools/DeveloperTools.vue2.js +0 -4
  298. package/dist/features/developer-tools/components/ApiReferenceToolbarBlurb.vue.js +0 -13
  299. package/dist/features/developer-tools/components/ApiReferenceToolbarConfigLayout.vue.js +0 -33
  300. package/dist/features/developer-tools/components/ApiReferenceToolbarConfigLayout.vue2.js +0 -4
  301. package/dist/features/developer-tools/components/ApiReferenceToolbarConfigLayoutOptions.vue.js +0 -138
  302. package/dist/features/developer-tools/components/ApiReferenceToolbarConfigLayoutOptions.vue2.js +0 -4
  303. package/dist/features/developer-tools/components/ApiReferenceToolbarConfigTheme.vue.js +0 -66
  304. package/dist/features/developer-tools/components/ApiReferenceToolbarConfigTheme.vue2.js +0 -4
  305. package/dist/features/developer-tools/components/ApiReferenceToolbarPopover.vue.js +0 -54
  306. package/dist/features/developer-tools/components/ApiReferenceToolbarPopover.vue2.js +0 -4
  307. package/dist/features/developer-tools/components/ApiReferenceToolbarRegisterButton.vue.js +0 -71
  308. package/dist/features/developer-tools/components/ApiReferenceToolbarRegisterButton.vue2.js +0 -4
  309. package/dist/features/developer-tools/components/ApiReferenceToolbarShareRegister.vue.js +0 -63
  310. package/dist/features/developer-tools/components/ApiReferenceToolbarShareRegister.vue2.js +0 -4
  311. package/dist/features/developer-tools/components/ApiReferenceToolbarShareTemporary.vue.js +0 -73
  312. package/dist/features/developer-tools/components/ApiReferenceToolbarShareTemporary.vue2.js +0 -4
  313. package/dist/features/developer-tools/components/ApiReferenceToolbarTitle.vue.js +0 -57
  314. package/dist/features/developer-tools/components/ApiReferenceToolbarTitle.vue2.js +0 -4
  315. package/dist/features/developer-tools/components/DeployApiReference.vue.js +0 -35
  316. package/dist/features/developer-tools/components/DeployApiReference.vue2.js +0 -4
  317. package/dist/features/developer-tools/components/ModifyConfiguration.vue.js +0 -103
  318. package/dist/features/developer-tools/components/ModifyConfiguration.vue2.js +0 -4
  319. package/dist/features/developer-tools/components/ShareApiReference.vue.js +0 -35
  320. package/dist/features/developer-tools/components/ShareApiReference.vue2.js +0 -4
  321. package/dist/features/example-responses/ExampleResponse.vue.js +0 -7
  322. package/dist/features/example-responses/ExampleResponse.vue2.js +0 -61
  323. package/dist/features/example-responses/ExampleResponseTab.vue.js +0 -7
  324. package/dist/features/example-responses/ExampleResponseTab.vue2.js +0 -25
  325. package/dist/features/example-responses/ExampleResponseTabList.vue.js +0 -7
  326. package/dist/features/example-responses/ExampleResponseTabList.vue2.js +0 -37
  327. package/dist/features/example-responses/ExampleResponses.vue.js +0 -7
  328. package/dist/features/example-responses/ExampleResponses.vue2.js +0 -181
  329. package/dist/features/example-responses/ExampleSchema.vue.js +0 -42
  330. package/dist/features/example-responses/ExampleSchema.vue2.js +0 -4
  331. package/dist/features/example-responses/has-response-content.js +0 -28
  332. package/dist/features/external-docs/ExternalDocs.vue.js +0 -42
  333. package/dist/features/external-docs/ExternalDocs.vue2.js +0 -4
  334. package/dist/features/info-object/Contact.vue.js +0 -46
  335. package/dist/features/info-object/Contact.vue2.js +0 -4
  336. package/dist/features/info-object/License.vue.js +0 -40
  337. package/dist/features/info-object/License.vue2.js +0 -4
  338. package/dist/features/info-object/TermsOfService.vue.js +0 -34
  339. package/dist/features/info-object/TermsOfService.vue2.js +0 -4
  340. package/dist/features/multiple-documents/DocumentSelector.vue.js +0 -54
  341. package/dist/features/multiple-documents/DocumentSelector.vue2.js +0 -4
  342. package/dist/features/specification-extension/SpecificationExtension.vue.js +0 -4
  343. package/dist/features/specification-extension/SpecificationExtension.vue2.js +0 -52
  344. package/dist/features/specification-extension/helpers.js +0 -9
  345. package/dist/features/test-request-button/TestRequestButton.vue.js +0 -7
  346. package/dist/features/test-request-button/TestRequestButton.vue2.js +0 -46
  347. package/dist/features/x-badges/XBadges.vue.js +0 -35
  348. package/dist/features/x-badges/XBadges.vue2.js +0 -4
  349. package/dist/helpers/color-mode.js +0 -9
  350. package/dist/helpers/download.js +0 -45
  351. package/dist/helpers/id-routing.js +0 -109
  352. package/dist/helpers/lazy-bus.js +0 -195
  353. package/dist/helpers/load-from-perssistance.js +0 -17
  354. package/dist/helpers/map-config-plugins.js +0 -27
  355. package/dist/helpers/map-config-to-workspace-store.js +0 -45
  356. package/dist/helpers/normalize-configurations.js +0 -69
  357. package/dist/helpers/openapi.js +0 -135
  358. package/dist/helpers/storage.js +0 -47
  359. package/dist/helpers/upload-temp-document.js +0 -24
  360. package/dist/hooks/use-agent.js +0 -42
  361. package/dist/hooks/use-intersection.js +0 -32
  362. package/dist/plugins/hooks/usePluginManager.js +0 -14
  363. package/dist/plugins/persistance-plugin.js +0 -48
  364. package/dist/plugins/plugin-manager.js +0 -39
  365. package/dist/standalone/lib/html-api.js +0 -81
@@ -1,24 +1,3 @@
1
- import { getSystemModePreference } from "./color-mode.js";
2
- import { downloadDocument } from "./download.js";
3
- import { getIdFromUrl, makeUrlFromId } from "./id-routing.js";
4
- import { addToPriorityQueue, blockIntersection, firstLazyLoadComplete, intersectionEnabled, scrollToLazy } from "./lazy-bus.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";
9
- export {
10
- addToPriorityQueue,
11
- blockIntersection,
12
- downloadDocument,
13
- firstLazyLoadComplete,
14
- getIdFromUrl,
15
- getSystemModePreference,
16
- intersectionEnabled,
17
- loadAuthFromStorage,
18
- loadClientFromStorage,
19
- makeUrlFromId,
20
- mapConfigPlugins,
21
- mapConfigToWorkspaceStore,
22
- normalizeConfigurations,
23
- scrollToLazy
24
- };
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";
3
+ export { addToPriorityQueue, blockIntersection, downloadDocument, firstLazyLoadComplete, getIdFromUrl, getSystemModePreference, intersectionEnabled, loadAuthFromStorage, loadClientFromStorage, makeUrlFromId, mapConfigPlugins, mapConfigToWorkspaceStore, normalizeConfigurations, scrollToLazy };
@@ -1,3 +1,3 @@
1
- export { AGENT_CONTEXT_SYMBOL, useAgent, useAgentContext, } from './use-agent.js';
2
- export { useIntersection } from './use-intersection.js';
1
+ export { AGENT_CONTEXT_SYMBOL, useAgent, useAgentContext, } from './use-agent';
2
+ export { useIntersection } from './use-intersection';
3
3
  //# sourceMappingURL=index.d.ts.map
@@ -1,8 +1,3 @@
1
- import { AGENT_CONTEXT_SYMBOL, useAgent, useAgentContext } from "./use-agent.js";
2
- import { useIntersection } from "./use-intersection.js";
3
- export {
4
- AGENT_CONTEXT_SYMBOL,
5
- useAgent,
6
- useAgentContext,
7
- useIntersection
8
- };
1
+ import { n as useAgent, r as useAgentContext, t as AGENT_CONTEXT_SYMBOL } from "../use-agent-Bnm1de0n.js";
2
+ import { t as useIntersection } from "../use-intersection-8QqPi2O-.js";
3
+ export { AGENT_CONTEXT_SYMBOL, useAgent, useAgentContext, useIntersection };
package/dist/index.d.ts CHANGED
@@ -1,10 +1,10 @@
1
1
  import type { AnyApiReferenceConfiguration } from '@scalar/types/api-reference';
2
2
  export type { ApiReferenceConfiguration } from '@scalar/types/api-reference';
3
- export { default as ApiReference } from './components/ApiReference.vue.js';
4
- export { default as GettingStarted } from './components/GettingStarted.vue.js';
5
- export { SearchButton, SearchModal } from './features/Search';
6
- export { createEmptySpecification } from './helpers/openapi.js';
7
- export { createApiReference } from './standalone/lib/html-api.js';
3
+ export { default as ApiReference } from '@/components/ApiReference.vue';
4
+ export { default as GettingStarted } from '@/components/GettingStarted.vue';
5
+ export { SearchButton, SearchModal } from '@/features/Search';
6
+ export { createEmptySpecification } from '@/helpers/openapi';
7
+ export { createApiReference } from '@/standalone/lib/html-api';
8
8
  export type ReferenceProps = {
9
9
  configuration?: AnyApiReferenceConfiguration;
10
10
  };
package/dist/index.js CHANGED
@@ -1,14 +1,7 @@
1
- import { default as default2 } from "./components/ApiReference.vue.js";
2
- import { default as default3 } from "./components/GettingStarted.vue.js";
3
- import { createEmptySpecification } from "./helpers/openapi.js";
4
- import { createApiReference } from "./standalone/lib/html-api.js";
5
- import { default as default4 } from "./features/Search/components/SearchButton.vue.js";
6
- import { default as default5 } from "./features/Search/components/SearchModal.vue.js";
7
- export {
8
- default2 as ApiReference,
9
- default3 as GettingStarted,
10
- default4 as SearchButton,
11
- default5 as SearchModal,
12
- createApiReference,
13
- createEmptySpecification
14
- };
1
+ import { n as GettingStarted_default, r as ApiReference_default, t as createApiReference } from "./src-DqcYVBWI.js";
2
+ import "./ExternalDocs-phu7GxpZ.js";
3
+ import "./MobileHeader-B71jYJdT.js";
4
+ import "./ServerSelector-5y29y2BJ.js";
5
+ import "./Operation-CixLVfKd.js";
6
+ import { n as SearchModal_default, r as createEmptySpecification, t as SearchButton_default } from "./SearchButton-xzhIpMCZ.js";
7
+ export { ApiReference_default as ApiReference, GettingStarted_default as GettingStarted, SearchButton_default as SearchButton, SearchModal_default as SearchModal, createApiReference, createEmptySpecification };
@@ -0,0 +1,333 @@
1
+ import { computed, nextTick, onBeforeUnmount, reactive, ref } from "vue";
2
+ import { watchDebounced } from "@vueuse/core";
3
+ import { nanoid } from "nanoid";
4
+ //#region src/helpers/id-routing.ts
5
+ var sanitizeBasePath = (basePath) => {
6
+ return basePath.replace(/^\/+|\/+$/g, "");
7
+ };
8
+ var isHashBasePath = (basePath) => basePath.startsWith("#");
9
+ var sanitizeHashBasePath = (basePath) => {
10
+ return basePath.replace(/^#+/, "").replace(/\/+$/g, "");
11
+ };
12
+ var applySlugPrefix = (base, slugPrefix) => {
13
+ return slugPrefix ? `${slugPrefix}${base ? "/" : ""}${base}` : base;
14
+ };
15
+ var stripBasePathPrefix = (value, basePath) => {
16
+ if (value === basePath) return "";
17
+ if (value.startsWith(`${basePath}/`)) return value.slice(basePath.length + 1);
18
+ return null;
19
+ };
20
+ /** Extracts an element id from the hash when using hash routing */
21
+ var getIdFromHash = (location, slugPrefix) => {
22
+ const url = typeof location === "string" ? new URL(location) : location;
23
+ return applySlugPrefix(decodeURIComponent(url.hash.slice(1)), slugPrefix);
24
+ };
25
+ /** Extracts an element id from the path when using path routing */
26
+ var getIdFromPath = (location, basePath, slugPrefix) => {
27
+ const url = typeof location === "string" ? new URL(location) : location;
28
+ const sanitized = sanitizeBasePath(basePath);
29
+ const basePathWithSlash = sanitized ? `/${sanitized.split("/").map((segment) => encodeURIComponent(segment)).join("/")}` : "";
30
+ if (url.pathname.startsWith(basePathWithSlash)) {
31
+ const remainder = url.pathname.slice(basePathWithSlash.length);
32
+ return applySlugPrefix(decodeURIComponent(remainder.startsWith("/") ? remainder.slice(1) : remainder), slugPrefix);
33
+ }
34
+ return slugPrefix ?? "";
35
+ };
36
+ /** Extracts an element id from a hash-prefixed basePath */
37
+ var getIdFromHashBasePath = (location, basePath, slugPrefix) => {
38
+ const url = typeof location === "string" ? new URL(location) : location;
39
+ const remainder = stripBasePathPrefix(decodeURIComponent(url.hash.slice(1)), sanitizeHashBasePath(basePath));
40
+ if (remainder !== null) return applySlugPrefix(remainder, slugPrefix);
41
+ return slugPrefix ?? "";
42
+ };
43
+ /** Determines whether a URL matches the provided basePath. */
44
+ var matchesBasePath = (location, basePath) => {
45
+ const url = typeof location === "string" ? new URL(location) : location;
46
+ if (isHashBasePath(basePath)) {
47
+ const hash = decodeURIComponent(url.hash);
48
+ return hash === basePath || hash.startsWith(`${basePath}/`);
49
+ }
50
+ const sanitized = sanitizeBasePath(basePath);
51
+ const basePathWithSlash = sanitized ? `/${sanitized.split("/").map((segment) => encodeURIComponent(segment)).join("/")}` : "";
52
+ return url.pathname === basePathWithSlash || url.pathname.startsWith(`${basePathWithSlash}/`);
53
+ };
54
+ /**
55
+ * Extracts a navigation id from a URL based on the routing type
56
+ *
57
+ * @param url - The URL to extract the id from
58
+ * @param basePath - The base path used in path routing
59
+ * @param slugPrefix - If the document slug is not expected in the URL then we must prefix it
60
+ */
61
+ var getIdFromUrl = (url, basePath, slugPrefix) => {
62
+ if (typeof basePath !== "string") return getIdFromHash(url, slugPrefix);
63
+ return isHashBasePath(basePath) ? getIdFromHashBasePath(url, basePath, slugPrefix) : getIdFromPath(url, basePath, slugPrefix);
64
+ };
65
+ /**
66
+ * Strips the first segment from an id and preserves trailing slashes
67
+ * Used in single-document mode where the document slug is not needed in the URL
68
+ *
69
+ * @param id - The full id to process
70
+ * @returns The id with the first segment removed, preserving trailing slash if present
71
+ */
72
+ var stripFirstSegment = (id) => {
73
+ const hasTrailingSlash = id.endsWith("/");
74
+ const result = id.split("/").filter(Boolean).slice(1).join("/");
75
+ return hasTrailingSlash && result ? `${result}/` : result;
76
+ };
77
+ /**
78
+ * Generate a new URL and applies the ID to the path or hash
79
+ * depending on the type of routing used
80
+ *
81
+ * @param id - The id to apply to the URL
82
+ * @param basePath - The base path used in path routing
83
+ * @param isMultiDocument - Whether the document is multi-document or single-document. Single-document documents will strip the document slug from the id
84
+ */
85
+ var makeUrlFromId = (_id, basePath, isMultiDocument) => {
86
+ if (typeof window === "undefined") return;
87
+ /** When there is only 1 document we don't need to include the document name in the URL */
88
+ const id = isMultiDocument ? _id : stripFirstSegment(_id);
89
+ const url = new URL(window.location.href);
90
+ if (typeof basePath === "string") if (isHashBasePath(basePath)) url.hash = [sanitizeHashBasePath(basePath), id].filter(Boolean).join("/");
91
+ else url.pathname = `${sanitizeBasePath(basePath)}/${id}`;
92
+ else url.hash = id;
93
+ return url;
94
+ };
95
+ /** Extracts the schema parameters from the id if they are present */
96
+ var getSchemaParamsFromId = (id) => {
97
+ const matcher = id.match(/(.*)(\.body\.|\.path\.|\.query\.|\.header\.)(.*)/);
98
+ if (matcher && typeof matcher[1] === "string" && typeof matcher[2] === "string") return {
99
+ rawId: matcher[1],
100
+ params: matcher[2].slice(1) + matcher[3]
101
+ };
102
+ return {
103
+ rawId: id,
104
+ params: ""
105
+ };
106
+ };
107
+ //#endregion
108
+ //#region src/helpers/lazy-bus.ts
109
+ /**
110
+ * List of items that are in the priority queue and will be rendered first (e.g. scroll target).
111
+ */
112
+ var priorityQueue = reactive(/* @__PURE__ */ new Set());
113
+ /** List of items that are pending to be loaded (in viewport overscan). */
114
+ var pendingQueue = reactive(/* @__PURE__ */ new Set());
115
+ /** List of items that are already loaded and stay mounted (no eviction). */
116
+ var readyQueue = reactive(/* @__PURE__ */ new Set());
117
+ /**
118
+ * Flag to indicate if the lazy bus is currently running
119
+ * Blocks ID changes while running
120
+ */
121
+ var isRunning = ref(false);
122
+ /** How long tryScroll keeps retrying to find the element (ms). */
123
+ var SCROLL_RETRY_MS = 3e3;
124
+ /** Tracks when the initial load is complete. */
125
+ var firstLazyLoadComplete = ref(false);
126
+ /** List of unique identifiers that are blocking intersection */
127
+ var intersectionBlockers = reactive(/* @__PURE__ */ new Set());
128
+ var onRenderComplete = /* @__PURE__ */ new Set();
129
+ /** Cached content heights so placeholders can match when not rendered. */
130
+ var lazyPlaceholderHeights = reactive(/* @__PURE__ */ new Map());
131
+ var getLazyPlaceholderHeight = (id) => lazyPlaceholderHeights.get(id);
132
+ var setLazyPlaceholderHeight = (id, height) => {
133
+ if (!Number.isFinite(height) || height <= 0) return;
134
+ lazyPlaceholderHeights.set(id, Math.round(height));
135
+ };
136
+ /** Adds a one time callback to be executed when the lazy bus has finished loading */
137
+ var addLazyCompleteCallback = (callback) => {
138
+ if (callback) onRenderComplete.add(callback);
139
+ };
140
+ /**
141
+ * Blocks intersection until the returned unblock callback is run.
142
+ * Prevents scroll jump while we render new lazy content.
143
+ */
144
+ var blockIntersection = () => {
145
+ const blockId = nanoid();
146
+ intersectionBlockers.add(blockId);
147
+ /** Unblock uses a small delay to ensure the scroll is complete before enabling intersection */
148
+ return () => setTimeout(() => intersectionBlockers.delete(blockId), 100);
149
+ };
150
+ /** If there are any pending blocking operations we disable intersection */
151
+ var intersectionEnabled = computed(() => intersectionBlockers.size === 0);
152
+ /**
153
+ * Processes the full queue: priority first, then pending. Blocks intersection while
154
+ * rendering so the viewport does not jump. No eviction — items stay in readyQueue.
155
+ */
156
+ var runLazyBus = () => {
157
+ if (typeof window === "undefined") return;
158
+ if (isRunning.value) return;
159
+ isRunning.value = true;
160
+ /**
161
+ * Sets all the pending elements into the ready queue
162
+ * After waiting for Vue to update the DOM we execute the callbacks and unblock intersection
163
+ */
164
+ const processQueue = async () => {
165
+ const priorityIds = [...priorityQueue];
166
+ const pendingIds = [...pendingQueue];
167
+ if (priorityIds.length === 0 && pendingIds.length === 0) {
168
+ onRenderComplete.forEach((fn) => fn());
169
+ onRenderComplete.clear();
170
+ isRunning.value = false;
171
+ firstLazyLoadComplete.value = true;
172
+ return;
173
+ }
174
+ for (const id of priorityIds) {
175
+ readyQueue.add(id);
176
+ priorityQueue.delete(id);
177
+ }
178
+ for (const id of pendingIds) {
179
+ readyQueue.add(id);
180
+ pendingQueue.delete(id);
181
+ }
182
+ await nextTick();
183
+ onRenderComplete.forEach((fn) => fn());
184
+ onRenderComplete.clear();
185
+ isRunning.value = false;
186
+ firstLazyLoadComplete.value = true;
187
+ };
188
+ if (window.requestIdleCallback) window.requestIdleCallback(processQueue, { timeout: 1500 });
189
+ else nextTick(processQueue);
190
+ };
191
+ /**
192
+ * Run the lazy bus when the queue changes and is not currently running
193
+ * Debounce so that multiple changes to the queue are batched together
194
+ *
195
+ * We must run when the priority queue changes because we rely on finish callbacks
196
+ * anytime we request potentially lazy elements. If we don't run when the priority queue changes
197
+ * we may not have a finish callback even though the element is set to load.
198
+ */
199
+ watchDebounced([
200
+ () => pendingQueue.size,
201
+ () => priorityQueue.size,
202
+ () => isRunning.value
203
+ ], () => {
204
+ if ((pendingQueue.size > 0 || priorityQueue.size > 0) && !isRunning.value) runLazyBus();
205
+ }, {
206
+ debounce: 300,
207
+ maxWait: 1500
208
+ });
209
+ /**
210
+ * We only make elements pending if they are not already in the priority or ready queue
211
+ */
212
+ var addToPendingQueue = (id) => {
213
+ if (id && !readyQueue.has(id) && !priorityQueue.has(id)) pendingQueue.add(id);
214
+ };
215
+ /**
216
+ * Add elements to the priority queue for immediate rendering.
217
+ * We allow adding items already in readyQueue so that callbacks are still triggered,
218
+ * but processQueue will skip actual re-rendering for items already ready.
219
+ */
220
+ var addToPriorityQueue = (id) => {
221
+ if (id && !priorityQueue.has(id)) priorityQueue.add(id);
222
+ };
223
+ /**
224
+ * Request an item to be rendered (e.g. when it re-enters the overscan zone).
225
+ */
226
+ var requestLazyRender = (id, priority = false) => {
227
+ if (!id || readyQueue.has(id)) return;
228
+ if (priority) addToPriorityQueue(id);
229
+ else addToPendingQueue(id);
230
+ if (!isRunning.value) runLazyBus();
231
+ };
232
+ /**
233
+ * Schedules a single run of the lazy bus so that documents with no Lazy components
234
+ * (e.g. no operations, tags, or models) still get firstLazyLoadComplete set and the
235
+ * full-viewport placeholder can be hidden. Call from content root on mount.
236
+ */
237
+ var scheduleInitialLoadComplete = () => {
238
+ if (typeof window === "undefined") return;
239
+ window.setTimeout(() => runLazyBus(), 400);
240
+ };
241
+ /** When an element is unmounted we remove it from all queues */
242
+ var resetLazyElement = (id) => {
243
+ priorityQueue.delete(id);
244
+ pendingQueue.delete(id);
245
+ readyQueue.delete(id);
246
+ lazyPlaceholderHeights.delete(id);
247
+ };
248
+ /**
249
+ * Tracks the lazy loading state of an element.
250
+ * Use isReady (or expanded) to decide whether to render the slot or show a placeholder.
251
+ * The element is only added to the queue when it enters the viewport overscan (see Lazy.vue).
252
+ */
253
+ function useLazyBus(id) {
254
+ onBeforeUnmount(() => {
255
+ resetLazyElement(id);
256
+ });
257
+ return { isReady: computed(() => typeof window === "undefined" || priorityQueue.has(id) || readyQueue.has(id)) };
258
+ }
259
+ /**
260
+ * Scroll to a possibly lazy-loaded element. Expands parents and adds target (and
261
+ * parents) to the priority queue, then scrolls after Vue has flushed.
262
+ */
263
+ var scrollToLazy = (id, setExpanded, getEntryById) => {
264
+ const item = getEntryById(id);
265
+ const unfreeze = !readyQueue.has(id) || item?.children?.some((child) => !readyQueue.has(child.id)) ? freeze(id) : void 0;
266
+ addLazyCompleteCallback(unfreeze);
267
+ const unblock = blockIntersection();
268
+ const { rawId } = getSchemaParamsFromId(id);
269
+ addToPriorityQueue(id);
270
+ addToPriorityQueue(rawId);
271
+ if (item?.children) item.children.slice(0, 2).forEach((child) => addToPriorityQueue(child.id));
272
+ if (item?.parent) {
273
+ const parent = getEntryById(item.parent.id);
274
+ const elementIdx = parent?.children?.findIndex((child) => child.id === id);
275
+ if (elementIdx !== void 0 && elementIdx >= 0) parent?.children?.slice(elementIdx, elementIdx + 2).forEach((child) => addToPriorityQueue(child.id));
276
+ }
277
+ setExpanded(rawId, true);
278
+ /**
279
+ * Recursively expand the parents and set them as a loading priority
280
+ * This ensures all parents will be immediately loaded and open
281
+ */
282
+ const addParents = (currentId) => {
283
+ const parent = getEntryById(currentId)?.parent;
284
+ if (parent) {
285
+ addToPriorityQueue(parent.id);
286
+ setExpanded(parent.id, true);
287
+ addParents(parent.id);
288
+ }
289
+ };
290
+ /** Must use the rawId as schema params are not in the navigation tree */
291
+ addParents(rawId);
292
+ nextTick(() => {
293
+ tryScroll(id, Date.now() + SCROLL_RETRY_MS, unblock, unfreeze);
294
+ });
295
+ };
296
+ /**
297
+ * Tiny wrapper around the scrollIntoView API
298
+ * Retries up to the stopTime in case the element is not yet rendered
299
+ *
300
+ * @param id - The id of the element to scroll to
301
+ * @param stopTime - The time to stop retrying in unix milliseconds
302
+ */
303
+ var tryScroll = (id, stopTime, onComplete, onFailure) => {
304
+ const element = document.getElementById(id);
305
+ if (element) {
306
+ element.scrollIntoView({ block: "start" });
307
+ onComplete();
308
+ } else if (Date.now() < stopTime) requestAnimationFrame(() => tryScroll(id, stopTime, onComplete, onFailure));
309
+ else {
310
+ onComplete();
311
+ onFailure?.();
312
+ }
313
+ };
314
+ var freeze = (id) => {
315
+ let stop = false;
316
+ /**
317
+ * Runs until the stop flag is set
318
+ * Executes the final frame after stop changes to true
319
+ */
320
+ const runFrame = (stopAfterFrame) => {
321
+ const element = document.getElementById(id);
322
+ if (element) element.scrollIntoView({ block: "start" });
323
+ if (!stopAfterFrame) requestAnimationFrame(() => runFrame(stop));
324
+ };
325
+ runFrame(false);
326
+ return () => {
327
+ stop = true;
328
+ };
329
+ };
330
+ //#endregion
331
+ export { intersectionEnabled as a, scrollToLazy as c, getIdFromUrl as d, makeUrlFromId as f, getLazyPlaceholderHeight as i, setLazyPlaceholderHeight as l, blockIntersection as n, requestLazyRender as o, matchesBasePath as p, firstLazyLoadComplete as r, scheduleInitialLoadComplete as s, addToPriorityQueue as t, useLazyBus as u };
332
+
333
+ //# sourceMappingURL=lazy-bus-CV8Ox5hD.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"lazy-bus-CV8Ox5hD.js","names":[],"sources":["../src/helpers/id-routing.ts","../src/helpers/lazy-bus.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","import { watchDebounced } from '@vueuse/core'\nimport { nanoid } from 'nanoid'\nimport { computed, nextTick, onBeforeUnmount, reactive, ref } from 'vue'\n\nimport { getSchemaParamsFromId } from './id-routing'\n\n/**\n * List of items that are in the priority queue and will be rendered first (e.g. scroll target).\n */\nconst priorityQueue = reactive<Set<string>>(new Set())\n/** List of items that are pending to be loaded (in viewport overscan). */\nconst pendingQueue = reactive<Set<string>>(new Set())\n/** List of items that are already loaded and stay mounted (no eviction). */\nconst readyQueue = reactive<Set<string>>(new Set())\n/**\n * Flag to indicate if the lazy bus is currently running\n * Blocks ID changes while running\n */\nconst isRunning = ref(false)\n\n/** How long tryScroll keeps retrying to find the element (ms). */\nconst SCROLL_RETRY_MS = 3000\n\n/** Tracks when the initial load is complete. */\nexport const firstLazyLoadComplete = ref(false)\n\n/** List of unique identifiers that are blocking intersection */\nconst intersectionBlockers = reactive<Set<string>>(new Set())\n\nconst onRenderComplete = new Set<() => void>()\n\n/** Cached content heights so placeholders can match when not rendered. */\nconst lazyPlaceholderHeights = reactive<Map<string, number>>(new Map())\n\nexport const getLazyPlaceholderHeight = (id: string): number | undefined => lazyPlaceholderHeights.get(id)\n\nexport const setLazyPlaceholderHeight = (id: string, height: number): void => {\n if (!Number.isFinite(height) || height <= 0) {\n return\n }\n lazyPlaceholderHeights.set(id, Math.round(height))\n}\n\n/** Adds a one time callback to be executed when the lazy bus has finished loading */\nconst addLazyCompleteCallback = (callback: (() => void) | undefined) => {\n if (callback) {\n onRenderComplete.add(callback)\n }\n}\n\ntype UnblockFn = () => void\n\n/**\n * Blocks intersection until the returned unblock callback is run.\n * Prevents scroll jump while we render new lazy content.\n */\nexport const blockIntersection = (): UnblockFn => {\n const blockId = nanoid()\n intersectionBlockers.add(blockId)\n\n /** Unblock uses a small delay to ensure the scroll is complete before enabling intersection */\n return () => setTimeout(() => intersectionBlockers.delete(blockId), 100)\n}\n\n/** If there are any pending blocking operations we disable intersection */\nexport const intersectionEnabled = computed(() => intersectionBlockers.size === 0)\n\n/**\n * Processes the full queue: priority first, then pending. Blocks intersection while\n * rendering so the viewport does not jump. No eviction — items stay in readyQueue.\n */\nconst runLazyBus = () => {\n // We always render the lazy bus when the window is undefined (see useLazyBus)\n if (typeof window === 'undefined') {\n return\n }\n\n if (isRunning.value) {\n return\n }\n\n isRunning.value = true\n\n /**\n * Sets all the pending elements into the ready queue\n * After waiting for Vue to update the DOM we execute the callbacks and unblock intersection\n */\n const processQueue = async () => {\n const priorityIds = [...priorityQueue]\n const pendingIds = [...pendingQueue]\n\n if (priorityIds.length === 0 && pendingIds.length === 0) {\n onRenderComplete.forEach((fn) => fn())\n onRenderComplete.clear()\n isRunning.value = false\n firstLazyLoadComplete.value = true\n return\n }\n\n for (const id of priorityIds) {\n readyQueue.add(id)\n priorityQueue.delete(id)\n }\n for (const id of pendingIds) {\n readyQueue.add(id)\n pendingQueue.delete(id)\n }\n\n await nextTick()\n\n onRenderComplete.forEach((fn) => fn())\n onRenderComplete.clear()\n isRunning.value = false\n firstLazyLoadComplete.value = true\n }\n\n if (window.requestIdleCallback) {\n window.requestIdleCallback(processQueue, { timeout: 1500 })\n } else {\n // biome-ignore lint/nursery/noFloatingPromises: Expected floating promise\n nextTick(processQueue)\n }\n}\n\n/**\n * Run the lazy bus when the queue changes and is not currently running\n * Debounce so that multiple changes to the queue are batched together\n *\n * We must run when the priority queue changes because we rely on finish callbacks\n * anytime we request potentially lazy elements. If we don't run when the priority queue changes\n * we may not have a finish callback even though the element is set to load.\n */\nwatchDebounced(\n [() => pendingQueue.size, () => priorityQueue.size, () => isRunning.value],\n () => {\n if ((pendingQueue.size > 0 || priorityQueue.size > 0) && !isRunning.value) {\n runLazyBus()\n }\n },\n { debounce: 300, maxWait: 1500 },\n)\n\n/**\n * We only make elements pending if they are not already in the priority or ready queue\n */\nconst addToPendingQueue = (id: string | undefined) => {\n if (id && !readyQueue.has(id) && !priorityQueue.has(id)) {\n pendingQueue.add(id)\n }\n}\n\n/**\n * Add elements to the priority queue for immediate rendering.\n * We allow adding items already in readyQueue so that callbacks are still triggered,\n * but processQueue will skip actual re-rendering for items already ready.\n */\nexport const addToPriorityQueue = (id: string | undefined) => {\n if (id && !priorityQueue.has(id)) {\n priorityQueue.add(id)\n }\n}\n\n/**\n * Request an item to be rendered (e.g. when it re-enters the overscan zone).\n */\nexport const requestLazyRender = (id: string | undefined, priority = false): void => {\n if (!id || readyQueue.has(id)) {\n return\n }\n if (priority) {\n addToPriorityQueue(id)\n } else {\n addToPendingQueue(id)\n }\n if (!isRunning.value) {\n runLazyBus()\n }\n}\n\n/**\n * Schedules a single run of the lazy bus so that documents with no Lazy components\n * (e.g. no operations, tags, or models) still get firstLazyLoadComplete set and the\n * full-viewport placeholder can be hidden. Call from content root on mount.\n */\nexport const scheduleInitialLoadComplete = (): void => {\n if (typeof window === 'undefined') {\n return\n }\n const delay = 400\n window.setTimeout(() => runLazyBus(), delay)\n}\n\n/** When an element is unmounted we remove it from all queues */\nconst resetLazyElement = (id: string) => {\n priorityQueue.delete(id)\n pendingQueue.delete(id)\n readyQueue.delete(id)\n lazyPlaceholderHeights.delete(id)\n}\n\n// ---------------------------------------------------------------------------\n\n/**\n * Tracks the lazy loading state of an element.\n * Use isReady (or expanded) to decide whether to render the slot or show a placeholder.\n * The element is only added to the queue when it enters the viewport overscan (see Lazy.vue).\n */\nexport function useLazyBus(id: string) {\n onBeforeUnmount(() => {\n resetLazyElement(id)\n })\n\n return {\n isReady: computed(() => typeof window === 'undefined' || priorityQueue.has(id) || readyQueue.has(id)),\n }\n}\n\n/**\n * Scroll to a possibly lazy-loaded element. Expands parents and adds target (and\n * parents) to the priority queue, then scrolls after Vue has flushed.\n */\nexport const scrollToLazy = (\n id: string,\n setExpanded: (id: string, value: boolean) => void,\n getEntryById: (id: string) => { id: string; parent?: { id: string }; children?: { id: string }[] } | undefined,\n) => {\n const item = getEntryById(id)\n\n /**\n * If the element is lazy we must freeze the element so that it does not move until after the next lazy bus run\n * If the element never loads then the scroll onFailure callback will be run to unfreeze the element\n *\n * If the readyQueue does not have the item we must freeze it while it renders\n * If the item has lazy children we must freeze the item while the children are (potentially) loaded\n */\n const isLazy = !readyQueue.has(id) || item?.children?.some((child) => !readyQueue.has(child.id))\n\n const unfreeze = isLazy ? freeze(id) : undefined\n addLazyCompleteCallback(unfreeze)\n\n // Disable intersection while we scroll to the element\n const unblock = blockIntersection()\n const { rawId } = getSchemaParamsFromId(id)\n\n addToPriorityQueue(id)\n addToPriorityQueue(rawId)\n\n // When there are children we ensure the first 2 are loaded\n if (item?.children) {\n item.children.slice(0, 2).forEach((child) => addToPriorityQueue(child.id))\n }\n\n // When there are sibling items we attempt to load the next 2 to better fill the viewport\n if (item?.parent) {\n const parent = getEntryById(item.parent.id)\n const elementIdx = parent?.children?.findIndex((child) => child.id === id)\n if (elementIdx !== undefined && elementIdx >= 0) {\n parent?.children?.slice(elementIdx, elementIdx + 2).forEach((child) => addToPriorityQueue(child.id))\n }\n }\n\n setExpanded(rawId, true)\n /**\n * Recursively expand the parents and set them as a loading priority\n * This ensures all parents will be immediately loaded and open\n */\n const addParents = (currentId: string) => {\n const parent = getEntryById(currentId)?.parent\n if (parent) {\n addToPriorityQueue(parent.id)\n setExpanded(parent.id, true)\n addParents(parent.id)\n }\n }\n /** Must use the rawId as schema params are not in the navigation tree */\n addParents(rawId)\n\n void nextTick(() => {\n tryScroll(id, Date.now() + SCROLL_RETRY_MS, unblock, unfreeze)\n })\n}\n\n/**\n * Tiny wrapper around the scrollIntoView API\n * Retries up to the stopTime in case the element is not yet rendered\n *\n * @param id - The id of the element to scroll to\n * @param stopTime - The time to stop retrying in unix milliseconds\n */\nconst tryScroll = (id: string, stopTime: number, onComplete: UnblockFn, onFailure?: () => void): void => {\n const element = document.getElementById(id)\n if (element) {\n element.scrollIntoView({ block: 'start' })\n onComplete()\n } else if (Date.now() < stopTime) {\n requestAnimationFrame(() => tryScroll(id, stopTime, onComplete, onFailure))\n } else {\n // If the scroll has expired we enable intersection again\n onComplete()\n onFailure?.()\n }\n}\n\nconst freeze = (id: string): (() => void) => {\n let stop = false\n\n /**\n * Runs until the stop flag is set\n * Executes the final frame after stop changes to true\n */\n const runFrame = (stopAfterFrame: boolean) => {\n const element = document.getElementById(id)\n if (element) {\n element.scrollIntoView({ block: 'start' })\n }\n if (!stopAfterFrame) {\n requestAnimationFrame(() => runFrame(stop))\n }\n }\n\n runFrame(false)\n\n return () => {\n stop = true\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;;AAG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