@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
package/README.md CHANGED
@@ -1 +1 @@
1
- For more details, contact team@redocly.com
1
+ For more details, contact team@redocly.com.
@@ -36,7 +36,7 @@ function ColorModeSwitcher() {
36
36
  const colorMode = themeSettings.colorMode;
37
37
  const [activeColorMode, setActiveColorMode] = (0, react_1.useState)('');
38
38
  const modes = (colorMode === null || colorMode === void 0 ? void 0 : colorMode.modes) || ['light', 'dark'];
39
- const defaultColor = (colorMode === null || colorMode === void 0 ? void 0 : colorMode.default) || modes[0] || 'light';
39
+ const defaultColor = modes[0] || 'light';
40
40
  (0, hooks_1.useMount)(() => {
41
41
  setActiveColorMode(document.documentElement.className || defaultColor);
42
42
  });
@@ -1,7 +1,10 @@
1
1
  /// <reference types="react" />
2
- import type { NavGroupRecord } from '@theme/types/portal';
2
+ import type { NavGroup } from '@theme/types/portal';
3
3
  interface FooterProps {
4
- data: NavGroupRecord;
4
+ data: {
5
+ items?: NavGroup;
6
+ copyrightText?: string;
7
+ };
5
8
  }
6
- export declare function Footer({ data: { columns, copyrightText } }: FooterProps): JSX.Element | null;
9
+ export declare function Footer({ data: { items, copyrightText } }: FooterProps): JSX.Element | null;
7
10
  export {};
@@ -10,13 +10,13 @@ const FooterColumns_1 = require("../Footer/FooterColumns");
10
10
  const FooterCopyright_1 = require("../Footer/FooterCopyright");
11
11
  const utils_1 = require("../utils");
12
12
  const hooks_1 = require("../hooks");
13
- function Footer({ data: { columns, copyrightText } }) {
13
+ function Footer({ data: { items, copyrightText } }) {
14
14
  const { footer } = (0, hooks_1.useThemeConfig)();
15
- if ((0, utils_1.isEmptyArray)(columns) || !copyrightText || (footer === null || footer === void 0 ? void 0 : footer.hide)) {
15
+ if ((0, utils_1.isEmptyArray)(items) || !copyrightText || (footer === null || footer === void 0 ? void 0 : footer.hide)) {
16
16
  return null;
17
17
  }
18
18
  return (react_1.default.createElement(FooterContainer, { "data-component-name": "Footer/Footer" },
19
- react_1.default.createElement(FooterColumns_1.FooterColumns, { columns: columns }),
19
+ react_1.default.createElement(FooterColumns_1.FooterColumns, { columns: items }),
20
20
  react_1.default.createElement(FooterCopyright_1.FooterCopyright, { copyrightText: copyrightText })));
21
21
  }
22
22
  exports.Footer = Footer;
@@ -0,0 +1,2 @@
1
+ /// <reference types="react" />
2
+ export declare function NextButton(): JSX.Element;
@@ -26,24 +26,24 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
26
26
  return (mod && mod.__esModule) ? mod : { "default": mod };
27
27
  };
28
28
  Object.defineProperty(exports, "__esModule", { value: true });
29
- exports.NextPageLink = void 0;
29
+ exports.NextButton = void 0;
30
30
  const React = __importStar(require("react"));
31
31
  const styled_components_1 = __importDefault(require("styled-components"));
32
32
  const hooks_1 = require("../mocks/hooks");
33
33
  const Button_1 = require("../Button/Button");
34
34
  const useThemeConfig_1 = require("../hooks/useThemeConfig");
35
- function NextPageLink() {
35
+ function NextButton() {
36
36
  var _a, _b;
37
37
  const { nextPage } = (0, hooks_1.useSidebarSiblingsData)() || {};
38
38
  const { navigation } = (0, useThemeConfig_1.useThemeConfig)();
39
- if (!nextPage || ((_a = navigation === null || navigation === void 0 ? void 0 : navigation.nextPageLink) === null || _a === void 0 ? void 0 : _a.hide)) {
39
+ if (!nextPage || ((_a = navigation === null || navigation === void 0 ? void 0 : navigation.nextButton) === null || _a === void 0 ? void 0 : _a.hide)) {
40
40
  return React.createElement("div", null, "\u00A0");
41
41
  }
42
- const label = (((_b = navigation === null || navigation === void 0 ? void 0 : navigation.nextPageLink) === null || _b === void 0 ? void 0 : _b.label) || 'Next to {label}').replace('{label}', nextPage.label || nextPage.routeSlug || '');
43
- return (React.createElement(StyledButton, { variant: "outlined", size: "large", to: nextPage.link, "data-component-name": "PageNavigation/NextPageLink" }, label));
42
+ const text = (((_b = navigation === null || navigation === void 0 ? void 0 : navigation.nextButton) === null || _b === void 0 ? void 0 : _b.text) || 'Next to {label}').replace('{label}', nextPage.label || nextPage.routeSlug || '');
43
+ return (React.createElement(StyledButton, { variant: "outlined", size: "large", to: nextPage.link, "data-component-name": "PageNavigation/NextPageLink" }, text));
44
44
  }
45
- exports.NextPageLink = NextPageLink;
45
+ exports.NextButton = NextButton;
46
46
  const StyledButton = (0, styled_components_1.default)(Button_1.Button) `
47
47
  font-family: var(--font-family-base);
48
48
  `;
49
- //# sourceMappingURL=NextPageLink.js.map
49
+ //# sourceMappingURL=NextButton.js.map
@@ -6,18 +6,18 @@ Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.PageNavigation = void 0;
7
7
  const react_1 = __importDefault(require("react"));
8
8
  const styled_components_1 = __importDefault(require("styled-components"));
9
- const PreviousPageLink_1 = require("../PageNavigation/PreviousPageLink");
10
- const NextPageLink_1 = require("../PageNavigation/NextPageLink");
9
+ const PreviousButton_1 = require("../PageNavigation/PreviousButton");
10
+ const NextButton_1 = require("../PageNavigation/NextButton");
11
11
  const useThemeConfig_1 = require("../hooks/useThemeConfig");
12
12
  function PageNavigation() {
13
13
  var _a, _b;
14
14
  const { navigation } = (0, useThemeConfig_1.useThemeConfig)();
15
- if (((_a = navigation === null || navigation === void 0 ? void 0 : navigation.prevPageLink) === null || _a === void 0 ? void 0 : _a.hide) && ((_b = navigation === null || navigation === void 0 ? void 0 : navigation.nextPageLink) === null || _b === void 0 ? void 0 : _b.hide)) {
15
+ if (((_a = navigation === null || navigation === void 0 ? void 0 : navigation.previousButton) === null || _a === void 0 ? void 0 : _a.hide) && ((_b = navigation === null || navigation === void 0 ? void 0 : navigation.nextButton) === null || _b === void 0 ? void 0 : _b.hide)) {
16
16
  return null;
17
17
  }
18
18
  return (react_1.default.createElement(PageNavigationWrapper, { "data-component-name": "PageNavigation/PageNavigation" },
19
- react_1.default.createElement(PreviousPageLink_1.PreviousPageLink, null),
20
- react_1.default.createElement(NextPageLink_1.NextPageLink, null)));
19
+ react_1.default.createElement(PreviousButton_1.PreviousButton, null),
20
+ react_1.default.createElement(NextButton_1.NextButton, null)));
21
21
  }
22
22
  exports.PageNavigation = PageNavigation;
23
23
  const PageNavigationWrapper = styled_components_1.default.div `
@@ -0,0 +1,2 @@
1
+ /// <reference types="react" />
2
+ export declare function PreviousButton(): JSX.Element;
@@ -3,24 +3,24 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.PreviousPageLink = void 0;
6
+ exports.PreviousButton = void 0;
7
7
  const react_1 = __importDefault(require("react"));
8
8
  const styled_components_1 = __importDefault(require("styled-components"));
9
9
  const hooks_1 = require("../mocks/hooks");
10
10
  const useThemeConfig_1 = require("../hooks/useThemeConfig");
11
11
  const Button_1 = require("../Button/Button");
12
- function PreviousPageLink() {
12
+ function PreviousButton() {
13
13
  var _a, _b;
14
14
  const { prevPage } = (0, hooks_1.useSidebarSiblingsData)() || {};
15
15
  const { navigation } = (0, useThemeConfig_1.useThemeConfig)();
16
- if (!prevPage || ((_a = navigation === null || navigation === void 0 ? void 0 : navigation.prevPageLink) === null || _a === void 0 ? void 0 : _a.hide)) {
16
+ if (!prevPage || ((_a = navigation === null || navigation === void 0 ? void 0 : navigation.previousButton) === null || _a === void 0 ? void 0 : _a.hide)) {
17
17
  return react_1.default.createElement("div", null, "\u00A0");
18
18
  }
19
- const label = (((_b = navigation === null || navigation === void 0 ? void 0 : navigation.prevPageLink) === null || _b === void 0 ? void 0 : _b.label) || 'Back to {label}').replace('{label}', prevPage.label || prevPage.routeSlug || '');
20
- return (react_1.default.createElement(StyledButton, { variant: "outlined", size: "large", to: prevPage.link, "data-component-name": "PageNavigation/PreviousPageLink" }, label));
19
+ const text = (((_b = navigation === null || navigation === void 0 ? void 0 : navigation.previousButton) === null || _b === void 0 ? void 0 : _b.text) || 'Back to {label}').replace('{label}', prevPage.label || prevPage.routeSlug || '');
20
+ return (react_1.default.createElement(StyledButton, { variant: "outlined", size: "large", to: prevPage.link, "data-component-name": "PageNavigation/PreviousPageLink" }, text));
21
21
  }
22
- exports.PreviousPageLink = PreviousPageLink;
22
+ exports.PreviousButton = PreviousButton;
23
23
  const StyledButton = (0, styled_components_1.default)(Button_1.Button) `
24
24
  font-family: var(--font-family-base);
25
25
  `;
26
- //# sourceMappingURL=PreviousPageLink.js.map
26
+ //# sourceMappingURL=PreviousButton.js.map
@@ -1,3 +1,3 @@
1
- export * from '../PageNavigation/NextPageLink';
1
+ export * from '../PageNavigation/NextButton';
2
2
  export * from '../PageNavigation/PageNavigation';
3
- export * from '../PageNavigation/PreviousPageLink';
3
+ export * from '../PageNavigation/PreviousButton';
@@ -14,7 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("../PageNavigation/NextPageLink"), exports);
17
+ __exportStar(require("../PageNavigation/NextButton"), exports);
18
18
  __exportStar(require("../PageNavigation/PageNavigation"), exports);
19
- __exportStar(require("../PageNavigation/PreviousPageLink"), exports);
19
+ __exportStar(require("../PageNavigation/PreviousButton"), exports);
20
20
  //# sourceMappingURL=index.js.map
@@ -7,12 +7,12 @@ exports.ArrowBack = void 0;
7
7
  const react_1 = __importDefault(require("react"));
8
8
  const styled_components_1 = __importDefault(require("styled-components"));
9
9
  const Arrow = ({ className }) => (react_1.default.createElement("span", { "data-component-name": "Sidebar/ArrowBack" },
10
- react_1.default.createElement("svg", { fill: "none", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 12 10", width: "12px", height: "10px", className: className },
10
+ react_1.default.createElement("svg", { fill: "none", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 12 10", width: "10px", height: "10px", className: className },
11
11
  react_1.default.createElement("path", { d: "M2.414 5l3.293 3.293a1 1 0 01-1.414 1.414l-4-4a1 1 0 010-1.414l4-4a1 1 0 011.414 1.414L2.414 5z" }),
12
12
  react_1.default.createElement("path", { d: "M2 5a1 1 0 011-1h8a1 1 0 110 2H3a1 1 0 01-1-1z" }))));
13
13
  exports.ArrowBack = (0, styled_components_1.default)(Arrow) `
14
14
  fill: var(--sidebar-back-button-icon-color);
15
- margin-right: calc(var(--sidebar-spacing-unit) * 1.5);
15
+ margin-right: calc(var(--sidebar-spacing-unit));
16
16
 
17
17
  background-image: var(--sidebar-back-button-icon);
18
18
  background-repeat: no-repeat;
@@ -2,6 +2,10 @@ import React from 'react';
2
2
  interface SidebarLayoutProps {
3
3
  versions: React.ReactNode;
4
4
  menu: React.ReactNode;
5
+ backLink?: {
6
+ label: string;
7
+ slug: string;
8
+ };
5
9
  }
6
- export declare function SidebarLayout({ versions, menu }: SidebarLayoutProps): JSX.Element | null;
10
+ export declare function SidebarLayout({ versions, menu, backLink, }: SidebarLayoutProps): JSX.Element | null;
7
11
  export {};
@@ -12,7 +12,9 @@ const MobileSidebarButton_1 = require("../Sidebar/MobileSidebarButton");
12
12
  const MenuContainer_1 = require("../Sidebar/MenuContainer");
13
13
  const SidebarSearch_1 = require("../Search/SidebarSearch");
14
14
  const useThemeConfig_1 = require("../hooks/useThemeConfig");
15
- function SidebarLayout({ versions, menu }) {
15
+ const ArrowBack_1 = require("../Sidebar/ArrowBack");
16
+ const Link_1 = require("../mocks/Link");
17
+ function SidebarLayout({ versions, menu, backLink, }) {
16
18
  const [isOpen, setIsOpen] = (0, useMobileMenu_1.useMobileMenu)();
17
19
  const toggleMenu = () => setIsOpen(!isOpen);
18
20
  const { search, sidebar } = (0, useThemeConfig_1.useThemeConfig)();
@@ -23,9 +25,32 @@ function SidebarLayout({ versions, menu }) {
23
25
  react_1.default.createElement(MobileSidebarButton_1.MobileSidebarButton, { opened: isOpen, onClick: toggleMenu }),
24
26
  !(search === null || search === void 0 ? void 0 : search.hide) && (search === null || search === void 0 ? void 0 : search.placement) === 'sidebar' ? react_1.default.createElement(SidebarSearch_1.SidebarSearch, null) : null,
25
27
  react_1.default.createElement(Sidebar_1.Sidebar, { animate: true, opened: isOpen },
28
+ (backLink && (react_1.default.createElement(BackLinkWrapper, null,
29
+ react_1.default.createElement(Link_1.Link, { to: backLink.slug },
30
+ react_1.default.createElement(ArrowBack_1.ArrowBack, null),
31
+ "Back to ",
32
+ backLink.label)))) ||
33
+ null,
26
34
  versions,
27
35
  react_1.default.createElement(MenuContainer_1.MenuContainer, null, menu))));
28
36
  }
29
37
  exports.SidebarLayout = SidebarLayout;
38
+ const BackLinkWrapper = styled_components_1.default.div `
39
+ padding: var(--sidebar-offset-top) var(--sidebar-item-padding-horizontal)
40
+ var(--sidebar-item-padding-horizontal)
41
+ calc(var(--sidebar-offset-left) + var(--sidebar-item-padding-horizontal));
42
+
43
+ a {
44
+ color: var(--sidebar-back-button-text-color);
45
+ font-size: var(--sidebar-back-button-font-size);
46
+ font-family: var(--sidebar-back-button-font-family);
47
+ text-decoration: none;
48
+ &:hover {
49
+ color: var(--sidebar-back-button-hover-text-color);
50
+ }
51
+ }
52
+
53
+ border-bottom: 1px solid var(--sidebar-border-color);
54
+ `;
30
55
  const Wrapper = styled_components_1.default.div ``;
31
56
  //# sourceMappingURL=SidebarLayout.js.map
@@ -18,7 +18,7 @@ export interface NavItem {
18
18
  target?: string;
19
19
  external?: boolean;
20
20
  items?: NavItem[];
21
- permission?: string;
21
+ requiredPermission?: string;
22
22
  menuStyle?: MenuStyle;
23
23
  separatorLine?: boolean;
24
24
  version?: string;
@@ -27,7 +27,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
27
27
  };
28
28
  Object.defineProperty(exports, "__esModule", { value: true });
29
29
  exports.TableOfContent = void 0;
30
- const react_1 = __importStar(require("react"));
30
+ const React = __importStar(require("react"));
31
31
  const styled_components_1 = __importDefault(require("styled-components"));
32
32
  const useFullHeight_1 = require("../hooks/useFullHeight");
33
33
  const useActiveHeading_1 = require("../hooks/useActiveHeading");
@@ -35,31 +35,26 @@ const useThemeConfig_1 = require("../hooks/useThemeConfig");
35
35
  const utils_1 = require("./utils");
36
36
  function TableOfContent(props) {
37
37
  const { headings, contentWrapper } = props;
38
- const sidebar = (0, react_1.useRef)(null);
38
+ const sidebar = React.useRef(null);
39
39
  (0, useFullHeight_1.useFullHeight)(sidebar);
40
40
  const { markdown: { toc = {} } = {} } = (0, useThemeConfig_1.useThemeConfig)();
41
- const displayedHeadings = (0, utils_1.getDisplayedHeadings)(headings, toc.maxDepth || 3);
41
+ const displayedHeadings = (0, utils_1.getDisplayedHeadings)(headings, toc.depth || 3);
42
42
  const leastDepth = (0, utils_1.getLeastDepth)(displayedHeadings);
43
43
  const activeHeadingId = (0, useActiveHeading_1.useActiveHeading)(contentWrapper, (0, utils_1.getDisplayedHeadingsIds)(displayedHeadings));
44
44
  if (toc === null || toc === void 0 ? void 0 : toc.hide) {
45
45
  return null;
46
46
  }
47
- if (headings && headings.length === 1 && (!headings[0] || headings[0].depth === 1)) {
48
- return null;
49
- }
50
- if (!(headings === null || headings === void 0 ? void 0 : headings.length)) {
51
- return null;
52
- }
53
- return (react_1.default.createElement(react_1.default.Fragment, null, headings && (react_1.default.createElement(TableOfContentMenu, { "data-component-name": "TableOfContent/TableOfContent" },
54
- react_1.default.createElement(TableOfContentItems, { ref: sidebar },
55
- react_1.default.createElement(TocHeader, null, toc.header || 'On this page'),
56
- displayedHeadings.map((heading, idx) => {
57
- if (!heading) {
58
- return null;
59
- }
60
- const href = '#' + heading.id;
61
- return (react_1.default.createElement(MenuItem, { key: href + idx, href: href, depth: heading.depth - leastDepth + 1 || 0, className: activeHeadingId === heading.id ? 'active' : '', dangerouslySetInnerHTML: { __html: heading.value || '' }, "data-cy": `toc-${heading.value}` }));
62
- }))))));
47
+ return (React.createElement(React.Fragment, null,
48
+ React.createElement(TableOfContentMenu, { "data-component-name": "TableOfContent/TableOfContent" },
49
+ React.createElement(TableOfContentItems, { ref: sidebar },
50
+ displayedHeadings.length ? React.createElement(TocHeader, null, toc.header || 'On this page') : null,
51
+ displayedHeadings.map((heading, idx) => {
52
+ if (!heading) {
53
+ return null;
54
+ }
55
+ const href = '#' + heading.id;
56
+ return (React.createElement(MenuItem, { key: href + idx, href: href, depth: heading.depth - leastDepth + 1 || 0, className: activeHeadingId === heading.id ? 'active' : '', dangerouslySetInnerHTML: { __html: heading.value || '' }, "data-cy": `toc-${heading.value}` }));
57
+ })))));
63
58
  }
64
59
  exports.TableOfContent = TableOfContent;
65
60
  const TocHeader = styled_components_1.default.div `
@@ -1,4 +1,4 @@
1
1
  import type { MdHeading } from '@theme/types/portal';
2
- export declare function getDisplayedHeadings(headings: Array<MdHeading | null> | null | undefined, tocMaxDepth: number): Array<MdHeading | null>;
2
+ export declare function getDisplayedHeadings(headings: Array<MdHeading | null> | null | undefined, tocDepth: number): Array<MdHeading | null>;
3
3
  export declare function getDisplayedHeadingsIds(headings: Array<MdHeading | null> | null | undefined): Array<string | undefined>;
4
4
  export declare function getLeastDepth(headings: Array<MdHeading | null> | null | undefined): number;
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getLeastDepth = exports.getDisplayedHeadingsIds = exports.getDisplayedHeadings = void 0;
4
- function getDisplayedHeadings(headings, tocMaxDepth) {
4
+ function getDisplayedHeadings(headings, tocDepth) {
5
5
  if (!headings) {
6
6
  return [];
7
7
  }
@@ -12,7 +12,7 @@ function getDisplayedHeadings(headings, tocMaxDepth) {
12
12
  if (idx === 0 && heading.depth === 1) {
13
13
  return false;
14
14
  }
15
- return !(heading.depth && heading.depth > tocMaxDepth);
15
+ return !(heading.depth && heading.depth > tocDepth);
16
16
  });
17
17
  }
18
18
  exports.getDisplayedHeadings = getDisplayedHeadings;