@redocly/api-docs 0.2.0-next.5 → 0.2.0-next.7

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 (173) 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/items/overview/content.js +1 -1
  7. package/lib/adapters/graphql/group/utils.js +1 -1
  8. package/lib/adapters/graphql/utils/createApiItem.js +1 -1
  9. package/lib/adapters/openapi/build-code-sample-source.d.ts +1 -1
  10. package/lib/adapters/openapi/build-code-sample-source.js +1 -1
  11. package/lib/adapters/openapi/configure/merge-utils.d.ts +1 -1
  12. package/lib/adapters/openapi/configure/resolve-request-values.js +1 -1
  13. package/lib/adapters/openapi/index.js +1 -1
  14. package/lib/adapters/openapi/items/operation/content.js +1 -1
  15. package/lib/adapters/openapi/items/operation/item.js +1 -1
  16. package/lib/adapters/openapi/items/overview/content.js +1 -1
  17. package/lib/adapters/openapi/utils/merge-mock-server.d.ts +2 -2
  18. package/lib/adapters/utils/markdoc.d.ts +4 -1
  19. package/lib/adapters/utils/markdoc.js +1 -1
  20. package/lib/components/ErrorBoundary.d.ts +4 -2
  21. package/lib/components/ErrorBoundary.js +1 -1
  22. package/lib/components/Header/HeaderItem.js +5 -5
  23. package/lib/components/Header/HeaderPageActions.d.ts +4 -0
  24. package/lib/components/Header/HeaderPageActions.js +1 -0
  25. package/lib/components/Header/PageActions.d.ts +4 -0
  26. package/lib/components/Header/PageActions.js +11 -0
  27. package/lib/components/ItemContent/sections/MessagesSection.js +1 -1
  28. package/lib/components/Mcp/McpPrompt.js +1 -1
  29. package/lib/components/Mcp/McpTool.js +1 -1
  30. package/lib/components/Mcp/utils.d.ts +1 -1
  31. package/lib/components/Mcp/utils.js +1 -1
  32. package/lib/components/Schema/styled.js +4 -4
  33. package/lib/components/Schema/views/ArrayRenderer.js +1 -1
  34. package/lib/components/Schema/views/DiscriminatorPropertyRow.js +1 -1
  35. package/lib/components/Schema/views/Examples.js +1 -1
  36. package/lib/components/Search/index.d.ts +15 -0
  37. package/lib/components/Search/index.js +1 -0
  38. package/lib/components/Security/SecurityFlowDetail.js +1 -1
  39. package/lib/components/Security/styled.js +7 -7
  40. package/lib/components/StickySidebar/FloatingButton.d.ts +1 -0
  41. package/lib/components/StickySidebar/FloatingButton.js +32 -0
  42. package/lib/components/StickySidebar/RedoclyAttributionLogo.d.ts +5 -0
  43. package/lib/components/StickySidebar/RedoclyAttributionLogo.js +1 -0
  44. package/lib/components/StickySidebar/StickySidebar.js +33 -9
  45. package/lib/components/common/Breadcrumbs.js +2 -2
  46. package/lib/components/common/ResponseCodeTabs.js +1 -1
  47. package/lib/components/common/Tag.js +1 -1
  48. package/lib/components/common/ViewNested.js +2 -2
  49. package/lib/components/graphql/GraphQLFieldView.js +1 -1
  50. package/lib/components/graphql/RequiresScopesModal.js +3 -3
  51. package/lib/components/graphql/sections/GraphQLArgsSection.js +1 -1
  52. package/lib/components/markdoc/SchemaDefinition.js +1 -1
  53. package/lib/components/panels/ExampleItem/CodeSampleItem.js +1 -1
  54. package/lib/components/panels/ExampleItem/ResponseExampleItem.js +1 -1
  55. package/lib/components/panels/ExampleItem/SecuritySchemeSelector.d.ts +9 -0
  56. package/lib/components/panels/ExampleItem/SecuritySchemeSelector.js +1 -0
  57. package/lib/components/panels/ExampleItem/ServerDropdown.js +1 -1
  58. package/lib/components/panels/ExampleItem/generate-request-sample.d.ts +28 -0
  59. package/lib/components/panels/ExampleItem/generate-request-sample.js +1 -0
  60. package/lib/components/panels/ExampleItem/styled.d.ts +1 -49
  61. package/lib/components/panels/ExampleItem/useActiveServer.d.ts +17 -0
  62. package/lib/components/panels/ExampleItem/useActiveServer.js +1 -0
  63. package/lib/components/panels/ExampleItem/useCodeSampleLanguages.d.ts +23 -0
  64. package/lib/components/panels/ExampleItem/useCodeSampleLanguages.js +1 -0
  65. package/lib/components/panels/ExampleItem/useReplayRequestState.d.ts +18 -0
  66. package/lib/components/panels/ExampleItem/useReplayRequestState.js +1 -0
  67. package/lib/components/panels/ExampleItem/useTryItFooter.d.ts +3 -0
  68. package/lib/components/panels/ExampleItem/useTryItFooter.js +7 -0
  69. package/lib/components/panels/GroupPanelItem.js +1 -1
  70. package/lib/components/panels/LanguageItem/LanguagePanelItem.js +5 -1
  71. package/lib/components/panels/LanguageItem/styled.js +17 -14
  72. package/lib/components/panels/McpExamplePanelItem.js +2 -2
  73. package/lib/components/panels/McpPanelItem.js +2 -2
  74. package/lib/components/panels/ServerItem/ServerItem.js +1 -1
  75. package/lib/components/panels/asyncapi/BrokerItem/BrokerModal.js +1 -1
  76. package/lib/components/panels/asyncapi/BrokerItem/BrokerPanelItem.js +1 -1
  77. package/lib/components/panels/shared-panel-styles.js +1 -1
  78. package/lib/components/panels/styled.js +1 -1
  79. package/lib/components/pluggable/RedocResponseSamples.js +1 -1
  80. package/lib/hoc/withLicenseGate.d.ts +5 -0
  81. package/lib/hoc/withLicenseGate.js +1 -0
  82. package/lib/hoc/withStoreProvider.d.ts +2 -0
  83. package/lib/hoc/withStoreProvider.js +1 -1
  84. package/lib/hooks/useCopySpecSlice.d.ts +9 -0
  85. package/lib/hooks/useCopySpecSlice.js +1 -0
  86. package/lib/hooks/useInitialTelemetry.d.ts +2 -0
  87. package/lib/hooks/useInitialTelemetry.js +1 -0
  88. package/lib/hooks/useLicense.js +1 -1
  89. package/lib/hooks/useLicenseGate.d.ts +6 -0
  90. package/lib/hooks/useLicenseGate.js +1 -0
  91. package/lib/hooks/useScrollSpyUrlSync.js +1 -1
  92. package/lib/index.d.ts +6 -1
  93. package/lib/index.js +1 -1
  94. package/lib/jotai/app.d.ts +6 -0
  95. package/lib/jotai/app.js +1 -1
  96. package/lib/jotai/examples.js +1 -1
  97. package/lib/jotai/store.d.ts +4 -0
  98. package/lib/jotai/store.js +1 -1
  99. package/lib/options/editionOverrides.d.ts +3 -0
  100. package/lib/options/editionOverrides.js +1 -0
  101. package/lib/options/helpers.d.ts +1 -2
  102. package/lib/options/helpers.js +1 -1
  103. package/lib/options/normalizeOptions.d.ts +1 -1
  104. package/lib/options/normalizeOptions.js +1 -1
  105. package/lib/options/standaloneLayoutVars.d.ts +3 -0
  106. package/lib/options/standaloneLayoutVars.js +1 -0
  107. package/lib/pages/ItemPage.js +4 -2
  108. package/lib/services/code-samples/apply-env-variables.d.ts +8 -0
  109. package/lib/services/code-samples/apply-env-variables.js +1 -0
  110. package/lib/services/code-samples/builder.js +1 -1
  111. package/lib/services/code-samples/language-availability.d.ts +4 -0
  112. package/lib/services/code-samples/language-availability.js +1 -0
  113. package/lib/services/code-samples/{replay/normalize-servers.d.ts → normalize-servers.d.ts} +1 -1
  114. package/lib/services/code-samples/normalize-servers.js +1 -0
  115. package/lib/services/code-samples/replay/from-openapi-document.d.ts +8 -1
  116. package/lib/services/code-samples/replay/from-openapi-document.js +1 -1
  117. package/lib/services/code-samples/replay/index.d.ts +1 -1
  118. package/lib/services/code-samples/replay/index.js +1 -1
  119. package/lib/services/code-samples/replay/replay-predefined-env.d.ts +1 -2
  120. package/lib/services/code-samples/replay/replay-predefined-env.js +1 -1
  121. package/lib/services/code-samples/server-env.d.ts +3 -0
  122. package/lib/services/code-samples/server-env.js +1 -0
  123. package/lib/services/code-samples/source.d.ts +3 -3
  124. package/lib/services/license/check.d.ts +1 -0
  125. package/lib/services/license/check.js +1 -1
  126. package/lib/services/operation-samples/index.js +1 -1
  127. package/lib/services/search/indexer.d.ts +9 -0
  128. package/lib/services/search/indexer.js +1 -0
  129. package/lib/services/search/types.d.ts +27 -0
  130. package/lib/services/search/types.js +0 -0
  131. package/lib/services/spec-slice/assistant-links.d.ts +9 -0
  132. package/lib/services/spec-slice/assistant-links.js +5 -0
  133. package/lib/services/spec-slice/asyncapi-slice.d.ts +5 -0
  134. package/lib/services/spec-slice/asyncapi-slice.js +1 -0
  135. package/lib/services/spec-slice/clone-strip.d.ts +1 -0
  136. package/lib/services/spec-slice/clone-strip.js +1 -0
  137. package/lib/services/spec-slice/component-closure.d.ts +6 -0
  138. package/lib/services/spec-slice/component-closure.js +1 -0
  139. package/lib/services/spec-slice/graphql-slice.d.ts +2 -0
  140. package/lib/services/spec-slice/graphql-slice.js +1 -0
  141. package/lib/services/spec-slice/index.d.ts +6 -0
  142. package/lib/services/spec-slice/index.js +1 -0
  143. package/lib/services/spec-slice/openapi-slice.d.ts +6 -0
  144. package/lib/services/spec-slice/openapi-slice.js +1 -0
  145. package/lib/services/spec-slice/resolve-scope.d.ts +4 -0
  146. package/lib/services/spec-slice/resolve-scope.js +1 -0
  147. package/lib/services/spec-slice/types.d.ts +37 -0
  148. package/lib/services/spec-slice/types.js +0 -0
  149. package/lib/standalone.d.ts +19 -0
  150. package/lib/standalone.js +2 -0
  151. package/lib/standaloneThemeConfig.d.ts +3 -0
  152. package/lib/standaloneThemeConfig.js +1 -0
  153. package/lib/telemetry/RedocTelemetry.d.ts +3 -0
  154. package/lib/telemetry/RedocTelemetry.js +1 -1
  155. package/lib/telemetry/defaults.d.ts +2 -0
  156. package/lib/telemetry/defaults.js +1 -0
  157. package/lib/types/code-samples-config.d.ts +68 -0
  158. package/lib/types/code-samples-config.js +0 -0
  159. package/lib/types/common.d.ts +1 -1
  160. package/lib/types/content.d.ts +4 -3
  161. package/lib/types/edition-config.d.ts +4 -0
  162. package/lib/types/edition-config.js +0 -0
  163. package/lib/types/events.d.ts +2 -2
  164. package/lib/types/openapi.d.ts +2 -1
  165. package/lib/types/options.d.ts +24 -88
  166. package/lib/utils/compose.d.ts +1 -0
  167. package/lib/utils/deep-link.d.ts +1 -0
  168. package/lib/utils/deep-link.js +1 -1
  169. package/lib/utils/extract-extensions.js +1 -1
  170. package/lib/utils/x-logo.d.ts +13 -0
  171. package/lib/utils/x-logo.js +1 -0
  172. package/package.json +19 -8
  173. package/lib/services/code-samples/replay/normalize-servers.js +0 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@redocly/api-docs",
