@redocly/api-docs 0.2.0-next.1 → 0.2.0-next.10

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 (302) hide show
  1. package/lib/RedocStandalone.d.ts +38 -0
  2. package/lib/RedocStandalone.js +1 -0
  3. package/lib/RedoclyApiDocs.js +1 -1
  4. package/lib/RedoclyApiDocsStandalone.d.ts +2 -0
  5. package/lib/RedoclyApiDocsStandalone.js +3 -3
  6. package/lib/adapters/asyncapi/build/navigation.js +1 -1
  7. package/lib/adapters/asyncapi/items/channel/content.js +1 -1
  8. package/lib/adapters/asyncapi/items/channel/item.js +1 -1
  9. package/lib/adapters/asyncapi/items/operation/item.js +1 -1
  10. package/lib/adapters/asyncapi/items/overview/content.js +1 -1
  11. package/lib/adapters/graphql/group/utils.js +1 -1
  12. package/lib/adapters/graphql/utils/createApiItem.js +1 -1
  13. package/lib/adapters/helpers.d.ts +3 -10
  14. package/lib/adapters/helpers.js +1 -1
  15. package/lib/adapters/openapi/build/context.js +1 -1
  16. package/lib/adapters/openapi/build-code-sample-source.d.ts +1 -1
  17. package/lib/adapters/openapi/build-code-sample-source.js +1 -1
  18. package/lib/adapters/openapi/configure/merge-utils.d.ts +1 -1
  19. package/lib/adapters/openapi/configure/resolve-request-values.js +1 -1
  20. package/lib/adapters/openapi/group/item.d.ts +0 -3
  21. package/lib/adapters/openapi/group/item.js +1 -1
  22. package/lib/adapters/openapi/index.js +1 -1
  23. package/lib/adapters/openapi/items/operation/content.js +1 -1
  24. package/lib/adapters/openapi/items/operation/item.d.ts +2 -2
  25. package/lib/adapters/openapi/items/operation/item.js +1 -1
  26. package/lib/adapters/openapi/items/overview/content.js +1 -1
  27. package/lib/adapters/openapi/items/schema/item.js +1 -1
  28. package/lib/adapters/openapi/store.js +1 -1
  29. package/lib/adapters/openapi/utils/merge-mock-server.d.ts +2 -2
  30. package/lib/adapters/rbac.d.ts +14 -0
  31. package/lib/adapters/rbac.js +1 -0
  32. package/lib/adapters/utils/descriptionToMarkdown.d.ts +6 -0
  33. package/lib/adapters/utils/descriptionToMarkdown.js +11 -0
  34. package/lib/adapters/utils/markdoc.d.ts +8 -1
  35. package/lib/adapters/utils/markdoc.js +1 -1
  36. package/lib/components/ErrorBoundary.d.ts +4 -2
  37. package/lib/components/ErrorBoundary.js +55 -1
  38. package/lib/components/Header/HeaderItem.js +5 -5
  39. package/lib/components/Header/HeaderPageActions.d.ts +4 -0
  40. package/lib/components/Header/HeaderPageActions.js +1 -0
  41. package/lib/components/Header/PageActions.d.ts +4 -0
  42. package/lib/components/Header/PageActions.js +11 -0
  43. package/lib/components/ItemContent/hooks.d.ts +12 -1
  44. package/lib/components/ItemContent/hooks.js +1 -1
  45. package/lib/components/ItemContent/sections/BodySection.js +3 -3
  46. package/lib/components/ItemContent/sections/CallbacksSection.js +4 -4
  47. package/lib/components/ItemContent/sections/MessagesSection.js +17 -17
  48. package/lib/components/ItemContent/sections/ResponsesSection.js +7 -7
  49. package/lib/components/Mcp/McpPrompt.js +1 -1
  50. package/lib/components/Mcp/McpTool.js +1 -1
  51. package/lib/components/Mcp/utils.d.ts +1 -1
  52. package/lib/components/Mcp/utils.js +1 -1
  53. package/lib/components/Schema/SchemaDescription.js +1 -1
  54. package/lib/components/Schema/styled.js +5 -5
  55. package/lib/components/Schema/views/ArrayRenderer.js +1 -1
  56. package/lib/components/Schema/views/CollapsibleNestedFields.js +1 -1
  57. package/lib/components/Schema/views/DiscriminatorPropertyRow.js +1 -1
  58. package/lib/components/Schema/views/Examples.js +1 -1
  59. package/lib/components/Schema/views/SwitcherRenderer.js +1 -1
  60. package/lib/components/Search/index.d.ts +15 -0
  61. package/lib/components/Search/index.js +1 -0
  62. package/lib/components/Security/SecurityFlowDetail.js +1 -1
  63. package/lib/components/Security/styled.js +7 -7
  64. package/lib/components/StickySidebar/FloatingButton.d.ts +1 -0
  65. package/lib/components/StickySidebar/FloatingButton.js +32 -0
  66. package/lib/components/StickySidebar/RedoclyAttributionLogo.d.ts +5 -0
  67. package/lib/components/StickySidebar/RedoclyAttributionLogo.js +1 -0
  68. package/lib/components/StickySidebar/StickySidebar.js +33 -9
  69. package/lib/components/common/Breadcrumbs.js +2 -2
  70. package/lib/components/common/DeepLinkAnchor.js +9 -9
  71. package/lib/components/common/PanelItem.js +5 -5
  72. package/lib/components/common/ResponseCodeTabs.js +1 -1
  73. package/lib/components/common/Tag.js +1 -1
  74. package/lib/components/common/VendorExtensions.js +1 -1
  75. package/lib/components/common/ViewNested.js +2 -2
  76. package/lib/components/graphql/GraphQLFieldView.js +1 -1
  77. package/lib/components/graphql/RequiresScopesModal.js +3 -3
  78. package/lib/components/graphql/sections/GraphQLArgsSection.js +1 -1
  79. package/lib/components/markdoc/SchemaDefinition.js +1 -1
  80. package/lib/components/markdoc/html/html-jsx-attribute-mapping.d.ts +5 -0
  81. package/lib/components/markdoc/html/html-jsx-attribute-mapping.js +1 -0
  82. package/lib/components/markdoc/html/process-html-tokens.d.ts +1 -0
  83. package/lib/components/markdoc/html/process-html-tokens.js +1 -0
  84. package/lib/components/markdoc/markdocParser.d.ts +2 -0
  85. package/lib/components/markdoc/markdocParser.js +1 -1
  86. package/lib/components/panels/ExampleItem/CallbackPayloadItem.js +2 -2
  87. package/lib/components/panels/ExampleItem/CodeSampleItem.js +1 -1
  88. package/lib/components/panels/ExampleItem/PayloadExampleItem.js +2 -2
  89. package/lib/components/panels/ExampleItem/ResponseExampleItem.js +1 -1
  90. package/lib/components/panels/ExampleItem/SecuritySchemeSelector.d.ts +9 -0
  91. package/lib/components/panels/ExampleItem/SecuritySchemeSelector.js +1 -0
  92. package/lib/components/panels/ExampleItem/ServerDropdown.js +2 -2
  93. package/lib/components/panels/ExampleItem/generate-request-sample.d.ts +28 -0
  94. package/lib/components/panels/ExampleItem/generate-request-sample.js +1 -0
  95. package/lib/components/panels/ExampleItem/selectors.d.ts +5 -2
  96. package/lib/components/panels/ExampleItem/selectors.js +1 -1
  97. package/lib/components/panels/ExampleItem/styled.d.ts +2 -49
  98. package/lib/components/panels/ExampleItem/styled.js +11 -5
  99. package/lib/components/panels/ExampleItem/useActiveServer.d.ts +17 -0
  100. package/lib/components/panels/ExampleItem/useActiveServer.js +1 -0
  101. package/lib/components/panels/ExampleItem/useCodeSampleLanguages.d.ts +23 -0
  102. package/lib/components/panels/ExampleItem/useCodeSampleLanguages.js +1 -0
  103. package/lib/components/panels/ExampleItem/useReplayRequestState.d.ts +18 -0
  104. package/lib/components/panels/ExampleItem/useReplayRequestState.js +1 -0
  105. package/lib/components/panels/ExampleItem/useTryItFooter.d.ts +3 -0
  106. package/lib/components/panels/ExampleItem/useTryItFooter.js +7 -0
  107. package/lib/components/panels/GroupPanelItem.js +1 -1
  108. package/lib/components/panels/LanguageItem/LanguagePanelItem.js +5 -1
  109. package/lib/components/panels/LanguageItem/styled.js +17 -14
  110. package/lib/components/panels/McpExamplePanelItem.js +2 -2
  111. package/lib/components/panels/McpPanelItem.js +2 -2
  112. package/lib/components/panels/ServerItem/ServerItem.js +1 -1
  113. package/lib/components/panels/asyncapi/BrokerItem/BrokerModal.js +1 -1
  114. package/lib/components/panels/asyncapi/BrokerItem/BrokerPanelItem.js +1 -1
  115. package/lib/components/panels/asyncapi/MessageBindingItem/MessageBindingItem.js +1 -1
  116. package/lib/components/panels/shared-panel-styles.js +1 -1
  117. package/lib/components/panels/styled.js +1 -1
  118. package/lib/components/pluggable/RedocExample.js +5 -2
  119. package/lib/components/pluggable/RedocResponseSamples.js +1 -1
  120. package/lib/hoc/withLicenseGate.d.ts +5 -0
  121. package/lib/hoc/withLicenseGate.js +1 -0
  122. package/lib/hoc/withRouter.js +1 -1
  123. package/lib/hoc/withStoreProvider.d.ts +2 -0
  124. package/lib/hoc/withStoreProvider.js +1 -1
  125. package/lib/hooks/deepLinkHash.d.ts +5 -0
  126. package/lib/hooks/deepLinkHash.js +1 -0
  127. package/lib/hooks/useApiDocsScroll.js +1 -1
  128. package/lib/hooks/useCopySpecSlice.d.ts +9 -0
  129. package/lib/hooks/useCopySpecSlice.js +1 -0
  130. package/lib/hooks/useDeepLinkSection.js +1 -1
  131. package/lib/hooks/useInitialTelemetry.d.ts +2 -0
  132. package/lib/hooks/useInitialTelemetry.js +1 -0
  133. package/lib/hooks/useLicense.js +1 -1
  134. package/lib/hooks/useLicenseGate.d.ts +6 -0
  135. package/lib/hooks/useLicenseGate.js +1 -0
  136. package/lib/hooks/useRouterHashBridge.d.ts +4 -0
  137. package/lib/hooks/useRouterHashBridge.js +1 -1
  138. package/lib/hooks/useScrollSpyUrlSync.js +1 -1
  139. package/lib/hooks/useUrlHash.d.ts +3 -2
  140. package/lib/hooks/useUrlHash.js +1 -1
  141. package/lib/hooks/useUrlHashReassert.d.ts +2 -0
  142. package/lib/hooks/useUrlHashReassert.js +1 -0
  143. package/lib/index.d.ts +5 -1
  144. package/lib/index.js +1 -1
  145. package/lib/jotai/app.d.ts +6 -0
  146. package/lib/jotai/app.js +1 -1
  147. package/lib/jotai/examples.js +1 -1
  148. package/lib/jotai/itemStore.d.ts +1 -0
  149. package/lib/jotai/itemStore.js +1 -1
  150. package/lib/jotai/store.d.ts +4 -0
  151. package/lib/jotai/store.js +1 -1
  152. package/lib/options/editionOverrides.d.ts +3 -0
  153. package/lib/options/editionOverrides.js +1 -0
  154. package/lib/options/helpers.d.ts +1 -2
  155. package/lib/options/helpers.js +1 -1
  156. package/lib/options/normalizeOptions.d.ts +1 -1
  157. package/lib/options/normalizeOptions.js +1 -1
  158. package/lib/options/standaloneLayoutVars.d.ts +3 -0
  159. package/lib/options/standaloneLayoutVars.js +1 -0
  160. package/lib/otel-semantic-conventions.d.ts +10 -0
  161. package/lib/otel-semantic-conventions.js +1 -0
  162. package/lib/pages/ItemPage.js +4 -2
  163. package/lib/pages/NotFoundPage.js +40 -1
  164. package/lib/services/code-samples/apply-env-variables.d.ts +8 -0
  165. package/lib/services/code-samples/apply-env-variables.js +1 -0
  166. package/lib/services/code-samples/builder.d.ts +8 -5
  167. package/lib/services/code-samples/builder.js +1 -1
  168. package/lib/services/code-samples/discriminator.d.ts +16 -10
  169. package/lib/services/code-samples/discriminator.js +1 -1
  170. package/lib/services/code-samples/generators/java8.js +2 -2
  171. package/lib/services/code-samples/language-availability.d.ts +4 -0
  172. package/lib/services/code-samples/language-availability.js +1 -0
  173. package/lib/services/code-samples/{replay/normalize-servers.d.ts → normalize-servers.d.ts} +1 -1
  174. package/lib/services/code-samples/normalize-servers.js +1 -0
  175. package/lib/services/code-samples/replay/embedded-replay-converter.d.ts +1 -1
  176. package/lib/services/code-samples/replay/embedded-replay-converter.js +1 -1
  177. package/lib/services/code-samples/replay/find-operation.d.ts +17 -0
  178. package/lib/services/code-samples/replay/find-operation.js +1 -0
  179. package/lib/services/code-samples/replay/from-openapi-document.d.ts +12 -2
  180. package/lib/services/code-samples/replay/from-openapi-document.js +1 -1
  181. package/lib/services/code-samples/replay/index.d.ts +1 -1
  182. package/lib/services/code-samples/replay/index.js +1 -1
  183. package/lib/services/code-samples/replay/overlay-converter.js +1 -1
  184. package/lib/services/code-samples/replay/parameter-descriptions.d.ts +7 -0
  185. package/lib/services/code-samples/replay/parameter-descriptions.js +1 -0
  186. package/lib/services/code-samples/replay/replay-adapter.d.ts +1 -1
  187. package/lib/services/code-samples/replay/replay-adapter.js +1 -1
  188. package/lib/services/code-samples/replay/replay-handler.js +1 -1
  189. package/lib/services/code-samples/replay/replay-predefined-env.d.ts +1 -2
  190. package/lib/services/code-samples/replay/replay-predefined-env.js +1 -1
  191. package/lib/services/code-samples/replay/schema-declared-value.d.ts +2 -0
  192. package/lib/services/code-samples/replay/schema-declared-value.js +1 -0
  193. package/lib/services/code-samples/resolvers.js +1 -1
  194. package/lib/services/code-samples/server-env.d.ts +3 -0
  195. package/lib/services/code-samples/server-env.js +1 -0
  196. package/lib/services/code-samples/source.d.ts +3 -3
  197. package/lib/services/license/check.d.ts +1 -0
  198. package/lib/services/license/check.js +1 -1
  199. package/lib/services/operation-samples/index.js +1 -1
  200. package/lib/services/schema/dialects/jsonSchema.d.ts +5 -1
  201. package/lib/services/schema/dialects/jsonSchema.js +1 -1
  202. package/lib/services/schema/propertyTreeBuilder.js +1 -1
  203. package/lib/services/search/index.d.ts +2 -0
  204. package/lib/services/search/index.js +1 -0
  205. package/lib/services/search/indexer/context.d.ts +8 -0
  206. package/lib/services/search/indexer/context.js +0 -0
  207. package/lib/services/search/indexer/deep-links.d.ts +12 -0
  208. package/lib/services/search/indexer/deep-links.js +1 -0
  209. package/lib/services/search/indexer/extractors/asyncapi.d.ts +8 -0
  210. package/lib/services/search/indexer/extractors/asyncapi.js +1 -0
  211. package/lib/services/search/indexer/extractors/body.d.ts +2 -0
  212. package/lib/services/search/indexer/extractors/body.js +1 -0
  213. package/lib/services/search/indexer/extractors/callbacks.d.ts +4 -0
  214. package/lib/services/search/indexer/extractors/callbacks.js +1 -0
  215. package/lib/services/search/indexer/extractors/context.d.ts +25 -0
  216. package/lib/services/search/indexer/extractors/context.js +1 -0
  217. package/lib/services/search/indexer/extractors/examples.d.ts +3 -0
  218. package/lib/services/search/indexer/extractors/examples.js +1 -0
  219. package/lib/services/search/indexer/extractors/graphql.d.ts +2 -0
  220. package/lib/services/search/indexer/extractors/graphql.js +1 -0
  221. package/lib/services/search/indexer/extractors/heading-sections.d.ts +3 -0
  222. package/lib/services/search/indexer/extractors/heading-sections.js +1 -0
  223. package/lib/services/search/indexer/extractors/index.d.ts +12 -0
  224. package/lib/services/search/indexer/extractors/index.js +1 -0
  225. package/lib/services/search/indexer/extractors/mcp.d.ts +9 -0
  226. package/lib/services/search/indexer/extractors/mcp.js +1 -0
  227. package/lib/services/search/indexer/extractors/named-rows.d.ts +9 -0
  228. package/lib/services/search/indexer/extractors/named-rows.js +1 -0
  229. package/lib/services/search/indexer/extractors/panels.d.ts +10 -0
  230. package/lib/services/search/indexer/extractors/panels.js +1 -0
  231. package/lib/services/search/indexer/extractors/parameters.d.ts +2 -0
  232. package/lib/services/search/indexer/extractors/parameters.js +1 -0
  233. package/lib/services/search/indexer/extractors/responses.d.ts +2 -0
  234. package/lib/services/search/indexer/extractors/responses.js +1 -0
  235. package/lib/services/search/indexer/extractors/schema-page.d.ts +9 -0
  236. package/lib/services/search/indexer/extractors/schema-page.js +1 -0
  237. package/lib/services/search/indexer/extractors/security.d.ts +4 -0
  238. package/lib/services/search/indexer/extractors/security.js +1 -0
  239. package/lib/services/search/indexer/index.d.ts +14 -0
  240. package/lib/services/search/indexer/index.js +1 -0
  241. package/lib/services/search/indexer/param.d.ts +7 -0
  242. package/lib/services/search/indexer/param.js +1 -0
  243. package/lib/services/search/indexer/places.d.ts +40 -0
  244. package/lib/services/search/indexer/places.js +1 -0
  245. package/lib/services/search/indexer/schema-walker.d.ts +29 -0
  246. package/lib/services/search/indexer/schema-walker.js +1 -0
  247. package/lib/services/search/indexer/text.d.ts +2 -0
  248. package/lib/services/search/indexer/text.js +1 -0
  249. package/lib/services/search/types.d.ts +28 -0
  250. package/lib/services/search/types.js +0 -0
  251. package/lib/services/spec-slice/assistant-links.d.ts +9 -0
  252. package/lib/services/spec-slice/assistant-links.js +5 -0
  253. package/lib/services/spec-slice/asyncapi-slice.d.ts +5 -0
  254. package/lib/services/spec-slice/asyncapi-slice.js +1 -0
  255. package/lib/services/spec-slice/clone-strip.d.ts +1 -0
  256. package/lib/services/spec-slice/clone-strip.js +1 -0
  257. package/lib/services/spec-slice/component-closure.d.ts +6 -0
  258. package/lib/services/spec-slice/component-closure.js +1 -0
  259. package/lib/services/spec-slice/graphql-slice.d.ts +2 -0
  260. package/lib/services/spec-slice/graphql-slice.js +1 -0
  261. package/lib/services/spec-slice/index.d.ts +6 -0
  262. package/lib/services/spec-slice/index.js +1 -0
  263. package/lib/services/spec-slice/openapi-slice.d.ts +6 -0
  264. package/lib/services/spec-slice/openapi-slice.js +1 -0
  265. package/lib/services/spec-slice/resolve-scope.d.ts +4 -0
  266. package/lib/services/spec-slice/resolve-scope.js +1 -0
  267. package/lib/services/spec-slice/types.d.ts +37 -0
  268. package/lib/services/spec-slice/types.js +0 -0
  269. package/lib/standalone.d.ts +19 -0
  270. package/lib/standalone.js +2 -0
  271. package/lib/standaloneThemeConfig.d.ts +3 -0
  272. package/lib/standaloneThemeConfig.js +1 -0
  273. package/lib/telemetry/RedocTelemetry.d.ts +3 -0
  274. package/lib/telemetry/RedocTelemetry.js +1 -1
  275. package/lib/telemetry/defaults.d.ts +2 -0
  276. package/lib/telemetry/defaults.js +1 -0
  277. package/lib/types/asyncapi.d.ts +2 -1
  278. package/lib/types/code-samples-config.d.ts +68 -0
  279. package/lib/types/code-samples-config.js +0 -0
  280. package/lib/types/common.d.ts +1 -2
  281. package/lib/types/content.d.ts +6 -4
  282. package/lib/types/edition-config.d.ts +4 -0
  283. package/lib/types/edition-config.js +0 -0
  284. package/lib/types/events.d.ts +2 -2
  285. package/lib/types/openapi.d.ts +3 -3
  286. package/lib/types/options.d.ts +24 -88
  287. package/lib/types/store.d.ts +3 -2
  288. package/lib/url-compat.d.ts +22 -0
  289. package/lib/url-compat.js +1 -0
  290. package/lib/utils/compose.d.ts +1 -0
  291. package/lib/utils/deep-link.d.ts +2 -1
  292. package/lib/utils/deep-link.js +1 -1
  293. package/lib/utils/extract-extensions.js +1 -1
  294. package/lib/utils/graphql-parse.d.ts +1 -0
  295. package/lib/utils/graphql-parse.js +1 -0
  296. package/lib/utils/scroll-anchoring.d.ts +2 -1
  297. package/lib/utils/x-logo.d.ts +13 -0
  298. package/lib/utils/x-logo.js +1 -0
  299. package/lib/yaml-compat.d.ts +7 -0
  300. package/lib/yaml-compat.js +1 -0
  301. package/package.json +36 -15
  302. package/lib/services/code-samples/replay/normalize-servers.js +0 -1
