@redocly/openapi-docs 3.24.0-next.9 → 3.24.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 (314) hide show
  1. package/dist/{redocly-openapi-docs.min.AiChatProvider-DcsGB2gP.js → redocly-openapi-docs.min.AiChatProvider-j-VDfFJ9.js} +3 -3
  2. package/dist/{redocly-openapi-docs.min.AiChatSqliteDBStorage-wCZA4usG.js → redocly-openapi-docs.min.AiChatSqliteDBStorage-BBRBmffc.js} +1 -1
  3. package/dist/{redocly-openapi-docs.min.AiPanel-jo7fqtSt.js → redocly-openapi-docs.min.AiPanel-DTzHqAiI.js} +116 -116
  4. package/dist/redocly-openapi-docs.min.FileWatcher-DDoyaS7A.js +1 -0
  5. package/dist/redocly-openapi-docs.min.Observable-D6wKbFwB.js +1 -0
  6. package/dist/redocly-openapi-docs.min.SemanticSearchService-DNFOPBZK.js +1 -0
  7. package/dist/{redocly-openapi-docs.min.SqliteDBStorage-B_f6WR8o.js → redocly-openapi-docs.min.SqliteDBStorage-Dy40Vq04.js} +1 -1
  8. package/dist/redocly-openapi-docs.min.TauriFileSystemAdapter-CpViFqJQ.js +1 -0
  9. package/dist/redocly-openapi-docs.min.TauriRootStorage-TCUrp2uB.js +1 -0
  10. package/dist/redocly-openapi-docs.min.ai-chat-mappers-CmX-8902.js +1 -0
  11. package/dist/redocly-openapi-docs.min.core-BYyFOtMX.js +1 -0
  12. package/dist/redocly-openapi-docs.min.external-resolver-BkceRyB4.js +2 -0
  13. package/dist/redocly-openapi-docs.min.index-BCcol5vU.js +1 -0
  14. package/dist/redocly-openapi-docs.min.index-C6uU_v-b.js +1 -0
  15. package/dist/redocly-openapi-docs.min.index-CmXZfuiZ.js +7730 -0
  16. package/dist/redocly-openapi-docs.min.index-DVWw0ICA.js +1 -0
  17. package/dist/redocly-openapi-docs.min.index-YnvLQkG_.js +1 -0
  18. package/dist/redocly-openapi-docs.min.index-xl_tBaHD.js +1 -0
  19. package/dist/redocly-openapi-docs.min.js +1 -1
  20. package/dist/{redocly-openapi-docs.min.lint-C-zlwxhp.js → redocly-openapi-docs.min.lint-2YpbCz3r.js} +69 -69
  21. package/dist/{redocly-openapi-docs.min.lint-graphql-qEh9cZHx.js → redocly-openapi-docs.min.lint-graphql-Bgfcu2tP.js} +1 -1
  22. package/dist/redocly-openapi-docs.min.periodic-revalidation-Dsp-n7ui.js +1 -0
  23. package/dist/redocly-openapi-docs.min.promise-map-limit-Db_42GvV.js +1 -0
  24. package/dist/{redocly-openapi-docs.min.respect-run-hfNPYQ9x.js → redocly-openapi-docs.min.respect-run-Ct8taisL.js} +1 -1
  25. package/dist/redocly-openapi-docs.min.standalone-BPCdJgtH.js +11995 -0
  26. package/dist/redocly-openapi-docs.min.tauri-path-CmqBCxGb.js +1 -0
  27. package/dist/{redocly-openapi-docs.min.useAiChatQueries-DgSsCKMW.js → redocly-openapi-docs.min.useAiChatQueries-t8oy8jik.js} +80 -80
  28. package/lib/components/ApiInfo/__tests__/ApiInfo.test.d.ts +1 -0
  29. package/lib/components/ApiInfo/__tests__/ApiInfo.test.js +46 -0
  30. package/lib/components/Callbacks/CallbackOperation.js +1 -1
  31. package/lib/components/Callbacks/__tests__/Callbacks.test.d.ts +1 -0
  32. package/lib/components/Callbacks/__tests__/Callbacks.test.js +46 -0
  33. package/lib/components/Content/__tests__/useAutoScroll.test.d.ts +1 -0
  34. package/lib/components/Content/__tests__/useAutoScroll.test.js +88 -0
  35. package/lib/components/Content/useAutoScroll.js +1 -1
  36. package/lib/components/ContentItem/__tests__/useIsExpanded.test.d.ts +1 -0
  37. package/lib/components/ContentItem/__tests__/useIsExpanded.test.js +123 -0
  38. package/lib/components/ContentItem/useIsExpanded.js +1 -1
  39. package/lib/components/ContentItems/ContentItems.js +1 -1
  40. package/lib/components/ContentItems/VirtualList.js +1 -1
  41. package/lib/components/ContentItems/__tests__/Items.test.d.ts +1 -0
  42. package/lib/components/ContentItems/__tests__/Items.test.js +66 -0
  43. package/lib/components/ContentItems/__tests__/VirtualList.test.d.ts +1 -0
  44. package/lib/components/ContentItems/__tests__/VirtualList.test.js +135 -0
  45. package/lib/components/ContentItems/useScrollOnRender.js +1 -1
  46. package/lib/components/Discriminator/__tests__/DiscriminatorDropdown.test.d.ts +1 -0
  47. package/lib/components/Discriminator/__tests__/DiscriminatorDropdown.test.js +63 -0
  48. package/lib/components/Download/__tests__/DownloadSpecification.test.d.ts +1 -0
  49. package/lib/components/Download/__tests__/DownloadSpecification.test.js +52 -0
  50. package/lib/components/ExpandAllButton/__tests__/ExpandAllButton.test.d.ts +1 -0
  51. package/lib/components/ExpandAllButton/__tests__/ExpandAllButton.test.js +60 -0
  52. package/lib/components/ExpandAllButton/__tests__/helpers.test.d.ts +1 -0
  53. package/lib/components/ExpandAllButton/__tests__/helpers.test.js +133 -0
  54. package/lib/components/Language/__tests__/LanguageDropdown.test.d.ts +1 -0
  55. package/lib/components/Language/__tests__/LanguageDropdown.test.js +23 -0
  56. package/lib/components/Markdown/__tests__/Markdown.test.d.ts +1 -0
  57. package/lib/components/Markdown/__tests__/Markdown.test.js +34 -0
  58. package/lib/components/McpOverview/__tests__/McpOverview.test.d.ts +1 -0
  59. package/lib/components/McpOverview/__tests__/McpOverview.test.js +66 -0
  60. package/lib/components/McpTool/__tests__/McpPrompt.test.d.ts +1 -0
  61. package/lib/components/McpTool/__tests__/McpPrompt.test.js +57 -0
  62. package/lib/components/McpTool/__tests__/McpResource.test.d.ts +1 -0
  63. package/lib/components/McpTool/__tests__/McpResource.test.js +81 -0
  64. package/lib/components/McpTool/__tests__/McpTool.test.d.ts +1 -0
  65. package/lib/components/McpTool/__tests__/McpTool.test.js +82 -0
  66. package/lib/components/MediaTypeSwitch/__tests__/MediaTypesSwitch.test.d.ts +1 -0
  67. package/lib/components/MediaTypeSwitch/__tests__/MediaTypesSwitch.test.js +79 -0
  68. package/lib/components/OperationItem/__tests__/OperationItem.test.d.ts +1 -0
  69. package/lib/components/OperationItem/__tests__/OperationItem.test.js +70 -0
  70. package/lib/components/OperationItem/__tests__/__mocks__/mock-intersection-observer.d.ts +16 -0
  71. package/lib/components/OperationItem/__tests__/__mocks__/mock-intersection-observer.js +42 -0
  72. package/lib/components/Overview/__tests__/Overview.test.d.ts +1 -0
  73. package/lib/components/Overview/__tests__/Overview.test.js +59 -0
  74. package/lib/components/PayloadSamples/__tests__/Example.test.d.ts +1 -0
  75. package/lib/components/PayloadSamples/__tests__/Example.test.js +36 -0
  76. package/lib/components/PayloadSamples/__tests__/ExampleValue.test.d.ts +1 -0
  77. package/lib/components/PayloadSamples/__tests__/ExampleValue.test.js +197 -0
  78. package/lib/components/PayloadSamples/__tests__/PayloadSamples.test.d.ts +1 -0
  79. package/lib/components/PayloadSamples/__tests__/PayloadSamples.test.js +38 -0
  80. package/lib/components/PropertyDetails/__tests__/Extensions.test.d.ts +1 -0
  81. package/lib/components/PropertyDetails/__tests__/Extensions.test.js +21 -0
  82. package/lib/components/PropertyDetails/__tests__/FieldDetail.test.d.ts +1 -0
  83. package/lib/components/PropertyDetails/__tests__/FieldDetail.test.js +52 -0
  84. package/lib/components/PropertyDetails/__tests__/FieldDetails.test.d.ts +1 -0
  85. package/lib/components/PropertyDetails/__tests__/FieldDetails.test.js +191 -0
  86. package/lib/components/PropertyDetails/__tests__/PropertyDetails.test.d.ts +1 -0
  87. package/lib/components/PropertyDetails/__tests__/PropertyDetails.test.js +365 -0
  88. package/lib/components/PropertyDetails/__tests__/cycleColorsByLevel.test.d.ts +1 -0
  89. package/lib/components/PropertyDetails/__tests__/cycleColorsByLevel.test.js +23 -0
  90. package/lib/components/RedoclyOpenAPIDocs/__tests__/AppProvider.test.d.ts +1 -0
  91. package/lib/components/RedoclyOpenAPIDocs/__tests__/AppProvider.test.js +16 -0
  92. package/lib/components/RedoclyOpenAPIDocs/__tests__/RedoclyOpenAPIDocs.test.d.ts +1 -0
  93. package/lib/components/RedoclyOpenAPIDocs/__tests__/RedoclyOpenAPIDocs.test.js +104 -0
  94. package/lib/components/RenderHook/__tests__/RenderHook.test.d.ts +1 -0
  95. package/lib/components/RenderHook/__tests__/RenderHook.test.js +15 -0
  96. package/lib/components/Replay/__tests__/utils.test.d.ts +1 -0
  97. package/lib/components/Replay/__tests__/utils.test.js +526 -0
  98. package/lib/components/Request/__tests__/RequestDetails.test.d.ts +1 -0
  99. package/lib/components/Request/__tests__/RequestDetails.test.js +98 -0
  100. package/lib/components/RequestSamples/__tests__/Example.test.d.ts +1 -0
  101. package/lib/components/RequestSamples/__tests__/Example.test.js +384 -0
  102. package/lib/components/RequestSamples/__tests__/RequestSamples.test.d.ts +1 -0
  103. package/lib/components/RequestSamples/__tests__/RequestSamples.test.js +226 -0
  104. package/lib/components/RequestSamples/__tests__/useCodeSamples.test.d.ts +1 -0
  105. package/lib/components/RequestSamples/__tests__/useCodeSamples.test.js +64 -0
  106. package/lib/components/ResponseSamples/__tests__/ResponseSamples.test.d.ts +1 -0
  107. package/lib/components/ResponseSamples/__tests__/ResponseSamples.test.js +29 -0
  108. package/lib/components/Responses/OperationResponseList.js +1 -1
  109. package/lib/components/Responses/__tests__/OperationResponseList.test.d.ts +1 -0
  110. package/lib/components/Responses/__tests__/OperationResponseList.test.js +89 -0
  111. package/lib/components/Responses/__tests__/ResponseDetails.test.d.ts +1 -0
  112. package/lib/components/Responses/__tests__/ResponseDetails.test.js +111 -0
  113. package/lib/components/Responses/__tests__/ResponsesHeaders.test.d.ts +1 -0
  114. package/lib/components/Responses/__tests__/ResponsesHeaders.test.js +26 -0
  115. package/lib/components/Schema/Schema.js +1 -1
  116. package/lib/components/Schema/SubSchema.js +1 -1
  117. package/lib/components/Schema/__tests__/ArraySchema.test.d.ts +1 -0
  118. package/lib/components/Schema/__tests__/ArraySchema.test.js +93 -0
  119. package/lib/components/Schema/__tests__/ObjectSchema.test.d.ts +1 -0
  120. package/lib/components/Schema/__tests__/ObjectSchema.test.js +115 -0
  121. package/lib/components/Schema/__tests__/OneOfSchema.test.d.ts +1 -0
  122. package/lib/components/Schema/__tests__/OneOfSchema.test.js +33 -0
  123. package/lib/components/Schema/__tests__/Schema.test.d.ts +1 -0
  124. package/lib/components/Schema/__tests__/Schema.test.js +67 -0
  125. package/lib/components/Schema/__tests__/useOneOfLocationIdx.test.d.ts +1 -0
  126. package/lib/components/Schema/__tests__/useOneOfLocationIdx.test.js +22 -0
  127. package/lib/components/Schema/useOneOfLocationIdx.js +1 -1
  128. package/lib/components/SchemaCatalogLink/__tests__/SchemaCatalogLink.test.d.ts +1 -0
  129. package/lib/components/SchemaCatalogLink/__tests__/SchemaCatalogLink.test.js +95 -0
  130. package/lib/components/Security/__tests__/Security.test.d.ts +1 -0
  131. package/lib/components/Security/__tests__/Security.test.js +38 -0
  132. package/lib/components/Security/__tests__/SecurityButton.test.d.ts +1 -0
  133. package/lib/components/Security/__tests__/SecurityButton.test.js +92 -0
  134. package/lib/components/Security/__tests__/SecurityModal.test.d.ts +1 -0
  135. package/lib/components/Security/__tests__/SecurityModal.test.js +172 -0
  136. package/lib/components/ServerList/__tests__/ServerList.test.d.ts +1 -0
  137. package/lib/components/ServerList/__tests__/ServerList.test.js +83 -0
  138. package/lib/components/SideMenu/hooks/useMenuItems.js +1 -1
  139. package/lib/components/StickySidebar/StickyResponsiveSidebar.js +1 -1
  140. package/lib/components/Tabs/__tests__/Tabs.test.d.ts +1 -0
  141. package/lib/components/Tabs/__tests__/Tabs.test.js +27 -0
  142. package/lib/components/TagItem/OperationsNavigation.js +1 -1
  143. package/lib/components/TagItem/TagItem.js +1 -1
  144. package/lib/components/ViewNested/__tests__/ViewNested.test.d.ts +1 -0
  145. package/lib/components/ViewNested/__tests__/ViewNested.test.js +42 -0
  146. package/lib/components/__tests__/Samples/ExampleSwitch.test.d.ts +1 -0
  147. package/lib/components/__tests__/Samples/ExampleSwitch.test.js +45 -0
  148. package/lib/components/__tests__/Samples/use-example-key.test.d.ts +1 -0
  149. package/lib/components/__tests__/Samples/use-example-key.test.js +28 -0
  150. package/lib/components/__tests__/common/ClearButton.test.d.ts +1 -0
  151. package/lib/components/__tests__/common/ClearButton.test.js +18 -0
  152. package/lib/components/__tests__/common/Dropdown.test.d.ts +1 -0
  153. package/lib/components/__tests__/common/Dropdown.test.js +52 -0
  154. package/lib/components/__tests__/mocks/examples.d.ts +4 -0
  155. package/lib/components/__tests__/mocks/examples.js +115 -0
  156. package/lib/components/common/LinkToField.js +1 -1
  157. package/lib/components/common/__tests__/Dropdown.test.d.ts +1 -0
  158. package/lib/components/common/__tests__/Dropdown.test.js +129 -0
  159. package/lib/components/common/__tests__/LinkToField.test.d.ts +1 -0
  160. package/lib/components/common/__tests__/LinkToField.test.js +39 -0
  161. package/lib/components/common/linkify.js +1 -1
  162. package/lib/hooks/useRouter.js +1 -1
  163. package/lib/hooks/useUppercase2LowercaseRedirect.js +1 -1
  164. package/lib/jotai/__tests__/app.test.d.ts +1 -0
  165. package/lib/jotai/__tests__/app.test.js +53 -0
  166. package/lib/models/__tests__/Callback.test.d.ts +1 -0
  167. package/lib/models/__tests__/Callback.test.js +15 -0
  168. package/lib/models/__tests__/FieldModel.test.d.ts +1 -0
  169. package/lib/models/__tests__/FieldModel.test.js +117 -0
  170. package/lib/models/__tests__/MediaContent.test.d.ts +1 -0
  171. package/lib/models/__tests__/MediaContent.test.js +105 -0
  172. package/lib/models/__tests__/Operation.test.d.ts +1 -0
  173. package/lib/models/__tests__/Operation.test.js +459 -0
  174. package/lib/models/__tests__/Response.test.d.ts +1 -0
  175. package/lib/models/__tests__/Response.test.js +221 -0
  176. package/lib/models/__tests__/Schema.circular.test.d.ts +1 -0
  177. package/lib/models/__tests__/Schema.circular.test.js +694 -0
  178. package/lib/models/__tests__/Schema.test.d.ts +1 -0
  179. package/lib/models/__tests__/Schema.test.js +1395 -0
  180. package/lib/models/__tests__/example.test.d.ts +1 -0
  181. package/lib/models/__tests__/example.test.js +90 -0
  182. package/lib/models/__tests__/group.test.d.ts +1 -0
  183. package/lib/models/__tests__/group.test.js +52 -0
  184. package/lib/models/__tests__/helpers.d.ts +5 -0
  185. package/lib/models/__tests__/helpers.js +62 -0
  186. package/lib/models/__tests__/request.test.d.ts +1 -0
  187. package/lib/models/__tests__/request.test.js +119 -0
  188. package/lib/services/__tests__/OpenAPIParser.test.d.ts +1 -0
  189. package/lib/services/__tests__/OpenAPIParser.test.js +80 -0
  190. package/lib/services/__tests__/check.test.d.ts +1 -0
  191. package/lib/services/__tests__/check.test.js +22 -0
  192. package/lib/services/__tests__/utils.test.d.ts +1 -0
  193. package/lib/services/__tests__/utils.test.js +42 -0
  194. package/lib/services/code-samples/__tests__/apply-environments.test.d.ts +1 -0
  195. package/lib/services/code-samples/__tests__/apply-environments.test.js +64 -0
  196. package/lib/services/code-samples/__tests__/build-code-samples.test.d.ts +1 -0
  197. package/lib/services/code-samples/__tests__/build-code-samples.test.js +70 -0
  198. package/lib/services/code-samples/__tests__/convertSampleToString.test.d.ts +1 -0
  199. package/lib/services/code-samples/__tests__/convertSampleToString.test.js +116 -0
  200. package/lib/services/code-samples/__tests__/generator-data-value.test.d.ts +1 -0
  201. package/lib/services/code-samples/__tests__/generator-data-value.test.js +277 -0
  202. package/lib/services/code-samples/__tests__/generator-serialized-value.test.d.ts +1 -0
  203. package/lib/services/code-samples/__tests__/generator-serialized-value.test.js +258 -0
  204. package/lib/services/code-samples/__tests__/generator-value.test.d.ts +1 -0
  205. package/lib/services/code-samples/__tests__/generator-value.test.js +273 -0
  206. package/lib/services/code-samples/__tests__/generator.test.d.ts +249 -0
  207. package/lib/services/code-samples/__tests__/generator.test.js +1201 -0
  208. package/lib/services/code-samples/__tests__/get-example-value-by-mime-type.test.d.ts +1 -0
  209. package/lib/services/code-samples/__tests__/get-example-value-by-mime-type.test.js +31 -0
  210. package/lib/services/code-samples/httpsnippet/__tests__/device-authorization.test.d.ts +1 -0
  211. package/lib/services/code-samples/httpsnippet/__tests__/device-authorization.test.js +222 -0
  212. package/lib/services/code-samples/httpsnippet/helpers/__tests__/code-helpers.test.d.ts +1 -0
  213. package/lib/services/code-samples/httpsnippet/helpers/__tests__/code-helpers.test.js +129 -0
  214. package/lib/services/code-samples/httpsnippet/helpers/__tests__/string-utility.test.d.ts +1 -0
  215. package/lib/services/code-samples/httpsnippet/helpers/__tests__/string-utility.test.js +49 -0
  216. package/lib/services/code-samples/httpsnippet/targets/csharp/__tests__/httpclient.test.d.ts +1 -0
  217. package/lib/services/code-samples/httpsnippet/targets/csharp/__tests__/httpclient.test.js +172 -0
  218. package/lib/services/code-samples/httpsnippet/targets/csharpNewtonsoft/__tests__/httpclient.test.d.ts +1 -0
  219. package/lib/services/code-samples/httpsnippet/targets/csharpNewtonsoft/__tests__/httpclient.test.js +172 -0
  220. package/lib/services/code-samples/httpsnippet/targets/go/__tests__/native.test.d.ts +1 -0
  221. package/lib/services/code-samples/httpsnippet/targets/go/__tests__/native.test.js +130 -0
  222. package/lib/services/code-samples/httpsnippet/targets/java/__tests__/httpclient.test.d.ts +1 -0
  223. package/lib/services/code-samples/httpsnippet/targets/java/__tests__/httpclient.test.js +191 -0
  224. package/lib/services/code-samples/httpsnippet/targets/java8/__tests__/apachehttp.test.d.ts +1 -0
  225. package/lib/services/code-samples/httpsnippet/targets/java8/__tests__/apachehttp.test.js +172 -0
  226. package/lib/services/code-samples/httpsnippet/targets/javascript/__tests__/fetch.test.d.ts +1 -0
  227. package/lib/services/code-samples/httpsnippet/targets/javascript/__tests__/fetch.test.js +85 -0
  228. package/lib/services/code-samples/httpsnippet/targets/node/__tests__/fetch.test.d.ts +1 -0
  229. package/lib/services/code-samples/httpsnippet/targets/node/__tests__/fetch.test.js +85 -0
  230. package/lib/services/code-samples/httpsnippet/targets/php/__tests__/curl.test.d.ts +1 -0
  231. package/lib/services/code-samples/httpsnippet/targets/php/__tests__/curl.test.js +126 -0
  232. package/lib/services/code-samples/httpsnippet/targets/python/__tests__/requests.test.d.ts +1 -0
  233. package/lib/services/code-samples/httpsnippet/targets/python/__tests__/requests.test.js +105 -0
  234. package/lib/services/code-samples/httpsnippet/targets/r/__tests__/httr.test.d.ts +1 -0
  235. package/lib/services/code-samples/httpsnippet/targets/r/__tests__/httr.test.js +126 -0
  236. package/lib/services/code-samples/httpsnippet/targets/ruby/__tests__/native.test.d.ts +1 -0
  237. package/lib/services/code-samples/httpsnippet/targets/ruby/__tests__/native.test.js +129 -0
  238. package/lib/services/code-samples/httpsnippet/targets/shell/__tests__/curl.test.d.ts +1 -0
  239. package/lib/services/code-samples/httpsnippet/targets/shell/__tests__/curl.test.js +129 -0
  240. package/lib/services/config-options/__tests__/helpers.test.d.ts +1 -0
  241. package/lib/services/config-options/__tests__/helpers.test.js +234 -0
  242. package/lib/services/history/__tests__/helpers.test.d.ts +1 -0
  243. package/lib/services/history/__tests__/helpers.test.js +19 -0
  244. package/lib/services/menu/__tests__/buildNestedTagsItems.test.d.ts +1 -0
  245. package/lib/services/menu/__tests__/buildNestedTagsItems.test.js +109 -0
  246. package/lib/services/menu/__tests__/builder.test.d.ts +1 -0
  247. package/lib/services/menu/__tests__/builder.test.js +307 -0
  248. package/lib/services/menu/__tests__/operation.test.d.ts +1 -0
  249. package/lib/services/menu/__tests__/operation.test.js +240 -0
  250. package/lib/services/menu/__tests__/tags.test.d.ts +1 -0
  251. package/lib/services/menu/__tests__/tags.test.js +71 -0
  252. package/lib/telemetry/RedocTelemetry.js +31 -1
  253. package/lib/telemetry/__tests__/RedocTelemetry.test.d.ts +1 -0
  254. package/lib/telemetry/__tests__/RedocTelemetry.test.js +107 -0
  255. package/lib/testProviders.d.ts +6 -0
  256. package/lib/testProviders.js +14 -0
  257. package/lib/utils/__tests__/areArraysEqual.test.d.ts +1 -0
  258. package/lib/utils/__tests__/areArraysEqual.test.js +33 -0
  259. package/lib/utils/__tests__/argValuesHelpers.d.ts +1 -0
  260. package/lib/utils/__tests__/argValuesHelpers.js +56 -0
  261. package/lib/utils/__tests__/calculateMaxLength.test.d.ts +1 -0
  262. package/lib/utils/__tests__/calculateMaxLength.test.js +119 -0
  263. package/lib/utils/__tests__/configure-helpers.test.d.ts +1 -0
  264. package/lib/utils/__tests__/configure-helpers.test.js +356 -0
  265. package/lib/utils/__tests__/convertSwagger2OpenAPI.test.d.ts +1 -0
  266. package/lib/utils/__tests__/convertSwagger2OpenAPI.test.js +392 -0
  267. package/lib/utils/__tests__/debounce.test.d.ts +1 -0
  268. package/lib/utils/__tests__/debounce.test.js +54 -0
  269. package/lib/utils/__tests__/debug.test.d.ts +1 -0
  270. package/lib/utils/__tests__/debug.test.js +23 -0
  271. package/lib/utils/__tests__/dom.test.d.ts +1 -0
  272. package/lib/utils/__tests__/dom.test.js +108 -0
  273. package/lib/utils/__tests__/getBreadcrumbs.test.d.ts +1 -0
  274. package/lib/utils/__tests__/getBreadcrumbs.test.js +98 -0
  275. package/lib/utils/__tests__/hasNestedFields.test.d.ts +1 -0
  276. package/lib/utils/__tests__/hasNestedFields.test.js +147 -0
  277. package/lib/utils/__tests__/helpers.test.d.ts +1 -0
  278. package/lib/utils/__tests__/helpers.test.js +174 -0
  279. package/lib/utils/__tests__/isMobile.test.d.ts +1 -0
  280. package/lib/utils/__tests__/isMobile.test.js +28 -0
  281. package/lib/utils/__tests__/loadAndBundleSpec.test.d.ts +1 -0
  282. package/lib/utils/__tests__/loadAndBundleSpec.test.js +22 -0
  283. package/lib/utils/__tests__/local-storage.test.d.ts +1 -0
  284. package/lib/utils/__tests__/local-storage.test.js +48 -0
  285. package/lib/utils/__tests__/object.test.d.ts +1 -0
  286. package/lib/utils/__tests__/object.test.js +45 -0
  287. package/lib/utils/__tests__/openapi.test.d.ts +1 -0
  288. package/lib/utils/__tests__/openapi.test.js +1378 -0
  289. package/lib/utils/__tests__/path.test.d.ts +1 -0
  290. package/lib/utils/__tests__/path.test.js +16 -0
  291. package/lib/utils/__tests__/queryString.test.d.ts +1 -0
  292. package/lib/utils/__tests__/queryString.test.js +60 -0
  293. package/lib/utils/__tests__/replaceVariables.test.d.ts +1 -0
  294. package/lib/utils/__tests__/replaceVariables.test.js +46 -0
  295. package/lib/utils/__tests__/simplifyAstStructure.test.d.ts +1 -0
  296. package/lib/utils/__tests__/simplifyAstStructure.test.js +26 -0
  297. package/lib/utils/__tests__/sort.test.d.ts +1 -0
  298. package/lib/utils/__tests__/sort.test.js +16 -0
  299. package/lib/utils/__tests__/string.test.d.ts +1 -0
  300. package/lib/utils/__tests__/string.test.js +16 -0
  301. package/lib/utils/__tests__/theme-helpers.test.d.ts +1 -0
  302. package/lib/utils/__tests__/theme-helpers.test.js +24 -0
  303. package/lib/utils/__tests__/url.test.d.ts +1 -0
  304. package/lib/utils/__tests__/url.test.js +134 -0
  305. package/lib/utils/path.d.ts +1 -1
  306. package/package.json +12 -12
  307. package/dist/redocly-openapi-docs.min.ai-chat-mappers-MY79QAeW.js +0 -1
  308. package/dist/redocly-openapi-docs.min.external-resolver-3KMJv7SC.js +0 -2
  309. package/dist/redocly-openapi-docs.min.index-BYVMr_la.js +0 -1
  310. package/dist/redocly-openapi-docs.min.index-CsqzTi3Z.js +0 -7586
  311. package/dist/redocly-openapi-docs.min.index-D8F7x0S6.js +0 -1
  312. package/dist/redocly-openapi-docs.min.index-qqKTpI_q.js +0 -1
  313. package/dist/redocly-openapi-docs.min.standalone-Ci6886Cr.js +0 -12114
  314. package/dist/redocly-openapi-docs.min.tauri-path-Bs1-AQjc.js +0 -1
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,16 @@
1
+ import { normalizePath } from '../path.js';
2
+ describe('path utils', () => {
3
+ test('normalizePath should return correct path', () => {
4
+ const expectedResult = '/test/path';
5
+ expect(normalizePath('test/path')).toBe(expectedResult);
6
+ expect(normalizePath('test/path/')).toBe(expectedResult);
7
+ expect(normalizePath('/test/path/')).toBe(expectedResult);
8
+ expect(normalizePath('/test/path')).toBe(expectedResult);
9
+ });
10
+ test('normalizePath should handle root path', () => {
11
+ const expectedResult = '/';
12
+ expect(normalizePath('/')).toBe(expectedResult);
13
+ expect(normalizePath('')).toBe(expectedResult);
14
+ });
15
+ });
16
+ //# sourceMappingURL=path.test.js.map
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,60 @@
1
+ import { queryString } from '../queryString.js';
2
+ describe('QueryString', () => {
3
+ describe('parse', () => {
4
+ it('should parse an empty query string', () => {
5
+ const result = queryString.parse('');
6
+ expect(result).toEqual({});
7
+ });
8
+ it('should parse a query string with a single key-value pair', () => {
9
+ const result = queryString.parse('?key=value');
10
+ expect(result).toEqual({ key: 'value' });
11
+ });
12
+ it('should parse a query string with multiple key-value pairs', () => {
13
+ const result = queryString.parse('key1=value1&key2=value2');
14
+ expect(result).toEqual({ key1: 'value1', key2: 'value2' });
15
+ });
16
+ it('should decode special characters in keys and values', () => {
17
+ const result = queryString.parse('?key%21=value%2B');
18
+ expect(result).toEqual({ 'key!': 'value+' });
19
+ });
20
+ it('should parse a matrix array value', () => {
21
+ const result = queryString.parse('key=value1&key=value2');
22
+ expect(result).toEqual({ key: ['value1', 'value2'] });
23
+ });
24
+ it('should parse an array value with comma separator', () => {
25
+ const result = queryString.parse('key=value1,value2,value3');
26
+ expect(result).toEqual({ key: ['value1', 'value2', 'value3'] });
27
+ });
28
+ it('should parse an array value with pipe separator', () => {
29
+ const result = queryString.parse('key=value1|value2');
30
+ expect(result).toEqual({ key: ['value1', 'value2'] });
31
+ });
32
+ });
33
+ describe('stringify', () => {
34
+ it('should stringify an empty object', () => {
35
+ const result = queryString.stringify({});
36
+ expect(result).toBe('');
37
+ });
38
+ it('should stringify a single key-value pair', () => {
39
+ const result = queryString.stringify({ key: 'value' });
40
+ expect(result).toBe('key=value');
41
+ });
42
+ it('should stringify multiple key-value pairs', () => {
43
+ const result = queryString.stringify({ key1: 'value1', key2: 'value2' });
44
+ expect(result).toBe('key1=value1&key2=value2');
45
+ });
46
+ it('should stringify an array value', () => {
47
+ const result = queryString.stringify({ key: ['value1', 'value2'] });
48
+ expect(result).toBe('key=value1&key=value2');
49
+ });
50
+ it('should sort key-value pairs if options.sort is true', () => {
51
+ const result = queryString.stringify({ key2: 'value2', key1: 'value1' }, { sort: true });
52
+ expect(result).toBe('key1=value1&key2=value2');
53
+ });
54
+ it('should not sort key-value pairs if options.sort is false', () => {
55
+ const result = queryString.stringify({ key2: 'value2', key1: 'value1' }, { sort: false });
56
+ expect(result).toBe('key2=value2&key1=value1');
57
+ });
58
+ });
59
+ });
60
+ //# sourceMappingURL=queryString.test.js.map
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,46 @@
1
+ import { replaceVariables } from '../replaceVariables.js';
2
+ describe('replaceVariables', () => {
3
+ test('should return the same URL when there are no variables', () => {
4
+ const server = {
5
+ url: 'https://api.example.com',
6
+ };
7
+ expect(replaceVariables(server)).toBe('https://api.example.com');
8
+ });
9
+ test('should replace variables in the URL with their default values', () => {
10
+ const server = {
11
+ url: 'https://api.example.com/{version}/endpoint',
12
+ variables: {
13
+ version: {
14
+ default: 'v1',
15
+ },
16
+ },
17
+ };
18
+ expect(replaceVariables(server)).toBe('https://api.example.com/v1/endpoint');
19
+ });
20
+ test('should replace multiple variables in the URL with their default values', () => {
21
+ const server = {
22
+ url: 'https://api.example.com/{version}/{resource}',
23
+ variables: {
24
+ version: {
25
+ default: 'v1',
26
+ },
27
+ resource: {
28
+ default: 'users',
29
+ },
30
+ },
31
+ };
32
+ expect(replaceVariables(server)).toBe('https://api.example.com/v1/users');
33
+ });
34
+ test('should handle multiple occurrences of the same variable in the URL', () => {
35
+ const server = {
36
+ url: 'https://api.example.com/{version}/endpoint/{version}',
37
+ variables: {
38
+ version: {
39
+ default: 'v1',
40
+ },
41
+ },
42
+ };
43
+ expect(replaceVariables(server)).toBe('https://api.example.com/v1/endpoint/v1');
44
+ });
45
+ });
46
+ //# sourceMappingURL=replaceVariables.test.js.map
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,26 @@
1
+ import { Node } from '@markdoc/markdoc';
2
+ import { simplifyAstStructure } from '../simplifyAstStructure.js';
3
+ describe('simplifyAstStructure', () => {
4
+ it('should remove location from AST nodes', () => {
5
+ const mockAst = new Node('document', {}, [
6
+ new Node('paragraph', {}, [new Node('text', { content: 'Hello world' })]),
7
+ ]);
8
+ const result = simplifyAstStructure(mockAst);
9
+ expect(result.location).toBeUndefined();
10
+ expect(result[0].location).toBeUndefined();
11
+ expect(result[0].children[0].location).toBeUndefined();
12
+ expect(result).toMatchSnapshot();
13
+ });
14
+ it('should handle empty AST', () => {
15
+ const mockAst = new Node('document', {}, []);
16
+ const result = simplifyAstStructure(mockAst);
17
+ expect(result.location).toBeUndefined();
18
+ expect(result).toMatchSnapshot();
19
+ });
20
+ it('should return full AST when not a document node type', () => {
21
+ const mockAst = new Node('text', { content: 'Some text' });
22
+ const result = simplifyAstStructure(mockAst);
23
+ expect(result).toMatchSnapshot();
24
+ });
25
+ });
26
+ //# sourceMappingURL=simplifyAstStructure.test.js.map
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,16 @@
1
+ import { alphabeticallyByProp } from '../sort.js';
2
+ describe('alphabeticallyByProp', () => {
3
+ test('should sort objects by property in ascending order', () => {
4
+ const testData = [{ name: 'Charlie' }, { name: 'Alice' }, { name: 'Bob' }, { name: 'David' }];
5
+ const comparator = alphabeticallyByProp('name');
6
+ const sorted = [...testData].sort(comparator);
7
+ expect(sorted.map((item) => item.name)).toEqual(['Alice', 'Bob', 'Charlie', 'David']);
8
+ });
9
+ test('should sort objects by property in descending order when property starts with dash', () => {
10
+ const testData = [{ name: 'Charlie' }, { name: 'Alice' }, { name: 'Bob' }, { name: 'David' }];
11
+ const comparator = alphabeticallyByProp('-name');
12
+ const sorted = [...testData].sort(comparator);
13
+ expect(sorted.map((item) => item.name)).toEqual(['David', 'Charlie', 'Bob', 'Alice']);
14
+ });
15
+ });
16
+ //# sourceMappingURL=sort.test.js.map
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,16 @@
1
+ import slugify from 'slugify';
2
+ import { strikethroughText, safeSlugify } from '../string.js';
3
+ describe('string utils', () => {
4
+ it('strikethroughText', () => {
5
+ expect(strikethroughText('text')).toEqual('t̵e̵x̵t̵');
6
+ });
7
+ test('slugifyIfAvailable returns original value when cannot slugify the value', () => {
8
+ const willBeSlugifed = safeSlugify('some string');
9
+ expect(willBeSlugifed).toEqual('some-string');
10
+ const cannotBeSlugified = '가나다라 마바사';
11
+ // if slugify() fixes this issue, safeSlugify should be removed and replaced with original one.
12
+ expect(slugify(cannotBeSlugified)).toEqual('');
13
+ expect(safeSlugify(cannotBeSlugified)).toEqual('가나다라-마바사');
14
+ });
15
+ });
16
+ //# sourceMappingURL=string.test.js.map
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,24 @@
1
+ import { getTypographyCssRulesByComponentName } from '../theme-helpers.js';
2
+ describe('getTypographyCssRulesByComponentName', () => {
3
+ it('should return object with defined css variable for component', () => {
4
+ expect(getTypographyCssRulesByComponentName('component')).toEqual({
5
+ fontSize: 'var(--component-font-size)',
6
+ fontWeight: 'var(--component-font-weight)',
7
+ fontFamily: 'var(--component-font-family)',
8
+ lineHeight: 'var(--component-line-height)',
9
+ color: 'var(--component-text-color)',
10
+ textTransform: 'var(--component-text-transform)',
11
+ });
12
+ });
13
+ it('should return object with fallback', () => {
14
+ expect(getTypographyCssRulesByComponentName('component', 'component1')).toEqual({
15
+ fontSize: 'var(--component-font-size,var(--component1-font-size))',
16
+ fontWeight: 'var(--component-font-weight,var(--component1-font-weight))',
17
+ fontFamily: 'var(--component-font-family,var(--component1-font-family))',
18
+ lineHeight: 'var(--component-line-height,var(--component1-line-height))',
19
+ color: 'var(--component-text-color,var(--component1-text-color))',
20
+ textTransform: 'var(--component-text-transform,var(--component1-text-transform))',
21
+ });
22
+ });
23
+ });
24
+ //# sourceMappingURL=theme-helpers.test.js.map
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,134 @@
1
+ import { urlParse, getUrlDirname } from '../url.js';
2
+ describe('url utils', () => {
3
+ const originalConsoleError = console.error;
4
+ beforeEach(() => {
5
+ console.error = vi.fn();
6
+ });
7
+ afterEach(() => {
8
+ console.error = originalConsoleError;
9
+ });
10
+ describe('urlParse', () => {
11
+ it('should parse valid URLs', () => {
12
+ const result = urlParse('https://example.com/path');
13
+ expect(result).toBeInstanceOf(URL);
14
+ expect(result?.href).toBe('https://example.com/path');
15
+ });
16
+ it('should parse URLs with query parameters', () => {
17
+ const result = urlParse('https://api.example.com/v1/users?id=123&name=test');
18
+ expect(result).toBeInstanceOf(URL);
19
+ expect(result?.searchParams.get('id')).toBe('123');
20
+ expect(result?.searchParams.get('name')).toBe('test');
21
+ });
22
+ it('should parse URLs with fragments', () => {
23
+ const result = urlParse('https://example.com/page#section1');
24
+ expect(result).toBeInstanceOf(URL);
25
+ expect(result?.hash).toBe('#section1');
26
+ });
27
+ it('should handle slashesDenoteHost parameter when true', () => {
28
+ const result = urlParse('//example.com/api', true);
29
+ expect(result).toBeInstanceOf(URL);
30
+ expect(result?.hostname).toBe('example.com');
31
+ expect(result?.pathname).toBe('/api');
32
+ });
33
+ it('should handle URLs with ports', () => {
34
+ const result = urlParse('https://example.com:8080/api');
35
+ expect(result).toBeInstanceOf(URL);
36
+ expect(result?.port).toBe('8080');
37
+ });
38
+ it('should handle URLs with authentication', () => {
39
+ const result = urlParse('https://user:pass@example.com/api');
40
+ expect(result).toBeInstanceOf(URL);
41
+ expect(result?.username).toBe('user');
42
+ expect(result?.password).toBe('pass');
43
+ });
44
+ it('should return null for invalid URLs', () => {
45
+ const result = urlParse('not-a-valid-url');
46
+ expect(result).toBeNull();
47
+ });
48
+ it('should return null for empty string', () => {
49
+ const result = urlParse('');
50
+ expect(result).toBeNull();
51
+ });
52
+ it('should return null for malformed URLs', () => {
53
+ const result = urlParse('http://');
54
+ expect(result).toBeNull();
55
+ });
56
+ it('should handle URLs with special characters', () => {
57
+ const result = urlParse('https://example.com/path with spaces');
58
+ expect(result).toBeInstanceOf(URL);
59
+ expect(result?.pathname).toBe('/path%20with%20spaces');
60
+ });
61
+ it('should handle URLs with unicode characters', () => {
62
+ const result = urlParse('https://example.com/测试');
63
+ expect(result).toBeInstanceOf(URL);
64
+ expect(result?.pathname).toBe('/%E6%B5%8B%E8%AF%95');
65
+ });
66
+ });
67
+ describe('getUrlDirname', () => {
68
+ it('should return directory path for URLs ending with slash', () => {
69
+ const result = getUrlDirname('https://example.com/api/');
70
+ expect(result).toBe('https://example.com/api/');
71
+ });
72
+ it('should return directory path for URLs not ending with slash', () => {
73
+ const result = getUrlDirname('https://example.com/api/users');
74
+ expect(result).toBe('https://example.com/api/');
75
+ });
76
+ it('should return root path for URLs with no path segments', () => {
77
+ const result = getUrlDirname('https://example.com');
78
+ expect(result).toBe('https://example.com/');
79
+ });
80
+ it('should return root path for URLs with single path segment', () => {
81
+ const result = getUrlDirname('https://example.com/api');
82
+ expect(result).toBe('https://example.com/');
83
+ });
84
+ it('should handle URLs with query parameters', () => {
85
+ const result = getUrlDirname('https://example.com/api/users?id=123');
86
+ expect(result).toBe('https://example.com/api/');
87
+ });
88
+ it('should handle URLs with fragments', () => {
89
+ const result = getUrlDirname('https://example.com/api/users#section');
90
+ expect(result).toBe('https://example.com/api/');
91
+ });
92
+ it('should handle URLs with ports', () => {
93
+ const result = getUrlDirname('https://example.com:8080/api/users');
94
+ expect(result).toBe('https://example.com:8080/api/');
95
+ });
96
+ it('should handle URLs with multiple consecutive slashes', () => {
97
+ const result = getUrlDirname('https://example.com/api//users');
98
+ expect(result).toBe('https://example.com/api//');
99
+ });
100
+ it('should handle URLs with trailing slashes in path', () => {
101
+ const result = getUrlDirname('https://example.com/api/users/');
102
+ expect(result).toBe('https://example.com/api/users/');
103
+ });
104
+ it('should return undefined for invalid URLs', () => {
105
+ const result = getUrlDirname('not-a-valid-url');
106
+ expect(result).toBeUndefined();
107
+ });
108
+ it('should return undefined for empty string', () => {
109
+ const result = getUrlDirname('');
110
+ expect(result).toBeUndefined();
111
+ });
112
+ it('should handle URLs with special characters in path', () => {
113
+ const result = getUrlDirname('https://example.com/api/users with spaces');
114
+ expect(result).toBe('https://example.com/api/');
115
+ });
116
+ it('should handle URLs with unicode characters in path', () => {
117
+ const result = getUrlDirname('https://example.com/api/测试/users');
118
+ expect(result).toBe('https://example.com/api/%E6%B5%8B%E8%AF%95/');
119
+ });
120
+ it('should return undefined for relative URLs', () => {
121
+ const result = getUrlDirname('/api/users/profile');
122
+ expect(result).toBeUndefined();
123
+ });
124
+ it('should return undefined for relative URLs with single segment', () => {
125
+ const result = getUrlDirname('/api');
126
+ expect(result).toBeUndefined();
127
+ });
128
+ it('should return undefined for relative URLs ending with slash', () => {
129
+ const result = getUrlDirname('/api/users/');
130
+ expect(result).toBeUndefined();
131
+ });
132
+ });
133
+ });
134
+ //# sourceMappingURL=url.test.js.map
@@ -1,4 +1,4 @@
1
- import type { Location } from 'react-router-dom';
1
+ import type { Location } from 'react-router';
2
2
  export declare function pathIncludesLink(location: Location, link?: string): boolean;