3
- "version": "0.2.0-next.5",
3
+ "version": "0.2.0-next.7",
4
4
  "description": "Redocly API Documentation Library",
5
5
  "type": "module",
6
6
  "license": "SEE LICENSE IN LICENSE.md",
@@ -49,12 +49,15 @@
49
49
  "url-template": "^2.0.8",
50
50
  "web-vitals": "3.3.1",
51
51
  "@redocly/allof-merge": "0.6.9",
52
- "@redocly/config": "0.53.1",
53
- "@redocly/redoc-opentelemetry": "0.2.3",
54
- "@redocly/replay": "0.28.0-next.5",
55
- "@redocly/theme": "^0.69.0-next.5"
52
+ "@redocly/config": "0.55.0",
53
+ "@redocly/redoc-opentelemetry": "0.2.4",
54
+ "@redocly/replay": "0.28.0-next.6",
55
+ "@redocly/theme": "^0.69.0-next.6"
56
56
  },
57
57
  "devDependencies": {
58
+ "@microsoft/api-extractor": "7.58.2",
59
+ "@playwright/test": "1.60.0",
60
+ "@redocly/ajv": "8.18.0",
58
61
  "@testing-library/jest-dom": "6.6.3",
59
62
  "@testing-library/react": "16.3.0",
60
63
  "@types/js-yaml": "4.0.9",
@@ -64,11 +67,13 @@
64
67
  "@types/react": "^19.2.7",
65
68
  "@types/react-dom": "^19.2.3",
66
69
  "@types/swagger2openapi": "^7.0.4",
67
- "@vitejs/plugin-react-swc": "4.3.1",
70
+ "@vitejs/plugin-react": "6.0.1",
68
71
  "@vitest/browser-playwright": "4.1.10",
69
72
  "@vitest/coverage-v8": "4.1.10",
70
73
  "esbuild": "0.28.1",
74
+ "flexsearch": "^0.8.2",
71
75
  "globals": "^16.5.0",
76
+ "http-server": "14.1.1",
72
77
  "jest-styled-components": "7.2.0",
73
78
  "react": "^19.2.7",
74
79
  "react-dom": "^19.2.7",
@@ -77,7 +82,7 @@
77
82
  "tsx": "^4.20.6",
78
83
  "typescript": "6.0.3",
79
84
  "url": "~0.11.0",
80
- "vite": "^7.2.4",
85
+ "vite": "8.1.0",
81
86
  "vitest": "4.1.10",
82
87
  "vitest-browser-react": "^2.0.2"
83
88
  },