@@ -1 +1 @@
1
- import{jsx as e,jsxs as m}from"react/jsx-runtime";import{memo as h,useMemo as n}from"react";import{useAtomValue as g}from"jotai";import{storeAtom as M}from"../../jotai/store.js";import{useSpecTranslate as x}from"../../hooks/useTranslate.js";import{SchemaView as A}from"../Schema/SchemaView.js";import{ContentWrapper as c}from"../common/ContentWrapper.js";import{DeepLinkAnchor as S}from"../common/DeepLinkAnchor.js";import{Markdown as D}from"../common/Markdown.js";import{getDeepLinkId as k}from"../../utils/deep-link.js";import{DeepLinkSectionContext as L,useDeepLinkUrl as P}from"../../hooks/useDeepLinkSection.js";import{McpSection as b,McpSubRow as a,McpTitle as j,McpTitleWrapper as w}from"./styled.js";import{buildMcpExamplePanel as C,buildPromptArgumentsSchema as T,useMcpDescriptionAst as v}from"./utils.js";function V({name:p}){const i=g(M),l=x(),r=n(()=>i.mcp?.prompts?.find(f=>f.name===p),[i.mcp,p]),s=v(r?.description),t=n(()=>r?.arguments?.length?T(r.arguments):null,[r]),u=n(()=>t?[C(t,"Arguments example")]:void 0,[t]),o=P("arguments"),d=n(()=>({t:"arguments"}),[]);return r?m(b,{children:[s?e(c,{children:e(a,{children:e(D,{source:s})})}):null,t&&e(c,{panels:u,children:m(a,{children:[e(w,{id:k(o),children:m(j,{children:[o&&e(S,{to:o,label:"link to Arguments"}),l("openapi.mcp.inputSchema","Arguments")]})}),e(L.Provider,{value:d,children:e(A,{schema:t,expandByDefault:!0})})]})})]}):null}const J=h(V);export{J as McpPrompt};
1
+ import{jsx as e,jsxs as m}from"react/jsx-runtime";import{memo as h,useMemo as n}from"react";import{useAtomValue as g}from"jotai";import{storeAtom as M}from"../../jotai/store.js";import{useSpecTranslate as S}from"../../hooks/useTranslate.js";import{SchemaView as x}from"../Schema/SchemaView.js";import{ContentWrapper as c}from"../common/ContentWrapper.js";import{DeepLinkAnchor as A}from"../common/DeepLinkAnchor.js";import{Markdown as D}from"../common/Markdown.js";import{getDeepLinkId as k}from"../../utils/deep-link.js";import{DeepLinkSectionContext as L,useDeepLinkUrl as P}from"../../hooks/useDeepLinkSection.js";import{McpSection as b,McpSubRow as a,McpTitle as j,McpTitleWrapper as w}from"./styled.js";import{buildMcpExamplePanel as C,buildPromptArgumentsSchema as T,useMcpDescriptionAst as v}from"./utils.js";function V({name:p}){const i=g(M),u=S(),r=n(()=>i.mcp?.prompts?.find(f=>f.name===p),[i.mcp,p]),s=v(r?.description),t=n(()=>r?.arguments?.length?T(r.arguments):null,[r]),l=n(()=>t?[C(t,"arguments")]:void 0,[t]),o=P("arguments"),d=n(()=>({t:"arguments"}),[]);return r?m(b,{children:[s?e(c,{children:e(a,{children:e(D,{source:s})})}):null,t&&e(c,{panels:l,children:m(a,{children:[e(w,{id:k(o),children:m(j,{children:[o&&e(A,{to:o,label:"link to Arguments"}),u("openapi.mcp.inputSchema","Arguments")]})}),e(L.Provider,{value:d,children:e(x,{schema:t,expandByDefault:!0})})]})})]}):null}const J=h(V);export{J as McpPrompt};
@@ -1 +1 @@
1
- import{jsx as t,jsxs as o}from"react/jsx-runtime";import{memo as b,useMemo as n}from"react";import{useAtomValue as j}from"jotai";import{storeAtom as v}from"../../jotai/store.js";import{useSpecTranslate as I}from"../../hooks/useTranslate.js";import{SchemaView as s}from"../Schema/SchemaView.js";import{ContentWrapper as r}from"../common/ContentWrapper.js";import{DeepLinkAnchor as h}from"../common/DeepLinkAnchor.js";import{Markdown as w}from"../common/Markdown.js";import{getDeepLinkId as d}from"../../utils/deep-link.js";import{DeepLinkSectionContext as f,useDeepLinkUrl as S}from"../../hooks/useDeepLinkSection.js";import{McpSection as C,McpSubRow as m,McpTitle as x,McpTitleWrapper as D}from"./styled.js";import{buildMcpExamplePanel as M,useMcpDescriptionAst as O}from"./utils.js";function y({name:u}){const a=j(v),p=I(),e=n(()=>a.mcp?.tools?.find(P=>P.name===u),[a.mcp,u]),l=O(e?.description),k=n(()=>e?.inputSchema?[M(e.inputSchema,"Input example")]:void 0,[e?.inputSchema]),L=n(()=>e?.outputSchema?[M(e.outputSchema,"Output example")]:void 0,[e?.outputSchema]),c=S("input-schema"),T=n(()=>({t:"input-schema"}),[]),i=S("output-schema"),A=n(()=>({t:"output-schema"}),[]);return e?o(C,{children:[t(r,{children:o(m,{children:[o("p",{children:[p("openapi.mcp.toolName","Tool name"),": ",t("code",{children:e.name})]}),l?t(w,{source:l}):null]})}),e.inputSchema&&t(r,{panels:k,children:o(m,{children:[t(D,{id:d(c),children:o(x,{children:[c&&t(h,{to:c,label:"link to Input schema"}),p("openapi.mcp.inputSchema","Input schema")]})}),t(f.Provider,{value:T,children:t(s,{schema:e.inputSchema,expandByDefault:!0})})]})}),e.outputSchema&&t(r,{panels:L,children:o(m,{children:[t(D,{id:d(i),children:o(x,{children:[i&&t(h,{to:i,label:"link to Output schema"}),p("openapi.mcp.outputSchema","Output schema")]})}),t(f.Provider,{value:A,children:t(s,{schema:e.outputSchema,expandByDefault:!0})})]})})]}):null}const H=b(y);export{H as McpTool};
1
+ import{jsx as t,jsxs as o}from"react/jsx-runtime";import{memo as b,useMemo as n}from"react";import{useAtomValue as j}from"jotai";import{storeAtom as v}from"../../jotai/store.js";import{useSpecTranslate as w}from"../../hooks/useTranslate.js";import{SchemaView as l}from"../Schema/SchemaView.js";import{ContentWrapper as r}from"../common/ContentWrapper.js";import{DeepLinkAnchor as h}from"../common/DeepLinkAnchor.js";import{Markdown as C}from"../common/Markdown.js";import{getDeepLinkId as d}from"../../utils/deep-link.js";import{DeepLinkSectionContext as f,useDeepLinkUrl as S}from"../../hooks/useDeepLinkSection.js";import{McpSection as I,McpSubRow as u,McpTitle as D,McpTitleWrapper as M}from"./styled.js";import{buildMcpExamplePanel as k,useMcpDescriptionAst as y}from"./utils.js";function B({name:m}){const a=j(v),p=w(),e=n(()=>a.mcp?.tools?.find(P=>P.name===m),[a.mcp,m]),s=y(e?.description),x=n(()=>e?.inputSchema?[k(e.inputSchema,"input")]:void 0,[e?.inputSchema]),L=n(()=>e?.outputSchema?[k(e.outputSchema,"output")]:void 0,[e?.outputSchema]),c=S("input-schema"),T=n(()=>({t:"input-schema"}),[]),i=S("output-schema"),A=n(()=>({t:"output-schema"}),[]);return e?o(I,{children:[t(r,{children:o(u,{children:[o("p",{children:[p("openapi.mcp.toolName","Tool name"),": ",t("code",{children:e.name})]}),s?t(C,{source:s}):null]})}),e.inputSchema&&t(r,{panels:x,children:o(u,{children:[t(M,{id:d(c),children:o(D,{children:[c&&t(h,{to:c,label:"link to Input schema"}),p("openapi.mcp.inputSchema","Input schema")]})}),t(f.Provider,{value:T,children:t(l,{schema:e.inputSchema,expandByDefault:!0})})]})}),e.outputSchema&&t(r,{panels:L,children:o(u,{children:[t(M,{id:d(i),children:o(D,{children:[i&&t(h,{to:i,label:"link to Output schema"}),p("openapi.mcp.outputSchema","Output schema")]})}),t(f.Provider,{value:A,children:t(l,{schema:e.outputSchema,expandByDefault:!0})})]})})]}):null}const H=b(B);export{H as McpTool};
@@ -2,6 +2,6 @@ import type { McpExampleNode } from '../../types/content.js';
2
2
  import type { McpPromptArgument, McpResource, OpenAPISchema } from '../../types/openapi.js';
