@antv/dumi-theme-antv 0.8.0-beta.1 → 0.8.0-beta.11
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/dist/builtins/Playground/index.module.less +0 -1
- package/dist/components/AI/HomeDialog/AntVBanner/index.module.less +2 -2
- package/dist/components/AI/HomeDialog/ModeSelector/index.js +4 -1
- package/dist/components/AI/HomeDialog/ModeSelector/index.module.less +39 -22
- package/dist/components/AI/HomeDialog/PromptTextarea/ChooseLib/index.js +4 -2
- package/dist/components/AI/HomeDialog/PromptTextarea/ChooseLib/index.module.less +0 -1
- package/dist/components/AI/HomeDialog/PromptTextarea/DatasourceCard/index.module.less +3 -3
- package/dist/components/AI/HomeDialog/PromptTextarea/Uploader/DataUploader.js +225 -0
- package/dist/components/AI/HomeDialog/PromptTextarea/index.js +74 -43
- package/dist/components/AI/HomeDialog/PromptTextarea/index.module.less +9 -8
- package/dist/components/AI/HomeDialog/RecommendCase/Card.js +13 -8
- package/dist/components/AI/HomeDialog/RecommendCase/card.module.less +1 -1
- package/dist/components/AI/HomeDialog/RecommendCase/index.js +46 -14
- package/dist/components/AI/HomeDialog/RecommendCase/index.module.less +3 -2
- package/dist/components/AI/HomeDialog/index.js +19 -17
- package/dist/components/AI/constant.js +2 -2
- package/dist/components/Login/Captcha/index.js +185 -0
- package/dist/components/Login/Captcha/index.less +91 -0
- package/dist/components/Login/CheckCode/index.js +244 -0
- package/dist/components/Login/CheckCode/index.less +137 -0
- package/dist/components/Login/CountDownButton/index.js +109 -0
- package/dist/components/Login/CountDownButton/index.less +8 -0
- package/dist/components/Login/LoginForm.js +239 -0
- package/dist/components/Login/LoginForm.less +409 -0
- package/dist/components/Login/index.js +24 -0
- package/dist/components/Login/openAuthWindow.js +54 -0
- package/dist/components/Login/types.js +5 -0
- package/dist/components/Login/utils.js +47 -0
- package/dist/layouts/DocLayout.js +2 -1
- package/dist/layouts/GlobalLayout/index.js +10 -4
- package/dist/locales/en.json +125 -1
- package/dist/locales/zh.json +125 -1
- package/dist/model/AIChat.js +72 -8
- package/dist/model/auth.js +133 -0
- package/dist/pages/AIPlayground/components/ConversationsMenu/index.js +36 -12
- package/dist/pages/AIPlayground/components/ConversationsMenu/index.module.less +2 -0
- package/dist/pages/AIPlayground/components/MarkdownComponent/MarkdownCodeBlock.js +25 -11
- package/dist/pages/AIPlayground/components/MarkdownComponent/MarkdownCodeBlock.module.less +1 -2
- package/dist/pages/AIPlayground/components/MarkdownComponent/index.js +5 -2
- package/dist/pages/AIPlayground/components/MsgBox/index.js +202 -146
- package/dist/pages/AIPlayground/components/MsgBox/index.module.less +3 -2
- package/dist/pages/AIPlayground/components/MsgBox/useAutoScroll.js +46 -0
- package/dist/pages/AIPlayground/components/SessionLayout/index.js +2 -2
- package/dist/pages/AIPlayground/components/SessionLayout/index.module.less +4 -2
- package/dist/pages/AIPlayground/components/TaskBox/generateCode.js +7 -1
- package/dist/pages/AIPlayground/components/TaskBox/index.js +78 -55
- package/dist/pages/AIPlayground/components/TaskBox/index.module.less +1 -0
- package/dist/pages/Examples/components/Accouncement/index.module.less +1 -1
- package/dist/pages/Examples/index.module.less +11 -11
- package/dist/pages/Index/components/Cases/index.module.less +8 -8
- package/dist/pages/Index/components/Companies/index.module.less +4 -3
- package/dist/pages/Index/components/Features/FeatureCard.module.less +4 -5
- package/dist/pages/Index/components/Features/index.module.less +5 -5
- package/dist/pages/Index/components/_.less +9 -9
- package/dist/plugin/index.js +2 -2
- package/dist/slots/Banner/Notification.module.less +8 -8
- package/dist/slots/Banner/index.module.less +10 -9
- package/dist/slots/CodeEditor/Toolbar.js +15 -9
- package/dist/slots/CodeEditor/index.js +35 -12
- package/dist/slots/CodeEditor/index.module.less +3 -1
- package/dist/slots/CodePreview/index.module.less +0 -3
- package/dist/slots/CodeRunner/index.js +5 -2
- package/dist/slots/ContentTable/index.module.less +2 -1
- package/dist/slots/Detail/News.module.less +9 -9
- package/dist/slots/Detail/index.module.less +11 -14
- package/dist/slots/ExampleSider/index.module.less +3 -4
- package/dist/slots/Footer/index.module.less +2 -2
- package/dist/slots/Header/Products/Product.module.less +2 -2
- package/dist/slots/Header/Search/SearchResult.js +23 -8
- package/dist/slots/Header/Search/SearchResult.module.less +1 -0
- package/dist/slots/Header/index.js +72 -12
- package/dist/slots/Header/index.module.less +13 -5
- package/dist/slots/LiveExample/index.module.less +1 -1
- package/dist/slots/Loading/index.module.less +30 -28
- package/dist/slots/ManualContent/index.module.less +14 -17
- package/dist/slots/_.less +9 -9
- package/dist/static/user.svg +3 -0
- package/dist/utils/env.js +37 -0
- package/dist/utils/index.js +7 -0
- package/dist/utils/request.js +42 -0
- package/package.json +7 -3
|
@@ -1,61 +1,84 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
1
|
+
import { useSiteData } from 'dumi';
|
|
2
|
+
import React, { useMemo } from 'react';
|
|
3
|
+
import { useSnapshot } from 'valtio';
|
|
4
4
|
import { AIChatStore } from "../../../../model/AIChat";
|
|
5
|
-
import
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
5
|
+
import CodeRunner from "dumi/theme/slots/CodeRunner";
|
|
6
|
+
import { wrap2VisionSnap } from "./generateCode";
|
|
7
|
+
import { requestProxy, useVisionsnapSdk } from "../../../../hooks/useVisionsnapSdk";
|
|
8
|
+
import { ErrorBoundary } from 'react-error-boundary';
|
|
9
|
+
import Loading from "dumi/theme/slots/Loading";
|
|
10
|
+
import { ErrorFallback } from "../../../../builtins/Playground";
|
|
10
11
|
function TaskBox() {
|
|
12
|
+
var _themeConfig$ai, _themeConfig$ai2;
|
|
11
13
|
var snap = useSnapshot(AIChatStore);
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
editorHeight: 'calc(100vh - 150px)',
|
|
41
|
-
rtl: true,
|
|
42
|
-
classes: {
|
|
43
|
-
'sp-layout': styles['antv-sp-layout']
|
|
44
|
-
}
|
|
45
|
-
},
|
|
46
|
-
theme: "light" // 主题:dark, light, auto
|
|
47
|
-
,
|
|
48
|
-
customSetup: {
|
|
49
|
-
entry: "/index.tsx",
|
|
50
|
-
npmRegistries: [{
|
|
51
|
-
limitToScopes: false,
|
|
52
|
-
// 设为 false 使所有包都从自定义 registry 获取
|
|
53
|
-
registryUrl: 'https://registry.npmmirror.com',
|
|
54
|
-
// 使用淘宝镜像
|
|
55
|
-
enabledScopes: [],
|
|
56
|
-
proxyEnabled: false
|
|
14
|
+
var _useSiteData = useSiteData(),
|
|
15
|
+
themeConfig = _useSiteData.themeConfig;
|
|
16
|
+
var demoId = useMemo(function () {
|
|
17
|
+
return crypto.randomUUID();
|
|
18
|
+
}, [snap.codeBlock]);
|
|
19
|
+
var exampleTopics = useMemo(function () {
|
|
20
|
+
return [{
|
|
21
|
+
icon: '',
|
|
22
|
+
title: {},
|
|
23
|
+
id: snap.anonymousUserId,
|
|
24
|
+
examples: [
|
|
25
|
+
// 这是一个 Example 对象
|
|
26
|
+
{
|
|
27
|
+
icon: '',
|
|
28
|
+
title: {},
|
|
29
|
+
id: snap.activeSessionId,
|
|
30
|
+
api: 'https://example.com/api/pie-chart',
|
|
31
|
+
// 必须的 api 属性
|
|
32
|
+
demos: [
|
|
33
|
+
// 这是一个 Demo 对象
|
|
34
|
+
{
|
|
35
|
+
id: demoId,
|
|
36
|
+
screenshot: '',
|
|
37
|
+
title: {},
|
|
38
|
+
filename: 'index.tsx',
|
|
39
|
+
// 必须的 filename 属性
|
|
40
|
+
source: snap.codeBlock
|
|
41
|
+
}]
|
|
57
42
|
}]
|
|
58
|
-
}
|
|
59
|
-
});
|
|
43
|
+
}];
|
|
44
|
+
}, [demoId, snap.activeSessionId, snap.anonymousUserId, snap.codeBlock]);
|
|
45
|
+
var _useVisionsnapSdk = useVisionsnapSdk('3.2.15'),
|
|
46
|
+
sdk = _useVisionsnapSdk.sdk,
|
|
47
|
+
loading = _useVisionsnapSdk.loading;
|
|
48
|
+
if (loading) {
|
|
49
|
+
return /*#__PURE__*/React.createElement(Loading, null);
|
|
50
|
+
}
|
|
51
|
+
if (themeConfig.isAntVSite || ((_themeConfig$ai = themeConfig.ai) === null || _themeConfig$ai === void 0 ? void 0 : _themeConfig$ai.codeRunner) === "VisionSnap" || !((_themeConfig$ai2 = themeConfig.ai) !== null && _themeConfig$ai2 !== void 0 && _themeConfig$ai2.codeRunner)) {
|
|
52
|
+
return /*#__PURE__*/React.createElement(ErrorBoundary, {
|
|
53
|
+
FallbackComponent: ErrorFallback
|
|
54
|
+
}, /*#__PURE__*/React.createElement(sdk.VisionPreview, {
|
|
55
|
+
id: "visionIframe",
|
|
56
|
+
bizCode: "vision-preview-demo",
|
|
57
|
+
style: {
|
|
58
|
+
height: '100vh'
|
|
59
|
+
},
|
|
60
|
+
userId: "263347",
|
|
61
|
+
displayMode: "code-and-preview",
|
|
62
|
+
initialView: "preview",
|
|
63
|
+
theme: "light",
|
|
64
|
+
code: wrap2VisionSnap(snap.codeBlock),
|
|
65
|
+
requestProxy: requestProxy,
|
|
66
|
+
isStreaming: false,
|
|
67
|
+
proxyOptions: {
|
|
68
|
+
isWAN: true
|
|
69
|
+
},
|
|
70
|
+
src: "https://www.weavefox.cn/_visionsnap_render/index.html?version=3.2.15&enableInspector=1"
|
|
71
|
+
}));
|
|
72
|
+
} else {
|
|
73
|
+
return /*#__PURE__*/React.createElement(CodeRunner, {
|
|
74
|
+
isPlayground: true,
|
|
75
|
+
showAI: false,
|
|
76
|
+
size: 0.5,
|
|
77
|
+
topic: snap.anonymousUserId,
|
|
78
|
+
example: snap.activeSessionId,
|
|
79
|
+
demo: demoId,
|
|
80
|
+
exampleTopics: exampleTopics
|
|
81
|
+
});
|
|
82
|
+
}
|
|
60
83
|
}
|
|
61
84
|
export default TaskBox;
|
|
@@ -77,7 +77,7 @@
|
|
|
77
77
|
}
|
|
78
78
|
|
|
79
79
|
pre[class*='language-'] {
|
|
80
|
-
background-color: rgba(0, 0, 0,
|
|
80
|
+
background-color: rgba(0, 0, 0, 3%);
|
|
81
81
|
}
|
|
82
82
|
|
|
83
83
|
code[class*='language-'] {
|
|
@@ -155,7 +155,7 @@
|
|
|
155
155
|
table th {
|
|
156
156
|
color: #5c6b77;
|
|
157
157
|
font-weight: 500;
|
|
158
|
-
background: rgba(0, 0, 0,
|
|
158
|
+
background: rgba(0, 0, 0, 2%);
|
|
159
159
|
}
|
|
160
160
|
|
|
161
161
|
table th,
|
|
@@ -174,7 +174,7 @@
|
|
|
174
174
|
width: 20%;
|
|
175
175
|
font-weight: 500;
|
|
176
176
|
background: #fcfcfc;
|
|
177
|
-
color: rgba(0, 0, 0,
|
|
177
|
+
color: rgba(0, 0, 0, 85%);
|
|
178
178
|
}
|
|
179
179
|
|
|
180
180
|
blockquote {
|
|
@@ -197,15 +197,16 @@
|
|
|
197
197
|
|
|
198
198
|
.layout {
|
|
199
199
|
margin: 24px 0 32px;
|
|
200
|
+
|
|
200
201
|
:global {
|
|
201
202
|
.ant-layout-content {
|
|
202
|
-
background-color: #
|
|
203
|
+
background-color: #fff;
|
|
203
204
|
}
|
|
204
205
|
}
|
|
205
206
|
}
|
|
206
207
|
|
|
207
208
|
.main {
|
|
208
|
-
background-color: #
|
|
209
|
+
background-color: #fff;
|
|
209
210
|
width: calc(100% - @toc-width);
|
|
210
211
|
padding-left: 48px;
|
|
211
212
|
padding-right: 24px;
|
|
@@ -248,7 +249,6 @@
|
|
|
248
249
|
background: #fff;
|
|
249
250
|
max-height: 100vh;
|
|
250
251
|
overflow: hidden;
|
|
251
|
-
|
|
252
252
|
position: sticky;
|
|
253
253
|
top: 0;
|
|
254
254
|
padding: 8px 0;
|
|
@@ -288,6 +288,7 @@
|
|
|
288
288
|
|
|
289
289
|
.affix {
|
|
290
290
|
background-color: #fff;
|
|
291
|
+
|
|
291
292
|
& > div {
|
|
292
293
|
height: 100%;
|
|
293
294
|
}
|
|
@@ -325,7 +326,7 @@
|
|
|
325
326
|
justify-content: center;
|
|
326
327
|
align-items: center;
|
|
327
328
|
background: #fff;
|
|
328
|
-
box-shadow: 2px 0 8px rgba(0, 0, 0,
|
|
329
|
+
box-shadow: 2px 0 8px rgba(0, 0, 0, 15%);
|
|
329
330
|
border-radius: 0 4px 4px 0;
|
|
330
331
|
}
|
|
331
332
|
}
|
|
@@ -401,7 +402,7 @@
|
|
|
401
402
|
&:hover > div {
|
|
402
403
|
transform: translateY(-4px);
|
|
403
404
|
border-color: transparent;
|
|
404
|
-
box-shadow: 0 6px 16px rgba(107, 147, 224,
|
|
405
|
+
box-shadow: 0 6px 16px rgba(107, 147, 224, 14%);
|
|
405
406
|
}
|
|
406
407
|
|
|
407
408
|
h4 {
|
|
@@ -455,7 +456,7 @@
|
|
|
455
456
|
:global {
|
|
456
457
|
.SplitPane {
|
|
457
458
|
overflow: auto;
|
|
458
|
-
left:
|
|
459
|
+
left: 0;
|
|
459
460
|
height: calc(100vh - 64px) !important;
|
|
460
461
|
}
|
|
461
462
|
|
|
@@ -603,10 +604,9 @@
|
|
|
603
604
|
}
|
|
604
605
|
|
|
605
606
|
.backTop {
|
|
606
|
-
transition: color 0.3s;
|
|
607
607
|
color: #868484;
|
|
608
608
|
background-color: #fff;
|
|
609
|
-
box-shadow: 0 3px 6px -4px rgba(0, 0, 0,
|
|
609
|
+
box-shadow: 0 3px 6px -4px rgba(0, 0, 0, 12%), 0 6px 16px 0 rgba(0, 0, 0, 8%), 0 9px 28px 8px rgba(0, 0, 0, 5%);
|
|
610
610
|
transition: color 0.3s;
|
|
611
611
|
width: 44px;
|
|
612
612
|
height: 44px;
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
position: relative;
|
|
7
7
|
padding: 0;
|
|
8
8
|
overflow: hidden;
|
|
9
|
-
background: rgba(250, 251, 252,
|
|
9
|
+
background: rgba(250, 251, 252, 100%);
|
|
10
10
|
|
|
11
11
|
.slider {
|
|
12
12
|
.container1440();
|
|
@@ -38,22 +38,22 @@
|
|
|
38
38
|
.appTitle {
|
|
39
39
|
font-size: 1.2857em;
|
|
40
40
|
font-weight: 500;
|
|
41
|
-
margin: 48px 0 0
|
|
41
|
+
margin: 48px 0 0;
|
|
42
42
|
position: relative;
|
|
43
43
|
height: min-content;
|
|
44
|
-
color: rgba(0, 0, 0,
|
|
44
|
+
color: rgba(0, 0, 0, 100%);
|
|
45
45
|
user-select: text;
|
|
46
46
|
}
|
|
47
47
|
|
|
48
48
|
.appDescription {
|
|
49
|
-
color: rgba(105, 123, 140,
|
|
49
|
+
color: rgba(105, 123, 140, 60%);
|
|
50
50
|
font-size: 1em;
|
|
51
|
-
margin: 16px 0 0
|
|
51
|
+
margin: 16px 0 0;
|
|
52
52
|
user-select: text;
|
|
53
53
|
}
|
|
54
54
|
|
|
55
55
|
.detailWrapper {
|
|
56
|
-
margin: 20px 0 0
|
|
56
|
+
margin: 20px 0 0;
|
|
57
57
|
|
|
58
58
|
.detail {
|
|
59
59
|
color: var(--primary-color);
|
|
@@ -81,7 +81,7 @@
|
|
|
81
81
|
|
|
82
82
|
&:hover {
|
|
83
83
|
border: 1px solid #ced4d9;
|
|
84
|
-
fill: #
|
|
84
|
+
fill: #000;
|
|
85
85
|
}
|
|
86
86
|
|
|
87
87
|
&:hover :only-child {
|
|
@@ -228,7 +228,7 @@
|
|
|
228
228
|
bottom: 100px;
|
|
229
229
|
}
|
|
230
230
|
|
|
231
|
-
.slick-dots li.slick-active button
|
|
231
|
+
.slick-dots li.slick-active button::before {
|
|
232
232
|
opacity: 1;
|
|
233
233
|
color: #1890ff;
|
|
234
234
|
}
|
|
@@ -14,17 +14,18 @@
|
|
|
14
14
|
margin-bottom: 5%;
|
|
15
15
|
position: relative;
|
|
16
16
|
.container1440();
|
|
17
|
+
|
|
17
18
|
padding-left: 4.5%;
|
|
18
19
|
}
|
|
19
20
|
|
|
20
21
|
.title {
|
|
21
22
|
font-size: 2.714em;
|
|
22
23
|
font-weight: 500;
|
|
23
|
-
margin: 118px 0 0
|
|
24
|
+
margin: 118px 0 0;
|
|
24
25
|
position: relative;
|
|
25
26
|
height: min-content;
|
|
26
27
|
text-align: center;
|
|
27
|
-
color: rgba(0, 0, 0,
|
|
28
|
+
color: rgba(0, 0, 0, 100%);
|
|
28
29
|
}
|
|
29
30
|
|
|
30
31
|
.companiesContainer {
|
|
@@ -73,7 +74,7 @@
|
|
|
73
74
|
.wrapper {
|
|
74
75
|
.title {
|
|
75
76
|
font-size: 1.9rem;
|
|
76
|
-
margin: 98px 0 0
|
|
77
|
+
margin: 98px 0 0;
|
|
77
78
|
}
|
|
78
79
|
|
|
79
80
|
.content {
|
|
@@ -17,7 +17,6 @@
|
|
|
17
17
|
|
|
18
18
|
.title {
|
|
19
19
|
font-size: 1.714em;
|
|
20
|
-
color: #000;
|
|
21
20
|
margin-top: 28px;
|
|
22
21
|
margin-bottom: 11px;
|
|
23
22
|
font-family: AlibabaPuHuiTiM;
|
|
@@ -29,7 +28,7 @@
|
|
|
29
28
|
.description {
|
|
30
29
|
opacity: 0.6;
|
|
31
30
|
width: 100%;
|
|
32
|
-
color: rgba(105, 123, 140,
|
|
31
|
+
color: rgba(105, 123, 140, 100%);
|
|
33
32
|
font-size: 1em;
|
|
34
33
|
line-height: 1.8em;
|
|
35
34
|
margin-top: 11px;
|
|
@@ -42,7 +41,7 @@
|
|
|
42
41
|
.cards {
|
|
43
42
|
.cardWrapper {
|
|
44
43
|
.card {
|
|
45
|
-
margin: 84px 19px 80px
|
|
44
|
+
margin: 84px 19px 80px;
|
|
46
45
|
|
|
47
46
|
.content {
|
|
48
47
|
.icon {
|
|
@@ -56,8 +55,8 @@
|
|
|
56
55
|
|
|
57
56
|
.description {
|
|
58
57
|
font-size: 1em;
|
|
59
|
-
padding-bottom:
|
|
60
|
-
padding-top:
|
|
58
|
+
padding-bottom: 0;
|
|
59
|
+
padding-top: 0;
|
|
61
60
|
margin-top: 12px;
|
|
62
61
|
}
|
|
63
62
|
}
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
|
|
22
22
|
.title {
|
|
23
23
|
font-weight: 500;
|
|
24
|
-
margin: 17px 0 0
|
|
24
|
+
margin: 17px 0 0;
|
|
25
25
|
position: relative;
|
|
26
26
|
font-family: AlibabaPuHuiTiB;
|
|
27
27
|
font-size: 40px;
|
|
@@ -52,9 +52,9 @@
|
|
|
52
52
|
display: flex;
|
|
53
53
|
justify-content: center;
|
|
54
54
|
width: 100%;
|
|
55
|
-
background-color: #
|
|
55
|
+
background-color: #fff;
|
|
56
56
|
border: 1px solid #e5e8ef;
|
|
57
|
-
box-shadow: 0 8px 20px 0 rgba(0, 0, 0,
|
|
57
|
+
box-shadow: 0 8px 20px 0 rgba(0, 0, 0, 3%);
|
|
58
58
|
border-radius: 16px;
|
|
59
59
|
overflow: hidden;
|
|
60
60
|
}
|
|
@@ -77,12 +77,12 @@
|
|
|
77
77
|
|
|
78
78
|
.cardWrapper {
|
|
79
79
|
flex: none;
|
|
80
|
-
margin: 0 0 28px
|
|
80
|
+
margin: 0 0 28px;
|
|
81
81
|
width: 100%;
|
|
82
82
|
max-width: 100%;
|
|
83
83
|
|
|
84
84
|
&:last-child {
|
|
85
|
-
margin: 0 0 30px
|
|
85
|
+
margin: 0 0 30px;
|
|
86
86
|
}
|
|
87
87
|
}
|
|
88
88
|
}
|
|
@@ -81,30 +81,30 @@ h6 {
|
|
|
81
81
|
width: 100%;
|
|
82
82
|
height: 11px;
|
|
83
83
|
margin: -5px 0;
|
|
84
|
-
border-top: 5px solid rgba(255, 255, 255, 0);
|
|
85
|
-
border-bottom: 5px solid rgba(255, 255, 255, 0);
|
|
84
|
+
border-top: 5px solid rgba(255, 255, 255, 0%);
|
|
85
|
+
border-bottom: 5px solid rgba(255, 255, 255, 0%);
|
|
86
86
|
cursor: row-resize;
|
|
87
87
|
|
|
88
88
|
&:hover {
|
|
89
|
-
border-top: 5px solid rgba(0, 0, 0,
|
|
90
|
-
border-bottom: 5px solid rgba(0, 0, 0,
|
|
89
|
+
border-top: 5px solid rgba(0, 0, 0, 50%);
|
|
90
|
+
border-bottom: 5px solid rgba(0, 0, 0, 50%);
|
|
91
91
|
}
|
|
92
92
|
}
|
|
93
93
|
|
|
94
94
|
&.vertical {
|
|
95
95
|
width: 11px;
|
|
96
96
|
margin: 0 -5px;
|
|
97
|
-
border-right: 5px solid rgba(255, 255, 255, 0);
|
|
98
|
-
border-left: 5px solid rgba(255, 255, 255, 0);
|
|
97
|
+
border-right: 5px solid rgba(255, 255, 255, 0%);
|
|
98
|
+
border-left: 5px solid rgba(255, 255, 255, 0%);
|
|
99
99
|
cursor: col-resize;
|
|
100
100
|
|
|
101
|
-
|
|
101
|
+
pane2 {
|
|
102
102
|
border-left: 1px solid #e6e6e6;
|
|
103
103
|
}
|
|
104
104
|
|
|
105
105
|
&:hover {
|
|
106
|
-
border-right: 5px solid rgba(0, 0, 0,
|
|
107
|
-
border-left: 5px solid rgba(0, 0, 0,
|
|
106
|
+
border-right: 5px solid rgba(0, 0, 0, 50%);
|
|
107
|
+
border-left: 5px solid rgba(0, 0, 0, 50%);
|
|
108
108
|
}
|
|
109
109
|
}
|
|
110
110
|
|
package/dist/plugin/index.js
CHANGED
|
@@ -168,8 +168,8 @@ export default function ThemeAntVContextWrapper() {
|
|
|
168
168
|
},
|
|
169
169
|
{
|
|
170
170
|
id: "dumi-theme-antv-ai-playground-lang",
|
|
171
|
-
absPath: "/:language/ai-playground
|
|
172
|
-
path: ":language/ai-playground
|
|
171
|
+
absPath: "/:language/ai-playground",
|
|
172
|
+
path: ":language/ai-playground",
|
|
173
173
|
file: `${PAGES_DIR}/AIPlayground`
|
|
174
174
|
}
|
|
175
175
|
];
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
|
|
18
18
|
.content {
|
|
19
19
|
padding-left: 20px;
|
|
20
|
-
color: rgba(49, 70, 89,
|
|
20
|
+
color: rgba(49, 70, 89, 100%);
|
|
21
21
|
text-align: left;
|
|
22
22
|
|
|
23
23
|
.description {
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
}
|
|
29
29
|
|
|
30
30
|
.date {
|
|
31
|
-
color: rgba(216, 203, 249,
|
|
31
|
+
color: rgba(216, 203, 249, 100%);
|
|
32
32
|
bottom: 0;
|
|
33
33
|
font-size: 1em;
|
|
34
34
|
margin-top: 4px;
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
}
|
|
39
39
|
|
|
40
40
|
&:hover .description {
|
|
41
|
-
color: rgba(89, 126, 247,
|
|
41
|
+
color: rgba(89, 126, 247, 100%);
|
|
42
42
|
}
|
|
43
43
|
}
|
|
44
44
|
|
|
@@ -67,12 +67,12 @@
|
|
|
67
67
|
@keyframes showAndHide0 {
|
|
68
68
|
0% {
|
|
69
69
|
opacity: 1;
|
|
70
|
-
top:
|
|
70
|
+
top: 0;
|
|
71
71
|
}
|
|
72
72
|
|
|
73
73
|
33.3% {
|
|
74
74
|
opacity: 1;
|
|
75
|
-
top:
|
|
75
|
+
top: 0;
|
|
76
76
|
}
|
|
77
77
|
|
|
78
78
|
50% {
|
|
@@ -87,7 +87,7 @@
|
|
|
87
87
|
|
|
88
88
|
100% {
|
|
89
89
|
opacity: 1;
|
|
90
|
-
top:
|
|
90
|
+
top: 0;
|
|
91
91
|
}
|
|
92
92
|
}
|
|
93
93
|
|
|
@@ -105,12 +105,12 @@
|
|
|
105
105
|
|
|
106
106
|
50% {
|
|
107
107
|
opacity: 1;
|
|
108
|
-
top:
|
|
108
|
+
top: 0;
|
|
109
109
|
}
|
|
110
110
|
|
|
111
111
|
83.3% {
|
|
112
112
|
opacity: 1;
|
|
113
|
-
top:
|
|
113
|
+
top: 0;
|
|
114
114
|
}
|
|
115
115
|
|
|
116
116
|
100% {
|
|
@@ -3,13 +3,14 @@
|
|
|
3
3
|
.wrapper {
|
|
4
4
|
min-height: 650px;
|
|
5
5
|
max-height: 803px;
|
|
6
|
-
background: linear-gradient(225deg, #
|
|
6
|
+
background: linear-gradient(225deg, #fff, #f0f5ff);
|
|
7
7
|
height: calc(94vh);
|
|
8
8
|
position: relative;
|
|
9
9
|
overflow: hidden;
|
|
10
10
|
|
|
11
11
|
.content {
|
|
12
12
|
.container1440();
|
|
13
|
+
|
|
13
14
|
height: 100%;
|
|
14
15
|
position: relative;
|
|
15
16
|
}
|
|
@@ -23,14 +24,14 @@
|
|
|
23
24
|
.title {
|
|
24
25
|
font-size: 3.4em; //2.875em;
|
|
25
26
|
font-weight: 800;
|
|
26
|
-
color: rgba(0, 0, 0,
|
|
27
|
+
color: rgba(0, 0, 0, 100%);
|
|
27
28
|
position: relative;
|
|
28
29
|
}
|
|
29
30
|
|
|
30
31
|
.description {
|
|
31
32
|
margin-top: 0.83%; //12px;
|
|
32
|
-
margin-bottom:
|
|
33
|
-
color: rgba(106, 123, 140,
|
|
33
|
+
margin-bottom: 0;
|
|
34
|
+
color: rgba(106, 123, 140, 100%);
|
|
34
35
|
font-size: 1.14em;
|
|
35
36
|
font-weight: 200;
|
|
36
37
|
position: relative;
|
|
@@ -162,6 +163,7 @@
|
|
|
162
163
|
.gh-count {
|
|
163
164
|
position: relative;
|
|
164
165
|
display: none;
|
|
166
|
+
|
|
165
167
|
/* hidden to start */
|
|
166
168
|
margin-left: 52px;
|
|
167
169
|
margin-top: 7px;
|
|
@@ -183,8 +185,8 @@
|
|
|
183
185
|
color: #4183c4;
|
|
184
186
|
}
|
|
185
187
|
|
|
186
|
-
.gh-count
|
|
187
|
-
.gh-count
|
|
188
|
+
.gh-count::before,
|
|
189
|
+
.gh-count::after {
|
|
188
190
|
content: '';
|
|
189
191
|
position: absolute;
|
|
190
192
|
display: inline-block;
|
|
@@ -194,7 +196,7 @@
|
|
|
194
196
|
border-style: solid;
|
|
195
197
|
}
|
|
196
198
|
|
|
197
|
-
.gh-count
|
|
199
|
+
.gh-count::before {
|
|
198
200
|
top: 50%;
|
|
199
201
|
left: -3px;
|
|
200
202
|
margin-top: -5px;
|
|
@@ -202,7 +204,7 @@
|
|
|
202
204
|
border-right-color: #fafafa;
|
|
203
205
|
}
|
|
204
206
|
|
|
205
|
-
.gh-count
|
|
207
|
+
.gh-count::after {
|
|
206
208
|
top: 50%;
|
|
207
209
|
border-width: 5px 5px 5px 0;
|
|
208
210
|
border-right-color: #d4d4d4;
|
|
@@ -228,7 +230,6 @@
|
|
|
228
230
|
display: flex;
|
|
229
231
|
position: absolute;
|
|
230
232
|
right: 0;
|
|
231
|
-
margin-top: -300px;
|
|
232
233
|
width: 52%;
|
|
233
234
|
max-width: 598px;
|
|
234
235
|
height: 324px;
|
|
@@ -44,7 +44,9 @@ export var Toolbar = function Toolbar(_ref) {
|
|
|
44
44
|
onToggleFullscreen = _ref$onToggleFullscre === void 0 ? null : _ref$onToggleFullscre,
|
|
45
45
|
onExecuteCode = _ref.onExecuteCode,
|
|
46
46
|
onClickAI = _ref.onClickAI,
|
|
47
|
-
onReload = _ref.onReload
|
|
47
|
+
onReload = _ref.onReload,
|
|
48
|
+
_ref$showAI = _ref.showAI,
|
|
49
|
+
showAI = _ref$showAI === void 0 ? true : _ref$showAI;
|
|
48
50
|
var locale = useLocale();
|
|
49
51
|
var exampleTitle = _typeof(title) === 'object' ? title[locale.id] : title;
|
|
50
52
|
|
|
@@ -80,15 +82,19 @@ export var Toolbar = function Toolbar(_ref) {
|
|
|
80
82
|
return onEditorTabChange(tab);
|
|
81
83
|
}
|
|
82
84
|
}, tab, " ", slot && slot);
|
|
83
|
-
})), /*#__PURE__*/React.createElement("a", {
|
|
85
|
+
})), showAI ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("a", {
|
|
84
86
|
className: styles.ai,
|
|
85
87
|
onClick: onClickAI
|
|
86
|
-
},
|
|
87
|
-
|
|
88
|
+
}, /*#__PURE__*/React.createElement(FormattedMessage, {
|
|
89
|
+
id: "ai.toolbar.assistant"
|
|
90
|
+
})), /*#__PURE__*/React.createElement(Tooltip, {
|
|
91
|
+
title: /*#__PURE__*/React.createElement(FormattedMessage, {
|
|
92
|
+
id: "ai.toolbar.restore"
|
|
93
|
+
})
|
|
88
94
|
}, /*#__PURE__*/React.createElement("span", {
|
|
89
95
|
className: styles.ai,
|
|
90
96
|
onClick: onReload
|
|
91
|
-
}, /*#__PURE__*/React.createElement(ReloadOutlined, null))), riddleVisible ? /*#__PURE__*/React.createElement("form", {
|
|
97
|
+
}, /*#__PURE__*/React.createElement(ReloadOutlined, null)))) : null, riddleVisible ? /*#__PURE__*/React.createElement("form", {
|
|
92
98
|
action: "//riddle.alibaba-inc.com/riddles/define",
|
|
93
99
|
method: "POST",
|
|
94
100
|
target: "_blank"
|
|
@@ -98,7 +104,7 @@ export var Toolbar = function Toolbar(_ref) {
|
|
|
98
104
|
value: JSON.stringify(riddlePrefillConfig)
|
|
99
105
|
}), /*#__PURE__*/React.createElement(Tooltip, {
|
|
100
106
|
title: /*#__PURE__*/React.createElement(FormattedMessage, {
|
|
101
|
-
id: "
|
|
107
|
+
id: "ai.toolbar.open.riddle"
|
|
102
108
|
})
|
|
103
109
|
}, /*#__PURE__*/React.createElement("input", {
|
|
104
110
|
type: "submit",
|
|
@@ -106,7 +112,7 @@ export var Toolbar = function Toolbar(_ref) {
|
|
|
106
112
|
className: styles.riddle
|
|
107
113
|
}))) : null, /*#__PURE__*/React.createElement(Tooltip, {
|
|
108
114
|
title: /*#__PURE__*/React.createElement(FormattedMessage, {
|
|
109
|
-
id: "
|
|
115
|
+
id: "ai.toolbar.open.stackblitz"
|
|
110
116
|
})
|
|
111
117
|
}, /*#__PURE__*/React.createElement(ThunderboltOutlined, {
|
|
112
118
|
className: styles.stackblitz,
|
|
@@ -115,7 +121,7 @@ export var Toolbar = function Toolbar(_ref) {
|
|
|
115
121
|
}
|
|
116
122
|
})), /*#__PURE__*/React.createElement(Tooltip, {
|
|
117
123
|
title: /*#__PURE__*/React.createElement(FormattedMessage, {
|
|
118
|
-
id: "
|
|
124
|
+
id: "ai.toolbar.open.codesandbox"
|
|
119
125
|
})
|
|
120
126
|
}, /*#__PURE__*/React.createElement("form", {
|
|
121
127
|
action: "https://codesandbox.io/api/v1/sandboxes/define",
|
|
@@ -141,7 +147,7 @@ export var Toolbar = function Toolbar(_ref) {
|
|
|
141
147
|
}
|
|
142
148
|
}), /*#__PURE__*/React.createElement(Tooltip, {
|
|
143
149
|
title: /*#__PURE__*/React.createElement(FormattedMessage, {
|
|
144
|
-
id: "
|
|
150
|
+
id: "ai.toolbar.execute"
|
|
145
151
|
})
|
|
146
152
|
}, /*#__PURE__*/React.createElement(PlayCircleOutlined, {
|
|
147
153
|
onClick: onExecuteCode,
|