3
3
  export declare function pathMatchedLink(location: Location, link?: string): boolean;
4
4
  export declare function normalizePath(path: string): string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@redocly/openapi-docs",
3
- "version": "3.24.0-next.9",
3
+ "version": "3.24.1",
4
4
  "description": "Redocly OpenAPI Docs",
5
5
  "type": "module",
6
6
  "main": "lib/index.js",
@@ -15,23 +15,23 @@
15
15
  },
16
16
  "peerDependencies": {
17
17
  "@redocly/theme": ">=0.68.0-next.0",
18
- "react": "^19.2.4",
19
- "react-dom": "^19.2.4",
18
+ "react": "^19.2.7",
19
+ "react-dom": "^19.2.7",
20
20
  "styled-components": "^4.1.1 || ^5.3.11 || ^6.0.0"
21
21
  },
22
22
  "dependencies": {
23
23
  "@babel/core": "7.29.7",
24
24
  "@markdoc/markdoc": "0.5.2",
25
- "@redocly/openapi-core": "2.44.2",
25
+ "@redocly/openapi-core": "2.45.0",
26
26
  "deepmerge": "^4.2.2",
27
- "dompurify": "3.4.12",
27
+ "dompurify": "3.4.13",
28
28
  "fast-deep-equal": "^3.1.3",
29
29
  "fast-xml-parser": "5.7.3",
30
30
  "jotai": "^2.12.5",
31
31
  "jotai-family": "1.0.1",
32
32
  "json-pointer": "^0.6.2",
33
33
  "openapi-sampler": "^1.7.2",
34
- "react-router-dom": "^7.18.1",
34
+ "react-router": "^8.3.0",
35
35
  "slugify": "^1.4.7",
36
36
  "stringify-object": "^3.3.0",
37
37
  "styled-components": "^6.4.2",
@@ -39,9 +39,9 @@
39
39
  "url-template": "^2.0.8",
40
40
  "util": "~0.12.5",
41
41
  "web-vitals": "3.3.1",
42
- "@redocly/config": "0.53.1",
43
42
  "@redocly/redoc-opentelemetry": "0.2.2",
44
- "@redocly/replay": "0.27.0-next.8"
43
+ "@redocly/config": "0.53.1",
44
+ "@redocly/replay": "0.27.1"
45
45
  },