3
3
  export declare function useMcpDescriptionAst(description: unknown): unknown;
4
4
  export declare function sampleSchema(schema: OpenAPISchema): unknown;
5
- export declare function buildMcpExamplePanel(schema: OpenAPISchema, headerTitle: string): McpExampleNode;
5
+ export declare function buildMcpExamplePanel(schema: OpenAPISchema, example: 'input' | 'output' | 'arguments'): McpExampleNode;
6
6
  export declare function buildResourceContentPanel(resource: McpResource): McpExampleNode | null;
7
7
  export declare function buildPromptArgumentsSchema(args: McpPromptArgument[]): OpenAPISchema | null;
@@ -1 +1 @@
1
- import{useMemo as i}from"react";import*as p from"openapi-sampler";import{panelKind as o}from"../../types/common.js";import{resolveMarkdocHeadingIds as u}from"../../adapters/utils/markdoc.js";import{useMarkdownAdapter as m}from"../../contexts/markdownAdapter.js";import{useHashItemId as a}from"../../hooks/useDeepLinkSection.js";function M(t){const e=m(),n=a();return i(()=>{if(!t)return null;const r=e.parse(t);return n&&r&&typeof r=="object"&&u(r,n),r},[e,t,n])}function d(t){try{return p.sample(t,{quiet:!0})}catch{return{}}}function b(t,e){return{children:[{kind:o.MCP_EXAMPLE,headerTitle:e,data:d(t)}]}}function h(t){const e=t.text??t.blob;return e===void 0?null:{children:[{kind:o.MCP_EXAMPLE,headerTitle:"Resource content",data:e,language:t.mimeType}]}}function P(t){return t.length?{type:"object",properties:Object.fromEntries(t.map(e=>[e.name,{type:"string",example:e.example??"string",description:typeof e.description=="string"?e.description:void 0}])),required:t.filter(e=>e.required).map(e=>e.name)}:null}export{b as buildMcpExamplePanel,P as buildPromptArgumentsSchema,h as buildResourceContentPanel,d as sampleSchema,M as useMcpDescriptionAst};
1
+ import{useMemo as i}from"react";import*as o from"openapi-sampler";import{panelKind as p}from"../../types/common.js";import{resolveMarkdocHeadingIds as a}from"../../adapters/utils/markdoc.js";import{useMarkdownAdapter as m}from"../../contexts/markdownAdapter.js";import{useHashItemId as u}from"../../hooks/useDeepLinkSection.js";function h(t){const e=m(),r=u();return i(()=>{if(!t)return null;const n=e.parse(t);return r&&n&&typeof n=="object"&&a(n,r),n},[e,t,r])}function l(t){try{return o.sample(t,{quiet:!0})}catch{return{}}}function E(t,e){return{children:[{kind:p.MCP_EXAMPLE,headerTitleTranslationKey:e==="output"?"openapi.mcp.outputExample":e==="arguments"?"openapi.mcp.argumentsExample":"openapi.mcp.inputExample",data:l(t)}]}}function M(t){const e=t.text??t.blob;return e===void 0?null:{children:[{kind:p.MCP_EXAMPLE,headerTitleTranslationKey:"openapi.mcp.exampleTitle",data:e,language:t.mimeType}]}}function b(t){return t.length?{type:"object",properties:Object.fromEntries(t.map(e=>[e.name,{type:"string",example:e.example??"string",description:typeof e.description=="string"?e.description:void 0}])),required:t.filter(e=>e.required).map(e=>e.name)}:null}export{E as buildMcpExamplePanel,b as buildPromptArgumentsSchema,M as buildResourceContentPanel,l as sampleSchema,h as useMcpDescriptionAst};
@@ -1 +1 @@
1
- import{jsx as o}from"react/jsx-runtime";import{Markdown as n}from"../common/Markdown.js";import{Description as t}from"./styled.js";function i(r){return!!r&&typeof r=="object"&&"$$mdtype"in r}function s({value:r}){return r?typeof r=="string"||typeof r=="number"||typeof r=="boolean"?o(t,{children:o(n,{source:String(r)})}):i(r)||Array.isArray(r)&&r.every(e=>i(e))?o(t,{children:o(n,{source:r})}):null:null}export{s as SchemaDescription};
1
+ import{jsx as o}from"react/jsx-runtime";import{Markdown as t}from"../common/Markdown.js";import{isMarkdocAst as n}from"../../adapters/utils/markdoc.js";import{Description as i}from"./styled.js";function s({value:r}){return r?typeof r=="string"||typeof r=="number"||typeof r=="boolean"?o(i,{children:o(t,{source:String(r)})}):n(r)?o(i,{children:o(t,{source:r})}):null:null}export{s as SchemaDescription};
@@ -97,7 +97,7 @@ import{styled as r}from"styled-components";import{Link as i}from"react-router";i
97
97
  font-family: var(--font-family-monospaced);
98
98
  font-size: var(--font-size-sm);
99
99
  line-height: var(--line-height-sm);
100
- border-radius: var(--border-radius);
100
+ border-radius: var(--tag-border-radius);
101
101
  color: var(--text-color-secondary);
102
102
  display: inline-flex;
103
103
  word-break: var(--code-word-break);
@@ -124,7 +124,7 @@ import{styled as r}from"styled-components";import{Link as i}from"react-router";i
124
124
  color: var(--schema-recursive-text-color);
125
125
  padding: 0 var(--spacing-xs);
126
126
  `,A=r.a`
127
- color: var(--link-color, var(--color-primary-base));
127
+ color: var(--link-color, var(--color-primary-base, var(--link-color-primary)));
128
128
  font-size: var(--font-size-base);
129
129
  line-height: var(--line-height-base);
130
130
  text-decoration: none;
@@ -173,7 +173,7 @@ import{styled as r}from"styled-components";import{Link as i}from"react-router";i
173
173
  flex-basis: 100%;
174
174
  min-width: 0;
175
175
  border: 1px solid var(--border-color-secondary);
176
- border-radius: var(--border-radius);
176
+ border-radius: var(--border-radius-xl);
177
177
  overflow: hidden;
178
178
  `,F=r.div`
179
179
  display: flex;
@@ -270,7 +270,7 @@ import{styled as r}from"styled-components";import{Link as i}from"react-router";i
270
270
  width: 100%;
271
271
  `,Y=r.span`
272
272
  padding: 0 var(--spacing-xs);
273
- border-radius: var(--border-radius);
273
+ border-radius: var(--tag-border-radius);
274
274
  border: 1px solid var(--border-color-secondary);
275
275
  background-color: var(--bg-color);
276
276
  font-size: var(--font-size-sm);
@@ -305,7 +305,7 @@ import{styled as r}from"styled-components";import{Link as i}from"react-router";i
305
305
  color: var(--tag-basic-content-color);
306
306
  padding: 0 var(--spacing-xs);
307
307
  border: 1px solid var(--border-color-secondary);
308
- border-radius: var(--border-radius);
308
+ border-radius: var(--tag-border-radius);
309
309
  margin: var(--spacing-xxs) 0 var(--spacing-xs);
310
310
  position: relative;
311
311
  width: fit-content;
