@redocly/theme 0.53.0-next.2 → 0.53.0-next.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/components/CodeBlock/CodeBlockControls.js +9 -6
- package/lib/components/JsonViewer/JsonViewer.d.ts +1 -0
- package/lib/components/JsonViewer/JsonViewer.js +12 -10
- package/lib/components/LastUpdated/LastUpdated.d.ts +2 -7
- package/lib/components/LastUpdated/LastUpdated.js +12 -12
- package/lib/components/Menu/MenuItem.js +2 -2
- package/lib/components/Panel/variables.js +1 -0
- package/lib/components/SidebarActions/SidebarActions.d.ts +2 -2
- package/lib/components/SidebarActions/SidebarActions.js +2 -2
- package/lib/components/Tag/Tag.d.ts +3 -1
- package/lib/components/Tag/variables.dark.js +13 -0
- package/lib/components/Tag/variables.js +59 -0
- package/lib/components/Tooltip/TooltipWrapper.d.ts +12 -0
- package/lib/components/Tooltip/TooltipWrapper.js +36 -0
- package/lib/core/hooks/__mocks__/index.d.ts +1 -0
- package/lib/core/hooks/__mocks__/index.js +1 -0
- package/lib/core/hooks/__mocks__/use-time-ago.d.ts +3 -0
- package/lib/core/hooks/__mocks__/use-time-ago.js +7 -0
- package/lib/core/hooks/index.d.ts +1 -0
- package/lib/core/hooks/index.js +1 -0
- package/lib/core/hooks/use-time-ago.d.ts +3 -0
- package/lib/core/hooks/use-time-ago.js +40 -0
- package/lib/core/types/common.d.ts +1 -0
- package/lib/core/types/common.js +3 -0
- package/lib/core/types/hooks.d.ts +1 -1
- package/lib/core/types/index.d.ts +1 -0
- package/lib/core/types/index.js +1 -0
- package/lib/core/types/l10n.d.ts +1 -1
- package/lib/icons/ArrowDownIcon/ArrowDownIcon.d.ts +9 -0
- package/lib/icons/ArrowDownIcon/ArrowDownIcon.js +22 -0
- package/lib/icons/CurveAutoColonIcon/CurveAutoColonIcon.d.ts +9 -0
- package/lib/icons/CurveAutoColonIcon/CurveAutoColonIcon.js +22 -0
- package/lib/icons/KafkaIcon/KafkaIcon.d.ts +9 -0
- package/lib/icons/KafkaIcon/KafkaIcon.js +26 -0
- package/lib/index.d.ts +3 -0
- package/lib/index.js +3 -0
- package/package.json +3 -3
- package/src/components/CodeBlock/CodeBlockControls.tsx +27 -22
- package/src/components/JsonViewer/JsonViewer.tsx +15 -9
- package/src/components/LastUpdated/LastUpdated.tsx +18 -13
- package/src/components/Menu/MenuItem.tsx +2 -2
- package/src/components/Panel/variables.ts +1 -0
- package/src/components/SidebarActions/SidebarActions.tsx +3 -3
- package/src/components/Tag/Tag.tsx +4 -0
- package/src/components/Tag/variables.dark.ts +13 -0
- package/src/components/Tag/variables.ts +59 -0
- package/src/components/Tooltip/TooltipWrapper.tsx +71 -0
- package/src/core/hooks/__mocks__/index.ts +1 -0
- package/src/core/hooks/__mocks__/use-time-ago.ts +3 -0
- package/src/core/hooks/index.ts +1 -0
- package/src/core/hooks/use-time-ago.ts +54 -0
- package/src/core/styles/dark.ts +1 -0
- package/src/core/styles/global.ts +1 -0
- package/src/core/types/common.ts +1 -0
- package/src/core/types/hooks.ts +6 -1
- package/src/core/types/index.ts +1 -0
- package/src/core/types/l10n.ts +18 -1
- package/src/icons/ArrowDownIcon/ArrowDownIcon.tsx +33 -0
- package/src/icons/CurveAutoColonIcon/CurveAutoColonIcon.tsx +26 -0
- package/src/icons/KafkaIcon/KafkaIcon.tsx +33 -0
- package/src/index.ts +3 -0
|
@@ -8,6 +8,7 @@ const react_1 = __importDefault(require("react"));
|
|
|
8
8
|
const styled_components_1 = __importDefault(require("styled-components"));
|
|
9
9
|
const CodeBlockTabs_1 = require("../../components/CodeBlock/CodeBlockTabs");
|
|
10
10
|
const CopyButton_1 = require("../../components/Buttons/CopyButton");
|
|
11
|
+
const TooltipWrapper_1 = require("../../components/Tooltip/TooltipWrapper");
|
|
11
12
|
const hooks_1 = require("../../core/hooks");
|
|
12
13
|
const DeselectIcon_1 = require("../../icons/DeselectIcon/DeselectIcon");
|
|
13
14
|
const MaximizeIcon_1 = require("../../icons/MaximizeIcon/MaximizeIcon");
|
|
@@ -33,16 +34,18 @@ function CodeBlockControls({ children, className, title, controls, tabs, }) {
|
|
|
33
34
|
title && react_1.default.createElement(Title, null, title),
|
|
34
35
|
tabs && react_1.default.createElement(CodeBlockTabs_1.CodeBlockTabs, { tabs: tabs }),
|
|
35
36
|
react_1.default.createElement(ControlsWrapper, null,
|
|
36
|
-
report && !((_a = report === null || report === void 0 ? void 0 : report.props) === null || _a === void 0 ? void 0 : _a.hide) ? (react_1.default.createElement(
|
|
37
|
+
report && !((_a = report === null || report === void 0 ? void 0 : report.props) === null || _a === void 0 ? void 0 : _a.hide) ? (react_1.default.createElement(TooltipWrapper_1.TooltipWrapper, { tooltipKey: "codeSnippet.report.tooltipText", placement: "top" },
|
|
38
|
+
react_1.default.createElement(ControlButton, Object.assign({ variant: "text", size: "small", "data-testid": "report-button", icon: controlsType === 'icon' ? react_1.default.createElement(WarningSquareIcon_1.WarningSquareIcon, { size: "18px" }) : undefined }, report.props), controlsType != 'icon' && (((_b = report.props) === null || _b === void 0 ? void 0 : _b.buttonText) || 'Report')))) : null,
|
|
37
39
|
expand && !((_c = codeSnippet === null || codeSnippet === void 0 ? void 0 : codeSnippet.expand) === null || _c === void 0 ? void 0 : _c.hide) ? (react_1.default.createElement(ControlButton, { variant: "text", size: "small", "data-testid": "expand-all", icon: controlsType === 'icon' ? react_1.default.createElement(MaximizeIcon_1.MaximizeIcon, null) : undefined, onClick: expand === null || expand === void 0 ? void 0 : expand.onClick }, controlsType !== 'icon' && ((expand === null || expand === void 0 ? void 0 : expand.label) || 'Expand all'))) : null,
|
|
38
40
|
collapse && !((_d = codeSnippet === null || codeSnippet === void 0 ? void 0 : codeSnippet.collapse) === null || _d === void 0 ? void 0 : _d.hide) ? (react_1.default.createElement(ControlButton, { variant: "text", size: "small", "data-testid": "collapse-all", icon: controlsType === 'icon' ? react_1.default.createElement(MinimizeIcon_1.MinimizeIcon, null) : undefined, onClick: collapse === null || collapse === void 0 ? void 0 : collapse.onClick }, controlsType !== 'icon' && ((expand === null || expand === void 0 ? void 0 : expand.label) || 'Collapse all'))) : null,
|
|
39
41
|
select ? (react_1.default.createElement(ControlButton, { variant: "text", size: "small", "data-testid": "select-all", icon: controlsType === 'icon' ? react_1.default.createElement(SelectIcon_1.SelectIcon, null) : undefined, onClick: select === null || select === void 0 ? void 0 : select.onClick }, controlsType !== 'icon' && (select === null || select === void 0 ? void 0 : select.label) ? select.label : 'Select all')) : null,
|
|
40
42
|
deselect ? (react_1.default.createElement(ControlButton, { variant: "text", size: "small", "data-testid": "clear-all", icon: controlsType === 'icon' ? react_1.default.createElement(DeselectIcon_1.DeselectIcon, null) : undefined, onClick: deselect === null || deselect === void 0 ? void 0 : deselect.onClick }, controlsType !== 'icon' && (deselect === null || deselect === void 0 ? void 0 : deselect.label) ? deselect.label : 'Clear all')) : null,
|
|
41
|
-
copy && !((_e = codeSnippet === null || codeSnippet === void 0 ? void 0 : codeSnippet.copy) === null || _e === void 0 ? void 0 : _e.hide) ? (react_1.default.createElement(
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
43
|
+
copy && !((_e = codeSnippet === null || codeSnippet === void 0 ? void 0 : codeSnippet.copy) === null || _e === void 0 ? void 0 : _e.hide) ? (react_1.default.createElement(TooltipWrapper_1.TooltipWrapper, { tooltipKey: "codeSnippet.copy.tooltipText", placement: "top" },
|
|
44
|
+
react_1.default.createElement(CopyButton_1.CopyButton, { data: copy.data, "data-source": copy.dataSource, "data-hash": copy.dataHash, type: controlsType, toasterPlacement: copy.toasterPlacement, toasterDuration: copy.toasterDuration, buttonText: copy.label, onCopyClick: () => {
|
|
45
|
+
var _a, _b;
|
|
46
|
+
(_a = copy === null || copy === void 0 ? void 0 : copy.onClick) === null || _a === void 0 ? void 0 : _a.call(copy);
|
|
47
|
+
(_b = telemetry === null || telemetry === void 0 ? void 0 : telemetry.send) === null || _b === void 0 ? void 0 : _b.call(telemetry, 'code_snippet_copied', {});
|
|
48
|
+
} }))) : null))) : null;
|
|
46
49
|
return children || controls ? (react_1.default.createElement(ContainerWrapper, { "data-component-name": "CodeBlock/CodeBlockControls", className: className }, children ? children : defaultControls)) : null;
|
|
47
50
|
}
|
|
48
51
|
const ContainerWrapper = styled_components_1.default.div `
|
|
@@ -31,7 +31,7 @@ const react_1 = __importStar(require("react"));
|
|
|
31
31
|
const styled_components_1 = __importDefault(require("styled-components"));
|
|
32
32
|
const CodeBlock_1 = require("../../components/CodeBlock/CodeBlock");
|
|
33
33
|
const helpers_1 = require("./helpers");
|
|
34
|
-
function JsonComponent({ data, expandLevel = 1, className, onCopyClick, title, }) {
|
|
34
|
+
function JsonComponent({ data, expandLevel = 1, className, onCopyClick, title, hideHeader, }) {
|
|
35
35
|
const showFoldingButtons = data && Object.values(data).some((value) => typeof value === 'object' && value !== null);
|
|
36
36
|
const [expandAllSignal, setExpandAllSignal] = react_1.default.useState(undefined);
|
|
37
37
|
const expandAll = () => {
|
|
@@ -48,15 +48,17 @@ function JsonComponent({ data, expandLevel = 1, className, onCopyClick, title, }
|
|
|
48
48
|
};
|
|
49
49
|
const source = JSON.stringify(data, null, 2);
|
|
50
50
|
return (react_1.default.createElement(exports.JsonViewerWrap, { "data-testid": "json-viewer", "data-component-name": "JsonViewer/JsonViewer", className: className },
|
|
51
|
-
react_1.default.createElement(CodeBlock_1.CodeBlock, { header:
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
51
|
+
react_1.default.createElement(CodeBlock_1.CodeBlock, { header: hideHeader
|
|
52
|
+
? undefined
|
|
53
|
+
: {
|
|
54
|
+
title,
|
|
55
|
+
className: 'code-block-header',
|
|
56
|
+
controls: {
|
|
57
|
+
copy: { data, onClick: onCopyClick, handleOutside: true },
|
|
58
|
+
expand: showFoldingButtons ? { onClick: expandAll } : undefined,
|
|
59
|
+
collapse: showFoldingButtons ? { onClick: collapseAll } : undefined,
|
|
60
|
+
},
|
|
61
|
+
}, source: source },
|
|
60
62
|
react_1.default.createElement(FoldingWrap, null,
|
|
61
63
|
react_1.default.createElement(helpers_1.JsonValue, { value: data, level: 0, standalone: true, expandAllSignal: expandAllSignal, defaultExpandLevel: Math.max(1, expandLevel) })))));
|
|
62
64
|
}
|
|
@@ -1,12 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
timeago: (date: Date, locale: string) => string;
|
|
3
|
-
iso: (date: Date) => string;
|
|
4
|
-
short: (date: Date, locale: string) => string;
|
|
5
|
-
long: (date: Date, locale: string) => string;
|
|
6
|
-
};
|
|
1
|
+
type Formats = 'timeago' | 'iso' | 'short' | 'long';
|
|
7
2
|
export type LastUpdatedProps = {
|
|
8
3
|
lastModified: Date;
|
|
9
|
-
format?:
|
|
4
|
+
format?: Formats;
|
|
10
5
|
locale?: string;
|
|
11
6
|
className?: string;
|
|
12
7
|
};
|
|
@@ -27,22 +27,22 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
27
27
|
};
|
|
28
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
29
|
exports.LastUpdated = LastUpdated;
|
|
30
|
-
const
|
|
30
|
+
const react_1 = __importStar(require("react"));
|
|
31
31
|
const styled_components_1 = __importDefault(require("styled-components"));
|
|
32
|
-
const timeago_js_1 = require("timeago.js");
|
|
33
|
-
const hooks_1 = require("../../core/hooks");
|
|
34
32
|
const constants_1 = require("../../core/constants");
|
|
35
|
-
const
|
|
36
|
-
timeago: (date, locale) => (0, timeago_js_1.format)(date, locale),
|
|
37
|
-
iso: (date) => date.toISOString().split('T')[0],
|
|
38
|
-
short: (date, locale) => date.toLocaleDateString(locale, { month: 'short', day: 'numeric', year: 'numeric' }),
|
|
39
|
-
long: (date, locale) => date.toLocaleDateString(locale, { month: 'long', day: 'numeric', year: 'numeric' }),
|
|
40
|
-
};
|
|
33
|
+
const hooks_1 = require("../../core/hooks");
|
|
41
34
|
function LastUpdated(props) {
|
|
42
35
|
const { markdown: { lastUpdatedBlock = {} } = {} } = (0, hooks_1.useThemeConfig)();
|
|
43
36
|
const { useTranslate, useL10nConfig } = (0, hooks_1.useThemeHooks)();
|
|
37
|
+
const { format: timeagoFormat } = (0, hooks_1.useTimeAgo)();
|
|
44
38
|
const { translate } = useTranslate();
|
|
45
39
|
const { currentLocale } = useL10nConfig();
|
|
40
|
+
const formats = (0, react_1.useMemo)(() => ({
|
|
41
|
+
timeago: (date) => timeagoFormat(date),
|
|
42
|
+
iso: (date) => date.toISOString().split('T')[0],
|
|
43
|
+
short: (date, locale) => date.toLocaleDateString(locale, { month: 'short', day: 'numeric', year: 'numeric' }),
|
|
44
|
+
long: (date, locale) => date.toLocaleDateString(locale, { month: 'long', day: 'numeric', year: 'numeric' }),
|
|
45
|
+
}), [timeagoFormat]);
|
|
46
46
|
if (lastUpdatedBlock === null || lastUpdatedBlock === void 0 ? void 0 : lastUpdatedBlock.hide) {
|
|
47
47
|
return null;
|
|
48
48
|
}
|
|
@@ -52,15 +52,15 @@ function LastUpdated(props) {
|
|
|
52
52
|
lastUpdatedBlock.locale ||
|
|
53
53
|
(currentLocale !== constants_1.DEFAULT_LOCALE_PLACEHOLDER ? currentLocale || 'en-US' : 'en-US');
|
|
54
54
|
const isoDate = lastModified.toISOString().split('T')[0];
|
|
55
|
-
const lastUpdatedString =
|
|
55
|
+
const lastUpdatedString = formats[format](lastModified, locale);
|
|
56
56
|
const translationKey = format === 'timeago' ? 'page.lastUpdated.timeago' : 'page.lastUpdated.on';
|
|
57
57
|
const text = format === 'timeago'
|
|
58
58
|
? translate(translationKey, 'Last updated') + ' '
|
|
59
59
|
: translate(translationKey, 'Last updated on');
|
|
60
|
-
return (
|
|
60
|
+
return (react_1.default.createElement(LastUpdatedWrapper, { className: props.className, "data-component-name": "LastUpdated/LastUpdated", rawOnPrint: format === 'timeago', "data-print-datetime": isoDate, "data-translation-key": translationKey },
|
|
61
61
|
text,
|
|
62
62
|
" ",
|
|
63
|
-
|
|
63
|
+
react_1.default.createElement("time", { dateTime: isoDate }, lastUpdatedString)));
|
|
64
64
|
}
|
|
65
65
|
const LastUpdatedWrapper = styled_components_1.default.div `
|
|
66
66
|
color: var(--last-updated-text-color);
|
|
@@ -51,7 +51,7 @@ function MenuItem(props) {
|
|
|
51
51
|
const isDrilldown = type === constants_1.MenuItemType.DrillDown;
|
|
52
52
|
const isNested = type === constants_1.MenuItemType.Group;
|
|
53
53
|
const hasChevron = isNested && !isDrilldown;
|
|
54
|
-
const
|
|
54
|
+
const hasHttpTag = !!item.httpVerb || type === constants_1.MenuItemType.Operation;
|
|
55
55
|
const handleOnClick = () => {
|
|
56
56
|
var _a;
|
|
57
57
|
(_a = telemetry.send) === null || _a === void 0 ? void 0 : _a.call(telemetry, 'sidebar_item_clicked', { label: item.label, type: item.type });
|
|
@@ -72,7 +72,7 @@ function MenuItem(props) {
|
|
|
72
72
|
item.external ? react_1.default.createElement(LaunchIcon_1.LaunchIcon, { size: "var(--menu-item-external-icon-size)" }) : null),
|
|
73
73
|
item.sublabel ? (react_1.default.createElement(MenuItemSubLabel, null, translate(item.subLabelTranslationKey, item.sublabel))) : null),
|
|
74
74
|
isDrilldown ? react_1.default.createElement(ArrowRightIcon_1.ArrowRightIcon, { size: "12px" }) : null,
|
|
75
|
-
|
|
75
|
+
hasHttpTag ? (react_1.default.createElement(HttpTag_1.HttpTag, { color: httpColor || '' }, item.httpVerb === 'hook' ? 'event' : item.httpVerb)) : null));
|
|
76
76
|
return (react_1.default.createElement(MenuItemWrapper, { "data-component-name": "Menu/MenuItem", className: generateClassName({ type, item, className }) },
|
|
77
77
|
item.link ? (react_1.default.createElement(MenuItemLink, { to: item.link, external: item.external, target: item.target, languageInsensitive: item.languageInsensitive }, label)) : (label),
|
|
78
78
|
isNested ? (react_1.default.createElement(MenuItemNestedWrapper, { depth: depth, ref: nestedMenuRef, style: style }, isExpanded || !canUnmount ? props.children : null)) : null,
|
|
@@ -333,6 +333,7 @@ exports.apiReferencePanels = (0, styled_components_1.css) `
|
|
|
333
333
|
.panel-servers-list,
|
|
334
334
|
.panel-request-samples,
|
|
335
335
|
.panel-response-samples,
|
|
336
|
+
.panel-messages-samples,
|
|
336
337
|
.panel-callback-samples {
|
|
337
338
|
--text-color: var(--panel-samples-text-color);
|
|
338
339
|
--panel-text-color: var(--panel-samples-text-color); // @presenter Color
|
|
@@ -4,11 +4,11 @@ export { LayoutVariant };
|
|
|
4
4
|
export type SidebarActionsProps = {
|
|
5
5
|
layout: LayoutVariant;
|
|
6
6
|
collapsedSidebar: boolean;
|
|
7
|
-
|
|
7
|
+
isApiDocs: boolean;
|
|
8
8
|
hideCollapseSidebarButton?: boolean;
|
|
9
9
|
onChangeViewClick: () => void;
|
|
10
10
|
onChangeCollapseSidebarClick: () => void;
|
|
11
11
|
requestAccessButton?: React.ReactElement | null;
|
|
12
12
|
className?: string;
|
|
13
13
|
};
|
|
14
|
-
export declare const SidebarActions: ({ layout, hideCollapseSidebarButton, collapsedSidebar,
|
|
14
|
+
export declare const SidebarActions: ({ layout, hideCollapseSidebarButton, collapsedSidebar, isApiDocs, onChangeViewClick, onChangeCollapseSidebarClick, requestAccessButton, className, }: SidebarActionsProps) => React.JSX.Element;
|
|
@@ -13,7 +13,7 @@ const Button_1 = require("../../components/Button/Button");
|
|
|
13
13
|
const SidePanelCloseIcon_1 = require("../../icons/SidePanelCloseIcon/SidePanelCloseIcon");
|
|
14
14
|
const SidePanelOpenIcon_1 = require("../../icons/SidePanelOpenIcon/SidePanelOpenIcon");
|
|
15
15
|
const styled_1 = require("../../components/SidebarActions/styled");
|
|
16
|
-
const SidebarActions = ({ layout, hideCollapseSidebarButton = false, collapsedSidebar,
|
|
16
|
+
const SidebarActions = ({ layout, hideCollapseSidebarButton = false, collapsedSidebar, isApiDocs, onChangeViewClick, onChangeCollapseSidebarClick, requestAccessButton, className, }) => {
|
|
17
17
|
const { useTelemetry, useTranslate } = (0, hooks_1.useThemeHooks)();
|
|
18
18
|
const { translate } = useTranslate();
|
|
19
19
|
const telemetry = useTelemetry();
|
|
@@ -30,7 +30,7 @@ const SidebarActions = ({ layout, hideCollapseSidebarButton = false, collapsedSi
|
|
|
30
30
|
}, title: collapsedSidebar
|
|
31
31
|
? translate('sidebar.actions.show', 'Show sidebar')
|
|
32
32
|
: translate('sidebar.actions.hide', 'Hide sidebar'), size: "small", variant: "outlined", icon: collapsedSidebar ? react_1.default.createElement(SidePanelOpenIcon_1.SidePanelOpenIcon, null) : react_1.default.createElement(SidePanelCloseIcon_1.SidePanelCloseIcon, null) })),
|
|
33
|
-
|
|
33
|
+
isApiDocs && (react_1.default.createElement(styled_1.ControlsWrapChangeLayoutButtons, { isCollapsed: collapsedSidebar },
|
|
34
34
|
react_1.default.createElement(ChangeViewButton_1.ChangeViewButton, { collapsedSidebar: collapsedSidebar, layout: layout, onClick: () => {
|
|
35
35
|
var _a;
|
|
36
36
|
onChangeViewClick();
|
|
@@ -3,8 +3,10 @@ type DefaultStatusColor = 'success' | 'processing' | 'error' | 'warning' | 'defa
|
|
|
3
3
|
type ActionStatusColor = 'approved' | 'declined' | 'pending';
|
|
4
4
|
type SubjectStatusColor = 'active' | 'draft' | 'deprecated' | 'product';
|
|
5
5
|
type HttpColor = 'get' | 'post' | 'put' | 'delete' | 'option' | 'patch' | 'head' | 'hook' | 'link';
|
|
6
|
+
type ActionColor = 'receive' | 'send';
|
|
7
|
+
type ChannelColor = 'channel';
|
|
6
8
|
type HttpStatusColor = 'http-deprecated';
|
|
7
|
-
type StatusColor = DefaultStatusColor | ActionStatusColor | SubjectStatusColor | HttpColor | HttpStatusColor;
|
|
9
|
+
type StatusColor = DefaultStatusColor | ActionStatusColor | SubjectStatusColor | HttpColor | ActionColor | ChannelColor | HttpStatusColor;
|
|
8
10
|
type Color = 'red' | 'green' | 'blue' | 'grey' | 'gold' | 'cyan' | 'magenta' | 'purple' | 'lime' | 'geekblue' | 'yellow';
|
|
9
11
|
export type TagProps = {
|
|
10
12
|
className?: string;
|
|
@@ -24,6 +24,19 @@ exports.tagDarkMode = (0, styled_components_1.css) `
|
|
|
24
24
|
--tag-operation-color-options: #1a1c21; // @presenter Color
|
|
25
25
|
--tag-operation-bg-color-options: #2a2b33; // @presenter Color
|
|
26
26
|
|
|
27
|
+
--tag-action-color-receive: #4db144; // @presenter Color
|
|
28
|
+
--tag-action-color-sub: #4db144; // @presenter Color
|
|
29
|
+
--tag-action-color-consume: #4db144; // @presenter Color
|
|
30
|
+
|
|
31
|
+
--tag-action-color-send: #4144F6; // @presenter Color
|
|
32
|
+
--tag-action-color-pub: #4144F6; // @presenter Color
|
|
33
|
+
--tag-action-color-publish: #4144f6; // @presenter Color
|
|
34
|
+
|
|
35
|
+
--tag-action-color-channel: #F0870E; // @presenter Color
|
|
36
|
+
--tag-action-color-topic: #F0870E; // @presenter Color
|
|
37
|
+
--tag-action-color-queue: #D72E81; // @presenter Color
|
|
38
|
+
--tag-action-color-exchange: #C79CF2; // @presenter Color
|
|
39
|
+
|
|
27
40
|
.tag-grey,
|
|
28
41
|
.tag-draft,
|
|
29
42
|
.tag-schema,
|
|
@@ -197,9 +197,23 @@ exports.tag = (0, styled_components_1.css) `
|
|
|
197
197
|
|
|
198
198
|
--tag-operation-color-deprecated: var(--text-color-disabled); // @presenter Color
|
|
199
199
|
|
|
200
|
+
--tag-action-color-receive: #4db144; // @presenter Color
|
|
201
|
+
--tag-action-color-sub: #4db144; // @presenter Color
|
|
202
|
+
--tag-action-color-consume: #4db144; // @presenter Color
|
|
203
|
+
|
|
204
|
+
--tag-action-color-send: #4144f6; // @presenter Color
|
|
205
|
+
--tag-action-color-pub: #4144f6; // @presenter Color
|
|
206
|
+
--tag-action-color-publish: #4144f6; // @presenter Color
|
|
207
|
+
|
|
208
|
+
--tag-action-color-channel: #F0870E; // @presenter Color
|
|
209
|
+
--tag-action-color-topic: #F0870E; // @presenter Color
|
|
210
|
+
--tag-action-color-queue: #D72E81; // @presenter Color
|
|
211
|
+
--tag-action-color-exchange: #9B51E0; // @presenter Color
|
|
212
|
+
|
|
200
213
|
.tag-delete {
|
|
201
214
|
--tag-color: var(--tag-operation-color-delete); // @presenter Color
|
|
202
215
|
}
|
|
216
|
+
|
|
203
217
|
.tag-get {
|
|
204
218
|
--tag-color: var(--tag-operation-color-get); // @presenter Color
|
|
205
219
|
}
|
|
@@ -219,7 +233,52 @@ exports.tag = (0, styled_components_1.css) `
|
|
|
219
233
|
.tag-http-deprecated {
|
|
220
234
|
--tag-color: var(--tag-operation-color-deprecated) // @presenter Color
|
|
221
235
|
}
|
|
236
|
+
|
|
237
|
+
.tag-receive {
|
|
238
|
+
--tag-color: var(--tag-action-color-receive); // @presenter Color
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
.tag-send {
|
|
242
|
+
--tag-color: var(--tag-action-color-send); // @presenter Color
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
.tag-pub {
|
|
246
|
+
--tag-color: var(--tag-action-color-pub); // @presenter Color
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
.tag-sub {
|
|
250
|
+
--tag-color: var(--tag-action-color-sub); // @presenter Color
|
|
251
|
+
}
|
|
222
252
|
|
|
253
|
+
.tag-consume {
|
|
254
|
+
--tag-color: var(--tag-action-color-consume); // @presenter Color
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
.tag-publish {
|
|
258
|
+
--tag-color: var(--tag-action-color-publish); // @presenter Color
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
.tag-channel {
|
|
262
|
+
--tag-color: var(--tag-action-color-channel); // @presenter Color
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
.tag-topic {
|
|
266
|
+
--tag-color: var(--tag-action-color-channel); // @presenter Color
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
.tag-queue {
|
|
270
|
+
--tag-color: var(--tag-action-color-queue); // @presenter Color
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
.tag-exchange {
|
|
274
|
+
--tag-color: var(--tag-action-color-exchange); // @presenter Color
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
// shorten alias for exchange tag:
|
|
278
|
+
.tag-exch {
|
|
279
|
+
--tag-color: var(--tag-action-color-exchange); // @presenter Color
|
|
280
|
+
}
|
|
281
|
+
|
|
223
282
|
// @tokens End
|
|
224
283
|
`;
|
|
225
284
|
//# sourceMappingURL=variables.js.map
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ReactElement } from 'react';
|
|
2
|
+
import type { TooltipProps } from '../../components/Tooltip/Tooltip';
|
|
3
|
+
export type TooltipWrapperProps = {
|
|
4
|
+
children: ReactElement;
|
|
5
|
+
tooltipKey: string;
|
|
6
|
+
placement?: TooltipProps['placement'];
|
|
7
|
+
width?: string;
|
|
8
|
+
className?: string;
|
|
9
|
+
showOnHover?: boolean;
|
|
10
|
+
disabled?: boolean;
|
|
11
|
+
};
|
|
12
|
+
export declare function TooltipWrapper({ children, tooltipKey, placement, width, className, showOnHover, disabled, }: TooltipWrapperProps): JSX.Element;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.TooltipWrapper = TooltipWrapper;
|
|
7
|
+
const styled_components_1 = __importDefault(require("styled-components"));
|
|
8
|
+
const react_1 = __importDefault(require("react"));
|
|
9
|
+
const hooks_1 = require("../../core/hooks");
|
|
10
|
+
const Tooltip_1 = require("../../components/Tooltip/Tooltip");
|
|
11
|
+
function TooltipWrapper({ children, tooltipKey, placement = 'top', width = 'max-content', className = '', showOnHover = true, disabled = false, }) {
|
|
12
|
+
const { useTranslate } = (0, hooks_1.useThemeHooks)();
|
|
13
|
+
const tooltip = (0, hooks_1.useControl)();
|
|
14
|
+
const { translate } = useTranslate();
|
|
15
|
+
const handleMouseEnter = () => {
|
|
16
|
+
if (showOnHover && !disabled) {
|
|
17
|
+
tooltip.handleOpen();
|
|
18
|
+
}
|
|
19
|
+
};
|
|
20
|
+
const handleMouseLeave = () => {
|
|
21
|
+
if (showOnHover) {
|
|
22
|
+
tooltip.handleClose();
|
|
23
|
+
}
|
|
24
|
+
};
|
|
25
|
+
const handleClick = () => {
|
|
26
|
+
if (showOnHover) {
|
|
27
|
+
tooltip.handleClose();
|
|
28
|
+
}
|
|
29
|
+
};
|
|
30
|
+
return (react_1.default.createElement(Tooltip_1.Tooltip, { className: className, tip: translate(tooltipKey), isOpen: tooltip.isOpened, placement: placement, width: width },
|
|
31
|
+
react_1.default.createElement(TooltipEventWrapper, { onMouseEnter: handleMouseEnter, onMouseLeave: handleMouseLeave, onClick: handleClick }, children)));
|
|
32
|
+
}
|
|
33
|
+
const TooltipEventWrapper = styled_components_1.default.div `
|
|
34
|
+
display: contents;
|
|
35
|
+
`;
|
|
36
|
+
//# sourceMappingURL=TooltipWrapper.js.map
|
|
@@ -24,3 +24,4 @@ export * from '../../../core/hooks/use-product-picker';
|
|
|
24
24
|
export * from '../../../core/hooks/search/use-search-dialog';
|
|
25
25
|
export * from '../../../core/hooks/use-language-picker';
|
|
26
26
|
export * from '../../../core/hooks/__mocks__/use-element-size';
|
|
27
|
+
export * from '../../../core/hooks/__mocks__/use-time-ago';
|
|
@@ -40,4 +40,5 @@ __exportStar(require("../../../core/hooks/use-product-picker"), exports);
|
|
|
40
40
|
__exportStar(require("../../../core/hooks/search/use-search-dialog"), exports);
|
|
41
41
|
__exportStar(require("../../../core/hooks/use-language-picker"), exports);
|
|
42
42
|
__exportStar(require("../../../core/hooks/__mocks__/use-element-size"), exports);
|
|
43
|
+
__exportStar(require("../../../core/hooks/__mocks__/use-time-ago"), exports);
|
|
43
44
|
//# sourceMappingURL=index.js.map
|
|
@@ -34,3 +34,4 @@ export * from '../../core/hooks/code-walkthrough/use-code-walkthrough-controls';
|
|
|
34
34
|
export * from '../../core/hooks/code-walkthrough/use-code-panel';
|
|
35
35
|
export * from '../../core/hooks/code-walkthrough/use-renderable-files';
|
|
36
36
|
export * from '../../core/hooks/use-element-size';
|
|
37
|
+
export * from '../../core/hooks/use-time-ago';
|
package/lib/core/hooks/index.js
CHANGED
|
@@ -50,4 +50,5 @@ __exportStar(require("../../core/hooks/code-walkthrough/use-code-walkthrough-con
|
|
|
50
50
|
__exportStar(require("../../core/hooks/code-walkthrough/use-code-panel"), exports);
|
|
51
51
|
__exportStar(require("../../core/hooks/code-walkthrough/use-renderable-files"), exports);
|
|
52
52
|
__exportStar(require("../../core/hooks/use-element-size"), exports);
|
|
53
|
+
__exportStar(require("../../core/hooks/use-time-ago"), exports);
|
|
53
54
|
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.useTimeAgo = useTimeAgo;
|
|
4
|
+
const react_1 = require("react");
|
|
5
|
+
const hooks_1 = require("../../core/hooks");
|
|
6
|
+
const timeUnits = ['second', 'minute', 'hour', 'day', 'week', 'month', 'year'];
|
|
7
|
+
const timeUnitConversions = [
|
|
8
|
+
60, // 60 seconds in 1 min
|
|
9
|
+
60, // 60 mins in 1 hour
|
|
10
|
+
24, // 24 hours in 1 day
|
|
11
|
+
7, // 7 days in 1 week
|
|
12
|
+
365 / 7 / 12, // 4.345238095238096 weeks in 1 month
|
|
13
|
+
12, // 12 months in 1 year
|
|
14
|
+
];
|
|
15
|
+
function useTimeAgo() {
|
|
16
|
+
const { useTranslate } = (0, hooks_1.useThemeHooks)();
|
|
17
|
+
const { translate } = useTranslate();
|
|
18
|
+
const format = (0, react_1.useCallback)((date) => {
|
|
19
|
+
let timeUnitIndex = 0;
|
|
20
|
+
let elapsedTime = (Date.now() - date.getTime()) / 1000;
|
|
21
|
+
for (; elapsedTime >= timeUnitConversions[timeUnitIndex] &&
|
|
22
|
+
timeUnitIndex < timeUnitConversions.length; timeUnitIndex++) {
|
|
23
|
+
elapsedTime /= timeUnitConversions[timeUnitIndex];
|
|
24
|
+
}
|
|
25
|
+
elapsedTime = Math.floor(elapsedTime);
|
|
26
|
+
if (timeUnitIndex === 0)
|
|
27
|
+
return translate('time.justNow', 'just now');
|
|
28
|
+
let timeUnit = timeUnits[timeUnitIndex];
|
|
29
|
+
if (elapsedTime > 1)
|
|
30
|
+
timeUnit = `${timeUnit}s`;
|
|
31
|
+
const translationKey = `time.past.${timeUnit}`;
|
|
32
|
+
return translate(translationKey, {
|
|
33
|
+
defaultValue: `${elapsedTime} ${timeUnit} ago`,
|
|
34
|
+
count: elapsedTime,
|
|
35
|
+
replace: { value: elapsedTime },
|
|
36
|
+
});
|
|
37
|
+
}, [translate]);
|
|
38
|
+
return { format };
|
|
39
|
+
}
|
|
40
|
+
//# sourceMappingURL=use-time-ago.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type Plural<T extends string> = `${T}s`;
|
|
@@ -130,5 +130,5 @@ export type L10nConfig = {
|
|
|
130
130
|
}[];
|
|
131
131
|
};
|
|
132
132
|
type TelemetryEvent = 'search_opened' | 'client_error_caught' | 'breadcrumb_clicked' | 'color_mode_switched' | 'sidebar_item_clicked' | 'sidebar_item_expanded' | 'sidebar_item_collapsed' | 'edit_page_link_clicked' | 'code_snippet_copied' | 'code_snippet_reported' | 'feedback_sent' | 'navbar_menu_item_clicked' | 'login_button_clicked' | 'login_provider_button_clicked' | 'logout_menu_item_clicked' | 'logo_clicked' | 'toc_item_clicked' | 'version_switched' | 'catalog_filter_changed' | 'catalog_item_clicked' | 'scorecard_link_clicked' | 'markdown_anchor_link_clicked' | 'back_to_catalog_button_clicked' | 'sidebar_drilldown_back_button_clicked' | 'footer_item_clicked' | 'request_api_access_button_clicked' | 'sidebar_samples_button_clicked' | 'change_layout_button_clicked' | 'version_picker_selection_change' | 'openapi_docs' | 'replay' | 'catalog_actions_button_clicked' | 'catalog_item_clicked' | 'filter_checkbox_toggled' | 'language_picker_locale_changed' | 'mobile_menu_button_close_clicked' | 'mobile_menu_button_open_clicked' | 'search_input_reset_button_clicked' | 'search_recent_remove_button_clicked' | 'product_picked';
|
|
133
|
-
type OtelTelemetryEvent = 'page.viewed' | 'error' | 'search.ai.query' | 'search.query' | 'search.result.clicked' | 'openapi_docs.viewed' | 'openapi_docs.performance_metrics' | 'openapi_docs.download_definition.clicked' | 'openapi_docs.select_language.clicked' | 'openapi_docs.expand_collapse_all.clicked' | 'openapi_docs.copy_code_snippet.clicked' | 'openapi_docs.switch_servers.clicked' | 'openapi_docs.examples_switcher.clicked' | 'openapi_docs.try_it.opened';
|
|
133
|
+
type OtelTelemetryEvent = 'page.viewed' | 'error' | 'search.ai.query' | 'search.query' | 'search.result.clicked' | 'openapi_docs.viewed' | 'openapi_docs.performance_metrics' | 'openapi_docs.download_definition.clicked' | 'openapi_docs.select_language.clicked' | 'openapi_docs.expand_collapse_all.clicked' | 'openapi_docs.copy_code_snippet.clicked' | 'openapi_docs.switch_servers.clicked' | 'openapi_docs.examples_switcher.clicked' | 'openapi_docs.try_it.opened' | 'asyncapi_docs.performance_metrics' | 'asyncapi_docs.viewed' | 'asyncapi_docs.switch_message.clicked' | 'asyncapi_docs.switch_example.clicked' | 'asyncapi_docs.message.clicked';
|
|
134
134
|
export {};
|
package/lib/core/types/index.js
CHANGED
|
@@ -27,4 +27,5 @@ __exportStar(require("../../core/types/sidebar"), exports);
|
|
|
27
27
|
__exportStar(require("../../core/types/filter"), exports);
|
|
28
28
|
__exportStar(require("../../core/types/user-menu"), exports);
|
|
29
29
|
__exportStar(require("../../core/types/user-claims"), exports);
|
|
30
|
+
__exportStar(require("../../core/types/common"), exports);
|
|
30
31
|
//# sourceMappingURL=index.js.map
|
package/lib/core/types/l10n.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { TOptions } from 'i18next';
|
|
2
|
-
export type TranslationKey = 'dev.newApp' | 'dev.newApp.text' | 'dev.sidebar.header' | 'dev.sidebar.footer.text' | 'dev.create.app.dialog.appName.placeholder' | 'dev.create.app.dialog.appName.error' | 'dev.create.app.dialog.selectAPIs' | 'dev.create.app.dialog.description' | 'dev.create.app.dialog.description.placeholder' | 'dev.create.app.dialog.create' | 'dev.create.app.dialog.cancel' | 'dev.main.tab.appKeys' | 'dev.main.tab.logs' | 'dev.app.description.title' | 'dev.edit.description.dialog.title' | 'dev.edit.description.dialog.save' | 'dev.edit.description.dialog.cancel' | 'dev.edit.apis.dialog.selectedAPIs' | 'dev.app.key.create' | 'dev.create.key.dialog.title' | 'dev.create.key.dialog.create' | 'dev.create.key.dialog.cancel' | 'dev.app.edit' | 'dev.app.delete' | 'dev.edit.app.dialog.title' | 'dev.edit.app.dialog.save' | 'dev.edit.app.dialog.cancel' | 'dev.delete.app.dialog.title' | 'dev.delete.app.dialog.confirmation' | 'dev.delete.app.dialog.delete' | 'dev.delete.app.dialog.cancel' | 'dev.app.key.roll' | 'dev.roll.key.dialog.title' | 'dev.roll.key.dialog.apiKey' | 'dev.roll.key.dialog.expires' | 'dev.roll.key.dialog.confirmation' | 'dev.roll.key.dialog.cancel' | 'dev.roll.key.dialog.roll' | 'dev.update.key.dialog.title' | 'dev.update.key.dialog.update' | 'dev.update.key.dialog.cancel' | 'dev.app.key.api.name' | 'dev.app.key.api.status' | 'dev.app.key.api.edit' | 'dev.edit.apis.dialog.title' | 'dev.edit.apis.dialog.apiKey' | 'dev.edit.apis.dialog.save' | 'dev.edit.apis.dialog.cancel' | 'dev.select.placeholder' | 'dev.app.overview.status.pending' | 'dev.app.overview.status.approved' | 'dev.app.overview.status.revoked' | 'dev.app.overview.status' | 'dev.app.overview.non-production' | 'dev.app.overview.production' | 'dev.app.overview.clientId' | 'dev.app.overview.apiKey' | 'dev.app.key.revoke' | 'dev.revoke.key.dialog.title' | 'dev.revoke.key.dialog.apiKey' | 'dev.revoke.key.dialog.expires' | 'dev.revoke.key.dialog.confirmation' | 'dev.revoke.key.dialog.revoke' | 'dev.revoke.key.dialog.cancel' | 'dev.app.overview.expires' | 'dev.app.overview.created' | 'dev.app.overview.visibilityToggle.hide' | 'dev.app.overview.visibilityToggle.show' | 'search.loading' | 'search.noResults.title' | 'search.keys.navigate' | 'search.keys.select' | 'search.keys.exit' | 'search.label' | 'search.cancel' | 'search.recent' | 'search.navbar.label' | 'search.suggested' | 'search.showMore' | 'search.filter.title' | 'search.filter.reset' | 'search.filter.field.reset' | 'search.ai.welcomeText' | 'search.ai.newConversation' | 'search.ai.backToSearch' | 'search.ai.placeholder' | 'search.ai.generatingResponse' | 'search.ai.followUpQuestion' | 'search.ai.suggestionsTitle' | 'search.ai.thinkingText' | 'search.ai.resourcesFound' | 'search.ai.resourcesFound.basedOn' | 'search.ai.resourcesFound.resources' | 'search.ai.button' | 'search.ai.label' | 'search.ai.disclaimer' | 'search.ai.error.description' | 'search.ai.error.description.forbidden' | 'search.ai.error.description.unauthorized' | 'search.ai.error.header' | 'search.ai.error.header.forbidden' | 'search.ai.error.header.unauthorized' | 'toc.header' | 'footer.copyrightText' | 'page.homeButton' | 'page.forbidden.title' | 'page.notFound.title' | 'page.notFound.description' | 'page.lastUpdated.timeago' | 'page.lastUpdated.on' | 'catalog.filters.placeholder' | 'catalog.filters.title' | 'catalog.filters.clearAll' | 'catalog.filters.select.addFilter' | 'catalog.filters.select.all' | 'catalog.filters.done' | '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.settings.reasons.send' | 'feedback.settings.comment.likeLabel' | 'feedback.settings.comment.dislikeLabel' | 'feedback.sentiment.thumbUp' | 'feedback.sentiment.thumbDown' | 'feedback.settings.leftScaleLabel' | 'feedback.settings.rightScaleLabel' | 'feedback.settings.optionalEmail.placeholder' | 'feedback.settings.optionalEmail.label' | 'codeSnippet.report.buttonText' | 'codeSnippet.report.tooltipText' | 'codeSnippet.report.label' | 'userMenu.login' | 'userMenu.logout' | 'userMenu.devOnboardingLabel' | 'mobileMenu.mainMenu' | 'mobileMenu.previous' | 'mobileMenu.products' | 'page.nextButton' | 'page.previousButton' | 'openapi.download.description.title' | 'openapi.info.title' | 'openapi.info.contact.url' | 'openapi.info.contact.name' | 'openapi.info.license' | 'openapi.info.termsOfService' | 'openapi.info.metadata.title' | 'openapi.key' | 'openapi.value' | 'openapi.enum' | 'openapi.items' | 'openapi.default' | 'openapi.variable' | 'openapi.variables' | 'openapi.actions.show' | 'openapi.actions.hide' | 'openapi.actions.more' | 'openapi.languages.title' | 'openapi.servers.title' | 'openapi.operations' | 'openapi.webhooks' | 'openapi.description' | 'openapi.badges.deprecated' | 'openapi.badges.required' | 'openapi.badges.webhook' | 'openapi.request' | 'openapi.path' | 'openapi.query' | 'openapi.cookie' | 'openapi.header' | 'openapi.body' | 'openapi.responses' | 'openapi.response' | 'openapi.callbacks' | 'openapi.callbackRequest' | 'openapi.callbackResponse' | 'openapi.payload' | 'openapi.discriminator' | 'openapi.contentType' | 'openapi.tryIt' | 'openapi.loading' | 'openapi.example' | 'openapi.examples' | 'openapi.additionalProperties' | 'openapi.patternProperties' | 'openapi.required' | 'openapi.recursive' | 'openapi.complex' | 'openapi.deprecated' | 'openapi.hideExample' | 'openapi.showExample' | 'openapi.expandAll' | 'openapi.collapseAll' | 'openapi.noResponseExample' | 'openapi.noResponseContent' | 'openapi.noRequestPayload' | 'openapi.hidePattern' | 'openapi.showPattern' | 'openapi.authorizationUrl' | 'openapi.tokenUrl' | 'openapi.refreshUrl' | 'openapi.scopes' | 'openapi.security' | 'openapi.httpAuthorizationScheme' | 'openapi.bearerFormat' | 'openapi.parameterName' | 'openapi.flowType' | 'openapi.connectUrl' | 'openapi.requiredScopes' | 'openapi.unsupportedLanguage' | 'openapi.failedToGenerateCodeSample' | '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' | 'codeWalkthrough.download' | 'codeWalkthrough.preview';
|
|
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.clearAll' | 'catalog.filters.select.addFilter' | 'catalog.filters.select.all' | 'catalog.filters.done' | '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.settings.reasons.send' | 'feedback.settings.comment.likeLabel' | 'feedback.settings.comment.dislikeLabel' | 'feedback.sentiment.thumbUp' | 'feedback.sentiment.thumbDown' | 'feedback.settings.leftScaleLabel' | 'feedback.settings.rightScaleLabel' | 'feedback.settings.optionalEmail.placeholder' | 'feedback.settings.optionalEmail.label' | 'codeSnippet.report.buttonText' | 'codeSnippet.report.tooltipText' | 'codeSnippet.report.label' | 'userMenu.login' | 'userMenu.logout' | 'userMenu.devOnboardingLabel' | 'mobileMenu.mainMenu' | 'mobileMenu.previous' | 'mobileMenu.products' | 'page.nextButton' | 'page.previousButton' | 'openapi.download.description.title' | 'openapi.info.title' | 'openapi.info.contact.url' | 'openapi.info.contact.name' | 'openapi.info.license' | 'openapi.info.termsOfService' | 'openapi.info.metadata.title' | 'openapi.key' | 'openapi.value' | 'openapi.enum' | 'openapi.items' | 'openapi.default' | 'openapi.variable' | 'openapi.variables' | 'openapi.actions.show' | 'openapi.actions.hide' | 'openapi.actions.more' | 'openapi.languages.title' | 'openapi.servers.title' | 'openapi.operations' | 'openapi.webhooks' | 'openapi.description' | 'openapi.badges.deprecated' | 'openapi.badges.required' | 'openapi.badges.webhook' | 'openapi.request' | 'openapi.path' | 'openapi.query' | 'openapi.cookie' | 'openapi.header' | 'openapi.body' | 'openapi.responses' | 'openapi.response' | 'openapi.callbacks' | 'openapi.callbackRequest' | 'openapi.callbackResponse' | 'openapi.payload' | 'openapi.discriminator' | 'openapi.contentType' | 'openapi.tryIt' | 'openapi.loading' | 'openapi.example' | 'openapi.examples' | 'openapi.additionalProperties' | 'openapi.patternProperties' | 'openapi.required' | 'openapi.recursive' | 'openapi.complex' | 'openapi.deprecated' | 'openapi.hideExample' | 'openapi.showExample' | 'openapi.expandAll' | 'openapi.collapseAll' | 'openapi.noResponseExample' | 'openapi.noResponseContent' | 'openapi.noRequestPayload' | 'openapi.hidePattern' | 'openapi.showPattern' | 'openapi.authorizationUrl' | 'openapi.tokenUrl' | 'openapi.refreshUrl' | 'openapi.scopes' | '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' | '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';
|
|
3
3
|
export type Locale = {
|
|
4
4
|
code: string;
|
|
5
5
|
name: string;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { IconProps } from '../../icons/types';
|
|
3
|
+
export declare const ArrowDownIcon: import("styled-components").StyledComponent<(props: IconProps) => React.JSX.Element, any, {
|
|
4
|
+
'data-component-name': string;
|
|
5
|
+
} & {
|
|
6
|
+
color?: string;
|
|
7
|
+
size?: string;
|
|
8
|
+
className?: string;
|
|
9
|
+
} & React.SVGProps<SVGSVGElement>, "data-component-name">;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.ArrowDownIcon = void 0;
|
|
7
|
+
const react_1 = __importDefault(require("react"));
|
|
8
|
+
const styled_components_1 = __importDefault(require("styled-components"));
|
|
9
|
+
const utils_1 = require("../../core/utils");
|
|
10
|
+
const Icon = (props) => (react_1.default.createElement("svg", Object.assign({ width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, props),
|
|
11
|
+
react_1.default.createElement("path", { d: "M12.295 8.295L8.5 12.085V2H7.5V12.085L3.705 8.295L3 9L8 14L13 9L12.295 8.295Z", fill: "#1A1C21" })));
|
|
12
|
+
exports.ArrowDownIcon = (0, styled_components_1.default)(Icon).attrs(() => ({
|
|
13
|
+
'data-component-name': 'icons/ArrowDownIcon/ArrowDownIcon',
|
|
14
|
+
})) `
|
|
15
|
+
path {
|
|
16
|
+
fill: ${({ color }) => (0, utils_1.getCssColorVariable)(color)};
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
height: ${({ size }) => size || '16px'};
|
|
20
|
+
width: ${({ size }) => size || '16px'};
|
|
21
|
+
`;
|
|
22
|
+
//# sourceMappingURL=ArrowDownIcon.js.map
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { IconProps } from '../../icons/types';
|
|
3
|
+
export declare const CurveAutoColonIcon: import("styled-components").StyledComponent<(props: IconProps) => React.JSX.Element, any, {
|
|
4
|
+
'data-component-name': string;
|
|
5
|
+
} & {
|
|
6
|
+
color?: string;
|
|
7
|
+
size?: string;
|
|
8
|
+
className?: string;
|
|
9
|
+
} & React.SVGProps<SVGSVGElement>, "data-component-name">;
|