@redocly/realm 0.136.0-next.3 → 0.136.0-next.4
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
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
# @redocly/realm
|
|
2
2
|
|
|
3
|
+
## 0.136.0-next.4
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- d0133f4af19: Updated the `react-router-dom` peer dependency from `^6.30.3` to `^7.18.1`.
|
|
8
|
+
`@redocly/theme` v6 is no longer supported.
|
|
9
|
+
Consumers that render `@redocly/theme` components directly must provide a `react-router-dom` v7 instance.
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- Updated dependencies [d0133f4af19]
|
|
14
|
+
- @redocly/theme@0.68.0-next.2
|
|
15
|
+
- @redocly/asyncapi-docs@1.13.0-next.4
|
|
16
|
+
- @redocly/graphql-docs@1.13.0-next.4
|
|
17
|
+
- @redocly/openapi-docs@3.24.0-next.4
|
|
18
|
+
- @redocly/portal-plugin-mock-server@0.21.0-next.4
|
|
19
|
+
|
|
3
20
|
## 0.136.0-next.3
|
|
4
21
|
|
|
5
22
|
### Patch Changes
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { To,
|
|
1
|
+
import type { To, Location } from 'react-router-dom';
|
|
2
2
|
export declare function usePreloadHistory(): {
|
|
3
|
-
push: (location: To) => Promise<
|
|
3
|
+
push: (location: To) => Promise<void>;
|
|
4
4
|
location: Location;
|
|
5
5
|
};
|
|
6
6
|
//# sourceMappingURL=usePreloadHistory.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{useMemo as
|
|
1
|
+
import{useMemo as s,useCallback as n}from"react";import{useLocation as r,useNavigate as i}from"react-router-dom";function m(){const o=i(),a=n(async e=>{await window.__LOADER.load(e),await o(e)},[o]),t=r();return s(()=>({push:a,location:t}),[t,a])}export{m as usePreloadHistory};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{isLocalLink as f}from"../../../utils/path/is-local-link.js";import{isAuthRoutePath as m}from"../../../utils/auth/is-auth-route-path.js";import{withLoadProgress as u}from"./withLoadProgress";import{scrollToAnchor as p}from"./scroll-to-anchor";let s;async function A({navigate:
|
|
1
|
+
import{isLocalLink as f}from"../../../utils/path/is-local-link.js";import{isAuthRoutePath as m}from"../../../utils/auth/is-auth-route-path.js";import{withLoadProgress as u}from"./withLoadProgress";import{scrollToAnchor as p}from"./scroll-to-anchor";let s;async function A({navigate:t,to:o,origin:a="browser",options:c}){o===""&&(o="/"),s=o;const{pathname:e,hash:d,search:i}=new URL(o,window.location.origin+window.location.pathname),n=decodeURIComponent(d),l=decodeURIComponent(window.location.hash);if(m(e)){window.location.href=o;return}const w=window.__LOADER,r=await u(w.tryLoad(e,void 0,i));if(r?.redirectTo){if(!f(r.redirectTo)){window.location.href=r.redirectTo;return}return A({navigate:t,to:r.redirectTo,origin:a,options:c})}if(r&&s===o){if((e!==window.location.pathname||i!==window.location.search||n!==l)&&t({pathname:e,search:i,hash:n},{...c,state:{origin:a},flushSync:!0}),r.props?.disableAutoScroll)return;requestAnimationFrame(()=>{if(n){const h=n.slice(1);p(h)}else window.scrollTo(0,0)})}}export{A as loadAndNavigate};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import{telemetry as
|
|
1
|
+
import{telemetry as p}from"./app/telemetry/index.js";p.init({otel:{isProd:process.env.NODE_ENV==="production",serviceVersion:`${P}@${process.env.REDOCLY_PORTAL_VERSION}`,version:"1.0.0",collectorTraceUrl:new URL(e(L.OTEL_TRACES),location.origin).toString(),serviceName:"realm-ui",tracerName:"client-telemetry"},disabled:!_});import o from"react";import{hydrateRoot as s}from"react-dom/client";import{RouterProvider as m,createBrowserRouter as d}from"react-router-dom";import{HelmetProvider as f}from"@dr.pogodin/react-helmet";import{StyleSheetManager as E}from"styled-components";import{getLocaleFromPathname as u,withoutPathPrefix as R,withPathPrefix as e}from"@redocly/theme/core/utils";import{ServerRoutes as L}from"../constants/api";import{DEFAULT_LOCALE_PLACEHOLDER as O}from"../constants/common";import{CLIENT_TELEMETRY_ENABLED as _}from"./constants/common.js";import{shouldForwardProp as D}from"../utils/should-forward-prop.js";import"./polyfills";import{PACKAGE_NAME as P,PRODUCT_NAME as h}from"../config/product-gates";import{App as g,routes as A}from"./App";import{Loader as x,useRefresh as N,globalData as t}from"./runtime/loader";import{initL10n as b}from"./app/l10n/initL10n";function v(){return N(),o.createElement(f,{context:{}},o.createElement(E,{shouldForwardProp:D},o.createElement(g,null)))}function T(){t?.removeAttribution&&process.env.REDOCLY_PORTAL_VERSION?console.log(`
|
|
2
2
|
%c Version: ${process.env.REDOCLY_PORTAL_VERSION} %c
|
|
3
3
|
`,"background:#ffffff ; padding: 1px; border:1px solid #0044D4; border-radius: 3px; color: #0044D4","background:transparent"):process.env.REDOCLY_PORTAL_VERSION&&console.log(`
|
|
4
4
|
%c Redocly ${h} %c ${process.env.REDOCLY_PORTAL_VERSION} %c
|
|
5
5
|
|
|
6
6
|
%chttps://redocly.com
|
|
7
|
-
`,"background:#0044D4 ; padding: 1px; border-radius: 3px 0 0 3px; color: #fff; border:1px solid #0044D4","background:#ffffff ; padding: 1px; border:1px solid #0044D4; border-radius: 0 3px 3px 0; color: #0044D4","background:transparent","font-size: 10px; font-style: italic;")}async function C(){process.env.NODE_ENV!=="production"&&import("./runtime/ws-client").then(l=>l.listenWs()),await
|
|
7
|
+
`,"background:#0044D4 ; padding: 1px; border-radius: 3px 0 0 3px; color: #fff; border:1px solid #0044D4","background:#ffffff ; padding: 1px; border:1px solid #0044D4; border-radius: 0 3px 3px 0; color: #0044D4","background:transparent","font-size: 10px; font-style: italic;")}async function C(){process.env.NODE_ENV!=="production"&&import("./runtime/ws-client").then(l=>l.listenWs()),await x.load(window.location.pathname,void 0,window.location.search),T();const r=t?.l10n,n=r?.locales||[],i=r?.defaultLocale||O,a=u(R(location.pathname),i,n);await b(r,a);const c=d([{Component:v,path:e("/*"),children:A}]);s(document.getElementById("app_root"),o.createElement(m,{router:c}))}C();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{pathToFileURL as I}from"url";import{HelmetProvider as z}from"@dr.pogodin/react-helmet";import{renderToString as m}from"react-dom/server";import{StaticRouterProvider as G,createStaticHandler as J,createStaticRouter as K}from"react-router-dom
|
|
1
|
+
import{pathToFileURL as I}from"url";import{HelmetProvider as z}from"@dr.pogodin/react-helmet";import{renderToString as m}from"react-dom/server";import{StaticRouterProvider as G,createStaticHandler as J,createStaticRouter as K}from"react-router-dom";import r from"react";import{readFile as Q}from"fs/promises";import{join as V}from"path";import{withPathPrefix as l,getLocaleFromPathname as W,withoutPathPrefix as X,removeTrailingSlash as Y}from"@redocly/theme/core/utils";import{RUNTIME_RESOURCES_DIR as T}from"../constants/common.js";import{slash as Z}from"../../utils/path/slash.js";import{reporter as tt}from"../tools/notifiers/reporter.js";import{envConfig as p}from"../config/env-config.js";import{slug as et}from"../../utils/slugger.js";import{shouldForwardProp as rt}from"../../utils/should-forward-prop.js";import{htmlTemplate as ot}from"./template.js";import{detectColorSchemaScript as st,generatePreloadPageData as nt}from"./utils.js";import"./hijack-console.js";import{getSitemapLinkTag as at}from"./get-sitemap-link-tag.js";let g="";async function it(t){return p.isRuntimeMode?await import("../../client/server-entry.js"):await import(I(`${Z(t)}/server-entry.js`)+"?"+new Date)}async function Mt(t){if(!p.isRuntimeMode){const e=tt.getCompilationProblems();if(e.length>0){const{renderCompilationError:n}=await import("./render-compilation-error.js");return n(e)}}const{Loader:u,App:R,routes:w,ServerStyleSheet:E,StyleSheetManager:C,ErrorDetails:P,initL10n:y}=await it(t.serverOutDir),{page:h,store:{globalData:S,hasSitemap:D},sharedData:v,ssrHref:b}=t,f=S?.l10n,i=W(X(h.slug),f?.defaultLocale,f?.locales),d=t.page.request?.url||"http://localhost/";await u.prepare({...h,slug:Y(new URL(d).pathname)},v,S,i),await y(i);const c=new E,{query:M,dataRoutes:x}=J([{Component:R,path:l("*"),children:w}]),s=await M(new Request(d));if(s instanceof Response)throw s;const B=K(x,s);try{globalThis.SSR_HOSTNAME=b,globalThis.SSR_USER_AGENT=t.userAgent,globalThis.SSR_OMIT_SUSPENSE=t.omitSuspense;const e={},n=m(r.createElement(z,{context:e},r.createElement(C,{sheet:c.instance,shouldForwardProp:rt},r.createElement(G,{router:B,context:s})))),L=D?at():"",a=e.helmet,k=a?.title.toString()||"",_=t.store.globalData?.logo?.favicon,o=t.store.config,j=`<link rel="preload" as="fetch" crossorigin="anonymous" href="${l("/app-data.json")}" />`,F=nt(t.page.slug),H=st(o),U=t.page.product?.name?`product-${et(t.page.product.name)}`:"",A=t.store.ssr.headTags.join(""),$=t.store.ssr.postBodyTags.join(""),N=t.store.ssr.preBodyTags.join(""),O=`<link rel="stylesheet" href="${l(T)}/browser-entry.css" />`;!p.isDevelopMode&&!g&&(g=`<style>${await Q(V(t.outdir,T,"browser-entry.css"),"utf-8")}</style>`);const q={bodyHtml:n,linkTags:o.linkTags+c.getStyleTags()+(a?.link.toString()||""),title:k,favicon:_,headScriptTags:L+H+o.headScriptTags+A+(a?.script.toString()||"")+(a?.meta.toString()||""),preload:[j,F],postBodyScriptTags:o.postBodyScriptTags+$,preBodyScriptTags:o.preBodyScriptTags||""+N,lang:i,productClass:U,runtimeCss:g||O};return{html:ot(q),statusCode:200}}catch(e){return t.telemetry.sendSsrErrorCaughtMessage({message:e.message}),{html:m(r.createElement(P,{error:e})),statusCode:500,error:e}}finally{c.seal(),u.clear()}}function xt(t){return m(r.createElement(r.Fragment,null,...t))}export{Mt as render,xt as renderComponents};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@redocly/realm",
|
|
3
|
-
"version": "0.136.0-next.
|
|
3
|
+
"version": "0.136.0-next.4",
|
|
4
4
|
"description": "",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -74,7 +74,7 @@
|
|
|
74
74
|
"react-calendar": "5.1.0",
|
|
75
75
|
"react-date-picker": "11.0.0",
|
|
76
76
|
"react-dom": "^19.2.4",
|
|
77
|
-
"react-router-dom": "^
|
|
77
|
+
"react-router-dom": "^7.18.1",
|
|
78
78
|
"react-select": "5.10.1",
|
|
79
79
|
"reactjs-popup": "2.0.6",
|
|
80
80
|
"semver": "7.7.3",
|
|
@@ -93,14 +93,14 @@
|
|
|
93
93
|
"xpath": "0.0.34",
|
|
94
94
|
"yaml-ast-parser": "0.0.43",
|
|
95
95
|
"zod": "^3.25.76",
|
|
96
|
-
"@redocly/asyncapi-docs": "1.13.0-next.
|
|
96
|
+
"@redocly/asyncapi-docs": "1.13.0-next.4",
|
|
97
97
|
"@redocly/config": "0.52.0",
|
|
98
|
-
"@redocly/graphql-docs": "1.13.0-next.
|
|
99
|
-
"@redocly/openapi-docs": "3.24.0-next.
|
|
98
|
+
"@redocly/graphql-docs": "1.13.0-next.4",
|
|
99
|
+
"@redocly/openapi-docs": "3.24.0-next.4",
|
|
100
100
|
"@redocly/portal-legacy-ui": "0.18.0",
|
|
101
|
-
"@redocly/portal-plugin-mock-server": "0.21.0-next.
|
|
101
|
+
"@redocly/portal-plugin-mock-server": "0.21.0-next.4",
|
|
102
102
|
"@redocly/realm-asyncapi-sdk": "0.14.0-next.0",
|
|
103
|
-
"@redocly/theme": "0.68.0-next.
|
|
103
|
+
"@redocly/theme": "0.68.0-next.2"
|
|
104
104
|
},
|
|
105
105
|
"peerDependencies": {
|
|
106
106
|
"react": "^19.2.4",
|