@@ -1 +1 @@
1
- import{jsx as r,jsxs as i}from"react/jsx-runtime";import{useAtomValue as I}from"jotai";import{ArrayWrapper as A,ArrayLabel as g,ArrayClosingLabel as b,ArrayLabelValue as l,ArrayLine as c,SchemaTypeLabel as O,PropertyList as x}from"../styled.js";import{globalOptionsAtom as C}from"../../../jotai/store.js";import{isWithinExpansionLevel as F}from"../../../utils/expansion.js";import{PropertyRenderer as R}from"./PropertyRenderer.js";import{ObjectRenderer as B}from"./ObjectRenderer.js";import{PropertyFieldRow as j}from"./PropertyFieldRow.js";function D(s){return!s||s.length===0?s:[...s.slice(0,-1),s[s.length-1]+"[]"]}function _({property:s,level:o,fieldParentsName:d,skipReadOnly:p,skipWriteOnly:m,onOneOfChange:h}){const{schemasExpansionLevel:w}=I(C),n=s.items;if(!n||n.length===0)return r(O,{children:"array"});const L=F(o,w,1),y=D(d),f=o===1,u=n.some(e=>e.isTupleItem||e.isAdditionalItems),t=n[0];if(!u&&n.length===1&&t&&t.switcher){const e=r(R,{property:t,level:o+1,fieldParentsName:y,skipReadOnly:p,skipWriteOnly:m,onOneOfChange:h});return f?i(A,{children:[i(g,{children:[r(l,{children:"Array ["}),r(c,{})]}),e,i(b,{className:"array-closing-label",children:[r(c,{}),r(l,{children:"]"})]})]}):e}if(!u&&n.length===1&&t&&t.properties){const e=r(B,{property:t,level:o,fieldParentsName:y,skipReadOnly:p,skipWriteOnly:m,onOneOfChange:h});return f?i(A,{children:[i(g,{children:[r(l,{children:"Array ["}),r(c,{})]}),e,i(b,{className:"array-closing-label",children:[r(c,{}),r(l,{children:"]"})]})]}):e}return u||n.length>1?r(x,{children:n.map((e,a)=>r(j,{name:e.isAdditionalItems?`[${a}...]`:`[${a}]`,property:e,level:o,expandByDefault:L,isFirst:a===0,fieldParentsName:d,skipReadOnly:p,skipWriteOnly:m,onOneOfChange:h},a))}):t&&!t.switcher&&!t.properties&&!f?r(x,{children:r(j,{name:"[i]",property:t,level:o,expandByDefault:L,isFirst:!0,fieldParentsName:d,skipReadOnly:p,skipWriteOnly:m,onOneOfChange:h})}):i(A,{children:[i(g,{children:[r(l,{children:"Array ["}),r(c,{})]}),n.map((e,a)=>r(R,{property:e,level:o+1,fieldParentsName:y,skipReadOnly:p,skipWriteOnly:m,onOneOfChange:h},a)),i(b,{className:"array-closing-label",children:[r(c,{}),r(l,{children:"]"})]})]})}export{_ as ArrayRenderer};
1
+ import{jsx as r,jsxs as n}from"react/jsx-runtime";import{useAtomValue as I}from"jotai";import{ArrayWrapper as u,ArrayLabel as A,ArrayClosingLabel as b,ArrayLabelValue as o,ArrayLine as l,SchemaTypeLabel as N,PropertyList as L}from"../styled.js";import{globalOptionsAtom as O}from"../../../jotai/store.js";import{appendArraySuffix as P}from"../../../utils/deep-link.js";import{isWithinExpansionLevel as C}from"../../../utils/expansion.js";import{PropertyRenderer as x}from"./PropertyRenderer.js";import{ObjectRenderer as F}from"./ObjectRenderer.js";import{PropertyFieldRow as R}from"./PropertyFieldRow.js";function $({property:j,level:s,fieldParentsName:d,skipReadOnly:p,skipWriteOnly:c,onOneOfChange:m}){const{schemasExpansionLevel:w}=I(O),i=j.items;if(!i||i.length===0)return r(N,{children:"array"});const g=C(s,w,1),h=d&&P(d),y=s===1,f=i.some(e=>e.isTupleItem||e.isAdditionalItems),t=i[0];if(!f&&i.length===1&&t&&t.switcher){const e=r(x,{property:t,level:s+1,fieldParentsName:h,skipReadOnly:p,skipWriteOnly:c,onOneOfChange:m});return y?n(u,{children:[n(A,{children:[r(o,{children:"Array ["}),r(l,{})]}),e,n(b,{className:"array-closing-label",children:[r(l,{}),r(o,{children:"]"})]})]}):e}if(!f&&i.length===1&&t&&t.properties){const e=r(F,{property:t,level:s,fieldParentsName:h,skipReadOnly:p,skipWriteOnly:c,onOneOfChange:m});return y?n(u,{children:[n(A,{children:[r(o,{children:"Array ["}),r(l,{})]}),e,n(b,{className:"array-closing-label",children:[r(l,{}),r(o,{children:"]"})]})]}):e}return f||i.length>1?r(L,{children:i.map((e,a)=>r(R,{name:e.isAdditionalItems?`[${a}...]`:`[${a}]`,property:e,level:s,expandByDefault:g,isFirst:a===0,fieldParentsName:d,skipReadOnly:p,skipWriteOnly:c,onOneOfChange:m},a))}):t&&!t.switcher&&!t.properties&&!y?r(L,{children:r(R,{name:"[i]",property:t,level:s,expandByDefault:g,isFirst:!0,fieldParentsName:d,skipReadOnly:p,skipWriteOnly:c,onOneOfChange:m})}):n(u,{children:[n(A,{children:[r(o,{children:"Array ["}),r(l,{})]}),i.map((e,a)=>r(x,{property:e,level:s+1,fieldParentsName:h,skipReadOnly:p,skipWriteOnly:c,onOneOfChange:m},a)),n(b,{className:"array-closing-label",children:[r(l,{}),r(o,{children:"]"})]})]})}export{$ as ArrayRenderer};
@@ -1 +1 @@
1
- import{jsx as f,jsxs as E}from"react/jsx-runtime";import{useContext as _,useEffect as D,useMemo as h,useState as H}from"react";import{useAtomValue as L,useSetAtom as M}from"jotai";import{selectAtom as B}from"jotai/utils";import{LEVEL_COLORS as S}from"../utils.js";import{ShowProperty as F,CircleIconSpan as K,NestedWrapper as v,StyledNested as P}from"../styled.js";import{tryDecodeURIComponent as U}from"../../../utils/string.js";import{stripArrayMarkers as g}from"../../../utils/deep-link.js";import{useSpecTranslate as O}from"../../../hooks/useTranslate.js";import{useUrlHash as V}from"../../../hooks/useUrlHash.js";import{globalOptionsAtom as z}from"../../../jotai/store.js";import{itemStoreAtom as A}from"../../../jotai/itemStore.js";import{ItemIdContext as R}from"../../../hooks/useDeepLinkSection.js";import{isWithinExpansionLevel as W,isRequiredAutoExpanded as q}from"../../../utils/expansion.js";import{useSectionExpandBaseline as G,useSectionBaselineKey as k}from"../hooks/useSchemaFieldDeepLink.js";import{useCollapsibleEntryKey as J,useRegisterCollapsibleEntry as Q}from"../../../hooks/useExpandableSection.js";import{LazyMount as X}from"../../common/LazyMount.js";const Y=0;function Z(t,o,s,e=Y){return!!(t&&W(o??0,s,e))}function ee(t){const o=V();return h(()=>{if(!t||!o)return!1;const s=U(o.slice(1)).toLowerCase(),e=t.toLowerCase();if(s.includes(`path=${e}/`)||s.includes(`path=${e}&`)||s.includes(`path=${e}[]`))return!0;const r=g(e);if(r===e)return!1;const n=g(s);return n.includes(`path=${r}/`)||n.includes(`path=${r}&`)||n.endsWith(`&path=${r}`)||n.endsWith(`/path=${r}`)},[t,o])}function C(t,o,s){const e=i=>Object.values(i).filter(p=>!(o&&p.accessMode==="read-only"||s&&p.accessMode==="write-only")).length;if(t.switcher?.type==="discriminator"){const i=Object.values(t.switcher.options)[0];if(i?.properties)return{count:e(i.properties),isArray:!1}}if(t.properties)return{count:e(t.properties),isArray:!1};const r=t.items?.length===1?t.items[0]:void 0,n=r?.properties??(r?.switcher?Object.values(r.switcher.options)[0]?.properties:void 0);return n?{count:e(n),isArray:!0}:null}function te(t,o,s,e){const r=e?e("actions.show","Show"):"Show",n=C(t,o,s);if(!n)return`${r} ${e?e("details","details"):"details"}`;const{count:i,isArray:p}=n,a=i===1?"property":"properties",m=e?e(a,a):a,l=[r];return i!==1&&l.push(String(i)),p&&l.push(e?e("array","array"):"array"),l.push(m),l.join(" ")}const se=40;function ge({level:t,skipReadOnly:o,skipWriteOnly:s,property:e,children:r,fieldPath:n,expandByDefault:i,required:p}){const a=ee(n),{schemasExpansionLevel:m}=L(z),l=_(R)??"",w=k(),y=G(),c=J(w),b=M(A(l)),I=L(h(()=>B(A(l),u=>c?u.collapsibles[c]:void 0),[l,c])),[$,T]=H(void 0),d=(c?I:$)??y??(a||Z(i,t,m)||q(t,p,m));Q(c,d),D(()=>{!a||!c||b(u=>({collapsibles:{...u.collapsibles,[c]:!0}}))},[a,c,b]);const x=O(),j=h(()=>te(e,o,s,x),[e,o,s,x]),N=h(()=>{const u=C(e,o,s);return u&&u.count>0?u.count*se:void 0},[e,o,s]);return E(v,{"data-schema-nested-open":d?"true":"false",children:[E(F,{type:"button",onClick:()=>{c?b(u=>({collapsibles:{...u.collapsibles,[c]:!d}})):T(!d)},children:[f(oe,{sign:d?"\u2212":"+",level:t,expanded:d}),d?"":j]}),d&&f(P,{$level:t,children:f(X,{forceMount:a,estimatedHeight:N,children:r})})]})}function oe({sign:t,level:o=0,expanded:s}){const e=s?S[o%S.length]:void 0;return f(K,{$color:e,children:t})}export{Y as COLLAPSIBLE_NESTED_DEFAULT_FALLBACK,ge as CollapsibleNestedFields,te as buildNestedFieldsLabel,C as countNestedFields,Z as getCollapsibleNestedInitialExpanded,ee as useIsDeepLinkTarget};
1
+ import{jsx as m,jsxs as S}from"react/jsx-runtime";import{useContext as H,useEffect as D,useMemo as f,useState as M}from"react";import{useAtomValue as g,useSetAtom as B}from"jotai";import{selectAtom as F}from"jotai/utils";import{LEVEL_COLORS as A}from"../utils.js";import{ShowProperty as K,CircleIconSpan as U,NestedWrapper as v,StyledNested as P}from"../styled.js";import{tryDecodeURIComponent as O}from"../../../utils/string.js";import{stripArrayMarkers as C}from"../../../utils/deep-link.js";import{useSpecTranslate as R}from"../../../hooks/useTranslate.js";import{useUrlHash as V}from"../../../hooks/useUrlHash.js";import{useUrlHashReassert as z}from"../../../hooks/useUrlHashReassert.js";import{globalOptionsAtom as W}from"../../../jotai/store.js";import{itemStoreAtom as w}from"../../../jotai/itemStore.js";import{ItemIdContext as q}from"../../../hooks/useDeepLinkSection.js";import{isWithinExpansionLevel as G,isRequiredAutoExpanded as k}from"../../../utils/expansion.js";import{useSectionExpandBaseline as J,useSectionBaselineKey as Q}from"../hooks/useSchemaFieldDeepLink.js";import{useCollapsibleEntryKey as X,useRegisterCollapsibleEntry as Y}from"../../../hooks/useExpandableSection.js";import{LazyMount as Z}from"../../common/LazyMount.js";const ee=0;function te(t,o,s,e=ee){return!!(t&&G(o??0,s,e))}function se(t){const o=V();return f(()=>{if(!t||!o)return!1;const s=O(o.slice(1)).toLowerCase(),e=t.toLowerCase();if(s.includes(`path=${e}/`)||s.includes(`path=${e}&`)||s.includes(`path=${e}[]`))return!0;const r=C(e);if(r===e)return!1;const n=C(s);return n.includes(`path=${r}/`)||n.includes(`path=${r}&`)||n.endsWith(`&path=${r}`)||n.endsWith(`/path=${r}`)},[t,o])}function y(t,o,s){const e=i=>Object.values(i).filter(p=>!(o&&p.accessMode==="read-only"||s&&p.accessMode==="write-only")).length;if(t.switcher?.type==="discriminator"){const i=Object.values(t.switcher.options)[0];if(i?.properties)return{count:e(i.properties),isArray:!1}}if(t.properties)return{count:e(t.properties),isArray:!1};const r=t.items?.length===1?t.items[0]:void 0,n=r?.properties??(r?.switcher?Object.values(r.switcher.options)[0]?.properties:void 0);return n?{count:e(n),isArray:!0}:null}function oe(t,o,s,e){const r=e?e("actions.show","Show"):"Show",n=y(t,o,s);if(!n)return`${r} ${e?e("details","details"):"details"}`;const{count:i,isArray:p}=n,a=i===1?"property":"properties",h=e?e(a,a):a,d=[r];return i!==1&&d.push(String(i)),p&&d.push(e?e("array","array"):"array"),d.push(h),d.join(" ")}const re=40;function we({level:t,skipReadOnly:o,skipWriteOnly:s,property:e,children:r,fieldPath:n,expandByDefault:i,required:p}){const a=se(n),h=z(),{schemasExpansionLevel:d}=g(W),b=H(q)??"",I=Q(),$=J(),c=X(I),x=B(w(b)),T=g(f(()=>F(w(b),u=>c?u.collapsibles[c]:void 0),[b,c])),[j,E]=M(void 0),l=(c?T:j)??$??(a||te(i,t,d)||k(t,p,d));Y(c,l),D(()=>{a&&(c?x(u=>({collapsibles:{...u.collapsibles,[c]:!0}})):E(!0))},[a,c,x,h]);const L=R(),N=f(()=>oe(e,o,s,L),[e,o,s,L]),_=f(()=>{const u=y(e,o,s);return u&&u.count>0?u.count*re:void 0},[e,o,s]);return S(v,{"data-schema-nested-open":l?"true":"false",children:[S(K,{type:"button",onClick:()=>{c?x(u=>({collapsibles:{...u.collapsibles,[c]:!l}})):E(!l)},children:[m(ne,{sign:l?"\u2212":"+",level:t,expanded:l}),l?"":N]}),l&&m(P,{$level:t,children:m(Z,{forceMount:a,estimatedHeight:_,children:r})})]})}function ne({sign:t,level:o=0,expanded:s}){const e=s?A[o%A.length]:void 0;return m(U,{$color:e,children:t})}export{ee as COLLAPSIBLE_NESTED_DEFAULT_FALLBACK,we as CollapsibleNestedFields,oe as buildNestedFieldsLabel,y as countNestedFields,te as getCollapsibleNestedInitialExpanded,se as useIsDeepLinkTarget};
@@ -1 +1 @@
1
- import{jsx as r,jsxs as t}from"react/jsx-runtime";import{useAtomValue as w}from"jotai";import{PropertyItem as T,Row as B,NameWrapper as R,PropertyName as j,RequiredLabel as k,SchemaTypeLabel as F,SwitcherWrapper as q,SwitcherBadge as A,FieldDetail as m,FieldDetailLabel as o,FieldDetailValue as I,DefaultValueTag as N,ExampleValueTag as C,ExampleJsonViewer as _,ParentPrefix as O}from"../styled.js";import{isStructuredExample as W}from"../../../types/schema.js";import{SchemaDescription as $}from"../SchemaDescription.js";import{SchemaEnumValues as J}from"./SchemaEnumValues.js";import{SchemaEnumDescriptions as M}from"./SchemaEnumDescriptions.js";import{getDiscriminatorEnumRender as z,getSchemaEnumRowLabel as G}from"../utils.js";import{SchemaVariantSelector as H}from"./SchemaVariantSelector.js";import{SchemaTitleLabel as K}from"./SchemaTitleLabel.js";import{Pattern as Q}from"./Pattern.js";import{DeepLinkAnchor as U}from"../../common/DeepLinkAnchor.js";import{getDeepLinkId as X,stripVariantMarkers as Y}from"../../../utils/deep-link.js";import{globalOptionsAtom as Z}from"../../../jotai/store.js";import{useSchemaFieldDeepLink as ee}from"../hooks/useSchemaFieldDeepLink.js";import{useSpecTranslate as re}from"../../../hooks/useTranslate.js";import{SECTION_ATTR as te}from"../../../constants/openapi.js";import{renderPropertyBadge as u}from"../../common/Badge.js";import{splitBadgesByPosition as ie}from"../../../utils/split-badges-by-position.js";function Ee({fieldName:a,property:e,isFirst:h,mappingKeys:f,optionEntries:p,activeIdx:x,fieldParentsName:s=[],onSelect:g}){const{hidePropertiesPrefix:D,jsonSamplesExpandLevel:S}=w(Z),i=re(),{enumDescriptions:c,enumValues:n}=z(e,f),b=G(e.type,n.length),L=e.const!==void 0&&e.const!=="",y=[...s,a].join("/"),l=ee(y),{before:E,after:V}=ie(e.badges);return t(T,{$isFirst:h,id:X(l),children:[t(B,{children:[t(R,{children:[l&&r(U,{to:l,label:`link to ${a}`,variant:"field"}),!D&&s.map((P,v)=>{const d=Y(P);return d?t(O,{children:[d,".","\u200B"]},v):null}),E.map(u),r(j,{className:"schema-name",children:a})]}),r(F,{children:e.type}),r(K,{title:e.title,schemaName:e.schemaName}),e.isRequired?r(k,{children:i("required","required")}):null,V.map(u)]}),r($,{value:e.description}),e.default!==void 0?t(m,{children:[t(o,{children:[i("default","Default"),":"]}),r(N,{children:e.default})]}):null,c?r(M,{values:c}):n.length>0?r(J,{label:b,values:n}):null,e.example!==void 0?t(m,{children:[t(o,{children:[i("example","Example"),":"]}),W(e.example)?r(_,{data:e.example,expandLevel:S,controls:!1}):r(C,{children:e.example})]}):null,r(Q,{pattern:e.pattern}),t(q,{[te]:"switcher",children:[r(A,{children:"Discriminator"}),r(H,{optionEntries:p,activeIndex:x,onChange:g,"data-testid":"discriminator-schema"})]}),L?t(m,{children:[t(o,{children:[i("value","Value"),":"]}),r(I,{children:e.const})]}):null]})}export{Ee as DiscriminatorPropertyRow};
1
+ import{jsx as r,jsxs as t}from"react/jsx-runtime";import{useAtomValue as w}from"jotai";import{PropertyItem as T,Row as B,NameWrapper as R,PropertyName as j,RequiredLabel as k,SchemaTypeLabel as F,SwitcherWrapper as q,SwitcherBadge as A,FieldDetail as m,FieldDetailLabel as o,FieldDetailValue as I,DefaultValueTag as N,ExampleValueTag as C,ExampleJsonViewer as _,ParentPrefix as O}from"../styled.js";import{isStructuredExample as W}from"../../../types/schema.js";import{SchemaDescription as $}from"../SchemaDescription.js";import{SchemaEnumValues as J}from"./SchemaEnumValues.js";import{SchemaEnumDescriptions as M}from"./SchemaEnumDescriptions.js";import{getDiscriminatorEnumRender as z,getSchemaEnumRowLabel as G}from"../utils.js";import{SchemaVariantSelector as H}from"./SchemaVariantSelector.js";import{SchemaTitleLabel as K}from"./SchemaTitleLabel.js";import{Pattern as Q}from"./Pattern.js";import{DeepLinkAnchor as U}from"../../common/DeepLinkAnchor.js";import{getDeepLinkId as X,stripVariantMarkers as Y}from"../../../utils/deep-link.js";import{globalOptionsAtom as Z}from"../../../jotai/store.js";import{useSchemaFieldDeepLink as ee}from"../hooks/useSchemaFieldDeepLink.js";import{useSpecTranslate as re}from"../../../hooks/useTranslate.js";import{SECTION_ATTR as te}from"../../../constants/openapi.js";import{renderPropertyBadge as u}from"../../common/Badge.js";import{splitBadgesByPosition as ie}from"../../../utils/split-badges-by-position.js";function Ee({fieldName:a,property:e,isFirst:h,mappingKeys:f,optionEntries:p,activeIdx:x,fieldParentsName:s=[],onSelect:g}){const{hidePropertiesPrefix:D,jsonSamplesExpandLevel:S}=w(Z),i=re(),{enumDescriptions:c,enumValues:n}=z(e,f),b=G(e.type,n.length),L=e.const!==void 0&&e.const!=="",y=[...s,a].join("/"),l=ee(y),{before:E,after:V}=ie(e.badges);return t(T,{$isFirst:h,id:X(l),children:[t(B,{children:[t(R,{children:[l&&r(U,{to:l,label:`link to ${a}`,variant:"field"}),!D&&s.map((P,v)=>{const d=Y(P);return d?t(O,{children:[d,".","\u200B"]},v):null}),E.map(u),r(j,{className:"schema-name",children:a})]}),r(F,{children:e.type}),r(K,{title:e.title,schemaName:e.schemaName}),e.isRequired?r(k,{children:i("required","required")}):null,V.map(u)]}),r($,{value:e.description}),e.default!==void 0?t(m,{children:[t(o,{children:[i("default","Default"),":"]}),r(N,{children:e.default})]}):null,c?r(M,{values:c}):n.length>0?r(J,{label:b,values:n}):null,e.example!==void 0?t(m,{children:[t(o,{children:[i("example","Example"),":"]}),W(e.example)?r(_,{data:e.example,expandLevel:S,controls:!1}):r(C,{children:e.example})]}):null,r(Q,{pattern:e.pattern}),t(q,{[te]:"switcher",children:[r(A,{children:i("discriminator","Discriminator")}),r(H,{optionEntries:p,activeIndex:x,onChange:g,"data-testid":"discriminator-schema"})]}),L?t(m,{children:[t(o,{children:[i("value","Value"),":"]}),r(I,{children:e.const})]}):null]})}export{Ee as DiscriminatorPropertyRow};
@@ -1 +1 @@
1
- import{Fragment as s,jsx as e,jsxs as t}from"react/jsx-runtime";import{FieldDetail as a,FieldDetailLabel as m,ExamplesList as u,ExampleItem as c,ExampleSummary as d,ExampleDescription as o}from"../styled.js";import{ExpandableExample as p}from"./ExpandableExample.js";function f({examples:n}){if(!n)return null;const l=Object.entries(n);return l.length===0?null:t(s,{children:[e(a,{children:e(m,{children:"Examples:"})}),e(u,{children:l.map(([i,r])=>t(c,{children:[e(d,{children:r.summary||i}),r.description?e(o,{children:r.description}):null,r.value!==void 0?e(p,{value:r.value}):null]},i))})]})}export{f as Examples};
1
+ import{Fragment as a,jsx as r,jsxs as n}from"react/jsx-runtime";import{useSpecTranslate as m}from"../../../hooks/useTranslate.js";import{FieldDetail as c,FieldDetailLabel as o,ExamplesList as u,ExampleItem as p,ExampleSummary as d,ExampleDescription as x}from"../styled.js";import{ExpandableExample as f}from"./ExpandableExample.js";function b({examples:l}){const s=m();if(!l)return null;const i=Object.entries(l);return i.length===0?null:n(a,{children:[r(c,{children:n(o,{children:[s("examples","Examples"),":"]})}),r(u,{children:i.map(([t,e])=>n(p,{children:[r(d,{children:e.summary||t}),e.description?r(x,{children:e.description}):null,e.value!==void 0?r(f,{value:e.value}):null]},t))})]})}export{b as Examples};
@@ -1 +1 @@
1
- import{Fragment as J,jsx as i,jsxs as P}from"react/jsx-runtime";import{useCallback as M,useContext as B,useEffect as T,useMemo as g}from"react";import{useAtomValue as V,useSetAtom as w}from"jotai";import{SECTION_ATTR as Q}from"../../../constants/openapi.js";import{PropertyList as U,Row as C,OneOfWrapper as X,SwitcherWrapper as Y,SwitcherBadge as Z,PrimitiveOptionWrapper as ee,SchemaTypeLabel as W,AccessLabel as te}from"../styled.js";import{SchemaDescription as ne}from"../SchemaDescription.js";import{SchemaEnumValues as re}from"./SchemaEnumValues.js";import{SchemaEnumDescriptions as ie}from"./SchemaEnumDescriptions.js";import{getSchemaEnumRowLabel as oe}from"../utils.js";import{itemStoreAtom as K}from"../../../jotai/itemStore.js";import{globalOptionsAtom as se}from"../../../jotai/store.js";import{isWithinExpansionLevel as ae}from"../../../utils/expansion.js";import{activeDiscriminatorSelectAtom as ce,activeOneOfSelectAtom as me,buildVariantStateKey as _}from"../../../jotai/itemStore.js";import{ItemIdContext as N}from"../../../hooks/useDeepLinkSection.js";import{SchemaTitleLabel as pe}from"./SchemaTitleLabel.js";import{appendVariantSuffix as $,variantMarkersOnly as le}from"../../../utils/deep-link.js";import{useVariantIndexFromHash as H}from"../hooks/useVariantIndexFromHash.js";import{PropertyRenderer as de}from"./PropertyRenderer.js";import{PropertyFieldRow as fe}from"./PropertyFieldRow.js";import{DiscriminatorPropertyRow as ue}from"./DiscriminatorPropertyRow.js";import{SchemaVariantSelector as he}from"./SchemaVariantSelector.js";import{CollapsibleNestedFields as ye}from"./CollapsibleNestedFields.js";function q(t,e){return t?.length?(t.join("").match(new RegExp(`${e}=`,"g"))?.length??0)+1:1}function ve(t,e,n){if(n===void 0||n in t)return t;const m=e[n];return m===void 0?t:{[n]:m,...t}}function He({property:t,level:e,expandByDefault:n,fieldParentsName:m,skipReadOnly:r,skipWriteOnly:l,onOneOfChange:a}){const o=t.switcher;return o?o.type==="oneOf"?i(Oe,{property:t,switcher:o,level:e,expandByDefault:n,fieldParentsName:m,skipReadOnly:r,skipWriteOnly:l,onOneOfChange:a}):i(Se,{property:t,switcher:o,level:e,expandByDefault:n,fieldParentsName:m,skipReadOnly:r,skipWriteOnly:l,onOneOfChange:a}):i(J,{})}function Oe({property:t,switcher:e,level:n,expandByDefault:m,fieldParentsName:r,skipReadOnly:l,skipWriteOnly:a,onOneOfChange:o}){const s=B(N),A=V(g(()=>me(s??""),[s])),u=w(K(s??"")),d=g(()=>Object.entries(e.options),[e.options]),x=_(r,e.label),O=H("oneof",d.length,q(r,"oneof")),v=A[x],f=v!==void 0?v:O!==-1?O:0;T(()=>{s&&O!==-1&&u(S=>({activeOneOf:{...S.activeOneOf,[x]:O}}))},[s,O,x,u]);const j=M(S=>{s&&u(L=>({activeOneOf:{...L.activeOneOf,[x]:S}})),e.jsonPointer!==void 0&&o?.({pointer:e.jsonPointer,index:S})},[s,o,x,u,e.jsonPointer]),h=d[f]??d[0],p=h?.[1],y=p&&(p.properties||p.switcher||p.items)?{...t,type:ge(t,p),description:p.description,switcher:p.switcher,properties:p.properties,items:p.items}:null,b=g(()=>$(r,`&oneof=${f}`),[r,f]),E=!!(y?.properties||y?.items||y?.switcher?.type==="discriminator")&&n>1,I=y!==null&&i(de,{property:y,level:n,expandByDefault:m,fieldParentsName:b,skipReadOnly:l,skipWriteOnly:a,onOneOfChange:o}),k=g(()=>b.join("/"),[b]),R=y!==null&&E?i(ye,{level:n-1,expandByDefault:m,skipReadOnly:l,skipWriteOnly:a,property:y,fieldPath:k,children:I}):I;return P(X,{children:[P(Y,{[Q]:"switcher",children:[i(Z,{children:e.label}),i(he,{optionEntries:d,activeIndex:f,onChange:j,"data-testid":"one-of-schema"})]}),i(ne,{value:p?.description||t.description}),y?R:h?.[1]?i(xe,{option:h[1],label:h[0]}):null]})}function Se({property:t,switcher:e,level:n,expandByDefault:m,fieldParentsName:r=[],skipReadOnly:l,skipWriteOnly:a,onOneOfChange:o}){const s=B(N),A=V(g(()=>ce(s??""),[s])),u=w(K(s??"")),d=g(()=>Object.entries(e.options),[e.options]),O=r?.length?e.propertyName??"discriminator":e.propertyName??e.label,v=_(r,O),f=H("d",d.length,q(r,"d")),j=A[v],h=j!==void 0?j:f!==-1?f:0;T(()=>{s&&f!==-1&&u(c=>({activeDiscriminator:{...c.activeDiscriminator,[v]:f}}))},[s,f,v,u]);const p=M(c=>{s&&u(D=>({activeDiscriminator:{...D.activeDiscriminator,[v]:c}})),e.jsonPointer!==void 0&&o?.({pointer:e.jsonPointer,index:c})},[s,o,v,u,e.jsonPointer]),b=(d[h]??d[0])?.[1]?.properties??{},E=t.properties??{},I=ve(b,E,e.propertyName),{schemasExpansionLevel:k}=V(se),R=m??ae(n,k,1),S=g(()=>$(r,`&d=${h}`),[r,h]),L=Object.entries(I).filter(([,c])=>!(l&&c.accessMode==="read-only"||a&&c.accessMode==="write-only"));return i(U,{children:L.map(([c,D],F)=>{if(c===e.propertyName){const z=d.map(([G])=>G);return i(ue,{fieldName:c,fieldParentsName:r,property:D,isFirst:F===0,mappingKeys:z,optionEntries:d,activeIdx:h,onSelect:p},c)}return i(fe,{name:c,property:D,level:n,expandByDefault:R,isFirst:F===0,fieldParentsName:n>1?S:le(S),skipReadOnly:l,skipWriteOnly:a,onOneOfChange:o},c)})})}function ge(t,e){return e.properties&&Object.keys(e.properties).length>0?"object":e.items&&e.items.length>0?"array":t.type}function xe({option:t,label:e}){const n=t.typeLabel??e,m=t.title||(e!==n?e:void 0),r=t.enum,l=r&&!Array.isArray(r)?r:void 0,a=r&&Array.isArray(r)?r:void 0;return P(ee,{children:[t.constraints&&t.constraints.length>0&&i(C,{children:t.constraints.map(o=>i(W,{children:o},o))}),P(C,{children:[i(W,{children:n}),i(pe,{title:m,schemaName:t.schemaName}),t.accessMode?i(te,{children:t.accessMode}):null]}),l?i(ie,{values:l,type:n}):a&&a.length>0?i(re,{label:oe(n,a.length),values:a}):null]})}export{He as SwitcherRenderer};
1
+ import{Fragment as Q,jsx as i,jsxs as P}from"react/jsx-runtime";import{useCallback as B,useContext as T,useEffect as w,useMemo as S}from"react";import{useAtomValue as F,useSetAtom as C}from"jotai";import{SECTION_ATTR as X}from"../../../constants/openapi.js";import{PropertyList as Y,Row as W,OneOfWrapper as Z,SwitcherWrapper as ee,SwitcherBadge as te,PrimitiveOptionWrapper as ne,SchemaTypeLabel as K,AccessLabel as re}from"../styled.js";import{SchemaDescription as ie}from"../SchemaDescription.js";import{SchemaEnumValues as oe}from"./SchemaEnumValues.js";import{SchemaEnumDescriptions as se}from"./SchemaEnumDescriptions.js";import{getSchemaEnumRowLabel as ae}from"../utils.js";import{itemStoreAtom as _}from"../../../jotai/itemStore.js";import{globalOptionsAtom as ce}from"../../../jotai/store.js";import{isWithinExpansionLevel as me}from"../../../utils/expansion.js";import{activeDiscriminatorSelectAtom as pe,activeOneOfSelectAtom as le,buildVariantStateKey as H}from"../../../jotai/itemStore.js";import{ItemIdContext as N}from"../../../hooks/useDeepLinkSection.js";import{SchemaTitleLabel as de}from"./SchemaTitleLabel.js";import{appendVariantSuffix as $,variantMarkersOnly as fe}from"../../../utils/deep-link.js";import{useVariantIndexFromHash as U}from"../hooks/useVariantIndexFromHash.js";import{useUrlHashReassert as q}from"../../../hooks/useUrlHashReassert.js";import{PropertyRenderer as ue}from"./PropertyRenderer.js";import{PropertyFieldRow as he}from"./PropertyFieldRow.js";import{DiscriminatorPropertyRow as ye}from"./DiscriminatorPropertyRow.js";import{SchemaVariantSelector as ve}from"./SchemaVariantSelector.js";import{CollapsibleNestedFields as Oe}from"./CollapsibleNestedFields.js";function z(t,e){return t?.length?(t.join("").match(new RegExp(`${e}=`,"g"))?.length??0)+1:1}function Se(t,e,n){if(n===void 0||n in t)return t;const m=e[n];return m===void 0?t:{[n]:m,...t}}function ze({property:t,level:e,expandByDefault:n,fieldParentsName:m,skipReadOnly:r,skipWriteOnly:l,onOneOfChange:a}){const o=t.switcher;return o?o.type==="oneOf"?i(ge,{property:t,switcher:o,level:e,expandByDefault:n,fieldParentsName:m,skipReadOnly:r,skipWriteOnly:l,onOneOfChange:a}):i(xe,{property:t,switcher:o,level:e,expandByDefault:n,fieldParentsName:m,skipReadOnly:r,skipWriteOnly:l,onOneOfChange:a}):i(Q,{})}function ge({property:t,switcher:e,level:n,expandByDefault:m,fieldParentsName:r,skipReadOnly:l,skipWriteOnly:a,onOneOfChange:o}){const s=T(N),A=F(S(()=>le(s??""),[s])),h=C(_(s??"")),f=S(()=>Object.entries(e.options),[e.options]),g=H(r,e.label),E=q(),d=U("oneof",f.length,z(r,"oneof")),b=A[g],u=b!==void 0?b:d!==-1?d:0;w(()=>{s&&d!==-1&&h(O=>({activeOneOf:{...O.activeOneOf,[g]:d}}))},[s,d,g,h,E]);const j=B(O=>{s&&h(V=>({activeOneOf:{...V.activeOneOf,[g]:O}})),e.jsonPointer!==void 0&&o?.({pointer:e.jsonPointer,index:O})},[s,o,g,h,e.jsonPointer]),y=f[u]??f[0],p=y?.[1],v=p&&(p.properties||p.switcher||p.items)?{...t,type:be(t,p),description:p.description,switcher:p.switcher,properties:p.properties,items:p.items}:null,x=S(()=>$(r,`&oneof=${u}`),[r,u]),R=!!(v?.properties||v?.items||v?.switcher?.type==="discriminator")&&n>1,I=v!==null&&i(ue,{property:v,level:n,expandByDefault:m,fieldParentsName:x,skipReadOnly:l,skipWriteOnly:a,onOneOfChange:o}),k=S(()=>x.join("/"),[x]),L=v!==null&&R?i(Oe,{level:n-1,expandByDefault:m,skipReadOnly:l,skipWriteOnly:a,property:v,fieldPath:k,children:I}):I;return P(Z,{children:[P(ee,{[X]:"switcher",children:[i(te,{children:e.label}),i(ve,{optionEntries:f,activeIndex:u,onChange:j,"data-testid":"one-of-schema"})]}),i(ie,{value:p?.description||t.description}),v?L:y?.[1]?i(je,{option:y[1],label:y[0]}):null]})}function xe({property:t,switcher:e,level:n,expandByDefault:m,fieldParentsName:r=[],skipReadOnly:l,skipWriteOnly:a,onOneOfChange:o}){const s=T(N),A=F(S(()=>pe(s??""),[s])),h=C(_(s??"")),f=S(()=>Object.entries(e.options),[e.options]),E=r?.length?e.propertyName??"discriminator":e.propertyName??e.label,d=H(r,E),b=q(),u=U("d",f.length,z(r,"d")),j=A[d],y=j!==void 0?j:u!==-1?u:0;w(()=>{s&&u!==-1&&h(c=>({activeDiscriminator:{...c.activeDiscriminator,[d]:u}}))},[s,u,d,h,b]);const p=B(c=>{s&&h(D=>({activeDiscriminator:{...D.activeDiscriminator,[d]:c}})),e.jsonPointer!==void 0&&o?.({pointer:e.jsonPointer,index:c})},[s,o,d,h,e.jsonPointer]),x=(f[y]??f[0])?.[1]?.properties??{},R=t.properties??{},I=Se(x,R,e.propertyName),{schemasExpansionLevel:k}=F(ce),L=m??me(n,k,1),O=S(()=>$(r,`&d=${y}`),[r,y]),V=Object.entries(I).filter(([,c])=>!(l&&c.accessMode==="read-only"||a&&c.accessMode==="write-only"));return i(Y,{children:V.map(([c,D],M)=>{if(c===e.propertyName){const G=f.map(([J])=>J);return i(ye,{fieldName:c,fieldParentsName:r,property:D,isFirst:M===0,mappingKeys:G,optionEntries:f,activeIdx:y,onSelect:p},c)}return i(he,{name:c,property:D,level:n,expandByDefault:L,isFirst:M===0,fieldParentsName:n>1?O:fe(O),skipReadOnly:l,skipWriteOnly:a,onOneOfChange:o},c)})})}function be(t,e){return e.properties&&Object.keys(e.properties).length>0?"object":e.items&&e.items.length>0?"array":t.type}function je({option:t,label:e}){const n=t.typeLabel??e,m=t.title||(e!==n?e:void 0),r=t.enum,l=r&&!Array.isArray(r)?r:void 0,a=r&&Array.isArray(r)?r:void 0;return P(ne,{children:[t.constraints&&t.constraints.length>0&&i(W,{children:t.constraints.map(o=>i(K,{children:o},o))}),P(W,{children:[i(K,{children:n}),i(de,{title:m,schemaName:t.schemaName}),t.accessMode?i(re,{children:t.accessMode}):null]}),l?i(se,{values:l,type:n}):a&&a.length>0?i(oe,{label:ae(n,a.length),values:a}):null]})}export{ze as SwitcherRenderer};
@@ -0,0 +1,15 @@
1
+ import type { ReactElement } from 'react';
2
+ import type { ApiItem, ApiStore } from '../../types/store.js';
3
+ export type SearchProps = {
4
+ items: ApiItem[];
5
+ store: ApiStore;
6
+ basePath: string;
7
+ /** Bundled definition — enables `$ref` resolution for schema-field results. */
8
+ document?: Record<string, unknown>;
9
+ };
10
+ /**
11
+ * Search ships only in the open-source Redoc (`index.ce.ts` and the `.ce`
12
+ * files it re-exports replace this stub there); enterprise search is provided
13
+ * by the portal.
14
+ */
15
+ export declare function Search(_props: SearchProps): ReactElement | null;
@@ -0,0 +1 @@
1
+ function n(r){return null}export{n as Search};
@@ -1 +1 @@
1
- import{Fragment as p,jsx as e,jsxs as l}from"react/jsx-runtime";import{useState as T}from"react";import{ChevronRightIcon as z}from"@redocly/theme/icons/ChevronRightIcon/ChevronRightIcon";import{useSpecTranslate as R}from"../../hooks/useTranslate.js";import{normalizeScopes as g}from"../../utils/security-scope.js";import{Markdown as C}from"../common/Markdown.js";import{OptionalScopesChevron as A,OptionalScopesList as x,OptionalScopesToggle as L,DeprecatedBadge as D,FlowDescription as I,FlowProperties as j,FlowTitle as k,FlowTitleWrapper as M,FlowTypeBody as _,FlowTypeName as $,FlowTypeSection as q,FlowTypeTag as P,FlowWrapper as E,PropertyLabel as B,PropertyRow as H,PropertyValue as N,SchemeLink as s,ScopesLabel as W,ScopesList as K,ScopesSection as v}from"./styled.js";import{ScopeTagWithTooltip as b}from"./ScopeTagWithTooltip.js";const w=24;function ce({scheme:r}){const t=R(),{type:o,name:n}=r;return!o||!n?null:l(E,{children:[l(M,{children:[e(k,{children:n}),r.deprecated&&e(D,{children:t("badges.deprecated","deprecated")})]}),r.description&&e(I,{children:typeof r.description=="string"?r.description:e(C,{source:r.description})}),l(j,{children:[o==="http"&&e(V,{scheme:r,translate:t}),o==="apiKey"&&e(X,{scheme:r,translate:t}),o==="oauth2"&&e(G,{scheme:r,translate:t}),o==="openIdConnect"&&e(Q,{scheme:r,translate:t})]})]})}function V({scheme:r,translate:t}){return l(p,{children:[e(a,{label:t("httpAuthorizationScheme","HTTP Authorization Scheme"),value:r.type}),e(a,{label:t("bearerFormat","Bearer Format"),value:r.bearerFormat}),e(h,{scopes:r.scopes,translate:t})]})}function X({scheme:r,translate:t}){const o=r.in?`${r.in.charAt(0).toUpperCase()+r.in.slice(1)} `:"";return l(p,{children:[e(a,{label:`${o}${t("parameterName","parameter name")}:`,value:r.paramName}),e(h,{scopes:r.scopes,translate:t})]})}function G({scheme:r,translate:t}){const o=r.flows;if(!o)return e(p,{});const n=Z(o),i=Object.entries(o).filter(([,c])=>c!=null);return l(p,{children:[r.oauth2MetadataUrl&&e(a,{label:`${t("oauth2MetadataUrl","OAuth2 Metadata URL")}:`,value:e(s,{href:r.oauth2MetadataUrl,target:"_blank",rel:"noopener noreferrer",children:r.oauth2MetadataUrl})}),i.map(([c,u])=>e(J,{flowType:c,flow:u,requiredScopes:r.scopes,translate:t},c)),e(h,{scopes:r.scopes,scopeDescriptions:n,translate:t})]})}function J({flowType:r,flow:t,requiredScopes:o,translate:n}){const[i,c]=T(!1),{authorizationUrl:u,tokenUrl:f,refreshUrl:S,deviceAuthorizationUrl:m,scopes:O}=t,U=Y(o,O),y=()=>{c(d=>!d)};return l(q,{children:[l(P,{children:[e("span",{children:n("flowType","Flow type")}),e($,{children:r})]}),l(_,{children:[u&&e(a,{label:`${n("authorizationUrl","Authorization URL")}:`,value:e(s,{href:u,children:u})}),m&&e(a,{label:`${n("deviceAuthorizationUrl","Device Authorization URL")}:`,value:e(s,{href:m,children:m})}),f&&e(a,{label:`${n("tokenUrl","Token URL")}:`,value:e(s,{href:f,children:f})}),S&&e(a,{label:`${n("refreshUrl","Refresh URL")}:`,value:e(s,{href:S,children:S})}),U.length>0&&l(v,{children:[l(L,{type:"button",onClick:y,children:[i?"Hide optional scopes":"Show optional scopes",e(A,{isOpen:i,children:e(z,{size:"var(--font-size-base)",color:"var(--tree-content-color-default)"})})]}),e(x,{isOpen:i,children:U.map(([d,F])=>e(a,{label:e(b,{text:d,maxChars:w,large:!0}),value:F||" "},d))})]})]})]})}function Q({scheme:r,translate:t}){return l(p,{children:[r.openIdConnectUrl&&e(a,{label:t("connectUrl","Connect URL"),value:e(s,{href:r.openIdConnectUrl,target:"_blank",rel:"noopener noreferrer",children:r.openIdConnectUrl})}),e(h,{scopes:r.scopes,translate:t})]})}function a({label:r,value:t}){return t?l(H,{children:[e(B,{children:r}),e(N,{children:t})]}):null}function Y(r,t){if(!t)return[];const o=new Set(g(r));return Object.entries(t).filter(([n])=>!o.has(n.trim()))}function h({scopes:r,scopeDescriptions:t,translate:o}){const n=g(r);return n.length===0?null:t&&t.size>0?l(p,{children:[e(a,{label:o("requiredScopes","Required scopes"),value:" "}),n.map(i=>e(a,{label:e(b,{text:i,maxChars:w,large:!0}),value:t.get(i)||" "},i))]}):l(v,{children:[e(W,{children:o("requiredScopes","Required scopes")}),e(K,{children:n.map(i=>e(b,{text:i,maxChars:w,large:!0},i))})]})}function Z(r){if(!r)return null;const t=new Map;return Object.values(r).forEach(o=>{o?.scopes&&Object.entries(o.scopes).forEach(([n,i])=>{const c=n.trim();!c||t.has(c)||t.set(c,i)})}),t.size>0?t:null}export{ce as SecurityFlowDetail};
1
+ import{Fragment as p,jsx as e,jsxs as i}from"react/jsx-runtime";import{useState as T}from"react";import{ChevronRightIcon as z}from"@redocly/theme/icons/ChevronRightIcon/ChevronRightIcon";import{useSpecTranslate as R}from"../../hooks/useTranslate.js";import{normalizeScopes as g}from"../../utils/security-scope.js";import{Markdown as C}from"../common/Markdown.js";import{OptionalScopesChevron as A,OptionalScopesList as x,OptionalScopesToggle as L,DeprecatedBadge as D,FlowDescription as I,FlowProperties as j,FlowTitle as k,FlowTitleWrapper as M,FlowTypeBody as _,FlowTypeName as $,FlowTypeSection as q,FlowTypeTag as P,FlowWrapper as E,PropertyLabel as B,PropertyRow as H,PropertyValue as N,SchemeLink as s,ScopesLabel as W,ScopesList as K,ScopesSection as O}from"./styled.js";import{ScopeTagWithTooltip as b}from"./ScopeTagWithTooltip.js";const w=24;function ce({scheme:r}){const o=R(),{type:t,name:n}=r;return!t||!n?null:i(E,{children:[i(M,{children:[e(k,{children:n}),r.deprecated&&e(D,{children:o("badges.deprecated","deprecated")})]}),r.description&&e(I,{children:typeof r.description=="string"?r.description:e(C,{source:r.description})}),i(j,{children:[t==="http"&&e(V,{scheme:r,translate:o}),t==="apiKey"&&e(X,{scheme:r,translate:o}),t==="oauth2"&&e(G,{scheme:r,translate:o}),t==="openIdConnect"&&e(Q,{scheme:r,translate:o})]})]})}function V({scheme:r,translate:o}){return i(p,{children:[e(a,{label:o("httpAuthorizationScheme","HTTP Authorization Scheme"),value:r.type}),e(a,{label:o("bearerFormat","Bearer Format"),value:r.bearerFormat}),e(h,{scopes:r.scopes,translate:o})]})}function X({scheme:r,translate:o}){const t=r.in?`${r.in.charAt(0).toUpperCase()+r.in.slice(1)} `:"";return i(p,{children:[e(a,{label:`${t}${o("parameterName","parameter name")}:`,value:r.paramName}),e(h,{scopes:r.scopes,translate:o})]})}function G({scheme:r,translate:o}){const t=r.flows;if(!t)return e(p,{});const n=Z(t),l=Object.entries(t).filter(([,c])=>c!=null);return i(p,{children:[r.oauth2MetadataUrl&&e(a,{label:`${o("oauth2MetadataUrl","OAuth2 Metadata URL")}:`,value:e(s,{href:r.oauth2MetadataUrl,target:"_blank",rel:"noopener noreferrer",children:r.oauth2MetadataUrl})}),l.map(([c,u])=>e(J,{flowType:c,flow:u,requiredScopes:r.scopes,translate:o},c)),e(h,{scopes:r.scopes,scopeDescriptions:n,translate:o})]})}function J({flowType:r,flow:o,requiredScopes:t,translate:n}){const[l,c]=T(!1),{authorizationUrl:u,tokenUrl:f,refreshUrl:S,deviceAuthorizationUrl:m,scopes:v}=o,U=Y(t,v),y=()=>{c(d=>!d)};return i(q,{children:[i(P,{children:[e("span",{children:n("flowType","Flow type")}),e($,{children:r})]}),i(_,{children:[u&&e(a,{label:`${n("authorizationUrl","Authorization URL")}:`,value:e(s,{href:u,children:u})}),m&&e(a,{label:`${n("deviceAuthorizationUrl","Device Authorization URL")}:`,value:e(s,{href:m,children:m})}),f&&e(a,{label:`${n("tokenUrl","Token URL")}:`,value:e(s,{href:f,children:f})}),S&&e(a,{label:`${n("refreshUrl","Refresh URL")}:`,value:e(s,{href:S,children:S})}),U.length>0&&i(O,{children:[i(L,{type:"button",onClick:y,children:[l?n("hideOptionalScopes","Hide optional scopes"):n("showOptionalScopes","Show optional scopes"),e(A,{isOpen:l,children:e(z,{size:"var(--font-size-base)",color:"var(--tree-content-color-default)"})})]}),e(x,{isOpen:l,children:U.map(([d,F])=>e(a,{label:e(b,{text:d,maxChars:w,large:!0}),value:F||" "},d))})]})]})]})}function Q({scheme:r,translate:o}){return i(p,{children:[r.openIdConnectUrl&&e(a,{label:o("connectUrl","Connect URL"),value:e(s,{href:r.openIdConnectUrl,target:"_blank",rel:"noopener noreferrer",children:r.openIdConnectUrl})}),e(h,{scopes:r.scopes,translate:o})]})}function a({label:r,value:o}){return o?i(H,{children:[e(B,{children:r}),e(N,{children:o})]}):null}function Y(r,o){if(!o)return[];const t=new Set(g(r));return Object.entries(o).filter(([n])=>!t.has(n.trim()))}function h({scopes:r,scopeDescriptions:o,translate:t}){const n=g(r);return n.length===0?null:o&&o.size>0?i(p,{children:[e(a,{label:t("requiredScopes","Required scopes"),value:" "}),n.map(l=>e(a,{label:e(b,{text:l,maxChars:w,large:!0}),value:o.get(l)||" "},l))]}):i(O,{children:[e(W,{children:t("requiredScopes","Required scopes")}),e(K,{children:n.map(l=>e(b,{text:l,maxChars:w,large:!0},l))})]})}function Z(r){if(!r)return null;const o=new Map;return Object.values(r).forEach(t=>{t?.scopes&&Object.entries(t.scopes).forEach(([n,l])=>{const c=n.trim();!c||o.has(c)||o.set(c,l)})}),o.size>0?o:null}export{ce as SecurityFlowDetail};
@@ -7,7 +7,7 @@ import{styled as r}from"styled-components";import{Panel as a}from"@redocly/theme
7
7
  &&& {
8
8
  margin-bottom: var(--spacing-lg);
9
9
  }
