@redocly/theme 0.61.0 → 0.62.0-custom.0
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 +14 -18
- package/lib/components/Admonition/variables.dark.d.ts +1 -0
- package/lib/components/Admonition/variables.dark.js +18 -0
- package/lib/components/Admonition/variables.js +24 -28
- package/lib/components/AsyncApiDocs/hooks/AfterAsyncApiChannelDescription.d.ts +1 -0
- package/lib/components/AsyncApiDocs/hooks/AfterAsyncApiChannelDescription.js +12 -0
- package/lib/components/Badge/Badge.d.ts +2 -1
- package/lib/components/Badge/Badge.js +24 -2
- package/lib/components/Banner/Banner.js +19 -1
- package/lib/components/Banner/variables.js +1 -0
- package/lib/components/Breadcrumbs/Breadcrumb.js +1 -1
- package/lib/components/Breadcrumbs/BreadcrumbDropdown.js +9 -6
- package/lib/components/Breadcrumbs/Breadcrumbs.js +24 -15
- package/lib/components/Buttons/AIAssistantButton.js +7 -4
- package/lib/components/Catalog/CatalogEntities.js +10 -8
- package/lib/components/Catalog/CatalogEntity/CatalogEntity.js +2 -2
- package/lib/components/Catalog/CatalogEntity/CatalogEntityHistory/CatalogEntityHistorySidebar.js +5 -3
- package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/TagsProperty.js +2 -2
- package/lib/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityRelationsTable.js +13 -11
- package/lib/components/Catalog/CatalogEntity/CatalogEntitySchema.js +7 -5
- package/lib/components/Catalog/CatalogFilter/CatalogFilterCheckboxes.js +9 -7
- package/lib/components/Catalog/CatalogTableView/CatalogTableViewRow.js +1 -1
- package/lib/components/Catalog/CatalogTagsWithTooltip.js +2 -2
- package/lib/components/CatalogClassic/CatalogClassicInfoBlock.js +1 -1
- package/lib/components/CodeBlock/CodeBlockControls.js +8 -6
- package/lib/components/Filter/FilterCheckboxes.js +1 -1
- package/lib/components/JsonViewer/JsonViewer.js +2 -2
- package/lib/components/JsonViewer/{Helpers.js → helpers.js} +2 -1
- package/lib/components/LanguagePicker/LanguagePicker.js +1 -1
- package/lib/components/Markdown/Markdown.js +2 -2
- package/lib/components/Menu/MenuItem.js +41 -15
- package/lib/components/Navbar/NavbarItem.js +1 -1
- package/lib/components/OpenApiDocs/hooks/AdditionalOverviewInfo.d.ts +1 -0
- package/lib/components/OpenApiDocs/hooks/AdditionalOverviewInfo.js +12 -0
- package/lib/components/OpenApiDocs/hooks/AfterOpenApiDescription.d.ts +1 -0
- package/lib/components/OpenApiDocs/hooks/AfterOpenApiDescription.js +6 -0
- package/lib/components/PageActions/PageActions.js +25 -8
- package/lib/components/Search/SearchAiDialog.d.ts +4 -2
- package/lib/components/Search/SearchAiDialog.js +23 -4
- package/lib/components/Search/SearchAiMessage.d.ts +4 -2
- package/lib/components/Search/SearchAiMessage.js +82 -23
- package/lib/components/Search/SearchDialog.js +50 -25
- package/lib/components/Select/variables.js +2 -2
- package/lib/components/SvgViewer/SvgViewer.d.ts +15 -0
- package/lib/components/SvgViewer/SvgViewer.js +312 -0
- package/lib/components/SvgViewer/variables.d.ts +1 -0
- package/lib/components/SvgViewer/variables.dark.d.ts +1 -0
- package/lib/components/SvgViewer/variables.dark.js +8 -0
- package/lib/components/SvgViewer/variables.js +17 -0
- package/lib/components/Tag/Tag.js +1 -1
- package/lib/components/Tag/variables.dark.js +6 -0
- package/lib/components/Tag/variables.js +6 -0
- package/lib/components/Tooltip/Tooltip.d.ts +2 -3
- package/lib/components/Tooltip/Tooltip.js +66 -113
- package/lib/components/Tooltip/variables.dark.js +4 -0
- package/lib/components/Tooltip/variables.js +3 -3
- package/lib/components/UserMenu/LoginButton.d.ts +8 -2
- package/lib/components/UserMenu/LoginButton.js +4 -3
- package/lib/core/constants/search.d.ts +5 -1
- package/lib/core/constants/search.js +24 -1
- package/lib/core/hooks/search/use-search-dialog.js +2 -2
- package/lib/core/hooks/use-color-switcher.d.ts +1 -0
- package/lib/core/hooks/use-color-switcher.js +8 -1
- package/lib/core/hooks/use-mcp-config.js +2 -1
- package/lib/core/hooks/use-modal-scroll-lock.js +24 -10
- package/lib/core/hooks/use-outside-click.d.ts +3 -1
- package/lib/core/hooks/use-outside-click.js +8 -4
- package/lib/core/hooks/use-page-actions.d.ts +1 -1
- package/lib/core/hooks/use-page-actions.js +44 -11
- package/lib/core/hooks/use-product-picker.js +1 -1
- package/lib/core/hooks/use-unique-svg-ids.d.ts +6 -0
- package/lib/core/hooks/use-unique-svg-ids.js +15 -0
- package/lib/core/openapi/index.d.ts +1 -0
- package/lib/core/openapi/index.js +3 -1
- package/lib/core/styles/dark.js +4 -0
- package/lib/core/styles/global.js +31 -15
- package/lib/core/types/catalog.d.ts +1 -1
- package/lib/core/types/hooks.d.ts +23 -2
- package/lib/core/types/l10n.d.ts +1 -1
- package/lib/core/types/search.d.ts +24 -0
- package/lib/core/types/search.js +9 -1
- package/lib/core/utils/content-segments.d.ts +2 -0
- package/lib/core/utils/content-segments.js +22 -0
- package/lib/core/utils/index.d.ts +1 -0
- package/lib/core/utils/index.js +1 -0
- package/lib/core/utils/transform-revisions-to-version-history.js +8 -51
- package/lib/ext/process-scorecard.d.ts +5 -0
- package/lib/ext/process-scorecard.js +11 -0
- package/lib/icons/FitToViewIcon/FitToViewIcon.d.ts +9 -0
- package/lib/icons/FitToViewIcon/FitToViewIcon.js +25 -0
- package/lib/icons/WarningCycleIcon/WarningCycleIcon.d.ts +9 -0
- package/lib/icons/WarningCycleIcon/WarningCycleIcon.js +24 -0
- package/lib/index.d.ts +9 -0
- package/lib/index.js +9 -0
- package/lib/layouts/DocumentationLayout.js +4 -25
- package/lib/layouts/DocumentationLayoutBottom.d.ts +11 -0
- package/lib/layouts/DocumentationLayoutBottom.js +28 -0
- package/lib/layouts/DocumentationLayoutTop.d.ts +13 -0
- package/lib/layouts/DocumentationLayoutTop.js +33 -0
- package/lib/layouts/Forbidden.js +22 -18
- package/lib/markdoc/components/Cards/Card.js +1 -0
- package/lib/markdoc/components/CodeWalkthrough/CodeFilters.js +1 -1
- package/lib/markdoc/components/Heading/Heading.js +40 -2
- package/lib/markdoc/components/LoginButton/LoginButton.d.ts +9 -0
- package/lib/markdoc/components/LoginButton/LoginButton.js +48 -0
- package/lib/markdoc/components/Mermaid/Mermaid.js +70 -2
- package/lib/markdoc/components/default.d.ts +1 -0
- package/lib/markdoc/components/default.js +1 -0
- package/lib/markdoc/default.d.ts +6 -0
- package/lib/markdoc/default.js +2 -0
- package/lib/markdoc/tags/login-button.d.ts +2 -0
- package/lib/markdoc/tags/login-button.js +32 -0
- package/package.json +9 -9
- package/src/components/Admonition/Admonition.tsx +14 -18
- package/src/components/Admonition/variables.dark.ts +15 -0
- package/src/components/Admonition/variables.ts +24 -28
- package/src/components/AsyncApiDocs/hooks/AfterAsyncApiChannelDescription.tsx +10 -0
- package/src/components/Badge/Badge.tsx +18 -2
- package/src/components/Banner/Banner.tsx +23 -1
- package/src/components/Banner/variables.ts +1 -0
- package/src/components/Breadcrumbs/Breadcrumb.tsx +3 -3
- package/src/components/Breadcrumbs/BreadcrumbDropdown.tsx +11 -8
- package/src/components/Breadcrumbs/Breadcrumbs.tsx +24 -15
- package/src/components/Buttons/AIAssistantButton.tsx +7 -4
- package/src/components/Catalog/CatalogEntities.tsx +10 -8
- package/src/components/Catalog/CatalogEntity/CatalogEntity.tsx +1 -1
- package/src/components/Catalog/CatalogEntity/CatalogEntityHistory/CatalogEntityHistorySidebar.tsx +7 -4
- package/src/components/Catalog/CatalogEntity/CatalogEntityProperties/TagsProperty.tsx +1 -1
- package/src/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityRelationsTable.tsx +13 -11
- package/src/components/Catalog/CatalogEntity/CatalogEntitySchema.tsx +7 -5
- package/src/components/Catalog/CatalogFilter/CatalogFilterCheckboxes.tsx +9 -7
- package/src/components/Catalog/CatalogTableView/CatalogTableViewRow.tsx +1 -2
- package/src/components/Catalog/CatalogTagsWithTooltip.tsx +9 -5
- package/src/components/CatalogClassic/CatalogClassicInfoBlock.tsx +3 -1
- package/src/components/CodeBlock/CodeBlockControls.tsx +16 -10
- package/src/components/Filter/FilterCheckboxes.tsx +1 -1
- package/src/components/JsonViewer/JsonViewer.tsx +1 -2
- package/src/components/JsonViewer/{Helpers.tsx → helpers.tsx} +1 -0
- package/src/components/LanguagePicker/LanguagePicker.tsx +1 -1
- package/src/components/Markdown/Markdown.tsx +2 -2
- package/src/components/Menu/MenuItem.tsx +61 -16
- package/src/components/Navbar/NavbarItem.tsx +3 -1
- package/src/components/OpenApiDocs/hooks/AdditionalOverviewInfo.tsx +10 -0
- package/src/components/OpenApiDocs/hooks/AfterOpenApiDescription.tsx +2 -0
- package/src/components/PageActions/PageActions.tsx +38 -15
- package/src/components/Search/SearchAiDialog.tsx +31 -2
- package/src/components/Search/SearchAiMessage.tsx +103 -17
- package/src/components/Search/SearchDialog.tsx +70 -37
- package/src/components/Select/variables.ts +2 -2
- package/src/components/SvgViewer/SvgViewer.tsx +405 -0
- package/src/components/SvgViewer/variables.dark.ts +5 -0
- package/src/components/SvgViewer/variables.ts +14 -0
- package/src/components/Tag/Tag.tsx +2 -1
- package/src/components/Tag/variables.dark.ts +6 -0
- package/src/components/Tag/variables.ts +6 -0
- package/src/components/Tooltip/Tooltip.tsx +77 -120
- package/src/components/Tooltip/variables.dark.ts +4 -0
- package/src/components/Tooltip/variables.ts +3 -3
- package/src/components/UserMenu/LoginButton.tsx +23 -8
- package/src/core/constants/search.ts +27 -1
- package/src/core/hooks/__mocks__/use-theme-hooks.ts +10 -1
- package/src/core/hooks/search/use-search-dialog.ts +2 -2
- package/src/core/hooks/use-color-switcher.ts +10 -2
- package/src/core/hooks/use-mcp-config.ts +2 -1
- package/src/core/hooks/use-modal-scroll-lock.ts +29 -10
- package/src/core/hooks/use-outside-click.ts +16 -5
- package/src/core/hooks/use-page-actions.ts +66 -25
- package/src/core/hooks/use-product-picker.ts +1 -1
- package/src/core/hooks/use-unique-svg-ids.ts +12 -0
- package/src/core/openapi/index.ts +1 -0
- package/src/core/styles/dark.ts +4 -0
- package/src/core/styles/global.ts +31 -15
- package/src/core/types/catalog.ts +1 -1
- package/src/core/types/hooks.ts +29 -1
- package/src/core/types/l10n.ts +12 -1
- package/src/core/types/search.ts +19 -0
- package/src/core/utils/content-segments.ts +27 -0
- package/src/core/utils/index.ts +1 -0
- package/src/core/utils/transform-revisions-to-version-history.ts +8 -80
- package/src/ext/process-scorecard.ts +14 -0
- package/src/icons/FitToViewIcon/FitToViewIcon.tsx +26 -0
- package/src/icons/WarningCycleIcon/WarningCycleIcon.tsx +32 -0
- package/src/index.ts +9 -0
- package/src/layouts/DocumentationLayout.tsx +4 -30
- package/src/layouts/DocumentationLayoutBottom.tsx +42 -0
- package/src/layouts/DocumentationLayoutTop.tsx +52 -0
- package/src/layouts/Forbidden.tsx +36 -21
- package/src/markdoc/components/Cards/Card.tsx +1 -0
- package/src/markdoc/components/CodeWalkthrough/CodeFilters.tsx +1 -1
- package/src/markdoc/components/Heading/Heading.tsx +52 -4
- package/src/markdoc/components/LoginButton/LoginButton.tsx +38 -0
- package/src/markdoc/components/Mermaid/Mermaid.tsx +57 -8
- package/src/markdoc/components/default.ts +1 -0
- package/src/markdoc/default.ts +2 -0
- package/src/markdoc/tags/login-button.ts +30 -0
- package/lib/components/Tooltip/TooltipWrapper.d.ts +0 -12
- package/lib/components/Tooltip/TooltipWrapper.js +0 -34
- package/src/components/Tooltip/TooltipWrapper.tsx +0 -70
- /package/lib/components/JsonViewer/{Helpers.d.ts → helpers.d.ts} +0 -0
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.useProcessScorecard = useProcessScorecard;
|
|
4
|
+
const react_1 = require("react");
|
|
5
|
+
function useProcessScorecard() {
|
|
6
|
+
return {
|
|
7
|
+
processScorecard: (0, react_1.useCallback)((scorecard) => scorecard, []),
|
|
8
|
+
processInfo: (0, react_1.useCallback)((info) => info, []),
|
|
9
|
+
};
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=process-scorecard.js.map
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { IconProps } from '../../icons/types';
|
|
3
|
+
export declare const FitToViewIcon: import("styled-components").StyledComponent<(props: IconProps) => React.JSX.Element, any, {
|
|
4
|
+
'data-component-name': string;
|
|
5
|
+
} & {
|
|
6
|
+
color?: string;
|
|
7
|
+
size?: string;
|
|
8
|
+
className?: string;
|
|
9
|
+
} & React.SVGProps<SVGSVGElement>, "data-component-name">;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.FitToViewIcon = void 0;
|
|
7
|
+
const react_1 = __importDefault(require("react"));
|
|
8
|
+
const styled_components_1 = __importDefault(require("styled-components"));
|
|
9
|
+
const utils_1 = require("../../core/utils");
|
|
10
|
+
const Icon = (props) => (react_1.default.createElement("svg", Object.assign({ viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, props),
|
|
11
|
+
react_1.default.createElement("path", { d: "M1 1H5V2.5H2.5V5H1V1Z" }),
|
|
12
|
+
react_1.default.createElement("path", { d: "M15 1H11V2.5H13.5V5H15V1Z" }),
|
|
13
|
+
react_1.default.createElement("path", { d: "M1 15H5V13.5H2.5V11H1V15Z" }),
|
|
14
|
+
react_1.default.createElement("path", { d: "M15 15H11V13.5H13.5V11H15V15Z" })));
|
|
15
|
+
exports.FitToViewIcon = (0, styled_components_1.default)(Icon).attrs(() => ({
|
|
16
|
+
'data-component-name': 'icons/FitToViewIcon/FitToViewIcon',
|
|
17
|
+
})) `
|
|
18
|
+
path {
|
|
19
|
+
fill: ${({ color }) => (0, utils_1.getCssColorVariable)(color)};
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
height: ${({ size }) => size || '16px'};
|
|
23
|
+
width: ${({ size }) => size || '16px'};
|
|
24
|
+
`;
|
|
25
|
+
//# sourceMappingURL=FitToViewIcon.js.map
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { IconProps } from '../../icons/types';
|
|
3
|
+
export declare const WarningCycleIcon: import("styled-components").StyledComponent<(props: IconProps) => React.JSX.Element, any, {
|
|
4
|
+
'data-component-name': string;
|
|
5
|
+
} & {
|
|
6
|
+
color?: string;
|
|
7
|
+
size?: string;
|
|
8
|
+
className?: string;
|
|
9
|
+
} & React.SVGProps<SVGSVGElement>, "data-component-name">;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.WarningCycleIcon = void 0;
|
|
7
|
+
const react_1 = __importDefault(require("react"));
|
|
8
|
+
const styled_components_1 = __importDefault(require("styled-components"));
|
|
9
|
+
const utils_1 = require("../../core/utils");
|
|
10
|
+
const Icon = (props) => (react_1.default.createElement("svg", Object.assign({ width: "18", height: "18", viewBox: "0 0 18 18", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, props),
|
|
11
|
+
react_1.default.createElement("path", { d: "M9 1.125C7.44248 1.125 5.91992 1.58686 4.62489 2.45218C3.32985 3.31749 2.32049 4.5474 1.72445 5.98637C1.12841 7.42534 0.972461 9.00874 1.27632 10.5363C1.58018 12.0639 2.3302 13.4671 3.43154 14.5685C4.53288 15.6698 5.93607 16.4198 7.46367 16.7237C8.99127 17.0275 10.5747 16.8716 12.0136 16.2756C13.4526 15.6795 14.6825 14.6702 15.5478 13.3751C16.4131 12.0801 16.875 10.5575 16.875 9C16.875 6.91142 16.0453 4.90838 14.5685 3.43153C13.0916 1.95469 11.0886 1.125 9 1.125ZM9 15.75C7.66498 15.75 6.35994 15.3541 5.2499 14.6124C4.13987 13.8707 3.27471 12.8165 2.76382 11.5831C2.25293 10.3497 2.11925 8.99251 2.3797 7.68314C2.64015 6.37377 3.28303 5.17103 4.22703 4.22703C5.17104 3.28302 6.37377 2.64015 7.68314 2.3797C8.99252 2.11925 10.3497 2.25292 11.5831 2.76381C12.8165 3.2747 13.8707 4.13987 14.6124 5.2499C15.3541 6.35993 15.75 7.66498 15.75 9C15.75 10.7902 15.0388 12.5071 13.773 13.773C12.5071 15.0388 10.7902 15.75 9 15.75Z" }),
|
|
12
|
+
react_1.default.createElement("path", { d: "M9.5625 4.5H8.4375V10.6875H9.5625V4.5Z" }),
|
|
13
|
+
react_1.default.createElement("path", { d: "M9 12.375C8.83313 12.375 8.67 12.4245 8.53124 12.5172C8.39249 12.6099 8.28434 12.7417 8.22048 12.8959C8.15662 13.05 8.13991 13.2197 8.17247 13.3834C8.20502 13.547 8.28538 13.6974 8.40338 13.8154C8.52138 13.9334 8.67172 14.0137 8.8354 14.0463C8.99907 14.0788 9.16872 14.0621 9.32289 13.9983C9.47707 13.9344 9.60884 13.8263 9.70156 13.6875C9.79427 13.5488 9.84375 13.3856 9.84375 13.2188C9.84375 12.995 9.75486 12.7804 9.59662 12.6221C9.43839 12.4639 9.22378 12.375 9 12.375Z" })));
|
|
14
|
+
exports.WarningCycleIcon = (0, styled_components_1.default)(Icon).attrs(() => ({
|
|
15
|
+
'data-component-name': 'icons/WarningCycleIcon/WarningCycleIcon',
|
|
16
|
+
})) `
|
|
17
|
+
path {
|
|
18
|
+
fill: ${({ color }) => (0, utils_1.getCssColorVariable)(color)};
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
height: ${({ size }) => size || '16px'};
|
|
22
|
+
width: ${({ size }) => size || '16px'};
|
|
23
|
+
`;
|
|
24
|
+
//# sourceMappingURL=WarningCycleIcon.js.map
|
package/lib/index.d.ts
CHANGED
|
@@ -25,6 +25,7 @@ export * from './components/Tags/CounterTag';
|
|
|
25
25
|
export * from './components/VersionPicker/VersionPicker';
|
|
26
26
|
export * from './components/Marker/Marker';
|
|
27
27
|
export * from './components/PageActions/PageActions';
|
|
28
|
+
export * from './components/SvgViewer/SvgViewer';
|
|
28
29
|
export * from './components/Buttons/CopyButton';
|
|
29
30
|
export * from './components/Buttons/EditPageButton';
|
|
30
31
|
export * from './components/Buttons/EmailButton';
|
|
@@ -79,9 +80,12 @@ export * from './components/UserMenu/UserMenuMobile';
|
|
|
79
80
|
export * from './components/Sidebar/Sidebar';
|
|
80
81
|
export * from './components/OpenApiDocs/hooks/AfterOpenApiOperation';
|
|
81
82
|
export * from './components/OpenApiDocs/hooks/AfterOpenApiTitle';
|
|
83
|
+
export * from './components/OpenApiDocs/hooks/AfterOpenApiDescription';
|
|
82
84
|
export * from './components/OpenApiDocs/hooks/BeforeOpenApiOperation';
|
|
83
85
|
export * from './components/OpenApiDocs/hooks/OpenApiFooter';
|
|
84
86
|
export * from './components/OpenApiDocs/hooks/OpenApiHeader';
|
|
87
|
+
export * from './components/OpenApiDocs/hooks/AdditionalOverviewInfo';
|
|
88
|
+
export * from './components/AsyncApiDocs/hooks/AfterAsyncApiChannelDescription';
|
|
85
89
|
export * from './components/SidebarActions/ChangeViewButton';
|
|
86
90
|
export * from './components/SidebarActions/SidebarActions';
|
|
87
91
|
export * from './components/SidebarActions/styled';
|
|
@@ -194,6 +198,7 @@ export * from './icons/ViewOffIcon/ViewOffIcon';
|
|
|
194
198
|
export * from './icons/CircleDashIcon/CircleDashIcon';
|
|
195
199
|
export * from './icons/RestartIcon/RestartIcon';
|
|
196
200
|
export * from './icons/WarningFilledIcon/WarningFilledIcon';
|
|
201
|
+
export * from './icons/WarningCycleIcon/WarningCycleIcon';
|
|
197
202
|
export * from './icons/CheckmarkFilledIcon/CheckmarkFilledIcon';
|
|
198
203
|
export * from './icons/InformationFilledIcon/InformationFilledIcon';
|
|
199
204
|
export * from './icons/BareMetalServerIcon/BareMetalServerIcon';
|
|
@@ -265,6 +270,7 @@ export * from './icons/WorkflowHierarchyIcon/WorkflowHierarchyIcon';
|
|
|
265
270
|
export * from './icons/GenericIcon/GenericIcon';
|
|
266
271
|
export * from './icons/ShareIcon/ShareIcon';
|
|
267
272
|
export * from './icons/HashtagIcon/HashtagIcon';
|
|
273
|
+
export * from './icons/FitToViewIcon/FitToViewIcon';
|
|
268
274
|
export * from './layouts/RootLayout';
|
|
269
275
|
export * from './layouts/PageLayout';
|
|
270
276
|
export * from './layouts/NotFound';
|
|
@@ -273,5 +279,8 @@ export * from './layouts/OIDCForbidden';
|
|
|
273
279
|
export * from './layouts/ThreePanelLayout';
|
|
274
280
|
export * from './layouts/CodeWalkthroughLayout';
|
|
275
281
|
export * from './layouts/InternalServerErrorLayout';
|
|
282
|
+
export * from './layouts/DocumentationLayout';
|
|
283
|
+
export * from './layouts/DocumentationLayoutTop';
|
|
284
|
+
export * from './layouts/DocumentationLayoutBottom';
|
|
276
285
|
export * as markdoc from './markdoc/default';
|
|
277
286
|
export * from './components/DatePicker/DatePicker';
|
package/lib/index.js
CHANGED
|
@@ -64,6 +64,7 @@ __exportStar(require("./components/Tags/CounterTag"), exports);
|
|
|
64
64
|
__exportStar(require("./components/VersionPicker/VersionPicker"), exports);
|
|
65
65
|
__exportStar(require("./components/Marker/Marker"), exports);
|
|
66
66
|
__exportStar(require("./components/PageActions/PageActions"), exports);
|
|
67
|
+
__exportStar(require("./components/SvgViewer/SvgViewer"), exports);
|
|
67
68
|
/* Buttons */
|
|
68
69
|
__exportStar(require("./components/Buttons/CopyButton"), exports);
|
|
69
70
|
__exportStar(require("./components/Buttons/EditPageButton"), exports);
|
|
@@ -132,9 +133,12 @@ __exportStar(require("./components/Sidebar/Sidebar"), exports);
|
|
|
132
133
|
/* OpenApiDocs */
|
|
133
134
|
__exportStar(require("./components/OpenApiDocs/hooks/AfterOpenApiOperation"), exports);
|
|
134
135
|
__exportStar(require("./components/OpenApiDocs/hooks/AfterOpenApiTitle"), exports);
|
|
136
|
+
__exportStar(require("./components/OpenApiDocs/hooks/AfterOpenApiDescription"), exports);
|
|
135
137
|
__exportStar(require("./components/OpenApiDocs/hooks/BeforeOpenApiOperation"), exports);
|
|
136
138
|
__exportStar(require("./components/OpenApiDocs/hooks/OpenApiFooter"), exports);
|
|
137
139
|
__exportStar(require("./components/OpenApiDocs/hooks/OpenApiHeader"), exports);
|
|
140
|
+
__exportStar(require("./components/OpenApiDocs/hooks/AdditionalOverviewInfo"), exports);
|
|
141
|
+
__exportStar(require("./components/AsyncApiDocs/hooks/AfterAsyncApiChannelDescription"), exports);
|
|
138
142
|
/* SidebarActions */
|
|
139
143
|
__exportStar(require("./components/SidebarActions/ChangeViewButton"), exports);
|
|
140
144
|
__exportStar(require("./components/SidebarActions/SidebarActions"), exports);
|
|
@@ -257,6 +261,7 @@ __exportStar(require("./icons/ViewOffIcon/ViewOffIcon"), exports);
|
|
|
257
261
|
__exportStar(require("./icons/CircleDashIcon/CircleDashIcon"), exports);
|
|
258
262
|
__exportStar(require("./icons/RestartIcon/RestartIcon"), exports);
|
|
259
263
|
__exportStar(require("./icons/WarningFilledIcon/WarningFilledIcon"), exports);
|
|
264
|
+
__exportStar(require("./icons/WarningCycleIcon/WarningCycleIcon"), exports);
|
|
260
265
|
__exportStar(require("./icons/CheckmarkFilledIcon/CheckmarkFilledIcon"), exports);
|
|
261
266
|
__exportStar(require("./icons/InformationFilledIcon/InformationFilledIcon"), exports);
|
|
262
267
|
__exportStar(require("./icons/BareMetalServerIcon/BareMetalServerIcon"), exports);
|
|
@@ -328,6 +333,7 @@ __exportStar(require("./icons/WorkflowHierarchyIcon/WorkflowHierarchyIcon"), exp
|
|
|
328
333
|
__exportStar(require("./icons/GenericIcon/GenericIcon"), exports);
|
|
329
334
|
__exportStar(require("./icons/ShareIcon/ShareIcon"), exports);
|
|
330
335
|
__exportStar(require("./icons/HashtagIcon/HashtagIcon"), exports);
|
|
336
|
+
__exportStar(require("./icons/FitToViewIcon/FitToViewIcon"), exports);
|
|
331
337
|
/* Layouts */
|
|
332
338
|
__exportStar(require("./layouts/RootLayout"), exports);
|
|
333
339
|
__exportStar(require("./layouts/PageLayout"), exports);
|
|
@@ -337,6 +343,9 @@ __exportStar(require("./layouts/OIDCForbidden"), exports);
|
|
|
337
343
|
__exportStar(require("./layouts/ThreePanelLayout"), exports);
|
|
338
344
|
__exportStar(require("./layouts/CodeWalkthroughLayout"), exports);
|
|
339
345
|
__exportStar(require("./layouts/InternalServerErrorLayout"), exports);
|
|
346
|
+
__exportStar(require("./layouts/DocumentationLayout"), exports);
|
|
347
|
+
__exportStar(require("./layouts/DocumentationLayoutTop"), exports);
|
|
348
|
+
__exportStar(require("./layouts/DocumentationLayoutBottom"), exports);
|
|
340
349
|
/* Markdoc */
|
|
341
350
|
exports.markdoc = __importStar(require("./markdoc/default"));
|
|
342
351
|
/* DatePicker */
|
|
@@ -6,26 +6,18 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
exports.DocumentationLayout = DocumentationLayout;
|
|
7
7
|
const react_1 = __importDefault(require("react"));
|
|
8
8
|
const styled_components_1 = __importDefault(require("styled-components"));
|
|
9
|
-
const EditPageButton_1 = require("../components/Buttons/EditPageButton");
|
|
10
9
|
const utils_1 = require("../core/utils");
|
|
11
|
-
const PageNavigation_1 = require("../components/PageNavigation/PageNavigation");
|
|
12
|
-
const LastUpdated_1 = require("../components/LastUpdated/LastUpdated");
|
|
13
|
-
const Breadcrumbs_1 = require("../components/Breadcrumbs/Breadcrumbs");
|
|
14
10
|
const CodeSnippetContext_1 = require("../core/contexts/CodeSnippetContext");
|
|
11
|
+
const DocumentationLayoutTop_1 = require("../layouts/DocumentationLayoutTop");
|
|
12
|
+
const DocumentationLayoutBottom_1 = require("../layouts/DocumentationLayoutBottom");
|
|
15
13
|
function DocumentationLayout({ tableOfContent, feedback, config, editPage, lastModified, nextPage, prevPage, className, children, }) {
|
|
16
14
|
var _a;
|
|
17
|
-
const { editPage: themeEditPage } = config || {};
|
|
18
|
-
const mergedConf = editPage ? Object.assign(Object.assign({}, themeEditPage), editPage) : undefined;
|
|
19
15
|
return (react_1.default.createElement(CodeSnippetContext_1.CodeSnippetProvider, null,
|
|
20
16
|
react_1.default.createElement(LayoutWrapper, { "data-component-name": "Layout/DocumentationLayout", className: className },
|
|
21
17
|
react_1.default.createElement(ContentWrapper, { withToc: !((_a = config === null || config === void 0 ? void 0 : config.toc) === null || _a === void 0 ? void 0 : _a.hide) },
|
|
22
|
-
react_1.default.createElement(
|
|
23
|
-
react_1.default.createElement(LayoutTop, null,
|
|
24
|
-
lastModified && react_1.default.createElement(LastUpdated_1.LastUpdated, { lastModified: new Date(lastModified) }),
|
|
25
|
-
mergedConf && react_1.default.createElement(EditPageButton_1.EditPageButton, { to: mergedConf.to })),
|
|
18
|
+
react_1.default.createElement(DocumentationLayoutTop_1.DocumentationLayoutTop, { config: config, editPage: editPage, lastModified: lastModified }),
|
|
26
19
|
children,
|
|
27
|
-
react_1.default.createElement(
|
|
28
|
-
react_1.default.createElement(PageNavigation_1.PageNavigation, { nextPage: nextPage, prevPage: prevPage })),
|
|
20
|
+
react_1.default.createElement(DocumentationLayoutBottom_1.DocumentationLayoutBottom, { feedback: feedback, nextPage: nextPage, prevPage: prevPage })),
|
|
29
21
|
tableOfContent)));
|
|
30
22
|
}
|
|
31
23
|
const LayoutWrapper = styled_components_1.default.div.attrs(({ className }) => ({
|
|
@@ -58,17 +50,4 @@ const ContentWrapper = styled_components_1.default.section `
|
|
|
58
50
|
width: ${({ withToc }) => (withToc ? `calc(90% - var(--toc-width))` : '90%')};
|
|
59
51
|
}
|
|
60
52
|
`;
|
|
61
|
-
const LayoutTop = styled_components_1.default.div `
|
|
62
|
-
display: flex;
|
|
63
|
-
justify-content: space-between;
|
|
64
|
-
flex-flow: row nowrap;
|
|
65
|
-
`;
|
|
66
|
-
const Breadcrumbs = (0, styled_components_1.default)(Breadcrumbs_1.Breadcrumbs) `
|
|
67
|
-
margin-bottom: var(--breadcrumbs-margin-bottom);
|
|
68
|
-
`;
|
|
69
|
-
const LayoutBottom = (0, styled_components_1.default)(LayoutTop) `
|
|
70
|
-
> * {
|
|
71
|
-
margin: 25px 0;
|
|
72
|
-
}
|
|
73
|
-
`;
|
|
74
53
|
//# sourceMappingURL=DocumentationLayout.js.map
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { JSX } from 'react';
|
|
3
|
+
import type { ResolvedNavItemWithLink } from '@redocly/config';
|
|
4
|
+
type DocumentationLayoutBottomProps = {
|
|
5
|
+
feedback: React.ReactNode;
|
|
6
|
+
nextPage?: ResolvedNavItemWithLink | null;
|
|
7
|
+
prevPage?: ResolvedNavItemWithLink | null;
|
|
8
|
+
className?: string;
|
|
9
|
+
};
|
|
10
|
+
export declare function DocumentationLayoutBottom({ feedback, nextPage, prevPage, }: React.PropsWithChildren<DocumentationLayoutBottomProps>): JSX.Element;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.DocumentationLayoutBottom = DocumentationLayoutBottom;
|
|
7
|
+
const react_1 = __importDefault(require("react"));
|
|
8
|
+
const styled_components_1 = __importDefault(require("styled-components"));
|
|
9
|
+
const PageNavigation_1 = require("../components/PageNavigation/PageNavigation");
|
|
10
|
+
function DocumentationLayoutBottom({ feedback, nextPage, prevPage, }) {
|
|
11
|
+
return (react_1.default.createElement(Wrapper, { "data-component-name": "Layout/DocumentationLayoutBottom" },
|
|
12
|
+
react_1.default.createElement(LayoutBottom, null, feedback),
|
|
13
|
+
react_1.default.createElement(PageNavigation_1.PageNavigation, { nextPage: nextPage, prevPage: prevPage })));
|
|
14
|
+
}
|
|
15
|
+
const Wrapper = styled_components_1.default.div `
|
|
16
|
+
display: flex;
|
|
17
|
+
flex-direction: column;
|
|
18
|
+
`;
|
|
19
|
+
const LayoutBottom = styled_components_1.default.div `
|
|
20
|
+
display: flex;
|
|
21
|
+
justify-content: space-between;
|
|
22
|
+
flex-flow: row nowrap;
|
|
23
|
+
|
|
24
|
+
> * {
|
|
25
|
+
margin: 25px 0;
|
|
26
|
+
}
|
|
27
|
+
`;
|
|
28
|
+
//# sourceMappingURL=DocumentationLayoutBottom.js.map
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { JSX } from 'react';
|
|
3
|
+
import type { MarkdownConfig } from '@redocly/config';
|
|
4
|
+
type DocumentationLayoutTopProps = {
|
|
5
|
+
config?: MarkdownConfig;
|
|
6
|
+
editPage?: {
|
|
7
|
+
to: string;
|
|
8
|
+
};
|
|
9
|
+
/** String in ISO format */
|
|
10
|
+
lastModified?: string | null;
|
|
11
|
+
};
|
|
12
|
+
export declare function DocumentationLayoutTop({ config, editPage, lastModified, }: React.PropsWithChildren<DocumentationLayoutTopProps>): JSX.Element;
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.DocumentationLayoutTop = DocumentationLayoutTop;
|
|
7
|
+
const react_1 = __importDefault(require("react"));
|
|
8
|
+
const styled_components_1 = __importDefault(require("styled-components"));
|
|
9
|
+
const EditPageButton_1 = require("../components/Buttons/EditPageButton");
|
|
10
|
+
const LastUpdated_1 = require("../components/LastUpdated/LastUpdated");
|
|
11
|
+
const Breadcrumbs_1 = require("../components/Breadcrumbs/Breadcrumbs");
|
|
12
|
+
function DocumentationLayoutTop({ config, editPage, lastModified, }) {
|
|
13
|
+
const { editPage: themeEditPage } = config || {};
|
|
14
|
+
const mergedConf = editPage ? Object.assign(Object.assign({}, themeEditPage), editPage) : undefined;
|
|
15
|
+
return (react_1.default.createElement(Wrapper, { "data-component-name": "Layout/DocumentationLayoutTop" },
|
|
16
|
+
react_1.default.createElement(Breadcrumbs, null),
|
|
17
|
+
react_1.default.createElement(LayoutTop, null,
|
|
18
|
+
lastModified && react_1.default.createElement(LastUpdated_1.LastUpdated, { lastModified: new Date(lastModified) }),
|
|
19
|
+
mergedConf && react_1.default.createElement(EditPageButton_1.EditPageButton, { to: mergedConf.to }))));
|
|
20
|
+
}
|
|
21
|
+
const Wrapper = styled_components_1.default.div `
|
|
22
|
+
display: flex;
|
|
23
|
+
flex-direction: column;
|
|
24
|
+
`;
|
|
25
|
+
const LayoutTop = styled_components_1.default.div `
|
|
26
|
+
display: flex;
|
|
27
|
+
justify-content: space-between;
|
|
28
|
+
flex-flow: row nowrap;
|
|
29
|
+
`;
|
|
30
|
+
const Breadcrumbs = (0, styled_components_1.default)(Breadcrumbs_1.Breadcrumbs) `
|
|
31
|
+
margin-bottom: var(--breadcrumbs-margin-bottom);
|
|
32
|
+
`;
|
|
33
|
+
//# sourceMappingURL=DocumentationLayoutTop.js.map
|
package/lib/layouts/Forbidden.js
CHANGED
|
@@ -8,38 +8,42 @@ const react_1 = __importDefault(require("react"));
|
|
|
8
8
|
const styled_components_1 = __importDefault(require("styled-components"));
|
|
9
9
|
const hooks_1 = require("../core/hooks");
|
|
10
10
|
const Button_1 = require("../components/Button/Button");
|
|
11
|
+
const ArrowLeftIcon_1 = require("../icons/ArrowLeftIcon/ArrowLeftIcon");
|
|
11
12
|
function Forbidden() {
|
|
12
13
|
const { useTranslate } = (0, hooks_1.useThemeHooks)();
|
|
13
14
|
const { translate } = useTranslate();
|
|
14
|
-
return (react_1.default.createElement(
|
|
15
|
-
react_1.default.createElement(
|
|
16
|
-
react_1.default.createElement(
|
|
17
|
-
react_1.default.createElement(
|
|
15
|
+
return (react_1.default.createElement(ForbiddenWrapper, { "data-component-name": "layouts/Forbidden" },
|
|
16
|
+
react_1.default.createElement(StatusText, null, "403"),
|
|
17
|
+
react_1.default.createElement(Title, { "data-translation-key": "page.forbidden.title" }, translate('page.forbidden.title', 'Access forbidden')),
|
|
18
|
+
react_1.default.createElement(Description, { "data-translation-key": "page.forbidden.description" }, translate('page.forbidden.description', "You don't have permission to access this page. If you believe this is an error, contact your administrator or return to the homepage.")),
|
|
19
|
+
react_1.default.createElement(Button_1.Button, { variant: "primary", size: "large", to: "/", "data-translation-key": "page.homeButton", icon: react_1.default.createElement(ArrowLeftIcon_1.ArrowLeftIcon, null) }, translate('page.homeButton', 'Go home'))));
|
|
18
20
|
}
|
|
19
|
-
const
|
|
21
|
+
const ForbiddenWrapper = styled_components_1.default.div `
|
|
22
|
+
height: 100%;
|
|
23
|
+
max-width: var(--page-403-max-width);
|
|
20
24
|
display: flex;
|
|
21
25
|
flex-direction: column;
|
|
22
|
-
align-items: center;
|
|
23
26
|
justify-content: center;
|
|
24
|
-
margin:
|
|
27
|
+
margin: var(--page-403-margin-vertical) var(--page-403-margin-horizontal);
|
|
25
28
|
font-family: var(--page-403-font-family);
|
|
26
|
-
|
|
29
|
+
gap: var(--page-403-gap);
|
|
27
30
|
`;
|
|
28
|
-
const
|
|
29
|
-
color: var(--page-403-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
31
|
+
const StatusText = styled_components_1.default.div `
|
|
32
|
+
color: var(--page-403-status-text-color);
|
|
33
|
+
font-size: var(--page-403-status-font-size);
|
|
34
|
+
line-height: var(--page-403-status-line-height);
|
|
35
|
+
font-weight: var(--page-403-status-font-weight);
|
|
36
|
+
`;
|
|
37
|
+
const Title = styled_components_1.default.div `
|
|
38
|
+
color: var(--page-403-title-text-color);
|
|
39
|
+
font-size: var(--page-403-title-font-size);
|
|
40
|
+
line-height: var(--page-403-title-line-height);
|
|
41
|
+
font-weight: var(--page-403-title-font-weight);
|
|
34
42
|
`;
|
|
35
43
|
const Description = styled_components_1.default.div `
|
|
36
44
|
color: var(--page-403-description-text-color);
|
|
37
|
-
margin: var(--page-403-description-margin);
|
|
38
45
|
font-size: var(--page-403-description-font-size);
|
|
39
46
|
line-height: var(--page-403-description-line-height);
|
|
40
47
|
font-weight: var(--page-403-description-font-weight);
|
|
41
48
|
`;
|
|
42
|
-
const HomeButton = (0, styled_components_1.default)(Button_1.Button) `
|
|
43
|
-
margin-top: var(--page-403-button-margin);
|
|
44
|
-
`;
|
|
45
49
|
//# sourceMappingURL=Forbidden.js.map
|
|
@@ -46,7 +46,7 @@ const FilterWrapper = styled_components_1.default.div `
|
|
|
46
46
|
padding-bottom: var(--spacing-xs);
|
|
47
47
|
top: var(--navbar-height);
|
|
48
48
|
background-color: var(--bg-color);
|
|
49
|
-
z-index:
|
|
49
|
+
z-index: var(--z-index-raised);
|
|
50
50
|
max-width: var(--md-content-max-width);
|
|
51
51
|
`;
|
|
52
52
|
const ButtonsWrapper = styled_components_1.default.div `
|
|
@@ -40,10 +40,31 @@ exports.Heading = Heading;
|
|
|
40
40
|
const react_1 = __importStar(require("react"));
|
|
41
41
|
const styled_components_1 = __importDefault(require("styled-components"));
|
|
42
42
|
const react_router_dom_1 = require("react-router-dom");
|
|
43
|
+
const Image_1 = require("../../../markdoc/components/Image/Image");
|
|
43
44
|
const utils_1 = require("../../../core/utils");
|
|
44
45
|
const LinkIcon_1 = require("../../../icons/LinkIcon/LinkIcon");
|
|
45
46
|
const PageActions_1 = require("../../../components/PageActions/PageActions");
|
|
46
47
|
const hooks_1 = require("../../../core/hooks");
|
|
48
|
+
function renderWithSpanWrapper(children) {
|
|
49
|
+
const childrenArray = react_1.default.Children.toArray(children);
|
|
50
|
+
if (childrenArray.length === 0)
|
|
51
|
+
return null;
|
|
52
|
+
const first = childrenArray[0];
|
|
53
|
+
const last = childrenArray[childrenArray.length - 1];
|
|
54
|
+
// Check if an element is an <img> or the Markdoc Image component
|
|
55
|
+
const isImage = (node) => {
|
|
56
|
+
if (!(0, react_1.isValidElement)(node))
|
|
57
|
+
return false;
|
|
58
|
+
if (typeof node.type === 'string')
|
|
59
|
+
return node.type === 'img';
|
|
60
|
+
return node.type === Image_1.Image;
|
|
61
|
+
};
|
|
62
|
+
const middleChildren = childrenArray.slice(isImage(first) ? 1 : 0, isImage(last) ? childrenArray.length - 1 : childrenArray.length);
|
|
63
|
+
return (react_1.default.createElement(react_1.default.Fragment, null,
|
|
64
|
+
isImage(first) && first,
|
|
65
|
+
middleChildren.length > 0 && react_1.default.createElement(StyledHeadingText, null, middleChildren),
|
|
66
|
+
isImage(last) && last));
|
|
67
|
+
}
|
|
47
68
|
/**
|
|
48
69
|
* Class name for all MD tags
|
|
49
70
|
*/
|
|
@@ -64,12 +85,29 @@ function Heading({ level, id, children, 'data-source': dataSource, 'data-hash':
|
|
|
64
85
|
'data-hash': dataHash,
|
|
65
86
|
}, react_1.default.createElement(HeadingContentWrapper, null,
|
|
66
87
|
linkEl,
|
|
67
|
-
react_1.default.createElement("span", null, children),
|
|
88
|
+
react_1.default.createElement("span", null, renderWithSpanWrapper(children)),
|
|
68
89
|
isMarkdownPage && __idx === 0 ? react_1.default.createElement(PageActions_1.PageActions, { pageSlug: pathname }) : null));
|
|
69
90
|
}
|
|
70
91
|
const HeadingContentWrapper = styled_components_1.default.div `
|
|
71
92
|
display: flex;
|
|
72
93
|
gap: var(--spacing-xs);
|
|
73
|
-
|
|
94
|
+
|
|
95
|
+
& > span {
|
|
96
|
+
display: flex;
|
|
97
|
+
align-items: flex-start;
|
|
98
|
+
gap: var(--spacing-sm);
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
&:has([data-component-name='PageActions/PageActions']:hover) {
|
|
102
|
+
&& .anchor svg {
|
|
103
|
+
visibility: hidden;
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
`;
|
|
107
|
+
const StyledHeadingText = styled_components_1.default.span `
|
|
108
|
+
margin: auto 0;
|
|
109
|
+
&& > img:only-child {
|
|
110
|
+
display: inline-block;
|
|
111
|
+
}
|
|
74
112
|
`;
|
|
75
113
|
//# sourceMappingURL=Heading.js.map
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import type { ButtonVariant, ButtonSize } from '../../../components/Button/Button';
|
|
3
|
+
export type MarkdocLoginButtonProps = {
|
|
4
|
+
variant?: ButtonVariant;
|
|
5
|
+
size?: ButtonSize;
|
|
6
|
+
label?: string;
|
|
7
|
+
labelTranslationKey?: string;
|
|
8
|
+
};
|
|
9
|
+
export declare function LoginButton({ variant, size, label, labelTranslationKey, }: MarkdocLoginButtonProps): React.JSX.Element | null;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.LoginButton = LoginButton;
|
|
37
|
+
const React = __importStar(require("react"));
|
|
38
|
+
const hooks_1 = require("../../../core/hooks");
|
|
39
|
+
const LoginButton_1 = require("../../../components/UserMenu/LoginButton");
|
|
40
|
+
function LoginButton({ variant, size, label, labelTranslationKey, }) {
|
|
41
|
+
const { useUserMenu } = (0, hooks_1.useThemeHooks)();
|
|
42
|
+
const { userData, loginUrl } = useUserMenu();
|
|
43
|
+
if (userData === null || userData === void 0 ? void 0 : userData.isAuthenticated) {
|
|
44
|
+
return null;
|
|
45
|
+
}
|
|
46
|
+
return (React.createElement(LoginButton_1.LoginButton, { href: loginUrl || '', variant: variant, size: size, label: label, labelTranslationKey: labelTranslationKey, "data-component-name": "Markdoc/LoginButton" }));
|
|
47
|
+
}
|
|
48
|
+
//# sourceMappingURL=LoginButton.js.map
|
|
@@ -1,18 +1,75 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
2
35
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
36
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
37
|
};
|
|
5
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
39
|
exports.Mermaid = Mermaid;
|
|
7
|
-
const react_1 =
|
|
40
|
+
const react_1 = __importStar(require("react"));
|
|
8
41
|
const styled_components_1 = __importDefault(require("styled-components"));
|
|
9
42
|
const utils_1 = require("../../../core/utils");
|
|
43
|
+
const hooks_1 = require("../../../core/hooks");
|
|
44
|
+
const SvgViewer_1 = require("../../../components/SvgViewer/SvgViewer");
|
|
10
45
|
function Mermaid({ diagramHtml, 'data-source': dataSource, 'data-hash': dataHash, className, }) {
|
|
11
|
-
|
|
46
|
+
const { useTranslate } = (0, hooks_1.useThemeHooks)();
|
|
47
|
+
const { translate } = useTranslate();
|
|
48
|
+
const [isOpen, setIsOpen] = (0, react_1.useState)(false);
|
|
49
|
+
const open = () => setIsOpen(true);
|
|
50
|
+
const close = () => setIsOpen(false);
|
|
51
|
+
return (react_1.default.createElement(react_1.default.Fragment, null,
|
|
52
|
+
react_1.default.createElement(Wrapper, { className: (0, utils_1.concatClassNames)('mermaid-wrapper', className), dangerouslySetInnerHTML: { __html: diagramHtml }, "data-component-name": "Markdoc/Mermaid/Mermaid", "data-source": dataSource, "data-hash": dataHash, onClick: open, onKeyDown: (e) => e.key === 'Enter' || (e.key === ' ' && open()), role: "button", tabIndex: 0, "aria-label": translate('mermaid.openFullscreen', 'Click to open diagram in fullscreen') }),
|
|
53
|
+
react_1.default.createElement(SvgViewer_1.SvgViewer, { isOpen: isOpen, onClose: close, labels: {
|
|
54
|
+
zoomIn: translate('mermaid.zoomIn', 'Zoom in'),
|
|
55
|
+
zoomOut: translate('mermaid.zoomOut', 'Zoom out'),
|
|
56
|
+
fitToView: translate('mermaid.reset', 'Fit to view'),
|
|
57
|
+
close: translate('mermaid.close', 'Close'),
|
|
58
|
+
dialogLabel: translate('mermaid.viewer', 'Mermaid diagram viewer'),
|
|
59
|
+
} },
|
|
60
|
+
react_1.default.createElement(ViewerContent, { dangerouslySetInnerHTML: { __html: diagramHtml } }))));
|
|
12
61
|
}
|
|
13
62
|
const Wrapper = styled_components_1.default.div `
|
|
14
63
|
background-color: var(--mermaid-bg-color);
|
|
15
64
|
border-radius: var(--mermaid-border-radius);
|
|
65
|
+
cursor: pointer;
|
|
66
|
+
transition: box-shadow 0.2s ease;
|
|
67
|
+
|
|
68
|
+
&:hover,
|
|
69
|
+
&:focus {
|
|
70
|
+
outline: none;
|
|
71
|
+
box-shadow: 0 0 0 2px var(--border-color-input-focus);
|
|
72
|
+
}
|
|
16
73
|
|
|
17
74
|
* {
|
|
18
75
|
font-family: var(--mermaid-font-family) !important;
|
|
@@ -23,4 +80,15 @@ const Wrapper = styled_components_1.default.div `
|
|
|
23
80
|
max-width: 100%;
|
|
24
81
|
}
|
|
25
82
|
`;
|
|
83
|
+
const ViewerContent = styled_components_1.default.div `
|
|
84
|
+
* {
|
|
85
|
+
font-family: var(--mermaid-font-family) !important;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.mermaid > svg {
|
|
89
|
+
font-size: var(--font-size-base) !important;
|
|
90
|
+
display: block;
|
|
91
|
+
max-width: none !important;
|
|
92
|
+
}
|
|
93
|
+
`;
|
|
26
94
|
//# sourceMappingURL=Mermaid.js.map
|
|
@@ -21,3 +21,4 @@ export * from '../../markdoc/components/CodeWalkthrough/CodeContainer';
|
|
|
21
21
|
export * from '../../markdoc/components/CodeGroup/CodeGroup';
|
|
22
22
|
export * from '../../markdoc/components/Icon/Icon';
|
|
23
23
|
export * from '../../markdoc/components/ConnectMCP/ConnectMCP';
|
|
24
|
+
export * from '../../markdoc/components/LoginButton/LoginButton';
|
|
@@ -37,4 +37,5 @@ __exportStar(require("../../markdoc/components/CodeWalkthrough/CodeContainer"),
|
|
|
37
37
|
__exportStar(require("../../markdoc/components/CodeGroup/CodeGroup"), exports);
|
|
38
38
|
__exportStar(require("../../markdoc/components/Icon/Icon"), exports);
|
|
39
39
|
__exportStar(require("../../markdoc/components/ConnectMCP/ConnectMCP"), exports);
|
|
40
|
+
__exportStar(require("../../markdoc/components/LoginButton/LoginButton"), exports);
|
|
40
41
|
//# sourceMappingURL=default.js.map
|