@alauda/doom 1.11.0 → 1.12.0
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/assets/alert.svg +1 -0
- package/assets/angle-down.svg +1 -0
- package/assets/assistant.svg +1 -0
- package/assets/close.svg +1 -0
- package/assets/logout.svg +1 -0
- package/assets/new-chat.svg +1 -0
- package/assets/question-circle.svg +1 -0
- package/assets/send.svg +1 -0
- package/lib/cli/load-config.js +4 -0
- package/lib/global/Intelligence/AIAssistant/Chat/ChatRefDocs/index.d.ts +5 -0
- package/lib/global/Intelligence/AIAssistant/Chat/ChatRefDocs/index.js +16 -0
- package/lib/global/Intelligence/AIAssistant/Chat/ThinkingProcess/index.d.ts +4 -0
- package/lib/global/Intelligence/AIAssistant/Chat/ThinkingProcess/index.js +6 -0
- package/lib/global/Intelligence/AIAssistant/Chat/index.d.ts +7 -0
- package/lib/global/Intelligence/AIAssistant/Chat/index.js +8 -0
- package/lib/global/Intelligence/AIAssistant/Preamble/ApiErrorAlert/index.d.ts +5 -0
- package/lib/global/Intelligence/AIAssistant/Preamble/ApiErrorAlert/index.js +22 -0
- package/lib/global/Intelligence/AIAssistant/Preamble/Button/index.d.ts +8 -0
- package/lib/global/Intelligence/AIAssistant/Preamble/Button/index.js +5 -0
- package/lib/global/Intelligence/AIAssistant/Preamble/CaptchaInput/index.d.ts +10 -0
- package/lib/global/Intelligence/AIAssistant/Preamble/CaptchaInput/index.js +14 -0
- package/lib/global/Intelligence/AIAssistant/Preamble/FocusInput/index.d.ts +6 -0
- package/lib/global/Intelligence/AIAssistant/Preamble/FocusInput/index.js +19 -0
- package/lib/global/Intelligence/AIAssistant/Preamble/FormItem/index.d.ts +16 -0
- package/lib/global/Intelligence/AIAssistant/Preamble/FormItem/index.js +27 -0
- package/lib/global/Intelligence/AIAssistant/Preamble/Input/index.d.ts +7 -0
- package/lib/global/Intelligence/AIAssistant/Preamble/Input/index.js +5 -0
- package/lib/global/Intelligence/AIAssistant/Preamble/LoginForm/index.d.ts +3 -0
- package/lib/global/Intelligence/AIAssistant/Preamble/LoginForm/index.js +88 -0
- package/lib/global/Intelligence/AIAssistant/Preamble/LoginForm/types.d.ts +18 -0
- package/lib/global/Intelligence/AIAssistant/Preamble/LoginForm/types.js +1 -0
- package/lib/global/Intelligence/AIAssistant/Preamble/LoginForm/utils.d.ts +3 -0
- package/lib/global/Intelligence/AIAssistant/Preamble/LoginForm/utils.js +7 -0
- package/lib/global/Intelligence/AIAssistant/Preamble/Radio/Radio.d.ts +7 -0
- package/lib/global/Intelligence/AIAssistant/Preamble/Radio/Radio.js +11 -0
- package/lib/global/Intelligence/AIAssistant/Preamble/Radio/RadioGroup.d.ts +11 -0
- package/lib/global/Intelligence/AIAssistant/Preamble/Radio/RadioGroup.js +21 -0
- package/lib/global/Intelligence/AIAssistant/Preamble/Radio/context.d.ts +7 -0
- package/lib/global/Intelligence/AIAssistant/Preamble/Radio/context.js +2 -0
- package/lib/global/Intelligence/AIAssistant/Preamble/Radio/index.d.ts +2 -0
- package/lib/global/Intelligence/AIAssistant/Preamble/Radio/index.js +2 -0
- package/lib/global/Intelligence/AIAssistant/Preamble/index.d.ts +4 -0
- package/lib/global/Intelligence/AIAssistant/Preamble/index.js +10 -0
- package/lib/global/Intelligence/AIAssistant/Preamble/types.d.ts +9 -0
- package/lib/global/Intelligence/AIAssistant/Preamble/types.js +1 -0
- package/lib/global/Intelligence/AIAssistant/ResizableUserInput/index.d.ts +8 -0
- package/lib/global/Intelligence/AIAssistant/ResizableUserInput/index.js +54 -0
- package/lib/global/Intelligence/AIAssistant/Thinking.d.ts +1 -0
- package/lib/global/Intelligence/AIAssistant/Thinking.js +15 -0
- package/lib/global/Intelligence/AIAssistant/index.d.ts +6 -0
- package/lib/global/Intelligence/AIAssistant/index.js +122 -0
- package/lib/global/Intelligence/AIAssistant/types.d.ts +14 -0
- package/lib/global/Intelligence/AIAssistant/types.js +1 -0
- package/lib/global/Intelligence/AIAssistant/utils.d.ts +8 -0
- package/lib/global/Intelligence/AIAssistant/utils.js +29 -0
- package/lib/global/Intelligence/constants.d.ts +6 -0
- package/lib/global/Intelligence/constants.js +21 -0
- package/lib/global/Intelligence/context.d.ts +18 -0
- package/lib/global/Intelligence/context.js +31 -0
- package/lib/global/Intelligence/index.d.ts +2 -0
- package/lib/global/Intelligence/index.js +33 -0
- package/lib/global/Intelligence/types.d.ts +32 -0
- package/lib/global/Intelligence/types.js +6 -0
- package/lib/global/Intelligence/utils.d.ts +3 -0
- package/lib/global/Intelligence/utils.js +32 -0
- package/lib/global/VersionsNav/NavMenuSingleItem.js +2 -2
- package/lib/runtime/hooks/index.d.ts +5 -3
- package/lib/runtime/hooks/index.js +5 -3
- package/lib/runtime/hooks/useInterval.d.ts +1 -0
- package/lib/runtime/hooks/useInterval.js +19 -0
- package/lib/runtime/hooks/useMemoizedFn.d.ts +1 -0
- package/lib/runtime/hooks/useMemoizedFn.js +12 -0
- package/lib/runtime/hooks/useTranslation.d.ts +1 -1
- package/lib/runtime/translation.d.ts +148 -0
- package/lib/runtime/translation.js +111 -0
- package/package.json +10 -5
- package/styles/ai-assistant.module.scss +61 -0
- package/styles/chat-ref-docs.module.scss +50 -0
- package/styles/chat.module.scss +72 -0
- package/styles/global.scss +2 -0
- package/styles/intelligence.module.scss +26 -0
- package/styles/intelligence.scss +168 -0
- package/styles/preamble.module.scss +27 -0
- package/styles/resizable-user-input.module.scss +60 -0
|
@@ -17,6 +17,43 @@ const en = {
|
|
|
17
17
|
download_pdf: 'Download PDF',
|
|
18
18
|
toc: 'TOC',
|
|
19
19
|
view_docs_as_pdf: 'View full docs as PDF',
|
|
20
|
+
ai_assistant: 'AI Assistant',
|
|
21
|
+
close: 'Close',
|
|
22
|
+
exclamation: '! ',
|
|
23
|
+
semicolon: '; ',
|
|
24
|
+
period: '. ',
|
|
25
|
+
colon: ': ',
|
|
26
|
+
user_login: 'User login',
|
|
27
|
+
user_login_tip: 'Use the same credentials as for the "Customer Portal" site.',
|
|
28
|
+
customer_portal_global: 'Customer Portal Global',
|
|
29
|
+
customer_portal_china: 'Customer Portal China',
|
|
30
|
+
user_login_region_china_tip: 'If you are a customer in the Chinese Mainland, select Customer Portal China;',
|
|
31
|
+
user_login_region_global_tip: 'if you are a customer outside the Chinese Mainland, select Customer Portal Global.',
|
|
32
|
+
account_id: 'Account ID',
|
|
33
|
+
username: 'Username',
|
|
34
|
+
password: 'Password',
|
|
35
|
+
captcha: 'Verification Code',
|
|
36
|
+
login: 'Login',
|
|
37
|
+
current_field: 'The current field ',
|
|
38
|
+
field_required: ' is required',
|
|
39
|
+
ERR_INTERNET_DISCONNECTED: 'Please check your network connection and try again',
|
|
40
|
+
AccountDisabledError: 'Account disabled, please contact administrator or service manager',
|
|
41
|
+
CaptchaError: 'Verification code incorrect, please enter again',
|
|
42
|
+
LoginError: 'Username or password incorrect, please enter again',
|
|
43
|
+
NetworkError: 'Network error, please try again later',
|
|
44
|
+
TenantError: 'Account error, please enter again or contact your service manager',
|
|
45
|
+
TenantNotFoundError: 'Login failed, tenant does not exist',
|
|
46
|
+
logout: 'Logout',
|
|
47
|
+
hi_there: 'Hi there!',
|
|
48
|
+
ai_assistant_tip: "I'm your AI assistant, ready to help with any questions about this documentation!",
|
|
49
|
+
ai_assistant_placeholder: 'Type questions here; press Shift-Enter for new line.',
|
|
50
|
+
max_chars_exceeded_tip: 'Maximum 2000 characters allowed.',
|
|
51
|
+
thinking: 'Thinking',
|
|
52
|
+
thinking_process: 'Thinking process',
|
|
53
|
+
referenced_doc_links: 'Referenced doc links',
|
|
54
|
+
view_more_related_docs: 'View more related docs',
|
|
55
|
+
view_less_related_docs: 'View less related docs',
|
|
56
|
+
new_chat: 'New Chat',
|
|
20
57
|
};
|
|
21
58
|
const zh = {
|
|
22
59
|
collapse_all: '全部收起',
|
|
@@ -37,6 +74,43 @@ const zh = {
|
|
|
37
74
|
download_pdf: '下载 PDF',
|
|
38
75
|
toc: '目录',
|
|
39
76
|
view_docs_as_pdf: '以 PDF 格式查看完整文档',
|
|
77
|
+
ai_assistant: 'AI 助手',
|
|
78
|
+
close: '关闭',
|
|
79
|
+
exclamation: '!',
|
|
80
|
+
semicolon: ';',
|
|
81
|
+
period: '。',
|
|
82
|
+
colon: ':',
|
|
83
|
+
user_login: '用户登录',
|
|
84
|
+
user_login_tip: '使用与“客户门户”站点相同的凭据。',
|
|
85
|
+
customer_portal_global: '客户门户全球',
|
|
86
|
+
customer_portal_china: '客户门户中国',
|
|
87
|
+
user_login_region_china_tip: '如果您是中国大陆的客户,请选择客户门户中国;',
|
|
88
|
+
user_login_region_global_tip: '如果您是中国大陆以外的客户,请选择客户门户全球。',
|
|
89
|
+
account_id: '账号 ID',
|
|
90
|
+
username: '用户名',
|
|
91
|
+
password: '密码',
|
|
92
|
+
captcha: '验证码',
|
|
93
|
+
login: '登录',
|
|
94
|
+
current_field: '当前字段',
|
|
95
|
+
field_required: '不能为空',
|
|
96
|
+
ERR_INTERNET_DISCONNECTED: '网络中断,请检查网络状态再重试',
|
|
97
|
+
AccountDisabledError: '账号已禁用,请联系管理员或服务经理',
|
|
98
|
+
CaptchaError: '验证码错误,请重新输入',
|
|
99
|
+
LoginError: '用户名或密码错误,请重新输入',
|
|
100
|
+
NetworkError: '网络错误,请稍后重试',
|
|
101
|
+
TenantError: '账号错误,请重新输入或联系服务经理',
|
|
102
|
+
TenantNotFoundError: '登录失败,租户不存在',
|
|
103
|
+
logout: '登出',
|
|
104
|
+
hi_there: '你好!',
|
|
105
|
+
ai_assistant_tip: '我是您的 AI 助手,随时准备回答有关此文档的任何问题!',
|
|
106
|
+
ai_assistant_placeholder: '在此输入问题;按 Shift-Enter 换行。',
|
|
107
|
+
max_chars_exceeded_tip: '最多允许 2000 个字符。',
|
|
108
|
+
thinking: '思考中',
|
|
109
|
+
thinking_process: '思考过程',
|
|
110
|
+
referenced_doc_links: '引用的文档链接',
|
|
111
|
+
view_more_related_docs: '查看更多相关文档',
|
|
112
|
+
view_less_related_docs: '查看更少相关文档',
|
|
113
|
+
new_chat: '新会话',
|
|
40
114
|
};
|
|
41
115
|
const ru = {
|
|
42
116
|
collapse_all: 'Свернуть всё',
|
|
@@ -57,5 +131,42 @@ const ru = {
|
|
|
57
131
|
download_pdf: 'Скачать PDF',
|
|
58
132
|
toc: 'Содержание',
|
|
59
133
|
view_docs_as_pdf: 'Просмотреть полную документацию в формате PDF',
|
|
134
|
+
ai_assistant: 'AI Ассистент',
|
|
135
|
+
close: 'Закрыть',
|
|
136
|
+
exclamation: '! ',
|
|
137
|
+
semicolon: '; ',
|
|
138
|
+
period: '. ',
|
|
139
|
+
colon: ': ',
|
|
140
|
+
user_login: 'Вход пользователя',
|
|
141
|
+
user_login_tip: 'Используйте те же учетные данные, что и для сайта "Портал клиентов".',
|
|
142
|
+
customer_portal_global: 'Портал клиентов Глобальный',
|
|
143
|
+
customer_portal_china: 'Портал клиентов Китай',
|
|
144
|
+
user_login_region_china_tip: 'Если вы клиент в материковом Китае, выберите Портал клиентов Китай;',
|
|
145
|
+
user_login_region_global_tip: 'если вы клиент за пределами материкового Китая, выберите Портал клиентов Глобальный.',
|
|
146
|
+
account_id: 'Идентификатор аккаунта',
|
|
147
|
+
username: 'Имя пользователя',
|
|
148
|
+
password: 'Пароль',
|
|
149
|
+
captcha: 'Код подтверждения',
|
|
150
|
+
login: 'Войти',
|
|
151
|
+
current_field: 'Текущее поле ',
|
|
152
|
+
field_required: ' является обязательным',
|
|
153
|
+
ERR_INTERNET_DISCONNECTED: 'Пожалуйста, проверьте подключение к сети и повторите попытку',
|
|
154
|
+
AccountDisabledError: 'Аккаунт отключен, пожалуйста, свяжитесь с администратором или менеджером по обслуживанию',
|
|
155
|
+
CaptchaError: 'Неверный код подтверждения. Пожалуйста, введите снова',
|
|
156
|
+
LoginError: 'Неверное имя пользователя или пароль, пожалуйста, введите снова',
|
|
157
|
+
NetworkError: 'Сетевая ошибка, пожалуйста, попробуйте позже',
|
|
158
|
+
TenantError: 'Ошибка аккаунта, пожалуйста, введите снова или свяжитесь с вашим менеджером по обслуживанию',
|
|
159
|
+
TenantNotFoundError: 'Ошибка входа, арендатор не найден',
|
|
160
|
+
logout: 'Выйти',
|
|
161
|
+
hi_there: 'Привет!',
|
|
162
|
+
ai_assistant_tip: 'Я ваш AI помощник, готов помочь с любыми вопросами по этой документации!',
|
|
163
|
+
ai_assistant_placeholder: 'Введите вопросы здесь; нажмите Shift-Enter для новой строки.',
|
|
164
|
+
max_chars_exceeded_tip: 'Максимум 2000 символов.',
|
|
165
|
+
thinking: 'Думаю',
|
|
166
|
+
thinking_process: 'Процесс мышления',
|
|
167
|
+
referenced_doc_links: 'Ссылки на упомянутые документы',
|
|
168
|
+
view_more_related_docs: 'Посмотреть больше связанных документов',
|
|
169
|
+
view_less_related_docs: 'Посмотреть меньше связанных документов',
|
|
170
|
+
new_chat: 'Новый чат',
|
|
60
171
|
};
|
|
61
172
|
export const TRANSLATIONS = { en, zh, ru };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alauda/doom",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.12.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Doctor Doom making docs.",
|
|
6
6
|
"repository": {
|
|
@@ -15,10 +15,12 @@
|
|
|
15
15
|
},
|
|
16
16
|
"bin": "lib/cli/index.js",
|
|
17
17
|
"exports": {
|
|
18
|
+
"./assets/*": "./assets/*",
|
|
18
19
|
"./config": "./lib/config.js",
|
|
19
20
|
"./cspell": "./lib/cspell.js",
|
|
20
21
|
"./eslint": "./lib/eslint.js",
|
|
21
22
|
"./runtime": "./lib/runtime/index.js",
|
|
23
|
+
"./styles/*": "./styles/*",
|
|
22
24
|
"./theme": "./lib/theme.js",
|
|
23
25
|
"./types": "./lib/types.js",
|
|
24
26
|
"./package.json": "./package.json"
|
|
@@ -45,7 +47,7 @@
|
|
|
45
47
|
"@openapi-contrib/openapi-schema-to-json-schema": "^5.1.0",
|
|
46
48
|
"@playwright/browser-chromium": "^1.55.0",
|
|
47
49
|
"@rsbuild/plugin-react": "^1.3.5",
|
|
48
|
-
"@rsbuild/plugin-sass": "^1.
|
|
50
|
+
"@rsbuild/plugin-sass": "^1.4.0",
|
|
49
51
|
"@rsbuild/plugin-svgr": "^1.2.2",
|
|
50
52
|
"@rsbuild/plugin-yaml": "^1.0.3",
|
|
51
53
|
"@rspress/core": "2.0.0-beta.28",
|
|
@@ -53,8 +55,9 @@
|
|
|
53
55
|
"@rspress/plugin-llms": "2.0.0-beta.28",
|
|
54
56
|
"@rspress/plugin-sitemap": "2.0.0-beta.28",
|
|
55
57
|
"@rspress/shared": "2.0.0-beta.28",
|
|
56
|
-
"@shikijs/transformers": "^3.
|
|
58
|
+
"@shikijs/transformers": "^3.12.0",
|
|
57
59
|
"@total-typescript/ts-reset": "^0.6.1",
|
|
60
|
+
"ab64": "^0.1.6",
|
|
58
61
|
"chokidar": "^4.0.3",
|
|
59
62
|
"clsx": "^2.1.1",
|
|
60
63
|
"commander": "^13.1.0 || ^14.0.0",
|
|
@@ -64,6 +67,7 @@
|
|
|
64
67
|
"eslint-plugin-mdx": "^3.6.2",
|
|
65
68
|
"globals": "^16.3.0",
|
|
66
69
|
"html-tag-names": "^2.1.0",
|
|
70
|
+
"jsencrypt": "^3.5.4",
|
|
67
71
|
"md-attr-parser": "^1.3.0",
|
|
68
72
|
"mdast-util-mdx": "^3.0.0",
|
|
69
73
|
"mdast-util-mdx-jsx": "^3.2.0",
|
|
@@ -71,12 +75,13 @@
|
|
|
71
75
|
"mdast-util-to-markdown": "^2.1.2",
|
|
72
76
|
"mdast-util-to-string": "^4.0.0",
|
|
73
77
|
"mermaid": "^11.10.1",
|
|
74
|
-
"openai": "^5.
|
|
78
|
+
"openai": "^5.16.0",
|
|
75
79
|
"openapi-types": "^12.1.3",
|
|
76
80
|
"p-ratelimit": "^1.0.1",
|
|
77
81
|
"picomatch": "^4.0.3",
|
|
78
82
|
"pluralize": "^8.0.0",
|
|
79
83
|
"react-markdown": "^10.1.0",
|
|
84
|
+
"react-tooltip": "^5.29.1",
|
|
80
85
|
"rehype-raw": "^7.0.0",
|
|
81
86
|
"rehype-sanitize": "^6.0.0",
|
|
82
87
|
"remark-directive": "^4.0.0",
|
|
@@ -91,7 +96,7 @@
|
|
|
91
96
|
"remark-mdx": "^3.1.0",
|
|
92
97
|
"remark-message-control": "^8.0.0",
|
|
93
98
|
"remark-stringify": "^11.0.0",
|
|
94
|
-
"shiki": "^3.
|
|
99
|
+
"shiki": "^3.12.0",
|
|
95
100
|
"simple-git": "^3.28.0",
|
|
96
101
|
"string-width": "^7.2.0",
|
|
97
102
|
"swagger2openapi": "^7.0.8",
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
.container {
|
|
2
|
+
display: none;
|
|
3
|
+
flex-direction: column;
|
|
4
|
+
position: fixed;
|
|
5
|
+
right: 1rem;
|
|
6
|
+
bottom: 1rem;
|
|
7
|
+
z-index: 10;
|
|
8
|
+
background-color: var(--rp-c-bg);
|
|
9
|
+
width: calc(min(100vw, 440px));
|
|
10
|
+
height: calc(min(100vh, 700px));
|
|
11
|
+
padding: 16px;
|
|
12
|
+
box-shadow: 0px 0px 8px 0px var(--rp-c-divider);
|
|
13
|
+
border-radius: 8px;
|
|
14
|
+
|
|
15
|
+
&.open {
|
|
16
|
+
display: flex;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.header {
|
|
21
|
+
display: flex;
|
|
22
|
+
align-items: center;
|
|
23
|
+
justify-content: space-between;
|
|
24
|
+
font-weight: 600;
|
|
25
|
+
padding-bottom: 16px;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.title {
|
|
29
|
+
display: inline-flex;
|
|
30
|
+
align-items: center;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.username {
|
|
34
|
+
margin-left: 8px;
|
|
35
|
+
font-size: 12px;
|
|
36
|
+
font-weight: normal;
|
|
37
|
+
color: var(--rp-c-text-2);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.logout {
|
|
41
|
+
cursor: pointer;
|
|
42
|
+
margin-left: 8px;
|
|
43
|
+
color: var(--rp-c-text-2);
|
|
44
|
+
outline: none;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.icons {
|
|
48
|
+
display: inline-flex;
|
|
49
|
+
align-items: center;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.new-chat {
|
|
53
|
+
margin-right: 18px;
|
|
54
|
+
cursor: pointer;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.close {
|
|
58
|
+
cursor: pointer;
|
|
59
|
+
color: var(--rp-c-text-2);
|
|
60
|
+
outline: none;
|
|
61
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
.container {
|
|
2
|
+
padding: 12px;
|
|
3
|
+
background-color: #f2f8fe;
|
|
4
|
+
border-radius: 8px;
|
|
5
|
+
font-size: 12px;
|
|
6
|
+
line-height: calc(16 / 12);
|
|
7
|
+
|
|
8
|
+
+ * {
|
|
9
|
+
margin-top: 1rem;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.header {
|
|
14
|
+
display: flex;
|
|
15
|
+
align-items: center;
|
|
16
|
+
justify-content: space-between;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.title {
|
|
20
|
+
flex: 1;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.action {
|
|
24
|
+
display: inline-flex;
|
|
25
|
+
align-items: center;
|
|
26
|
+
cursor: pointer;
|
|
27
|
+
color: var(--rp-c-link);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.icon {
|
|
31
|
+
margin-left: 4px;
|
|
32
|
+
transition: transform 0.2s ease-in-out;
|
|
33
|
+
|
|
34
|
+
&.expanded {
|
|
35
|
+
transform: rotate(180deg);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.docs {
|
|
40
|
+
&,
|
|
41
|
+
.doc + .doc {
|
|
42
|
+
margin-top: 8px;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.doc {
|
|
47
|
+
overflow: hidden;
|
|
48
|
+
white-space: nowrap;
|
|
49
|
+
text-overflow: ellipsis;
|
|
50
|
+
}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
.container {
|
|
2
|
+
flex: 1;
|
|
3
|
+
overflow-y: auto;
|
|
4
|
+
margin: 0 -12px 16px;
|
|
5
|
+
padding: 0 12px;
|
|
6
|
+
scroll-behavior: smooth;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.chat {
|
|
10
|
+
& + & {
|
|
11
|
+
margin-top: 24px;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.content {
|
|
16
|
+
border-radius: 8px;
|
|
17
|
+
font-size: 14px;
|
|
18
|
+
width: calc(100% - 36px);
|
|
19
|
+
|
|
20
|
+
h2 {
|
|
21
|
+
margin-bottom: 0;
|
|
22
|
+
padding-top: 0;
|
|
23
|
+
border: 0;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
&,
|
|
27
|
+
p {
|
|
28
|
+
line-height: calc(20 / 14);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
> :global:not(.chat-ref-docs) {
|
|
32
|
+
+ {
|
|
33
|
+
h3,
|
|
34
|
+
h4,
|
|
35
|
+
h5,
|
|
36
|
+
h6 {
|
|
37
|
+
margin-top: 0;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
&:first-child {
|
|
42
|
+
margin-top: 0;
|
|
43
|
+
padding-top: 0;
|
|
44
|
+
border-top: 0;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
&:last-child {
|
|
48
|
+
margin-bottom: 0;
|
|
49
|
+
padding-bottom: 0;
|
|
50
|
+
border-bottom: 0;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.assistant {
|
|
56
|
+
display: flex;
|
|
57
|
+
|
|
58
|
+
.content {
|
|
59
|
+
margin-left: 12px;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.icon {
|
|
64
|
+
margin-top: 12px;
|
|
65
|
+
flex-shrink: 0;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.user .content {
|
|
69
|
+
margin-left: 36px;
|
|
70
|
+
padding: 12px;
|
|
71
|
+
background-color: var(--rp-c-bg-mute);
|
|
72
|
+
}
|
package/styles/global.scss
CHANGED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
:global html:root {
|
|
2
|
+
--rt-color-dark: #191d24;
|
|
3
|
+
--rt-color-white: rgba(255, 255, 245, 0.93);
|
|
4
|
+
|
|
5
|
+
--rt-opacity: 1;
|
|
6
|
+
|
|
7
|
+
&.dark {
|
|
8
|
+
--rt-color-dark: #fff;
|
|
9
|
+
--rt-color-white: #213547;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.entry {
|
|
14
|
+
position: fixed;
|
|
15
|
+
bottom: 15%;
|
|
16
|
+
right: 0;
|
|
17
|
+
display: inline-flex;
|
|
18
|
+
align-items: center;
|
|
19
|
+
background-color: var(--rp-c-bg);
|
|
20
|
+
height: 40px;
|
|
21
|
+
border-top-left-radius: 100px;
|
|
22
|
+
border-bottom-left-radius: 100px;
|
|
23
|
+
box-shadow: 0px 0px 12px 0px var(--rp-c-divider);
|
|
24
|
+
padding-left: 10px;
|
|
25
|
+
padding-right: 8px;
|
|
26
|
+
}
|
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
.api-error-alert {
|
|
2
|
+
display: flex;
|
|
3
|
+
align-items: center;
|
|
4
|
+
margin: 16px 0;
|
|
5
|
+
padding: 6px 12px;
|
|
6
|
+
border: 1px solid var(--rp-container-danger-border);
|
|
7
|
+
color: var(--rp-container-danger-text);
|
|
8
|
+
background-color: var(--rp-container-danger-bg);
|
|
9
|
+
|
|
10
|
+
&__icon {
|
|
11
|
+
margin-right: 12px;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.button {
|
|
16
|
+
display: inline-flex;
|
|
17
|
+
align-items: center;
|
|
18
|
+
justify-content: center;
|
|
19
|
+
height: 40px;
|
|
20
|
+
|
|
21
|
+
&--block {
|
|
22
|
+
width: 100%;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
&--primary {
|
|
26
|
+
background-color: var(--rp-c-brand-dark);
|
|
27
|
+
border-radius: 4px;
|
|
28
|
+
color: #fff;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.captcha-input {
|
|
33
|
+
width: 100%;
|
|
34
|
+
|
|
35
|
+
&__captcha {
|
|
36
|
+
height: 32px;
|
|
37
|
+
cursor: pointer;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.focus-input {
|
|
42
|
+
position: relative;
|
|
43
|
+
width: 100%;
|
|
44
|
+
|
|
45
|
+
&__placeholder {
|
|
46
|
+
position: absolute;
|
|
47
|
+
top: 50%;
|
|
48
|
+
left: 8px;
|
|
49
|
+
padding: 0 2px;
|
|
50
|
+
transform: translate3d(0, -50%, 0);
|
|
51
|
+
color: var(--rp-c-text-3);
|
|
52
|
+
line-height: 1;
|
|
53
|
+
transition: top 0.5s ease-in-out;
|
|
54
|
+
pointer-events: none;
|
|
55
|
+
z-index: 1;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
&--active &__placeholder {
|
|
59
|
+
top: 0;
|
|
60
|
+
background-color: var(--rp-c-bg-soft);
|
|
61
|
+
|
|
62
|
+
pointer-events: unset;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
&--focus &__placeholder {
|
|
66
|
+
color: var(--rp-c-brand-dark);
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.form-item--error .focus-input__placeholder {
|
|
71
|
+
color: var(--rp-container-danger-text);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.form-item {
|
|
75
|
+
display: flex;
|
|
76
|
+
width: 100%;
|
|
77
|
+
align-items: center;
|
|
78
|
+
|
|
79
|
+
&,
|
|
80
|
+
&__error {
|
|
81
|
+
& + .form-item {
|
|
82
|
+
margin-top: 24px;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
&__error {
|
|
87
|
+
color: var(--rp-container-danger-text);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
&__prefix {
|
|
91
|
+
margin-right: 8px;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
&__suffix {
|
|
95
|
+
margin-left: 8px;
|
|
96
|
+
max-height: 100%;
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
.input {
|
|
101
|
+
flex: 1;
|
|
102
|
+
background-color: var(--rp-c-bg-soft);
|
|
103
|
+
border: 1px solid var(--rp-c-divider);
|
|
104
|
+
border-radius: 4px;
|
|
105
|
+
height: 32px;
|
|
106
|
+
outline: none;
|
|
107
|
+
padding: 6px 8px;
|
|
108
|
+
|
|
109
|
+
&__container {
|
|
110
|
+
display: flex;
|
|
111
|
+
width: 100%;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
&__prefix {
|
|
115
|
+
margin-right: 8px;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
&__suffix {
|
|
119
|
+
margin-left: 8px;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
&:focus {
|
|
123
|
+
border-color: var(--rp-c-brand-dark);
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
.region-tip {
|
|
128
|
+
cursor: pointer;
|
|
129
|
+
color: var(--rp-c-text-3);
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
.form-item--error .input {
|
|
133
|
+
border-color: var(--rp-container-danger-text);
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
.radio-group {
|
|
137
|
+
display: flex;
|
|
138
|
+
align-items: center;
|
|
139
|
+
font-size: 12px;
|
|
140
|
+
|
|
141
|
+
&__prefix,
|
|
142
|
+
&__suffix {
|
|
143
|
+
display: inline-flex;
|
|
144
|
+
align-items: center;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
&__prefix {
|
|
148
|
+
margin-right: 8px;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
&__suffix {
|
|
152
|
+
margin-left: 8px;
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
.radio {
|
|
157
|
+
display: inline-flex;
|
|
158
|
+
align-items: center;
|
|
159
|
+
accent-color: var(--rp-c-brand-dark);
|
|
160
|
+
|
|
161
|
+
+ .radio {
|
|
162
|
+
margin-left: 12px;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
&__label {
|
|
166
|
+
margin-left: 8px;
|
|
167
|
+
}
|
|
168
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
.preamble {
|
|
2
|
+
display: flex;
|
|
3
|
+
flex: 1;
|
|
4
|
+
margin-top: 60px;
|
|
5
|
+
flex-direction: column;
|
|
6
|
+
align-items: center;
|
|
7
|
+
|
|
8
|
+
&.logged-in {
|
|
9
|
+
margin-top: 120px;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.title {
|
|
14
|
+
font-size: 20px;
|
|
15
|
+
font-weight: 600;
|
|
16
|
+
margin-top: 16px;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.content {
|
|
20
|
+
text-align: center;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.content,
|
|
24
|
+
.form {
|
|
25
|
+
max-width: calc(100% - 80px);
|
|
26
|
+
width: 100%;
|
|
27
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
.input {
|
|
2
|
+
display: flex;
|
|
3
|
+
flex-direction: column;
|
|
4
|
+
padding: 12px;
|
|
5
|
+
border: 2px solid var(--rp-c-divider-light);
|
|
6
|
+
border-radius: 8px;
|
|
7
|
+
|
|
8
|
+
&.error {
|
|
9
|
+
border-color: #eb0027;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
textarea {
|
|
13
|
+
border: none;
|
|
14
|
+
resize: none;
|
|
15
|
+
outline: none;
|
|
16
|
+
background: none;
|
|
17
|
+
font-size: 14px;
|
|
18
|
+
line-height: calc(20 / 14);
|
|
19
|
+
padding: 0 12px;
|
|
20
|
+
margin: 0 -12px;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
&:has(textarea:focus) {
|
|
24
|
+
&:not(.error) {
|
|
25
|
+
border-color: var(--rp-c-brand-dark);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.send:not(.disabled) {
|
|
29
|
+
color: var(--rp-c-brand);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.actions {
|
|
35
|
+
display: flex;
|
|
36
|
+
flex-direction: row-reverse;
|
|
37
|
+
align-items: center;
|
|
38
|
+
justify-content: space-between;
|
|
39
|
+
line-height: 0;
|
|
40
|
+
margin-top: 8px;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.error-tip {
|
|
44
|
+
color: #eb0027;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.send {
|
|
48
|
+
color: var(--rp-c-divider);
|
|
49
|
+
|
|
50
|
+
&.disabled {
|
|
51
|
+
cursor: not-allowed;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
&:not(.disabled) {
|
|
55
|
+
cursor: pointer;
|
|
56
|
+
&:hover {
|
|
57
|
+
color: var(--rp-c-brand);
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
}
|