10
- `,d=r.div`
10
+ `,g=r.div`
11
11
  display: flex;
12
12
  align-items: center;
13
13
  justify-content: space-between;
@@ -18,7 +18,7 @@ import{styled as r}from"styled-components";import{Panel as a}from"@redocly/theme
18
18
  border-bottom: var(--panel-border, 1px solid var(--border-color-primary));
19
19
  border-radius: var(--panel-border-radius, var(--border-radius))
20
20
  var(--panel-border-radius, var(--border-radius)) 0 0;
21
- `,g=r(e)`
21
+ `,d=r(e)`
22
22
  margin-left: auto;
23
23
  font-size: var(--font-size-sm);
24
24
  `,v=r.span`
@@ -53,14 +53,14 @@ import{styled as r}from"styled-components";import{Panel as a}from"@redocly/theme
53
53
  position: fixed;
54
54
  width: 100vw;
55
55
  height: 100vh;
56
- z-index: var(--z-index-popover, 1000);
56
+ z-index: var(--z-index-popover, 200);
57
57
  left: 0;
58
58
  top: 0;
59
59
  pointer-events: auto;
60
60
  `,y=r.div`
61
61
  background: var(--bg-color);
62
62
  box-shadow: var(--bg-raised-shadow, 0 8px 32px rgba(0, 0, 0, 0.15));
