@redocly/theme 0.6.0 → 0.6.2-beta.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.
Files changed (42) hide show
  1. package/README.md +1 -1
  2. package/lib/ColorModeSwitcher/ColorModeSwitcher.js +1 -1
  3. package/lib/Footer/Footer.d.ts +6 -3
  4. package/lib/Footer/Footer.js +3 -3
  5. package/lib/PageNavigation/NextButton.d.ts +2 -0
  6. package/lib/PageNavigation/{NextPageLink.js → NextButton.js} +7 -7
  7. package/lib/PageNavigation/PageNavigation.js +5 -5
  8. package/lib/PageNavigation/PreviousButton.d.ts +2 -0
  9. package/lib/PageNavigation/{PreviousPageLink.js → PreviousButton.js} +7 -7
  10. package/lib/PageNavigation/index.d.ts +2 -2
  11. package/lib/PageNavigation/index.js +2 -2
  12. package/lib/Sidebar/ArrowBack.js +2 -2
  13. package/lib/Sidebar/SidebarLayout.d.ts +5 -1
  14. package/lib/Sidebar/SidebarLayout.js +26 -1
  15. package/lib/Sidebar/types/NavItem.d.ts +1 -1
  16. package/lib/TableOfContent/TableOfContent.js +14 -19
  17. package/lib/TableOfContent/utils.d.ts +1 -1
  18. package/lib/TableOfContent/utils.js +2 -2
  19. package/lib/config.d.ts +342 -72
  20. package/lib/config.js +61 -17
  21. package/lib/globalStyle.js +1 -1
  22. package/lib/mocks/hooks/index.js +4 -5
  23. package/package.json +3 -3
  24. package/src/ColorModeSwitcher/ColorModeSwitcher.tsx +1 -1
  25. package/src/Footer/Footer.tsx +8 -5
  26. package/src/PageNavigation/{NextPageLink.tsx → NextButton.tsx} +4 -4
  27. package/src/PageNavigation/PageNavigation.tsx +5 -5
  28. package/src/PageNavigation/{PreviousPageLink.tsx → PreviousButton.tsx} +4 -4
  29. package/src/PageNavigation/index.ts +2 -2
  30. package/src/Sidebar/ArrowBack.tsx +2 -2
  31. package/src/Sidebar/SidebarLayout.tsx +38 -1
  32. package/src/Sidebar/types/NavItem.ts +1 -1
  33. package/src/TableOfContent/TableOfContent.tsx +24 -32
  34. package/src/TableOfContent/utils.ts +2 -2
  35. package/src/config.ts +73 -24
  36. package/src/globalStyle.ts +1 -1
  37. package/src/mocks/hooks/index.ts +4 -5
  38. package/src/settings.yaml +2 -2
  39. package/src/types/portal/src/shared/constants.d.ts +0 -1
  40. package/src/types/portal/src/shared/types/nav.d.ts +1 -2
  41. package/lib/PageNavigation/NextPageLink.d.ts +0 -2
  42. package/lib/PageNavigation/PreviousPageLink.d.ts +0 -2
@@ -517,7 +517,7 @@ const sidebar = css`
517
517
  --sidebar-back-button-font-family: var(--sidebar-item-font-family);
518
518
  --sidebar-back-button-font-size: var(--sidebar-item-font-size);
519
519
  --sidebar-back-button-transform: inherit;
520
- --sidebar-back-button-text-color: var(--sidebar-item-text-color);
520
+ --sidebar-back-button-text-color: var(--link-text-color);
521
521
  --sidebar-back-button-background-color: transparent;
522
522
  --sidebar-back-button-hover-text-color: var(--sidebar-item-active-color);
523
523
  --sidebar-back-button-hover-background-color: transparent;
@@ -10,7 +10,7 @@ export function useThemeConfig<T extends Record<string, unknown>>(): T & ThemeUI
10
10
  return {
11
11
  search: { hide: false, placement: 'navbar' },
12
12
  markdown: {
13
- toc: { maxDepth: 3, header: 'Table of contents', hide: false },
13
+ toc: { depth: 3, header: 'Table of contents', hide: false },
14
14
  lastUpdatedBlock: { hide: false, format: 'timeago', locale: 'en-US' },
15
15
  copyCodeSnippet: {
16
16
  hide: false,
@@ -23,15 +23,14 @@ export function useThemeConfig<T extends Record<string, unknown>>(): T & ThemeUI
23
23
  baseUrl: '',
24
24
  text: 'Edit this page',
25
25
  },
26
- frontmatterKeysToResolve: ['image', 'links'],
26
+ frontMatterKeysToResolve: ['image', 'links'],
27
27
  },
28
28
  navigation: {
29
- nextPageLink: { label: 'next page theme config label' },
30
- prevPageLink: { label: 'prev page theme config label' },
29
+ nextButton: { text: 'next page theme config label' },
30
+ previousButton: { text: 'prev page theme config label' },
31
31
  },
32
32
  colorMode: {
33
33
  modes: ['light', 'dark'],
34
- default: 'light',
35
34
  },
36
35
  } as ThemeUIConfig as T & ThemeUIConfig;
37
36
  }
package/src/settings.yaml CHANGED
@@ -7,9 +7,9 @@ toc:
7
7
  label: On this page
8
8
  navigation:
9
9
  hide: false
10
- nextPageLink:
10
+ nextButton:
11
11
  hide: false
12
- prevPageLink:
12
+ previousButton:
13
13
  hide: false
14
14
  navbar:
15
15
  hide: false
@@ -8,7 +8,6 @@ export declare const PUBLIC_ASSETS_FOLDER = '/assets';
8
8
  export declare const PUBLIC_STATIC_FOLDER = '/static';
9
9
  export declare const PERMISSION_PROP_NAME = 'redocly::permission';
10
10
  export declare const DEFAULT_PLACEHOLDER_PERMISSION = 'redocly:default-permission';
11
- export declare const DIRECTORY_PERMISSIONS_FILE_NAME = 'permissions.rbac.yaml';
12
11
  export declare const REQUIRED_OIDC_SCOPES: string[];
13
12
  export declare const DEFAULT_COOKIE_EXPIRATION: number;
14
13
  export declare const DEFAULT_AUTHENTICATED_ROLE = 'AuthenticatedUser';
@@ -77,10 +77,9 @@ export interface PageStaticData {
77
77
  [k: string]: unknown;
78
78
  }
79
79
  export declare type UserData = {
80
- isAuthorized: boolean;
80
+ isAuthenticated: boolean;
81
81
  name: string;
82
82
  picture: string;
83
- logoutDisabled?: boolean;
84
83
  };
85
84
  export interface PageData {
86
85
  templateId: string;
@@ -1,2 +0,0 @@
1
- /// <reference types="react" />
2
- export declare function NextPageLink(): JSX.Element;
@@ -1,2 +0,0 @@
1
- /// <reference types="react" />
2
- export declare function PreviousPageLink(): JSX.Element;