@ant-design/agentic-ui 2.29.43 → 2.29.45
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/AgentRunBar/index.js +27 -19
- package/dist/Hooks/useLanguage.d.ts +1 -0
- package/dist/I18n/locales.d.ts +1 -0
- package/dist/I18n/locales.js +2 -0
- package/dist/MarkdownEditor/editor/elements/Table/Table.js +2 -1
- package/dist/MarkdownEditor/editor/elements/index.js +21 -0
- package/dist/MarkdownEditor/editor/plugins/hotKeyCommands/enter.js +15 -0
- package/dist/MarkdownEditor/editor/plugins/useHighlight.js +173 -14
- package/dist/MarkdownEditor/editor/style.js +343 -363
- package/dist/MarkdownEditor/editor/tools/JinjaTemplatePanel/index.js +39 -17
- package/dist/MarkdownEditor/editor/tools/JinjaTemplatePanel/style.js +23 -1
- package/dist/MarkdownEditor/el.d.ts +7 -0
- package/dist/Plugins/chart/components/ChartContainer/ChartErrorBoundary.d.ts +2 -0
- package/package.json +1 -1
|
@@ -56,9 +56,22 @@ import "./code.css";
|
|
|
56
56
|
// 导入统一的标签样式配置
|
|
57
57
|
import { TAG_STYLES } from "./tagStyles";
|
|
58
58
|
var COMMENT_HIGHLIGHT_COLOR = 'var(--agentic-comment-highlight-color, rgba(21, 0, 255, 0.15))';
|
|
59
|
+
/** Jinja 语法高亮 CSS 变量名,在 .ant-agentic-md-editor-content 上覆盖即可定制 */ var JINJA_CSS_VAR = {
|
|
60
|
+
variable: '--agentic-md-editor-color-jinja-variable',
|
|
61
|
+
tag: '--agentic-md-editor-color-jinja-tag',
|
|
62
|
+
comment: '--agentic-md-editor-color-jinja-comment',
|
|
63
|
+
keyword: '--agentic-md-editor-color-jinja-keyword',
|
|
64
|
+
string: '--agentic-md-editor-color-jinja-string',
|
|
65
|
+
number: '--agentic-md-editor-color-jinja-number',
|
|
66
|
+
filter: '--agentic-md-editor-color-jinja-filter',
|
|
67
|
+
variableName: '--agentic-md-editor-color-jinja-variable-name',
|
|
68
|
+
placeholder: '--agentic-md-editor-color-jinja-placeholder',
|
|
69
|
+
placeholderBg: '--agentic-md-editor-color-jinja-placeholder-bg',
|
|
70
|
+
delimiter: '--agentic-md-editor-color-jinja-delimiter'
|
|
71
|
+
};
|
|
59
72
|
var genStyle = function genStyle(token) {
|
|
60
|
-
var _obj;
|
|
61
|
-
return
|
|
73
|
+
var _obj, _obj1;
|
|
74
|
+
return _obj1 = {
|
|
62
75
|
// 拖拽手柄样式
|
|
63
76
|
'[data-drag-handle]': {
|
|
64
77
|
position: 'absolute',
|
|
@@ -172,7 +185,7 @@ var genStyle = function genStyle(token) {
|
|
|
172
185
|
marginLeft: '2px'
|
|
173
186
|
}
|
|
174
187
|
}
|
|
175
|
-
}, _define_property(
|
|
188
|
+
}, _define_property(_obj1, token.componentCls, (_obj = {
|
|
176
189
|
boxSizing: 'border-box',
|
|
177
190
|
caretColor: 'var(--color-primary-control-fill-primary)',
|
|
178
191
|
color: 'inherit',
|
|
@@ -184,388 +197,355 @@ var genStyle = function genStyle(token) {
|
|
|
184
197
|
position: 'relative',
|
|
185
198
|
whiteSpace: 'pre-wrap',
|
|
186
199
|
wordWrap: 'break-word',
|
|
187
|
-
fontSize: '15px'
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
'
|
|
197
|
-
'
|
|
198
|
-
'[data-slate-zero-width="n"]': {
|
|
199
|
-
display: 'inline-block',
|
|
200
|
-
minWidth: 20
|
|
201
|
-
},
|
|
202
|
-
'&::before': {
|
|
203
|
-
cursor: 'text',
|
|
204
|
-
content: 'attr(data-slate-placeholder)',
|
|
205
|
-
color: 'rgba(0,0,0,0.45)',
|
|
206
|
-
display: 'inline-block',
|
|
207
|
-
position: 'absolute',
|
|
208
|
-
width: 'max-content',
|
|
209
|
-
maxWidth: '100%',
|
|
210
|
-
fontSize: '1em',
|
|
211
|
-
lineHeight: '21px',
|
|
212
|
-
wordBreak: 'break-word',
|
|
213
|
-
whiteSpace: 'wrap'
|
|
214
|
-
}
|
|
215
|
-
},
|
|
216
|
-
'> div.empty:first-child [data-slate-node="text"]': {
|
|
200
|
+
fontSize: '15px'
|
|
201
|
+
}, // Jinja 语法高亮,仅通过 CSS 变量定制(在 .ant-agentic-md-editor-content 上覆盖)
|
|
202
|
+
_define_property(_obj, JINJA_CSS_VAR.variable, 'var(--color-primary-control-fill-primary, #1677ff)'), _define_property(_obj, JINJA_CSS_VAR.tag, 'var(--color-orange-6, #d46b08)'), _define_property(_obj, JINJA_CSS_VAR.comment, 'var(--color-text-tertiary, rgba(0,0,0,0.25))'), _define_property(_obj, JINJA_CSS_VAR.keyword, '#5c4033'), _define_property(_obj, JINJA_CSS_VAR.string, 'var(--color-green-10, #10af74)'), _define_property(_obj, JINJA_CSS_VAR.number, 'var(--color-primary-10, #066ced)'), _define_property(_obj, JINJA_CSS_VAR.filter, 'var(--color-primary-8, #689ef0)'), _define_property(_obj, JINJA_CSS_VAR.variableName, 'var(--color-green-10, #10af74)'), _define_property(_obj, JINJA_CSS_VAR.placeholder, 'var(--color-primary-control-fill-primary, #1677ff)'), _define_property(_obj, JINJA_CSS_VAR.placeholderBg, 'var(--color-primary-bg-tip, rgba(0,102,255,0.08))'), _define_property(_obj, JINJA_CSS_VAR.delimiter, '#d4b84b'), _define_property(_obj, '::-webkit-scrollbar', {
|
|
203
|
+
width: '8px',
|
|
204
|
+
height: '8px'
|
|
205
|
+
}), _define_property(_obj, '::-webkit-scrollbar-thumb', {
|
|
206
|
+
backgroundColor: 'var(--color-gray-text-tertiary)',
|
|
207
|
+
borderRadius: '20px'
|
|
208
|
+
}), _define_property(_obj, '&-edit', {
|
|
209
|
+
'> div.empty:first-child': {
|
|
210
|
+
'[data-slate-zero-width="n"]': {
|
|
217
211
|
display: 'inline-block',
|
|
218
212
|
minWidth: 20
|
|
213
|
+
},
|
|
214
|
+
'&::before': {
|
|
215
|
+
cursor: 'text',
|
|
216
|
+
content: 'attr(data-slate-placeholder)',
|
|
217
|
+
color: 'rgba(0,0,0,0.45)',
|
|
218
|
+
display: 'inline-block',
|
|
219
|
+
position: 'absolute',
|
|
220
|
+
width: 'max-content',
|
|
221
|
+
maxWidth: '100%',
|
|
222
|
+
fontSize: '1em',
|
|
223
|
+
lineHeight: '21px',
|
|
224
|
+
wordBreak: 'break-word',
|
|
225
|
+
whiteSpace: 'wrap'
|
|
219
226
|
}
|
|
220
227
|
},
|
|
221
|
-
'
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
'
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
'
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
'
|
|
228
|
+
'> div.empty:first-child [data-slate-node="text"]': {
|
|
229
|
+
display: 'inline-block',
|
|
230
|
+
minWidth: 20
|
|
231
|
+
}
|
|
232
|
+
}), _define_property(_obj, '&> *:first-child', {
|
|
233
|
+
marginTop: 0
|
|
234
|
+
}), _define_property(_obj, '&-report', {
|
|
235
|
+
fontSize: '16px'
|
|
236
|
+
}), _define_property(_obj, '& > .link', {
|
|
237
|
+
textDecoration: 'underline'
|
|
238
|
+
}), _define_property(_obj, '& > .attach', {
|
|
239
|
+
padding: '3px 0'
|
|
240
|
+
}), _define_property(_obj, '& >.attach:not(:last-child)', {
|
|
241
|
+
marginBottom: '0.3em'
|
|
242
|
+
}), _define_property(_obj, '.attach .file', {
|
|
243
|
+
borderRadius: '12px',
|
|
244
|
+
borderWidth: '1px',
|
|
245
|
+
borderColor: 'rgb(229 231 235 / 1)',
|
|
246
|
+
backgroundColor: 'rgb(249 250 251 / 1)',
|
|
247
|
+
paddingTop: '0.5em',
|
|
248
|
+
paddingBottom: '0.5em',
|
|
249
|
+
paddingLeft: '0.75em',
|
|
250
|
+
paddingRight: '0.75em',
|
|
251
|
+
transitionDuration: '100ms'
|
|
252
|
+
}), _define_property(_obj, '.attach .file.active', {
|
|
253
|
+
borderColor: 'rgb(0 0 0 / 0.5)'
|
|
254
|
+
}), _define_property(_obj, "[data-fnc='fnc']", _object_spread({}, TAG_STYLES.fnc)), _define_property(_obj, "[data-fnd='fnd']", _object_spread({}, TAG_STYLES.fnd)), _define_property(_obj, '&:last-child', {
|
|
255
|
+
marginBottom: 0
|
|
256
|
+
}), _define_property(_obj, 'pre,code,kbd,samp', {
|
|
257
|
+
marginTop: '0',
|
|
258
|
+
marginBottom: '0',
|
|
259
|
+
fontFamily: 'ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, Liberation Mono, monospace',
|
|
260
|
+
fontSize: '0.9em',
|
|
261
|
+
wordWrap: 'normal'
|
|
262
|
+
}), _define_property(_obj, 'div[data-be="paragraph"]', {
|
|
263
|
+
position: 'relative',
|
|
264
|
+
font: 'var(--font-text-paragraph-lg)',
|
|
265
|
+
paddingTop: '0em',
|
|
266
|
+
display: 'block',
|
|
267
|
+
fontSize: '1em',
|
|
268
|
+
lineHeight: '1.5em',
|
|
269
|
+
margin: 'var(--margin-2x) 0'
|
|
270
|
+
}), _define_property(_obj, 'h1,h2,h3,h4,h5,h6', {
|
|
271
|
+
position: 'relative',
|
|
272
|
+
textWrap: 'balance',
|
|
273
|
+
'[data-drag-handle]': {
|
|
274
|
+
top: 'calc(3px + 0.05em) !important'
|
|
275
|
+
}
|
|
276
|
+
}), _define_property(_obj, "h1", {
|
|
277
|
+
fontSize: '30px',
|
|
278
|
+
lineHeight: '38px',
|
|
279
|
+
fontWeight: '600',
|
|
280
|
+
margin: 'var(--margin-8x) 0',
|
|
281
|
+
'a,span[data-url="url"]': {
|
|
282
|
+
fontSize: '30px',
|
|
283
|
+
fontWeight: '600'
|
|
284
|
+
}
|
|
285
|
+
}), _define_property(_obj, "h2", {
|
|
286
|
+
fontSize: '24px',
|
|
287
|
+
lineHeight: '32px',
|
|
288
|
+
fontWeight: '600',
|
|
289
|
+
marginTop: 'var(--margin-8x)',
|
|
290
|
+
marginBottom: 'var(--margin-4x)',
|
|
291
|
+
'a,span[data-url="url"]': {
|
|
292
|
+
fontSize: '24x',
|
|
293
|
+
fontWeight: '600'
|
|
294
|
+
}
|
|
295
|
+
}), _define_property(_obj, "h3", {
|
|
296
|
+
fontSize: '18px',
|
|
297
|
+
lineHeight: '26px',
|
|
298
|
+
fontWeight: '600',
|
|
299
|
+
marginTop: 'var(--margin-4x)',
|
|
300
|
+
marginBottom: 'var(--margin-2x)',
|
|
301
|
+
'a,span[data-url="url"]': {
|
|
302
|
+
fontSize: '18x',
|
|
303
|
+
fontWeight: '600'
|
|
304
|
+
}
|
|
305
|
+
}), _define_property(_obj, "h4", {
|
|
306
|
+
fontSize: '15px',
|
|
307
|
+
lineHeight: '24px',
|
|
308
|
+
fontWeight: '600',
|
|
309
|
+
marginTop: 'var(--margin-2x)',
|
|
310
|
+
'a,span[data-url="url"]': {
|
|
311
|
+
fontSize: '15x',
|
|
312
|
+
fontWeight: '600'
|
|
313
|
+
}
|
|
314
|
+
}), _define_property(_obj, "h5", {
|
|
315
|
+
fontSize: '15px',
|
|
316
|
+
lineHeight: '24px',
|
|
317
|
+
fontWeight: '600',
|
|
318
|
+
marginTop: 'var(--margin-2x)',
|
|
319
|
+
'a,span[data-url="url"]': {
|
|
320
|
+
fontSize: '15x',
|
|
321
|
+
fontWeight: '600'
|
|
322
|
+
}
|
|
323
|
+
}), _define_property(_obj, "h6", {
|
|
324
|
+
fontSize: '15px',
|
|
325
|
+
lineHeight: '24px',
|
|
326
|
+
fontWeight: '600',
|
|
327
|
+
marginTop: 'var(--margin-2x)',
|
|
328
|
+
'a,span[data-url="url"]': {
|
|
329
|
+
fontSize: '15x',
|
|
330
|
+
fontWeight: '600'
|
|
331
|
+
}
|
|
332
|
+
}), _define_property(_obj, 'a,span[data-url="url"]', {
|
|
333
|
+
lineHeight: '24px',
|
|
334
|
+
position: 'relative',
|
|
335
|
+
font: 'var(--font-text-body-lg)',
|
|
336
|
+
color: 'var(--color-gray-text-default)',
|
|
337
|
+
textDecoration: 'underline',
|
|
338
|
+
textDecorationColor: 'var(--color-gray-border-light);',
|
|
339
|
+
textUnderlineOffset: '4px',
|
|
340
|
+
cursor: 'pointer',
|
|
341
|
+
'&:hover': {
|
|
342
|
+
textDecorationColor: 'var(--color-gray-text-default)'
|
|
343
|
+
},
|
|
344
|
+
'&::after': {
|
|
345
|
+
content: "url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath d='M4.666667,4L11.33333,4C11.70152,4,12,4.298477,12,4.666667L12,11.33333C12,11.70152,11.70152,12,11.33333,12C10.96514,12,10.66667,11.70152,10.66667,11.33333L10.66667,6.27614L5.13828,11.80453C5.01305,11.92976,4.843478,12,4.666667,12C4.298477,12,4,11.70152,4,11.33333C4,11.15652,4.0702379,10.98695,4.195262,10.861930000000001L9.72386,5.33333L4.666667,5.33333C4.298477,5.33333,4,5.03486,4,4.666667C4,4.298477,4.298477,4,4.666667,4Z' fill-rule='evenodd' fill='rgba(0,1,3,0.45)'/%3E%3C/svg%3E\")",
|
|
346
|
+
width: '16px',
|
|
347
|
+
height: '16px',
|
|
272
348
|
position: 'relative',
|
|
273
|
-
|
|
274
|
-
'
|
|
275
|
-
|
|
276
|
-
}
|
|
349
|
+
marginLeft: '2px',
|
|
350
|
+
top: '3px',
|
|
351
|
+
pointerEvents: 'none'
|
|
277
352
|
},
|
|
353
|
+
'&:hover::after': {
|
|
354
|
+
content: "url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath d='M4.666667,4L11.33333,4C11.70152,4,12,4.298477,12,4.666667L12,11.33333C12,11.70152,11.70152,12,11.33333,12C10.96514,12,10.66667,11.70152,10.66667,11.33333L10.66667,6.27614L5.13828,11.80453C5.01305,11.92976,4.843478,12,4.666667,12C4.298477,12,4,11.70152,4,11.33333C4,11.15652,4.0702379,10.98695,4.195262,10.861930000001L9.72386,5.33333L4.666667,5.33333C4.298477,5.33333,4,5.03486,4,4.666667C4,4.298477,4.298477,4,4.666667,4Z' fill-rule='evenodd' fill='rgba(0,1,3,0.88)'/%3E%3C/svg%3E\")"
|
|
355
|
+
}
|
|
356
|
+
}), _define_property(_obj, 'ol,ul', {
|
|
357
|
+
paddingLeft: '1.8em',
|
|
358
|
+
marginTop: 'var(--margin-2x)',
|
|
359
|
+
marginBottom: 'var(--margin-4x)'
|
|
360
|
+
}), _define_property(_obj, "li", {
|
|
361
|
+
position: 'relative',
|
|
362
|
+
margin: 'var(--margin-2x) 0',
|
|
363
|
+
'&::marker': {
|
|
364
|
+
color: 'var(--color-gray-text-light)',
|
|
365
|
+
fontWeight: 600,
|
|
366
|
+
fontSize: '0.9rem',
|
|
367
|
+
lineHeight: 'var(--line-height-base)',
|
|
368
|
+
letterSpacing: 'var(--letter-spacing-base)',
|
|
369
|
+
fontFamily: 'var(--font-family-base)'
|
|
370
|
+
},
|
|
371
|
+
'ul, ol': {
|
|
372
|
+
margin: 0
|
|
373
|
+
}
|
|
374
|
+
}), _define_property(_obj, 'li:has(ul), li:has(ol), li:has(+ li ul), li:has(+ li ol), li:has(~ li ul), li:has(~ li ol)', {
|
|
375
|
+
marginTop: 'var(--margin-4x)'
|
|
376
|
+
}), _define_property(_obj, 'li:has(ul) ~ li, li:has(ol) ~ li', {
|
|
377
|
+
marginTop: 'var(--margin-4x)'
|
|
378
|
+
}), _define_property(_obj, 'li > p', {
|
|
379
|
+
marginTop: '1em'
|
|
380
|
+
}), _define_property(_obj, 'li + li', {
|
|
381
|
+
marginTop: '0.25em'
|
|
382
|
+
}), _define_property(_obj, "blockquote", {
|
|
383
|
+
display: 'flex',
|
|
384
|
+
padding: '8px 12px',
|
|
385
|
+
gap: '10px',
|
|
386
|
+
flexGrow: 1,
|
|
387
|
+
zIndex: 1,
|
|
388
|
+
fontSize: 'var(--font-size-base)',
|
|
389
|
+
fontWeight: 'normal',
|
|
390
|
+
lineHeight: '160%',
|
|
391
|
+
letterSpacing: 'normal',
|
|
392
|
+
position: 'relative',
|
|
393
|
+
color: 'var(--color-gray-text-secondary)',
|
|
394
|
+
margin: '0 !important',
|
|
395
|
+
'&:before': {
|
|
396
|
+
content: "''",
|
|
397
|
+
left: '0',
|
|
398
|
+
position: 'absolute',
|
|
399
|
+
top: '11px',
|
|
400
|
+
height: 'calc(100% - 22px)',
|
|
401
|
+
borderRadius: '4px',
|
|
402
|
+
width: '3px',
|
|
403
|
+
display: 'flex',
|
|
404
|
+
alignSelf: 'stretch',
|
|
405
|
+
zIndex: 0,
|
|
406
|
+
backgroundColor: 'var(--color-gray-control-fill-secondary)'
|
|
407
|
+
}
|
|
408
|
+
}), _define_property(_obj, '[data-be="media-container"], [data-be="image-container"]', {
|
|
409
|
+
display: 'flex',
|
|
410
|
+
minWidth: 0,
|
|
411
|
+
maxWidth: '100%'
|
|
412
|
+
}), _define_property(_obj, '@media screen and (max-width: 600px)', {
|
|
278
413
|
h1: {
|
|
279
|
-
fontSize: '
|
|
280
|
-
lineHeight: '38px',
|
|
281
|
-
fontWeight: '600',
|
|
282
|
-
margin: 'var(--margin-8x) 0',
|
|
283
|
-
'a,span[data-url="url"]': {
|
|
284
|
-
fontSize: '30px',
|
|
285
|
-
fontWeight: '600'
|
|
286
|
-
}
|
|
414
|
+
fontSize: '1.5em'
|
|
287
415
|
},
|
|
288
416
|
h2: {
|
|
289
|
-
fontSize: '
|
|
290
|
-
lineHeight: '32px',
|
|
291
|
-
fontWeight: '600',
|
|
292
|
-
marginTop: 'var(--margin-8x)',
|
|
293
|
-
marginBottom: 'var(--margin-4x)',
|
|
294
|
-
'a,span[data-url="url"]': {
|
|
295
|
-
fontSize: '24x',
|
|
296
|
-
fontWeight: '600'
|
|
297
|
-
}
|
|
417
|
+
fontSize: '1.25em'
|
|
298
418
|
},
|
|
299
419
|
h3: {
|
|
300
|
-
fontSize: '
|
|
301
|
-
lineHeight: '26px',
|
|
302
|
-
fontWeight: '600',
|
|
303
|
-
marginTop: 'var(--margin-4x)',
|
|
304
|
-
marginBottom: 'var(--margin-2x)',
|
|
305
|
-
'a,span[data-url="url"]': {
|
|
306
|
-
fontSize: '18x',
|
|
307
|
-
fontWeight: '600'
|
|
308
|
-
}
|
|
420
|
+
fontSize: '1.125em'
|
|
309
421
|
},
|
|
310
422
|
h4: {
|
|
311
|
-
fontSize: '
|
|
312
|
-
lineHeight: '24px',
|
|
313
|
-
fontWeight: '600',
|
|
314
|
-
marginTop: 'var(--margin-2x)',
|
|
315
|
-
'a,span[data-url="url"]': {
|
|
316
|
-
fontSize: '15x',
|
|
317
|
-
fontWeight: '600'
|
|
318
|
-
}
|
|
423
|
+
fontSize: '1em'
|
|
319
424
|
},
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
fontWeight: '600',
|
|
324
|
-
marginTop: 'var(--margin-2x)',
|
|
325
|
-
'a,span[data-url="url"]': {
|
|
326
|
-
fontSize: '15x',
|
|
327
|
-
fontWeight: '600'
|
|
328
|
-
}
|
|
425
|
+
'h1,h2': {
|
|
426
|
+
marginTop: '1em',
|
|
427
|
+
marginBottom: '1em'
|
|
329
428
|
},
|
|
330
|
-
h6: {
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
fontWeight: '600',
|
|
334
|
-
marginTop: 'var(--margin-2x)',
|
|
335
|
-
'a,span[data-url="url"]': {
|
|
336
|
-
fontSize: '15x',
|
|
337
|
-
fontWeight: '600'
|
|
338
|
-
}
|
|
339
|
-
},
|
|
340
|
-
'a,span[data-url="url"]': {
|
|
341
|
-
lineHeight: '24px',
|
|
342
|
-
position: 'relative',
|
|
343
|
-
font: 'var(--font-text-body-lg)',
|
|
344
|
-
color: 'var(--color-gray-text-default)',
|
|
345
|
-
textDecoration: 'underline',
|
|
346
|
-
textDecorationColor: 'var(--color-gray-border-light);',
|
|
347
|
-
textUnderlineOffset: '4px',
|
|
348
|
-
cursor: 'pointer',
|
|
349
|
-
'&:hover': {
|
|
350
|
-
textDecorationColor: 'var(--color-gray-text-default)'
|
|
351
|
-
},
|
|
352
|
-
'&::after': {
|
|
353
|
-
content: "url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath d='M4.666667,4L11.33333,4C11.70152,4,12,4.298477,12,4.666667L12,11.33333C12,11.70152,11.70152,12,11.33333,12C10.96514,12,10.66667,11.70152,10.66667,11.33333L10.66667,6.27614L5.13828,11.80453C5.01305,11.92976,4.843478,12,4.666667,12C4.298477,12,4,11.70152,4,11.33333C4,11.15652,4.0702379,10.98695,4.195262,10.861930000000001L9.72386,5.33333L4.666667,5.33333C4.298477,5.33333,4,5.03486,4,4.666667C4,4.298477,4.298477,4,4.666667,4Z' fill-rule='evenodd' fill='rgba(0,1,3,0.45)'/%3E%3C/svg%3E\")",
|
|
354
|
-
width: '16px',
|
|
355
|
-
height: '16px',
|
|
356
|
-
position: 'relative',
|
|
357
|
-
marginLeft: '2px',
|
|
358
|
-
top: '3px',
|
|
359
|
-
pointerEvents: 'none'
|
|
360
|
-
},
|
|
361
|
-
'&:hover::after': {
|
|
362
|
-
content: "url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath d='M4.666667,4L11.33333,4C11.70152,4,12,4.298477,12,4.666667L12,11.33333C12,11.70152,11.70152,12,11.33333,12C10.96514,12,10.66667,11.70152,10.66667,11.33333L10.66667,6.27614L5.13828,11.80453C5.01305,11.92976,4.843478,12,4.666667,12C4.298477,12,4,11.70152,4,11.33333C4,11.15652,4.0702379,10.98695,4.195262,10.861930000001L9.72386,5.33333L4.666667,5.33333C4.298477,5.33333,4,5.03486,4,4.666667C4,4.298477,4.298477,4,4.666667,4Z' fill-rule='evenodd' fill='rgba(0,1,3,0.88)'/%3E%3C/svg%3E\")"
|
|
363
|
-
}
|
|
429
|
+
'h3,h4,h5,h6': {
|
|
430
|
+
marginTop: '0.8em',
|
|
431
|
+
marginBottom: '0.8em'
|
|
364
432
|
},
|
|
365
433
|
'ol,ul': {
|
|
366
|
-
paddingLeft: '
|
|
367
|
-
marginTop: 'var(--margin-2x)',
|
|
368
|
-
marginBottom: 'var(--margin-4x)'
|
|
369
|
-
},
|
|
370
|
-
li: {
|
|
371
|
-
position: 'relative',
|
|
372
|
-
margin: 'var(--margin-2x) 0',
|
|
373
|
-
'&::marker': {
|
|
374
|
-
color: 'var(--color-gray-text-light)',
|
|
375
|
-
fontWeight: 600,
|
|
376
|
-
fontSize: '0.9rem',
|
|
377
|
-
lineHeight: 'var(--line-height-base)',
|
|
378
|
-
letterSpacing: 'var(--letter-spacing-base)',
|
|
379
|
-
fontFamily: 'var(--font-family-base)'
|
|
380
|
-
},
|
|
381
|
-
'ul, ol': {
|
|
382
|
-
margin: 0
|
|
383
|
-
}
|
|
384
|
-
},
|
|
385
|
-
'li:has(ul), li:has(ol), li:has(+ li ul), li:has(+ li ol), li:has(~ li ul), li:has(~ li ol)': {
|
|
386
|
-
marginTop: 'var(--margin-4x)'
|
|
387
|
-
},
|
|
388
|
-
'li:has(ul) ~ li, li:has(ol) ~ li': {
|
|
389
|
-
marginTop: 'var(--margin-4x)'
|
|
390
|
-
},
|
|
391
|
-
'li > p': {
|
|
392
|
-
marginTop: '1em'
|
|
393
|
-
},
|
|
394
|
-
'li + li': {
|
|
395
|
-
marginTop: '0.25em'
|
|
434
|
+
paddingLeft: '1em'
|
|
396
435
|
},
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
color: 'var(--color-gray-text-secondary)',
|
|
409
|
-
margin: '0 !important',
|
|
410
|
-
'&:before': {
|
|
411
|
-
content: "''",
|
|
412
|
-
left: '0',
|
|
413
|
-
position: 'absolute',
|
|
414
|
-
top: '11px',
|
|
415
|
-
height: 'calc(100% - 22px)',
|
|
416
|
-
borderRadius: '4px',
|
|
417
|
-
width: '3px',
|
|
418
|
-
display: 'flex',
|
|
419
|
-
alignSelf: 'stretch',
|
|
420
|
-
zIndex: 0,
|
|
421
|
-
backgroundColor: 'var(--color-gray-control-fill-secondary)'
|
|
422
|
-
}
|
|
423
|
-
},
|
|
424
|
-
'[data-be="media-container"], [data-be="image-container"]': {
|
|
425
|
-
display: 'flex',
|
|
426
|
-
minWidth: 0,
|
|
427
|
-
maxWidth: '100%'
|
|
428
|
-
},
|
|
429
|
-
'@media screen and (max-width: 600px)': {
|
|
430
|
-
h1: {
|
|
431
|
-
fontSize: '1.5em'
|
|
432
|
-
},
|
|
433
|
-
h2: {
|
|
434
|
-
fontSize: '1.25em'
|
|
435
|
-
},
|
|
436
|
-
h3: {
|
|
437
|
-
fontSize: '1.125em'
|
|
438
|
-
},
|
|
439
|
-
h4: {
|
|
440
|
-
fontSize: '1em'
|
|
441
|
-
},
|
|
442
|
-
'h1,h2': {
|
|
443
|
-
marginTop: '1em',
|
|
444
|
-
marginBottom: '1em'
|
|
445
|
-
},
|
|
446
|
-
'h3,h4,h5,h6': {
|
|
447
|
-
marginTop: '0.8em',
|
|
448
|
-
marginBottom: '0.8em'
|
|
436
|
+
// 移动端图片和视频响应式样式
|
|
437
|
+
'[data-be="image"], [data-be="media"]': {
|
|
438
|
+
width: '100%',
|
|
439
|
+
maxWidth: '100%',
|
|
440
|
+
boxSizing: 'border-box',
|
|
441
|
+
overflow: 'hidden',
|
|
442
|
+
'[data-be="media-container"]': {
|
|
443
|
+
width: '100%',
|
|
444
|
+
maxWidth: '100%',
|
|
445
|
+
padding: '2px',
|
|
446
|
+
boxSizing: 'border-box'
|
|
449
447
|
},
|
|
450
|
-
'
|
|
451
|
-
|
|
448
|
+
'img, video': {
|
|
449
|
+
maxWidth: '100%',
|
|
450
|
+
height: 'auto',
|
|
451
|
+
display: 'block'
|
|
452
452
|
},
|
|
453
|
-
|
|
454
|
-
'[data-be="image"], [data-be="media"]': {
|
|
455
|
-
width: '100%',
|
|
453
|
+
'[data-testid="resize-image-container"]': {
|
|
456
454
|
maxWidth: '100%',
|
|
457
|
-
|
|
458
|
-
overflow: 'hidden',
|
|
459
|
-
'[data-be="media-container"]': {
|
|
460
|
-
width: '100%',
|
|
461
|
-
maxWidth: '100%',
|
|
462
|
-
padding: '2px',
|
|
463
|
-
boxSizing: 'border-box'
|
|
464
|
-
},
|
|
465
|
-
'img, video': {
|
|
466
|
-
maxWidth: '100%',
|
|
467
|
-
height: 'auto',
|
|
468
|
-
display: 'block'
|
|
469
|
-
},
|
|
470
|
-
'[data-testid="resize-image-container"]': {
|
|
471
|
-
maxWidth: '100%',
|
|
472
|
-
width: '100% !important',
|
|
473
|
-
boxSizing: 'border-box'
|
|
474
|
-
},
|
|
475
|
-
'[data-testid="video-element"]': {
|
|
476
|
-
maxWidth: '100%',
|
|
477
|
-
width: '100% !important',
|
|
478
|
-
height: 'auto'
|
|
479
|
-
}
|
|
480
|
-
}
|
|
481
|
-
},
|
|
482
|
-
'[data-be]:not(p):not(data-be="list")': {
|
|
483
|
-
position: 'relative',
|
|
484
|
-
'*': {
|
|
485
|
-
outline: 'none',
|
|
455
|
+
width: '100% !important',
|
|
486
456
|
boxSizing: 'border-box'
|
|
457
|
+
},
|
|
458
|
+
'[data-testid="video-element"]': {
|
|
459
|
+
maxWidth: '100%',
|
|
460
|
+
width: '100% !important',
|
|
461
|
+
height: 'auto'
|
|
487
462
|
}
|
|
488
|
-
},
|
|
489
|
-
'[data-be="list"] > ul': {
|
|
490
|
-
marginTop: '0.25em',
|
|
491
|
-
marginBottom: '0.25em'
|
|
492
|
-
},
|
|
493
|
-
'[data-be="chart"]': {
|
|
494
|
-
marginTop: '0.5em',
|
|
495
|
-
marginBottom: '0.5em'
|
|
496
|
-
},
|
|
497
|
-
'[data-be="card"]': {
|
|
498
|
-
marginTop: '0.5em',
|
|
499
|
-
marginBottom: '0.5em'
|
|
500
|
-
},
|
|
501
|
-
'& code&-inline-code': {
|
|
502
|
-
display: 'inline',
|
|
503
|
-
fontFamily: "'Roboto,Mono SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace",
|
|
504
|
-
margin: '1px 3px',
|
|
505
|
-
wordBreak: 'break-all',
|
|
506
|
-
font: 'var(--font-text-code-base)',
|
|
507
|
-
letterSpacing: 'normal',
|
|
508
|
-
color: 'var(--color-gray-text-default)',
|
|
509
|
-
alignItems: 'center',
|
|
510
|
-
padding: '4px 6px',
|
|
511
|
-
gap: '4px',
|
|
512
|
-
zIndex: 1,
|
|
513
|
-
borderRadius: '6px',
|
|
514
|
-
background: 'var(--color-gray-bg-tip)'
|
|
515
|
-
},
|
|
516
|
-
'& &-comment-comment': {
|
|
517
|
-
display: 'inline-block',
|
|
518
|
-
background: "linear-gradient(transparent 65%, ".concat(COMMENT_HIGHLIGHT_COLOR, ")"),
|
|
519
|
-
cursor: 'pointer'
|
|
520
|
-
},
|
|
521
|
-
'& &-comment-highlight': {
|
|
522
|
-
backgroundColor: COMMENT_HIGHLIGHT_COLOR,
|
|
523
|
-
borderBottom: 0,
|
|
524
|
-
cursor: 'pointer'
|
|
525
|
-
},
|
|
526
|
-
'& &-high-text': {
|
|
527
|
-
borderRadius: '12px'
|
|
528
|
-
},
|
|
529
|
-
'& &-m-html': {
|
|
530
|
-
color: 'rgba(0,0,0,0.45)'
|
|
531
|
-
},
|
|
532
|
-
'& &-jinja-variable': {
|
|
533
|
-
color: 'var(--color-primary-control-fill-primary, #1677ff)'
|
|
534
|
-
},
|
|
535
|
-
'& &-jinja-tag': {
|
|
536
|
-
color: 'var(--color-orange-6, #d46b08)'
|
|
537
|
-
},
|
|
538
|
-
'& &-jinja-comment': {
|
|
539
|
-
color: 'var(--color-text-tertiary, rgba(0,0,0,0.25))',
|
|
540
|
-
fontStyle: 'italic'
|
|
541
|
-
},
|
|
542
|
-
'&:not(:last-child)': {
|
|
543
|
-
marginBottom: '0.5em'
|
|
544
|
-
},
|
|
545
|
-
"h2 + [data-be='list'] ul": {
|
|
546
|
-
marginTop: '0'
|
|
547
|
-
},
|
|
548
|
-
"h2 + [data-be='list'] ol": {
|
|
549
|
-
marginTop: '0'
|
|
550
|
-
},
|
|
551
|
-
'[data-align="left"]': {
|
|
552
|
-
textAlign: 'left'
|
|
553
|
-
},
|
|
554
|
-
'[data-align="center"]': {
|
|
555
|
-
textAlign: 'center'
|
|
556
|
-
},
|
|
557
|
-
'[data-align="right"]': {
|
|
558
|
-
textAlign: 'right'
|
|
559
|
-
},
|
|
560
|
-
// 分割线
|
|
561
|
-
hr: {
|
|
562
|
-
border: 'none',
|
|
563
|
-
borderTop: '1px solid var(--color-gray-border-light)',
|
|
564
|
-
padding: '0',
|
|
565
|
-
height: '0',
|
|
566
|
-
margin: 'var(--margin-8x) 0'
|
|
567
463
|
}
|
|
568
|
-
}), _define_property(_obj,
|
|
464
|
+
}), _define_property(_obj, '[data-be]:not(p):not(data-be="list")', {
|
|
465
|
+
position: 'relative',
|
|
466
|
+
'*': {
|
|
467
|
+
outline: 'none',
|
|
468
|
+
boxSizing: 'border-box'
|
|
469
|
+
}
|
|
470
|
+
}), _define_property(_obj, '[data-be="list"] > ul', {
|
|
471
|
+
marginTop: '0.25em',
|
|
472
|
+
marginBottom: '0.25em'
|
|
473
|
+
}), _define_property(_obj, '[data-be="chart"]', {
|
|
474
|
+
marginTop: '0.5em',
|
|
475
|
+
marginBottom: '0.5em'
|
|
476
|
+
}), _define_property(_obj, '[data-be="card"]', {
|
|
477
|
+
marginTop: '0.5em',
|
|
478
|
+
marginBottom: '0.5em'
|
|
479
|
+
}), _define_property(_obj, '& code&-inline-code', {
|
|
480
|
+
display: 'inline',
|
|
481
|
+
fontFamily: "'Roboto,Mono SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace",
|
|
482
|
+
margin: '1px 3px',
|
|
483
|
+
wordBreak: 'break-all',
|
|
484
|
+
font: 'var(--font-text-code-base)',
|
|
485
|
+
letterSpacing: 'normal',
|
|
486
|
+
color: 'var(--color-gray-text-default)',
|
|
487
|
+
alignItems: 'center',
|
|
488
|
+
padding: '4px 6px',
|
|
489
|
+
gap: '4px',
|
|
490
|
+
zIndex: 1,
|
|
491
|
+
borderRadius: '6px',
|
|
492
|
+
background: 'var(--color-gray-bg-tip)'
|
|
493
|
+
}), _define_property(_obj, '& &-comment-comment', {
|
|
494
|
+
display: 'inline-block',
|
|
495
|
+
background: "linear-gradient(transparent 65%, ".concat(COMMENT_HIGHLIGHT_COLOR, ")"),
|
|
496
|
+
cursor: 'pointer'
|
|
497
|
+
}), _define_property(_obj, '& &-comment-highlight', {
|
|
498
|
+
backgroundColor: COMMENT_HIGHLIGHT_COLOR,
|
|
499
|
+
borderBottom: 0,
|
|
500
|
+
cursor: 'pointer'
|
|
501
|
+
}), _define_property(_obj, '& &-high-text', {
|
|
502
|
+
borderRadius: '12px'
|
|
503
|
+
}), _define_property(_obj, '& &-m-html', {
|
|
504
|
+
color: 'rgba(0,0,0,0.45)'
|
|
505
|
+
}), _define_property(_obj, '& &-jinja-variable', {
|
|
506
|
+
color: "var(".concat(JINJA_CSS_VAR.variable, ")")
|
|
507
|
+
}), _define_property(_obj, '& &-jinja-tag', {
|
|
508
|
+
color: "var(".concat(JINJA_CSS_VAR.tag, ")")
|
|
509
|
+
}), _define_property(_obj, '& &-jinja-comment', {
|
|
510
|
+
color: "var(".concat(JINJA_CSS_VAR.comment, ")"),
|
|
511
|
+
fontStyle: 'italic'
|
|
512
|
+
}), _define_property(_obj, '& &-jinja-keyword', {
|
|
513
|
+
color: "var(".concat(JINJA_CSS_VAR.keyword, ")")
|
|
514
|
+
}), _define_property(_obj, '& &-jinja-string', {
|
|
515
|
+
color: "var(".concat(JINJA_CSS_VAR.string, ")")
|
|
516
|
+
}), _define_property(_obj, '& &-jinja-number', {
|
|
517
|
+
color: "var(".concat(JINJA_CSS_VAR.number, ")")
|
|
518
|
+
}), _define_property(_obj, '& &-jinja-filter', {
|
|
519
|
+
color: "var(".concat(JINJA_CSS_VAR.filter, ")")
|
|
520
|
+
}), _define_property(_obj, '& &-jinja-variable-name', {
|
|
521
|
+
color: "var(".concat(JINJA_CSS_VAR.variableName, ")")
|
|
522
|
+
}), _define_property(_obj, '& &-jinja-placeholder', {
|
|
523
|
+
color: "var(".concat(JINJA_CSS_VAR.placeholder, ")"),
|
|
524
|
+
backgroundColor: "var(".concat(JINJA_CSS_VAR.placeholderBg, ")"),
|
|
525
|
+
borderRadius: '2px',
|
|
526
|
+
padding: '0 2px'
|
|
527
|
+
}), _define_property(_obj, '& &-jinja-delimiter', {
|
|
528
|
+
color: "var(".concat(JINJA_CSS_VAR.delimiter, ")")
|
|
529
|
+
}), _define_property(_obj, '&:not(:last-child)', {
|
|
530
|
+
marginBottom: '0.5em'
|
|
531
|
+
}), _define_property(_obj, "h2 + [data-be='list'] ul", {
|
|
532
|
+
marginTop: '0'
|
|
533
|
+
}), _define_property(_obj, "h2 + [data-be='list'] ol", {
|
|
534
|
+
marginTop: '0'
|
|
535
|
+
}), _define_property(_obj, '[data-align="left"]', {
|
|
536
|
+
textAlign: 'left'
|
|
537
|
+
}), _define_property(_obj, '[data-align="center"]', {
|
|
538
|
+
textAlign: 'center'
|
|
539
|
+
}), _define_property(_obj, '[data-align="right"]', {
|
|
540
|
+
textAlign: 'right'
|
|
541
|
+
}), // 分割线
|
|
542
|
+
_define_property(_obj, "hr", {
|
|
543
|
+
border: 'none',
|
|
544
|
+
borderTop: '1px solid var(--color-gray-border-light)',
|
|
545
|
+
padding: '0',
|
|
546
|
+
height: '0',
|
|
547
|
+
margin: 'var(--margin-8x) 0'
|
|
548
|
+
}), _obj)), _define_property(_obj1, "".concat(token.componentCls, "-compact"), {
|
|
569
549
|
'div[data-be="paragraph"]': {
|
|
570
550
|
paddingTop: '0px',
|
|
571
551
|
paddingBottom: '0px',
|
|
@@ -575,13 +555,13 @@ var genStyle = function genStyle(token) {
|
|
|
575
555
|
marginTop: '0.3em',
|
|
576
556
|
marginBottom: '0.3em'
|
|
577
557
|
}
|
|
578
|
-
}), _define_property(
|
|
558
|
+
}), _define_property(_obj1, "@media (max-width: ".concat(MOBILE_BREAKPOINT, ")"), {
|
|
579
559
|
'div[data-be="paragraph"]': {
|
|
580
560
|
fontSize: '0.95em',
|
|
581
561
|
lineHeight: '1.4em',
|
|
582
562
|
margin: 'var(--margin-1x) 0'
|
|
583
563
|
}
|
|
584
|
-
}),
|
|
564
|
+
}), _obj1;
|
|
585
565
|
};
|
|
586
566
|
var genSlideStyle = function genSlideStyle(token) {
|
|
587
567
|
var _obj;
|