@alauda/doom 1.18.3 → 1.19.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cli/load-config.js +1 -0
- package/lib/cli/new.js +6 -6
- package/lib/cli/translate.js +2 -2
- package/lib/global/AuthCheck/index.js +4 -4
- package/lib/global/SiteOverrides/index.js +6 -5
- package/lib/login/LoginForm/index.js +2 -2
- package/lib/plugins/replace/resolve-reference.js +2 -2
- package/lib/plugins/replace/resolve-release.js +2 -2
- package/lib/runtime/components/Overview.js +3 -3
- package/lib/theme/AutoExpandable.d.ts +5 -0
- package/lib/theme/AutoExpandable.js +28 -0
- package/lib/theme/CodeBlock.d.ts +2 -0
- package/lib/theme/CodeBlock.js +4 -0
- package/lib/theme/index.d.ts +1 -0
- package/lib/theme/index.js +1 -0
- package/lib/theme/useEditLink.js +5 -4
- package/package.json +22 -22
- package/styles/auto-expandable.module.scss +77 -0
package/lib/cli/load-config.js
CHANGED
|
@@ -160,6 +160,7 @@ const getCommonConfig = async ({ config, root, configFilePath, base, version, do
|
|
|
160
160
|
themeConfig: {
|
|
161
161
|
enableScrollToTop: true,
|
|
162
162
|
localeRedirect: redirect,
|
|
163
|
+
llmsUI: false,
|
|
163
164
|
...(editRepoEnabled &&
|
|
164
165
|
editRepoBaseUrl && {
|
|
165
166
|
editLink: { docRepoBaseUrl: editRepoBaseUrl },
|
package/lib/cli/new.js
CHANGED
|
@@ -3,7 +3,7 @@ import path from 'node:path';
|
|
|
3
3
|
import * as prompts from '@inquirer/prompts';
|
|
4
4
|
import { logger } from '@rsbuild/core';
|
|
5
5
|
import { Command } from 'commander';
|
|
6
|
-
import
|
|
6
|
+
import ejs from 'ejs';
|
|
7
7
|
import { glob } from 'tinyglobby';
|
|
8
8
|
import { cyan, magenta } from 'yoctocolors';
|
|
9
9
|
import { JS_STR_FALSY_VALUES } from '../shared/index.js';
|
|
@@ -52,7 +52,7 @@ const handleTemplateFile = async ({ source, target, processors, parameters, writ
|
|
|
52
52
|
switch (processor.type) {
|
|
53
53
|
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
|
|
54
54
|
case 'ejsTemplate': {
|
|
55
|
-
content = render(content, { data: processor.data, parameters });
|
|
55
|
+
content = ejs.render(content, { data: processor.data, parameters });
|
|
56
56
|
break;
|
|
57
57
|
}
|
|
58
58
|
default: {
|
|
@@ -104,9 +104,9 @@ export const newCommand = new Command('new')
|
|
|
104
104
|
}
|
|
105
105
|
logger.start('Generating scaffolding...');
|
|
106
106
|
for (const layout of scaffolding.layout || []) {
|
|
107
|
-
const source = path.resolve(base, render(layout.source, { parameters }));
|
|
108
|
-
const target = path.resolve(render(layout.target, { parameters }));
|
|
109
|
-
const when = layout.when && render(layout.when, { parameters });
|
|
107
|
+
const source = path.resolve(base, ejs.render(layout.source, { parameters }));
|
|
108
|
+
const target = path.resolve(ejs.render(layout.target, { parameters }));
|
|
109
|
+
const when = layout.when && ejs.render(layout.when, { parameters });
|
|
110
110
|
if (when != null && JS_STR_FALSY_VALUES.has(when)) {
|
|
111
111
|
continue;
|
|
112
112
|
}
|
|
@@ -130,7 +130,7 @@ export const newCommand = new Command('new')
|
|
|
130
130
|
.filter((d) => d.isFile())
|
|
131
131
|
.map((d) => path.relative(source, path.resolve(d.parentPath, d.name))));
|
|
132
132
|
for (const matcher of layout.matchers || []) {
|
|
133
|
-
const matched = await glob(matcher.match.map((m) => render(m, { parameters })), { cwd: source });
|
|
133
|
+
const matched = await glob(matcher.match.map((m) => ejs.render(m, { parameters })), { cwd: source });
|
|
134
134
|
for (const file of matched) {
|
|
135
135
|
files.delete(file);
|
|
136
136
|
await handleTemplateFile({
|
package/lib/cli/translate.js
CHANGED
|
@@ -6,7 +6,7 @@ import { isDeepStrictEqual } from 'node:util';
|
|
|
6
6
|
import { logger } from '@rspress/core';
|
|
7
7
|
import { removeLeadingSlash } from '@rspress/shared';
|
|
8
8
|
import { Command } from 'commander';
|
|
9
|
-
import
|
|
9
|
+
import ejs from 'ejs';
|
|
10
10
|
import matter from 'gray-matter';
|
|
11
11
|
import { AzureOpenAI, RateLimitError } from 'openai';
|
|
12
12
|
import { pRateLimit } from 'p-ratelimit';
|
|
@@ -224,7 +224,7 @@ export const translate = async ({ source, sourceContent, target, systemPrompt, u
|
|
|
224
224
|
}
|
|
225
225
|
}
|
|
226
226
|
const { content: contentWithPlaceholders, anchors } = replaceAnchorsWithPlaceholders(sourceContent);
|
|
227
|
-
const finalSystemPrompt = await render(systemPrompt?.trim() || DEFAULT_SYSTEM_PROMPT, {
|
|
227
|
+
const finalSystemPrompt = await ejs.render(systemPrompt?.trim() || DEFAULT_SYSTEM_PROMPT, {
|
|
228
228
|
sourceLang,
|
|
229
229
|
targetLang,
|
|
230
230
|
userPrompt,
|
|
@@ -21,7 +21,7 @@ const AuthCheck = () => {
|
|
|
21
21
|
}
|
|
22
22
|
void navigate(`${lang === site.lang ? '' : `/${lang}`}/login.html?from=${encodeURIComponent(`${pathname}${search}${hash}`)}`);
|
|
23
23
|
});
|
|
24
|
-
const
|
|
24
|
+
const abortControllerRef = useRef(null);
|
|
25
25
|
const authCheck = useMemoizedFn(async () => {
|
|
26
26
|
if (!siteData.base.startsWith('/russian/')) {
|
|
27
27
|
return;
|
|
@@ -30,9 +30,9 @@ const AuthCheck = () => {
|
|
|
30
30
|
login();
|
|
31
31
|
return;
|
|
32
32
|
}
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
const signal =
|
|
33
|
+
abortControllerRef.current?.abort();
|
|
34
|
+
abortControllerRef.current = new AbortController();
|
|
35
|
+
const signal = abortControllerRef.current.signal;
|
|
36
36
|
try {
|
|
37
37
|
await xfetch('https://cloud.alauda.io/api/v1/tenant/info', {
|
|
38
38
|
headers: {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { usePage, useSite } from '@rspress/core/runtime';
|
|
2
2
|
import { useEffect } from 'react';
|
|
3
3
|
import { useSiteOverrides } from '@alauda/doom/runtime';
|
|
4
4
|
const setNavBarSpans = (logoText) => {
|
|
@@ -24,7 +24,8 @@ const concatTitle = (title, suffix) => {
|
|
|
24
24
|
return `${title} ${suffix}`;
|
|
25
25
|
};
|
|
26
26
|
export const SiteOverrides = () => {
|
|
27
|
-
const {
|
|
27
|
+
const { page } = usePage();
|
|
28
|
+
const { site } = useSite();
|
|
28
29
|
const { pageType,
|
|
29
30
|
// Inject by remark-plugin-toc
|
|
30
31
|
title: articleTitle,
|
|
@@ -35,8 +36,8 @@ export const SiteOverrides = () => {
|
|
|
35
36
|
if (!title) {
|
|
36
37
|
return;
|
|
37
38
|
}
|
|
38
|
-
|
|
39
|
-
|
|
39
|
+
site.originalTitle ??= site.title;
|
|
40
|
+
site.title = title;
|
|
40
41
|
let newTitle = frontmatter.title || articleTitle;
|
|
41
42
|
if (newTitle && pageType === 'doc') {
|
|
42
43
|
// append main title as a suffix
|
|
@@ -62,7 +63,7 @@ export const SiteOverrides = () => {
|
|
|
62
63
|
frontmatter.title,
|
|
63
64
|
frontmatter.titleSuffix,
|
|
64
65
|
pageType,
|
|
65
|
-
|
|
66
|
+
site,
|
|
66
67
|
title,
|
|
67
68
|
]);
|
|
68
69
|
useEffect(() => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { useRef, useState, } from 'react';
|
|
2
|
+
import { useMemo, useRef, useState, } from 'react';
|
|
3
3
|
import { ApiMethod, ResponseError, xfetch } from 'x-fetch';
|
|
4
4
|
import { ApiErrorAlert } from "../ApiErrorAlert/index.js";
|
|
5
5
|
import { Button } from "../Button/index.js";
|
|
@@ -19,13 +19,13 @@ export const LoginForm = ({ onSubmit, onLoggedIn, ...props }) => {
|
|
|
19
19
|
const { setAuthBasic } = useCloudAuth();
|
|
20
20
|
const captchaId = error?.data?.extra?.captchaId;
|
|
21
21
|
const [timestamp, setTimestamp] = useState();
|
|
22
|
+
const origin = useMemo(getCloudOrigin, []);
|
|
22
23
|
const handleSubmit = useMemoizedFn(async (ev) => {
|
|
23
24
|
ev.preventDefault();
|
|
24
25
|
ev.stopPropagation();
|
|
25
26
|
onSubmit?.(ev);
|
|
26
27
|
const formData = new FormData(ev.currentTarget);
|
|
27
28
|
setLoading(true);
|
|
28
|
-
const origin = getCloudOrigin();
|
|
29
29
|
if (pwdPubkeyRef.current == null) {
|
|
30
30
|
try {
|
|
31
31
|
pwdPubkeyRef.current = await xfetch(`${origin}/api/v1/pubkey`);
|
|
@@ -2,7 +2,7 @@ import fs from 'node:fs/promises';
|
|
|
2
2
|
import path from 'node:path';
|
|
3
3
|
import { logger } from '@rspress/core';
|
|
4
4
|
import { isProduction } from '@rspress/shared';
|
|
5
|
-
import
|
|
5
|
+
import ejs from 'ejs';
|
|
6
6
|
import { red } from 'yoctocolors';
|
|
7
7
|
import { resolveRepo } from "../../utils/index.js";
|
|
8
8
|
import { parseToc } from "./parse-toc.js";
|
|
@@ -46,7 +46,7 @@ const resolveReference_ = async (localBasePath, localPublicBase, items, refName,
|
|
|
46
46
|
switch (processor.type) {
|
|
47
47
|
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
|
|
48
48
|
case 'ejsTemplate': {
|
|
49
|
-
content = await render(content, { data: processor.data }, { async: true });
|
|
49
|
+
content = await ejs.render(content, { data: processor.data }, { async: true });
|
|
50
50
|
break;
|
|
51
51
|
}
|
|
52
52
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { logger } from '@rspress/core';
|
|
2
2
|
import { isProduction } from '@rspress/shared';
|
|
3
|
-
import
|
|
3
|
+
import ejs from 'ejs';
|
|
4
4
|
import { ResponseError, xfetch } from 'x-fetch';
|
|
5
5
|
import { cyan, red } from 'yoctocolors';
|
|
6
6
|
const releaseCache = new Map();
|
|
@@ -82,7 +82,7 @@ const resolveRelease_ = async (releaseTemplates, releaseQuery, isMdx) => {
|
|
|
82
82
|
}
|
|
83
83
|
data[key] = value;
|
|
84
84
|
}
|
|
85
|
-
const jql = await render(template, data, { async: true });
|
|
85
|
+
const jql = await ejs.render(template, data, { async: true });
|
|
86
86
|
logger.info(`Fetching release notes for query \`${cyan(releaseQuery)}\`, JQL: \`${cyan(jql)}\``);
|
|
87
87
|
let issues;
|
|
88
88
|
try {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { isEqualPath,
|
|
2
|
+
import { isEqualPath, usePage, usePages, useSidebar, } from '@rspress/core/runtime';
|
|
3
3
|
import { FallbackHeading, Link, renderInlineMarkdown, } from '@rspress/core/theme-original';
|
|
4
4
|
import { Fragment, useCallback, useMemo } from 'react';
|
|
5
5
|
import classes from '../../../styles/overview.module.scss';
|
|
@@ -22,11 +22,11 @@ const masonryOptions = {
|
|
|
22
22
|
// In overpage page, we select all the related sidebar groups and show the groups in the page.
|
|
23
23
|
// In the meantime, some sidebar items also should be shown in the page, we collect them in the group named 'Others' and show them in the page.
|
|
24
24
|
export function Overview(props) {
|
|
25
|
-
const {
|
|
25
|
+
const { pages } = usePages();
|
|
26
|
+
const { page: { routePath, frontmatter, title }, } = usePage();
|
|
26
27
|
const { content, groups: customGroups, defaultGroupTitle = 'Others' } = props;
|
|
27
28
|
const subFilter = useCallback((link) => link.startsWith(routePath.replace(/overview$/, '')) &&
|
|
28
29
|
!isEqualPath(link, routePath), [routePath]);
|
|
29
|
-
const { pages } = siteData;
|
|
30
30
|
const overviewModules = useMemo(() => pages.filter((page) => subFilter(page.routePath)), [pages, subFilter]);
|
|
31
31
|
let overviewSidebarGroups = useSidebar();
|
|
32
32
|
if (overviewSidebarGroups[0] &&
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { IconDown, SvgWrapper } from '@rspress/core/theme';
|
|
3
|
+
import { clsx } from 'clsx';
|
|
4
|
+
import { useCallback, useEffect, useRef, useState } from 'react';
|
|
5
|
+
import classes from '@alauda/doom/styles/auto-expandable.module.scss';
|
|
6
|
+
export const AutoExpandable = ({ threshold = 240, children, }) => {
|
|
7
|
+
const ref = useRef(null);
|
|
8
|
+
const [expandable, setExpandable] = useState(false);
|
|
9
|
+
const [expanded, setExpanded] = useState(false);
|
|
10
|
+
useEffect(() => {
|
|
11
|
+
if (!ref.current) {
|
|
12
|
+
return;
|
|
13
|
+
}
|
|
14
|
+
if (ref.current.scrollHeight > threshold) {
|
|
15
|
+
// eslint-disable-next-line react-hooks/set-state-in-effect, @eslint-react/hooks-extra/no-direct-set-state-in-use-effect
|
|
16
|
+
setExpandable(true);
|
|
17
|
+
}
|
|
18
|
+
}, [threshold]);
|
|
19
|
+
const onExpandChange = useCallback(() => {
|
|
20
|
+
setExpanded((expanded) => !expanded);
|
|
21
|
+
}, []);
|
|
22
|
+
return (_jsxs("div", { ref: ref, className: classes.container, children: [_jsx("div", { className: clsx({
|
|
23
|
+
[classes.expandable]: expandable,
|
|
24
|
+
[classes.expanded]: expanded,
|
|
25
|
+
}), children: children }), expandable && (_jsx("div", { className: classes.actionContainer, children: _jsxs("button", { className: classes.action, type: "button", onClick: onExpandChange, "aria-expanded": expanded, children: ["Show ", expanded ? 'less' : 'more', _jsx(SvgWrapper, { className: clsx(classes.arrow, {
|
|
26
|
+
[classes.expanded]: expanded,
|
|
27
|
+
}), icon: IconDown })] }) }))] }));
|
|
28
|
+
};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { CodeBlock as OriginalCodeBlock, } from '@rspress/core/theme-original';
|
|
3
|
+
import { AutoExpandable } from './AutoExpandable.js';
|
|
4
|
+
export const CodeBlock = (props) => (_jsx(AutoExpandable, { children: _jsx(OriginalCodeBlock, { ...props }) }));
|
package/lib/theme/index.d.ts
CHANGED
package/lib/theme/index.js
CHANGED
package/lib/theme/useEditLink.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { useI18n,
|
|
1
|
+
import { useI18n, usePage, useSite } from '@rspress/core/runtime';
|
|
2
2
|
export function useEditLink() {
|
|
3
|
-
const {
|
|
4
|
-
const
|
|
3
|
+
const { site } = useSite();
|
|
4
|
+
const { page } = usePage();
|
|
5
|
+
const editLink = site.themeConfig.editLink;
|
|
5
6
|
const t = useI18n();
|
|
6
7
|
const text = t('editLinkText');
|
|
7
8
|
if (!editLink?.docRepoBaseUrl || !text) {
|
|
@@ -12,7 +13,7 @@ export function useEditLink() {
|
|
|
12
13
|
docRepoBaseUrl += '/';
|
|
13
14
|
}
|
|
14
15
|
const lastSegment = docRepoBaseUrl.split('/').at(-2);
|
|
15
|
-
const fixedLang =
|
|
16
|
+
const fixedLang = site.themeConfig.locales.some(({ lang }) => lang === lastSegment);
|
|
16
17
|
const relativePagePath = page._relativePath.replace(/\\/g, '/');
|
|
17
18
|
const link = `${docRepoBaseUrl}${fixedLang ? relativePagePath.split('/').slice(1).join('/') : relativePagePath}`;
|
|
18
19
|
return {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alauda/doom",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.19.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Doctor Doom making docs.",
|
|
6
6
|
"repository": {
|
|
@@ -41,30 +41,30 @@
|
|
|
41
41
|
],
|
|
42
42
|
"dependencies": {
|
|
43
43
|
"@alauda/doom-export": "^0.3.1",
|
|
44
|
-
"@cspell/eslint-plugin": "^9.
|
|
45
|
-
"@eslint-react/eslint-plugin": "^2.
|
|
44
|
+
"@cspell/eslint-plugin": "^9.6.3",
|
|
45
|
+
"@eslint-react/eslint-plugin": "^2.9.4",
|
|
46
46
|
"@inquirer/prompts": "^8.2.0",
|
|
47
47
|
"@openapi-contrib/openapi-schema-to-json-schema": "^5.1.0",
|
|
48
|
-
"@rsbuild/plugin-react": "^1.4.
|
|
49
|
-
"@rsbuild/plugin-sass": "^1.
|
|
50
|
-
"@rsbuild/plugin-svgr": "^1.
|
|
51
|
-
"@rsbuild/plugin-yaml": "^1.0.
|
|
52
|
-
"@rspress/core": "2.0.
|
|
53
|
-
"@rspress/plugin-algolia": "2.0.
|
|
54
|
-
"@rspress/plugin-sitemap": "2.0.
|
|
55
|
-
"@rspress/shared": "2.0.
|
|
56
|
-
"@shikijs/transformers": "^3.
|
|
48
|
+
"@rsbuild/plugin-react": "^1.4.5",
|
|
49
|
+
"@rsbuild/plugin-sass": "^1.5.0",
|
|
50
|
+
"@rsbuild/plugin-svgr": "^1.3.0",
|
|
51
|
+
"@rsbuild/plugin-yaml": "^1.0.4",
|
|
52
|
+
"@rspress/core": "2.0.2",
|
|
53
|
+
"@rspress/plugin-algolia": "2.0.2",
|
|
54
|
+
"@rspress/plugin-sitemap": "2.0.2",
|
|
55
|
+
"@rspress/shared": "2.0.2",
|
|
56
|
+
"@shikijs/transformers": "^3.22.0",
|
|
57
57
|
"@total-typescript/ts-reset": "^0.6.1",
|
|
58
|
-
"@types/react": "^19.2.
|
|
58
|
+
"@types/react": "^19.2.10",
|
|
59
59
|
"ab64": "^0.1.6",
|
|
60
60
|
"chokidar": "^5.0.0",
|
|
61
61
|
"clsx": "^2.1.1",
|
|
62
|
-
"commander": "^14.0.
|
|
63
|
-
"ejs": "^
|
|
64
|
-
"es-toolkit": "^1.
|
|
62
|
+
"commander": "^14.0.3",
|
|
63
|
+
"ejs": "^4.0.1",
|
|
64
|
+
"es-toolkit": "^1.44.0",
|
|
65
65
|
"eslint": "^9.39.2",
|
|
66
66
|
"eslint-plugin-mdx": "^3.6.2",
|
|
67
|
-
"globals": "^17.
|
|
67
|
+
"globals": "^17.3.0",
|
|
68
68
|
"html-tag-names": "^2.1.0",
|
|
69
69
|
"jsencrypt": "^3.5.4",
|
|
70
70
|
"masonry-layout": "^4.2.2",
|
|
@@ -74,7 +74,7 @@
|
|
|
74
74
|
"mdast-util-to-markdown": "^2.1.2",
|
|
75
75
|
"mdast-util-to-string": "^4.0.0",
|
|
76
76
|
"mermaid": "^11.12.2",
|
|
77
|
-
"openai": "^6.
|
|
77
|
+
"openai": "^6.17.0",
|
|
78
78
|
"openapi-types": "^12.1.3",
|
|
79
79
|
"p-ratelimit": "^1.0.1",
|
|
80
80
|
"picomatch": "^4.0.3",
|
|
@@ -95,14 +95,14 @@
|
|
|
95
95
|
"remark-mdx": "^3.1.1",
|
|
96
96
|
"remark-message-control": "^8.0.0",
|
|
97
97
|
"remark-stringify": "^11.0.0",
|
|
98
|
-
"shiki": "^3.
|
|
98
|
+
"shiki": "^3.22.0",
|
|
99
99
|
"simple-git": "^3.30.0",
|
|
100
|
-
"string-width": "^8.1.
|
|
100
|
+
"string-width": "^8.1.1",
|
|
101
101
|
"swagger2openapi": "^7.0.8",
|
|
102
102
|
"tinyglobby": "^0.2.15",
|
|
103
|
-
"type-fest": "^5.3
|
|
103
|
+
"type-fest": "^5.4.3",
|
|
104
104
|
"typescript": "^5.9.3",
|
|
105
|
-
"typescript-eslint": "^8.
|
|
105
|
+
"typescript-eslint": "^8.54.0",
|
|
106
106
|
"unified": "^11.0.5",
|
|
107
107
|
"unified-lint-rule": "^3.0.1",
|
|
108
108
|
"unist-util-position": "^5.0.0",
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
.container {
|
|
2
|
+
&:has(.expandable :global .rp-codeblock) {
|
|
3
|
+
border: var(--rp-code-block-border);
|
|
4
|
+
border-radius: var(--rp-radius);
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
.expandable {
|
|
8
|
+
max-height: 200px;
|
|
9
|
+
overflow: auto;
|
|
10
|
+
|
|
11
|
+
:global .rp-codeblock {
|
|
12
|
+
border: 0;
|
|
13
|
+
margin: 0;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
&.expanded {
|
|
17
|
+
max-height: none;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.action-container {
|
|
23
|
+
display: flex;
|
|
24
|
+
justify-content: center;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.action {
|
|
28
|
+
display: inline-flex;
|
|
29
|
+
justify-content: center;
|
|
30
|
+
align-items: center;
|
|
31
|
+
height: 36px;
|
|
32
|
+
padding: 0 12px;
|
|
33
|
+
gap: 6px;
|
|
34
|
+
margin: 1rem 0;
|
|
35
|
+
|
|
36
|
+
border-radius: 8px;
|
|
37
|
+
border: 1px solid var(--rp-c-divider-light);
|
|
38
|
+
background: var(--rp-c-bg);
|
|
39
|
+
color: var(--rp-c-text-2);
|
|
40
|
+
|
|
41
|
+
font-size: 14px;
|
|
42
|
+
font-weight: 500;
|
|
43
|
+
line-height: normal;
|
|
44
|
+
|
|
45
|
+
user-select: none;
|
|
46
|
+
white-space: nowrap;
|
|
47
|
+
|
|
48
|
+
transition:
|
|
49
|
+
background 0.2s,
|
|
50
|
+
border-color 0.2s,
|
|
51
|
+
color 0.2s,
|
|
52
|
+
box-shadow 0.2s,
|
|
53
|
+
transform 0.1s,
|
|
54
|
+
opacity 0.2s;
|
|
55
|
+
|
|
56
|
+
cursor: pointer;
|
|
57
|
+
|
|
58
|
+
&:hover {
|
|
59
|
+
background: var(--rp-c-bg-soft);
|
|
60
|
+
border-color: var(--rp-c-divider);
|
|
61
|
+
color: var(--rp-c-text-1);
|
|
62
|
+
box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
&:active {
|
|
66
|
+
background: var(--rp-c-bg-soft);
|
|
67
|
+
box-shadow: none;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.arrow {
|
|
72
|
+
transition: transform 0.2s;
|
|
73
|
+
|
|
74
|
+
&.expanded {
|
|
75
|
+
transform: rotate(180deg);
|
|
76
|
+
}
|
|
77
|
+
}
|