@redocly/revel 0.141.0-next.1 → 0.141.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.
- package/CHANGELOG.md +149 -0
- package/dist/cli/develop.js +1 -1
- package/dist/cli/utils/react-pages-check.d.ts +11 -0
- package/dist/cli/utils/react-pages-check.js +1 -0
- package/dist/client/App.js +1 -1
- package/dist/client/app/Sidebar/useSidebarItems.js +1 -1
- package/dist/client/app/hooks/useBanner.js +1 -1
- package/dist/client/app/hooks/useUserClaims.js +1 -1
- package/dist/client/app/webmcp/tools/shared.d.ts +2 -3
- package/dist/client/app/webmcp/tools/shared.js +1 -1
- package/dist/client/runtime/errors/page-async-component-error.d.ts +4 -0
- package/dist/client/runtime/errors/page-async-component-error.js +1 -0
- package/dist/client/runtime/loader.js +1 -1
- package/dist/constants/common.d.ts +2 -0
- package/dist/constants/common.js +1 -1
- package/dist/constants/l10n/langs/ar.js +1 -1
- package/dist/constants/l10n/langs/de.js +1 -1
- package/dist/constants/l10n/langs/en.js +1 -1
- package/dist/constants/l10n/langs/es.js +1 -1
- package/dist/constants/l10n/langs/fr.js +1 -1
- package/dist/constants/l10n/langs/hi.js +1 -1
- package/dist/constants/l10n/langs/it.js +1 -1
- package/dist/constants/l10n/langs/ja.js +1 -1
- package/dist/constants/l10n/langs/ko.js +1 -1
- package/dist/constants/l10n/langs/pl.js +1 -1
- package/dist/constants/l10n/langs/pt-BR.js +1 -1
- package/dist/constants/l10n/langs/pt.js +1 -1
- package/dist/constants/l10n/langs/ru.js +1 -1
- package/dist/constants/l10n/langs/uk.js +1 -1
- package/dist/constants/l10n/langs/zh.js +1 -1
- package/dist/markdoc/tags/index.d.ts +6 -18
- package/dist/server/api-routes/run-api-routes-worker.js +1 -1
- package/dist/server/constants/entitlements.js +1 -1
- package/dist/server/entitlements/entitlements-provider.d.ts +4 -0
- package/dist/server/entitlements/entitlements-provider.js +1 -1
- package/dist/server/entitlements/plan-denied-markdoc-tags.d.ts +6 -0
- package/dist/server/entitlements/plan-denied-markdoc-tags.js +1 -0
- package/dist/server/fs/fast-mtime.js +3 -3
- package/dist/server/fs/fs.js +1 -1
- package/dist/server/plugins/api-docs/index.js +1 -1
- package/dist/server/plugins/api-docs/options.js +1 -1
- package/dist/server/plugins/api-docs/search/get-ai-search-documents.js +9 -9
- package/dist/server/plugins/api-docs/spec-download.api.js +1 -1
- package/dist/server/plugins/config-parser/format-error.js +2 -2
- package/dist/server/plugins/config-parser/loaders/utils/read-and-validate-config.js +1 -1
- package/dist/server/plugins/markdown/compiler.d.ts +3 -3
- package/dist/server/plugins/markdown/compiler.js +1 -1
- package/dist/server/plugins/markdown/markdoc/markdoc-options.d.ts +2 -0
- package/dist/server/plugins/markdown/markdoc/markdoc-options.js +1 -1
- package/dist/server/plugins/mcp/custom-tools/scan-custom-tools.d.ts +4 -1
- package/dist/server/plugins/mcp/custom-tools/scan-custom-tools.js +1 -1
- package/dist/server/plugins/mcp/index.js +1 -1
- package/dist/server/plugins/mcp/types.d.ts +1 -0
- package/dist/server/plugins/pages/validators/validate-react-pages.d.ts +8 -1
- package/dist/server/plugins/pages/validators/validate-react-pages.js +1 -1
- package/dist/server/plugins/search/ai-indexer/prepare-semantic-documents.js +1 -1
- package/dist/server/plugins/search/llmstxt/create-llms-txt-generator.js +1 -1
- package/dist/server/plugins/search/llmstxt/index.js +4 -4
- package/dist/server/ssr/server-side-props/get-default-static-props.d.ts +1 -0
- package/dist/server/ssr/utils.js +11 -9
- package/dist/server/store.js +1 -1
- package/dist/server/types/plugins/common.d.ts +4 -0
- package/dist/server/types/web-server.d.ts +5 -0
- package/dist/server/utils/errors.d.ts +2 -1
- package/dist/server/utils/errors.js +1 -1
- package/dist/server/utils/llmstxt/resolve-llms-txt-md.d.ts +5 -0
- package/dist/server/utils/llmstxt/resolve-llms-txt-md.js +1 -1
- package/dist/server/web-server/auth.js +3 -3
- package/dist/server/web-server/routes/dynamic-route.js +1 -1
- package/dist/server/web-server/routes/error.js +1 -1
- package/dist/server/web-server/routes/index.js +1 -1
- package/dist/server/web-server/routes/page-data.d.ts +2 -1
- package/dist/server/web-server/routes/page-data.js +1 -1
- package/dist/server/web-server/utils.d.ts +1 -1
- package/dist/server/web-server/utils.js +1 -1
- package/dist/types/entitlements.d.ts +4 -0
- package/package.json +10 -10
- package/dist/server/utils/llmstxt/get-llms-txt-md-path-by-slug.d.ts +0 -19
- package/dist/server/utils/llmstxt/get-llms-txt-md-path-by-slug.js +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,144 @@
|
|
|
1
1
|
# @redocly/revel
|
|
2
2
|
|
|
3
|
+
## 0.141.0-next.10
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [9e272e1aff2]
|
|
8
|
+
- Updated dependencies [ca4455d723b]
|
|
9
|
+
- Updated dependencies [04d865fde45]
|
|
10
|
+
- @redocly/api-docs@0.6.0-next.10
|
|
11
|
+
- @redocly/theme@0.73.0-next.6
|
|
12
|
+
|
|
13
|
+
## 0.141.0-next.9
|
|
14
|
+
|
|
15
|
+
### Patch Changes
|
|
16
|
+
|
|
17
|
+
- 34b3907f614: Fixed an issue where OIDC login failed with `500 Internal Server Error` and no log entry when the identity provider was unreachable.
|
|
18
|
+
- fe9f667400f: Fixed an issue where pages crashed when the browser blocked cookies and site data.
|
|
19
|
+
- 34b3907f614: Fixed an issue in local preview where opening the URL of an RBAC-protected page directly returned `Internal Server Error` instead of redirecting to the login page when the identity provider was unreachable.
|
|
20
|
+
- 0d8111de219: Fixed an issue that caused the sidebar to jump when navigating to the current page in Chrome, Edge, and Safari. The sidebar scrolls only as far as needed to show the current page, without scrolling the page itself.
|
|
21
|
+
The sidebar scrolls only as far as needed to show the current page, and the page itself no longer scrolls.
|
|
22
|
+
- 673a2905e2c: Fixed an issue where a local SVG file set as the `icon` of a `tab` Markdoc tag displayed as an image and did not use the text color.
|
|
23
|
+
The icon renders as an inline SVG, as card and numbered list icons do.
|
|
24
|
+
- Updated dependencies [9299252c6a3]
|
|
25
|
+
- Updated dependencies [439d85d8486]
|
|
26
|
+
- Updated dependencies [fe9f667400f]
|
|
27
|
+
- Updated dependencies [0d8111de219]
|
|
28
|
+
- Updated dependencies [673a2905e2c]
|
|
29
|
+
- @redocly/api-docs@0.6.0-next.9
|
|
30
|
+
- @redocly/theme@0.73.0-next.5
|
|
31
|
+
- @redocly/portal-plugin-mock-server@0.26.0-next.3
|
|
32
|
+
|
|
33
|
+
## 0.141.0-next.8
|
|
34
|
+
|
|
35
|
+
### Patch Changes
|
|
36
|
+
|
|
37
|
+
- ef4b5acde6b: Fixed security vulnerabilities `CVE-2026-126355`, `CVE-2026-126356`, `CVE-2026-126357`, `CVE-2026-126358` and `CVE-2026-126359` by upgrading `hono` to version `4.13.18`.
|
|
38
|
+
- eb7c2577b5c: Updated `@redocly/openapi-core` to version `2.78.0`.
|
|
39
|
+
- e2f013813c6: Fixed an issue where **Copy for LLM**, **View as Markdown**, **Open in ChatGPT**, **Open in Claude**, and **Open in Grok** page actions were displayed and failed on pages without a Markdown copy.
|
|
40
|
+
- Updated dependencies [27c9c56babc]
|
|
41
|
+
- Updated dependencies [eb7c2577b5c]
|
|
42
|
+
- Updated dependencies [457d1e5a3e2]
|
|
43
|
+
- Updated dependencies [e2f013813c6]
|
|
44
|
+
- Updated dependencies [1b5009c48c7]
|
|
45
|
+
- @redocly/api-docs@0.6.0-next.8
|
|
46
|
+
- @redocly/theme@0.73.0-next.4
|
|
47
|
+
- @redocly/realm-asyncapi-sdk@0.18.0-next.1
|
|
48
|
+
- @redocly/portal-plugin-mock-server@0.26.0-next.2
|
|
49
|
+
|
|
50
|
+
## 0.141.0-next.7
|
|
51
|
+
|
|
52
|
+
### Patch Changes
|
|
53
|
+
|
|
54
|
+
- b99335804a3: Fixed an issue where the copy button of a code block and of a code walkthrough file copied the `[!code highlight]`, `[!code warning]` and other highlight notation comments along with the code.
|
|
55
|
+
- 5ab244099d2: Fixed an issue where the page could not be scrolled after the browser window was resized from a mobile or tablet width to a desktop width while the navigation menu was open.
|
|
56
|
+
- e8d0e1e092b: Fixed an issue where a React page that exports an async component displayed a blank page in preview.
|
|
57
|
+
- e8d0e1e092b: Added React page runtime errors to the preview status bar and terminal summary.
|
|
58
|
+
- Updated dependencies [2be77ebbf13]
|
|
59
|
+
- Updated dependencies [73daff36df4]
|
|
60
|
+
- Updated dependencies [3b0144f79a9]
|
|
61
|
+
- Updated dependencies [2be77ebbf13]
|
|
62
|
+
- Updated dependencies [5ebf95c0652]
|
|
63
|
+
- Updated dependencies [3b0144f79a9]
|
|
64
|
+
- Updated dependencies [930a9104e7e]
|
|
65
|
+
- Updated dependencies [784206189dd]
|
|
66
|
+
- Updated dependencies [2be77ebbf13]
|
|
67
|
+
- Updated dependencies [d21d3af6b99]
|
|
68
|
+
- Updated dependencies [3e29b8a269e]
|
|
69
|
+
- Updated dependencies [b9f395893a4]
|
|
70
|
+
- Updated dependencies [b99335804a3]
|
|
71
|
+
- Updated dependencies [3bfc48009ff]
|
|
72
|
+
- Updated dependencies [5ab244099d2]
|
|
73
|
+
- Updated dependencies [0eb19a57733]
|
|
74
|
+
- Updated dependencies [d58e22e0695]
|
|
75
|
+
- Updated dependencies [ee2291668f4]
|
|
76
|
+
- Updated dependencies [ee2291668f4]
|
|
77
|
+
- @redocly/api-docs@0.6.0-next.7
|
|
78
|
+
- @redocly/theme@0.73.0-next.3
|
|
79
|
+
|
|
80
|
+
## 0.141.0-next.6
|
|
81
|
+
|
|
82
|
+
### Patch Changes
|
|
83
|
+
|
|
84
|
+
- 4fe1a869003: Fixed an issue where the cookie consent banner moved with animated page content in customized layouts.
|
|
85
|
+
- 4fe1a869003: Fixed an issue where the local preview floating bar moved with animated page content in customized layouts.
|
|
86
|
+
- Updated dependencies [79920583248]
|
|
87
|
+
- @redocly/api-docs@0.6.0-next.6
|
|
88
|
+
|
|
89
|
+
## 0.141.0-next.5
|
|
90
|
+
|
|
91
|
+
### Patch Changes
|
|
92
|
+
|
|
93
|
+
- 76ad8d5ae1c: Fixed an issue where raw `<html>`, `<head>`, or `<body>` elements in Markdown content caused the page to render without styles.
|
|
94
|
+
- 225ac7c52b5: Updated `@redocly/openapi-core` to version `2.77.0`.
|
|
95
|
+
- b85dd1b4834: Fixed a page crash that could occur when the code of the search dialog, the code snippet report dialog or another lazily loaded component failed to download.
|
|
96
|
+
The dialogs close and reopening them retries the download, and other components display a notice with a reload button in their place.
|
|
97
|
+
- a53968914cb: Fixed an issue where the sidebar expanded a collapsed group but did not scroll to the current page in that group after navigation from a content link, a search result, or the browser's back button.
|
|
98
|
+
- Updated dependencies [945a307610e]
|
|
99
|
+
- Updated dependencies [945a307610e]
|
|
100
|
+
- Updated dependencies [5086ff5c51e]
|
|
101
|
+
- Updated dependencies [b1b889a9a00]
|
|
102
|
+
- Updated dependencies [945a307610e]
|
|
103
|
+
- Updated dependencies [30906aeb59e]
|
|
104
|
+
- Updated dependencies [76ad8d5ae1c]
|
|
105
|
+
- Updated dependencies [225ac7c52b5]
|
|
106
|
+
- Updated dependencies [b85dd1b4834]
|
|
107
|
+
- Updated dependencies [a53968914cb]
|
|
108
|
+
- @redocly/api-docs@0.6.0-next.5
|
|
109
|
+
- @redocly/theme@0.73.0-next.2
|
|
110
|
+
- @redocly/realm-asyncapi-sdk@0.18.0-next.0
|
|
111
|
+
- @redocly/portal-plugin-mock-server@0.26.0-next.1
|
|
112
|
+
|
|
113
|
+
## 0.141.0-next.4
|
|
114
|
+
|
|
115
|
+
### Patch Changes
|
|
116
|
+
|
|
117
|
+
- Updated dependencies [c5f81a42aeb]
|
|
118
|
+
- @redocly/api-docs@0.6.0-next.4
|
|
119
|
+
|
|
120
|
+
## 0.141.0-next.3
|
|
121
|
+
|
|
122
|
+
### Patch Changes
|
|
123
|
+
|
|
124
|
+
- Updated dependencies [38837355900]
|
|
125
|
+
- Updated dependencies [84591aefc60]
|
|
126
|
+
- Updated dependencies [0072b265d34]
|
|
127
|
+
- Updated dependencies [4b1714e415e]
|
|
128
|
+
- @redocly/api-docs@0.6.0-next.3
|
|
129
|
+
- @redocly/theme@0.73.0-next.1
|
|
130
|
+
|
|
131
|
+
## 0.141.0-next.2
|
|
132
|
+
|
|
133
|
+
### Patch Changes
|
|
134
|
+
|
|
135
|
+
- 929e0c5c7a7: Improved warnings for the deprecated `reunite` option in `redocly.yaml` to show where it is set. Added a warning for the deprecated `cms` RBAC scope.
|
|
136
|
+
- 9d1266260aa: Fixed "Last updated" dates that showed the build time instead of the date of the last change.
|
|
137
|
+
- 929e0c5c7a7: Updated `@redocly/openapi-core` to version `2.75.0`.
|
|
138
|
+
- Updated dependencies [929e0c5c7a7]
|
|
139
|
+
- @redocly/api-docs@0.6.0-next.2
|
|
140
|
+
- @redocly/portal-plugin-mock-server@0.26.0-next.0
|
|
141
|
+
|
|
3
142
|
## 0.141.0-next.1
|
|
4
143
|
|
|
5
144
|
### Minor Changes
|
|
@@ -35,6 +174,16 @@
|
|
|
35
174
|
- Updated dependencies [646e97c1085]
|
|
36
175
|
- @redocly/api-docs@0.6.0-next.0
|
|
37
176
|
|
|
177
|
+
## 0.140.1
|
|
178
|
+
|
|
179
|
+
### Patch Changes
|
|
180
|
+
|
|
181
|
+
- da7da9cf1f6: Fixed "Last updated" dates that showed the build time instead of the date of the last change.
|
|
182
|
+
- Updated dependencies [e1adc81a31f]
|
|
183
|
+
- Updated dependencies [7f557d312cf]
|
|
184
|
+
- @redocly/theme@0.72.1
|
|
185
|
+
- @redocly/api-docs@0.5.1
|
|
186
|
+
|
|
38
187
|
## 0.140.0
|
|
39
188
|
|
|
40
189
|
### Minor Changes
|
package/dist/cli/develop.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{logger as t}from"../server/tools/notifiers/logger.js";import{reporter as c}from"../server/tools/notifiers/reporter.js";import{green as
|
|
1
|
+
import{logger as t}from"../server/tools/notifiers/logger.js";import{reporter as c}from"../server/tools/notifiers/reporter.js";import{green as w}from"../server/tools/notifiers/helpers/colors.js";import{envConfig as m}from"../server/config/env-config.js";import{resolveCache as R}from"../server/esbuild/plugins/themes-resolver.js";import{getBilledPagesCount as p}from"../server/utils/index.js";import{createClientCompiler as C,createServerCompiler as S}from"../server/esbuild/esbuild.js";import{initPlugins as h,runPlugins as f,writeClientEntries as E}from"../server/plugins/lifecycle.js";import{startDevServer as P}from"../server/web-server/dev-server.js";import{validateAllMarkdowns as g}from"../server/plugins/markdown/compiler.js";import{reportAllErrors as v}from"../server/utils/report-all-errors.js";import{validateAllowedPackages as y}from"../server/utils/validate-allowed-packages.js";import{copyMigrationsFolder as L}from"../server/providers/database/copy-migrations.js";import{listenStdin as T}from"./utils/listen-stdin.js";import{createReactPagesCheck as k}from"./utils/react-pages-check.js";const D=20;async function Y(i,e){t.info("Starting project preview mode."),e.devLogin=i["dev-login"]!==!1,E(e),t.startTiming("initial-js"),await A(e),t.infoTime("initial-js","JavaScript compiled");const{pluginInstances:o,lifecycleContext:n}=await h({contentDir:e.contentDir,outdir:e.outdir,serverOutDir:void 0,devLogin:e.devLogin,setGlobalConfig:e.setGlobalConfig});e.lifecycleContext=n,L(e),await f(o,e,n,{failFast:!0});const d=k(e,n),u=async a=>{const s=performance.now();c.clearErrors(),await y(),d.invalidate(),await f(o,e,n),m.REDOCLY_EXP_DISABLE_MD_VALIDATION?t.info("Skipping markdown validation step"):await g(e,n),a.some(({event:l})=>l==="code-updated")&&d.run(),O().then(async()=>{await v(n);const l=p(e.getAllRoutes()),b=c.summary(` \u{1F440} Last change processed in ${w(Math.round(performance.now()-s)+"ms")}`,l);e.runListeners("errors-updated",void 0,b),e.runListeners("pages-updated",void 0,l),e.runListeners("routes-updated")})};m.REDOCLY_EXP_DISABLE_MD_VALIDATION?t.info("Skipping markdown validation step"):await g(e,n),await v(n);const r=p(e.getAllRoutes());c.summary(" \u{1F440} Watching for changes...",r),e.runListeners("pages-updated",void 0,r),n.fs.watch(async a=>{R.clear(),await u(a)}),t.verbose("Starting development server."),await P(e,n,{port:Number(i.port||4e3),maxPortRetries:m.isReunite?0:D}),d.run(),T()}async function A(i){let e=!0,o=!0;const n=async r=>{r==="client"?e=!0:o=!0,i.runListeners("build-started");const a=e!=o;a&&i.startEsbuildRun(),i.buildRevision>0&&await i.waitForPluginsRun(),r!=="client"&&i.noteRequestHandlersEntryBuildStart(),a&&t.startTiming("rebuild")},d=async r=>{r==="client"?e=!1:(o=!1,i.markRequestHandlersEntryUpdated()),!(e||o)&&(i.finishEsbuildRun(),i.buildRevision++,t.infoTime("rebuild","JavaScript re-compiled"),await i.reloadMarkdocOptions(),i.markUserCodeReady(),i.runListeners("build-updated"),i.lifecycleContext&&i.buildRevision>1&&i.lifecycleContext.fs.emitCodeUpdated())},u=[new Promise((r,a)=>{const s={label:"client",buildStart(){t.verbose("Start compiling client code."),t.startTiming(this.label)},buildEnd(){t.verboseTime(this.label,"Client compiled"),r(!0)},rebuildStart:()=>n("client"),rebuildEnd:()=>d("client")};C(i,i.outdir,"development",s).then(l=>l.watch()).catch(a)}),new Promise((r,a)=>{const s={label:"server",buildStart(){t.verbose("Start compiling server code."),t.startTiming(this.label)},buildEnd(){t.verboseTime(this.label,"Server compiled"),r(!0)},rebuildStart:()=>n("server"),rebuildEnd:()=>d("server")};S(i,i.serverOutDir,"development",s).then(l=>l.watch()).catch(a)})];await Promise.all(u),await i.reloadMarkdocOptions()}function O(){return new Promise(i=>{setTimeout(i,0)})}export{Y as develop};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Store } from '../../server/store.js';
|
|
2
|
+
import type { LifecycleContext } from '../../server/types/index.js';
|
|
3
|
+
/**
|
|
4
|
+
* The preview check of React pages. It runs in the background, so the dev server and file
|
|
5
|
+
* changes do not wait for it, and it publishes the errors when its result changes.
|
|
6
|
+
*/
|
|
7
|
+
export declare function createReactPagesCheck(store: Store, lifecycleContext: LifecycleContext): {
|
|
8
|
+
run(): Promise<void>;
|
|
9
|
+
invalidate(): void;
|
|
10
|
+
};
|
|
11
|
+
//# sourceMappingURL=react-pages-check.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{reporter as a}from"../../server/tools/notifiers/reporter.js";import{green as f}from"../../server/tools/notifiers/helpers/colors.js";import{getBilledPagesCount as m}from"../../server/utils/index.js";import{validateReactPages as l}from"../../server/plugins/pages/validators/validate-react-pages.js";import{renderPage as u}from"../../server/ssr/index.js";function R(r,n){let t=!1,e=!1;return{async run(){if(t){e=!0;return}t=!0;const o=performance.now(),i=JSON.stringify(a.getPageRenderProblems());do e=!1,await r.waitForPluginsRun(),await l(r,n,u,()=>e);while(e);if(t=!1,JSON.stringify(a.getPageRenderProblems())===i)return;const s=a.summary(` \u{1F440} React pages checked in ${f(Math.round(performance.now()-o)+"ms")}`,m(r.getAllRoutes()));r.runListeners("errors-updated",void 0,s)},invalidate(){e=t}}}export{R as createReactPagesCheck};
|
package/dist/client/App.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as
|
|
1
|
+
import*as t from"react";import{Outlet as d,useLocation as h,useNavigate as P}from"react-router";import{useEffect as i,useMemo as c,useState as S,Suspense as D}from"react";import{withoutPathPrefix as T}from"@redocly/theme/core/utils";import{useThemeConfig as v}from"@redocly/theme/core/hooks";import{InternalServerErrorLayout as L}from"@redocly/theme/layouts/InternalServerErrorLayout";import{RootLayout as C}from"@redocly/theme/layouts/RootLayout";import{Consent as y}from"@redocly/theme/components/Consent/Consent";import{LoadProgressBar as R}from"@redocly/theme/components/LoadProgressBar/LoadProgressBar";import{PageLayout as _}from"@redocly/theme/layouts/PageLayout";import{components as I}from"@redocly/theme/markdoc/default";import{Sidebar as N}from"./app/Sidebar/Sidebar";import{loadAndNavigate as O}from"./app/utils/loadAndNavigate";import{useActions as A}from"./app/Sidebar/useActions";import{useScrollTracker as b}from"./app/hooks/useScrollTracker";import{useAutoScroll as k}from"./app/hooks/useAutoScroll";import{API_DOCS_TEMPLATE_ID as u}from"../constants/common";import{removeTrailingSlash as M}from"../utils/url/remove-trailing-slash";import{removeLeadingSlash as x}from"../utils/url/remove-leading-slash";import*as B from"./app/markdoc/custom-components/index";import{DefaultStyles as F}from"./styling/default-styles";import{ThemeDataProvider as G}from"./providers/theme/ThemeDataProvider";import{PageDataContext as V}from"./providers/page-data/PageDataContext";import{SeoTags as w}from"./app/seo/SeoTags";import{useRouterForLocalLinks as U,useRunningEnvironmentCheck as W}from"./providers/hooks";import{usePageData as j,usePageDataLoader as q}from"./providers/page-data/hooks";import{ErrorBoundary as z}from"./ErrorBoundary";import{ErrorDetails as f,Loader as H}from"./server-entry";import"@styles";import{useRouteChangeTracker as J}from"./app/hooks/useRouteChangeTracker";import{useWebMcpTools as K}from"./app/webmcp";import{isInIframe as Q}from"./utils";import{useL10n as X}from"./app/l10n";import{PostMessageProvider as Y}from"./providers/post-message/PostMessageProvider";import{ScriptLoader as Z}from"./ScriptLoader";import{clientRoutes as $}from"./runtime/generated/routes.js";import{DevModeFloatingBar as ee}from"./app/DevModeFloatingBar";import{usePageTimeTracker as te}from"./app/hooks/usePageTimeTracker";import{useMarkdocRenderer as oe}from"./app/hooks/markdown/useMarkdocRenderer";globalThis.__LOADER.markdocComponents={...B,...I};function re(){const{palette:e}=v();return t.createElement(F,{palette:e})}function je(){const e=q(),[r,n]=S(e),o=h(),m=P();X(),i(()=>{e?n(e):O({navigate:m,to:o.pathname+o.search+o.hash}).then(()=>n(H.loadSync(o.pathname)))},[o,m]),U();const a=W();return a?(console.log(a),t.createElement(f,{error:{message:a,name:""}})):r?t.createElement(z,null,t.createElement(V.Provider,{value:e||r},t.createElement(G,null,t.createElement(re,null),t.createElement(R,null),t.createElement(Y,{enabled:process.env.NODE_ENV==="development"||Q()},t.createElement(d,null))))):null}function ne(){return k(),null}function E(){J(),te(),b(),K();const e=j(),r=A(),{layout:n}=r,o=c(()=>({layout:n}),[n]),m=process.env.NODE_ENV!=="production",a=globalThis.SSR_OMIT_SUSPENSE,l=oe(e?.props?.ast),g=M(e?.slug||"");i(()=>{document.documentElement.classList.add("ready")},[]);const s=c(()=>[u].includes(e?.templateId??"")?{...e?.props,apiOptions:o}:e?.props,[e?.props,e?.templateId,o]);if(e?.props.pagePropGetterError?.message)return m?t.createElement(f,{error:{...e?.props?.pagePropGetterError}}):t.createElement(L,null);if(!!e?.props?.compilationErrors?.length)return e?.Template?t.createElement(e.Template,{pageProps:e?.props,children:l}):null;const p=()=>t.createElement(t.Fragment,null,t.createElement(C,null,e?.templateId!==u&&t.createElement(ne,null),t.createElement(_,{sidebar:t.createElement(N,{layoutControls:r})},t.createElement(w,{seo:e?.props.seo,slug:g}),e?.Template&&s?t.createElement(e.Template,{pageProps:s,children:l}):null),t.createElement(Z,null)),t.createElement(y,null),process.env.NODE_ENV!=="production"&&t.createElement(ee,null));return a?p():t.createElement(D,null,p())}const qe=[...$.map(e=>({Component:E,path:x(T(e).substring(1)+"/*")})),{Component:E,path:"*"}];export{je as App,E as Page,qe as routes};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{useLocation as A}from"react-router";import{useEffect as w,useMemo as c,useRef as _,useState as
|
|
1
|
+
import{useLocation as A}from"react-router";import{useEffect as w,useMemo as c,useRef as _,useState as D}from"react";import{useApiDocsActiveSectionId as k}from"@redocly/theme/core/hooks";import{getMenuItemType as C}from"@redocly/theme/core/utils";import{MenuItemType as v}from"@redocly/theme/core/constants";import{CATALOG_BASE_SLUG as T,CATALOG_SLUGS as h}from"../../../constants/catalog-entities";import{usePageSharedData as y,useSidebarItemsData as G,useSidebarConnectedCatalogConfig as E,useSidebarConnectedCatalogEntity as O}from"../../providers/page-data/hooks";import{mapItemsPropsToState as b}from"./utils";import{injectCatalogItems as K}from"../../utils/catalog/inject-catalog-items";import{filterOutVersionedItems as R}from"../../utils/filter-out-versioned-items";const B="catalog.backToAllLabel",M=`${T}/${h.ALL}`;function U(i){const e=G();return c(()=>R(e,i),[e,i])}function J(i){const e=A(),t=k(e),a=O(),g=E(),s=U(i),u=a?K(s,a.key,g?.slug,e.search):s,m=_(null),r=c(()=>b(u,e,t),[t,e,u]),l=y("current-catalog-info"),p=c(()=>S(r),[u]),[n,d]=D(p),o=n.length>0?n[n.length-1]:void 0,I=c(()=>o&&b([...o.item.link?[{...o.item,items:[],menuStyle:void 0,separatorLine:!1}]:[],...o.item.items],e,t),[o,e,t]);w(()=>{if(!m.current||m.current!==t){const f=S(r);d(f),m.current=t}},[s,e,t]);const L=o?{slug:o.previousLink,event:"sidebar_drilldown_back_button.clicked"}:a?{label:"Back to Catalog",labelTranslationKey:B,slug:M,event:"back_to_catalog_button.clicked"}:l?{label:l.catalog.label,labelTranslationKey:l.catalog.labelTranslationKey,slug:l.catalog.link,event:"back_to_catalog_button.clicked"}:void 0;return{currentItems:I||r,allSidebarItems:r,popDrilldownState:()=>{n.length>0&&d(n.slice(0,n.length-1))},pushDrilldownState:f=>{d([...n,f])},backLink:L,versionLabel:a?.version??null}}function S(i,e=[]){for(const t of i){if(!t.active&&!t.hasActiveSubItem)continue;if(C(t)===v.DrillDown&&e.push({item:t}),t.active)return e;if(t.hasActiveSubItem)return S(t.items,e)}return e}export{U as useRawSidebarItems,J as useSidebarItems};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{useEffect as
|
|
1
|
+
import{useEffect as l,useMemo as m,useState as c}from"react";import{useLocation as S}from"react-router";import{useThemeConfig as A}from"@redocly/theme/core/hooks";import{usePageData as w}from"../../providers/page-data/hooks";import{getBannerForSlug as B,getNextBannerTransition as h,isBannerWithinTimeRange as D}from"./utils/match-banner-target.js";const u="redocly-dismissed-banners",T=2**31-1;function x(){if(typeof window>"u")return new Set;try{const n=JSON.parse(localStorage.getItem(u)??"[]");return new Set(Array.isArray(n)?n:[])}catch{return new Set}}function C(){const{banner:n}=A()||{},t=w()?.props?.frontmatter?.banner,f=S(),[a,d]=c(x()),[s,y]=c(()=>Date.now()),o=f.pathname,i=m(()=>{const r=Array.isArray(n)?n:[],e=Array.isArray(t)?t:[];return[...r,...e]},[n,t]);return l(()=>{const r=h(i,s);if(r===void 0)return;const e=r-Date.now(),g=Math.min(Math.max(0,e),T),p=setTimeout(()=>y(Date.now()),g);return()=>clearTimeout(p)},[i,s]),{banner:m(()=>{const r=(Array.isArray(t)?t:[]).find(e=>!a.has(e.hash)&&D(e,s));if(r)return r;if(!(!n||!Array.isArray(n)||n.length===0))return B(n,o,a,s)},[n,t,o,a,s]),dismissBanner:r=>{const e=new Set(a);e.add(r),d(e);try{localStorage.setItem(u,JSON.stringify(Array.from(e)))}catch{return}}}}export{u as STORAGE_KEY,x as getDismissedBannersFromStorage,C as useBanner};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{useMemo as
|
|
1
|
+
import{useMemo as s}from"react";import{AuthCookieNames as a}from"../../../constants/common";import{usePageData as i}from"./usePageData";import{getCookie as m}from"./utils/cookies";function D(){const{userData:e}=i("userData")||{},o=globalThis.redoclyCookieStorage?.getStore(),r=m(a.FEDERATED_ACCESS_TOKEN,o),t=m(a.FEDERATED_ID_TOKEN,o);return s(()=>({email:e?.email,name:e?.name,federatedAccessToken:r,federatedIdToken:t}),[e?.email,e?.name,r,t])}export{D as useUserClaims};
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
export declare function isRecord(value: unknown): value is Record<string, unknown>;
|
|
2
2
|
/**
|
|
3
|
-
* Markdown
|
|
4
|
-
*
|
|
5
|
-
* fragment are dropped, so the suffix always lands on the pathname and can never select another route.
|
|
3
|
+
* The Markdown copy of a prefixed route. The query and the fragment are dropped, so the `.md`
|
|
4
|
+
* suffix always lands on the pathname and can never select another route.
|
|
6
5
|
*/
|
|
7
6
|
export declare function markdownPathForRoute(pathname: string): string;
|
|
8
7
|
/** Returns the normalized path only when it stays on this site, so a tool can never navigate off-origin. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{getMarkdownCopyPath as s,withPathPrefix as a,withoutPathPrefix as c}from"@redocly/theme/core/utils";function f(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}function p(t){const[r=t]=t.split("#"),[n=r]=r.split("?"),e=c(n),o=e.length>1?e.replace(/\/$/,""):"/";return a(s(o))}const i="https://site.invalid";function h(t){const r=t.trim();if(!r.startsWith("/"))return;const n=URL.parse(r,i);if(n?.origin===i)return`${n.pathname}${n.search}${n.hash}`}async function d(t){const r=await fetch(t,{headers:{accept:"text/plain"}});if(r.ok)return await r.text()}function m(t,r,n){const e=typeof t=="number"?t:Number(t);return!Number.isFinite(e)||e<=0?r:Math.min(Math.floor(e),n)}function x(t){return Array.isArray(t)?t.join(" "):t??""}export{m as clampLimit,d as fetchText,f as isRecord,x as joinField,p as markdownPathForRoute,h as toSitePath};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
class r extends Error{constructor(o){super(`${o} exports an async component. React pages do not support async components: export a synchronous component.`),this.name="PageAsyncComponentError"}}export{r as PageAsyncComponentError};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as
|
|
1
|
+
import*as y from"react";import{withPathPrefix as L}from"@redocly/theme/core/utils";import{appendSearchParams as N}from"../utils";import{mapObject as x}from"../../utils/object/map-object.js";import{mapObjectAsync as $}from"../../utils/object/map-object-async.js";import{isFunction as z}from"../../utils/guards/is-function.js";import{isBrowser as I}from"../../utils/env/is-browser.js";import{GLOBAL_DATA_URL as G}from"../../constants/common.js";import{getClientPageDataUrl as V}from"../../utils/url/get-client-page-data-url.js";import{getSharedDataFetchUrl as F}from"../../utils/url/get-shared-data-fetch-url.js";import{normalizeRouteSlug as c}from"../../utils/path/normalize-route-slug.js";import{templates as R}from"./generated/templates.js";import{AsyncCache as E}from"./cache.js";import{fetch as D}from"./fetch.js";import{updateTranslations as B}from"../app/l10n";import{PageMissingDefaultExportError as b}from"./errors/page-missing-default-export-error.js";import{PageAsyncComponentError as K}from"./errors/page-async-component-error.js";import{ErrorDetails as q}from"../app/Error/ErrorDetails";const l=new E,m=new E;let g=null,d,W;const u=new Set;async function H(){const o=await(await D(L(G))).json();return d=o,o}async function v(o){const t=F(o,process.env.NODE_ENV==="development");return await(await D(t)).json()}async function J(o){return m.has(o)||m.set(o,v(o)),m.get(o)}function ht(){const[,o]=y.useReducer(t=>t+1,0);y.useEffect(()=>{process.env.NODE_ENV!=="production"&&(window.__redoclyRefresh=o)},[o])}function C(o,t){const e=t?new URLSearchParams(t).get("revision"):null,a=t?new URLSearchParams(t).get("version"):null;return e||a?`${o}?${e?`revision=${encodeURIComponent(e)}`:""}${a?`&version=${encodeURIComponent(a)}`:""}`.trim():o}class p{static markdocComponents={};static async updateTemplate(t,e,a){const n=c(t);R[a]=()=>e;const r=c(window.location.pathname);n===r&&(await this.load(t,!0),window.__redoclyRefresh())}static async update(t){const e=c(t),a=c(window.location.pathname);if(e!==a){l.delete(e);return}await this.load(t,!0),window.__redoclyRefresh()}static async updateSharedData(t){await m.set(t,v(t)),window.__redoclyRefresh()}static addGlobalDataListener(t){u.add(t)}static removeGlobalDataListener(t){u.delete(t)}static updateGlobalData(t){u.forEach(e=>e(t)),d=t,B(d.l10n)}static async tryLoad(t,e,a){try{return await this.load(t,e,a)}catch{return null}}static async loadDynamicMarkdocComponents(t){const e=this.markdocComponents?.[t];e&&z(e)&&Object.assign(this.markdocComponents,await e())}static async load(t,e,a){const n=c(t),r=C(n,a);if(!d&&!g&&(g=H()),!e&&l.has(r)){const f=await l.get(r);if(f)return f}const[i]=await Promise.all([l.set(r,s(a)),g]);return i;async function s(f){const _=V(n),T=N(_,f),O=await D(T),{templateId:P,sharedDataIds:w,props:S,userData:A,versions:j,redirectTo:k,isPublic:M}=await O.json(),[U]=await Promise.all([(async()=>p.loadTemplate(P))(),Promise.all((S.dynamicMarkdocComponents||[]).map(h=>p.loadDynamicMarkdocComponents(h))),w?$(w,h=>J(h)):Promise.resolve({})]);return{templateId:P,slug:n,sharedDataIds:w,redirectTo:k,props:S,Template:U,userData:A,versions:j,isPublic:M}}}static loadSync(t){const e=c(t),a=C(e,typeof window<"u"?window.location.search:void 0),n=l.tryGetSync(a);if(!n)return;const r=x(n.sharedDataIds,i=>m.getSync(i,"Data dependency not cached ahead of time: "+i));return{...n,sharedData:r}}static async prepare(t,e,a,n){const r=t.templateId;if(await Promise.all((t.props.dynamicMarkdocComponents||[]).map(s=>this.loadDynamicMarkdocComponents(s))),e)for(const s of Object.keys(e))m.setSync(s,e[s]);const i=await p.loadTemplate(r);if(i){const s=c(t.slug);l.setSync(s,{templateId:r,slug:s,props:t.props,sharedDataIds:t.sharedDataIds||{},Template:i,userData:t.userInfo,versions:t.versions,isPublic:t.isPublic})}d=a,W=n}static async loadTemplate(t){try{const e=await R[t](),a=/page\.tsx?$/.test(t);if(a&&!e.default)throw new b(t);const n=e.default,r=Y(n)?n:n?.default;return a&&X(r)?Q(t):r}catch(e){if(!(process.env.NODE_ENV==="development")||!I())throw e;return e instanceof b?()=>(window.location.reload(),null):(window.location.reload(),null)}}static clear(){u.clear(),m.clear(),l.clear()}}(typeof window<"u"?window:global).__LOADER=p;function Q(o){const t=new K(o),{name:e,message:a}=t;return function(){const r=!!globalThis.SSR_OMIT_SUSPENSE;if(process.env.NODE_ENV!=="development"||r)throw t;return y.createElement(q,{error:{name:e,message:a}})}}function X(o){return Object.prototype.toString.call(o)==="[object AsyncFunction]"}function Y(o){return typeof o=="function"||typeof o=="object"&&o!==null&&"$$typeof"in o}export{p as Loader,J as getSharedData,d as globalData,W as initLocale,ht as useRefresh};
|
|
@@ -117,6 +117,8 @@ export declare const FEATURE: {
|
|
|
117
117
|
readonly cookieConsent: 'cookieConsent';
|
|
118
118
|
readonly sdkGeneration: 'sdkGeneration';
|
|
119
119
|
readonly customPackages: 'customPackages';
|
|
120
|
+
readonly customMarkdocTags: 'customMarkdocTags';
|
|
121
|
+
readonly customMcpTools: 'customMcpTools';
|
|
120
122
|
};
|
|
121
123
|
export declare const GATEWAY_FETCH_LIMIT_DEFAULTS: {
|
|
122
124
|
readonly ratePerMin: 60;
|
package/dist/constants/common.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const s={AUTHORIZATION:"authorization",IDP_ID_TOKEN:"idp_id_token",IDP_ACCESS_TOKEN:"idp_access_token",IDP_REFRESH_TOKEN:"idp_refresh_token",FEDERATED_ACCESS_TOKEN:"federated_access_token",FEDERATED_ID_TOKEN:"federated_id_token"},n="post_logout",_="openapi_docs",E="asyncapi_docs",p="graphql_docs",i="api_docs",A="/_spec-gql",
|
|
1
|
+
const s={AUTHORIZATION:"authorization",IDP_ID_TOKEN:"idp_id_token",IDP_ACCESS_TOKEN:"idp_access_token",IDP_REFRESH_TOKEN:"idp_refresh_token",FEDERATED_ACCESS_TOKEN:"federated_access_token",FEDERATED_ID_TOKEN:"federated_id_token"},n="post_logout",_="openapi_docs",E="asyncapi_docs",p="graphql_docs",i="api_docs",A="/_spec-gql",T="markdoc",d="tags",r="*",S={[r]:"read"},L=["openid","email"],I=1440*60,R=720*60*60,O="anonymous",P="authenticated",l="**",C="Reunite",x="translations.yaml",u="redocly.yaml",D="@redocly/theme",m="@theme",M="@skills",g="SKILL.md",N="/.well-known/agent-skills",U="/.well-known/agent-card.json",F="/a2a",k="/.well-known/mcp/server-card.json",h="/app-data.json",y="/eject-component";var t;(function(e){e.BUILD="build",e.DEVELOP="develop",e.PREPARE="prepare"})(t||(t={}));var o;(function(e){e.RATING="rating",e.SENTIMENT="sentiment",e.COMMENT="comment",e.MOOD="mood",e.PROBLEM="problem",e.SCALE="scale"})(o||(o={}));var c;(function(e){e.AI_SEARCH="aiSearch",e.MCP="mcp"})(c||(c={}));const G="/login",b="/invite",v={AUTH0_PASS:"/auth/auth0-pass"},H={NotExist:"ENOENT"},w="default_locale",K="sidebar-",B="PUBLIC_",q="branch.",f=["BROKEN_LINK","MARKDOC","RESOLVE"],V=["logo","navbar","products","footer","sidebar","scripts","links","feedback","search","aiAssistant","colorMode","palette","navigation","codeSnippet","markdown","openapi","graphql","analytics","consent","userMenu","versionPicker","breadcrumbs","catalog","entitiesCatalog","scorecard","scorecards","scorecardClassic","mcp","banner"],a="redocly_category",Q="redocly_product",j="redocly_version",X="redocly_teams",W=a,z={asyncapi:"asyncapi",apiFunctions:"apiFunctions",reactPages:"reactPages",catalog:"catalog",catalogClassic:"catalogClassic",lint:"lint",scorecard:"scorecard",scorecards:"scorecards",l10n:"l10n",openapi:"openapi",graphql:"graphql",markdown:"markdown",devOnboarding:"devOnboarding",seo:"seo",redirects:"redirects",customPlugins:"customPlugins",themeEjecting:"themeEjecting",products:"products",breadcrumbs:"breadcrumbs",mockServer:"mockServer",sso:"sso",rbac:"rbac",analytics:"analytics",removeAttribution:"removeAttribution",advancedSearch:"advancedSearch",soap:"soap",ssoDirect:"ssoDirect",codeWalkthrough:"codeWalkthrough",aiSearchLimit:"aiSearchLimit",kvStorageLimit:"kvStorageLimit",mcp:"mcp",mcpGateway:"mcpGateway",mcpMode:"mcpMode",gatewayFetchRatePerMin:"gatewayFetchRatePerMin",gatewayFetchQuotaPerDay:"gatewayFetchQuotaPerDay",gatewayFetchBudgetPerExec:"gatewayFetchBudgetPerExec",mcpRequestRatePerMin:"mcpRequestRatePerMin",mcpRequestQuotaPerDay:"mcpRequestQuotaPerDay",banner:"banner",cookieConsent:"cookieConsent",sdkGeneration:"sdkGeneration",customPackages:"customPackages",customMarkdocTags:"customMarkdocTags",customMcpTools:"customMcpTools"},J={ratePerMin:60,quotaPerDay:2e3,budgetPerExec:25},Y={ratePerMin:600,quotaPerDay:2e4};export{F as A2A_SLUG,U as AGENT_CARD_SLUG,N as AGENT_SKILLS_BASE,i as API_DOCS_TEMPLATE_ID,E as ASYNC_API_DOCS_TEMPLATE_ID,s as AuthCookieNames,q as BRANCH_ENV_PREFIX,u as CONFIG_FILE_NAME,T as CUSTOM_MARKDOC_OPTIONS_PATH,d as CUSTOM_MARKDOC_TAGS_PATH,O as DEFAULT_ANONYMOUS_VISITOR_TEAM,P as DEFAULT_AUTHENTICATED_TEAM,I as DEFAULT_COOKIE_EXPIRATION,w as DEFAULT_LOCALE_PLACEHOLDER,l as DEFAULT_RBAC_SCOPE,C as DEFAULT_SSO_IDP_TITLE,D as DEFAULT_THEME_NAME,G as DEV_LOGIN_SLUG,y as EJECT_COMPONENT_URL,v as ExternalRoutes,z as FEATURE,o as FEEDBACK_TYPES,H as FsErrors,J as GATEWAY_FETCH_LIMIT_DEFAULTS,h as GLOBAL_DATA_URL,A as GRAPHQL_SPEC_SLUG,p as GRAPHQL_TEMPLATE_ID,b as INVITE_SLUG,f as MARKDOC_ERROR_TYPES,Y as MCP_REQUEST_LIMIT_DEFAULTS,k as MCP_SERVER_CARD_SLUG,_ as OPENAPI_DOCS_TEMPLATE_ID,R as POST_LOGOUT_COOKIE_EXPIRATION,n as POST_LOGOUT_COOKIE_NAME,B as PUBLIC_ENV_PREFIX,S as PUBLIC_RBAC_SCOPE_ITEM,r as RBAC_ALL_OTHER_TEAMS,L as REQUIRED_OIDC_SCOPES,c as RbacFeatures,a as SEARCH_CATEGORY_FIELD,W as SEARCH_GROUP_FACET_FIELD,Q as SEARCH_PRODUCT_FIELD,X as SEARCH_RBAC_FIELD,j as SEARCH_VERSION_FIELD,K as SIDEBAR_PREFIX,x as TRANSLATIONS_FILE_NAME,V as UI_ACCESSIBLE_CONFIG_PROPS,M as USER_SKILLS_ALIAS,g as USER_SKILL_FILENAME,m as USER_THEME_ALIAS,t as cliCommandNames};
|