@redocly/theme 0.64.0-next.2 → 0.64.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/Admonition/Admonition.d.ts +1 -1
- package/lib/components/Admonition/Admonition.js +2 -0
- package/lib/components/Admonition/variables.dark.js +3 -0
- package/lib/components/Admonition/variables.js +13 -0
- package/lib/components/Button/variables.dark.js +2 -2
- package/lib/components/Button/variables.js +3 -3
- package/lib/components/Catalog/CatalogEntity/CatalogEntityHistory/CatalogEntityVersionItem.js +3 -1
- package/lib/components/Catalog/CatalogTags.js +5 -2
- package/lib/components/Filter/variables.js +1 -1
- package/lib/components/LanguagePicker/LanguagePicker.js +5 -6
- package/lib/components/Link/Link.js +2 -2
- package/lib/components/Menu/MenuItem.js +1 -0
- package/lib/components/Menu/variables.dark.js +2 -0
- package/lib/components/Menu/variables.js +4 -3
- package/lib/components/Search/SearchAiMessage.js +9 -6
- package/lib/components/SvgViewer/SvgViewer.js +0 -3
- package/lib/components/SvgViewer/variables.js +1 -1
- package/lib/components/Switch/variables.dark.js +2 -2
- package/lib/components/Switch/variables.js +1 -1
- package/lib/components/TableOfContent/TableOfContent.js +1 -0
- package/lib/components/TableOfContent/variables.js +3 -2
- package/lib/components/Toast/Toast.d.ts +14 -0
- package/lib/components/Toast/Toast.js +239 -0
- package/lib/components/Toast/variables.d.ts +1 -0
- package/lib/components/Toast/variables.js +64 -0
- package/lib/components/Tooltip/JsTooltip.js +1 -1
- package/lib/core/constants/search.d.ts +3 -3
- package/lib/core/constants/toast.d.ts +1 -0
- package/lib/core/constants/toast.js +5 -0
- package/lib/core/contexts/MarkdownLinkContext.d.ts +5 -0
- package/lib/core/contexts/MarkdownLinkContext.js +6 -0
- package/lib/core/contexts/Toast/ToastContext.d.ts +2 -0
- package/lib/core/contexts/Toast/ToastContext.js +6 -0
- package/lib/core/contexts/Toast/ToastProvider.d.ts +3 -0
- package/lib/core/contexts/Toast/ToastProvider.js +156 -0
- package/lib/core/contexts/index.d.ts +3 -0
- package/lib/core/contexts/index.js +3 -0
- package/lib/core/hooks/index.d.ts +2 -0
- package/lib/core/hooks/index.js +2 -0
- package/lib/core/hooks/use-toast-logic.d.ts +18 -0
- package/lib/core/hooks/use-toast-logic.js +141 -0
- package/lib/core/hooks/use-toast.d.ts +11 -0
- package/lib/core/hooks/use-toast.js +17 -0
- package/lib/core/styles/dark.js +33 -40
- package/lib/core/styles/global.js +56 -54
- package/lib/core/styles/palette.dark.js +15 -30
- package/lib/core/styles/palette.js +130 -134
- package/lib/core/types/hooks.d.ts +2 -9
- package/lib/core/types/index.d.ts +1 -0
- package/lib/core/types/l10n.d.ts +1 -1
- package/lib/core/types/search.d.ts +2 -1
- package/lib/core/types/toast.d.ts +23 -0
- package/lib/core/types/toast.js +3 -0
- package/lib/core/utils/get-auto-dismiss-duration.d.ts +2 -0
- package/lib/core/utils/get-auto-dismiss-duration.js +15 -0
- package/lib/core/utils/index.d.ts +1 -0
- package/lib/core/utils/index.js +1 -0
- package/lib/icons/CheckboxIcon/CheckboxIcon.js +6 -4
- package/lib/icons/CheckboxIcon/variables.dark.js +2 -1
- package/lib/icons/CheckboxIcon/variables.js +3 -3
- package/lib/icons/IdeaIcon/IdeaIcon.d.ts +9 -0
- package/lib/icons/IdeaIcon/IdeaIcon.js +24 -0
- package/lib/icons/NewChatIcon/NewChatIcon.d.ts +11 -0
- package/lib/icons/NewChatIcon/NewChatIcon.js +25 -0
- package/lib/index.d.ts +4 -0
- package/lib/index.js +4 -0
- package/lib/markdoc/attributes/diagram-file.d.ts +5 -0
- package/lib/markdoc/attributes/diagram-file.js +16 -0
- package/lib/markdoc/components/Diagram/Diagram.d.ts +15 -0
- package/lib/markdoc/components/Diagram/Diagram.js +135 -0
- package/lib/markdoc/components/Diagram/variables.d.ts +1 -0
- package/lib/markdoc/components/Diagram/variables.js +15 -0
- package/lib/markdoc/components/MarkdownLink/MarkdownLink.d.ts +7 -0
- package/lib/markdoc/components/MarkdownLink/MarkdownLink.js +61 -0
- package/lib/markdoc/components/Tabs/variables.js +3 -3
- package/lib/markdoc/components/default.d.ts +2 -2
- package/lib/markdoc/components/default.js +2 -2
- package/lib/markdoc/default.d.ts +7 -0
- package/lib/markdoc/default.js +3 -0
- package/lib/markdoc/tags/admonition.js +1 -1
- package/lib/markdoc/tags/diagram.d.ts +2 -0
- package/lib/markdoc/tags/diagram.js +63 -0
- package/package.json +3 -3
- package/src/components/Admonition/Admonition.tsx +3 -1
- package/src/components/Admonition/variables.dark.ts +3 -0
- package/src/components/Admonition/variables.ts +13 -0
- package/src/components/Button/variables.dark.ts +2 -2
- package/src/components/Button/variables.ts +3 -3
- package/src/components/Catalog/CatalogEntity/CatalogEntityHistory/CatalogEntityVersionItem.tsx +3 -1
- package/src/components/Catalog/CatalogTags.tsx +6 -1
- package/src/components/Filter/variables.ts +1 -1
- package/src/components/LanguagePicker/LanguagePicker.tsx +5 -5
- package/src/components/Link/Link.tsx +1 -1
- package/src/components/Menu/MenuItem.tsx +5 -1
- package/src/components/Menu/variables.dark.ts +2 -0
- package/src/components/Menu/variables.ts +4 -3
- package/src/components/Search/SearchAiMessage.tsx +15 -10
- package/src/components/SvgViewer/SvgViewer.tsx +0 -4
- package/src/components/SvgViewer/variables.ts +1 -1
- package/src/components/Switch/variables.dark.ts +2 -2
- package/src/components/Switch/variables.ts +1 -1
- package/src/components/TableOfContent/TableOfContent.tsx +1 -0
- package/src/components/TableOfContent/variables.ts +3 -2
- package/src/components/Toast/Toast.tsx +289 -0
- package/src/components/Toast/variables.ts +61 -0
- package/src/components/Tooltip/JsTooltip.tsx +1 -1
- package/src/core/constants/search.ts +2 -3
- package/src/core/constants/toast.ts +1 -0
- package/src/core/contexts/MarkdownLinkContext.tsx +9 -0
- package/src/core/contexts/Toast/ToastContext.tsx +5 -0
- package/src/core/contexts/Toast/ToastProvider.tsx +206 -0
- package/src/core/contexts/index.ts +3 -0
- package/src/core/hooks/index.ts +2 -0
- package/src/core/hooks/use-toast-logic.ts +203 -0
- package/src/core/hooks/use-toast.ts +47 -0
- package/src/core/styles/dark.ts +5 -12
- package/src/core/styles/global.ts +28 -26
- package/src/core/styles/palette.dark.ts +15 -30
- package/src/core/styles/palette.ts +130 -134
- package/src/core/types/hooks.ts +2 -7
- package/src/core/types/index.ts +1 -0
- package/src/core/types/l10n.ts +9 -9
- package/src/core/types/search.ts +2 -1
- package/src/core/types/toast.ts +28 -0
- package/src/core/utils/get-auto-dismiss-duration.ts +20 -0
- package/src/core/utils/index.ts +1 -0
- package/src/icons/CheckboxIcon/CheckboxIcon.tsx +26 -17
- package/src/icons/CheckboxIcon/variables.dark.ts +2 -1
- package/src/icons/CheckboxIcon/variables.ts +3 -3
- package/src/icons/IdeaIcon/IdeaIcon.tsx +32 -0
- package/src/icons/NewChatIcon/NewChatIcon.tsx +39 -0
- package/src/index.ts +4 -0
- package/src/markdoc/attributes/diagram-file.ts +9 -0
- package/src/markdoc/components/Diagram/Diagram.tsx +173 -0
- package/src/markdoc/components/Diagram/variables.ts +12 -0
- package/src/markdoc/components/MarkdownLink/MarkdownLink.tsx +21 -0
- package/src/markdoc/components/Tabs/variables.ts +3 -3
- package/src/markdoc/components/default.ts +2 -2
- package/src/markdoc/default.ts +3 -0
- package/src/markdoc/tags/admonition.ts +1 -1
- package/src/markdoc/tags/diagram.ts +73 -0
- package/lib/components/SvgViewer/variables.dark.d.ts +0 -1
- package/lib/components/SvgViewer/variables.dark.js +0 -8
- package/lib/markdoc/components/ExcalidrawDiagram/ExcalidrawDiagram.d.ts +0 -7
- package/lib/markdoc/components/ExcalidrawDiagram/ExcalidrawDiagram.js +0 -95
- package/lib/markdoc/components/ExcalidrawDiagram/variables.d.ts +0 -1
- package/lib/markdoc/components/ExcalidrawDiagram/variables.dark.d.ts +0 -1
- package/lib/markdoc/components/ExcalidrawDiagram/variables.dark.js +0 -8
- package/lib/markdoc/components/ExcalidrawDiagram/variables.js +0 -15
- package/lib/markdoc/components/Mermaid/Mermaid.d.ts +0 -9
- package/lib/markdoc/components/Mermaid/Mermaid.js +0 -96
- package/lib/markdoc/components/Mermaid/variables.d.ts +0 -1
- package/lib/markdoc/components/Mermaid/variables.dark.d.ts +0 -1
- package/lib/markdoc/components/Mermaid/variables.dark.js +0 -8
- package/lib/markdoc/components/Mermaid/variables.js +0 -16
- package/src/components/SvgViewer/variables.dark.ts +0 -5
- package/src/markdoc/components/ExcalidrawDiagram/ExcalidrawDiagram.tsx +0 -85
- package/src/markdoc/components/ExcalidrawDiagram/variables.dark.ts +0 -5
- package/src/markdoc/components/ExcalidrawDiagram/variables.ts +0 -12
- package/src/markdoc/components/Mermaid/Mermaid.tsx +0 -95
- package/src/markdoc/components/Mermaid/variables.dark.ts +0 -5
- package/src/markdoc/components/Mermaid/variables.ts +0 -13
|
@@ -2,8 +2,7 @@ export * from '../../markdoc/components/Admonition/Admonition';
|
|
|
2
2
|
export * from '../../markdoc/components/InlineSvg/InlineSvg';
|
|
3
3
|
export * from '../../markdoc/components/MarkdocExample/MarkdocExample';
|
|
4
4
|
export * from '../../markdoc/components/Heading/Heading';
|
|
5
|
-
export * from '../../markdoc/components/
|
|
6
|
-
export * from '../../markdoc/components/ExcalidrawDiagram/ExcalidrawDiagram';
|
|
5
|
+
export * from '../../markdoc/components/Diagram/Diagram';
|
|
7
6
|
export * from '../../markdoc/components/HtmlBlock/HtmlBlock';
|
|
8
7
|
export * from '../../markdoc/components/Tabs/Tab';
|
|
9
8
|
export * from '../../markdoc/components/Tabs/TabList';
|
|
@@ -23,3 +22,4 @@ export * from '../../markdoc/components/CodeGroup/CodeGroup';
|
|
|
23
22
|
export * from '../../markdoc/components/Icon/Icon';
|
|
24
23
|
export * from '../../markdoc/components/ConnectMCP/ConnectMCP';
|
|
25
24
|
export * from '../../markdoc/components/LoginButton/LoginButton';
|
|
25
|
+
export * from '../../markdoc/components/MarkdownLink/MarkdownLink';
|
|
@@ -18,8 +18,7 @@ __exportStar(require("../../markdoc/components/Admonition/Admonition"), exports)
|
|
|
18
18
|
__exportStar(require("../../markdoc/components/InlineSvg/InlineSvg"), exports);
|
|
19
19
|
__exportStar(require("../../markdoc/components/MarkdocExample/MarkdocExample"), exports);
|
|
20
20
|
__exportStar(require("../../markdoc/components/Heading/Heading"), exports);
|
|
21
|
-
__exportStar(require("../../markdoc/components/
|
|
22
|
-
__exportStar(require("../../markdoc/components/ExcalidrawDiagram/ExcalidrawDiagram"), exports);
|
|
21
|
+
__exportStar(require("../../markdoc/components/Diagram/Diagram"), exports);
|
|
23
22
|
__exportStar(require("../../markdoc/components/HtmlBlock/HtmlBlock"), exports);
|
|
24
23
|
__exportStar(require("../../markdoc/components/Tabs/Tab"), exports);
|
|
25
24
|
__exportStar(require("../../markdoc/components/Tabs/TabList"), exports);
|
|
@@ -39,4 +38,5 @@ __exportStar(require("../../markdoc/components/CodeGroup/CodeGroup"), exports);
|
|
|
39
38
|
__exportStar(require("../../markdoc/components/Icon/Icon"), exports);
|
|
40
39
|
__exportStar(require("../../markdoc/components/ConnectMCP/ConnectMCP"), exports);
|
|
41
40
|
__exportStar(require("../../markdoc/components/LoginButton/LoginButton"), exports);
|
|
41
|
+
__exportStar(require("../../markdoc/components/MarkdownLink/MarkdownLink"), exports);
|
|
42
42
|
//# sourceMappingURL=default.js.map
|
package/lib/markdoc/default.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export * from '../markdoc/attributes/code-snippet-file';
|
|
2
|
+
export * from '../markdoc/attributes/diagram-file';
|
|
2
3
|
export * from '../markdoc/attributes/img-src';
|
|
3
4
|
export * from '../markdoc/attributes/img-srcset';
|
|
4
5
|
export * from '../markdoc/attributes/relative-path';
|
|
@@ -24,6 +25,7 @@ import { codeGroup } from '../markdoc/tags/code-group';
|
|
|
24
25
|
import { icon } from '../markdoc/tags/icon';
|
|
25
26
|
import { connectMcp } from '../markdoc/tags/connect-mcp';
|
|
26
27
|
import { loginButton } from '../markdoc/tags/login-button';
|
|
28
|
+
import { diagram } from '../markdoc/tags/diagram';
|
|
27
29
|
export declare const tags: {
|
|
28
30
|
[admonition.tagName]: import("@markdoc/markdoc").Schema & {
|
|
29
31
|
attributes?: Record<string, import("@markdoc/markdoc").SchemaAttribute & {
|
|
@@ -125,4 +127,9 @@ export declare const tags: {
|
|
|
125
127
|
resolver?: string;
|
|
126
128
|
}>;
|
|
127
129
|
};
|
|
130
|
+
[diagram.tagName]: import("@markdoc/markdoc").Schema & {
|
|
131
|
+
attributes?: Record<string, import("@markdoc/markdoc").SchemaAttribute & {
|
|
132
|
+
resolver?: string;
|
|
133
|
+
}>;
|
|
134
|
+
};
|
|
128
135
|
};
|
package/lib/markdoc/default.js
CHANGED
|
@@ -39,6 +39,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
39
39
|
exports.tags = exports.components = void 0;
|
|
40
40
|
/* Attributes */
|
|
41
41
|
__exportStar(require("../markdoc/attributes/code-snippet-file"), exports);
|
|
42
|
+
__exportStar(require("../markdoc/attributes/diagram-file"), exports);
|
|
42
43
|
__exportStar(require("../markdoc/attributes/img-src"), exports);
|
|
43
44
|
__exportStar(require("../markdoc/attributes/img-srcset"), exports);
|
|
44
45
|
__exportStar(require("../markdoc/attributes/relative-path"), exports);
|
|
@@ -66,6 +67,7 @@ const code_group_1 = require("../markdoc/tags/code-group");
|
|
|
66
67
|
const icon_1 = require("../markdoc/tags/icon");
|
|
67
68
|
const connect_mcp_1 = require("../markdoc/tags/connect-mcp");
|
|
68
69
|
const login_button_1 = require("../markdoc/tags/login-button");
|
|
70
|
+
const diagram_1 = require("../markdoc/tags/diagram");
|
|
69
71
|
exports.tags = {
|
|
70
72
|
[admonition_1.admonition.tagName]: admonition_1.admonition.schema,
|
|
71
73
|
[debug_1.debug.tagName]: debug_1.debug.schema,
|
|
@@ -87,5 +89,6 @@ exports.tags = {
|
|
|
87
89
|
[icon_1.icon.tagName]: icon_1.icon.schema,
|
|
88
90
|
[connect_mcp_1.connectMcp.tagName]: connect_mcp_1.connectMcp.schema,
|
|
89
91
|
[login_button_1.loginButton.tagName]: login_button_1.loginButton.schema,
|
|
92
|
+
[diagram_1.diagram.tagName]: diagram_1.diagram.schema,
|
|
90
93
|
};
|
|
91
94
|
//# sourceMappingURL=default.js.map
|
|
@@ -0,0 +1,63 @@
|
|
|
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.diagram = void 0;
|
|
7
|
+
const markdoc_1 = __importDefault(require("@markdoc/markdoc"));
|
|
8
|
+
const diagram_file_1 = require("../../markdoc/attributes/diagram-file");
|
|
9
|
+
const DIAGRAM_TYPES = ['mermaid', 'plantuml', 'excalidraw'];
|
|
10
|
+
const DIAGRAM_ALIGNMENTS = ['left', 'center', 'right'];
|
|
11
|
+
exports.diagram = {
|
|
12
|
+
schema: {
|
|
13
|
+
attributes: {
|
|
14
|
+
file: { type: diagram_file_1.DiagramFile, required: true },
|
|
15
|
+
type: {
|
|
16
|
+
type: String,
|
|
17
|
+
required: true,
|
|
18
|
+
matches: DIAGRAM_TYPES,
|
|
19
|
+
},
|
|
20
|
+
align: {
|
|
21
|
+
type: String,
|
|
22
|
+
matches: DIAGRAM_ALIGNMENTS,
|
|
23
|
+
},
|
|
24
|
+
width: {
|
|
25
|
+
type: String,
|
|
26
|
+
},
|
|
27
|
+
rawContent: { type: String, render: false }, // internal — populated by resolver
|
|
28
|
+
},
|
|
29
|
+
render: 'Diagram',
|
|
30
|
+
selfClosing: true,
|
|
31
|
+
transform: (node, config) => {
|
|
32
|
+
const attributes = node.transformAttributes(config);
|
|
33
|
+
const rawContent = node.attributes.rawContent;
|
|
34
|
+
const diagramType = node.attributes.type;
|
|
35
|
+
if (typeof rawContent === 'string') {
|
|
36
|
+
return new markdoc_1.default.Tag('Diagram', Object.assign(Object.assign({}, attributes), { diagramType, diagramSource: rawContent }), []);
|
|
37
|
+
}
|
|
38
|
+
return new markdoc_1.default.Tag(node.tag, attributes, []);
|
|
39
|
+
},
|
|
40
|
+
validate(node) {
|
|
41
|
+
const errors = [];
|
|
42
|
+
const type = node.attributes.type;
|
|
43
|
+
if (type && !DIAGRAM_TYPES.includes(type)) {
|
|
44
|
+
errors.push({
|
|
45
|
+
id: 'invalid-diagram-type',
|
|
46
|
+
level: 'error',
|
|
47
|
+
message: `Invalid diagram type "${type}". Must be one of: ${DIAGRAM_TYPES.join(', ')}`,
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
const align = node.attributes.align;
|
|
51
|
+
if (align && !DIAGRAM_ALIGNMENTS.includes(align)) {
|
|
52
|
+
errors.push({
|
|
53
|
+
id: 'invalid-diagram-align',
|
|
54
|
+
level: 'error',
|
|
55
|
+
message: `Invalid diagram align "${align}". Must be one of: ${DIAGRAM_ALIGNMENTS.join(', ')}`,
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
return errors;
|
|
59
|
+
},
|
|
60
|
+
},
|
|
61
|
+
tagName: 'diagram',
|
|
62
|
+
};
|
|
63
|
+
//# sourceMappingURL=diagram.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@redocly/theme",
|
|
3
|
-
"version": "0.64.0-next.
|
|
3
|
+
"version": "0.64.0-next.4",
|
|
4
4
|
"description": "Shared UI components lib",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"theme",
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
"vitest": "4.0.10",
|
|
64
64
|
"vitest-when": "0.6.2",
|
|
65
65
|
"webpack": "5.105.2",
|
|
66
|
-
"@redocly/realm-asyncapi-sdk": "0.10.0-next.
|
|
66
|
+
"@redocly/realm-asyncapi-sdk": "0.10.0-next.1"
|
|
67
67
|
},
|
|
68
68
|
"dependencies": {
|
|
69
69
|
"@tanstack/react-query": "5.62.3",
|
|
@@ -81,7 +81,7 @@
|
|
|
81
81
|
"openapi-sampler": "^1.7.2",
|
|
82
82
|
"react-calendar": "5.1.0",
|
|
83
83
|
"react-date-picker": "11.0.0",
|
|
84
|
-
"@redocly/config": "0.
|
|
84
|
+
"@redocly/config": "0.46.1"
|
|
85
85
|
},
|
|
86
86
|
"scripts": {
|
|
87
87
|
"watch": "tsc -p tsconfig.build.json && (concurrently \"tsc -w -p tsconfig.build.json\" \"tsc-alias -w -p tsconfig.build.json\")",
|
|
@@ -7,9 +7,10 @@ import { WarningCycleIcon } from '@redocly/theme/icons/WarningCycleIcon/WarningC
|
|
|
7
7
|
import { CheckmarkOutlineIcon } from '@redocly/theme/icons/CheckmarkOutlineIcon/CheckmarkOutlineIcon';
|
|
8
8
|
import { ErrorIcon } from '@redocly/theme/icons/ErrorIcon/ErrorIcon';
|
|
9
9
|
import { InformationIcon } from '@redocly/theme/icons/InformationIcon/InformationIcon';
|
|
10
|
+
import { IdeaIcon } from '@redocly/theme/icons/IdeaIcon/IdeaIcon';
|
|
10
11
|
|
|
11
12
|
type AdmonitionTypeProps = {
|
|
12
|
-
type: 'warning' | 'success' | 'danger' | 'info';
|
|
13
|
+
type: 'warning' | 'success' | 'danger' | 'info' | 'default';
|
|
13
14
|
};
|
|
14
15
|
|
|
15
16
|
export type AdmonitionProps = Partial<AdmonitionTypeProps> & {
|
|
@@ -24,6 +25,7 @@ const IconsMap: Record<AdmonitionTypeProps['type'], FC<{ color?: string }>> = {
|
|
|
24
25
|
success: CheckmarkOutlineIcon,
|
|
25
26
|
danger: ErrorIcon,
|
|
26
27
|
info: InformationIcon,
|
|
28
|
+
default: IdeaIcon,
|
|
27
29
|
};
|
|
28
30
|
|
|
29
31
|
export function Admonition({
|
|
@@ -12,4 +12,7 @@ export const admonitionDarkMode = css`
|
|
|
12
12
|
|
|
13
13
|
--admonition-success-bg-color: color-mix(in srgb, var(--color-green-1) 40%, transparent); // @presenter Color
|
|
14
14
|
--admonition-success-border: var(--admonition-border-width) var(--admonition-border-style) color-mix(in srgb, var(--color-green-3) 40%, transparent); // @presenter Border
|
|
15
|
+
|
|
16
|
+
--admonition-default-bg-color: color-mix(in srgb, var(--color-primary-bg, var(--admonition-default-bg-color-legacy)) 40%, transparent); // @presenter Color
|
|
17
|
+
--admonition-default-border: var(--admonition-border-width) var(--admonition-border-style) color-mix(in srgb, var(--color-primary-border, var(--admonition-default-border-color-legacy)) 40%, transparent); // @presenter Border
|
|
15
18
|
`;
|
|
@@ -89,5 +89,18 @@ export const admonition = css`
|
|
|
89
89
|
--admonition-success-border-width: var(--admonition-border-width); // @presenter Color
|
|
90
90
|
--admonition-success-border: var(--admonition-success-border-width) var(--admonition-success-border-style) var(--admonition-success-border-color); // @presenter Border
|
|
91
91
|
|
|
92
|
+
/**
|
|
93
|
+
* @tokens Admonition type primary
|
|
94
|
+
*/
|
|
95
|
+
|
|
96
|
+
--admonition-default-bg-color: var(--color-primary-bg, var(--admonition-default-bg-color-legacy)); // @presenter Color
|
|
97
|
+
--admonition-default-text-color: var(--admonition-heading-text-color); // @presenter Color
|
|
98
|
+
--admonition-default-heading-text-color: var(--admonition-heading-text-color); // @presenter Color
|
|
99
|
+
--admonition-default-icon-color: var(--color-primary-base, var(--admonition-default-icon-color-legacy)); // @presenter Color
|
|
100
|
+
--admonition-default-border-color: var(--color-primary-border, var(--admonition-default-border-color-legacy)); // @presenter Color
|
|
101
|
+
--admonition-default-border-style: var(--admonition-border-style); // @presenter Color
|
|
102
|
+
--admonition-default-border-width: var(--admonition-border-width); // @presenter Color
|
|
103
|
+
--admonition-default-border: var(--admonition-default-border-width) var(--admonition-default-border-style) var(--admonition-default-border-color); // @presenter Border
|
|
104
|
+
|
|
92
105
|
// @tokens End
|
|
93
106
|
`;
|
|
@@ -17,8 +17,8 @@ export const buttonDarkMode = css`
|
|
|
17
17
|
--button-bg-color-secondary-hover: var(--color-warm-grey-5);
|
|
18
18
|
--button-bg-color-secondary-pressed: var(--color-warm-grey-6);
|
|
19
19
|
--button-bg-color-secondary-danger-pressed: var(--color-raspberry-9);
|
|
20
|
-
--button-bg-color-primary-hover: var(--color-
|
|
21
|
-
--button-bg-color-primary-pressed: var(--color-
|
|
20
|
+
--button-bg-color-primary-hover: var(--color-primary-hover, var(--button-bg-color-primary-hover-legacy));
|
|
21
|
+
--button-bg-color-primary-pressed: var(--color-primary-active, var(--button-bg-color-primary-pressed-legacy));
|
|
22
22
|
--button-bg-color-primary-danger-hover: var(--color-raspberry-5);
|
|
23
23
|
--button-bg-color-primary-danger-pressed: var(--color-raspberry-4);
|
|
24
24
|
--button-bg-color-disabled: var(--color-warm-grey-3);
|
|
@@ -24,9 +24,9 @@ export const button = css`
|
|
|
24
24
|
--button-content-color-primary-hover: var(--color-blue-7); // @presenter Color
|
|
25
25
|
--button-content-color-primary-pressed: var(--color-blue-8); // @presenter Color
|
|
26
26
|
|
|
27
|
-
--button-bg-color-primary: var(--color-
|
|
28
|
-
--button-bg-color-primary-hover: var(--color-
|
|
29
|
-
--button-bg-color-primary-pressed: var(--color-
|
|
27
|
+
--button-bg-color-primary: var(--color-primary-base, var(--button-bg-color-primary-legacy)); // @presenter Color
|
|
28
|
+
--button-bg-color-primary-hover: var(--color-primary-hover, var(--button-bg-color-primary-hover-legacy)); // @presenter Color
|
|
29
|
+
--button-bg-color-primary-pressed: var(--color-primary-active, var(--button-bg-color-primary-pressed-legacy)); // @presenter Color
|
|
30
30
|
|
|
31
31
|
--button-bg-color-primary-danger: var(--color-raspberry-6); // @presenter Color
|
|
32
32
|
--button-bg-color-primary-danger-hover: var(--color-raspberry-7); // @presenter Color
|
package/src/components/Catalog/CatalogEntity/CatalogEntityHistory/CatalogEntityVersionItem.tsx
CHANGED
|
@@ -187,7 +187,9 @@ const VersionIcon = styled.div<{ $isCurrent?: boolean }>`
|
|
|
187
187
|
flex-shrink: 0;
|
|
188
188
|
border-radius: 50%;
|
|
189
189
|
background-color: ${({ $isCurrent }) =>
|
|
190
|
-
$isCurrent
|
|
190
|
+
$isCurrent
|
|
191
|
+
? 'var(--color-primary-base, var(--color-blueberry-6))'
|
|
192
|
+
: 'var(--catalog-avatar-bg-color)'};
|
|
191
193
|
transition: background-color 0.2s ease;
|
|
192
194
|
margin-right: var(--catalog-history-sidebar-version-icon-margin-right);
|
|
193
195
|
|
|
@@ -48,6 +48,7 @@ export function CatalogTags({
|
|
|
48
48
|
if (shouldUseVariantWithTooltip) {
|
|
49
49
|
const displayedItems = items.slice(0, itemsToShow);
|
|
50
50
|
const remainingCount = items.length - itemsToShow;
|
|
51
|
+
const moreLabel = translate('catalog.tags.more', 'more');
|
|
51
52
|
|
|
52
53
|
return (
|
|
53
54
|
<Tooltip tip={items.join(', ')} placement="bottom" className="catalog">
|
|
@@ -70,7 +71,11 @@ export function CatalogTags({
|
|
|
70
71
|
</Tag>
|
|
71
72
|
))}
|
|
72
73
|
|
|
73
|
-
{remainingCount > 0 &&
|
|
74
|
+
{remainingCount > 0 && (
|
|
75
|
+
<MoreTagsButton>
|
|
76
|
+
+ {remainingCount} <span data-translation-key="catalog.tags.more">{moreLabel}</span>
|
|
77
|
+
</MoreTagsButton>
|
|
78
|
+
)}
|
|
74
79
|
</CatalogTagsWrapper>
|
|
75
80
|
</Tooltip>
|
|
76
81
|
);
|
|
@@ -22,7 +22,7 @@ export const filter = css`
|
|
|
22
22
|
--filter-option-margin: 0;
|
|
23
23
|
|
|
24
24
|
--filter-option-label-font-size: var(--font-size-base);
|
|
25
|
-
--filter-option-label-color: var(--text-color-
|
|
25
|
+
--filter-option-label-color: var(--text-color-primary);
|
|
26
26
|
|
|
27
27
|
--filter-option-checkbox-padding-left: var(--spacing-xs);
|
|
28
28
|
|
|
@@ -52,17 +52,17 @@ export function LanguagePicker(props: LanguagePickerProps): JSX.Element | null {
|
|
|
52
52
|
placement={props.placement}
|
|
53
53
|
alignment={props.alignment}
|
|
54
54
|
trigger={languagePickerButton}
|
|
55
|
+
dataAttributes={{
|
|
56
|
+
'data-component-name': 'LanguagePicker/LanguagePicker',
|
|
57
|
+
'data-current-locale': currentLocale.code,
|
|
58
|
+
}}
|
|
55
59
|
>
|
|
56
60
|
<DropdownMenu items={languageItems} />
|
|
57
61
|
</LanguageDropdown>
|
|
58
62
|
);
|
|
59
63
|
}
|
|
60
64
|
|
|
61
|
-
const LanguageDropdown = styled(Dropdown)
|
|
62
|
-
dataAttributes: {
|
|
63
|
-
'data-component-name': 'LanguagePicker/LanguagePicker',
|
|
64
|
-
},
|
|
65
|
-
}))`
|
|
65
|
+
const LanguageDropdown = styled(Dropdown)`
|
|
66
66
|
display: none;
|
|
67
67
|
height: auto;
|
|
68
68
|
@media screen and (min-width: ${breakpoints.medium}) {
|
|
@@ -4,7 +4,7 @@ import { Link as ReactLink } from 'react-router-dom';
|
|
|
4
4
|
|
|
5
5
|
import type { JSX } from 'react';
|
|
6
6
|
|
|
7
|
-
import { ThemeDataContext } from '@redocly/theme/core/contexts';
|
|
7
|
+
import { ThemeDataContext } from '@redocly/theme/core/contexts/ThemeDataContext';
|
|
8
8
|
|
|
9
9
|
export type LinkProps = {
|
|
10
10
|
to: string;
|
|
@@ -291,6 +291,7 @@ const MenuItemLabelWrapper = styled.li<{
|
|
|
291
291
|
css`
|
|
292
292
|
color: ${deprecated ? 'var(--menu-content-color-disabled)' : 'var(--menu-item-color-active)'};
|
|
293
293
|
background-color: var(--menu-item-bg-color-active);
|
|
294
|
+
font-weight: var(--menu-item-font-weight-active);
|
|
294
295
|
|
|
295
296
|
${ChevronDownIcon} path {
|
|
296
297
|
fill: var(--menu-item-color-active);
|
|
@@ -369,7 +370,10 @@ const MenuItemLink = styled(Link)`
|
|
|
369
370
|
order: 1;
|
|
370
371
|
`;
|
|
371
372
|
|
|
372
|
-
const MenuItemSeparatorLine = styled.div<{
|
|
373
|
+
const MenuItemSeparatorLine = styled.div<{
|
|
374
|
+
depth?: number;
|
|
375
|
+
linePosition?: string;
|
|
376
|
+
}>`
|
|
373
377
|
height: var(--menu-item-separator-line-height);
|
|
374
378
|
background-color: var(--menu-item-separator-line-bg-color);
|
|
375
379
|
margin: ${({ depth }) => `
|
|
@@ -5,4 +5,6 @@ export const menuDarkMode = css`
|
|
|
5
5
|
--menu-content-title-color: var(--text-color-secondary); // @presenter Color
|
|
6
6
|
--menu-content-color-active: var(--text-color-primary); // @presenter Color
|
|
7
7
|
--menu-content-color-disabled: var(--text-color-disabled); // @presenter Color
|
|
8
|
+
|
|
9
|
+
--menu-item-bg-color-active: var(--color-primary-bg, var(--menu-item-bg-color-active-legacy)); // @presenter Color
|
|
8
10
|
`;
|
|
@@ -19,6 +19,7 @@ export const menu = css`
|
|
|
19
19
|
--menu-item-font-family: var(--sidebar-font-family); // @presenter FontFamily
|
|
20
20
|
--menu-item-font-size: var(--sidebar-font-size); // @presenter FontSize
|
|
21
21
|
--menu-item-font-weight: var(--font-weight-regular); // @presenter FontSize
|
|
22
|
+
--menu-item-font-weight-active: var(--font-weight-medium); // @presenter FontWeight
|
|
22
23
|
--menu-item-line-height: var(--line-height-base); // @presenter LineHeight
|
|
23
24
|
|
|
24
25
|
/**
|
|
@@ -28,11 +29,11 @@ export const menu = css`
|
|
|
28
29
|
--menu-item-text-color: var(--sidebar-text-color); // @presenter Color
|
|
29
30
|
--menu-item-bg-color: transparent; // @presenter Color
|
|
30
31
|
--menu-item-bg-color-hover: var(--color-hover-base); // @presenter Color
|
|
31
|
-
--menu-item-bg-color-active: var(--
|
|
32
|
+
--menu-item-bg-color-active: var(--color-primary-bg, var(--menu-item-bg-color-active-legacy)); // @presenter Color
|
|
32
33
|
|
|
33
34
|
--menu-item-color-hover: var(--tree-content-color-hover); // @presenter Color
|
|
34
|
-
--menu-item-color-active: var(--
|
|
35
|
-
|
|
35
|
+
--menu-item-color-active: var(--color-primary-text, var(--menu-item-color-active-legacy)); // @presenter Color
|
|
36
|
+
|
|
36
37
|
/**
|
|
37
38
|
* @tokens Menu item spacing
|
|
38
39
|
* @presenter Spacing
|
|
@@ -26,6 +26,17 @@ function MarkdownSegment({ text }: { text: string }): JSX.Element {
|
|
|
26
26
|
const markdown = useMarkdownText(text);
|
|
27
27
|
return <ResponseText as="div" children={markdown} data-testid="response-text" />;
|
|
28
28
|
}
|
|
29
|
+
function getToolCallDisplayText(toolName: string): {
|
|
30
|
+
inProgressText: string;
|
|
31
|
+
completedText: string;
|
|
32
|
+
} {
|
|
33
|
+
return (
|
|
34
|
+
TOOL_CALL_DISPLAY_TEXT[toolName] ?? {
|
|
35
|
+
inProgressText: `Executing ${toolName}...`,
|
|
36
|
+
completedText: `${toolName} executed`,
|
|
37
|
+
}
|
|
38
|
+
);
|
|
39
|
+
}
|
|
29
40
|
|
|
30
41
|
export type SearchAiMessageProps = {
|
|
31
42
|
role: AiSearchConversationRole;
|
|
@@ -121,17 +132,11 @@ function SearchAiMessageComponent({
|
|
|
121
132
|
if (segment.type === 'tool') {
|
|
122
133
|
const toolCallCompleted = Boolean(segment.toolCall.result);
|
|
123
134
|
|
|
124
|
-
const
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
const toolCallInProgressText =
|
|
129
|
-
TOOL_CALL_DISPLAY_TEXT[segment.toolCall.name]?.inProgressText ??
|
|
130
|
-
translate('search.ai.toolCall.searching', 'Searching...');
|
|
135
|
+
const { inProgressText, completedText } = getToolCallDisplayText(
|
|
136
|
+
segment.toolCall.name,
|
|
137
|
+
);
|
|
131
138
|
|
|
132
|
-
const toolCallDisplayText = toolCallCompleted
|
|
133
|
-
? toolCallCompletedText
|
|
134
|
-
: toolCallInProgressText;
|
|
139
|
+
const toolCallDisplayText = toolCallCompleted ? completedText : inProgressText;
|
|
135
140
|
|
|
136
141
|
return (
|
|
137
142
|
<ToolCallsInfoWrapper key={`tool-${index}`} data-testid="tool-calls-info">
|
|
@@ -129,9 +129,6 @@ export function SvgViewer({
|
|
|
129
129
|
|
|
130
130
|
const handleWheel = useCallback(
|
|
131
131
|
(e: WheelEvent) => {
|
|
132
|
-
e.preventDefault();
|
|
133
|
-
e.stopPropagation();
|
|
134
|
-
|
|
135
132
|
setIsWheelZooming(true);
|
|
136
133
|
if (wheelTimeoutRef.current) clearTimeout(wheelTimeoutRef.current);
|
|
137
134
|
wheelTimeoutRef.current = setTimeout(() => setIsWheelZooming(false), 150);
|
|
@@ -186,7 +183,6 @@ export function SvgViewer({
|
|
|
186
183
|
|
|
187
184
|
const handleTouchMove = useCallback(
|
|
188
185
|
(e: ReactTouchEvent) => {
|
|
189
|
-
e.preventDefault();
|
|
190
186
|
if (e.touches.length === 2 && pinchState) {
|
|
191
187
|
const distance = getTouchDistance(e.touches);
|
|
192
188
|
setScale(clampScale(pinchState.scale * (distance / pinchState.distance)));
|
|
@@ -6,7 +6,7 @@ export const svgViewer = css`
|
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
--svg-viewer-overlay-bg-color: var(--bg-color-modal-overlay); // @presenter Color
|
|
9
|
-
--svg-viewer-bg-color: var(--bg-color); // @presenter Color
|
|
9
|
+
--svg-viewer-bg-color: var(--bg-color-raised); // @presenter Color
|
|
10
10
|
--svg-viewer-border-radius: var(--border-radius-xl); // @presenter BorderRadius
|
|
11
11
|
--svg-viewer-box-shadow: var(--bg-raised-shadow); // @presenter BoxShadow
|
|
12
12
|
|
|
@@ -2,7 +2,7 @@ import { css } from 'styled-components';
|
|
|
2
2
|
|
|
3
3
|
export const switcherDarkMode = css`
|
|
4
4
|
--switch-bg-color: transparent; // @presenter Color
|
|
5
|
-
--switch-bg-color-selected: var(--color-
|
|
5
|
+
--switch-bg-color-selected: var(--color-primary-base, var(--switch-bg-color-selected-legacy)); // @presenter Color
|
|
6
6
|
--switch-bg-color-hover: transparent; // @presenter Color
|
|
7
7
|
--switch-bg-color-pressed: transparent; // @presenter Color
|
|
8
8
|
--switch-bg-color-disabled: transparent; // @presenter Color
|
|
@@ -12,7 +12,7 @@ export const switcherDarkMode = css`
|
|
|
12
12
|
--switch-border-color-hover: var(--color-warm-grey-7); // @presenter Color
|
|
13
13
|
--switch-border-color-pressed: var(--color-warm-grey-8); // @presenter Color
|
|
14
14
|
--switch-border-color-disabled: var(--color-warm-grey-5); // @presenter Color
|
|
15
|
-
--switch-border-color-selected: var(--color-
|
|
15
|
+
--switch-border-color-selected: var(--color-primary-base, var(--switch-border-color-selected-legacy)); // @presenter Color
|
|
16
16
|
--switch-border-width: var(--border-width); // @presenter Border
|
|
17
17
|
--switch-border-radius: var(--border-radius); // @presenter BorderRadius
|
|
18
18
|
|
|
@@ -2,7 +2,7 @@ import { css } from 'styled-components';
|
|
|
2
2
|
|
|
3
3
|
export const switcher = css`
|
|
4
4
|
--switch-bg-color: var(--color-warm-grey-4); // @presenter Color
|
|
5
|
-
--switch-bg-color-selected: var(--color-
|
|
5
|
+
--switch-bg-color-selected: var(--color-primary-base, var(--switch-bg-color-selected-legacy)); // @presenter Color
|
|
6
6
|
--switch-bg-color-hover: var(--color-warm-grey-5); // @presenter Color
|
|
7
7
|
--switch-bg-color-pressed: var(--color-warm-grey-6); // @presenter Color
|
|
8
8
|
--switch-bg-color-disabled: var(--color-warm-grey-3); // @presenter Color
|
|
@@ -128,6 +128,7 @@ const TableOfContentMenuItem = styled.a<{ depth: number }>`
|
|
|
128
128
|
&.active {
|
|
129
129
|
color: var(--toc-item-text-color-active);
|
|
130
130
|
border-left: solid 2px var(--toc-item-border-color-active);
|
|
131
|
+
font-weight: var(--toc-item-font-weight-active);
|
|
131
132
|
}
|
|
132
133
|
|
|
133
134
|
:empty {
|
|
@@ -24,12 +24,13 @@ export const toc = css`
|
|
|
24
24
|
|
|
25
25
|
--toc-item-font-weight: var(--font-weight-regular); // @presenter FontWeight
|
|
26
26
|
--toc-item-text-color: var(--text-color-description); // @presenter Color
|
|
27
|
-
--toc-item-text-color-active: var(--text-color-
|
|
27
|
+
--toc-item-text-color-active: var(--color-primary-text, var(--toc-item-text-color-active-legacy)); // @presenter Color
|
|
28
28
|
--toc-item-bg-color: transparent; // @presenter Color
|
|
29
29
|
--toc-item-nested-offset: calc(var(--toc-spacing-unit) * 2); // @presenter Spacing
|
|
30
30
|
--toc-item-padding-vertical: calc(var(--toc-spacing-unit) / 2); // @presenter Spacing
|
|
31
31
|
--toc-item-padding-horizontal: calc(var(--toc-spacing-unit) * 2); // @presenter Spacing
|
|
32
|
-
--toc-item-border-color-active: var(--border-color-
|
|
32
|
+
--toc-item-border-color-active: var(--color-primary-base, var(--toc-item-border-color-active-legacy));
|
|
33
|
+
--toc-item-font-weight-active: var(--font-weight-medium); // @presenter FontWeight
|
|
33
34
|
|
|
34
35
|
/**
|
|
35
36
|
* @tokens TOC header
|