@redocly/theme 0.44.2 → 0.44.4
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.
- package/lib/components/Admonition/Admonition.js +1 -2
- package/lib/components/ApiOnboarding/AppCustomAttributes.js +1 -2
- package/lib/components/Badge/Badge.js +1 -2
- package/lib/components/Breadcrumbs/Breadcrumb.js +1 -2
- package/lib/components/Breadcrumbs/Breadcrumbs.js +1 -2
- package/lib/components/Button/Button.js +2 -2
- package/lib/components/Buttons/EditPageButton.js +1 -2
- package/lib/components/Buttons/EmailButton.js +1 -2
- package/lib/components/Buttons/NewTabButton.js +1 -2
- package/lib/components/Catalog/Catalog.d.ts +1 -1
- package/lib/components/Catalog/Catalog.js +1 -1
- package/lib/components/Catalog/CatalogActions.js +1 -2
- package/lib/components/Catalog/CatalogCard.js +1 -2
- package/lib/components/Catalog/CatalogHighlight.js +2 -2
- package/lib/components/Catalog/CatalogInfoBlock.js +1 -2
- package/lib/components/CodeBlock/CodeBlock.js +1 -2
- package/lib/components/CodeBlock/CodeBlockContainer.js +1 -2
- package/lib/components/CodeBlock/CodeBlockControls.js +1 -2
- package/lib/components/CodeBlock/CodeBlockTabs.js +1 -2
- package/lib/components/ColorModeSwitcher/ColorModeIcon.js +1 -2
- package/lib/components/ColorModeSwitcher/ColorModeSwitcher.js +1 -2
- package/lib/components/Dropdown/Dropdown.js +1 -2
- package/lib/components/Dropdown/DropdownMenu.js +1 -2
- package/lib/components/Dropdown/DropdownMenuItem.js +1 -2
- package/lib/components/Feedback/Comment.js +1 -2
- package/lib/components/Feedback/Feedback.js +1 -2
- package/lib/components/Feedback/Mood.js +2 -2
- package/lib/components/Feedback/Rating.js +2 -2
- package/lib/components/Feedback/Reasons.js +1 -2
- package/lib/components/Feedback/ReportDialog.js +1 -2
- package/lib/components/Feedback/Scale.js +2 -2
- package/lib/components/Feedback/Sentiment.js +1 -2
- package/lib/components/Feedback/Stars.js +1 -2
- package/lib/components/Filter/Filter.js +1 -2
- package/lib/components/Filter/FilterCheckboxes.js +1 -2
- package/lib/components/Filter/FilterContent.js +1 -2
- package/lib/components/Filter/FilterDateRange.js +1 -2
- package/lib/components/Filter/FilterInput.js +1 -2
- package/lib/components/Filter/FilterOption.js +1 -2
- package/lib/components/Filter/FilterOptionLabel.js +1 -2
- package/lib/components/Filter/FilterOptions.js +1 -2
- package/lib/components/Filter/FilterPopover.js +1 -2
- package/lib/components/Filter/FilterSelect.js +1 -2
- package/lib/components/Filter/FilterTitle.js +1 -2
- package/lib/components/Footer/Footer.js +1 -2
- package/lib/components/Footer/FooterColumn.js +1 -2
- package/lib/components/Footer/FooterCopyright.js +1 -2
- package/lib/components/Footer/FooterItem.js +1 -2
- package/lib/components/Footer/FooterLogo.js +1 -2
- package/lib/components/Image/Image.js +1 -2
- package/lib/components/JsonViewer/helpers.js +1 -2
- package/lib/components/LanguagePicker/LanguagePicker.js +1 -2
- package/lib/components/LastUpdated/LastUpdated.js +1 -2
- package/lib/components/Link/Link.js +1 -2
- package/lib/components/Loaders/Loading.js +1 -2
- package/lib/components/Loaders/SpinnerLoader.js +1 -2
- package/lib/components/Logo/Logo.js +1 -2
- package/lib/components/Markdown/Markdown.d.ts +1 -9
- package/lib/components/Markdown/styles/headingAnchor.js +1 -2
- package/lib/components/Menu/Menu.js +1 -2
- package/lib/components/Menu/MenuContainer.js +1 -2
- package/lib/components/Menu/MenuItem.js +1 -2
- package/lib/components/Menu/MenuMobile.js +1 -2
- package/lib/components/Navbar/Navbar.js +1 -2
- package/lib/components/Navbar/NavbarItem.js +1 -2
- package/lib/components/Navbar/NavbarLogo.js +1 -2
- package/lib/components/Navbar/NavbarMenu.js +1 -2
- package/lib/components/PageNavigation/NextButton.js +1 -2
- package/lib/components/PageNavigation/PageNavigation.js +1 -2
- package/lib/components/PageNavigation/PreviousButton.js +1 -2
- package/lib/components/Panel/Panel.js +1 -2
- package/lib/components/Portal/Portal.js +1 -2
- package/lib/components/Product/Product.js +1 -2
- package/lib/components/Product/ProductPicker.js +1 -2
- package/lib/components/Search/FilterFields/SearchFilterFieldSelect.js +1 -2
- package/lib/components/Search/FilterFields/SearchFilterFieldTags.js +1 -2
- package/lib/components/Search/Search.js +1 -2
- package/lib/components/Search/SearchDialog.js +1 -2
- package/lib/components/Search/SearchFilter.js +1 -2
- package/lib/components/Search/SearchFilterField.js +1 -2
- package/lib/components/Search/SearchGroups.js +1 -2
- package/lib/components/Search/SearchHighlight.js +1 -2
- package/lib/components/Search/SearchInput.js +1 -2
- package/lib/components/Search/SearchItem.js +1 -2
- package/lib/components/Search/SearchRecent.js +1 -2
- package/lib/components/Search/SearchShortcut.js +1 -2
- package/lib/components/Search/SearchSuggestedPages.js +1 -2
- package/lib/components/Search/SearchTrigger.js +1 -2
- package/lib/components/Select/Select.d.ts +1 -1
- package/lib/components/Select/Select.js +3 -3
- package/lib/components/Select/SelectInput.js +2 -2
- package/lib/components/Sidebar/Sidebar.js +1 -2
- package/lib/components/SidebarActions/styled.d.ts +5 -5
- package/lib/components/SidebarLogo/SidebarLogo.js +1 -2
- package/lib/components/Switch/Switch.js +1 -2
- package/lib/components/TableOfContent/TableOfContent.js +1 -2
- package/lib/components/Tag/Tag.js +1 -2
- package/lib/components/Tooltip/Tooltip.js +2 -2
- package/lib/components/UserMenu/LoginButton.js +1 -2
- package/lib/components/UserMenu/LogoutMenuItem.js +1 -2
- package/lib/components/UserMenu/UserAvatar.js +1 -2
- package/lib/components/UserMenu/UserInfoMenuItem.js +1 -2
- package/lib/components/UserMenu/UserMenu.js +1 -2
- package/lib/components/UserMenu/UserMenuMobile.js +1 -2
- package/lib/components/VersionPicker/VersionPicker.js +2 -2
- package/lib/core/contexts/ThemeDataContext.d.ts +0 -1
- package/lib/core/hooks/__mocks__/search/use-recent-searches.d.ts +0 -1
- package/lib/core/hooks/__mocks__/search/use-search-filter.d.ts +0 -1
- package/lib/core/hooks/__mocks__/search/use-suggested-pages.d.ts +0 -1
- package/lib/core/hooks/__mocks__/use-controlled-state.d.ts +0 -1
- package/lib/core/hooks/__mocks__/use-mobile-menu.d.ts +0 -1
- package/lib/core/hooks/__mocks__/use-theme-config.d.ts +0 -1
- package/lib/core/hooks/__mocks__/use-theme-hooks.d.ts +0 -1
- package/lib/core/hooks/feedback/use-report-dialog.js +1 -2
- package/lib/core/hooks/menu/__mocks__/use-mobile-menu-items.d.ts +0 -1
- package/lib/core/hooks/menu/use-collapse.d.ts +1 -1
- package/lib/core/hooks/menu/use-collapse.js +6 -7
- package/lib/core/hooks/menu/use-menu-item-expanded.js +1 -2
- package/lib/core/hooks/menu/use-mobile-menu-items.d.ts +2 -2
- package/lib/core/hooks/menu/use-nested-menu.js +1 -2
- package/lib/core/hooks/search/use-search-dialog.js +1 -2
- package/lib/core/hooks/search/use-search-filter.js +1 -2
- package/lib/core/hooks/use-active-heading.js +1 -2
- package/lib/core/hooks/use-active-section-id.js +1 -2
- package/lib/core/hooks/use-codeblock-tabs-controls.js +1 -2
- package/lib/core/hooks/use-controlled-state.js +1 -2
- package/lib/core/hooks/use-dialog-hotkeys.js +1 -2
- package/lib/core/hooks/use-focus-trap.js +1 -2
- package/lib/core/hooks/use-full-height.js +1 -2
- package/lib/core/hooks/use-language-picker.js +1 -2
- package/lib/core/hooks/use-mobile-menu.js +1 -2
- package/lib/core/hooks/use-modal-scroll-lock.js +1 -2
- package/lib/core/hooks/use-navbar-height.js +1 -2
- package/lib/core/hooks/use-outside-click.js +1 -2
- package/lib/core/hooks/use-product-picker.js +1 -2
- package/lib/core/hooks/use-tabs.d.ts +0 -1
- package/lib/core/hooks/use-tabs.js +1 -2
- package/lib/core/hooks/use-theme-config.js +1 -2
- package/lib/core/templates/Markdown.js +1 -1
- package/lib/core/utils/args-typecheck.js +2 -3
- package/lib/core/utils/attribute-parser.js +1 -2
- package/lib/core/utils/change-text-casing.js +1 -2
- package/lib/core/utils/class-names.js +1 -2
- package/lib/core/utils/color.js +1 -2
- package/lib/core/utils/details.js +1 -2
- package/lib/core/utils/dom.js +2 -2
- package/lib/core/utils/format-date-without-timezone.js +1 -2
- package/lib/core/utils/get-navbar-element.js +1 -2
- package/lib/core/utils/highlight.js +3 -4
- package/lib/core/utils/is-url.js +1 -2
- package/lib/core/utils/js-utils.js +3 -4
- package/lib/core/utils/load-and-navigate.js +4 -5
- package/lib/core/utils/markdoc.js +1 -2
- package/lib/core/utils/menu.js +2 -2
- package/lib/core/utils/replace-hash-in-color.js +1 -2
- package/lib/core/utils/text-transform.js +1 -2
- package/lib/core/utils/text-trimmer.js +1 -2
- package/lib/core/utils/theme-helpers.js +3 -4
- package/lib/core/utils/toc.js +3 -4
- package/lib/core/utils/type-guards.js +5 -5
- package/lib/core/utils/urls.js +14 -15
- package/lib/core/utils/with-load-progress.js +1 -2
- package/lib/icons/AddIcon/AddIcon.d.ts +3 -3
- package/lib/icons/ArrowLeftIcon/ArrowLeftIcon.d.ts +3 -3
- package/lib/icons/ArrowRightIcon/ArrowRightIcon.d.ts +3 -3
- package/lib/icons/ArrowUpRightIcon/ArrowUpRightIcon.d.ts +3 -3
- package/lib/icons/BareMetalServerIcon/BareMetalServerIcon.d.ts +3 -3
- package/lib/icons/BookmarkAddIcon/BookmarkAddIcon.d.ts +3 -3
- package/lib/icons/CertificateIcon/CertificateIcon.d.ts +9 -0
- package/lib/icons/CertificateIcon/CertificateIcon.js +26 -0
- package/lib/icons/CharacterIcon/CharacterIcon.d.ts +3 -3
- package/lib/icons/CheckboxIcon/CheckboxIcon.d.ts +3 -3
- package/lib/icons/CheckmarkFilledIcon/CheckmarkFilledIcon.d.ts +3 -3
- package/lib/icons/CheckmarkIcon/CheckmarkIcon.d.ts +3 -3
- package/lib/icons/ChevronDownIcon/ChevronDownIcon.d.ts +3 -3
- package/lib/icons/ChevronLeftIcon/ChevronLeftIcon.d.ts +3 -3
- package/lib/icons/ChevronRightIcon/ChevronRightIcon.d.ts +3 -3
- package/lib/icons/ChevronUpIcon/ChevronUpIcon.d.ts +3 -3
- package/lib/icons/CircleDashIcon/CircleDashIcon.d.ts +3 -3
- package/lib/icons/CleanIcon/CleanIcon.d.ts +3 -3
- package/lib/icons/CloseFilledIcon/CloseFilledIcon.d.ts +3 -3
- package/lib/icons/CloseIcon/CloseIcon.d.ts +3 -3
- package/lib/icons/CloseOutlineIcon/CloseOutlineIcon.d.ts +3 -3
- package/lib/icons/CloudUploadIcon/CloudUploadIcon.d.ts +3 -3
- package/lib/icons/CodeIcon/CodeIcon.d.ts +3 -3
- package/lib/icons/ContrastIcon/ContrastIcon.d.ts +3 -3
- package/lib/icons/CookieIcon/CookieIcon.d.ts +3 -3
- package/lib/icons/CopyIcon/CopyIcon.d.ts +3 -3
- package/lib/icons/CopyLinkIcon/CopyLinkIcon.d.ts +3 -3
- package/lib/icons/DataFormatIcon/DataFormatIcon.d.ts +3 -3
- package/lib/icons/DatabaseIcon/DatabaseIcon.d.ts +3 -3
- package/lib/icons/DocumentAddIcon/DocumentAddIcon.d.ts +3 -3
- package/lib/icons/DocumentBlankIcon/DocumentBlankIcon.d.ts +3 -3
- package/lib/icons/DocumentIcon/DocumentIcon.d.ts +3 -3
- package/lib/icons/DownloadIcon/DownloadIcon.d.ts +3 -3
- package/lib/icons/EditIcon/EditIcon.d.ts +3 -3
- package/lib/icons/EmailIcon/EmailIcon.d.ts +3 -3
- package/lib/icons/ErrorIcon/ErrorIcon.d.ts +3 -3
- package/lib/icons/ExportIcon/ExportIcon.d.ts +3 -3
- package/lib/icons/FaceDissatisfiedIcon/FaceDissatisfiedIcon.d.ts +3 -3
- package/lib/icons/FaceNeutralIcon/FaceNeutralIcon.d.ts +3 -3
- package/lib/icons/FaceSatisfiedIcon/FaceSatisfiedIcon.d.ts +3 -3
- package/lib/icons/FileIcon/FileIcon.d.ts +3 -3
- package/lib/icons/FileStorageIcon/FileStorageIcon.d.ts +3 -3
- package/lib/icons/FilterIcon/FilterIcon.d.ts +3 -3
- package/lib/icons/FolderAddIcon/FolderAddIcon.d.ts +3 -3
- package/lib/icons/FolderIcon/FolderIcon.d.ts +3 -3
- package/lib/icons/FolderMoveToIcon/FolderMoveToIcon.d.ts +3 -3
- package/lib/icons/GlobalOutlinedIcon/GlobalOutlinedIcon.d.ts +3 -3
- package/lib/icons/GridIcon/GridIcon.d.ts +3 -3
- package/lib/icons/HorizontalViewIcon/HorizontalViewIcon.d.ts +3 -3
- package/lib/icons/IBMCloudHyperProtectCryptoServicesIcon/IBMCloudHyperProtectCryptoServicesIcon.d.ts +3 -3
- package/lib/icons/InformationFilledIcon/InformationFilledIcon.d.ts +3 -3
- package/lib/icons/InformationIcon/InformationIcon.d.ts +3 -3
- package/lib/icons/JsonIcon/JsonIcon.d.ts +3 -3
- package/lib/icons/LaunchIcon/LaunchIcon.d.ts +3 -3
- package/lib/icons/LinkIcon/LinkIcon.d.ts +3 -3
- package/lib/icons/LogoutIcon/LogoutIcon.d.ts +3 -3
- package/lib/icons/MaximizeIcon/MaximizeIcon.d.ts +3 -3
- package/lib/icons/MenuIcon/MenuIcon.d.ts +3 -3
- package/lib/icons/MinimizeIcon/MinimizeIcon.d.ts +3 -3
- package/lib/icons/MobileSidebarIcon/MobileSidebarIcon.d.ts +3 -3
- package/lib/icons/MoonIcon/MoonIcon.d.ts +3 -3
- package/lib/icons/OverflowMenuHorizontalIcon/OverflowMenuHorizontalIcon.d.ts +3 -3
- package/lib/icons/OverflowMenuVerticalIcon/OverflowMenuVerticalIcon.d.ts +3 -3
- package/lib/icons/PlusCustomIcon/PlusCustomIcon.d.ts +3 -3
- package/lib/icons/RecentlyViewedIcon/RecentlyViewedIcon.d.ts +3 -3
- package/lib/icons/RenewIcon/RenewIcon.d.ts +3 -3
- package/lib/icons/ResetIcon/ResetIcon.d.ts +3 -3
- package/lib/icons/RestartIcon/RestartIcon.d.ts +3 -3
- package/lib/icons/RocketIcon/RocketIcon.d.ts +3 -3
- package/lib/icons/SaveIcon/SaveIcon.d.ts +3 -3
- package/lib/icons/SearchIcon/SearchIcon.d.ts +3 -3
- package/lib/icons/SecurityIcon/SecurityIcon.d.ts +3 -3
- package/lib/icons/SettingsIcon/SettingsIcon.d.ts +6 -4
- package/lib/icons/SettingsIcon/SettingsIcon.js +19 -3
- package/lib/icons/SidePanelCloseIcon/SidePanelCloseIcon.d.ts +3 -3
- package/lib/icons/SidePanelOpenIcon/SidePanelOpenIcon.d.ts +3 -3
- package/lib/icons/Spinner/Spinner.d.ts +3 -4
- package/lib/icons/StarFilledIcon/StarFilledIcon.d.ts +3 -3
- package/lib/icons/StarIcon/StarIcon.d.ts +3 -3
- package/lib/icons/SubtractIcon/SubtractIcon.d.ts +3 -3
- package/lib/icons/SunIcon/SunIcon.d.ts +3 -3
- package/lib/icons/TableBuiltIcon/TableBuiltIcon.d.ts +3 -3
- package/lib/icons/TimeIcon/TimeIcon.d.ts +3 -3
- package/lib/icons/TrashCanIcon/TrashCanIcon.d.ts +3 -3
- package/lib/icons/UserIcon/UserIcon.d.ts +3 -3
- package/lib/icons/ValueVariableIcon/ValueVariableIcon.d.ts +3 -3
- package/lib/icons/VerticalViewIcon/VerticalViewIcon.d.ts +3 -3
- package/lib/icons/ViewIcon/ViewIcon.d.ts +3 -3
- package/lib/icons/ViewOffIcon/ViewOffIcon.d.ts +3 -3
- package/lib/icons/WarningAltIcon/WarningAltIcon.d.ts +3 -3
- package/lib/icons/WarningFilledIcon/WarningFilledIcon.d.ts +3 -3
- package/lib/icons/WarningSquareIcon/WarningSquareIcon.d.ts +3 -3
- package/lib/index.d.ts +1 -0
- package/lib/index.js +1 -0
- package/lib/layouts/DocumentationLayout.js +1 -2
- package/lib/layouts/Forbidden.js +1 -2
- package/lib/layouts/NotFound.js +1 -2
- package/lib/layouts/OIDCForbidden.js +1 -2
- package/lib/layouts/PageLayout.js +1 -2
- package/lib/layouts/RootLayout.js +1 -2
- package/lib/layouts/ThreePanelLayout.js +1 -2
- package/lib/markdoc/components/Admonition/Admonition.js +1 -2
- package/lib/markdoc/components/Cards/Card.js +1 -2
- package/lib/markdoc/components/Cards/CardIcon.js +1 -2
- package/lib/markdoc/components/Cards/CardImage.js +1 -2
- package/lib/markdoc/components/Cards/Cards.js +1 -2
- package/lib/markdoc/components/CodeBlock/CodeBlock.js +1 -2
- package/lib/markdoc/components/Heading/Heading.js +1 -2
- package/lib/markdoc/components/HtmlBlock/HtmlBlock.js +1 -2
- package/lib/markdoc/components/InlineSvg/InlineSvg.js +1 -2
- package/lib/markdoc/components/MarkdocExample/MarkdocExample.d.ts +1 -0
- package/lib/markdoc/components/MarkdocExample/MarkdocExample.js +3 -4
- package/lib/markdoc/components/Mermaid/Mermaid.js +1 -2
- package/lib/markdoc/components/Tabs/Tab.js +2 -2
- package/lib/markdoc/components/Tabs/Tabs.js +2 -2
- package/lib/markdoc/default.d.ts +2 -2
- package/lib/markdoc/tags/markdoc-example.js +8 -1
- package/lib/plugin.js +1 -1
- package/package.json +6 -6
- package/src/components/Select/Select.tsx +1 -1
- package/src/icons/CertificateIcon/CertificateIcon.tsx +33 -0
- package/src/icons/SettingsIcon/SettingsIcon.tsx +30 -12
- package/src/index.ts +1 -0
- package/src/markdoc/components/MarkdocExample/MarkdocExample.tsx +12 -3
- package/src/markdoc/tags/markdoc-example.ts +8 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.useReportDialog =
|
|
3
|
+
exports.useReportDialog = useReportDialog;
|
|
4
4
|
const react_1 = require("react");
|
|
5
5
|
const hooks_1 = require("../../../core/hooks");
|
|
6
6
|
function useReportDialog() {
|
|
@@ -40,5 +40,4 @@ function useReportDialog() {
|
|
|
40
40
|
reportButton: { props: reportButtonProps },
|
|
41
41
|
};
|
|
42
42
|
}
|
|
43
|
-
exports.useReportDialog = useReportDialog;
|
|
44
43
|
//# sourceMappingURL=use-report-dialog.js.map
|
|
@@ -24,7 +24,7 @@ export declare function useCollapse({ isExpanded, collapseElRef, onTransitionSta
|
|
|
24
24
|
export declare function getAutoHeightDuration(height: number | string): number;
|
|
25
25
|
export declare function getElementHeight(el: RefObject<HTMLElement>): number;
|
|
26
26
|
export declare function setAnimationTimeout(callback: () => void, timeout: number): {
|
|
27
|
-
id?: number
|
|
27
|
+
id?: number;
|
|
28
28
|
};
|
|
29
29
|
export declare function clearAnimationTimeout(frame: {
|
|
30
30
|
id?: number;
|
|
@@ -4,7 +4,12 @@
|
|
|
4
4
|
* Simplified for our usecase.
|
|
5
5
|
*/
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
exports.
|
|
7
|
+
exports.useCollapse = useCollapse;
|
|
8
|
+
exports.getAutoHeightDuration = getAutoHeightDuration;
|
|
9
|
+
exports.getElementHeight = getElementHeight;
|
|
10
|
+
exports.setAnimationTimeout = setAnimationTimeout;
|
|
11
|
+
exports.clearAnimationTimeout = clearAnimationTimeout;
|
|
12
|
+
exports.useEvent = useEvent;
|
|
8
13
|
const react_1 = require("react");
|
|
9
14
|
const useLayoutEffect = typeof window === 'undefined' ? react_1.useEffect : react_1.useLayoutEffect;
|
|
10
15
|
const easing = 'cubic-bezier(0.4, 0, 0.2, 1)';
|
|
@@ -110,7 +115,6 @@ function useCollapse({ isExpanded, collapseElRef, onTransitionStateChange: confi
|
|
|
110
115
|
: {},
|
|
111
116
|
};
|
|
112
117
|
}
|
|
113
|
-
exports.useCollapse = useCollapse;
|
|
114
118
|
// https://github.com/mui-org/material-ui/blob/da362266f7c137bf671d7e8c44c84ad5cfc0e9e2/packages/material-ui/src/styles/transitions.js#L89-L98
|
|
115
119
|
function getAutoHeightDuration(height) {
|
|
116
120
|
if (!height || typeof height === 'string') {
|
|
@@ -119,14 +123,12 @@ function getAutoHeightDuration(height) {
|
|
|
119
123
|
const constant = height / 36;
|
|
120
124
|
return Math.round((4 + 15 * constant ** 0.25 + constant / 5) * 10);
|
|
121
125
|
}
|
|
122
|
-
exports.getAutoHeightDuration = getAutoHeightDuration;
|
|
123
126
|
function getElementHeight(el) {
|
|
124
127
|
var _a, _b;
|
|
125
128
|
// scrollHeight will give us the height of the element, even if it's not visible.
|
|
126
129
|
// clientHeight, offsetHeight, nor getBoundingClientRect().height will do so
|
|
127
130
|
return (_b = (_a = el.current) === null || _a === void 0 ? void 0 : _a.scrollHeight) !== null && _b !== void 0 ? _b : 0;
|
|
128
131
|
}
|
|
129
|
-
exports.getElementHeight = getElementHeight;
|
|
130
132
|
function setAnimationTimeout(callback, timeout) {
|
|
131
133
|
const startTime = performance.now();
|
|
132
134
|
const frame = {};
|
|
@@ -143,12 +145,10 @@ function setAnimationTimeout(callback, timeout) {
|
|
|
143
145
|
call();
|
|
144
146
|
return frame;
|
|
145
147
|
}
|
|
146
|
-
exports.setAnimationTimeout = setAnimationTimeout;
|
|
147
148
|
function clearAnimationTimeout(frame) {
|
|
148
149
|
if (frame.id)
|
|
149
150
|
cancelAnimationFrame(frame.id);
|
|
150
151
|
}
|
|
151
|
-
exports.clearAnimationTimeout = clearAnimationTimeout;
|
|
152
152
|
function setStyles(target, newStyles) {
|
|
153
153
|
if (!target)
|
|
154
154
|
return;
|
|
@@ -170,5 +170,4 @@ function useEvent(callback) {
|
|
|
170
170
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
171
171
|
return (0, react_1.useCallback)(((...args) => { var _a; return (_a = ref.current) === null || _a === void 0 ? void 0 : _a.call(ref, ...args); }), []);
|
|
172
172
|
}
|
|
173
|
-
exports.useEvent = useEvent;
|
|
174
173
|
//# sourceMappingURL=use-collapse.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.useMenuItemExpanded =
|
|
3
|
+
exports.useMenuItemExpanded = useMenuItemExpanded;
|
|
4
4
|
const react_1 = require("react");
|
|
5
5
|
function isItemExpanded(item) {
|
|
6
6
|
return (item.active || item.hasActiveSubItem || item.expanded === 'true' || item.expanded === 'always');
|
|
@@ -22,5 +22,4 @@ function useMenuItemExpanded(item) {
|
|
|
22
22
|
}, [!item.modified ? item : item.active, item.hasActiveSubItem, item.expanded]);
|
|
23
23
|
return [isExpanded, setControlledValue];
|
|
24
24
|
}
|
|
25
|
-
exports.useMenuItemExpanded = useMenuItemExpanded;
|
|
26
25
|
//# sourceMappingURL=use-menu-item-expanded.js.map
|
|
@@ -4,7 +4,7 @@ export declare const useMobileMenuItems: (menuType: MobileMenuType) => {
|
|
|
4
4
|
popDrilldownState: () => void;
|
|
5
5
|
pushDrilldownState: (drilldownDetails: import("../..").DrilldownMenuItemDetails) => void;
|
|
6
6
|
backLink: {
|
|
7
|
-
slug?: string
|
|
8
|
-
label?: string
|
|
7
|
+
slug?: string;
|
|
8
|
+
label?: string;
|
|
9
9
|
} | undefined;
|
|
10
10
|
};
|
|
@@ -9,7 +9,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.useNestedMenu =
|
|
12
|
+
exports.useNestedMenu = useNestedMenu;
|
|
13
13
|
const react_router_dom_1 = require("react-router-dom");
|
|
14
14
|
const react_1 = require("react");
|
|
15
15
|
const hooks_1 = require("../../../core/hooks");
|
|
@@ -69,5 +69,4 @@ function useNestedMenu({ item, labelRef, nestedMenuRef }) {
|
|
|
69
69
|
handleExpand,
|
|
70
70
|
};
|
|
71
71
|
}
|
|
72
|
-
exports.useNestedMenu = useNestedMenu;
|
|
73
72
|
//# sourceMappingURL=use-nested-menu.js.map
|
|
@@ -3,7 +3,7 @@ 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.useSearchDialog =
|
|
6
|
+
exports.useSearchDialog = useSearchDialog;
|
|
7
7
|
const react_1 = require("react");
|
|
8
8
|
const react_router_dom_1 = require("react-router-dom");
|
|
9
9
|
const hotkeys_js_1 = __importDefault(require("hotkeys-js"));
|
|
@@ -40,5 +40,4 @@ function useSearchDialog() {
|
|
|
40
40
|
(0, react_1.useEffect)(onClose, [location]);
|
|
41
41
|
return { isOpen, onOpen, onClose };
|
|
42
42
|
}
|
|
43
|
-
exports.useSearchDialog = useSearchDialog;
|
|
44
43
|
//# sourceMappingURL=use-search-dialog.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.useSearchFilter =
|
|
3
|
+
exports.useSearchFilter = useSearchFilter;
|
|
4
4
|
const react_1 = require("react");
|
|
5
5
|
function useSearchFilter(filter, setFilter) {
|
|
6
6
|
const [isFilterOpen, setIsFilterOpen] = (0, react_1.useState)(false);
|
|
@@ -46,5 +46,4 @@ function useSearchFilter(filter, setFilter) {
|
|
|
46
46
|
isFilterOpen,
|
|
47
47
|
};
|
|
48
48
|
}
|
|
49
|
-
exports.useSearchFilter = useSearchFilter;
|
|
50
49
|
//# sourceMappingURL=use-search-filter.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.useActiveHeading =
|
|
3
|
+
exports.useActiveHeading = useActiveHeading;
|
|
4
4
|
const react_1 = require("react");
|
|
5
5
|
const react_router_dom_1 = require("react-router-dom");
|
|
6
6
|
function useActiveHeading(contentElement, displayedHeaders) {
|
|
@@ -76,5 +76,4 @@ function useActiveHeading(contentElement, displayedHeaders) {
|
|
|
76
76
|
}, [headingElements, displayedHeaders, intersectionCallback]);
|
|
77
77
|
return heading;
|
|
78
78
|
}
|
|
79
|
-
exports.useActiveHeading = useActiveHeading;
|
|
80
79
|
//# sourceMappingURL=use-active-heading.js.map
|
|
@@ -3,7 +3,7 @@ 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.useActiveSectionId =
|
|
6
|
+
exports.useActiveSectionId = useActiveSectionId;
|
|
7
7
|
const react_1 = require("react");
|
|
8
8
|
const lodash_throttle_1 = __importDefault(require("lodash.throttle"));
|
|
9
9
|
const hooks_1 = require("../../core/hooks");
|
|
@@ -40,5 +40,4 @@ function useActiveSectionId(location, hasOverviewPage = false, withNavbar = true
|
|
|
40
40
|
}, [location, heightOffset, scrollListener]);
|
|
41
41
|
return itemId;
|
|
42
42
|
}
|
|
43
|
-
exports.useActiveSectionId = useActiveSectionId;
|
|
44
43
|
//# sourceMappingURL=use-active-section-id.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.useCodeBlockTabsControls =
|
|
3
|
+
exports.useCodeBlockTabsControls = useCodeBlockTabsControls;
|
|
4
4
|
const react_1 = require("react");
|
|
5
5
|
function useCodeBlockTabsControls({ tabs, containerRef, tabRefs }) {
|
|
6
6
|
var _a;
|
|
@@ -52,5 +52,4 @@ function useCodeBlockTabsControls({ tabs, containerRef, tabRefs }) {
|
|
|
52
52
|
}, [currentIndex]);
|
|
53
53
|
return { showControls, handlePrevTab, handleNextTab };
|
|
54
54
|
}
|
|
55
|
-
exports.useCodeBlockTabsControls = useCodeBlockTabsControls;
|
|
56
55
|
//# sourceMappingURL=use-codeblock-tabs-controls.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.useControlledState =
|
|
3
|
+
exports.useControlledState = useControlledState;
|
|
4
4
|
const react_1 = require("react");
|
|
5
5
|
function useControlledState(initialState, controlledValue) {
|
|
6
6
|
const [state, setState] = (0, react_1.useState)(initialState);
|
|
@@ -13,5 +13,4 @@ function useControlledState(initialState, controlledValue) {
|
|
|
13
13
|
}, [isControlled]);
|
|
14
14
|
return [value, setValue];
|
|
15
15
|
}
|
|
16
|
-
exports.useControlledState = useControlledState;
|
|
17
16
|
//# sourceMappingURL=use-controlled-state.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.useDialogHotKeys =
|
|
3
|
+
exports.useDialogHotKeys = useDialogHotKeys;
|
|
4
4
|
const react_1 = require("react");
|
|
5
5
|
function useDialogHotKeys(ref, onClose) {
|
|
6
6
|
const firstFocusableRef = (0, react_1.useRef)();
|
|
@@ -41,5 +41,4 @@ function useDialogHotKeys(ref, onClose) {
|
|
|
41
41
|
onFocusableElementsHandler();
|
|
42
42
|
});
|
|
43
43
|
}
|
|
44
|
-
exports.useDialogHotKeys = useDialogHotKeys;
|
|
45
44
|
//# sourceMappingURL=use-dialog-hotkeys.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.useFocusTrap =
|
|
3
|
+
exports.useFocusTrap = useFocusTrap;
|
|
4
4
|
const react_1 = require("react");
|
|
5
5
|
function useFocusTrap(containerRef) {
|
|
6
6
|
(0, react_1.useEffect)(() => {
|
|
@@ -31,5 +31,4 @@ function useFocusTrap(containerRef) {
|
|
|
31
31
|
};
|
|
32
32
|
}, [containerRef]);
|
|
33
33
|
}
|
|
34
|
-
exports.useFocusTrap = useFocusTrap;
|
|
35
34
|
//# sourceMappingURL=use-focus-trap.js.map
|
|
@@ -3,7 +3,7 @@ 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.useFullHeight =
|
|
6
|
+
exports.useFullHeight = useFullHeight;
|
|
7
7
|
const react_1 = require("react");
|
|
8
8
|
const lodash_throttle_1 = __importDefault(require("lodash.throttle"));
|
|
9
9
|
function useFullHeight(element) {
|
|
@@ -44,5 +44,4 @@ function useFullHeight(element) {
|
|
|
44
44
|
};
|
|
45
45
|
}, [throttledHandler, element, handler]);
|
|
46
46
|
}
|
|
47
|
-
exports.useFullHeight = useFullHeight;
|
|
48
47
|
//# sourceMappingURL=use-full-height.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.useLanguagePicker =
|
|
3
|
+
exports.useLanguagePicker = useLanguagePicker;
|
|
4
4
|
const hooks_1 = require("../../core/hooks");
|
|
5
5
|
const utils_1 = require("../../core/utils");
|
|
6
6
|
function useLanguagePicker() {
|
|
@@ -19,5 +19,4 @@ function useLanguagePicker() {
|
|
|
19
19
|
setLocale,
|
|
20
20
|
};
|
|
21
21
|
}
|
|
22
|
-
exports.useLanguagePicker = useLanguagePicker;
|
|
23
22
|
//# sourceMappingURL=use-language-picker.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.useMobileMenu =
|
|
3
|
+
exports.useMobileMenu = useMobileMenu;
|
|
4
4
|
const react_1 = require("react");
|
|
5
5
|
const react_router_dom_1 = require("react-router-dom");
|
|
6
6
|
const hooks_1 = require("../../core/hooks");
|
|
@@ -13,5 +13,4 @@ function useMobileMenu(initialState = false) {
|
|
|
13
13
|
const closeMobileMenu = () => setIsOpen(false);
|
|
14
14
|
return { isOpen, openMobileMenu, closeMobileMenu };
|
|
15
15
|
}
|
|
16
|
-
exports.useMobileMenu = useMobileMenu;
|
|
17
16
|
//# sourceMappingURL=use-mobile-menu.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.useModalScrollLock =
|
|
3
|
+
exports.useModalScrollLock = useModalScrollLock;
|
|
4
4
|
const react_1 = require("react");
|
|
5
5
|
function useModalScrollLock(isOpen) {
|
|
6
6
|
(0, react_1.useEffect)(() => {
|
|
@@ -20,5 +20,4 @@ function useModalScrollLock(isOpen) {
|
|
|
20
20
|
};
|
|
21
21
|
}, [isOpen]);
|
|
22
22
|
}
|
|
23
|
-
exports.useModalScrollLock = useModalScrollLock;
|
|
24
23
|
//# sourceMappingURL=use-modal-scroll-lock.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.useNavbarHeight =
|
|
3
|
+
exports.useNavbarHeight = useNavbarHeight;
|
|
4
4
|
const react_1 = require("react");
|
|
5
5
|
const utils_1 = require("../../core/utils");
|
|
6
6
|
function useNavbarHeight(location) {
|
|
@@ -17,5 +17,4 @@ function useNavbarHeight(location) {
|
|
|
17
17
|
}, []);
|
|
18
18
|
return height;
|
|
19
19
|
}
|
|
20
|
-
exports.useNavbarHeight = useNavbarHeight;
|
|
21
20
|
//# sourceMappingURL=use-navbar-height.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.useOutsideClick =
|
|
3
|
+
exports.useOutsideClick = useOutsideClick;
|
|
4
4
|
const react_1 = require("react");
|
|
5
5
|
function useOutsideClick(ref, handler) {
|
|
6
6
|
(0, react_1.useEffect)(() => {
|
|
@@ -18,5 +18,4 @@ function useOutsideClick(ref, handler) {
|
|
|
18
18
|
};
|
|
19
19
|
}, [ref, handler]);
|
|
20
20
|
}
|
|
21
|
-
exports.useOutsideClick = useOutsideClick;
|
|
22
21
|
//# sourceMappingURL=use-outside-click.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.useProductPicker =
|
|
3
|
+
exports.useProductPicker = useProductPicker;
|
|
4
4
|
const hooks_1 = require("../../core/hooks");
|
|
5
5
|
function useProductPicker() {
|
|
6
6
|
const { useCurrentProduct, useProducts, usePreloadHistory, useTelemetry } = (0, hooks_1.useThemeHooks)();
|
|
@@ -20,5 +20,4 @@ function useProductPicker() {
|
|
|
20
20
|
setProduct,
|
|
21
21
|
};
|
|
22
22
|
}
|
|
23
|
-
exports.useProductPicker = useProductPicker;
|
|
24
23
|
//# sourceMappingURL=use-product-picker.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.useTabs =
|
|
3
|
+
exports.useTabs = useTabs;
|
|
4
4
|
const react_1 = require("react");
|
|
5
5
|
function useTabs({ initialTab, totalTabs }) {
|
|
6
6
|
const [activeTab, setActiveTab] = (0, react_1.useState)(initialTab);
|
|
@@ -53,5 +53,4 @@ function useTabs({ initialTab, totalTabs }) {
|
|
|
53
53
|
}, [totalTabs, onTabSelect]);
|
|
54
54
|
return { activeTab, setActiveTab, setTabRef, onTabClick, handleKeyboard, getTabId };
|
|
55
55
|
}
|
|
56
|
-
exports.useTabs = useTabs;
|
|
57
56
|
//# sourceMappingURL=use-tabs.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.useThemeConfig =
|
|
3
|
+
exports.useThemeConfig = useThemeConfig;
|
|
4
4
|
const react_1 = require("react");
|
|
5
5
|
const contexts_1 = require("../../core/contexts");
|
|
6
6
|
// TODO: rename and additionally export as alias for backward compatibility
|
|
@@ -19,5 +19,4 @@ function useThemeConfig(useProductConfig = true) {
|
|
|
19
19
|
analytics: config.analytics }) : config;
|
|
20
20
|
return mergedConfig;
|
|
21
21
|
}
|
|
22
|
-
exports.useThemeConfig = useThemeConfig;
|
|
23
22
|
//# sourceMappingURL=use-theme-config.js.map
|
|
@@ -23,6 +23,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
23
23
|
return result;
|
|
24
24
|
};
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
exports.default = default_1;
|
|
26
27
|
const React = __importStar(require("react"));
|
|
27
28
|
const react_router_dom_1 = require("react-router-dom");
|
|
28
29
|
const hooks_1 = require("../../core/hooks");
|
|
@@ -65,5 +66,4 @@ function default_1({ pageProps, children }) {
|
|
|
65
66
|
return (React.createElement(DocumentationLayout_1.DocumentationLayout, Object.assign({}, documentationLayoutProps),
|
|
66
67
|
React.createElement(Markdown_1.Markdown, { ref: wrapperRefCb }, children)));
|
|
67
68
|
}
|
|
68
|
-
exports.default = default_1;
|
|
69
69
|
//# sourceMappingURL=Markdown.js.map
|
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.isEmptyArray = isEmptyArray;
|
|
4
|
+
exports.isPrimitive = isPrimitive;
|
|
4
5
|
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
|
|
5
6
|
function isEmptyArray(items) {
|
|
6
7
|
return Array.isArray(items) && !(items === null || items === void 0 ? void 0 : items.length);
|
|
7
8
|
}
|
|
8
|
-
exports.isEmptyArray = isEmptyArray;
|
|
9
9
|
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
|
|
10
10
|
function isPrimitive(arg) {
|
|
11
11
|
return ['string', 'boolean', 'number', 'undefined'].includes(typeof arg);
|
|
12
12
|
}
|
|
13
|
-
exports.isPrimitive = isPrimitive;
|
|
14
13
|
//# sourceMappingURL=args-typecheck.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.parseSrcSet =
|
|
3
|
+
exports.parseSrcSet = parseSrcSet;
|
|
4
4
|
function parseSrcSet(srcSet) {
|
|
5
5
|
const result = new Map();
|
|
6
6
|
const parts = srcSet.split(', ');
|
|
@@ -10,5 +10,4 @@ function parseSrcSet(srcSet) {
|
|
|
10
10
|
}
|
|
11
11
|
return result;
|
|
12
12
|
}
|
|
13
|
-
exports.parseSrcSet = parseSrcSet;
|
|
14
13
|
//# sourceMappingURL=attribute-parser.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.changeTextCasing =
|
|
3
|
+
exports.changeTextCasing = changeTextCasing;
|
|
4
4
|
function changeTextCasing(str, casing = 'original') {
|
|
5
5
|
if (casing === 'original' || !str)
|
|
6
6
|
return str;
|
|
@@ -15,5 +15,4 @@ function changeTextCasing(str, casing = 'original') {
|
|
|
15
15
|
return words.map((word) => word[0].toUpperCase() + word.slice(1).toLowerCase()).join(' ');
|
|
16
16
|
}
|
|
17
17
|
}
|
|
18
|
-
exports.changeTextCasing = changeTextCasing;
|
|
19
18
|
//# sourceMappingURL=change-text-casing.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.concatClassNames =
|
|
3
|
+
exports.concatClassNames = concatClassNames;
|
|
4
4
|
const SPACE_DELIMITER = ' ';
|
|
5
5
|
function concatClassNames(...args) {
|
|
6
6
|
return args
|
|
@@ -8,5 +8,4 @@ function concatClassNames(...args) {
|
|
|
8
8
|
.filter(Boolean)
|
|
9
9
|
.join(SPACE_DELIMITER);
|
|
10
10
|
}
|
|
11
|
-
exports.concatClassNames = concatClassNames;
|
|
12
11
|
//# sourceMappingURL=class-names.js.map
|
package/lib/core/utils/color.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.stringToHslColor =
|
|
3
|
+
exports.stringToHslColor = stringToHslColor;
|
|
4
4
|
function stringToHslColor(value) {
|
|
5
5
|
const s = 30;
|
|
6
6
|
const l = 80;
|
|
@@ -11,5 +11,4 @@ function stringToHslColor(value) {
|
|
|
11
11
|
const h = hash % 360;
|
|
12
12
|
return `hsl(${h}, ${s}%, ${l}%)`;
|
|
13
13
|
}
|
|
14
|
-
exports.stringToHslColor = stringToHslColor;
|
|
15
14
|
//# sourceMappingURL=color.js.map
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.extendDetailsBehaviour =
|
|
3
|
+
exports.extendDetailsBehaviour = extendDetailsBehaviour;
|
|
4
4
|
function extendDetailsBehaviour() {
|
|
5
5
|
enhanceDetails();
|
|
6
6
|
openDetailsFromHash();
|
|
7
7
|
window.addEventListener('hashchange', openDetailsFromHash);
|
|
8
8
|
}
|
|
9
|
-
exports.extendDetailsBehaviour = extendDetailsBehaviour;
|
|
10
9
|
function openDetailsAndScroll(detailsElement) {
|
|
11
10
|
detailsElement.setAttribute('open', '');
|
|
12
11
|
setTimeout(() => {
|
package/lib/core/utils/dom.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.IS_BROWSER = void 0;
|
|
4
|
+
exports.onDocumentReady = onDocumentReady;
|
|
4
5
|
exports.IS_BROWSER = typeof window !== 'undefined' && 'HTMLElement' in window;
|
|
5
6
|
function onDocumentReady(fn) {
|
|
6
7
|
if (document.readyState === 'loading') {
|
|
@@ -10,5 +11,4 @@ function onDocumentReady(fn) {
|
|
|
10
11
|
fn();
|
|
11
12
|
}
|
|
12
13
|
}
|
|
13
|
-
exports.onDocumentReady = onDocumentReady;
|
|
14
14
|
//# sourceMappingURL=dom.js.map
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.formatDateWithoutTimeZone =
|
|
3
|
+
exports.formatDateWithoutTimeZone = formatDateWithoutTimeZone;
|
|
4
4
|
function formatDateWithoutTimeZone(date) {
|
|
5
5
|
if (!date)
|
|
6
6
|
return date;
|
|
7
7
|
return `${date.getFullYear()}-${padZero(date.getMonth() + 1)}-${padZero(date.getDate())}`;
|
|
8
8
|
}
|
|
9
|
-
exports.formatDateWithoutTimeZone = formatDateWithoutTimeZone;
|
|
10
9
|
function padZero(num) {
|
|
11
10
|
return num < 10 ? '0' + num : num;
|
|
12
11
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getNavbarElement =
|
|
3
|
+
exports.getNavbarElement = getNavbarElement;
|
|
4
4
|
function getNavbarElement() {
|
|
5
5
|
const navElements = (typeof document !== 'undefined' && document.querySelectorAll('nav')) || [];
|
|
6
6
|
// there can be multiple nav elements (e.g. mobile and non-mobile), let's use the first one with non-zero height
|
|
@@ -11,5 +11,4 @@ function getNavbarElement() {
|
|
|
11
11
|
}
|
|
12
12
|
return navElements[0] || null;
|
|
13
13
|
}
|
|
14
|
-
exports.getNavbarElement = getNavbarElement;
|
|
15
14
|
//# sourceMappingURL=get-navbar-element.js.map
|
|
@@ -23,7 +23,9 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
23
23
|
return result;
|
|
24
24
|
};
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
exports.
|
|
26
|
+
exports.mapLang = mapLang;
|
|
27
|
+
exports.highlight = highlight;
|
|
28
|
+
exports.addLineNumbers = addLineNumbers;
|
|
27
29
|
const Prism = __importStar(require("prismjs"));
|
|
28
30
|
require("prismjs/components/prism-bash.js");
|
|
29
31
|
require("prismjs/components/prism-c.js");
|
|
@@ -105,7 +107,6 @@ function mapLang(lang) {
|
|
|
105
107
|
'node.js': 'js',
|
|
106
108
|
}[lang] || DEFAULT_LANG);
|
|
107
109
|
}
|
|
108
|
-
exports.mapLang = mapLang;
|
|
109
110
|
/**
|
|
110
111
|
* Highlight source code string using Prism.js
|
|
111
112
|
* @param source source code to highlight
|
|
@@ -117,7 +118,6 @@ function highlight(source, lang = DEFAULT_LANG) {
|
|
|
117
118
|
const grammar = Prism.languages[lang] || Prism.languages[mapLang(lang)];
|
|
118
119
|
return Prism.highlight(source.toString(), grammar, lang);
|
|
119
120
|
}
|
|
120
|
-
exports.highlight = highlight;
|
|
121
121
|
function addLineNumbers(highlightedCode, start = 1) {
|
|
122
122
|
const codeLines = highlightedCode.split(NEW_LINE_EXP);
|
|
123
123
|
return codeLines
|
|
@@ -126,5 +126,4 @@ function addLineNumbers(highlightedCode, start = 1) {
|
|
|
126
126
|
})
|
|
127
127
|
.join('\n');
|
|
128
128
|
}
|
|
129
|
-
exports.addLineNumbers = addLineNumbers;
|
|
130
129
|
//# sourceMappingURL=highlight.js.map
|
package/lib/core/utils/is-url.js
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* Use two levels of REs to avoid REDOS.
|
|
6
6
|
*/
|
|
7
7
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
-
exports.isUrl =
|
|
8
|
+
exports.isUrl = isUrl;
|
|
9
9
|
const protocolAndDomainRE = /^(?:\w+:)?\/\/(\S+)$/;
|
|
10
10
|
const localhostDomainRE = /^localhost[:?\d]*(?:[^:?\d]\S*)?$/;
|
|
11
11
|
const nonLocalhostDomainRE = /^[^\s.]+\.\S{2,}$/;
|
|
@@ -33,5 +33,4 @@ function isUrl(input) {
|
|
|
33
33
|
}
|
|
34
34
|
return false;
|
|
35
35
|
}
|
|
36
|
-
exports.isUrl = isUrl;
|
|
37
36
|
//# sourceMappingURL=is-url.js.map
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.findDeepFirst = findDeepFirst;
|
|
4
|
+
exports.toStringIfDefined = toStringIfDefined;
|
|
5
|
+
exports.isBrowser = isBrowser;
|
|
4
6
|
function findDeepFirst(list, cb) {
|
|
5
7
|
for (const item of list) {
|
|
6
8
|
if (cb(item) === true) {
|
|
@@ -13,16 +15,13 @@ function findDeepFirst(list, cb) {
|
|
|
13
15
|
}
|
|
14
16
|
}
|
|
15
17
|
}
|
|
16
|
-
exports.findDeepFirst = findDeepFirst;
|
|
17
18
|
function toStringIfDefined(value) {
|
|
18
19
|
return value == undefined ? undefined : String(value);
|
|
19
20
|
}
|
|
20
|
-
exports.toStringIfDefined = toStringIfDefined;
|
|
21
21
|
/**
|
|
22
22
|
* Returns true when the function executed in browser.
|
|
23
23
|
*/
|
|
24
24
|
function isBrowser() {
|
|
25
25
|
return typeof window !== 'undefined' && 'HTMLElement' in window;
|
|
26
26
|
}
|
|
27
|
-
exports.isBrowser = isBrowser;
|
|
28
27
|
//# sourceMappingURL=js-utils.js.map
|
|
@@ -9,12 +9,12 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.loadAndNavigate =
|
|
12
|
+
exports.loadAndNavigate = loadAndNavigate;
|
|
13
13
|
const utils_1 = require("../../core/utils");
|
|
14
14
|
let lastNavigatedPath;
|
|
15
|
-
function loadAndNavigate(
|
|
16
|
-
|
|
17
|
-
|
|
15
|
+
function loadAndNavigate(navigate_1, to_1) {
|
|
16
|
+
return __awaiter(this, arguments, void 0, function* (navigate, to, origin = 'browser', options) {
|
|
17
|
+
var _a;
|
|
18
18
|
lastNavigatedPath = to;
|
|
19
19
|
const { pathname, hash, search } = new URL(to, window.location.origin + window.location.pathname);
|
|
20
20
|
// use window-shared loader instead of importing to prevent circular import issue
|
|
@@ -45,5 +45,4 @@ function loadAndNavigate(navigate, to, origin = 'browser', options) {
|
|
|
45
45
|
}
|
|
46
46
|
});
|
|
47
47
|
}
|
|
48
|
-
exports.loadAndNavigate = loadAndNavigate;
|
|
49
48
|
//# sourceMappingURL=load-and-navigate.js.map
|