@@ -99,10 +104,16 @@
99
104
  "analyze:bundle": "vite build --mode analyze",
100
105
  "watch": "tsgo -w -p tsconfig.build.json",
101
106
  "clean": "rimraf bundle lib",
107
+ "prepare:community-source": "tsx ./scripts/prepare-community-source.ts",
108
+ "prepare:community-dependencies": "tsx ./scripts/prepare-community-dependencies.ts",
109
+ "apply:community-source": "tsx ./scripts/apply-changes-from-community-source.ts",
110
+ "stage:ce": "pnpm run prepare:community-dependencies && pnpm run prepare:community-source",
111
+ "e2e:ce": "pnpm run stage:ce && cd redoc && REDOC_THEME_PATH=../../theme/src npm run e2e",
112
+ "lint:ce": "cd redoc && test -d src && test -d e2e && test -f vitest.setup.ts && find src e2e vitest.setup.ts -type f \\( -name '*.ts' -o -name '*.tsx' -o -name '*.cts' -o -name '*.mts' \\) -print0 | xargs -0 ./node_modules/.bin/oxlint --max-warnings=0",
102
113
  "test": "nx run vitest:test",
103
114
  "test:update": "nx run vitest:test -u --skip-nx-cache",
104
115
  "test:coverage:html": "nx run vitest:test --coverage --coverage.reporter=html --exclude 'tools/**'",
105
- "test:tools": "vitest run tools",
116
+ "test:ce": "pnpm run stage:ce && cd redoc && npm run unit",
106
117
  "ts:check": "tsgo -p tsconfig.build.json --noEmit --skipLibCheck"
107
118
  }
108
119
  }
@@ -1 +0,0 @@
1
- import{isAbsoluteUrl as l,removeQueryStringAndHash as o,resolveUrl as s}from"../../../adapters/openapi/utils/helpers.js";import{getUrlDirname as i}from"../../../adapters/openapi/utils/url.js";import{IS_BROWSER as u}from"../../../utils/environments.js";function f(e){const t=o(e);if(!t||t.endsWith("/"))return t;const r=t.lastIndexOf("/");return r===-1?"":t.slice(0,r)}function a(e){return e===void 0?o((()=>{if(!u)return globalThis.SSR_HOSTNAME||"";const r=window.location.href;return r.endsWith(".html")&&i(r)||r})()):l(e)?i(e):f(e)}function m(e,t){const r=a(t);return r?s(r,e):e}function S(e,t){let r=t;return r.length===0&&(r=[{url:"/"}]),r.map(n=>({...n,url:m(n.url,e),description:n.description||""}))}export{S as normalizeServers,m as resolveServerUrl};