@redocly/openapi-docs 3.8.0-next.2 → 3.8.0-next.3
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,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.useIsExpanded=useIsExpanded;const react_1=require("react"),react_router_dom_1=require("react-router-dom"),theme_1=require("@redocly/theme"),utils_1=require("../../utils"),useAutoScroll_1=require("../Content/useAutoScroll");function useIsExpanded({item:e,routingBasePath:t}){const r=(0,react_router_dom_1.useLocation)(),o=(0,react_1.useMemo)((()=>(0,utils_1.tryDecodeURIComponent)((0,utils_1.normalizePath)(r.pathname.replace(t,"")))),[r.pathname,t]);if("tag"!==e.type)return!1;
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.useIsExpanded=useIsExpanded;const react_1=require("react"),react_router_dom_1=require("react-router-dom"),theme_1=require("@redocly/theme"),utils_1=require("../../utils"),useAutoScroll_1=require("../Content/useAutoScroll");function useIsExpanded({item:e,routingBasePath:t}){const r=(0,react_router_dom_1.useLocation)(),o=(0,react_1.useMemo)((()=>(0,utils_1.tryDecodeURIComponent)((0,utils_1.normalizePath)(r.pathname.replace(t,"")))),[r.pathname,t]),s=(0,react_1.useMemo)((()=>{const t=[],r=e=>{e.forEach((e=>{var o;t.push(e),(null===(o=e.items)||void 0===o?void 0:o.length)&&r(e.items)}))};return r([e]),t}),[e]);if("tag"!==e.type)return!1;const u=s.map((e=>e.href));return u.some((e=>{const t=(0,useAutoScroll_1.getLegacyHash)(r.hash);return[e,(0,utils_1.tryDecodeURIComponent)(e)].includes(o)||t&&(e.endsWith(t)||e===(0,theme_1.removeLeadingSlash)(t))}))}
|
|
2
2
|
//# sourceMappingURL=useIsExpanded.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{useMemo}from"react";import{useLocation}from"react-router-dom";import{removeLeadingSlash}from"@redocly/theme";import{tryDecodeURIComponent,normalizePath}from"../../utils";import{getLegacyHash}from"../Content/useAutoScroll";export function useIsExpanded({item:e,routingBasePath:o}){const t=useLocation(),r=useMemo((()=>tryDecodeURIComponent(normalizePath(t.pathname.replace(o,"")))),[t.pathname,o]);if("tag"!==e.type)return!1;
|
|
1
|
+
import{useMemo}from"react";import{useLocation}from"react-router-dom";import{removeLeadingSlash}from"@redocly/theme";import{tryDecodeURIComponent,normalizePath}from"../../utils";import{getLegacyHash}from"../Content/useAutoScroll";export function useIsExpanded({item:e,routingBasePath:o}){const t=useLocation(),r=useMemo((()=>tryDecodeURIComponent(normalizePath(t.pathname.replace(o,"")))),[t.pathname,o]),n=useMemo((()=>{const o=[],t=e=>{e.forEach((e=>{var r;o.push(e),(null===(r=e.items)||void 0===r?void 0:r.length)&&t(e.items)}))};return t([e]),o}),[e]);if("tag"!==e.type)return!1;const a=n.map((e=>e.href));return a.some((e=>{const o=getLegacyHash(t.hash);return[e,tryDecodeURIComponent(e)].includes(r)||o&&(e.endsWith(o)||e===removeLeadingSlash(o))}))}
|
|
2
2
|
//# sourceMappingURL=useIsExpanded.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@redocly/openapi-docs",
|
|
3
|
-
"version": "3.8.0-next.
|
|
3
|
+
"version": "3.8.0-next.3",
|
|
4
4
|
"description": "Redocly OpenAPI Docs",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"module": "lib-esm/index.js",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
26
|
"@markdoc/markdoc": "0.5.1",
|
|
27
|
-
"@redocly/openapi-core": "1.
|
|
27
|
+
"@redocly/openapi-core": "1.34.0",
|
|
28
28
|
"deepmerge": "^4.2.2",
|
|
29
29
|
"dompurify": "3.2.4",
|
|
30
30
|
"fast-deep-equal": "^3.1.3",
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"util": "~0.12.5",
|
|
45
45
|
"web-vitals": "3.3.1",
|
|
46
46
|
"@redocly/config": "0.22.1",
|
|
47
|
-
"@redocly/replay": "0.11.0-next.
|
|
47
|
+
"@redocly/replay": "0.11.0-next.3"
|
|
48
48
|
},
|
|
49
49
|
"devDependencies": {
|
|
50
50
|
"@shikijs/transformers": "1.24.0",
|
|
@@ -93,7 +93,7 @@
|
|
|
93
93
|
"webpack": "5.94.0",
|
|
94
94
|
"webpack-cli": "5.1.4",
|
|
95
95
|
"webpack-dev-server": "5.1.0",
|
|
96
|
-
"@redocly/theme": "0.52.0-next.
|
|
96
|
+
"@redocly/theme": "0.52.0-next.3"
|
|
97
97
|
},
|
|
98
98
|
"scripts": {
|
|
99
99
|
"start": "npm run copy-highlight-hook && webpack serve --mode=development --hot",
|