63
- border-radius: var(--border-radius-lg, 12px);
63
+ border-radius: var(--border-radius-lg);
64
64
  padding: var(--spacing-lg);
65
65
  display: flex;
66
66
  flex-direction: column;
@@ -170,7 +170,7 @@ import{styled as r}from"styled-components";import{Panel as a}from"@redocly/theme
170
170
  font-size: var(--font-size-sm);
171
171
  font-family: var(--font-family-monospaced);
172
172
  padding: 0 var(--spacing-xxs);
173
- border-radius: var(--border-radius);
173
+ border-radius: var(--tag-border-radius);
174
174
  background: var(--tag-bg-color, var(--border-color-secondary));
175
175
  color: var(--text-color-secondary);
176
176
  `,V=r.button`
@@ -199,7 +199,7 @@ import{styled as r}from"styled-components";import{Panel as a}from"@redocly/theme
199
199
  transform: ${o=>o.isOpen?"rotate(90deg)":"rotate(0deg)"};
200
200
  transition: transform 0.3s ease-in-out;
201
201
  `,i=r.div`
202
- border-radius: var(--border-radius);
202
+ border-radius: var(--tag-border-radius);
203
203
  padding: 0 var(--spacing-xxs);
204
204
  font-family: var(--font-family-monospaced);
