@redocly/theme 0.56.0-next.2 → 0.56.0-next.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/Catalog/CatalogCardView/CatalogCard.js +4 -2
- package/lib/components/Catalog/CatalogEntity/CatalogEntity.d.ts +1 -3
- package/lib/components/Catalog/CatalogEntity/CatalogEntity.js +4 -11
- package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/CatalogEntityProperties.js +7 -1
- package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/CatalogEntityPropertyCard.js +4 -0
- package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/DomainsProperty.js +3 -3
- package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/EntityTypeProperty.js +7 -2
- package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/FormatProperty.d.ts +6 -0
- package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/FormatProperty.js +19 -0
- package/lib/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityDefaultRelations.d.ts +1 -0
- package/lib/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityDefaultRelations.js +11 -8
- package/lib/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityRelations.js +31 -6
- package/lib/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityRelationsTable.d.ts +0 -1
- package/lib/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityTeamRelations.d.ts +2 -1
- package/lib/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityTeamRelations.js +11 -5
- package/lib/components/Catalog/CatalogEntity/CatalogEntitySchema.d.ts +6 -0
- package/lib/components/Catalog/CatalogEntity/CatalogEntitySchema.js +55 -0
- package/lib/components/Catalog/CatalogEntityIcon.d.ts +2 -1
- package/lib/components/Catalog/CatalogEntityIcon.js +22 -23
- package/lib/components/Catalog/CatalogEntityTypeIcon.d.ts +2 -1
- package/lib/components/Catalog/CatalogEntityTypeIcon.js +11 -23
- package/lib/components/Catalog/CatalogEntityTypeTag.d.ts +7 -0
- package/lib/components/Catalog/CatalogEntityTypeTag.js +36 -0
- package/lib/components/Catalog/CatalogPageDescription.js +2 -2
- package/lib/components/Catalog/CatalogTableView/CatalogEntityCell.d.ts +6 -4
- package/lib/components/Catalog/CatalogTableView/CatalogEntityCell.js +2 -14
- package/lib/components/Catalog/CatalogTableView/CatalogEntityRelationCell.d.ts +3 -0
- package/lib/components/Catalog/CatalogTableView/CatalogEntityRelationCell.js +11 -0
- package/lib/components/Catalog/CatalogTableView/CatalogTableHeaderCell.d.ts +1 -1
- package/lib/components/Catalog/CatalogTableView/CatalogTableView.d.ts +1 -2
- package/lib/components/Catalog/CatalogTableView/CatalogTableView.js +3 -26
- package/lib/components/Catalog/CatalogTableView/CatalogTableViewRow.d.ts +0 -2
- package/lib/components/Catalog/CatalogTableView/CatalogTableViewRow.js +5 -26
- package/lib/components/Catalog/CatalogTagsWithTooltip.d.ts +1 -1
- package/lib/components/Catalog/CatalogTagsWithTooltip.js +5 -6
- package/lib/components/Catalog/variables.js +36 -7
- package/lib/components/Menu/variables.js +2 -0
- package/lib/components/Tag/Tag.d.ts +2 -1
- package/lib/components/Tag/Tag.js +3 -3
- package/lib/components/Tag/variables.js +14 -0
- package/lib/components/Tags/CounterTag.d.ts +1 -1
- package/lib/components/Tags/HttpTag.d.ts +1 -1
- package/lib/core/constants/catalog.d.ts +3 -0
- package/lib/core/constants/catalog.js +55 -1
- package/lib/core/constants/index.d.ts +5 -5
- package/lib/core/constants/index.js +5 -5
- package/lib/core/constants/search.d.ts +1 -1
- package/lib/core/contexts/CodeWalkthrough/CodeWalkthroughControlsContext.d.ts +1 -1
- package/lib/core/contexts/CodeWalkthrough/CodeWalkthroughStepsContext.d.ts +1 -1
- package/lib/core/contexts/ThemeDataContext.d.ts +1 -1
- package/lib/core/contexts/index.d.ts +3 -3
- package/lib/core/contexts/index.js +3 -3
- package/lib/core/hoc/index.d.ts +1 -1
- package/lib/core/hoc/index.js +1 -1
- package/lib/core/hooks/__mocks__/index.d.ts +28 -28
- package/lib/core/hooks/__mocks__/index.js +28 -28
- package/lib/core/hooks/catalog/useCatalogEntities.d.ts +1 -1
- package/lib/core/hooks/catalog/useCatalogTableViewRow.js +2 -2
- package/lib/core/hooks/code-walkthrough/use-code-panel.js +6 -5
- package/lib/core/hooks/code-walkthrough/use-code-walkthrough-controls.js +8 -5
- package/lib/core/hooks/code-walkthrough/use-code-walkthrough-steps.d.ts +1 -1
- package/lib/core/hooks/code-walkthrough/use-code-walkthrough-steps.js +9 -9
- package/lib/core/hooks/code-walkthrough/use-code-walkthrough.d.ts +2 -2
- package/lib/core/hooks/code-walkthrough/use-code-walkthrough.js +4 -3
- package/lib/core/hooks/code-walkthrough/use-renderable-files.js +6 -4
- package/lib/core/hooks/feedback/use-report-dialog.js +4 -3
- package/lib/core/hooks/index.d.ts +42 -42
- package/lib/core/hooks/index.js +42 -42
- package/lib/core/hooks/menu/use-menu-item-expanded.d.ts +1 -1
- package/lib/core/hooks/menu/use-mobile-menu-items.d.ts +1 -1
- package/lib/core/hooks/menu/use-mobile-menu-items.js +13 -12
- package/lib/core/hooks/menu/use-mobile-menu-levels.d.ts +1 -1
- package/lib/core/hooks/menu/use-mobile-menu-levels.js +8 -7
- package/lib/core/hooks/menu/use-nested-menu.d.ts +1 -1
- package/lib/core/hooks/menu/use-nested-menu.js +8 -6
- package/lib/core/hooks/search/use-recent-searches.js +3 -3
- package/lib/core/hooks/search/use-search-dialog.js +4 -3
- package/lib/core/hooks/search/use-search-filter.d.ts +1 -1
- package/lib/core/hooks/search/use-suggested-pages.js +2 -2
- package/lib/core/hooks/use-active-page-version.js +2 -2
- package/lib/core/hooks/use-active-section-id.js +2 -2
- package/lib/core/hooks/use-color-switcher.js +4 -3
- package/lib/core/hooks/use-input-key-commands.js +2 -2
- package/lib/core/hooks/use-language-picker.d.ts +1 -1
- package/lib/core/hooks/use-language-picker.js +4 -4
- package/lib/core/hooks/use-mobile-menu.js +2 -2
- package/lib/core/hooks/use-navbar-height.js +3 -3
- package/lib/core/hooks/use-page-versions.js +2 -2
- package/lib/core/hooks/use-product-picker.js +2 -2
- package/lib/core/hooks/use-theme-config.js +2 -2
- package/lib/core/hooks/use-theme-hooks.d.ts +1 -1
- package/lib/core/hooks/use-theme-hooks.js +2 -2
- package/lib/core/hooks/use-time-ago.js +2 -2
- package/lib/core/hooks/use-user-teams.js +2 -2
- package/lib/core/index.d.ts +7 -7
- package/lib/core/index.js +7 -7
- package/lib/core/openapi/index.d.ts +18 -0
- package/lib/core/openapi/index.js +48 -0
- package/lib/core/styles/global.js +1 -1
- package/lib/core/styles/index.d.ts +2 -2
- package/lib/core/styles/index.js +2 -2
- package/lib/core/templates/Markdown.d.ts +1 -1
- package/lib/core/templates/Markdown.js +8 -6
- package/lib/core/types/catalog.d.ts +6 -2
- package/lib/core/types/code-walkthrough.d.ts +1 -1
- package/lib/core/types/feedback.d.ts +1 -1
- package/lib/core/types/filter.d.ts +1 -1
- package/lib/core/types/hooks.d.ts +11 -3
- package/lib/core/types/index.d.ts +18 -18
- package/lib/core/types/index.js +18 -18
- package/lib/core/types/l10n.d.ts +1 -1
- package/lib/core/types/search.d.ts +1 -1
- package/lib/core/types/sidebar.d.ts +1 -1
- package/lib/core/utils/download-code-walkthrough.js +6 -4
- package/lib/core/utils/get-code-walkthrough-file-text.js +4 -3
- package/lib/core/utils/index.d.ts +35 -35
- package/lib/core/utils/index.js +35 -35
- package/lib/core/utils/load-and-navigate.js +2 -2
- package/lib/core/utils/match-code-walkthrough-conditions.js +3 -3
- package/lib/core/utils/menu.d.ts +3 -2
- package/lib/core/utils/menu.js +12 -12
- package/lib/core/utils/toc.d.ts +1 -1
- package/lib/core/utils/type-guards.d.ts +1 -1
- package/lib/core/utils/type-guards.js +5 -5
- package/lib/core/utils/urls.d.ts +1 -1
- package/lib/core/utils/urls.js +2 -2
- package/lib/icons/MoleculesIcon/MoleculesIcon.d.ts +9 -0
- package/lib/icons/MoleculesIcon/MoleculesIcon.js +22 -0
- package/lib/icons/NetworkIcon/NetworkIcon.d.ts +9 -0
- package/lib/icons/NetworkIcon/NetworkIcon.js +23 -0
- package/lib/icons/NotesIcon/NotesIcon.d.ts +9 -0
- package/lib/icons/NotesIcon/NotesIcon.js +26 -0
- package/lib/markdoc/components/Tabs/TabList.js +2 -0
- package/package.json +2 -2
- package/src/components/Catalog/CatalogCardView/CatalogCard.tsx +6 -3
- package/src/components/Catalog/CatalogEntity/CatalogEntity.tsx +7 -15
- package/src/components/Catalog/CatalogEntity/CatalogEntityProperties/CatalogEntityProperties.tsx +7 -1
- package/src/components/Catalog/CatalogEntity/CatalogEntityProperties/CatalogEntityPropertyCard.tsx +4 -0
- package/src/components/Catalog/CatalogEntity/CatalogEntityProperties/DomainsProperty.tsx +2 -3
- package/src/components/Catalog/CatalogEntity/CatalogEntityProperties/EntityTypeProperty.tsx +10 -3
- package/src/components/Catalog/CatalogEntity/CatalogEntityProperties/FormatProperty.tsx +36 -0
- package/src/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityDefaultRelations.tsx +19 -22
- package/src/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityRelations.tsx +8 -2
- package/src/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityRelationsTable.tsx +0 -1
- package/src/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityTeamRelations.tsx +16 -3
- package/src/components/Catalog/CatalogEntity/CatalogEntitySchema.tsx +52 -0
- package/src/components/Catalog/CatalogEntityIcon.tsx +33 -27
- package/src/components/Catalog/CatalogEntityTypeIcon.tsx +23 -28
- package/src/components/Catalog/CatalogEntityTypeTag.tsx +43 -0
- package/src/components/Catalog/CatalogPageDescription.tsx +4 -3
- package/src/components/Catalog/CatalogTableView/CatalogEntityCell.tsx +7 -20
- package/src/components/Catalog/CatalogTableView/CatalogEntityRelationCell.tsx +19 -0
- package/src/components/Catalog/CatalogTableView/CatalogTableHeaderCell.tsx +4 -2
- package/src/components/Catalog/CatalogTableView/CatalogTableView.tsx +3 -31
- package/src/components/Catalog/CatalogTableView/CatalogTableViewRow.tsx +5 -31
- package/src/components/Catalog/CatalogTagsWithTooltip.tsx +10 -19
- package/src/components/Catalog/variables.ts +36 -7
- package/src/components/Menu/variables.ts +2 -0
- package/src/components/Tag/Tag.tsx +11 -2
- package/src/components/Tag/variables.ts +14 -0
- package/src/core/constants/catalog.ts +58 -0
- package/src/core/constants/index.ts +5 -5
- package/src/core/constants/search.ts +1 -1
- package/src/core/contexts/CodeWalkthrough/CodeWalkthroughControlsContext.tsx +1 -1
- package/src/core/contexts/CodeWalkthrough/CodeWalkthroughStepsContext.tsx +1 -1
- package/src/core/contexts/ThemeDataContext.tsx +3 -3
- package/src/core/contexts/index.ts +3 -3
- package/src/core/hoc/index.ts +1 -1
- package/src/core/hooks/__mocks__/index.ts +28 -28
- package/src/core/hooks/catalog/useCatalogEntities.ts +1 -1
- package/src/core/hooks/catalog/useCatalogTableViewRow.ts +1 -1
- package/src/core/hooks/code-walkthrough/use-code-panel.ts +3 -5
- package/src/core/hooks/code-walkthrough/use-code-walkthrough-controls.ts +4 -6
- package/src/core/hooks/code-walkthrough/use-code-walkthrough-steps.ts +4 -3
- package/src/core/hooks/code-walkthrough/use-code-walkthrough.ts +3 -3
- package/src/core/hooks/code-walkthrough/use-renderable-files.ts +4 -6
- package/src/core/hooks/feedback/use-report-dialog.ts +3 -2
- package/src/core/hooks/index.ts +42 -42
- package/src/core/hooks/menu/use-menu-item-expanded.ts +1 -1
- package/src/core/hooks/menu/use-mobile-menu-items.ts +4 -7
- package/src/core/hooks/menu/use-mobile-menu-levels.ts +3 -2
- package/src/core/hooks/menu/use-nested-menu.ts +5 -3
- package/src/core/hooks/search/use-recent-searches.ts +1 -1
- package/src/core/hooks/search/use-search-dialog.ts +2 -1
- package/src/core/hooks/search/use-search-filter.ts +1 -1
- package/src/core/hooks/search/use-suggested-pages.ts +1 -1
- package/src/core/hooks/use-active-page-version.ts +1 -1
- package/src/core/hooks/use-active-section-id.ts +1 -1
- package/src/core/hooks/use-codeblock-tabs-controls.ts +1 -1
- package/src/core/hooks/use-color-switcher.ts +2 -1
- package/src/core/hooks/use-input-key-commands.ts +1 -1
- package/src/core/hooks/use-language-picker.ts +3 -3
- package/src/core/hooks/use-mobile-menu.ts +1 -1
- package/src/core/hooks/use-navbar-height.ts +1 -1
- package/src/core/hooks/use-page-versions.ts +1 -1
- package/src/core/hooks/use-product-picker.ts +1 -1
- package/src/core/hooks/use-theme-config.ts +2 -2
- package/src/core/hooks/use-theme-hooks.ts +2 -2
- package/src/core/hooks/use-time-ago.ts +3 -2
- package/src/core/hooks/use-user-teams.ts +1 -1
- package/src/core/index.ts +7 -7
- package/src/core/openapi/index.ts +31 -0
- package/src/core/styles/global.ts +2 -1
- package/src/core/styles/index.ts +2 -2
- package/src/core/templates/Markdown.tsx +8 -4
- package/src/core/types/catalog.ts +15 -2
- package/src/core/types/code-walkthrough.ts +1 -1
- package/src/core/types/feedback.ts +6 -6
- package/src/core/types/filter.ts +1 -1
- package/src/core/types/hooks.ts +17 -16
- package/src/core/types/index.ts +18 -18
- package/src/core/types/l10n.ts +4 -0
- package/src/core/types/search.ts +1 -1
- package/src/core/types/sidebar.ts +1 -1
- package/src/core/utils/download-code-walkthrough.ts +3 -5
- package/src/core/utils/get-code-walkthrough-file-text.ts +2 -1
- package/src/core/utils/index.ts +35 -35
- package/src/core/utils/load-and-navigate.ts +1 -1
- package/src/core/utils/match-code-walkthrough-conditions.ts +1 -1
- package/src/core/utils/menu.ts +4 -3
- package/src/core/utils/toc.ts +1 -1
- package/src/core/utils/type-guards.ts +2 -2
- package/src/core/utils/urls.ts +2 -2
- package/src/icons/MoleculesIcon/MoleculesIcon.tsx +23 -0
- package/src/icons/NetworkIcon/NetworkIcon.tsx +31 -0
- package/src/icons/NotesIcon/NotesIcon.tsx +43 -0
- package/src/markdoc/components/Tabs/TabList.tsx +1 -0
|
@@ -26,18 +26,20 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
26
26
|
exports.default = default_1;
|
|
27
27
|
const React = __importStar(require("react"));
|
|
28
28
|
const react_router_dom_1 = require("react-router-dom");
|
|
29
|
-
const hooks_1 = require("../../core/hooks");
|
|
30
29
|
const DocumentationLayout_1 = require("../../layouts/DocumentationLayout");
|
|
31
30
|
const Markdown_1 = require("../../components/Markdown/Markdown");
|
|
32
31
|
const TableOfContent_1 = require("../../components/TableOfContent/TableOfContent");
|
|
33
32
|
const Feedback_1 = require("../../components/Feedback/Feedback");
|
|
34
|
-
const utils_1 = require("../../core/utils");
|
|
35
33
|
const CodeWalkthroughLayout_1 = require("../../layouts/CodeWalkthroughLayout");
|
|
34
|
+
const dom_1 = require("../utils/dom");
|
|
35
|
+
const details_1 = require("../utils/details");
|
|
36
|
+
const use_theme_hooks_1 = require("../hooks/use-theme-hooks");
|
|
37
|
+
const use_theme_config_1 = require("../hooks/use-theme-config");
|
|
36
38
|
function default_1({ pageProps, children }) {
|
|
37
39
|
var _a;
|
|
38
40
|
const [wrapperElement, setWrapperElement] = React.useState(null);
|
|
39
|
-
const { useSidebarSiblingsData } = (0,
|
|
40
|
-
const { markdown } = (0,
|
|
41
|
+
const { useSidebarSiblingsData } = (0, use_theme_hooks_1.useThemeHooks)();
|
|
42
|
+
const { markdown } = (0, use_theme_config_1.useThemeConfig)();
|
|
41
43
|
const { nextPage, prevPage } = useSidebarSiblingsData() || {};
|
|
42
44
|
const { pathname } = (0, react_router_dom_1.useLocation)();
|
|
43
45
|
const wrapperRefCb = React.useCallback((node) => {
|
|
@@ -61,8 +63,8 @@ function default_1({ pageProps, children }) {
|
|
|
61
63
|
nextPage,
|
|
62
64
|
prevPage,
|
|
63
65
|
};
|
|
64
|
-
if (
|
|
65
|
-
(0,
|
|
66
|
+
if (dom_1.IS_BROWSER) {
|
|
67
|
+
(0, dom_1.onDocumentReady)(details_1.extendDetailsBehaviour);
|
|
66
68
|
}
|
|
67
69
|
const document = React.createElement(Markdown_1.Markdown, { ref: wrapperRefCb }, children);
|
|
68
70
|
const tagList = pageProps.metadata.markdoc.tagList;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { InfiniteData, UseInfiniteQueryResult } from '@tanstack/react-query';
|
|
2
2
|
import { CatalogEntityConfig, LayoutVariant } from '@redocly/config';
|
|
3
3
|
import type { CatalogFilterConfig } from '../../config';
|
|
4
|
+
import { ENTITY_RELATION_TYPES } from '../constants/catalog';
|
|
4
5
|
export type SortOption = 'title' | '-title' | 'type' | '-type';
|
|
5
6
|
export type UseCatalogResponse = {
|
|
6
7
|
filters: ResolvedFilter[];
|
|
@@ -91,7 +92,7 @@ export type UseCatalogEntitiesProps = {
|
|
|
91
92
|
export type UseCatalogEntitiesResponse = {
|
|
92
93
|
setEntitiesCounter: (counter: number) => void;
|
|
93
94
|
};
|
|
94
|
-
export type EntityType = 'service' | 'domain' | 'team' | 'user' | 'api-description';
|
|
95
|
+
export type EntityType = 'service' | 'domain' | 'team' | 'user' | 'api-description' | 'data-schema' | 'api-operation';
|
|
95
96
|
export type CatalogViewMode = 'cards' | 'table';
|
|
96
97
|
export type CatalogSwitcherItem = {
|
|
97
98
|
labelTranslationKey: string;
|
|
@@ -105,6 +106,8 @@ export type BffCatalogRelatedEntity = {
|
|
|
105
106
|
title: string;
|
|
106
107
|
summary?: string | null;
|
|
107
108
|
readonly source: 'api' | 'file';
|
|
109
|
+
relationRole: 'source' | 'target';
|
|
110
|
+
relationType: EntityRelationType;
|
|
108
111
|
sourceFile?: string | null;
|
|
109
112
|
metadata?: Record<string, any>;
|
|
110
113
|
readonly createdAt: string | null;
|
|
@@ -120,7 +123,7 @@ export type BffCatalogEntity = {
|
|
|
120
123
|
readonly source: 'api' | 'file';
|
|
121
124
|
domains?: Array<BffCatalogRelatedEntity>;
|
|
122
125
|
owners?: Array<BffCatalogRelatedEntity>;
|
|
123
|
-
summary?: string;
|
|
126
|
+
summary?: string | null;
|
|
124
127
|
tags?: Array<string>;
|
|
125
128
|
metadata?: Record<string, any>;
|
|
126
129
|
git?: Array<string>;
|
|
@@ -158,3 +161,4 @@ export type Page = {
|
|
|
158
161
|
limit: number;
|
|
159
162
|
total: number;
|
|
160
163
|
};
|
|
164
|
+
export type EntityRelationType = (typeof ENTITY_RELATION_TYPES)[number];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { FEEDBACK_TYPES } from '
|
|
1
|
+
import type { FEEDBACK_TYPES } from '../constants/common';
|
|
2
2
|
import type { SentimentProps } from '../../components/Feedback/Sentiment';
|
|
3
3
|
import type { CommentProps } from '../../components/Feedback/Comment';
|
|
4
4
|
import type { MoodProps } from '../../components/Feedback/Mood';
|
|
@@ -3,9 +3,17 @@ import type { ShikiTransformer } from '@shikijs/types';
|
|
|
3
3
|
import type { Callback, TFunction as TFunc } from 'i18next';
|
|
4
4
|
import type { To, Location, NavigateFunction } from 'react-router-dom';
|
|
5
5
|
import type { CatalogConfig, ProductUiConfig } from '../../config';
|
|
6
|
-
import type {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
6
|
+
import type { UseCatalogResponse, CatalogApiResults, CatalogApiParams, FilteredCatalog, UseCatalogSortResponse, UseCatalogSearchResponse } from './catalog';
|
|
7
|
+
import type { UserMenuData } from './user-menu';
|
|
8
|
+
import type { ItemState } from './sidebar';
|
|
9
|
+
import type { SearchItemData, SearchFacet, SearchFilterItem, SearchFacetQuery, AiSearchConversationItem } from './search';
|
|
10
|
+
import type { EventType, SendEventParams } from './telemetry';
|
|
11
|
+
import type { SubmitFeedbackParams } from './feedback';
|
|
12
|
+
import type { TFunction } from './l10n';
|
|
13
|
+
import type { BreadcrumbItem } from './breadcrumb';
|
|
14
|
+
import type { DrilldownMenuItemDetails } from './sidebar';
|
|
15
|
+
import { BffCatalogEntity, BffCatalogEntityList, BffCatalogRelatedEntity, BffCatalogRelatedEntityList } from './catalog';
|
|
16
|
+
import { AiSearchError } from '../constants/search';
|
|
9
17
|
export type ThemeHooks = {
|
|
10
18
|
useTranslate: () => {
|
|
11
19
|
translate: TFunction;
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
export * from '
|
|
2
|
-
export * from '
|
|
3
|
-
export * from '
|
|
4
|
-
export * from '
|
|
5
|
-
export * from '
|
|
6
|
-
export * from '
|
|
7
|
-
export * from '
|
|
8
|
-
export * from '
|
|
9
|
-
export * from '
|
|
10
|
-
export * from '
|
|
11
|
-
export * from '
|
|
12
|
-
export * from '
|
|
13
|
-
export * from '
|
|
14
|
-
export * from '
|
|
15
|
-
export * from '
|
|
16
|
-
export * from '
|
|
17
|
-
export * from '
|
|
18
|
-
export * from '
|
|
1
|
+
export * from './breadcrumb';
|
|
2
|
+
export * from './catalog';
|
|
3
|
+
export * from './l10n';
|
|
4
|
+
export * from './feedback';
|
|
5
|
+
export * from './hooks';
|
|
6
|
+
export * from './markdown';
|
|
7
|
+
export * from './navbar';
|
|
8
|
+
export * from './search';
|
|
9
|
+
export * from './select';
|
|
10
|
+
export * from './sidebar';
|
|
11
|
+
export * from './filter';
|
|
12
|
+
export * from './user-menu';
|
|
13
|
+
export * from './user-claims';
|
|
14
|
+
export * from './common';
|
|
15
|
+
export * from './open-api-server';
|
|
16
|
+
export * from './marker';
|
|
17
|
+
export * from './code-walkthrough';
|
|
18
|
+
export * from './telemetry';
|
package/lib/core/types/index.js
CHANGED
|
@@ -14,22 +14,22 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("
|
|
18
|
-
__exportStar(require("
|
|
19
|
-
__exportStar(require("
|
|
20
|
-
__exportStar(require("
|
|
21
|
-
__exportStar(require("
|
|
22
|
-
__exportStar(require("
|
|
23
|
-
__exportStar(require("
|
|
24
|
-
__exportStar(require("
|
|
25
|
-
__exportStar(require("
|
|
26
|
-
__exportStar(require("
|
|
27
|
-
__exportStar(require("
|
|
28
|
-
__exportStar(require("
|
|
29
|
-
__exportStar(require("
|
|
30
|
-
__exportStar(require("
|
|
31
|
-
__exportStar(require("
|
|
32
|
-
__exportStar(require("
|
|
33
|
-
__exportStar(require("
|
|
34
|
-
__exportStar(require("
|
|
17
|
+
__exportStar(require("./breadcrumb"), exports);
|
|
18
|
+
__exportStar(require("./catalog"), exports);
|
|
19
|
+
__exportStar(require("./l10n"), exports);
|
|
20
|
+
__exportStar(require("./feedback"), exports);
|
|
21
|
+
__exportStar(require("./hooks"), exports);
|
|
22
|
+
__exportStar(require("./markdown"), exports);
|
|
23
|
+
__exportStar(require("./navbar"), exports);
|
|
24
|
+
__exportStar(require("./search"), exports);
|
|
25
|
+
__exportStar(require("./select"), exports);
|
|
26
|
+
__exportStar(require("./sidebar"), exports);
|
|
27
|
+
__exportStar(require("./filter"), exports);
|
|
28
|
+
__exportStar(require("./user-menu"), exports);
|
|
29
|
+
__exportStar(require("./user-claims"), exports);
|
|
30
|
+
__exportStar(require("./common"), exports);
|
|
31
|
+
__exportStar(require("./open-api-server"), exports);
|
|
32
|
+
__exportStar(require("./marker"), exports);
|
|
33
|
+
__exportStar(require("./code-walkthrough"), exports);
|
|
34
|
+
__exportStar(require("./telemetry"), exports);
|
|
35
35
|
//# sourceMappingURL=index.js.map
|
package/lib/core/types/l10n.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { TOptions } from 'i18next';
|
|
2
|
-
export type TranslationKey = 'dev.newApp' | 'dev.newApp.text' | 'dev.sidebar.header' | 'dev.sidebar.footer.text' | 'dev.create.app.dialog.appName.placeholder' | 'dev.create.app.dialog.appName.error' | 'dev.create.app.dialog.selectAPIs' | 'dev.create.app.dialog.description' | 'dev.create.app.dialog.description.placeholder' | 'dev.create.app.dialog.create' | 'dev.create.app.dialog.cancel' | 'dev.main.tab.appKeys' | 'dev.main.tab.logs' | 'dev.app.description.title' | 'dev.edit.description.dialog.title' | 'dev.edit.description.dialog.save' | 'dev.edit.description.dialog.cancel' | 'dev.edit.apis.dialog.selectedAPIs' | 'dev.app.key.create' | 'dev.create.key.dialog.title' | 'dev.create.key.dialog.create' | 'dev.create.key.dialog.cancel' | 'dev.app.edit' | 'dev.app.delete' | 'dev.edit.app.dialog.title' | 'dev.edit.app.dialog.save' | 'dev.edit.app.dialog.cancel' | 'dev.delete.app.dialog.title' | 'dev.delete.app.dialog.confirmation' | 'dev.delete.app.dialog.delete' | 'dev.delete.app.dialog.cancel' | 'dev.app.key.roll' | 'dev.roll.key.dialog.title' | 'dev.roll.key.dialog.apiKey' | 'dev.roll.key.dialog.expires' | 'dev.roll.key.dialog.confirmation' | 'dev.roll.key.dialog.cancel' | 'dev.roll.key.dialog.roll' | 'dev.update.key.dialog.title' | 'dev.update.key.dialog.update' | 'dev.update.key.dialog.cancel' | 'dev.app.key.api.name' | 'dev.app.key.api.status' | 'dev.app.key.api.edit' | 'dev.edit.apis.dialog.title' | 'dev.edit.apis.dialog.apiKey' | 'dev.edit.apis.dialog.save' | 'dev.edit.apis.dialog.cancel' | 'dev.select.placeholder' | 'dev.app.overview.status.pending' | 'dev.app.overview.status.approved' | 'dev.app.overview.status.revoked' | 'dev.app.overview.status' | 'dev.app.overview.non-production' | 'dev.app.overview.production' | 'dev.app.overview.clientId' | 'dev.app.overview.apiKey' | 'dev.app.key.revoke' | 'dev.revoke.key.dialog.title' | 'dev.revoke.key.dialog.apiKey' | 'dev.revoke.key.dialog.expires' | 'dev.revoke.key.dialog.confirmation' | 'dev.revoke.key.dialog.revoke' | 'dev.revoke.key.dialog.cancel' | 'dev.app.overview.expires' | 'dev.app.overview.created' | 'dev.app.overview.visibilityToggle.hide' | 'dev.app.overview.visibilityToggle.show' | 'search.loading' | 'search.noResults.title' | 'search.keys.navigate' | 'search.keys.select' | 'search.keys.exit' | 'search.label' | 'search.cancel' | 'search.recent' | 'search.navbar.label' | 'search.suggested' | 'search.showMore' | 'search.filter.title' | 'search.filter.reset' | 'search.filter.field.reset' | 'search.ai.welcomeText' | 'search.ai.newConversation' | 'search.ai.backToSearch' | 'search.ai.placeholder' | 'search.ai.generatingResponse' | 'search.ai.followUpQuestion' | 'search.ai.suggestionsTitle' | 'search.ai.thinkingText' | 'search.ai.resourcesFound' | 'search.ai.resourcesFound.basedOn' | 'search.ai.resourcesFound.resources' | 'search.ai.button' | 'search.ai.label' | 'search.ai.disclaimer' | 'search.ai.error.description' | 'search.ai.error.description.forbidden' | 'search.ai.error.description.unauthorized' | 'search.ai.error.header' | 'search.ai.error.header.forbidden' | 'search.ai.error.header.unauthorized' | 'toc.header' | 'footer.copyrightText' | 'page.homeButton' | 'page.forbidden.title' | 'page.notFound.title' | 'page.notFound.description' | 'page.lastUpdated.timeago' | 'page.lastUpdated.on' | 'catalog.filters.placeholder' | 'catalog.filters.title' | 'catalog.filters.add' | 'catalog.filters.clearAll' | 'catalog.filters.select.addFilter' | 'catalog.filters.select.all' | 'catalog.filters.done' | 'catalog.catalogs.all.title' | 'catalog.catalogs.all.description' | 'catalog.catalogs.all.switcherLabel' | 'catalog.catalogs.service.title' | 'catalog.catalogs.service.description' | 'catalog.catalogs.service.switcherLabel' | 'catalog.catalogs.user.title' | 'catalog.catalogs.user.description' | 'catalog.catalogs.user.switcherLabel' | 'catalog.catalogs.team.title' | 'catalog.catalogs.team.description' | 'catalog.catalogs.team.switcherLabel' | 'catalog.catalogs.domain.title' | 'catalog.catalogs.domain.description' | 'catalog.catalogs.domain.switcherLabel' | 'catalog.catalogs.apiDescription.title' | 'catalog.catalogs.apiDescription.description' | 'catalog.catalogs.apiDescription.switcherLabel' | 'catalog.entity.metadata.title' | 'catalog.entity.properties.apiDescription.title' | 'sidebar.menu.backLabel' | 'sidebar.menu.backToLabel' | 'sidebar.actions.show' | 'sidebar.actions.hide' | 'sidebar.actions.changeLayout' | 'versionPicker.label' | 'versionPicker.unversioned' | 'codeSnippet.copy.buttonText' | 'codeSnippet.copy.tooltipText' | 'codeSnippet.copy.toasterText' | 'markdown.editPage.text' | 'feedback.settings.comment.submitText' | 'feedback.settings.comment.label' | 'feedback.settings.comment.send' | 'feedback.settings.comment.cancel' | 'feedback.settings.comment.satisfiedLabel' | 'feedback.settings.comment.neutralLabel' | 'feedback.settings.comment.dissatisfiedLabel' | 'feedback.settings.submitText' | 'feedback.settings.label' | 'feedback.settings.reasons.label' | 'feedback.submit' | 'feedback.cancel' | 'feedback.settings.comment.likeLabel' | 'feedback.settings.comment.dislikeLabel' | 'feedback.sentiment.thumbUp' | 'feedback.sentiment.thumbDown' | 'feedback.settings.leftScaleLabel' | 'feedback.settings.rightScaleLabel' | 'feedback.settings.optionalEmail.placeholder' | 'feedback.settings.optionalEmail.label' | 'codeSnippet.report.buttonText' | 'codeSnippet.report.tooltipText' | 'codeSnippet.report.label' | 'userMenu.login' | 'userMenu.logout' | 'userMenu.devOnboardingLabel' | 'mobileMenu.mainMenu' | 'mobileMenu.previous' | 'mobileMenu.products' | 'mobileMenu.version' | 'navbar.products' | 'page.nextButton' | 'page.previousButton' | 'openapi.download.description.title' | 'openapi.info.title' | 'openapi.info.contact.url' | 'openapi.info.contact.name' | 'openapi.info.license' | 'openapi.info.termsOfService' | 'openapi.info.metadata.title' | 'openapi.key' | 'openapi.value' | 'openapi.enum' | 'openapi.items' | 'openapi.default' | 'openapi.variable' | 'openapi.variables' | 'openapi.actions.show' | 'openapi.actions.hide' | 'openapi.actions.more' | 'openapi.languages.title' | 'openapi.servers.title' | 'openapi.operations' | 'openapi.webhooks' | 'openapi.description' | 'openapi.badges.deprecated' | 'openapi.badges.required' | 'openapi.badges.webhook' | 'openapi.request' | 'openapi.path' | 'openapi.query' | 'openapi.cookie' | 'openapi.header' | 'openapi.body' | 'openapi.responses' | 'openapi.response' | 'openapi.callbacks' | 'openapi.callbackRequest' | 'openapi.callbackResponse' | 'openapi.payload' | 'openapi.discriminator' | 'openapi.contentType' | 'openapi.tryIt' | 'openapi.loading' | 'openapi.example' | 'openapi.examples' | 'openapi.additionalProperties' | 'openapi.patternProperties' | 'openapi.required' | 'openapi.recursive' | 'openapi.complex' | 'openapi.hideExample' | 'openapi.showExample' | 'openapi.expandAll' | 'openapi.collapseAll' | 'openapi.viewSecurityDetails' | 'openapi.noResponseExample' | 'openapi.noResponseContent' | 'openapi.noRequestPayload' | 'openapi.hidePattern' | 'openapi.showPattern' | 'openapi.authorizationUrl' | 'openapi.tokenUrl' | 'openapi.refreshUrl' | 'openapi.showOptionalScopes' | 'openapi.hideOptionalScopes' | 'openapi.security' | 'openapi.httpAuthorizationScheme' | 'openapi.bearerFormat' | 'openapi.parameterName' | 'openapi.flowType' | 'openapi.connectUrl' | 'openapi.requiredScopes' | 'openapi.unsupportedLanguage' | 'openapi.failedToGenerateCodeSample' | 'asyncapi.download.description.title' | 'asyncapi.info.title' | 'graphql.queries' | 'graphql.mutations' | 'graphql.subscriptions' | 'graphql.directives' | 'graphql.objects' | 'graphql.interfaces' | 'graphql.unions' | 'graphql.enums' | 'graphql.inputs' | 'graphql.scalars' | 'graphql.arguments.label' | 'graphql.arguments.show' | 'graphql.arguments.hide' | 'graphql.arguments.here' | 'graphql.returnTypes.label' | 'graphql.returnTypes.show' | 'graphql.returnTypes.hide' | 'graphql.possibleTypes' | 'graphql.defaultValue' | 'graphql.deprecationReason' | 'graphql.implementedInterfaces' | 'graphql.nonNull' | 'graphql.required' | 'graphql.deprecated' | 'graphql.variables' | 'graphql.querySample' | 'graphql.mutationSample' | 'graphql.subscriptionSample' | 'graphql.responseSample' | 'graphql.locations' | 'graphql.sample' | 'graphql.referenced' | 'graphql.content.fragment' | 'codeWalkthrough.download' | 'codeWalkthrough.preview' | 'time.justNow' | 'time.past.second' | 'time.past.seconds' | 'time.past.minute' | 'time.past.minutes' | 'time.past.hour' | 'time.past.hours' | 'time.past.day' | 'time.past.days' | 'time.past.week' | 'time.past.weeks' | 'time.past.month' | 'time.past.months' | 'time.past.year' | 'time.past.years' | 'page.internalServerError.title' | 'page.internalServerError.description' | 'page.skipToContent.label';
|
|
2
|
+
export type TranslationKey = 'dev.newApp' | 'dev.newApp.text' | 'dev.sidebar.header' | 'dev.sidebar.footer.text' | 'dev.create.app.dialog.appName.placeholder' | 'dev.create.app.dialog.appName.error' | 'dev.create.app.dialog.selectAPIs' | 'dev.create.app.dialog.description' | 'dev.create.app.dialog.description.placeholder' | 'dev.create.app.dialog.create' | 'dev.create.app.dialog.cancel' | 'dev.main.tab.appKeys' | 'dev.main.tab.logs' | 'dev.app.description.title' | 'dev.edit.description.dialog.title' | 'dev.edit.description.dialog.save' | 'dev.edit.description.dialog.cancel' | 'dev.edit.apis.dialog.selectedAPIs' | 'dev.app.key.create' | 'dev.create.key.dialog.title' | 'dev.create.key.dialog.create' | 'dev.create.key.dialog.cancel' | 'dev.app.edit' | 'dev.app.delete' | 'dev.edit.app.dialog.title' | 'dev.edit.app.dialog.save' | 'dev.edit.app.dialog.cancel' | 'dev.delete.app.dialog.title' | 'dev.delete.app.dialog.confirmation' | 'dev.delete.app.dialog.delete' | 'dev.delete.app.dialog.cancel' | 'dev.app.key.roll' | 'dev.roll.key.dialog.title' | 'dev.roll.key.dialog.apiKey' | 'dev.roll.key.dialog.expires' | 'dev.roll.key.dialog.confirmation' | 'dev.roll.key.dialog.cancel' | 'dev.roll.key.dialog.roll' | 'dev.update.key.dialog.title' | 'dev.update.key.dialog.update' | 'dev.update.key.dialog.cancel' | 'dev.app.key.api.name' | 'dev.app.key.api.status' | 'dev.app.key.api.edit' | 'dev.edit.apis.dialog.title' | 'dev.edit.apis.dialog.apiKey' | 'dev.edit.apis.dialog.save' | 'dev.edit.apis.dialog.cancel' | 'dev.select.placeholder' | 'dev.app.overview.status.pending' | 'dev.app.overview.status.approved' | 'dev.app.overview.status.revoked' | 'dev.app.overview.status' | 'dev.app.overview.non-production' | 'dev.app.overview.production' | 'dev.app.overview.clientId' | 'dev.app.overview.apiKey' | 'dev.app.key.revoke' | 'dev.revoke.key.dialog.title' | 'dev.revoke.key.dialog.apiKey' | 'dev.revoke.key.dialog.expires' | 'dev.revoke.key.dialog.confirmation' | 'dev.revoke.key.dialog.revoke' | 'dev.revoke.key.dialog.cancel' | 'dev.app.overview.expires' | 'dev.app.overview.created' | 'dev.app.overview.visibilityToggle.hide' | 'dev.app.overview.visibilityToggle.show' | 'search.loading' | 'search.noResults.title' | 'search.keys.navigate' | 'search.keys.select' | 'search.keys.exit' | 'search.label' | 'search.cancel' | 'search.recent' | 'search.navbar.label' | 'search.suggested' | 'search.showMore' | 'search.filter.title' | 'search.filter.reset' | 'search.filter.field.reset' | 'search.ai.welcomeText' | 'search.ai.newConversation' | 'search.ai.backToSearch' | 'search.ai.placeholder' | 'search.ai.generatingResponse' | 'search.ai.followUpQuestion' | 'search.ai.suggestionsTitle' | 'search.ai.thinkingText' | 'search.ai.resourcesFound' | 'search.ai.resourcesFound.basedOn' | 'search.ai.resourcesFound.resources' | 'search.ai.button' | 'search.ai.label' | 'search.ai.disclaimer' | 'search.ai.error.description' | 'search.ai.error.description.forbidden' | 'search.ai.error.description.unauthorized' | 'search.ai.error.header' | 'search.ai.error.header.forbidden' | 'search.ai.error.header.unauthorized' | 'toc.header' | 'footer.copyrightText' | 'page.homeButton' | 'page.forbidden.title' | 'page.notFound.title' | 'page.notFound.description' | 'page.lastUpdated.timeago' | 'page.lastUpdated.on' | 'catalog.filters.placeholder' | 'catalog.filters.title' | 'catalog.filters.add' | 'catalog.filters.clearAll' | 'catalog.filters.select.addFilter' | 'catalog.filters.select.all' | 'catalog.filters.done' | 'catalog.catalogs.all.title' | 'catalog.catalogs.all.description' | 'catalog.catalogs.all.switcherLabel' | 'catalog.catalogs.service.title' | 'catalog.catalogs.service.description' | 'catalog.catalogs.service.switcherLabel' | 'catalog.catalogs.user.title' | 'catalog.catalogs.user.description' | 'catalog.catalogs.user.switcherLabel' | 'catalog.catalogs.team.title' | 'catalog.catalogs.team.description' | 'catalog.catalogs.team.switcherLabel' | 'catalog.catalogs.domain.title' | 'catalog.catalogs.domain.description' | 'catalog.catalogs.domain.switcherLabel' | 'catalog.catalogs.apiDescription.title' | 'catalog.catalogs.apiDescription.description' | 'catalog.catalogs.apiDescription.switcherLabel' | 'catalog.catalogs.dataSchema.title' | 'catalog.catalogs.dataSchema.description' | 'catalog.catalogs.dataSchema.switcherLabel' | 'catalog.entity.metadata.title' | 'catalog.entity.schema.title' | 'catalog.entity.properties.apiDescription.title' | 'sidebar.menu.backLabel' | 'sidebar.menu.backToLabel' | 'sidebar.actions.show' | 'sidebar.actions.hide' | 'sidebar.actions.changeLayout' | 'versionPicker.label' | 'versionPicker.unversioned' | 'codeSnippet.copy.buttonText' | 'codeSnippet.copy.tooltipText' | 'codeSnippet.copy.toasterText' | 'markdown.editPage.text' | 'feedback.settings.comment.submitText' | 'feedback.settings.comment.label' | 'feedback.settings.comment.send' | 'feedback.settings.comment.cancel' | 'feedback.settings.comment.satisfiedLabel' | 'feedback.settings.comment.neutralLabel' | 'feedback.settings.comment.dissatisfiedLabel' | 'feedback.settings.submitText' | 'feedback.settings.label' | 'feedback.settings.reasons.label' | 'feedback.submit' | 'feedback.cancel' | 'feedback.settings.comment.likeLabel' | 'feedback.settings.comment.dislikeLabel' | 'feedback.sentiment.thumbUp' | 'feedback.sentiment.thumbDown' | 'feedback.settings.leftScaleLabel' | 'feedback.settings.rightScaleLabel' | 'feedback.settings.optionalEmail.placeholder' | 'feedback.settings.optionalEmail.label' | 'codeSnippet.report.buttonText' | 'codeSnippet.report.tooltipText' | 'codeSnippet.report.label' | 'userMenu.login' | 'userMenu.logout' | 'userMenu.devOnboardingLabel' | 'mobileMenu.mainMenu' | 'mobileMenu.previous' | 'mobileMenu.products' | 'mobileMenu.version' | 'navbar.products' | 'page.nextButton' | 'page.previousButton' | 'openapi.download.description.title' | 'openapi.info.title' | 'openapi.info.contact.url' | 'openapi.info.contact.name' | 'openapi.info.license' | 'openapi.info.termsOfService' | 'openapi.info.metadata.title' | 'openapi.key' | 'openapi.value' | 'openapi.enum' | 'openapi.items' | 'openapi.default' | 'openapi.variable' | 'openapi.variables' | 'openapi.actions.show' | 'openapi.actions.hide' | 'openapi.actions.more' | 'openapi.languages.title' | 'openapi.servers.title' | 'openapi.operations' | 'openapi.webhooks' | 'openapi.description' | 'openapi.badges.deprecated' | 'openapi.badges.required' | 'openapi.badges.webhook' | 'openapi.request' | 'openapi.path' | 'openapi.query' | 'openapi.cookie' | 'openapi.header' | 'openapi.body' | 'openapi.responses' | 'openapi.response' | 'openapi.callbacks' | 'openapi.callbackRequest' | 'openapi.callbackResponse' | 'openapi.payload' | 'openapi.discriminator' | 'openapi.contentType' | 'openapi.tryIt' | 'openapi.loading' | 'openapi.example' | 'openapi.examples' | 'openapi.additionalProperties' | 'openapi.patternProperties' | 'openapi.required' | 'openapi.recursive' | 'openapi.complex' | 'openapi.hideExample' | 'openapi.showExample' | 'openapi.expandAll' | 'openapi.collapseAll' | 'openapi.viewSecurityDetails' | 'openapi.noResponseExample' | 'openapi.noResponseContent' | 'openapi.noRequestPayload' | 'openapi.hidePattern' | 'openapi.showPattern' | 'openapi.authorizationUrl' | 'openapi.tokenUrl' | 'openapi.refreshUrl' | 'openapi.showOptionalScopes' | 'openapi.hideOptionalScopes' | 'openapi.security' | 'openapi.httpAuthorizationScheme' | 'openapi.bearerFormat' | 'openapi.parameterName' | 'openapi.flowType' | 'openapi.connectUrl' | 'openapi.requiredScopes' | 'openapi.unsupportedLanguage' | 'openapi.failedToGenerateCodeSample' | 'asyncapi.download.description.title' | 'asyncapi.info.title' | 'graphql.queries' | 'graphql.mutations' | 'graphql.subscriptions' | 'graphql.directives' | 'graphql.objects' | 'graphql.interfaces' | 'graphql.unions' | 'graphql.enums' | 'graphql.inputs' | 'graphql.scalars' | 'graphql.arguments.label' | 'graphql.arguments.show' | 'graphql.arguments.hide' | 'graphql.arguments.here' | 'graphql.returnTypes.label' | 'graphql.returnTypes.show' | 'graphql.returnTypes.hide' | 'graphql.possibleTypes' | 'graphql.defaultValue' | 'graphql.deprecationReason' | 'graphql.implementedInterfaces' | 'graphql.nonNull' | 'graphql.required' | 'graphql.deprecated' | 'graphql.variables' | 'graphql.querySample' | 'graphql.mutationSample' | 'graphql.subscriptionSample' | 'graphql.responseSample' | 'graphql.locations' | 'graphql.sample' | 'graphql.referenced' | 'graphql.content.fragment' | 'codeWalkthrough.download' | 'codeWalkthrough.preview' | 'time.justNow' | 'time.past.second' | 'time.past.seconds' | 'time.past.minute' | 'time.past.minutes' | 'time.past.hour' | 'time.past.hours' | 'time.past.day' | 'time.past.days' | 'time.past.week' | 'time.past.weeks' | 'time.past.month' | 'time.past.months' | 'time.past.year' | 'time.past.years' | 'page.internalServerError.title' | 'page.internalServerError.description' | 'page.skipToContent.label';
|
|
3
3
|
export type Locale = {
|
|
4
4
|
code: string;
|
|
5
5
|
name: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ItemBadge, REDOCLY_ROUTE_RBAC } from '@redocly/config';
|
|
2
2
|
import type { ProductConfig } from '../../config';
|
|
3
|
-
import type { AiSearchConversationRole } from '
|
|
3
|
+
import type { AiSearchConversationRole } from '../constants/search';
|
|
4
4
|
export type OperationParameter = {
|
|
5
5
|
name: string | string[];
|
|
6
6
|
description: string | string[];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { REDOCLY_TEAMS_RBAC, REDOCLY_ROUTE_RBAC, MenuStyle, RbacScopeItems, ItemBadge } from '@redocly/config';
|
|
2
|
-
import type { MenuItemType } from '
|
|
2
|
+
import type { MenuItemType } from '../constants/common';
|
|
3
3
|
export type { MenuStyle } from '@redocly/config';
|
|
4
4
|
export type SidebarNavItem = {
|
|
5
5
|
label?: string;
|
|
@@ -15,21 +15,23 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
15
15
|
exports.downloadCodeWalkthrough = downloadCodeWalkthrough;
|
|
16
16
|
const file_saver_1 = require("file-saver");
|
|
17
17
|
const jszip_1 = __importDefault(require("jszip"));
|
|
18
|
-
const
|
|
18
|
+
const urls_1 = require("./urls");
|
|
19
|
+
const find_closest_common_directory_1 = require("./find-closest-common-directory");
|
|
20
|
+
const get_code_walkthrough_file_text_1 = require("./get-code-walkthrough-file-text");
|
|
19
21
|
// https://github.com/Stuk/jszip/issues/196#issuecomment-69503828
|
|
20
22
|
jszip_1.default.support.nodebuffer = false;
|
|
21
23
|
function downloadCodeWalkthrough(files, state, inputsState) {
|
|
22
24
|
return __awaiter(this, void 0, void 0, function* () {
|
|
23
25
|
const zip = new jszip_1.default();
|
|
24
26
|
const filePaths = files.map(({ path }) => path);
|
|
25
|
-
const commonClosestDirectory = (0,
|
|
27
|
+
const commonClosestDirectory = (0, find_closest_common_directory_1.findClosestCommonDirectory)(filePaths);
|
|
26
28
|
for (const file of files) {
|
|
27
|
-
const fileContent = (0,
|
|
29
|
+
const fileContent = (0, get_code_walkthrough_file_text_1.getCodeWalkthroughFileText)(file, state, inputsState);
|
|
28
30
|
if (commonClosestDirectory === '/') {
|
|
29
31
|
zip.file(file.path, fileContent);
|
|
30
32
|
}
|
|
31
33
|
else {
|
|
32
|
-
const filePath = file.path.replace((0,
|
|
34
|
+
const filePath = file.path.replace((0, urls_1.removeLeadingSlash)(`${commonClosestDirectory}/`), '');
|
|
33
35
|
zip.file(filePath, fileContent);
|
|
34
36
|
}
|
|
35
37
|
}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getCodeWalkthroughFileText = getCodeWalkthroughFileText;
|
|
4
|
-
const
|
|
4
|
+
const match_code_walkthrough_conditions_1 = require("./match-code-walkthrough-conditions");
|
|
5
|
+
const replace_inputs_with_value_1 = require("./replace-inputs-with-value");
|
|
5
6
|
function getCodeWalkthroughFileText(file, state, inputsState) {
|
|
6
7
|
var _a;
|
|
7
8
|
const contentChunks = (_a = file === null || file === void 0 ? void 0 : file.content.flatMap((node) => getChunkText(node, state, inputsState))) !== null && _a !== void 0 ? _a : [];
|
|
@@ -9,11 +10,11 @@ function getCodeWalkthroughFileText(file, state, inputsState) {
|
|
|
9
10
|
}
|
|
10
11
|
function getChunkText(node, state, inputsState) {
|
|
11
12
|
if (typeof node === 'string') {
|
|
12
|
-
const replacedNode = (0,
|
|
13
|
+
const replacedNode = (0, replace_inputs_with_value_1.replaceInputsWithValue)(node, inputsState);
|
|
13
14
|
return [replacedNode];
|
|
14
15
|
}
|
|
15
16
|
else {
|
|
16
|
-
if (!(0,
|
|
17
|
+
if (!(0, match_code_walkthrough_conditions_1.matchCodeWalkthroughConditions)(node.condition || {}, state)) {
|
|
17
18
|
return [];
|
|
18
19
|
}
|
|
19
20
|
return node.children.flatMap((child) => getChunkText(child, state, inputsState));
|
|
@@ -1,35 +1,35 @@
|
|
|
1
|
-
export * from '
|
|
2
|
-
export * from '
|
|
3
|
-
export * from '
|
|
4
|
-
export * from '
|
|
5
|
-
export * from '
|
|
6
|
-
export * from '
|
|
7
|
-
export * from '
|
|
8
|
-
export * from '
|
|
9
|
-
export * from '
|
|
10
|
-
export * from '
|
|
11
|
-
export * from '
|
|
12
|
-
export * from '
|
|
13
|
-
export * from '
|
|
14
|
-
export * from '
|
|
15
|
-
export * from '
|
|
16
|
-
export * from '
|
|
17
|
-
export * from '
|
|
18
|
-
export * from '
|
|
19
|
-
export * from '
|
|
20
|
-
export * from '
|
|
21
|
-
export * from '
|
|
22
|
-
export * from '
|
|
23
|
-
export * from '
|
|
24
|
-
export * from '
|
|
25
|
-
export * from '
|
|
26
|
-
export * from '
|
|
27
|
-
export * from '
|
|
28
|
-
export * from '
|
|
29
|
-
export * from '
|
|
30
|
-
export * from '
|
|
31
|
-
export * from '
|
|
32
|
-
export * from '
|
|
33
|
-
export * from '
|
|
34
|
-
export * from '
|
|
35
|
-
export * from '
|
|
1
|
+
export * from './clipboard-service';
|
|
2
|
+
export * from './css-variables';
|
|
3
|
+
export * from './add-line-numbers';
|
|
4
|
+
export * from './media-css';
|
|
5
|
+
export * from './theme-helpers';
|
|
6
|
+
export * from './class-names';
|
|
7
|
+
export * from './args-typecheck';
|
|
8
|
+
export * from './color';
|
|
9
|
+
export * from './urls';
|
|
10
|
+
export * from './js-utils';
|
|
11
|
+
export * from './tags-parser';
|
|
12
|
+
export * from './text-transform';
|
|
13
|
+
export * from './dom';
|
|
14
|
+
export * from './markdoc';
|
|
15
|
+
export * from './attribute-parser';
|
|
16
|
+
export * from './type-guards';
|
|
17
|
+
export * from './dom';
|
|
18
|
+
export * from './toc';
|
|
19
|
+
export * from './menu';
|
|
20
|
+
export * from './load-and-navigate';
|
|
21
|
+
export * from './get-scorecard-color-variable';
|
|
22
|
+
export * from './change-text-casing';
|
|
23
|
+
export * from './format-date-without-timezone';
|
|
24
|
+
export * from './details';
|
|
25
|
+
export * from './get-navbar-element';
|
|
26
|
+
export * from './with-load-progress';
|
|
27
|
+
export * from './text-trimmer';
|
|
28
|
+
export * from './get-code-walkthrough-file-text';
|
|
29
|
+
export * from './download-code-walkthrough';
|
|
30
|
+
export * from './get-file-icon';
|
|
31
|
+
export * from './match-code-walkthrough-conditions';
|
|
32
|
+
export * from './replace-inputs-with-value';
|
|
33
|
+
export * from './find-closest-common-directory';
|
|
34
|
+
export * from './get-user-agent';
|
|
35
|
+
export * from './parse-style-string';
|
package/lib/core/utils/index.js
CHANGED
|
@@ -14,39 +14,39 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("
|
|
18
|
-
__exportStar(require("
|
|
19
|
-
__exportStar(require("
|
|
20
|
-
__exportStar(require("
|
|
21
|
-
__exportStar(require("
|
|
22
|
-
__exportStar(require("
|
|
23
|
-
__exportStar(require("
|
|
24
|
-
__exportStar(require("
|
|
25
|
-
__exportStar(require("
|
|
26
|
-
__exportStar(require("
|
|
27
|
-
__exportStar(require("
|
|
28
|
-
__exportStar(require("
|
|
29
|
-
__exportStar(require("
|
|
30
|
-
__exportStar(require("
|
|
31
|
-
__exportStar(require("
|
|
32
|
-
__exportStar(require("
|
|
33
|
-
__exportStar(require("
|
|
34
|
-
__exportStar(require("
|
|
35
|
-
__exportStar(require("
|
|
36
|
-
__exportStar(require("
|
|
37
|
-
__exportStar(require("
|
|
38
|
-
__exportStar(require("
|
|
39
|
-
__exportStar(require("
|
|
40
|
-
__exportStar(require("
|
|
41
|
-
__exportStar(require("
|
|
42
|
-
__exportStar(require("
|
|
43
|
-
__exportStar(require("
|
|
44
|
-
__exportStar(require("
|
|
45
|
-
__exportStar(require("
|
|
46
|
-
__exportStar(require("
|
|
47
|
-
__exportStar(require("
|
|
48
|
-
__exportStar(require("
|
|
49
|
-
__exportStar(require("
|
|
50
|
-
__exportStar(require("
|
|
51
|
-
__exportStar(require("
|
|
17
|
+
__exportStar(require("./clipboard-service"), exports);
|
|
18
|
+
__exportStar(require("./css-variables"), exports);
|
|
19
|
+
__exportStar(require("./add-line-numbers"), exports);
|
|
20
|
+
__exportStar(require("./media-css"), exports);
|
|
21
|
+
__exportStar(require("./theme-helpers"), exports);
|
|
22
|
+
__exportStar(require("./class-names"), exports);
|
|
23
|
+
__exportStar(require("./args-typecheck"), exports);
|
|
24
|
+
__exportStar(require("./color"), exports);
|
|
25
|
+
__exportStar(require("./urls"), exports);
|
|
26
|
+
__exportStar(require("./js-utils"), exports);
|
|
27
|
+
__exportStar(require("./tags-parser"), exports);
|
|
28
|
+
__exportStar(require("./text-transform"), exports);
|
|
29
|
+
__exportStar(require("./dom"), exports);
|
|
30
|
+
__exportStar(require("./markdoc"), exports);
|
|
31
|
+
__exportStar(require("./attribute-parser"), exports);
|
|
32
|
+
__exportStar(require("./type-guards"), exports);
|
|
33
|
+
__exportStar(require("./dom"), exports);
|
|
34
|
+
__exportStar(require("./toc"), exports);
|
|
35
|
+
__exportStar(require("./menu"), exports);
|
|
36
|
+
__exportStar(require("./load-and-navigate"), exports);
|
|
37
|
+
__exportStar(require("./get-scorecard-color-variable"), exports);
|
|
38
|
+
__exportStar(require("./change-text-casing"), exports);
|
|
39
|
+
__exportStar(require("./format-date-without-timezone"), exports);
|
|
40
|
+
__exportStar(require("./details"), exports);
|
|
41
|
+
__exportStar(require("./get-navbar-element"), exports);
|
|
42
|
+
__exportStar(require("./with-load-progress"), exports);
|
|
43
|
+
__exportStar(require("./text-trimmer"), exports);
|
|
44
|
+
__exportStar(require("./get-code-walkthrough-file-text"), exports);
|
|
45
|
+
__exportStar(require("./download-code-walkthrough"), exports);
|
|
46
|
+
__exportStar(require("./get-file-icon"), exports);
|
|
47
|
+
__exportStar(require("./match-code-walkthrough-conditions"), exports);
|
|
48
|
+
__exportStar(require("./replace-inputs-with-value"), exports);
|
|
49
|
+
__exportStar(require("./find-closest-common-directory"), exports);
|
|
50
|
+
__exportStar(require("./get-user-agent"), exports);
|
|
51
|
+
__exportStar(require("./parse-style-string"), exports);
|
|
52
52
|
//# sourceMappingURL=index.js.map
|
|
@@ -10,7 +10,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.loadAndNavigate = loadAndNavigate;
|
|
13
|
-
const
|
|
13
|
+
const with_load_progress_1 = require("./with-load-progress");
|
|
14
14
|
let lastNavigatedPath;
|
|
15
15
|
// this is copy from portal/src/client/app/utils/loadAndNavigate.ts, for case when we need to run Redoc without Realm
|
|
16
16
|
function loadAndNavigate(_a) {
|
|
@@ -20,7 +20,7 @@ function loadAndNavigate(_a) {
|
|
|
20
20
|
const { pathname, hash, search } = new URL(to, window.location.origin + window.location.pathname);
|
|
21
21
|
// use window-shared loader instead of importing to prevent circular import issue
|
|
22
22
|
const loader = window['__LOADER'];
|
|
23
|
-
const result = yield (0,
|
|
23
|
+
const result = yield (0, with_load_progress_1.withLoadProgress)(loader.tryLoad(pathname));
|
|
24
24
|
// @ts-ignore
|
|
25
25
|
if (result === null || result === void 0 ? void 0 : result.redirectTo) {
|
|
26
26
|
// @ts-ignore
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.matchCodeWalkthroughConditions = matchCodeWalkthroughConditions;
|
|
4
|
-
const
|
|
4
|
+
const type_guards_1 = require("./type-guards");
|
|
5
5
|
function matchCodeWalkthroughConditions(conditions = {}, state) {
|
|
6
6
|
const { when, unless } = conditions;
|
|
7
7
|
function evaluateCondition(key, value) {
|
|
@@ -12,10 +12,10 @@ function matchCodeWalkthroughConditions(conditions = {}, state) {
|
|
|
12
12
|
}
|
|
13
13
|
return stateValue === value;
|
|
14
14
|
}
|
|
15
|
-
const matchesWhen = (0,
|
|
15
|
+
const matchesWhen = (0, type_guards_1.isObject)(when)
|
|
16
16
|
? Object.entries(when).every(([key, value]) => evaluateCondition(key, value))
|
|
17
17
|
: true;
|
|
18
|
-
const matchesUnless = (0,
|
|
18
|
+
const matchesUnless = (0, type_guards_1.isObject)(unless)
|
|
19
19
|
? Object.entries(unless).some(([key, value]) => evaluateCondition(key, value))
|
|
20
20
|
: false;
|
|
21
21
|
return matchesWhen && !matchesUnless;
|
package/lib/core/utils/menu.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import type { ResolvedNavItem, Version } from '@redocly/config';
|
|
2
2
|
import type { Location } from 'react-router-dom';
|
|
3
|
-
import { type Locale, type TFunction
|
|
4
|
-
import {
|
|
3
|
+
import { type Locale, type TFunction } from '../types/l10n';
|
|
4
|
+
import { type ItemState } from '../types/sidebar';
|
|
5
|
+
import { MenuItemType } from '../constants/common';
|
|
5
6
|
export declare const mapNavbarItems: (items: ResolvedNavItem[], defaultLocale: string, currentLocale: string, locales: Locale[], location: Location) => ItemState[];
|
|
6
7
|
export declare const isItemActive: (item: ResolvedNavItem, defaultLocale: string, currentLocale: string, locales: Locale[], location: Location) => boolean;
|
|
7
8
|
export declare const buildLanguagesGroup: (locales: Locale[], defaultLocale: string, currentLocale: string) => ResolvedNavItem | undefined;
|
package/lib/core/utils/menu.js
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.buildVersionSection = exports.buildLanguagesGroup = exports.isItemActive = exports.mapNavbarItems = void 0;
|
|
4
4
|
exports.getMenuItemType = getMenuItemType;
|
|
5
|
-
const
|
|
6
|
-
const
|
|
5
|
+
const common_1 = require("../constants/common");
|
|
6
|
+
const urls_1 = require("./urls");
|
|
7
7
|
const TRANSLATION_KEYS = {
|
|
8
8
|
version: 'mobileMenu.version',
|
|
9
9
|
};
|
|
@@ -21,8 +21,8 @@ const isItemActive = (item, defaultLocale, currentLocale, locales, location) =>
|
|
|
21
21
|
const pathHash = location.pathname + location.hash;
|
|
22
22
|
const link = item.languageInsensitive
|
|
23
23
|
? item.link || ''
|
|
24
|
-
: (0,
|
|
25
|
-
return pathHash === (0,
|
|
24
|
+
: (0, urls_1.getPathnameForLocale)(item.link || '/', defaultLocale, currentLocale, locales);
|
|
25
|
+
return pathHash === (0, urls_1.withPathPrefix)(link);
|
|
26
26
|
};
|
|
27
27
|
exports.isItemActive = isItemActive;
|
|
28
28
|
const buildLanguagesGroup = (locales, defaultLocale, currentLocale) => {
|
|
@@ -36,7 +36,7 @@ const buildLanguagesGroup = (locales, defaultLocale, currentLocale) => {
|
|
|
36
36
|
items: locales
|
|
37
37
|
.filter((locale) => locale.code !== currentLocale)
|
|
38
38
|
.map((locale) => {
|
|
39
|
-
const newLangPathname = (0,
|
|
39
|
+
const newLangPathname = (0, urls_1.getPathnameForLocale)((0, urls_1.withoutPathPrefix)(location.pathname), defaultLocale, locale.code, locales);
|
|
40
40
|
const newUrlWithLanguage = `${newLangPathname}${location.search}${location.hash}`;
|
|
41
41
|
return {
|
|
42
42
|
type: 'link',
|
|
@@ -76,19 +76,19 @@ const buildVersionSection = (translate, versions, activeVersion) => {
|
|
|
76
76
|
exports.buildVersionSection = buildVersionSection;
|
|
77
77
|
function getMenuItemType(item) {
|
|
78
78
|
var _a, _b;
|
|
79
|
-
if (item.type ===
|
|
80
|
-
return
|
|
79
|
+
if (item.type === common_1.MenuItemType.Separator) {
|
|
80
|
+
return common_1.MenuItemType.Separator;
|
|
81
81
|
}
|
|
82
82
|
else if (item.menuStyle === 'drilldown') {
|
|
83
|
-
return
|
|
83
|
+
return common_1.MenuItemType.DrillDown;
|
|
84
84
|
}
|
|
85
|
-
else if (((_a = item.items) === null || _a === void 0 ? void 0 : _a.length) || (item.type ===
|
|
86
|
-
return
|
|
85
|
+
else if (((_a = item.items) === null || _a === void 0 ? void 0 : _a.length) || (item.type === common_1.MenuItemType.Group && ((_b = item.items) === null || _b === void 0 ? void 0 : _b.length))) {
|
|
86
|
+
return common_1.MenuItemType.Group;
|
|
87
87
|
}
|
|
88
88
|
else if (item.httpVerb) {
|
|
89
|
-
return
|
|
89
|
+
return common_1.MenuItemType.Operation;
|
|
90
90
|
}
|
|
91
91
|
else
|
|
92
|
-
return
|
|
92
|
+
return common_1.MenuItemType.Default;
|
|
93
93
|
}
|
|
94
94
|
//# sourceMappingURL=menu.js.map
|
package/lib/core/utils/toc.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { MdHeading } from '
|
|
1
|
+
import type { MdHeading } from '../types/markdown';
|
|
2
2
|
export declare function getDisplayedHeadings(headings: Array<MdHeading | null> | null | undefined, tocDepth: number): Array<MdHeading | null>;
|
|
3
3
|
export declare function getDisplayedHeadingsIds(headings: Array<MdHeading | null> | null | undefined): Array<string | undefined>;
|
|
4
4
|
export declare function getLeastDepth(headings: Array<MdHeading | null> | null | undefined): number;
|
|
@@ -3,7 +3,7 @@ export declare function isUndefined<T>(value: T | undefined): value is undefined
|
|
|
3
3
|
export declare function isNull<T>(value: T | null): value is null;
|
|
4
4
|
export declare function isString<T>(value: T | string): value is string;
|
|
5
5
|
export declare function isNotNull<T>(value: T): value is NonNullable<T>;
|
|
6
|
-
export declare
|
|
6
|
+
export declare function isObject(item: unknown): item is object;
|
|
7
7
|
export declare const isNavLinkItem: (item: ResolvedNavItem) => item is ResolvedNavLinkItem;
|
|
8
8
|
export declare const isFromToSelectedOptions: (options: unknown) => options is {
|
|
9
9
|
from: string;
|