@redocly/theme 0.56.0 → 0.57.0-next.1
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/CatalogEntities.js +1 -1
- package/lib/components/Dropdown/Dropdown.d.ts +2 -1
- package/lib/components/Dropdown/Dropdown.js +3 -2
- package/lib/components/Dropdown/variables.js +1 -1
- package/lib/core/hooks/__mocks__/search/use-recent-searches.d.ts +2 -2
- package/lib/core/hooks/__mocks__/search/use-recent-searches.js +2 -1
- package/lib/core/hooks/__mocks__/search/use-search-filter.d.ts +2 -2
- package/lib/core/hooks/__mocks__/search/use-search-filter.js +2 -1
- package/lib/core/hooks/__mocks__/search/use-suggested-pages.d.ts +2 -2
- package/lib/core/hooks/__mocks__/search/use-suggested-pages.js +2 -1
- package/lib/core/hooks/__mocks__/use-controlled-state.d.ts +1 -1
- package/lib/core/hooks/__mocks__/use-controlled-state.js +2 -1
- package/lib/core/hooks/__mocks__/use-input-key-commands.d.ts +3 -3
- package/lib/core/hooks/__mocks__/use-input-key-commands.js +3 -2
- package/lib/core/hooks/__mocks__/use-mobile-menu.d.ts +1 -1
- package/lib/core/hooks/__mocks__/use-mobile-menu.js +2 -1
- package/lib/core/hooks/__mocks__/use-theme-config.d.ts +2 -2
- package/lib/core/hooks/__mocks__/use-theme-config.js +2 -1
- package/lib/core/hooks/__mocks__/use-theme-hooks.d.ts +47 -47
- package/lib/core/hooks/__mocks__/use-theme-hooks.js +38 -37
- package/lib/core/hooks/__mocks__/use-time-ago.d.ts +2 -2
- package/lib/core/hooks/__mocks__/use-time-ago.js +2 -1
- package/lib/core/hooks/catalog/useCatalogEntities.js +6 -4
- package/lib/core/hooks/code-walkthrough/__mocks__/MockIntersectionObserver.js +4 -3
- package/lib/core/hooks/menu/__mocks__/use-mobile-menu-items.d.ts +1 -1
- package/lib/core/hooks/menu/__mocks__/use-mobile-menu-items.js +2 -1
- package/lib/core/hooks/use-page-actions.js +5 -1
- package/lib/core/types/l10n.d.ts +1 -1
- package/lib/core/types/user-claims.d.ts +2 -0
- package/lib/core/utils/dynamic.d.ts +7 -0
- package/lib/core/utils/dynamic.js +59 -0
- package/lib/core/utils/index.d.ts +1 -0
- package/lib/core/utils/index.js +1 -0
- package/lib/icons/GenericIcon/GenericIcon.d.ts +2 -2
- package/lib/icons/GenericIcon/GenericIcon.js +8 -3
- package/lib/icons/__tests__/IconTestUtils.d.ts +0 -1
- package/lib/icons/__tests__/IconTestUtils.js +8 -7
- package/package.json +11 -15
- package/src/components/Catalog/CatalogEntities.tsx +1 -1
- package/src/components/Dropdown/Dropdown.tsx +4 -1
- package/src/components/Dropdown/variables.ts +1 -1
- package/src/core/hooks/__mocks__/search/use-recent-searches.ts +3 -1
- package/src/core/hooks/__mocks__/search/use-search-filter.ts +3 -1
- package/src/core/hooks/__mocks__/search/use-suggested-pages.ts +3 -1
- package/src/core/hooks/__mocks__/use-controlled-state.ts +3 -1
- package/src/core/hooks/__mocks__/use-input-key-commands.ts +4 -2
- package/src/core/hooks/__mocks__/use-mobile-menu.ts +3 -1
- package/src/core/hooks/__mocks__/use-theme-config.ts +3 -1
- package/src/core/hooks/__mocks__/use-theme-hooks.ts +39 -37
- package/src/core/hooks/__mocks__/use-time-ago.ts +3 -1
- package/src/core/hooks/catalog/useCatalogEntities.ts +7 -4
- package/src/core/hooks/code-walkthrough/__mocks__/MockIntersectionObserver.ts +5 -3
- package/src/core/hooks/menu/__mocks__/use-mobile-menu-items.ts +3 -1
- package/src/core/hooks/use-page-actions.ts +5 -1
- package/src/core/types/l10n.ts +2 -0
- package/src/core/types/user-claims.ts +2 -0
- package/src/core/utils/dynamic.tsx +83 -0
- package/src/core/utils/index.ts +1 -0
- package/src/icons/GenericIcon/GenericIcon.tsx +13 -4
- package/src/icons/__tests__/IconTestUtils.tsx +5 -4
|
@@ -43,7 +43,7 @@ function CatalogEntities(props) {
|
|
|
43
43
|
const { items: entities, query, total, } = useFetchCatalogEntities({
|
|
44
44
|
limit: LOAD_MORE_THRESHOLD,
|
|
45
45
|
filter: initialFilter && filterQuery
|
|
46
|
-
?
|
|
46
|
+
? `(${initialFilter}) AND (${filterQuery})`
|
|
47
47
|
: initialFilter || filterQuery,
|
|
48
48
|
sort: sortOption || undefined,
|
|
49
49
|
search: searchQuery,
|
|
@@ -11,5 +11,6 @@ export type DropdownProps = PropsWithChildren<{
|
|
|
11
11
|
className?: string;
|
|
12
12
|
withArrow?: boolean;
|
|
13
13
|
onClick?: (event: React.UIEvent) => void;
|
|
14
|
+
onClose?: () => void;
|
|
14
15
|
}>;
|
|
15
|
-
export declare function Dropdown({ children, className, active, trigger, triggerEvent, closeOnClick, withArrow, dataAttributes, placement, alignment, onClick, }: DropdownProps): JSX.Element;
|
|
16
|
+
export declare function Dropdown({ children, className, active, trigger, triggerEvent, closeOnClick, withArrow, dataAttributes, placement, alignment, onClick, onClose, }: DropdownProps): JSX.Element;
|
|
@@ -32,7 +32,7 @@ const styled_components_1 = __importDefault(require("styled-components"));
|
|
|
32
32
|
const hooks_1 = require("../../core/hooks");
|
|
33
33
|
const ChevronDownIcon_1 = require("../../icons/ChevronDownIcon/ChevronDownIcon");
|
|
34
34
|
const ChevronUpIcon_1 = require("../../icons/ChevronUpIcon/ChevronUpIcon");
|
|
35
|
-
function Dropdown({ children, className, active, trigger, triggerEvent = 'click', closeOnClick = true, withArrow, dataAttributes, placement, alignment, onClick, }) {
|
|
35
|
+
function Dropdown({ children, className, active, trigger, triggerEvent = 'click', closeOnClick = true, withArrow, dataAttributes, placement, alignment, onClick, onClose, }) {
|
|
36
36
|
const dropdownRef = (0, react_1.useRef)(null);
|
|
37
37
|
const [isOpen, setIsOpen] = (0, hooks_1.useControlledState)(false, active);
|
|
38
38
|
const handleOpen = () => {
|
|
@@ -40,6 +40,7 @@ function Dropdown({ children, className, active, trigger, triggerEvent = 'click'
|
|
|
40
40
|
};
|
|
41
41
|
const handleClose = () => {
|
|
42
42
|
setIsOpen(false);
|
|
43
|
+
onClose === null || onClose === void 0 ? void 0 : onClose();
|
|
43
44
|
};
|
|
44
45
|
const handleChildClick = () => {
|
|
45
46
|
handleClose();
|
|
@@ -78,7 +79,7 @@ const DropdownWrapper = styled_components_1.default.div `
|
|
|
78
79
|
text-decoration: none;
|
|
79
80
|
`;
|
|
80
81
|
const ChildrenWrapper = styled_components_1.default.div `
|
|
81
|
-
padding-top: var(--dropdown-menu-
|
|
82
|
+
padding-top: var(--dropdown-menu-padding-top);
|
|
82
83
|
position: absolute;
|
|
83
84
|
top: ${({ placement }) => (placement === 'top' ? 'auto' : '100%')};
|
|
84
85
|
bottom: ${({ placement }) => (placement === 'top' ? '100%' : 'auto')};
|
|
@@ -11,7 +11,7 @@ exports.dropdown = (0, styled_components_1.css) `
|
|
|
11
11
|
--dropdown-menu-line-height: var(--line-height-base); // @presenter LineHeight
|
|
12
12
|
--dropdown-menu-text-color: var(--text-color-secondary); // @presenter Color
|
|
13
13
|
|
|
14
|
-
--dropdown-menu-
|
|
14
|
+
--dropdown-menu-padding-top: var(--spacing-xxs);
|
|
15
15
|
--dropdown-menu-min-width: 100px;
|
|
16
16
|
--dropdown-menu-max-width: 424px;
|
|
17
17
|
--dropdown-menu-max-height: 300px;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export declare const useRecentSearches:
|
|
1
|
+
export declare const useRecentSearches: import("vitest").Mock<() => {
|
|
2
2
|
items: string[];
|
|
3
3
|
addSearchHistoryItem: (value: string) => string;
|
|
4
4
|
removeSearchHistoryItem: (value: string) => string;
|
|
5
|
-
}
|
|
5
|
+
}>;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.useRecentSearches = void 0;
|
|
4
|
-
|
|
4
|
+
const vitest_1 = require("vitest");
|
|
5
|
+
exports.useRecentSearches = vitest_1.vi.fn(() => {
|
|
5
6
|
const items = ['test'];
|
|
6
7
|
return {
|
|
7
8
|
items,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export declare const useSearchFilter:
|
|
1
|
+
export declare const useSearchFilter: import("vitest").Mock<() => {
|
|
2
2
|
isFilterOpen: boolean;
|
|
3
3
|
onFacetReset: () => void;
|
|
4
4
|
onFilterChange: () => void;
|
|
5
5
|
onFilterToggle: () => void;
|
|
6
6
|
onFilterReset: () => void;
|
|
7
7
|
onQuickFilterReset: () => void;
|
|
8
|
-
}
|
|
8
|
+
}>;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.useSearchFilter = void 0;
|
|
4
|
-
|
|
4
|
+
const vitest_1 = require("vitest");
|
|
5
|
+
exports.useSearchFilter = vitest_1.vi.fn(() => {
|
|
5
6
|
return {
|
|
6
7
|
isFilterOpen: false,
|
|
7
8
|
onFacetReset: () => { },
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.useSuggestedPages = void 0;
|
|
4
|
-
|
|
4
|
+
const vitest_1 = require("vitest");
|
|
5
|
+
exports.useSuggestedPages = vitest_1.vi.fn(() => {
|
|
5
6
|
return [
|
|
6
7
|
{
|
|
7
8
|
link: '/',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const useControlledState: () => (boolean |
|
|
1
|
+
export declare const useControlledState: () => (boolean | import("vitest").Mock<(...args: any[]) => any>)[];
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.useControlledState = void 0;
|
|
4
|
-
const
|
|
4
|
+
const vitest_1 = require("vitest");
|
|
5
|
+
const useControlledState = () => [false, vitest_1.vi.fn()];
|
|
5
6
|
exports.useControlledState = useControlledState;
|
|
6
7
|
//# sourceMappingURL=use-controlled-state.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export declare const useInputKeyCommands:
|
|
2
|
-
onKeyDown:
|
|
3
|
-
}
|
|
1
|
+
export declare const useInputKeyCommands: import("vitest").Mock<() => {
|
|
2
|
+
onKeyDown: import("vitest").Mock<(...args: any[]) => any>;
|
|
3
|
+
}>;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.useInputKeyCommands = void 0;
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
const vitest_1 = require("vitest");
|
|
5
|
+
exports.useInputKeyCommands = vitest_1.vi.fn(() => ({
|
|
6
|
+
onKeyDown: vitest_1.vi.fn(),
|
|
6
7
|
}));
|
|
7
8
|
//# sourceMappingURL=use-input-key-commands.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const useMobileMenu: () => (boolean |
|
|
1
|
+
export declare const useMobileMenu: () => (boolean | import("vitest").Mock<(...args: any[]) => any>)[];
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.useMobileMenu = void 0;
|
|
4
|
-
const
|
|
4
|
+
const vitest_1 = require("vitest");
|
|
5
|
+
const useMobileMenu = () => [false, vitest_1.vi.fn()];
|
|
5
6
|
exports.useMobileMenu = useMobileMenu;
|
|
6
7
|
//# sourceMappingURL=use-mobile-menu.js.map
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.useThemeConfig = void 0;
|
|
4
|
-
|
|
4
|
+
const vitest_1 = require("vitest");
|
|
5
|
+
exports.useThemeConfig = vitest_1.vi.fn(() => ({
|
|
5
6
|
userMenu: {
|
|
6
7
|
items: [],
|
|
7
8
|
},
|
|
@@ -1,68 +1,68 @@
|
|
|
1
|
-
export declare const useThemeHooks:
|
|
2
|
-
useTranslate:
|
|
3
|
-
translate:
|
|
4
|
-
}
|
|
5
|
-
useTelemetry:
|
|
6
|
-
send:
|
|
7
|
-
}
|
|
8
|
-
useBreadcrumbs:
|
|
9
|
-
usePageSharedData:
|
|
10
|
-
useCatalogClassic:
|
|
1
|
+
export declare const useThemeHooks: import("vitest").Mock<() => {
|
|
2
|
+
useTranslate: import("vitest").Mock<() => {
|
|
3
|
+
translate: import("vitest").Mock<(key: string, defaultValue: string) => any>;
|
|
4
|
+
}>;
|
|
5
|
+
useTelemetry: import("vitest").Mock<() => {
|
|
6
|
+
send: import("vitest").Mock<(...args: any[]) => any>;
|
|
7
|
+
}>;
|
|
8
|
+
useBreadcrumbs: import("vitest").Mock<(...args: any[]) => any>;
|
|
9
|
+
usePageSharedData: import("vitest").Mock<(...args: any[]) => any>;
|
|
10
|
+
useCatalogClassic: import("vitest").Mock<() => {
|
|
11
11
|
groups: never[];
|
|
12
12
|
filters: never[];
|
|
13
13
|
filterTerm: string;
|
|
14
|
-
setFilterTerm:
|
|
15
|
-
}
|
|
16
|
-
useL10n:
|
|
17
|
-
changeLanguage:
|
|
18
|
-
}
|
|
19
|
-
useL10nConfig:
|
|
14
|
+
setFilterTerm: import("vitest").Mock<(...args: any[]) => any>;
|
|
15
|
+
}>;
|
|
16
|
+
useL10n: import("vitest").Mock<() => {
|
|
17
|
+
changeLanguage: import("vitest").Mock<(...args: any[]) => any>;
|
|
18
|
+
}>;
|
|
19
|
+
useL10nConfig: import("vitest").Mock<() => {
|
|
20
20
|
currentLocale: string;
|
|
21
21
|
defaultLocale: string;
|
|
22
22
|
locales: {
|
|
23
23
|
code: string;
|
|
24
24
|
name: string;
|
|
25
25
|
}[];
|
|
26
|
-
}
|
|
27
|
-
usePreloadHistory:
|
|
28
|
-
push:
|
|
29
|
-
}
|
|
30
|
-
useCurrentProduct:
|
|
31
|
-
useProducts:
|
|
32
|
-
useSearch:
|
|
33
|
-
query:
|
|
34
|
-
setQuery:
|
|
26
|
+
}>;
|
|
27
|
+
usePreloadHistory: import("vitest").Mock<() => {
|
|
28
|
+
push: import("vitest").Mock<(...args: any[]) => any>;
|
|
29
|
+
}>;
|
|
30
|
+
useCurrentProduct: import("vitest").Mock<(...args: any[]) => any>;
|
|
31
|
+
useProducts: import("vitest").Mock<() => never[]>;
|
|
32
|
+
useSearch: import("vitest").Mock<() => {
|
|
33
|
+
query: import("vitest").Mock<(...args: any[]) => any>;
|
|
34
|
+
setQuery: import("vitest").Mock<(...args: any[]) => any>;
|
|
35
35
|
items: never[];
|
|
36
36
|
isLoading: boolean;
|
|
37
|
-
}
|
|
38
|
-
useAiSearch:
|
|
39
|
-
askQuestion:
|
|
37
|
+
}>;
|
|
38
|
+
useAiSearch: import("vitest").Mock<() => {
|
|
39
|
+
askQuestion: import("vitest").Mock<(...args: any[]) => any>;
|
|
40
40
|
references: never[];
|
|
41
|
-
}
|
|
42
|
-
useFacetQuery:
|
|
41
|
+
}>;
|
|
42
|
+
useFacetQuery: import("vitest").Mock<() => {
|
|
43
43
|
searchFacet: null;
|
|
44
|
-
setSearchFacet:
|
|
45
|
-
setSearchFacetQuery:
|
|
46
|
-
}
|
|
47
|
-
useMarkdownText:
|
|
48
|
-
useUserMenu:
|
|
44
|
+
setSearchFacet: import("vitest").Mock<(...args: any[]) => any>;
|
|
45
|
+
setSearchFacetQuery: import("vitest").Mock<(...args: any[]) => any>;
|
|
46
|
+
}>;
|
|
47
|
+
useMarkdownText: import("vitest").Mock<() => null>;
|
|
48
|
+
useUserMenu: import("vitest").Mock<() => {
|
|
49
49
|
userData: {
|
|
50
50
|
isAuthenticated: boolean;
|
|
51
51
|
name: string;
|
|
52
52
|
email: string;
|
|
53
53
|
picture: string;
|
|
54
54
|
};
|
|
55
|
-
handleLogout:
|
|
55
|
+
handleLogout: import("vitest").Mock<(...args: any[]) => any>;
|
|
56
56
|
loginUrl: string;
|
|
57
57
|
hasDeveloperOnboarding: boolean;
|
|
58
|
-
}
|
|
59
|
-
usePageVersions:
|
|
60
|
-
useSidebarItems:
|
|
61
|
-
useSidebarSiblingsData:
|
|
62
|
-
useSubmitFeedback:
|
|
63
|
-
submitFeedback:
|
|
64
|
-
}
|
|
65
|
-
useLoadAndNavigate:
|
|
66
|
-
usePageProps:
|
|
67
|
-
usePageData:
|
|
68
|
-
}
|
|
58
|
+
}>;
|
|
59
|
+
usePageVersions: import("vitest").Mock<(...args: any[]) => any>;
|
|
60
|
+
useSidebarItems: import("vitest").Mock<(...args: any[]) => any>;
|
|
61
|
+
useSidebarSiblingsData: import("vitest").Mock<(...args: any[]) => any>;
|
|
62
|
+
useSubmitFeedback: import("vitest").Mock<() => {
|
|
63
|
+
submitFeedback: import("vitest").Mock<(...args: any[]) => any>;
|
|
64
|
+
}>;
|
|
65
|
+
useLoadAndNavigate: import("vitest").Mock<(...args: any[]) => any>;
|
|
66
|
+
usePageProps: import("vitest").Mock<(...args: any[]) => any>;
|
|
67
|
+
usePageData: import("vitest").Mock<(...args: any[]) => any>;
|
|
68
|
+
}>;
|
|
@@ -1,29 +1,30 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.useThemeHooks = void 0;
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
const vitest_1 = require("vitest");
|
|
5
|
+
exports.useThemeHooks = vitest_1.vi.fn(() => ({
|
|
6
|
+
useTranslate: vitest_1.vi.fn(() => ({
|
|
7
|
+
translate: vitest_1.vi.fn((key, defaultValue) => defaultValue
|
|
7
8
|
? typeof defaultValue !== 'string'
|
|
8
9
|
? defaultValue.defaultValue
|
|
9
10
|
: defaultValue
|
|
10
11
|
: key),
|
|
11
12
|
})),
|
|
12
|
-
useTelemetry:
|
|
13
|
-
send:
|
|
13
|
+
useTelemetry: vitest_1.vi.fn(() => ({
|
|
14
|
+
send: vitest_1.vi.fn(),
|
|
14
15
|
})),
|
|
15
|
-
useBreadcrumbs:
|
|
16
|
-
usePageSharedData:
|
|
17
|
-
useCatalogClassic:
|
|
16
|
+
useBreadcrumbs: vitest_1.vi.fn().mockReturnValue([]),
|
|
17
|
+
usePageSharedData: vitest_1.vi.fn().mockReturnValue({}),
|
|
18
|
+
useCatalogClassic: vitest_1.vi.fn(() => ({
|
|
18
19
|
groups: [],
|
|
19
20
|
filters: [],
|
|
20
21
|
filterTerm: '',
|
|
21
|
-
setFilterTerm:
|
|
22
|
+
setFilterTerm: vitest_1.vi.fn(),
|
|
22
23
|
})),
|
|
23
|
-
useL10n:
|
|
24
|
-
changeLanguage:
|
|
24
|
+
useL10n: vitest_1.vi.fn(() => ({
|
|
25
|
+
changeLanguage: vitest_1.vi.fn(),
|
|
25
26
|
})),
|
|
26
|
-
useL10nConfig:
|
|
27
|
+
useL10nConfig: vitest_1.vi.fn(() => ({
|
|
27
28
|
currentLocale: 'en',
|
|
28
29
|
defaultLocale: 'en',
|
|
29
30
|
locales: [
|
|
@@ -32,42 +33,42 @@ exports.useThemeHooks = jest.fn(() => ({
|
|
|
32
33
|
{ code: 'uk', name: 'Ukraine' },
|
|
33
34
|
],
|
|
34
35
|
})),
|
|
35
|
-
usePreloadHistory:
|
|
36
|
-
push:
|
|
36
|
+
usePreloadHistory: vitest_1.vi.fn(() => ({
|
|
37
|
+
push: vitest_1.vi.fn(),
|
|
37
38
|
})),
|
|
38
|
-
useCurrentProduct:
|
|
39
|
-
useProducts:
|
|
40
|
-
useSearch:
|
|
41
|
-
query:
|
|
42
|
-
setQuery:
|
|
39
|
+
useCurrentProduct: vitest_1.vi.fn(),
|
|
40
|
+
useProducts: vitest_1.vi.fn(() => []),
|
|
41
|
+
useSearch: vitest_1.vi.fn(() => ({
|
|
42
|
+
query: vitest_1.vi.fn().mockReturnValue(''),
|
|
43
|
+
setQuery: vitest_1.vi.fn(),
|
|
43
44
|
items: [],
|
|
44
45
|
isLoading: false,
|
|
45
46
|
})),
|
|
46
|
-
useAiSearch:
|
|
47
|
-
askQuestion:
|
|
47
|
+
useAiSearch: vitest_1.vi.fn(() => ({
|
|
48
|
+
askQuestion: vitest_1.vi.fn(),
|
|
48
49
|
references: [],
|
|
49
50
|
})),
|
|
50
|
-
useFacetQuery:
|
|
51
|
+
useFacetQuery: vitest_1.vi.fn(() => ({
|
|
51
52
|
searchFacet: null,
|
|
52
|
-
setSearchFacet:
|
|
53
|
-
setSearchFacetQuery:
|
|
53
|
+
setSearchFacet: vitest_1.vi.fn(),
|
|
54
|
+
setSearchFacetQuery: vitest_1.vi.fn(),
|
|
54
55
|
})),
|
|
55
|
-
useMarkdownText:
|
|
56
|
+
useMarkdownText: vitest_1.vi.fn(() => {
|
|
56
57
|
return null;
|
|
57
58
|
}),
|
|
58
|
-
useUserMenu:
|
|
59
|
+
useUserMenu: vitest_1.vi.fn(() => ({
|
|
59
60
|
userData: {
|
|
60
61
|
isAuthenticated: true,
|
|
61
62
|
name: 'test-name',
|
|
62
63
|
email: 'test-email@test.xyz',
|
|
63
64
|
picture: 'picture',
|
|
64
65
|
},
|
|
65
|
-
handleLogout:
|
|
66
|
+
handleLogout: vitest_1.vi.fn(),
|
|
66
67
|
loginUrl: 'https://login.redoc.ly',
|
|
67
68
|
hasDeveloperOnboarding: true,
|
|
68
69
|
})),
|
|
69
|
-
usePageVersions:
|
|
70
|
-
useSidebarItems:
|
|
70
|
+
usePageVersions: vitest_1.vi.fn(),
|
|
71
|
+
useSidebarItems: vitest_1.vi.fn().mockReturnValue({
|
|
71
72
|
currentItems: [
|
|
72
73
|
{
|
|
73
74
|
label: 'Item',
|
|
@@ -78,15 +79,15 @@ exports.useThemeHooks = jest.fn(() => ({
|
|
|
78
79
|
label: 'Item',
|
|
79
80
|
},
|
|
80
81
|
],
|
|
81
|
-
popDrilldownState:
|
|
82
|
-
pushDrilldownState:
|
|
82
|
+
popDrilldownState: vitest_1.vi.fn(),
|
|
83
|
+
pushDrilldownState: vitest_1.vi.fn(),
|
|
83
84
|
}),
|
|
84
|
-
useSidebarSiblingsData:
|
|
85
|
-
useSubmitFeedback:
|
|
86
|
-
submitFeedback:
|
|
85
|
+
useSidebarSiblingsData: vitest_1.vi.fn(),
|
|
86
|
+
useSubmitFeedback: vitest_1.vi.fn(() => ({
|
|
87
|
+
submitFeedback: vitest_1.vi.fn(),
|
|
87
88
|
})),
|
|
88
|
-
useLoadAndNavigate:
|
|
89
|
-
usePageProps:
|
|
90
|
-
usePageData:
|
|
89
|
+
useLoadAndNavigate: vitest_1.vi.fn(),
|
|
90
|
+
usePageProps: vitest_1.vi.fn().mockReturnValue({}),
|
|
91
|
+
usePageData: vitest_1.vi.fn().mockReturnValue(null),
|
|
91
92
|
}));
|
|
92
93
|
//# sourceMappingURL=use-theme-hooks.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export declare const useTimeAgo:
|
|
1
|
+
export declare const useTimeAgo: import("vitest").Mock<() => {
|
|
2
2
|
format: () => "5 days ago";
|
|
3
|
-
}
|
|
3
|
+
}>;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.useTimeAgo = void 0;
|
|
4
|
-
|
|
4
|
+
const vitest_1 = require("vitest");
|
|
5
|
+
exports.useTimeAgo = vitest_1.vi.fn(() => ({
|
|
5
6
|
format: () => '5 days ago',
|
|
6
7
|
}));
|
|
7
8
|
//# sourceMappingURL=use-time-ago.js.map
|
|
@@ -7,11 +7,13 @@ function useCatalogEntities({ entitiesTypes, excludedEntities }) {
|
|
|
7
7
|
const initialExcludedEntitiesFilter = (excludedEntities === null || excludedEntities === void 0 ? void 0 : excludedEntities.length)
|
|
8
8
|
? `-key:${excludedEntities.map((entity) => entity.key).join(',')}`
|
|
9
9
|
: '';
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
if (initialTypesFilter && initialExcludedEntitiesFilter) {
|
|
11
|
+
return {
|
|
12
|
+
initialFilter: `(${initialTypesFilter}) AND (${initialExcludedEntitiesFilter})`,
|
|
13
|
+
};
|
|
14
|
+
}
|
|
13
15
|
return {
|
|
14
|
-
initialFilter,
|
|
16
|
+
initialFilter: initialTypesFilter || initialExcludedEntitiesFilter,
|
|
15
17
|
};
|
|
16
18
|
}
|
|
17
19
|
//# sourceMappingURL=useCatalogEntities.js.map
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.MockIntersectionObserver = void 0;
|
|
4
|
+
const vitest_1 = require("vitest");
|
|
4
5
|
class MockIntersectionObserver {
|
|
5
6
|
// @ts-ignore
|
|
6
7
|
constructor(callback, options) {
|
|
@@ -43,9 +44,9 @@ class MockIntersectionObserver {
|
|
|
43
44
|
this.root = null;
|
|
44
45
|
this.rootMargin = '0px';
|
|
45
46
|
this.thresholds = [1];
|
|
46
|
-
this.observe =
|
|
47
|
-
this.unobserve =
|
|
48
|
-
this.disconnect =
|
|
47
|
+
this.observe = vitest_1.vi.fn();
|
|
48
|
+
this.unobserve = vitest_1.vi.fn();
|
|
49
|
+
this.disconnect = vitest_1.vi.fn();
|
|
49
50
|
}
|
|
50
51
|
takeRecords() {
|
|
51
52
|
return [];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const useMobileMenuItems:
|
|
1
|
+
export declare const useMobileMenuItems: import("vitest").Mock<(...args: any[]) => any>;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.useMobileMenuItems = void 0;
|
|
4
|
-
|
|
4
|
+
const vitest_1 = require("vitest");
|
|
5
|
+
exports.useMobileMenuItems = vitest_1.vi.fn().mockReturnValue({
|
|
5
6
|
items: [
|
|
6
7
|
{
|
|
7
8
|
type: 'group',
|
|
@@ -26,7 +26,8 @@ function usePageActions(pageSlug) {
|
|
|
26
26
|
const { translate } = useTranslate();
|
|
27
27
|
const { navigation } = (0, use_theme_config_1.useThemeConfig)();
|
|
28
28
|
// Can't use any actions if no markdown files are generated for LLMs
|
|
29
|
-
const
|
|
29
|
+
const pageProps = usePageProps();
|
|
30
|
+
const isLlmsDisabled = ((_b = (_a = pageProps === null || pageProps === void 0 ? void 0 : pageProps.seo) === null || _a === void 0 ? void 0 : _a.llmstxt) === null || _b === void 0 ? void 0 : _b.hide) || ((_c = pageProps === null || pageProps === void 0 ? void 0 : pageProps.frontmatter) === null || _c === void 0 ? void 0 : _c.excludeFromSearch);
|
|
30
31
|
const { isPublic } = usePageData() || {};
|
|
31
32
|
const actions = (0, react_1.useMemo)(() => {
|
|
32
33
|
var _a, _b;
|
|
@@ -54,6 +55,9 @@ function usePageActions(pageSlug) {
|
|
|
54
55
|
onClick: () => __awaiter(this, void 0, void 0, function* () {
|
|
55
56
|
try {
|
|
56
57
|
const result = yield fetch(mdPageUrl);
|
|
58
|
+
if (result.status !== 200) {
|
|
59
|
+
throw new Error('Failed to fetch markdown content');
|
|
60
|
+
}
|
|
57
61
|
const text = yield result.text();
|
|
58
62
|
clipboard_service_1.ClipboardService.copyCustom(text);
|
|
59
63
|
}
|
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.catalogs.dataSchema.title' | 'catalog.catalogs.dataSchema.description' | 'catalog.catalogs.dataSchema.switcherLabel' | 'catalog.catalogs.apiOperation.title' | 'catalog.catalogs.apiOperation.description' | 'catalog.catalogs.apiOperation.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' | 'codeSnippet.expand.tooltipText' | 'codeSnippet.collapse.tooltipText' | 'userMenu.login' | 'userMenu.logout' | 'userMenu.devOnboardingLabel' | 'mobileMenu.mainMenu' | 'mobileMenu.previous' | 'mobileMenu.products' | 'mobileMenu.version' | 'navbar.products' | 'page.nextButton' | 'page.previousButton' | 'page.actions.copyButtonText' | 'page.actions.copyTitle' | 'page.actions.copyDescription' | 'page.actions.viewAsMdTitle' | 'page.actions.viewAsMdButtonText' | 'page.actions.viewAsMdDescription' | 'page.actions.chatGptTitle' | 'page.actions.chatGptButtonText' | 'page.actions.chatGptDescription' | 'page.actions.claudeTitle' | 'page.actions.claudeButtonText' | 'page.actions.claudeDescription' | '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.catalogs.apiOperation.title' | 'catalog.catalogs.apiOperation.description' | 'catalog.catalogs.apiOperation.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' | 'codeSnippet.expand.tooltipText' | 'codeSnippet.collapse.tooltipText' | 'userMenu.login' | 'userMenu.logout' | 'userMenu.devOnboardingLabel' | 'mobileMenu.mainMenu' | 'mobileMenu.previous' | 'mobileMenu.products' | 'mobileMenu.version' | 'navbar.products' | 'page.nextButton' | 'page.previousButton' | 'page.actions.copyButtonText' | 'page.actions.copyTitle' | 'page.actions.copyDescription' | 'page.actions.viewAsMdTitle' | 'page.actions.viewAsMdButtonText' | 'page.actions.viewAsMdDescription' | 'page.actions.chatGptTitle' | 'page.actions.chatGptButtonText' | 'page.actions.chatGptDescription' | 'page.actions.claudeTitle' | 'page.actions.claudeButtonText' | 'page.actions.claudeDescription' | '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.discriminator.searchPlaceholder' | 'openapi.discriminator.searchNoResults' | '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;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface DynamicOptions {
|
|
3
|
+
ssr?: boolean;
|
|
4
|
+
loading?: React.ComponentType<Record<string, unknown>>;
|
|
5
|
+
}
|
|
6
|
+
export declare function dynamic<T extends React.ComponentType<Record<string, unknown>>>(factory: () => Promise<T | Record<string, unknown>>, { ssr, loading }?: DynamicOptions): React.ComponentType<Record<string, unknown>>;
|
|
7
|
+
export {};
|