46
46
  "devDependencies": {
47
47
  "@shikijs/transformers": "3.21.0",
@@ -57,12 +57,12 @@
57
57
  "@vitest/coverage-v8": "4.1.10",
58
58
  "esbuild": "0.28.1",
59
59
  "jest-styled-components": "7.2.0",
60
- "js-yaml": "4.3.0",
60
+ "js-yaml": "4.3.1",
61
61
  "json-schema": "0.4.0",
62
62
  "outdent": "0.8.0",
63
63
  "path-browserify": "1.0.1",
64
- "react": "^19.2.4",
65
- "react-dom": "^19.2.4",
64
+ "react": "^19.2.7",
65
+ "react-dom": "^19.2.7",
66
66
  "rimraf": "5.0.7",
67
67
  "rollup-plugin-bundle-stats": "^4.22.1",
68
68
  "shiki": "3.21.0",
@@ -71,7 +71,7 @@
71
71
  "url": "~0.11.0",
72
72
  "vite": "7.3.6",
73
73
  "vitest": "4.1.10",
74
- "@redocly/theme": "0.68.0-next.6"
74
+ "@redocly/theme": "0.68.1"
75
75
  },
76
76
  "scripts": {
77
77
  "start": "pnpm run copy-highlight-hook && vite",
@@ -1 +0,0 @@
1
- import{V as i}from"./redocly-openapi-docs.min.standalone-Ci6886Cr.js";import{R as u,U as n}from"./redocly-openapi-docs.min.index-CsqzTi3Z.js";function m(){return`aichat_${i()}`}function l(){return`aimsg_${i()}`}function c(){return`aimpt_${i()}`}function f(t){return{id:t.id,title:t.title??void 0,modelConfig:t.modelConfig,messages:t.messages.map(p),createdAt:new Date(t.createdAt),updatedAt:new Date(t.updatedAt)}}function p(t){return{id:t.uiId,role:t.role,metadata:t.metadata,parts:t.parts.map(g)}}function g(t){return t.self}function I(t){const a=t.id;return{id:a,title:t.title,modelConfig:t.modelConfig,messages:t.messages.map((e,r)=>d(a,r,e))}}function d(t,a,e,r=l()){return{id:r,uiId:e.id,role:e.role,metadata:e.metadata,aiChatId:t,indexWithinInsertBatch:a,parts:e.parts.map((o,s)=>C(r,s,o))}}function C(t,a,e){return{id:c(),text:e.type==="text"?e.text:null,index:a,self:e,aiMessageId:t}}function h(t){return{id:t.id,title:t.title,modelConfig:v(t.model),messages:t.messages.map(x)}}function v(t){switch(t.provider){case n.OPENAI:case n.ANTHROPIC:case n.GEMINI:return{provider:t.provider,modelId:t.modelId};case u:return{provider:t.provider,baseUrl:t.baseUrl};default:throw new Error("Cannot create model config")}}function x(t){return{...t,parts:t.parts.filter(a=>a.type!=="file")}}export{I as a,h as b,f as c,d,m as g};
@@ -1,2 +0,0 @@
1
- import{aL as s,a7 as n,aM as i,aN as c,aO as l}from"./redocly-openapi-docs.min.index-CsqzTi3Z.js";import{aL as f,as as o,bo as d,b6 as r}from"./redocly-openapi-docs.min.standalone-Ci6886Cr.js";class w extends f{constructor(){super()}resolveExternalRef(e,a){return s(a)?a:e&&s(e)?new URL(a,e).href:e?o.resolve(o.dirname(e),a):a}async loadExternalRef(e){if(s(e)){const{body:a,mimeType:t}=await d(e,{...this.config.http,customFetch:n});return new r(e,a,t)}else{if(!await i(e))throw new Error(`File not found at ${e}.`);try{throw await c(e),new Error(`Expected a file but received a folder at ${e}.`)}catch(t){if(t instanceof Error&&t.message.includes("Expected a file but received a folder"))throw t}const a=await l(e);return new r(e,a.replace(/\r\n/g,`
2
- `))}}}export{w as ExternalResolver};
@@ -1 +0,0 @@
1
- import{aF as T,x as m,aG as v,aH as O,aI as I,aJ as w,aK as A,aL as h,aM as x,aN as b,aO as V}from"./redocly-openapi-docs.min.standalone-Ci6886Cr.js";import{aP as M,aQ as B,aR as q,aS as J,aT as Y,aU as W,aV as H,aW as K,aX as Q,aY as X,aZ as Z,a_ as ee,a$ as se,b0 as ae,b1 as te,b2 as re,b3 as ne,b4 as oe,b5 as ie,b6 as le,b7 as ce,b8 as me,b9 as ue,ba as pe,bb as ye,bc as fe,bd as de,be as ge,bf as he,bg as ve,bh as be,bi as Ee,bj as Re,bk as Se,bl as Te,bm as Oe,bn as Ie,bo as we,bp as Ae,bq as xe,br as Ce,bs as Pe,bt as De}from"./redocly-openapi-docs.min.standalone-Ci6886Cr.js";import{g as C,t as P,A as je,c as E,l as R,S as ke,R as Ne,C as Fe}from"./redocly-openapi-docs.min.lint-C-zlwxhp.js";import{a as ze,b as _e,d as $e,e as Le,f as Ge,h as Ue,i as Ve,j as Me,k as Be,m as qe,n as Je,o as Ye,p as We,q as He,r as Ke,s as Qe,u as Xe,v as Ze,w as es,x as ss,y as as,z as ts,B as rs,s as ns,D as os}from"./redocly-openapi-docs.min.lint-C-zlwxhp.js";function is(e){return(T.extname(e)===".yaml"||T.extname(e)===".yml")&&!1}function ls(e){return m(e)&&!v(e)}async function cs(e){return new Promise(s=>setTimeout(s,e))}const S="type",D=["api-description","api-operation","data-schema"];function j(e,s){const{ctx:a}=C("EntityFileDefault",s),{ctx:t,discriminatorResolver:r}=C("EntityFile",e);return{entityTypes:{...a,...t,EntityFileArray:{properties:{},items:n=>{if(m(n)){const i=n[S];if(!i)return"Entity";const o=r?.(n,i);if(o&&typeof o=="string")return o}return"Entity"}}},discriminatorResolver:r}}const ms=e=>({ExternalDocs:{leave(){e.externalDocs.total++}},ref:{enter(s){e.refs.items.add(s.$ref)}},Tag:{leave(s){e.tags.items.add(s.name)}},Link:{leave(s){e.links.items.add(s.operationId)}},WebhooksMap:{Operation:{leave(s){if(e.webhooks.total++,s.tags)for(const a of s.tags)e.tags.items.add(a)}}},Paths:{PathItem:{leave(){e.pathItems.total++},Operation:{leave(s){if(e.operations.total++,s.tags)for(const a of s.tags)e.tags.items.add(a)}},Parameter:{leave(s){e.parameters.items.add(s.name)}}}},NamedSchemas:{Schema:{leave(){e.schemas.total++}}},Root:{leave(){e.parameters.total=e.parameters.items.size,e.refs.total=e.refs.items.size,e.links.total=e.links.items.size,e.tags.total=e.tags.items.size}}}),us=e=>({ExternalDocs:{leave(){e.externalDocs.total++}},ref:{enter(s){e.refs.items.add(s.$ref)}},Tag:{leave(s){e.tags.items.add(s.name)}},ChannelMap:{Channel:{leave(){e.channels.total++},Operation:{leave(s){if(e.operations.total++,s.tags)for(const a of s.tags)e.tags.items.add(a)}},Parameter:{leave(s){s.name&&e.parameters.items.add(s.name)}}}},NamedSchemas:{Schema:{leave(){e.schemas.total++}}},Root:{leave(){e.parameters.total=e.parameters.items.size,e.refs.total=e.refs.items.size,e.tags.total=e.tags.items.size}}}),ps=e=>({ExternalDocs:{leave(){e.externalDocs.total++}},ref:{enter(s){e.refs.items.add(s.$ref)}},Tag:{leave(s){e.tags.items.add(s.name)}},NamedChannels:{Channel:{leave(){e.channels.total++},Parameter:{leave(s){s.name&&e.parameters.items.add(s.name)}}}},NamedOperations:{Operation:{leave(s){if(e.operations.total++,s.tags)for(const a of s.tags)e.tags.items.add(a)}}},NamedSchemas:{Schema:{leave(){e.schemas.total++}}},Root:{leave(){e.parameters.total=e.parameters.items.size,e.refs.total=e.refs.items.size,e.tags.total=e.tags.items.size}}}),ys=/^[a-z0-9]+(?:-[a-z0-9]+)*$/,k=2,N=150,fs=()=>({any(e,{report:s,location:a}){if(m(e)&&"key"in e){const t=e.key;if(typeof t!="string"){s({message:"Entity `key` must be a string.",location:a.child(["key"])});return}t.length<k&&s({message:`Entity 'key' must be at least ${k} characters long.`,location:a.child(["key"])}),t.length>N&&s({message:`Entity 'key' must not exceed ${N} characters.`,location:a.child(["key"])}),ys.test(t)||s({message:"Entity `key` must contain only lowercase letters, numbers, and hyphens, and cannot start or end with a hyphen.",location:a.child(["key"])})}}});function F(e,s){const a=s.split("-").map(t=>t.charAt(0).toUpperCase()+t.slice(1)).join("")+e;return Object.values(P).includes(a)?a:e}function ds(e,s){const a={};for(const[t,r]of Object.entries(s))if(z(t,r)){if(r.severity==="off")continue;a[t]={...bs(e,t,r)}}else a[t]=r;return a}function gs(e){const s={},a={};for(const[t,r]of Object.entries(e))if(z(t,r)){const n=r;vs(n)?s[t]=n:a[t]=n}else a[t]=r;return{entityRules:s,apiRules:a}}function hs(e,s,a){if(!m(a.parsed)||!m(a.parsed.components))return null;const t=a.parsed.components,r="schemas"in t?t.schemas:void 0;if(!r||!(e in r))return null;const n=r[e];try{const i=JSON.parse(s);if(O(n,i))return n}catch{return null}return null}function z(e,s){return e.startsWith("rule/")&&m(s)}function vs(e){return Object.values(P).some(s=>e.subject.type===s)}function bs(e,s,a){const t=F(a.subject.type,e),r=a.where?.map(n=>({...n,subject:{...n.subject,type:F(n.subject.type,e)}}));return{assertionId:s,subject:{...a.subject,type:t},assertions:a.assertions,...r&&{where:r},...a.message&&{message:a.message},...a.severity&&{severity:a.severity}}}async function _(e){const{document:s,entitySchema:a,entityDefaultSchema:t,severity:r,externalRefResolver:n=new h,assertionConfig:i={}}=e,o={problems:[],specVersion:"entity",visitorsData:{}},{entityTypes:u,discriminatorResolver:p}=j(a,t),l=I(u);let c=l.Entity;if(Array.isArray(s.parsed))c=l.EntityFileArray;else if(m(s.parsed)){const d=s.parsed[S];if(!d)c=l.Entity;else{const g=p?.(s.parsed,d);g&&typeof g=="string"&&l[g]&&(c=l[g])}}const y=je(i),f=Array.isArray(y)?y.map(d=>({severity:r||"error",ruleId:"entity assertions",visitor:d})):[{severity:r||"error",ruleId:"entity assertions",visitor:y}],L=[{severity:r||"error",ruleId:"entity struct",visitor:ke()},{severity:r||"error",ruleId:"entity no-unresolved-refs",visitor:V()},{severity:r||"error",ruleId:"entity key-valid",visitor:fs()},...f],G=w(L,l),U=await A({rootDocument:s,rootType:c,externalRefResolver:n});return x({document:s,rootType:c,normalizedVisitors:G,resolvedRefMap:U,ctx:o}),o.problems}async function Es(e,s,a){if(!s.rules)throw new Error(`Scorecard level "${s.name}" has no rules defined.`);const t=new h,r=b(JSON.stringify(e,null,2),"entity"),n=r.parsed[S],i=ds(n||"unknown",s.rules),{entityRules:o,apiRules:u}=gs(i),p=await _({document:r,entitySchema:Fe,entityDefaultSchema:Ne,externalRefResolver:t,assertionConfig:o});if(D.includes(e.type)){if(Object.keys(u).length===0)return p;if(!a)throw new Error(`Document is required for entity type "${e.type}". Provide the source API document to lint API rules.`);if(e.type==="data-schema"&&e.metadata?.schema){Object.values(u).forEach(f=>{if(m(f)&&m(f.subject)&&f.subject.type!=="Schema")throw new Error(`API rules for "data-schema" entity must target Schema subject, but found "${f.subject.type}".`)});const c=hs(e.title,e.metadata.schema,a);if(!c)throw new Error(`Schema "${e.title}" not found in the document. Ensure the schema exists in components.schemas.`);const y=await $({schema:c,schemaKey:e.title,config:await E({rules:u}),specType:e.metadata.specType,sourceDocument:a,externalRefResolver:t});return[...p,...y]}const l=await R({document:a,externalRefResolver:t,config:await E({rules:u})});return[...p,...l]}else if(!v(u))throw new Error(`API rules are not supported for entity type "${e.type}". Only ${D.join(", ")} support API rules.`);return p}async function $(e){const{schema:s,schemaKey:a,config:t,sourceDocument:r,specType:n,externalRefResolver:i=new h(t.resolve)}=e,o=r.parsed,u=o[n],p=o.info,l=b(JSON.stringify({[n]:u,info:p,components:{schemas:{[a]:s}}},null,2),r?.source.absoluteRef||`schema:${a}`);return(await R({document:l,config:t,externalRefResolver:i})).filter(c=>c.location.some(y=>y.pointer?.includes(`/components/schemas/${a}`)))}class Rs extends Error{}export{M as Arazzo1Types,B as Arazzo1_1Types,q as AsyncApi2Types,J as AsyncApi3Types,h as BaseResolver,Y as CONFIG_BUNDLER_VISITOR_ID,W as CONFIG_FILE_NAME,H as Config,ze as ConfigTypes,_e as ConfigValidationError,K as DEFAULT_CONFIG,Q as DEFAULT_PROJECT_PLUGIN_PATHS,Rs as HandledError,X as IGNORE_BANNER,Z as IGNORE_FILE,ee as Oas2Types,se as Oas3Types,ae as Oas3_1Types,te as Oas3_2Types,re as OpenRpcTypes,ne as Overlay1Types,oe as PLUGINS_COLLECTOR_VISITOR_ID,ie as ResolveError,le as Source,us as StatsAsync2,ps as StatsAsync3,ms as StatsOAS,ce as YamlParseError,$e as bundle,me as bundleDocument,Le as bundleFromString,Ge as clearPluginsCache,E as createConfig,Ue as createConfigTypes,j as createEntityTypes,O as dequal,ue as detectSpec,is as doesYamlFileExist,pe as escapePointerFragment,Ve as findConfig,Me as formatProblems,Be as getAstNodeByPointer,qe as getCodeframe,ye as getDir,Je as getLineColLocation,fe as getMajorSpecVersion,Ye as getPluginCacheVersion,We as getTotals,de as getTypes,ge as isAbsoluteUrl,he as isBrowser,v as isEmptyObject,ve as isGraphqlRef,be as isMappingRef,He as isNotEmptyArray,ls as isNotEmptyObject,m as isPlainObject,Ee as isRef,Re as isString,Se as isSupportedExtension,Te as isTruthy,Ke as keysOf,Qe as lint,Xe as lintConfig,R as lintDocument,_ as lintEntityFile,Es as lintEntityWithScorecardLevel,Ze as lintFromString,$ as lintSchema,es as loadConfig,ss as loadIgnoreConfig,as as logger,b as makeDocumentFromString,Oe as mapTypeToComponent,I as normalizeTypes,w as normalizeVisitors,Ie as parseYaml,cs as pause,ts as pluralize,we as readFileFromUrl,Ae as regexFromString,A as resolveDocument,xe as resolvePath,rs as resolvePlugins,Ce as slash,Pe as stringifyYaml,De as unescapePointerFragment,ns as validate,x as walkDocument,os as xmlEscape};