@redocly/theme 0.61.0-next.0 → 0.61.0-next.1

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.
@@ -38,6 +38,7 @@ const ProductDropdown = (0, styled_components_1.default)(Dropdown_1.Dropdown).at
38
38
  display: none;
39
39
  @media screen and (min-width: ${utils_1.breakpoints.medium}) {
40
40
  display: block;
41
+ height: fit-content;
41
42
  }
42
43
 
43
44
  --dropdown-menu-item-justify-content: space-between;
@@ -29,9 +29,13 @@ function withPathPrefix(url) {
29
29
  }
30
30
  function withoutPathPrefix(pathname) {
31
31
  const pathPrefix = getPathPrefix();
32
- return pathPrefix && pathname.startsWith(pathPrefix)
33
- ? pathname.slice(pathPrefix.length)
34
- : pathname;
32
+ if (!pathPrefix) {
33
+ return pathname;
34
+ }
35
+ if (pathPrefix === pathname) {
36
+ return '/';
37
+ }
38
+ return pathname.startsWith(pathPrefix) ? pathname.slice(pathPrefix.length) : pathname;
35
39
  }
36
40
  function withoutHash(url) {
37
41
  if (url == null)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@redocly/theme",
3
- "version": "0.61.0-next.0",
3
+ "version": "0.61.0-next.1",
4
4
  "description": "Shared UI components lib",
5
5
  "keywords": [
6
6
  "theme",
@@ -63,7 +63,7 @@
63
63
  "vitest": "4.0.10",
64
64
  "vitest-when": "0.6.2",
65
65
  "webpack": "5.94.0",
66
- "@redocly/realm-asyncapi-sdk": "0.7.0-next.0"
66
+ "@redocly/realm-asyncapi-sdk": "0.7.0-next.1"
67
67
  },
68
68
  "dependencies": {
69
69
  "@tanstack/react-query": "5.62.3",
@@ -56,6 +56,7 @@ const ProductDropdown = styled(Dropdown).attrs(() => ({
56
56
  display: none;
57
57
  @media screen and (min-width: ${breakpoints.medium}) {
58
58
  display: block;
59
+ height: fit-content;
59
60
  }
60
61
 
61
62
  --dropdown-menu-item-justify-content: space-between;
@@ -19,9 +19,16 @@ export function withPathPrefix(url: string) {
19
19
 
20
20
  export function withoutPathPrefix(pathname: string) {
21
21
  const pathPrefix = getPathPrefix();
22
- return pathPrefix && pathname.startsWith(pathPrefix)
23
- ? pathname.slice(pathPrefix.length)
24
- : pathname;
22
+
23
+ if (!pathPrefix) {
24
+ return pathname;
25
+ }
26
+
27
+ if (pathPrefix === pathname) {
28
+ return '/';
29
+ }
30
+
31
+ return pathname.startsWith(pathPrefix) ? pathname.slice(pathPrefix.length) : pathname;
25
32
  }
26
33
 
27
34
  export function withoutHash(url: undefined | null): undefined;