@redocly/theme 0.63.0-next.3 → 0.63.0-next.5
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/Buttons/CopyButton.d.ts +1 -1
- package/lib/components/Buttons/CopyButton.js +1 -1
- package/lib/components/Buttons/DownloadButton.d.ts +6 -0
- package/lib/components/Buttons/DownloadButton.js +20 -0
- package/lib/components/Buttons/EmailButton.js +6 -1
- package/lib/components/Buttons/NewTabButton.js +6 -1
- package/lib/components/Catalog/CatalogEntity/CatalogEntityHistory/CatalogEntityHistorySidebar.js +2 -2
- package/lib/components/Catalog/CatalogEntity/CatalogEntityHistory/CatalogEntityVersionItem.js +6 -13
- package/lib/components/CodeBlock/CodeBlockControls.js +3 -3
- package/lib/components/Menu/MenuItem.js +1 -1
- package/lib/components/PageActions/PageActions.js +1 -1
- package/lib/components/Search/SearchDialog.js +1 -1
- package/lib/components/SidebarActions/SidebarActions.js +1 -1
- package/lib/components/SidebarActions/styled.d.ts +1 -1
- package/lib/components/Tooltip/AnchorTooltip.d.ts +7 -0
- package/lib/components/Tooltip/AnchorTooltip.js +233 -0
- package/lib/components/Tooltip/JsTooltip.d.ts +3 -0
- package/lib/components/Tooltip/JsTooltip.js +277 -0
- package/lib/components/Tooltip/Tooltip.d.ts +2 -13
- package/lib/components/Tooltip/Tooltip.js +14 -190
- package/lib/core/hooks/use-page-actions.js +9 -5
- package/lib/core/hooks/use-theme-hooks.js +1 -0
- package/lib/core/types/hooks.d.ts +4 -0
- package/lib/core/types/index.d.ts +1 -0
- package/lib/core/types/l10n.d.ts +1 -1
- package/lib/core/types/tooltip.d.ts +14 -0
- package/lib/core/types/tooltip.js +3 -0
- package/lib/core/utils/transform-revisions-to-version-history.js +13 -20
- package/lib/index.d.ts +1 -0
- package/lib/index.js +1 -0
- package/package.json +3 -3
- package/src/components/Buttons/CopyButton.tsx +2 -1
- package/src/components/Buttons/DownloadButton.tsx +41 -0
- package/src/components/Buttons/EmailButton.tsx +18 -8
- package/src/components/Buttons/NewTabButton.tsx +19 -8
- package/src/components/Catalog/CatalogEntity/CatalogEntityHistory/CatalogEntityHistorySidebar.tsx +2 -2
- package/src/components/Catalog/CatalogEntity/CatalogEntityHistory/CatalogEntityVersionItem.tsx +5 -21
- package/src/components/CodeBlock/CodeBlockControls.tsx +3 -0
- package/src/components/Menu/MenuItem.tsx +1 -0
- package/src/components/PageActions/PageActions.tsx +6 -1
- package/src/components/Search/SearchDialog.tsx +1 -1
- package/src/components/SidebarActions/SidebarActions.tsx +1 -0
- package/src/components/Tooltip/AnchorTooltip.tsx +259 -0
- package/src/components/Tooltip/JsTooltip.tsx +296 -0
- package/src/components/Tooltip/Tooltip.tsx +18 -257
- package/src/core/hooks/__mocks__/use-theme-hooks.ts +3 -0
- package/src/core/hooks/use-page-actions.ts +5 -0
- package/src/core/hooks/use-theme-hooks.ts +1 -0
- package/src/core/types/hooks.ts +2 -1
- package/src/core/types/index.ts +1 -0
- package/src/core/types/l10n.ts +5 -0
- package/src/core/types/tooltip.ts +15 -0
- package/src/core/utils/transform-revisions-to-version-history.ts +13 -21
- package/src/index.ts +1 -0
|
@@ -0,0 +1,277 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.Tooltip = void 0;
|
|
37
|
+
const react_1 = __importStar(require("react"));
|
|
38
|
+
const styled_components_1 = __importStar(require("styled-components"));
|
|
39
|
+
const hooks_1 = require("../../core/hooks");
|
|
40
|
+
const Portal_1 = require("../../components/Portal/Portal");
|
|
41
|
+
function TooltipComponent({ children, isOpen, tip, withArrow = true, placement = 'top', className = 'default', width, dataTestId, disabled = false, arrowPosition = 'center', onClick, }) {
|
|
42
|
+
const ref = (0, react_1.useRef)(null);
|
|
43
|
+
const { isOpened, handleOpen, handleClose } = (0, hooks_1.useControl)(isOpen);
|
|
44
|
+
const [tooltipPosition, setTooltipPosition] = (0, react_1.useState)({ top: 0, left: 0 });
|
|
45
|
+
(0, hooks_1.useOutsideClick)(ref, handleClose);
|
|
46
|
+
const isControlled = isOpen !== undefined;
|
|
47
|
+
const updateTooltipPosition = (0, react_1.useCallback)(() => {
|
|
48
|
+
if (isOpened && ref.current) {
|
|
49
|
+
const rect = ref.current.getBoundingClientRect();
|
|
50
|
+
let top = 0;
|
|
51
|
+
let left = 0;
|
|
52
|
+
switch (placement) {
|
|
53
|
+
case 'top':
|
|
54
|
+
top = rect.top;
|
|
55
|
+
if (arrowPosition === 'left') {
|
|
56
|
+
left = rect.left - 24;
|
|
57
|
+
}
|
|
58
|
+
else if (arrowPosition === 'right') {
|
|
59
|
+
left = rect.right + 24;
|
|
60
|
+
}
|
|
61
|
+
else {
|
|
62
|
+
left = rect.left + rect.width / 2;
|
|
63
|
+
}
|
|
64
|
+
break;
|
|
65
|
+
case 'bottom':
|
|
66
|
+
top = rect.bottom;
|
|
67
|
+
if (arrowPosition === 'left') {
|
|
68
|
+
left = rect.left - 24;
|
|
69
|
+
}
|
|
70
|
+
else if (arrowPosition === 'right') {
|
|
71
|
+
left = rect.right + 24;
|
|
72
|
+
}
|
|
73
|
+
else {
|
|
74
|
+
left = rect.left + rect.width / 2;
|
|
75
|
+
}
|
|
76
|
+
break;
|
|
77
|
+
case 'left':
|
|
78
|
+
top = rect.top + rect.height / 2;
|
|
79
|
+
left = rect.left;
|
|
80
|
+
break;
|
|
81
|
+
case 'right':
|
|
82
|
+
top = rect.top + rect.height / 2;
|
|
83
|
+
left = rect.right;
|
|
84
|
+
break;
|
|
85
|
+
}
|
|
86
|
+
setTooltipPosition({ top, left });
|
|
87
|
+
}
|
|
88
|
+
}, [isOpened, placement, arrowPosition]);
|
|
89
|
+
(0, react_1.useLayoutEffect)(() => {
|
|
90
|
+
if (isOpened && ref.current) {
|
|
91
|
+
updateTooltipPosition();
|
|
92
|
+
const handleScroll = () => updateTooltipPosition();
|
|
93
|
+
const handleResize = () => updateTooltipPosition();
|
|
94
|
+
window.addEventListener('scroll', handleScroll, true);
|
|
95
|
+
window.addEventListener('resize', handleResize);
|
|
96
|
+
return () => {
|
|
97
|
+
window.removeEventListener('scroll', handleScroll, true);
|
|
98
|
+
window.removeEventListener('resize', handleResize);
|
|
99
|
+
};
|
|
100
|
+
}
|
|
101
|
+
}, [isOpened, placement, updateTooltipPosition]);
|
|
102
|
+
(0, react_1.useEffect)(() => {
|
|
103
|
+
if (isOpen && !disabled) {
|
|
104
|
+
handleOpen();
|
|
105
|
+
}
|
|
106
|
+
else {
|
|
107
|
+
handleClose();
|
|
108
|
+
}
|
|
109
|
+
}, [isOpen, handleOpen, handleClose, disabled]);
|
|
110
|
+
const controllers = !isControlled &&
|
|
111
|
+
!disabled && {
|
|
112
|
+
onMouseEnter: handleOpen,
|
|
113
|
+
onMouseLeave: handleClose,
|
|
114
|
+
onClick: (e) => {
|
|
115
|
+
onClick === null || onClick === void 0 ? void 0 : onClick(e);
|
|
116
|
+
handleClose();
|
|
117
|
+
},
|
|
118
|
+
onFocus: handleOpen,
|
|
119
|
+
onBlur: handleClose,
|
|
120
|
+
};
|
|
121
|
+
return (react_1.default.createElement(TooltipWrapper, Object.assign({ ref: ref }, controllers, { className: `tooltip-${className}`, "data-component-name": "Tooltip/Tooltip" }),
|
|
122
|
+
children,
|
|
123
|
+
isOpened && !disabled && (react_1.default.createElement(Portal_1.Portal, null,
|
|
124
|
+
react_1.default.createElement(TooltipBody, { "data-testid": dataTestId || (typeof tip === 'string' ? tip : ''), placement: placement, width: width, withArrow: withArrow, arrowPosition: arrowPosition, style: {
|
|
125
|
+
position: 'fixed',
|
|
126
|
+
top: tooltipPosition.top,
|
|
127
|
+
left: tooltipPosition.left,
|
|
128
|
+
} }, tip)))));
|
|
129
|
+
}
|
|
130
|
+
exports.Tooltip = (0, react_1.memo)(TooltipComponent);
|
|
131
|
+
const PLACEMENTS = {
|
|
132
|
+
top: (0, styled_components_1.css) `
|
|
133
|
+
${({ withArrow, arrowPosition }) => withArrow && arrowPosition === 'left'
|
|
134
|
+
? (0, styled_components_1.css) `
|
|
135
|
+
transform: translate(0, -100%);
|
|
136
|
+
margin-top: -10px;
|
|
137
|
+
`
|
|
138
|
+
: arrowPosition === 'right'
|
|
139
|
+
? (0, styled_components_1.css) `
|
|
140
|
+
transform: translate(-100%, -100%);
|
|
141
|
+
margin-top: -10px;
|
|
142
|
+
`
|
|
143
|
+
: (0, styled_components_1.css) `
|
|
144
|
+
transform: translate(-50%, -100%);
|
|
145
|
+
margin-top: -10px;
|
|
146
|
+
`}
|
|
147
|
+
|
|
148
|
+
${({ withArrow, arrowPosition }) => withArrow &&
|
|
149
|
+
(0, styled_components_1.css) `
|
|
150
|
+
&::after {
|
|
151
|
+
border-left: 14px solid transparent;
|
|
152
|
+
border-right: 14px solid transparent;
|
|
153
|
+
border-top-width: 8px;
|
|
154
|
+
border-top-style: solid;
|
|
155
|
+
border-radius: 2px;
|
|
156
|
+
bottom: 0;
|
|
157
|
+
${arrowPosition === 'left' && 'left: 16px; transform: translateY(99%);'}
|
|
158
|
+
${arrowPosition === 'center' && 'left: 50%; transform: translate(-50%, 99%);'}
|
|
159
|
+
${arrowPosition === 'right' && 'right: 16px; transform: translateY(99%);'}
|
|
160
|
+
}
|
|
161
|
+
`}
|
|
162
|
+
`,
|
|
163
|
+
bottom: (0, styled_components_1.css) `
|
|
164
|
+
${({ withArrow, arrowPosition }) => withArrow && arrowPosition === 'left'
|
|
165
|
+
? (0, styled_components_1.css) `
|
|
166
|
+
transform: translate(0, 10px);
|
|
167
|
+
margin-top: 0;
|
|
168
|
+
`
|
|
169
|
+
: arrowPosition === 'right'
|
|
170
|
+
? (0, styled_components_1.css) `
|
|
171
|
+
transform: translate(-100%, 10px);
|
|
172
|
+
margin-top: 0;
|
|
173
|
+
`
|
|
174
|
+
: (0, styled_components_1.css) `
|
|
175
|
+
transform: translate(-50%, 10px);
|
|
176
|
+
margin-top: 0;
|
|
177
|
+
`}
|
|
178
|
+
|
|
179
|
+
${({ withArrow, arrowPosition }) => withArrow &&
|
|
180
|
+
(0, styled_components_1.css) `
|
|
181
|
+
&::after {
|
|
182
|
+
border-left: 14px solid transparent;
|
|
183
|
+
border-right: 14px solid transparent;
|
|
184
|
+
border-bottom-width: 8px;
|
|
185
|
+
border-bottom-style: solid;
|
|
186
|
+
border-radius: 0 0 2px 2px;
|
|
187
|
+
top: 0;
|
|
188
|
+
${arrowPosition === 'left' && 'left: 16px; transform: translateY(-99%);'}
|
|
189
|
+
${arrowPosition === 'center' && 'left: 50%; transform: translate(-50%, -99%);'}
|
|
190
|
+
${arrowPosition === 'right' && 'right: 16px; transform: translateY(-99%);'}
|
|
191
|
+
}
|
|
192
|
+
`}
|
|
193
|
+
`,
|
|
194
|
+
left: (0, styled_components_1.css) `
|
|
195
|
+
transform: translate(-100%, -50%);
|
|
196
|
+
margin-left: -10px;
|
|
197
|
+
|
|
198
|
+
${({ withArrow, arrowPosition }) => withArrow &&
|
|
199
|
+
(0, styled_components_1.css) `
|
|
200
|
+
&::after {
|
|
201
|
+
border-top: 14px solid transparent;
|
|
202
|
+
border-bottom: 14px solid transparent;
|
|
203
|
+
border-left-width: 8px;
|
|
204
|
+
border-left-style: solid;
|
|
205
|
+
border-radius: 2px 0 0 2px;
|
|
206
|
+
top: 50%;
|
|
207
|
+
right: 0;
|
|
208
|
+
${arrowPosition === 'top' && 'top: 16px; transform: translateX(99%);'}
|
|
209
|
+
${arrowPosition === 'center' && 'top: 50%; transform: translate(99%, -50%);'}
|
|
210
|
+
${arrowPosition === 'bottom' && 'bottom: 16px; transform: translateX(99%);'}
|
|
211
|
+
}
|
|
212
|
+
`}
|
|
213
|
+
`,
|
|
214
|
+
right: (0, styled_components_1.css) `
|
|
215
|
+
transform: translate(0, -50%);
|
|
216
|
+
margin-left: 10px;
|
|
217
|
+
|
|
218
|
+
${({ withArrow, arrowPosition }) => withArrow &&
|
|
219
|
+
(0, styled_components_1.css) `
|
|
220
|
+
&::after {
|
|
221
|
+
border-top: 14px solid transparent;
|
|
222
|
+
border-bottom: 14px solid transparent;
|
|
223
|
+
border-right-width: 8px;
|
|
224
|
+
border-right-style: solid;
|
|
225
|
+
border-radius: 0 2px 2px 0;
|
|
226
|
+
top: 50%;
|
|
227
|
+
left: 0;
|
|
228
|
+
${arrowPosition === 'top' && 'top: 16px; transform: translateX(-99%);'}
|
|
229
|
+
${arrowPosition === 'center' && 'top: 50%; transform: translate(-99%, -50%);'}
|
|
230
|
+
${arrowPosition === 'bottom' && 'bottom: 16px; transform: translateX(-99%);'}
|
|
231
|
+
}
|
|
232
|
+
`}
|
|
233
|
+
`,
|
|
234
|
+
};
|
|
235
|
+
const TooltipWrapper = styled_components_1.default.div `
|
|
236
|
+
position: relative;
|
|
237
|
+
display: flex;
|
|
238
|
+
`;
|
|
239
|
+
const TooltipBody = styled_components_1.default.span `
|
|
240
|
+
display: inline-block;
|
|
241
|
+
|
|
242
|
+
padding: var(--tooltip-padding);
|
|
243
|
+
max-width: ${({ width }) => width || 'var(--tooltip-max-width)'};
|
|
244
|
+
white-space: normal;
|
|
245
|
+
word-break: normal;
|
|
246
|
+
overflow-wrap: break-word;
|
|
247
|
+
|
|
248
|
+
border-radius: var(--border-radius-md);
|
|
249
|
+
transition: opacity 0.3s ease-out;
|
|
250
|
+
|
|
251
|
+
font-size: var(--font-size-base);
|
|
252
|
+
line-height: var(--line-height-base);
|
|
253
|
+
|
|
254
|
+
z-index: var(--z-index-overlay);
|
|
255
|
+
|
|
256
|
+
&::after {
|
|
257
|
+
position: absolute;
|
|
258
|
+
|
|
259
|
+
content: ' ';
|
|
260
|
+
display: inline-block;
|
|
261
|
+
width: 0;
|
|
262
|
+
height: 0;
|
|
263
|
+
border-color: var(--tooltip-arrow-color, var(--tooltip-bg-color));
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
background: var(--tooltip-bg-color);
|
|
267
|
+
color: var(--tooltip-text-color);
|
|
268
|
+
border: var(--tooltip-border-width, 0) var(--tooltip-border-style, solid)
|
|
269
|
+
var(--tooltip-border-color, transparent);
|
|
270
|
+
box-shadow: var(--bg-raised-shadow);
|
|
271
|
+
|
|
272
|
+
width: ${({ width }) => width || 'auto'};
|
|
273
|
+
${({ placement }) => (0, styled_components_1.css) `
|
|
274
|
+
${PLACEMENTS[placement]};
|
|
275
|
+
`}
|
|
276
|
+
`;
|
|
277
|
+
//# sourceMappingURL=JsTooltip.js.map
|
|
@@ -1,14 +1,3 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import
|
|
3
|
-
export
|
|
4
|
-
tip: string | ReactNode;
|
|
5
|
-
isOpen?: boolean;
|
|
6
|
-
withArrow?: boolean;
|
|
7
|
-
placement?: 'top' | 'bottom' | 'left' | 'right';
|
|
8
|
-
className?: string;
|
|
9
|
-
width?: string;
|
|
10
|
-
dataTestId?: string;
|
|
11
|
-
disabled?: boolean;
|
|
12
|
-
arrowPosition?: 'left' | 'right' | 'center';
|
|
13
|
-
};
|
|
14
|
-
export declare const Tooltip: React.NamedExoticComponent<React.PropsWithChildren<TooltipProps>>;
|
|
2
|
+
import { TooltipProps } from '../../core/types';
|
|
3
|
+
export declare const Tooltip: React.NamedExoticComponent<TooltipProps>;
|
|
@@ -35,198 +35,22 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
35
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
36
|
exports.Tooltip = void 0;
|
|
37
37
|
const react_1 = __importStar(require("react"));
|
|
38
|
-
const
|
|
38
|
+
const AnchorTooltip_1 = require("../../components/Tooltip/AnchorTooltip");
|
|
39
|
+
const JsTooltip_1 = require("../../components/Tooltip/JsTooltip");
|
|
39
40
|
const hooks_1 = require("../../core/hooks");
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
const
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
(
|
|
47
|
-
const isControlled = isOpen !== undefined;
|
|
48
|
-
(0, react_1.useEffect)(() => {
|
|
49
|
-
if (!isControlled)
|
|
50
|
-
return;
|
|
51
|
-
if (isOpen && !disabled) {
|
|
52
|
-
handleOpen();
|
|
53
|
-
}
|
|
54
|
-
else {
|
|
55
|
-
handleClose();
|
|
56
|
-
}
|
|
57
|
-
}, [isOpen, disabled, isControlled, handleOpen, handleClose]);
|
|
58
|
-
const controllers = !isControlled && !disabled
|
|
59
|
-
? {
|
|
60
|
-
onMouseEnter: handleOpen,
|
|
61
|
-
onMouseLeave: handleClose,
|
|
62
|
-
onClick: handleClose,
|
|
63
|
-
onFocus: handleOpen,
|
|
64
|
-
onBlur: handleClose,
|
|
65
|
-
}
|
|
66
|
-
: {};
|
|
67
|
-
return (react_1.default.createElement(TooltipWrapper, Object.assign({ ref: tooltipWrapperRef }, controllers, { className: `tooltip-${className}`, "data-component-name": "Tooltip/Tooltip", anchorName: anchorName }),
|
|
68
|
-
children,
|
|
69
|
-
isOpened && !disabled && (react_1.default.createElement(Portal_1.Portal, null,
|
|
70
|
-
react_1.default.createElement(TooltipBody, { ref: tooltipBodyRef, "data-testid": dataTestId || (typeof tip === 'string' ? tip : ''), placement: placement, width: width, withArrow: withArrow, arrowPosition: arrowPosition, anchorName: anchorName }, tip)))));
|
|
41
|
+
function TooltipComponent(props) {
|
|
42
|
+
const { useAnchorPositioning } = (0, hooks_1.useThemeHooks)();
|
|
43
|
+
const { isSupported } = useAnchorPositioning();
|
|
44
|
+
if (isSupported) {
|
|
45
|
+
return react_1.default.createElement(AnchorTooltip_1.Tooltip, Object.assign({}, props, { arrowPosition: prepareArrowPosition(props.arrowPosition) }));
|
|
46
|
+
}
|
|
47
|
+
return react_1.default.createElement(JsTooltip_1.Tooltip, Object.assign({}, props));
|
|
71
48
|
}
|
|
72
49
|
exports.Tooltip = (0, react_1.memo)(TooltipComponent);
|
|
73
|
-
const
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
transform: translate(-32px, -6px);
|
|
79
|
-
left: anchor(center);
|
|
80
|
-
`
|
|
81
|
-
: arrowPosition === 'right'
|
|
82
|
-
? (0, styled_components_1.css) `
|
|
83
|
-
transform: translate(32px, -6px);
|
|
84
|
-
right: anchor(center);
|
|
85
|
-
`
|
|
86
|
-
: (0, styled_components_1.css) `
|
|
87
|
-
transform: translate(-50%, -6px);
|
|
88
|
-
left: anchor(center);
|
|
89
|
-
`}
|
|
90
|
-
|
|
91
|
-
${({ withArrow, arrowPosition }) => withArrow &&
|
|
92
|
-
(0, styled_components_1.css) `
|
|
93
|
-
&::after {
|
|
94
|
-
border-left: 14px solid transparent;
|
|
95
|
-
border-right: 14px solid transparent;
|
|
96
|
-
border-top-width: 8px;
|
|
97
|
-
border-top-style: solid;
|
|
98
|
-
border-radius: 2px;
|
|
99
|
-
bottom: 0;
|
|
100
|
-
${arrowPosition === 'left' && 'left: 16px; transform: translateY(100%);'}
|
|
101
|
-
${arrowPosition === 'center' && 'left: 50%; transform: translate(-50%, 100%);'}
|
|
102
|
-
${arrowPosition === 'right' && 'right: 16px; transform: translateY(100%);'}
|
|
103
|
-
}
|
|
104
|
-
`}
|
|
105
|
-
`,
|
|
106
|
-
bottom: (0, styled_components_1.css) `
|
|
107
|
-
top: anchor(bottom);
|
|
108
|
-
${({ withArrow, arrowPosition }) => withArrow && arrowPosition === 'left'
|
|
109
|
-
? (0, styled_components_1.css) `
|
|
110
|
-
transform: translate(-32px, 6px);
|
|
111
|
-
left: anchor(center);
|
|
112
|
-
`
|
|
113
|
-
: arrowPosition === 'right'
|
|
114
|
-
? (0, styled_components_1.css) `
|
|
115
|
-
transform: translate(32px, 6px);
|
|
116
|
-
right: anchor(center);
|
|
117
|
-
`
|
|
118
|
-
: (0, styled_components_1.css) `
|
|
119
|
-
transform: translate(-50%, 6px);
|
|
120
|
-
left: anchor(center);
|
|
121
|
-
`}
|
|
122
|
-
|
|
123
|
-
${({ withArrow, arrowPosition }) => withArrow &&
|
|
124
|
-
(0, styled_components_1.css) `
|
|
125
|
-
&::after {
|
|
126
|
-
border-left: 14px solid transparent;
|
|
127
|
-
border-right: 14px solid transparent;
|
|
128
|
-
border-bottom-width: 8px;
|
|
129
|
-
border-bottom-style: solid;
|
|
130
|
-
border-radius: 0 0 2px 2px;
|
|
131
|
-
top: 0;
|
|
132
|
-
${arrowPosition === 'left' && 'left: 16px; transform: translateY(-100%);'}
|
|
133
|
-
${arrowPosition === 'center' && 'left: 50%; transform: translate(-50%, -100%);'}
|
|
134
|
-
${arrowPosition === 'right' && 'right: 16px; transform: translateY(-100%);'}
|
|
135
|
-
}
|
|
136
|
-
`}
|
|
137
|
-
`,
|
|
138
|
-
left: (0, styled_components_1.css) `
|
|
139
|
-
transform: translate(-100%, -50%);
|
|
140
|
-
margin-left: -7px;
|
|
141
|
-
top: anchor(center);
|
|
142
|
-
left: anchor(left);
|
|
143
|
-
|
|
144
|
-
${({ withArrow }) => withArrow &&
|
|
145
|
-
(0, styled_components_1.css) `
|
|
146
|
-
&::after {
|
|
147
|
-
border-top: 14px solid transparent;
|
|
148
|
-
border-bottom: 14px solid transparent;
|
|
149
|
-
border-left-width: 8px;
|
|
150
|
-
border-left-style: solid;
|
|
151
|
-
border-radius: 2px 0 0 2px;
|
|
152
|
-
right: -9px;
|
|
153
|
-
top: 50%;
|
|
154
|
-
transform: translateY(-50%);
|
|
155
|
-
}
|
|
156
|
-
`}
|
|
157
|
-
`,
|
|
158
|
-
right: (0, styled_components_1.css) `
|
|
159
|
-
transform: translate(0, -50%);
|
|
160
|
-
margin-left: 7px;
|
|
161
|
-
top: anchor(center);
|
|
162
|
-
left: anchor(right);
|
|
163
|
-
|
|
164
|
-
${({ withArrow }) => withArrow &&
|
|
165
|
-
(0, styled_components_1.css) `
|
|
166
|
-
&::after {
|
|
167
|
-
border-top: 14px solid transparent;
|
|
168
|
-
border-bottom: 14px solid transparent;
|
|
169
|
-
border-right-width: 8px;
|
|
170
|
-
border-right-style: solid;
|
|
171
|
-
border-radius: 0 2px 2px 0;
|
|
172
|
-
left: -9px;
|
|
173
|
-
top: 50%;
|
|
174
|
-
transform: translateY(-50%);
|
|
175
|
-
}
|
|
176
|
-
`}
|
|
177
|
-
`,
|
|
50
|
+
const prepareArrowPosition = (arrowPosition) => {
|
|
51
|
+
if (arrowPosition === 'bottom' || arrowPosition === 'top') {
|
|
52
|
+
return 'center';
|
|
53
|
+
}
|
|
54
|
+
return arrowPosition;
|
|
178
55
|
};
|
|
179
|
-
const TooltipWrapper = styled_components_1.default.div.attrs(({ anchorName }) => ({
|
|
180
|
-
style: {
|
|
181
|
-
anchorName: anchorName,
|
|
182
|
-
},
|
|
183
|
-
})) `
|
|
184
|
-
display: flex;
|
|
185
|
-
`;
|
|
186
|
-
const TooltipBody = styled_components_1.default.span.attrs(({ anchorName }) => ({
|
|
187
|
-
style: {
|
|
188
|
-
positionAnchor: anchorName,
|
|
189
|
-
},
|
|
190
|
-
})) `
|
|
191
|
-
position: fixed;
|
|
192
|
-
min-width: 64px;
|
|
193
|
-
padding: var(--tooltip-padding);
|
|
194
|
-
max-width: var(--tooltip-max-width);
|
|
195
|
-
white-space: normal;
|
|
196
|
-
word-break: normal;
|
|
197
|
-
overflow-wrap: break-word;
|
|
198
|
-
text-align: left;
|
|
199
|
-
|
|
200
|
-
border-radius: var(--border-radius-md);
|
|
201
|
-
transition: opacity 0.3s ease-out;
|
|
202
|
-
|
|
203
|
-
font-size: var(--font-size-base);
|
|
204
|
-
line-height: var(--line-height-base);
|
|
205
|
-
|
|
206
|
-
z-index: var(--z-index-overlay);
|
|
207
|
-
|
|
208
|
-
&::after {
|
|
209
|
-
position: absolute;
|
|
210
|
-
|
|
211
|
-
content: ' ';
|
|
212
|
-
display: inline-block;
|
|
213
|
-
width: 0;
|
|
214
|
-
height: 0;
|
|
215
|
-
border-color: var(--tooltip-arrow-color, var(--tooltip-bg-color));
|
|
216
|
-
}
|
|
217
|
-
|
|
218
|
-
background: var(--tooltip-bg-color);
|
|
219
|
-
color: var(--tooltip-text-color);
|
|
220
|
-
border: var(--tooltip-border-width, 0) var(--tooltip-border-style, solid)
|
|
221
|
-
var(--tooltip-border-color, transparent);
|
|
222
|
-
box-shadow:
|
|
223
|
-
0px 8px 24px 8px #0000000a,
|
|
224
|
-
0px 4px 12px 0px #00000014;
|
|
225
|
-
|
|
226
|
-
width: ${({ width }) => width || 'max-content'};
|
|
227
|
-
|
|
228
|
-
${({ placement }) => (0, styled_components_1.css) `
|
|
229
|
-
${PLACEMENTS[placement]};
|
|
230
|
-
`}
|
|
231
|
-
`;
|
|
232
56
|
//# sourceMappingURL=Tooltip.js.map
|
|
@@ -199,18 +199,22 @@ function createMCPAction({ clientType, mcpConfig, translate, onClickCallback, })
|
|
|
199
199
|
return Object.assign(Object.assign({}, sharedProps), { buttonText: translate('page.actions.connectMcp.vscode', 'Connect to VS Code'), title: translate('page.actions.connectMcp.vscode', 'Connect to VS Code'), description: translate('page.actions.connectMcp.vscodeDescription', 'Install MCP server on VS Code'), iconComponent: VSCodeIcon_1.VSCodeIcon });
|
|
200
200
|
}
|
|
201
201
|
function shouldHidePageActions(pageProps, themeConfig, openapiExcludeFromSearch) {
|
|
202
|
-
var _a, _b, _c, _d, _e, _f, _g;
|
|
202
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
203
|
+
// Can't use any actions if search is globally disabled (markdown files are not generated)
|
|
204
|
+
if ((_a = themeConfig.search) === null || _a === void 0 ? void 0 : _a.hide) {
|
|
205
|
+
return true;
|
|
206
|
+
}
|
|
203
207
|
// Can't use any actions if no markdown files are generated for LLMs
|
|
204
|
-
if ((
|
|
208
|
+
if ((_c = (_b = pageProps === null || pageProps === void 0 ? void 0 : pageProps.seo) === null || _b === void 0 ? void 0 : _b.llmstxt) === null || _c === void 0 ? void 0 : _c.hide) {
|
|
205
209
|
return true;
|
|
206
210
|
}
|
|
207
211
|
// Page actions are explicitly disabled in config
|
|
208
|
-
if ((
|
|
212
|
+
if ((_e = (_d = themeConfig.navigation) === null || _d === void 0 ? void 0 : _d.actions) === null || _e === void 0 ? void 0 : _e.hide) {
|
|
209
213
|
return true;
|
|
210
214
|
}
|
|
211
215
|
// Page is excluded from search
|
|
212
|
-
const isOpenApiPage = ((
|
|
213
|
-
const isPageExcludedFromSearch = ((
|
|
216
|
+
const isOpenApiPage = ((_f = pageProps === null || pageProps === void 0 ? void 0 : pageProps.metadata) === null || _f === void 0 ? void 0 : _f.type) === 'openapi' || ((_g = pageProps === null || pageProps === void 0 ? void 0 : pageProps.metadata) === null || _g === void 0 ? void 0 : _g.subType) === 'openapi-operation';
|
|
217
|
+
const isPageExcludedFromSearch = ((_h = pageProps === null || pageProps === void 0 ? void 0 : pageProps.frontmatter) === null || _h === void 0 ? void 0 : _h.excludeFromSearch) || (isOpenApiPage && openapiExcludeFromSearch);
|
|
214
218
|
if (isPageExcludedFromSearch) {
|
|
215
219
|
return true;
|
|
216
220
|
}
|
|
@@ -5,6 +5,7 @@ const react_1 = require("react");
|
|
|
5
5
|
const ThemeDataContext_1 = require("../contexts/ThemeDataContext");
|
|
6
6
|
const use_telemetry_fallback_1 = require("./use-telemetry-fallback");
|
|
7
7
|
const fallbacks = {
|
|
8
|
+
useAnchorPositioning: () => ({ isSupported: false }),
|
|
8
9
|
useTranslate: () => ({
|
|
9
10
|
translate: (value, options) => (typeof options === 'string' ? options : options === null || options === void 0 ? void 0 : options.defaultValue) || value || '',
|
|
10
11
|
}),
|
|
@@ -16,6 +16,9 @@ import type { DrilldownMenuItemDetails } from './sidebar';
|
|
|
16
16
|
import { BffCatalogEntity, BffCatalogEntityList, BffCatalogRelatedEntity, BffCatalogRelatedEntityList, BffCatalogEntityRevision, BffCatalogEntityRevisionList } from './catalog';
|
|
17
17
|
import { AiSearchError } from '../constants/search';
|
|
18
18
|
export type ThemeHooks = {
|
|
19
|
+
useAnchorPositioning: () => {
|
|
20
|
+
isSupported: boolean;
|
|
21
|
+
};
|
|
19
22
|
useTranslate: () => {
|
|
20
23
|
translate: TFunction;
|
|
21
24
|
};
|
|
@@ -83,6 +86,7 @@ export type ThemeHooks = {
|
|
|
83
86
|
};
|
|
84
87
|
useAiSearch: (options?: {
|
|
85
88
|
filter?: SearchFilterItem[];
|
|
89
|
+
product?: string;
|
|
86
90
|
}) => {
|
|
87
91
|
askQuestion: (question: string, history?: AiSearchConversationItem[]) => void;
|
|
88
92
|
isGeneratingResponse: boolean;
|
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.back' | 'search.ai.assistant' | '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.feedback.title' | 'search.ai.feedback.detailsPlaceholder' | 'search.ai.feedback.thanks' | 'search.ai.toolResult.found' | 'search.ai.toolResult.found.documents' | 'search.ai.toolCall.searching' | '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' | 'search.ai.feedback.more' | 'search.searchItem.deprecated' | 'search.groups.all' | 'search.filter.field.footer' | 'aiAssistant.trigger' | 'toc.header' | 'footer.copyrightText' | 'page.homeButton' | 'page.forbidden.title' | 'page.forbidden.description' | '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' | 'catalog.backToAllLabel' | 'catalog.tags.more' | 'catalog.tags.label' | 'catalog.sort' | 'catalog.catalogs.label' | 'catalog.owners.label' | 'catalog.repositories.label' | 'catalog.email.label' | 'catalog.format.label' | 'catalog.entityType.label' | 'catalog.domains.label' | 'catalog.contact.label' | 'catalog.methodAndPath.label' | 'catalog.links.label' | 'catalog.metadata.domains' | 'catalog.metadata.owners' | 'catalog.history.button.label' | 'catalog.history.sidebar.title' | 'catalog.history.sidebar.close' | 'catalog.history.version.label' | 'catalog.history.version.notSpecified' | 'catalog.history.version.default' | 'catalog.history.revisions.limitMessage' | 'catalog.history.revision.current' | 'catalog.history.revisions.showLess' | 'catalog.history.revisions.showMore' | 'sidebar.menu.backLabel' | 'sidebar.menu.backToLabel' | 'sidebar.actions.show' | 'sidebar.actions.hide' | 'sidebar.actions.changeToSingleColumn' | 'sidebar.actions.changeToTwoColumns' | 'sidebar.actions.singleColumn' | 'sidebar.actions.twoColumns' | '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.maxLength' | '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' | 'page.actions.cursorMcpButtonText' | 'page.actions.cursorMcpTitle' | 'page.actions.cursorMcpDescription' | 'page.actions.connectMcp' | 'page.actions.connectMcp.cursor' | 'page.actions.connectMcp.cursorDescription' | 'page.actions.connectMcp.vscode' | 'page.actions.connectMcp.vscodeDescription' | 'page.actions.connectMcp.copyConfig' | 'page.actions.connectMcp.copyConfigDescription' | '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.discriminator.defaultMapping' | 'openapi.discriminator.defaultMappingTooltip' | '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' | 'openapi.schemaCatalogLink.title' | 'openapi.schemaCatalogLink.copyButtonTooltip' | 'openapi.schemaCatalogLink.copiedTooltip' | 'openapi.mcp.title' | 'openapi.mcp.endpoint' | 'openapi.mcp.tools' | 'openapi.mcp.protocolVersion' | 'openapi.mcp.capabilities' | 'openapi.mcp.experimentalCapabilities' | 'openapi.mcp.inputSchema' | 'openapi.mcp.inputExample' | 'openapi.mcp.outputSchema' | 'openapi.mcp.outputExample' | 'asyncapi.download.description.title' | 'asyncapi.info.title' | 'graphql.download.description.title' | 'graphql.info.title' | 'graphql.info.contact.url' | 'graphql.info.contact.name' | 'graphql.info.license' | 'graphql.info.termsOfService' | 'graphql.overview' | 'graphql.metadata' | 'graphql.key' | 'graphql.value' | '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.requiredScopes' | 'graphql.viewSecurityDetails' | 'graphql.objectScopes' | 'graphql.fieldScopes' | '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' | 'select.noResults' | 'loaders.loading' | 'filter.dateRange.from' | 'filter.dateRange.to' | 'mermaid.openFullscreen' | 'mermaid.zoomIn' | 'mermaid.zoomOut' | 'mermaid.reset' | 'mermaid.close' | 'mermaid.viewer';
|
|
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.back' | 'search.ai.assistant' | '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.feedback.title' | 'search.ai.feedback.detailsPlaceholder' | 'search.ai.feedback.thanks' | 'search.ai.toolResult.found' | 'search.ai.toolResult.found.documents' | 'search.ai.toolCall.searching' | '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' | 'search.ai.feedback.more' | 'search.searchItem.deprecated' | 'search.groups.all' | 'search.filter.field.footer' | 'aiAssistant.trigger' | 'toc.header' | 'footer.copyrightText' | 'page.homeButton' | 'page.forbidden.title' | 'page.forbidden.description' | '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' | 'catalog.backToAllLabel' | 'catalog.tags.more' | 'catalog.tags.label' | 'catalog.sort' | 'catalog.catalogs.label' | 'catalog.owners.label' | 'catalog.repositories.label' | 'catalog.email.label' | 'catalog.format.label' | 'catalog.entityType.label' | 'catalog.domains.label' | 'catalog.contact.label' | 'catalog.methodAndPath.label' | 'catalog.links.label' | 'catalog.metadata.domains' | 'catalog.metadata.owners' | 'catalog.history.button.label' | 'catalog.history.sidebar.title' | 'catalog.history.sidebar.close' | 'catalog.history.version.label' | 'catalog.history.version.notSpecified' | 'catalog.history.version.default' | 'catalog.history.revisions.limitMessage' | 'catalog.history.revision.current' | 'catalog.history.revisions.showLess' | 'catalog.history.revisions.showMore' | 'sidebar.menu.backLabel' | 'sidebar.menu.backToLabel' | 'sidebar.actions.show' | 'sidebar.actions.hide' | 'sidebar.actions.changeToSingleColumn' | 'sidebar.actions.changeToTwoColumns' | 'sidebar.actions.singleColumn' | 'sidebar.actions.twoColumns' | '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.maxLength' | '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' | 'page.actions.cursorMcpButtonText' | 'page.actions.cursorMcpTitle' | 'page.actions.cursorMcpDescription' | 'page.actions.connectMcp' | 'page.actions.connectMcp.cursor' | 'page.actions.connectMcp.cursorDescription' | 'page.actions.connectMcp.vscode' | 'page.actions.connectMcp.vscodeDescription' | 'page.actions.connectMcp.copyConfig' | 'page.actions.connectMcp.copyConfigDescription' | '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.languages.moreButton.tooltipText' | '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.discriminator.defaultMapping' | 'openapi.discriminator.defaultMappingTooltip' | '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' | 'openapi.schemaCatalogLink.title' | 'openapi.schemaCatalogLink.copyButtonTooltip' | 'openapi.schemaCatalogLink.copiedTooltip' | 'openapi.mcp.title' | 'openapi.mcp.endpoint' | 'openapi.mcp.tools' | 'openapi.mcp.protocolVersion' | 'openapi.mcp.capabilities' | 'openapi.mcp.experimentalCapabilities' | 'openapi.mcp.inputSchema' | 'openapi.mcp.inputExample' | 'openapi.mcp.outputSchema' | 'openapi.mcp.outputExample' | 'asyncapi.download.description.title' | 'asyncapi.info.title' | 'graphql.download.description.title' | 'graphql.info.title' | 'graphql.info.contact.url' | 'graphql.info.contact.name' | 'graphql.info.license' | 'graphql.info.termsOfService' | 'graphql.overview' | 'graphql.metadata' | 'graphql.key' | 'graphql.value' | '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.requiredScopes' | 'graphql.viewSecurityDetails' | 'graphql.objectScopes' | 'graphql.fieldScopes' | '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' | 'button.copy.tooltipText' | 'button.download.tooltipText' | 'button.externalLink.tooltipText' | 'button.email.tooltipText' | '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' | 'select.noResults' | 'loaders.loading' | 'filter.dateRange.from' | 'filter.dateRange.to' | 'mermaid.openFullscreen' | 'mermaid.zoomIn' | 'mermaid.zoomOut' | 'mermaid.reset' | 'mermaid.close' | 'mermaid.viewer';
|
|
3
3
|
export type Locale = {
|
|
4
4
|
code: string;
|
|
5
5
|
name: string;
|