205
205
  font-size: var(--font-size-sm);
@@ -216,4 +216,4 @@ import{styled as r}from"styled-components";import{Panel as a}from"@redocly/theme
216
216
  display: inline-flex;
217
217
  align-items: center;
218
218
  gap: var(--spacing-xxs);
219
- `;export{u as CloseButton,f as Conjunction,A as DeprecatedBadge,T as FlowDescription,F as FlowProperties,S as FlowTitle,k as FlowTitleWrapper,O as FlowTypeBody,L as FlowTypeName,B as FlowTypeSection,R as FlowTypeTag,z as FlowWrapper,h as ModalBackground,w as ModalTitle,y as ModalWrapper,I as OptionalScopesChevron,H as OptionalScopesList,V as OptionalScopesToggle,j as PropertyLabel,P as PropertyRow,$ as PropertyValue,C as SchemeLink,m as SchemeName,b as ScopeInline,N as ScopeTag,M as ScopesLabel,W as ScopesList,D as ScopesSection,d as SecurityHeader,x as SecurityList,c as SecurityPanel,i as Tag,v as Title,g as ViewDetailsButton};
219
+ `;export{u as CloseButton,f as Conjunction,A as DeprecatedBadge,T as FlowDescription,F as FlowProperties,S as FlowTitle,k as FlowTitleWrapper,O as FlowTypeBody,L as FlowTypeName,B as FlowTypeSection,R as FlowTypeTag,z as FlowWrapper,h as ModalBackground,w as ModalTitle,y as ModalWrapper,I as OptionalScopesChevron,H as OptionalScopesList,V as OptionalScopesToggle,j as PropertyLabel,P as PropertyRow,$ as PropertyValue,C as SchemeLink,m as SchemeName,b as ScopeInline,N as ScopeTag,M as ScopesLabel,W as ScopesList,D as ScopesSection,g as SecurityHeader,x as SecurityList,c as SecurityPanel,i as Tag,v as Title,d as ViewDetailsButton};
@@ -0,0 +1 @@
1
+ export declare const FloatingButton: () => React.JSX.Element;
@@ -0,0 +1,32 @@
1
+ import{jsx as e}from"react/jsx-runtime";import{useCallback as n}from"react";import{useAtom as i}from"jotai";import{styled as a}from"styled-components";import{breakpoints as s}from"@redocly/theme/core/openapi";import{MenuIcon as p}from"@redocly/theme/icons/MenuIcon/MenuIcon";import{CloseIcon as l}from"@redocly/theme/icons/CloseIcon/CloseIcon";import{isSidebarOpenedAtom as d}from"../../jotai/app.js";const h=()=>{const[o,r]=i(d),t=n(()=>{r(!o)},[o,r]);return e(m,{type:"button",onClick:t,"aria-label":o?"Close navigation menu":"Open navigation menu","aria-expanded":o,"data-testid":"floating-button",children:o?e(l,{size:"24px"}):e(p,{size:"24px"})})},m=a.button`
2
+ border: none;
3
+ outline: none;
4
+ user-select: none;
5
+ background-color: var(--sidebar-bg-color, #fff);
6
+ color: var(--color-primary-base, var(--color-blueberry-6));
7
+ display: none;
8
+ align-items: center;
9
+ justify-content: center;
10
+ cursor: pointer;
11
+ position: fixed;
12
+ right: 20px;
13
+ bottom: 44px;
14
+ z-index: 100;
15
+ border-radius: 50%;
16
+ box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
17
+ width: 60px;
18
+ height: 60px;
19
+ padding: 0;
20
+
21
+ svg path {
22
+ fill: var(--color-primary-base, var(--color-blueberry-6));
23
+ }
24
+
25
+ @media screen and (max-width: ${s.small}) {
26
+ display: flex;
27
+ }
28
+
29
+ @media print {
30
+ display: none;
31
+ }
32
+ `;export{h as FloatingButton};
@@ -0,0 +1,5 @@
1
+ import type { ReactElement } from 'react';
2
+ /** Redocly logo for the community edition's sidebar attribution. Hidden until mounted; removed if the CDN image fails to load. */
3
+ export declare function RedoclyAttributionLogo({ full }: {
4
+ full?: boolean;
5
+ }): ReactElement | null;
@@ -0,0 +1 @@
1
+ import{jsx as s}from"react/jsx-runtime";import{useEffect as e,useState as l}from"react";function n({full:t=!1}){const[r,o]=l(!1);return e(()=>{o(!0)},[]),r?s("img",{alt:"redocly logo",onError:()=>o(!1),src:t?"https://cdn.redoc.ly/redoc/logo-mini-full.svg":"https://cdn.redoc.ly/redoc/logo-mini.svg"}):null}export{n as RedoclyAttributionLogo};
@@ -1,22 +1,46 @@
1
- import{jsx as a,jsxs as t}from"react/jsx-runtime";import{memo as s}from"react";import{styled as d,css as o}from"styled-components";import{SidebarActions as n}from"./SidebarActions.js";function l({className:r,children:e,collapsedSidebar:i=!1}){return t(c,{className:r,$collapsedSidebar:i,children:[i?null:e,a(n,{})]})}const b=s(l),c=d.div`
1
+ import{Fragment as f,jsx as d,jsxs as s}from"react/jsx-runtime";import{memo as g,useCallback as b,useEffect as u}from"react";import{styled as x,css as m}from"styled-components";import{useAtom as v}from"jotai";import{breakpoints as c}from"@redocly/theme/core/openapi";import{isSidebarOpenedAtom as w}from"../../jotai/app.js";import{useBodyScrollLock as S}from"../../hooks/useBodyScrollLock.js";import{SidebarActions as y}from"./SidebarActions.js";import{FloatingButton as L}from"./FloatingButton.js";const k=["menu-item-type-group","menu-item-type-drilldown"];function E({className:i,children:l,collapsedSidebar:r=!1}){const[e,a]=v(w);u(()=>{if(!e)return;const t=window.matchMedia(`(min-width: ${c.small})`),o=()=>{t.matches&&a(!1)};return o(),t.addEventListener("change",o),()=>t.removeEventListener("change",o)},[e,a]),S(e);const p=b(t=>{if(!e)return;const o=t.target.closest("a");if(!o)return;const n=o.closest('[data-component-name="Menu/MenuItem"]');n&&k.some(h=>n.classList.contains(h))||a(!1)},[e,a]);return s(f,{children:[s(_,{className:i,$collapsedSidebar:r,$open:e,onClick:p,children:[r&&!e?null:l,d(y,{})]}),d(L,{})]})}const z=g(E),_=x.div`
2
2
  flex-shrink: 0;
3
3
  overflow-y: auto;
4
4
  overflow-x: hidden;
5
- position: sticky;
6
5
  top: var(--navbar-height, 0px);
7
6
  height: calc(100vh - var(--navbar-height, 0px));
8
- display: flex;
7
+ height: calc(100dvh - var(--navbar-height, 0px));
9
8
  flex-direction: column;
