@redocly/openapi-docs 3.12.0-next.11 → 3.12.0-next.12
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
import{useLocation as p}from"react-router-dom";import{useEffect as
|
|
1
|
+
import{useLocation as p}from"react-router-dom";import{useEffect as s}from"react";import{addLeadingSlash as u,removeLeadingSlash as l,useActiveSectionId as m,IS_BROWSER as f}from"@redocly/theme/core/openapi";import{compose as h,encodeBackSlashes as w,tryDecodeURIComponent as S}from"../../utils/index.js";let d=!0;function E(t){const e=p(),o=t||"/";s(()=>{if(e.pathname===o&&e.hash===""){window.scrollTo(0,0);return}const a=l(e.pathname.replace(o,"")),c=g(e.hash),i=c?r(a+c)||document.querySelector(`[id$="${l(c)}"]`):r(e.hash.replace("#",""))||r(a);i&&i.scrollIntoView()},[e,o]);const n=m(e,!1,!1);s(()=>{if(n&&d){d=!1;return}if(f&&!window.location.pathname.includes(n)&&!window.location.hash.includes(n)){const a=h(u,w)(n);window.history.replaceState({},"",a)}},[n])}function r(t){return document.getElementById(S(t))}function g(t){const e=["#tag","#operation","#paths"];for(const o of e)if(t.includes(o))return t.replace(o,"").toLowerCase();return""}export{r as getElementById,g as getLegacyHash,E as useAutoScroll};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{bundle as s,Config as
|
|
1
|
+
import{bundle as s,Config as r}from"@redocly/openapi-core";import{IS_BROWSER as i}from"@redocly/theme/core/openapi";import{convertSwagger2OpenAPI as f}from"./convertSwagger2OpenAPI.js";async function l(o){const t=new r({}),e={config:t,base:i?window.location.origin:typeof globalThis.process<"u"?globalThis.process.cwd():""};i&&(t.resolve.http.customFetch=globalThis.fetch),typeof o=="object"&&o!==null?e.doc=a(o):e.ref=o;const{bundle:{parsed:n}}=await s(e);return n.swagger!==void 0?f(n):n}function a(o){return{source:{absoluteRef:""},parsed:o}}export{l as loadAndBundleDefinition};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@redocly/openapi-docs",
|
|
3
|
-
"version": "3.12.0-next.
|
|
3
|
+
"version": "3.12.0-next.12",
|
|
4
4
|
"description": "Redocly OpenAPI Docs",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "lib/index.js",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
23
|
"@markdoc/markdoc": "0.5.2",
|
|
24
|
-
"@redocly/openapi-core": "2.0.0-next.
|
|
24
|
+
"@redocly/openapi-core": "2.0.0-next.7",
|
|
25
25
|
"deepmerge": "^4.2.2",
|
|
26
26
|
"dompurify": "3.2.6",
|
|
27
27
|
"fast-deep-equal": "^3.1.3",
|
|
@@ -36,8 +36,8 @@
|
|
|
36
36
|
"url-template": "^2.0.8",
|
|
37
37
|
"util": "~0.12.5",
|
|
38
38
|
"web-vitals": "3.3.1",
|
|
39
|
-
"@redocly/config": "0.26.
|
|
40
|
-
"@redocly/replay": "0.15.0-next.
|
|
39
|
+
"@redocly/config": "0.26.4",
|
|
40
|
+
"@redocly/replay": "0.15.0-next.8"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
43
|
"@jest/globals": "29.5.0",
|
|
@@ -74,7 +74,7 @@
|
|
|
74
74
|
"typescript": "5.6.2",
|
|
75
75
|
"url": "~0.11.0",
|
|
76
76
|
"vite": "^6.3.5",
|
|
77
|
-
"@redocly/theme": "0.56.0-next.
|
|
77
|
+
"@redocly/theme": "0.56.0-next.5"
|
|
78
78
|
},
|
|
79
79
|
"scripts": {
|
|
80
80
|
"start": "npm run copy-highlight-hook && vite",
|