10
9
  background: var(--sidebar-bg-color, #fff);
11
10
  border-right: 1px solid var(--sidebar-border-color, #e0e0e0);
12
11
 
13
- ${({$collapsedSidebar:r})=>r?o`
14
- width: auto;
15
- `:o`
16
- width: var(--sidebar-width, 260px);
17
- `}
12
+ [data-component-name='SidebarLogo/SidebarLogo'] {
13
+ padding: var(--spacing-md, 16px) var(--spacing-sm, 12px);
14
+ }
15
+
16
+ [data-component-name='SidebarLogo/SidebarLogo'] img {
17
+ /* Keep the logo compact inside the full-width mobile drawer. */
18
+ max-width: min(140px, var(--sidebar-logo-max-width, 285px));
19
+ }
20
+
21
+ /* Mobile: full-width drawer toggled by the floating hamburger button. */
22
+ position: fixed;
23
+ z-index: 20;
24
+ width: 100%;
25
+ display: ${({$open:i})=>i?"flex":"none"};
26
+
27
+ @media screen and (min-width: ${c.small}) {
28
+ position: sticky;
29
+ z-index: auto;
30
+ display: flex;
31
+
32
+ [data-component-name='SidebarLogo/SidebarLogo'] img {
33
+ max-width: var(--sidebar-logo-max-width, 285px);
34
+ }
35
+
36
+ ${({$collapsedSidebar:i})=>i?m`
37
+ width: auto;
38
+ `:m`
39
+ width: var(--sidebar-width, 260px);
40
+ `}
41
+ }
18
42
 
19
43
  @media print {
20
44
  display: none;
21
45
  }
22
- `;export{b as StickySidebar};
46
+ `;export{z as StickySidebar};
@@ -1,4 +1,4 @@
1
- import{Fragment as m,jsx as n,jsxs as u}from"react/jsx-runtime";import{Fragment as T,useCallback as E,useLayoutEffect as M,useMemo as z,useRef as B,useState as R}from"react";import{styled as c}from"styled-components";import{Dropdown as _}from"@redocly/theme/components/Dropdown/Dropdown";import{DropdownMenu as k}from"@redocly/theme/components/Dropdown/DropdownMenu";import{DropdownMenuItem as D}from"@redocly/theme/components/Dropdown/DropdownMenuItem";import{Tooltip as F}from"@redocly/theme/components/Tooltip/Tooltip";import{trimText as S}from"@redocly/theme/core/openapi";import{calculateMaxLength as P}from"../../utils/calculateMaxLength.js";const b=25,O=3,j=16;function g({breadcrumb:e,onClick:r,maxLength:t}){const o=e.name.length>t,a=S(e.name,t);return n(F,{tip:e.name,placement:"bottom",disabled:!o,children:n(y,{onClick:()=>r(e.href),children:a})})}function G({breadcrumbs:e,onClick:r,maxLength:t}){const o=e[0],a=e[e.length-1],d=e.slice(1,-1);return u(m,{children:[n(g,{breadcrumb:o,onClick:r,maxLength:t}),n(f,{children:"/"}),n(_,{trigger:n(I,{children:"..."}),closeOnClick:!0,alignment:"end",children:n(k,{children:d.map(i=>n(D,{onAction:()=>r(i.href),children:i.name},i.href))})}),n(f,{children:"/"}),n(g,{breadcrumb:a,onClick:r,maxLength:t})]})}function H({breadcrumbs:e,onClick:r,maxLength:t}){return n(m,{children:e.map((o,a)=>u(T,{children:[n(g,{breadcrumb:o,onClick:r,maxLength:t}),a!==e.length-1&&n(f,{children:"/"})]},o.href))})}function $({breadcrumbs:e,onClick:r}){const t=B(null),o=B(null),[a,d]=R(b),i=e.length>O,x=z(()=>i?[e[0],e[e.length-1]]:e,[e,i]),p=E(()=>{const s=t.current,l=s?.parentElement;if(!s||!l||!o.current)return;const v=getComputedStyle(l),C=parseFloat(v.paddingLeft||"0")+parseFloat(v.paddingRight||"0");let h=l.clientWidth-C;const w=l.parentElement?.querySelector('[data-component-name="PageActions/PageActions"]');if(w){const L=w.getBoundingClientRect().left-s.getBoundingClientRect().left-j;L>0&&(h=Math.min(h,L))}const A=P(x,h,i,o.current);d(A)},[x,i]);return M(()=>{p();const s=new ResizeObserver(p),l=t.current?.parentElement;return l&&s.observe(l),()=>{s.disconnect()}},[p]),e.length?u(m,{children:[n(N,{ref:o,"aria-hidden":"true"}),n(W,{ref:t,"data-component-name":"Breadcrumbs",children:i?n(G,{breadcrumbs:e,onClick:r,maxLength:a}):n(H,{breadcrumbs:e,onClick:r,maxLength:a})})]}):null}const N=c.span`
1
+ import{Fragment as m,jsx as n,jsxs as u}from"react/jsx-runtime";import{Fragment as T,useCallback as E,useLayoutEffect as M,useMemo as z,useRef as B,useState as R}from"react";import{styled as c}from"styled-components";import{Dropdown as _}from"@redocly/theme/components/Dropdown/Dropdown";import{DropdownMenu as b}from"@redocly/theme/components/Dropdown/DropdownMenu";import{DropdownMenuItem as k}from"@redocly/theme/components/Dropdown/DropdownMenuItem";import{Tooltip as D}from"@redocly/theme/components/Tooltip/Tooltip";import{trimText as F}from"@redocly/theme/core/openapi";import{calculateMaxLength as S}from"../../utils/calculateMaxLength.js";const P=25,O=3,j=16;function g({breadcrumb:e,onClick:r,maxLength:t}){const o=e.name.length>t,a=F(e.name,t);return n(D,{tip:e.name,placement:"bottom",disabled:!o,children:n(y,{onClick:()=>r(e.href),children:a})})}function G({breadcrumbs:e,onClick:r,maxLength:t}){const o=e[0],a=e[e.length-1],d=e.slice(1,-1);return u(m,{children:[n(g,{breadcrumb:o,onClick:r,maxLength:t}),n(f,{children:"/"}),n(_,{trigger:n(I,{children:"..."}),closeOnClick:!0,alignment:"end",children:n(b,{children:d.map(i=>n(k,{onAction:()=>r(i.href),children:i.name},i.href))})}),n(f,{children:"/"}),n(g,{breadcrumb:a,onClick:r,maxLength:t})]})}function H({breadcrumbs:e,onClick:r,maxLength:t}){return n(m,{children:e.map((o,a)=>u(T,{children:[n(g,{breadcrumb:o,onClick:r,maxLength:t}),a!==e.length-1&&n(f,{children:"/"})]},o.href))})}function $({breadcrumbs:e,onClick:r}){const t=B(null),o=B(null),[a,d]=R(P),i=e.length>O,x=z(()=>i?[e[0],e[e.length-1]]:e,[e,i]),p=E(()=>{const s=t.current,l=s?.parentElement;if(!s||!l||!o.current)return;const v=getComputedStyle(l),C=parseFloat(v.paddingLeft||"0")+parseFloat(v.paddingRight||"0");let h=l.clientWidth-C;const w=l.parentElement?.querySelector('[data-component-name="PageActions/PageActions"]');if(w){const L=w.getBoundingClientRect().left-s.getBoundingClientRect().left-j;L>0&&(h=Math.min(h,L))}const A=S(x,h,i,o.current);d(A)},[x,i]);return M(()=>{p();const s=new ResizeObserver(p),l=t.current?.parentElement;return l&&s.observe(l),()=>{s.disconnect()}},[p]),e.length?u(m,{children:[n(N,{ref:o,"aria-hidden":"true"}),n(W,{ref:t,"data-component-name":"Breadcrumbs",children:i?n(G,{breadcrumbs:e,onClick:r,maxLength:a}):n(H,{breadcrumbs:e,onClick:r,maxLength:a})})]}):null}const N=c.span`
2
2
  position: absolute;
3
3
  visibility: hidden;
4
4
  white-space: nowrap;
@@ -19,7 +19,7 @@ import{Fragment as m,jsx as n,jsxs as u}from"react/jsx-runtime";import{Fragment
19
19
  font-size: var(--font-size-sm);
20
20
  line-height: var(--line-height-sm);
21
21
  color: var(--text-color-secondary);
22
- border-radius: var(--border-radius);
22
+ border-radius: var(--breadcrumbs-border-radius);
23
23
  cursor: pointer;
24
24
  padding: 1px calc(var(--spacing-xxs) / 2);
25
25
  overflow: hidden;
@@ -1,17 +1,17 @@
1
- import{jsx as o}from"react/jsx-runtime";import{memo as f,useCallback as v}from"react";import{styled as t,css as a}from"styled-components";import{Link as g}from"react-router";import{useUrlHash as k}from"../../hooks/useUrlHash.js";import{useAtomValue as u}from"jotai";import{LinkIcon as b}from"@redocly/theme/icons/LinkIcon/LinkIcon";import{ClipboardService as x}from"@redocly/theme/core/openapi";import{globalOptionsAtom as y}from"../../jotai/store.js";import{hashToElementId as l}from"../../utils/deep-link.js";function A({to:i,label:s,variant:c="heading"}){const{onDeepLinkClick:e}=u(y),p=k({trackSilentReplaces:!0}),r=i.split("#")[1],m=!!r&&l(p)===l(r),d=v(h=>{x.copyCustom(`${window.location.origin}${i}`),e&&(h.preventDefault(),e(i))},[e,i]);return o(C,{className:"deep-link-anchor","data-deep-link-anchor":!0,children:o(L,{$variant:c,to:i,"aria-label":s??`link to ${i}`,"aria-current":m?"location":void 0,onClick:d,children:o(b,{color:"--heading-anchor-color"})})})}const j=f(A),n="data-deep-link-anchor",w=`
2
- & [${n}] svg {
1
+ import{jsx as o}from"react/jsx-runtime";import{memo as f,useCallback as v}from"react";import{styled as a,css as l}from"styled-components";import{Link as g}from"react-router";import{useUrlHash as k}from"../../hooks/useUrlHash.js";import{useAtomValue as u}from"jotai";import{LinkIcon as b}from"@redocly/theme/icons/LinkIcon/LinkIcon";import{ClipboardService as x}from"@redocly/theme/core/openapi";import{globalOptionsAtom as y}from"../../jotai/store.js";import{hashToElementId as s}from"../../utils/deep-link.js";function A({to:e,label:c,variant:p="heading"}){const{onDeepLinkClick:i}=u(y),m=k({trackSilentReplaces:!0}),t=e.split("#")[1],d=!!t&&s(m)===s(t),h=v(n=>{x.copyCustom(n.currentTarget.href),i&&(n.preventDefault(),i(e))},[i,e]);return o(C,{className:"deep-link-anchor","data-deep-link-anchor":!0,children:o(L,{$variant:p,to:e,"aria-label":c??`link to ${e}`,"aria-current":d?"location":void 0,onClick:h,children:o(b,{color:"--heading-anchor-color"})})})}const j=f(A),r="data-deep-link-anchor",O=`
2
+ & [${r}] svg {
3
3
  visibility: hidden;
4
4
  }
5
- &:hover [${n}] svg,
6
- & [${n}] a:focus svg {
5
+ &:hover [${r}] svg,
6
+ & [${r}] a:focus svg {
7
7
  visibility: visible;
8
8
  }
9
- `,C=t.span`
9
+ `,C=a.span`
10
10
  position: relative;
11
11
  display: inline-flex;
12
12
  align-items: center;
13
13
  vertical-align: middle;
14
- `,L=t(g)`
14
+ `,L=a(g)`
15
15
  position: absolute;
16
16
  top: 50%;
17
17
  transform: translate(-100%, -50%);
@@ -19,9 +19,9 @@ import{jsx as o}from"react/jsx-runtime";import{memo as f,useCallback as v}from"r
19
19
  display: flex;
20
20
  align-items: center;
21
21
 
22
- ${({$variant:i})=>i==="field"?a`
22
+ ${({$variant:e})=>e==="field"?l`
23
23
  left: -2px;
24
- `:a`
24
+ `:l`
25
25
  left: 0;
26
26
  padding-right: var(--heading-anchor-offset-right, 4px);
27
27
  `}
@@ -29,4 +29,4 @@ import{jsx as o}from"react/jsx-runtime";import{memo as f,useCallback as v}from"r
29
29
  &&[aria-current] svg {
30
30
  visibility: visible;
31
31
  }
32
- `;export{n as DEEP_LINK_ANCHOR_ATTR,j as DeepLinkAnchor,w as deepLinkHoverReveal};
32
+ `;export{r as DEEP_LINK_ANCHOR_ATTR,j as DeepLinkAnchor,O as deepLinkHoverReveal};
@@ -1,4 +1,4 @@
1
- import{jsx as o,jsxs as n}from"react/jsx-runtime";import{styled as t}from"styled-components";import{CheckmarkIcon as c}from"@redocly/theme/icons/CheckmarkIcon/CheckmarkIcon";const u=({header:e,title:r,actions:s,active:i,withCheckmark:a,children:l})=>n(d,{children:[n(x,{children:[e&&(typeof e=="string"?o(m,{children:e}):e),n(f,{active:i,suppressHydrationWarning:!0,children:[a&&i&&o(h,{"data-testid":"panel-item-checkmark"})," ",r]}),l]}),o(g,{children:s?.map(p=>p)})]}),d=t.span`
1
+ import{jsx as o,jsxs as n}from"react/jsx-runtime";import{styled as t}from"styled-components";import{CheckmarkIcon as c}from"@redocly/theme/icons/CheckmarkIcon/CheckmarkIcon";const u=({header:e,title:r,actions:s,active:i,withCheckmark:a,children:l})=>n(d,{children:[n(x,{children:[e&&(typeof e=="string"?o(m,{children:e}):e),n(f,{active:i,suppressHydrationWarning:!0,children:[a&&i&&o(g,{"data-testid":"panel-item-checkmark"})," ",r]}),l]}),o(h,{children:s?.map(p=>p)})]}),d=t.span`
2
2
  display: flex;
3
3
  justify-content: space-between;
4
4
  align-items: center;
@@ -15,7 +15,7 @@ import{jsx as o,jsxs as n}from"react/jsx-runtime";import{styled as t}from"styled
15
15
  text-align: left;
16
16
  color: var(--menu-content-title-color);
17
17
  font-size: var(--h6-font-size);
18
- line-height: var(--line-height-xsm);
18
+ line-height: var(--h6-line-height);
19
19
  `,f=t.div`
20
20
  margin: 0;
21
21
  color: var(--text-color-secondary);
@@ -24,7 +24,7 @@ import{jsx as o,jsxs as n}from"react/jsx-runtime";import{styled as t}from"styled
24
24
  overflow: hidden;
25
25
  text-overflow: ellipsis;
26
26
  font-weight: ${({active:e})=>e&&"var(--font-weight-medium)"};
27
- `,g=t.div`
27
+ `,h=t.div`
28
28
  display: flex;
29
29
  gap: var(--spacing-xs);
30
30
  `,w=t.div`
@@ -44,7 +44,7 @@ import{jsx as o,jsxs as n}from"react/jsx-runtime";import{styled as t}from"styled
44
44
  font-size: var(--font-size-base);
45
45
  line-height: var(--line-height-base);
46
46
  font-weight: var(--font-weight-medium);
47
- `,h=t(c)`
47
+ `,g=t(c)`
48
48
  width: 14px;
49
49
  height: 14px;
50
50
  position: absolute;
@@ -59,4 +59,4 @@ import{jsx as o,jsxs as n}from"react/jsx-runtime";import{styled as t}from"styled
59
59
  display: flex;
60
60
  justify-content: space-between;
61
61
  align-items: center;
62
- `;export{g as ActionsWrapper,m as Header,x as Item,u as PanelItem,j as PanelItemDescription,d as PanelItemWrapper,w as PanelItemsList,I as ServerTitleWrapper,h as StyledCheckmarkIcon,f as Title,k as TitleWrap};
62
+ `;export{h as ActionsWrapper,m as Header,x as Item,u as PanelItem,j as PanelItemDescription,d as PanelItemWrapper,w as PanelItemsList,I as ServerTitleWrapper,g as StyledCheckmarkIcon,f as Title,k as TitleWrap};
@@ -9,7 +9,7 @@ import{styled as o}from"styled-components";function e(r){return r.startsWith("2"
9
9
  align-items: center;
10
10
  padding: 0 var(--spacing-sm);
11
11
  height: 24px;
12
- border-radius: var(--border-radius);
12
+ border-radius: var(--border-radius-md);
13
13
  border: none;
14
14
  cursor: pointer;
15
15
  font-family: var(--font-family-base);
@@ -4,7 +4,7 @@ import{styled as r}from"styled-components";const o=r.span`
4
4
  font-family: var(--font-family-monospaced);
5
5
  font-size: var(--font-size-sm);
6
6
  line-height: var(--line-height-sm);
7
- border-radius: var(--border-radius);
7
+ border-radius: var(--tag-border-radius);
8
8
  color: var(--text-color-secondary);
9
9
  display: inline-flex;
10
10
  word-break: var(--code-word-break);
@@ -1,5 +1,5 @@
1
1
  import{Fragment as a,jsx as o,jsxs as t}from"react/jsx-runtime";import{memo as e}from"react";import{styled as s}from"styled-components";import{Markdown as i}from"@redocly/theme/components/Markdown/Markdown";function m({extensions:r}){return Object.keys(r).length===0?null:o(a,{children:Object.keys(r).map(n=>t(i,{children:[t(f,{children:[n.substring(2),": "]})," ",o(l,{children:typeof r[n]=="string"?r[n]:JSON.stringify(r[n])})]},n))})}const h=e(m),f=s.span`
2
2
  font-weight: var(--font-weight-semibold);
3
3
  `,l=s.span`
4
- font-family: var(--font-family-monospace);
4
+ font-family: var(--font-family-monospaced);
5
5
  `;export{h as VendorExtensions};
@@ -1,4 +1,4 @@
1
- import{Fragment as c,jsx as e,jsxs as l}from"react/jsx-runtime";import{styled as a,css as d}from"styled-components";import{memo as $,useState as j}from"react";import{isUndefined as N}from"@redocly/theme/core/openapi";import{cycleColorsByLevel as C}from"../Schema/utils.js";import{NestedToggleButton as L}from"./NestedToggleButton.js";function S({expandByDefault:r,level:g,expandable:f=!1,expandText:v,hideText:x,hideDivider:h=!1,children:s,expandedAll:i,isNestedArray:n}){const[b,u]=j((r||n)??!1),o=N(i)?b:i,t=o?C(g):void 0;if(!f)return s;const y=()=>{u(w=>!w)};return n?l(c,{children:[e(_,{children:"Array ["}),e(m,{$isArrayInsideArray:n,className:"view-nested-wrapper",children:e(p,{color:t,children:s})})]}):e(c,{children:l(m,{$divider:!h&&!o,className:"view-nested-wrapper",children:[e(V,{expanded:o,label:o?x||"":v||"",color:t,onClick:y}),o&&e(p,{color:t,children:s})]})})}const I=$(S),V=a(L)`
1
+ import{Fragment as c,jsx as e,jsxs as l}from"react/jsx-runtime";import{styled as a,css as d}from"styled-components";import{memo as $,useState as j}from"react";import{isUndefined as N}from"@redocly/theme/core/openapi";import{cycleColorsByLevel as C}from"../Schema/utils.js";import{NestedToggleButton as L}from"./NestedToggleButton.js";function S({expandByDefault:r,level:g,expandable:f=!1,expandText:v,hideText:x,hideDivider:h=!1,children:s,expandedAll:i,isNestedArray:t}){const[b,u]=j((r||t)??!1),o=N(i)?b:i,n=o?C(g):void 0;if(!f)return s;const y=()=>{u(w=>!w)};return t?l(c,{children:[e(_,{children:"Array ["}),e(m,{$isArrayInsideArray:t,className:"view-nested-wrapper",children:e(p,{color:n,children:s})})]}):e(c,{children:l(m,{$divider:!h&&!o,className:"view-nested-wrapper",children:[e(V,{expanded:o,label:o?x||"":v||"",color:n,onClick:y}),o&&e(p,{color:n,children:s})]})})}const I=$(S),V=a(L)`
2
2
  margin: var(--spacing-xxs) 0 var(--spacing-xs);
3
3
  width: 100%;
4
4
  `,p=a.div`
@@ -22,7 +22,7 @@ import{Fragment as c,jsx as e,jsxs as l}from"react/jsx-runtime";import{styled as
22
22
  `}
23
23
  `,_=a.span`
24
24
  padding: 0 var(--spacing-xs);
25
- border-radius: var(--border-radius);
25
+ border-radius: var(--tag-border-radius);
26
26
  border: 1px solid var(--border-color-secondary);
27
27
  background-color: var(--bg-color);
28
28
  font-size: var(--font-size-sm);