feat: 增加 ECharts 渲染与预览交互增强
- 新增可复用的 markdown-echarts 工作区,支持安全的 YAML 围栏、默认值、语义校验、错误占位和 SVG 渲染 - 将 ECharts 接入统一 Markdown、快速预览、精确预览与 PDF 链路,并复用 Mermaid 的不可跨页和超高图单页适配策略 - 默认示例加入 ECharts,增加源文本折叠、顶部文档状态、页码输入跳转与滚动同步 - 快速预览改用外层容器滚动,使滚动条与精确预览统一贴在预览区域右侧,并兼容显示缩放 - 完善 Docker 工作区复制、可配置 Compose 镜像、测试覆盖和进度文档
This commit is contained in:
+173
-10
@@ -63,6 +63,39 @@ button:disabled {
|
||||
background: rgb(247 248 246 / 92%);
|
||||
}
|
||||
|
||||
.topbar-primary {
|
||||
display: flex;
|
||||
flex: 1;
|
||||
align-items: center;
|
||||
gap: 32px;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.topbar-brand {
|
||||
flex: none;
|
||||
}
|
||||
|
||||
.document-summary {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
min-width: 0;
|
||||
max-width: min(42vw, 520px);
|
||||
padding-left: 28px;
|
||||
border-left: 1px solid #d4dad7;
|
||||
}
|
||||
|
||||
.document-summary > strong {
|
||||
overflow: hidden;
|
||||
font-size: 0.82rem;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.document-summary .render-status {
|
||||
max-width: 100%;
|
||||
margin-top: 3px;
|
||||
}
|
||||
|
||||
.eyebrow {
|
||||
margin: 0 0 4px;
|
||||
color: #3b755d;
|
||||
@@ -82,6 +115,7 @@ h1 {
|
||||
|
||||
.topbar-actions {
|
||||
display: flex;
|
||||
flex: none;
|
||||
flex-wrap: wrap;
|
||||
gap: 10px;
|
||||
}
|
||||
@@ -104,6 +138,11 @@ h1 {
|
||||
grid-template-columns: minmax(360px, 0.8fr) minmax(520px, 1.2fr);
|
||||
flex: 1;
|
||||
min-height: 0;
|
||||
transition: grid-template-columns 180ms ease;
|
||||
}
|
||||
|
||||
.editor-layout.is-source-collapsed {
|
||||
grid-template-columns: 48px minmax(520px, 1fr);
|
||||
}
|
||||
|
||||
.editor-panel,
|
||||
@@ -119,6 +158,45 @@ h1 {
|
||||
background: #f6f7f5;
|
||||
}
|
||||
|
||||
.source-panel-content {
|
||||
display: flex;
|
||||
flex: 1;
|
||||
flex-direction: column;
|
||||
min-height: 0;
|
||||
}
|
||||
|
||||
.source-panel-content[hidden] {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.source-panel-toggle {
|
||||
min-height: 32px;
|
||||
padding: 0 10px;
|
||||
border-color: #c9d4ce;
|
||||
background: #f8fbf9;
|
||||
color: #4f695e;
|
||||
font-size: 0.7rem;
|
||||
}
|
||||
|
||||
.source-panel-restore {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
min-height: 0;
|
||||
padding: 14px 0;
|
||||
border: 0;
|
||||
border-radius: 0;
|
||||
background: #f0f3f1;
|
||||
color: #4f695e;
|
||||
font-size: 0.72rem;
|
||||
letter-spacing: 0.08em;
|
||||
writing-mode: vertical-rl;
|
||||
}
|
||||
|
||||
.source-panel-restore:hover {
|
||||
background: #e4ebe7;
|
||||
color: #356c55;
|
||||
}
|
||||
|
||||
.panel-heading {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
@@ -181,12 +259,43 @@ h1 {
|
||||
flex: none;
|
||||
min-height: 44px;
|
||||
align-items: center;
|
||||
justify-content: flex-end;
|
||||
justify-content: space-between;
|
||||
gap: 12px;
|
||||
padding: 6px 20px;
|
||||
border-bottom: 1px solid #d9dedb;
|
||||
background: rgb(255 255 255 / 58%);
|
||||
}
|
||||
|
||||
.preview-page-control {
|
||||
display: inline-flex;
|
||||
flex: none;
|
||||
align-items: center;
|
||||
gap: 5px;
|
||||
color: #5d7168;
|
||||
font-size: 0.7rem;
|
||||
font-variant-numeric: tabular-nums;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.preview-page-control input {
|
||||
width: 48px;
|
||||
height: 30px;
|
||||
padding: 0 6px;
|
||||
border: 1px solid #c9d4ce;
|
||||
border-radius: 7px;
|
||||
outline: 0;
|
||||
background: #fff;
|
||||
color: #356c55;
|
||||
font: inherit;
|
||||
font-weight: 700;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.preview-page-control input:focus {
|
||||
border-color: #74a88f;
|
||||
box-shadow: 0 0 0 3px rgb(116 168 143 / 16%);
|
||||
}
|
||||
|
||||
.preview-zoom-control {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
@@ -248,14 +357,6 @@ h1 {
|
||||
color: #9ba49f;
|
||||
}
|
||||
|
||||
.preview-page-indicator {
|
||||
flex: none;
|
||||
color: #5d7168;
|
||||
font-size: 0.7rem;
|
||||
font-variant-numeric: tabular-nums;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.preview-mode-control {
|
||||
display: inline-flex;
|
||||
flex: none;
|
||||
@@ -362,6 +463,28 @@ textarea:focus {
|
||||
min-height: 0;
|
||||
overflow: auto;
|
||||
padding: 0 30px;
|
||||
scrollbar-color: #8d9993 #dfe4e1;
|
||||
scrollbar-width: auto;
|
||||
}
|
||||
|
||||
.preview-scroll::-webkit-scrollbar {
|
||||
width: 14px;
|
||||
height: 14px;
|
||||
}
|
||||
|
||||
.preview-scroll::-webkit-scrollbar-track {
|
||||
background: #dfe4e1;
|
||||
}
|
||||
|
||||
.preview-scroll::-webkit-scrollbar-thumb {
|
||||
min-height: 48px;
|
||||
border: 3px solid #dfe4e1;
|
||||
border-radius: 999px;
|
||||
background: #8d9993;
|
||||
}
|
||||
|
||||
.preview-scroll::-webkit-scrollbar-thumb:hover {
|
||||
background: #6f7d76;
|
||||
}
|
||||
|
||||
.paper {
|
||||
@@ -808,6 +931,21 @@ textarea:focus {
|
||||
padding: 16px;
|
||||
}
|
||||
|
||||
.topbar-primary {
|
||||
flex-direction: column;
|
||||
align-items: flex-start;
|
||||
gap: 12px;
|
||||
}
|
||||
|
||||
.document-summary {
|
||||
width: 100%;
|
||||
max-width: none;
|
||||
padding-top: 10px;
|
||||
padding-left: 0;
|
||||
border-top: 1px solid #d4dad7;
|
||||
border-left: 0;
|
||||
}
|
||||
|
||||
.topbar-actions {
|
||||
flex-direction: column;
|
||||
}
|
||||
@@ -816,6 +954,10 @@ textarea:focus {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
|
||||
.editor-layout.is-source-collapsed {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
|
||||
.editor-panel,
|
||||
.preview-panel {
|
||||
min-height: 650px;
|
||||
@@ -830,6 +972,19 @@ textarea:focus {
|
||||
border-bottom: 1px solid #cbd2ce;
|
||||
}
|
||||
|
||||
.editor-layout.is-source-collapsed .editor-panel {
|
||||
height: 44px;
|
||||
min-height: 44px;
|
||||
}
|
||||
|
||||
.source-panel-restore {
|
||||
height: 44px;
|
||||
min-height: 44px;
|
||||
padding: 0 16px;
|
||||
letter-spacing: 0;
|
||||
writing-mode: horizontal-tb;
|
||||
}
|
||||
|
||||
.preview-scroll {
|
||||
padding: 0 10px;
|
||||
}
|
||||
@@ -847,11 +1002,13 @@ textarea:focus {
|
||||
}
|
||||
|
||||
.preview-toolbar {
|
||||
justify-content: center;
|
||||
flex-wrap: wrap;
|
||||
justify-content: space-between;
|
||||
padding-inline: 10px;
|
||||
}
|
||||
|
||||
.preview-zoom-control {
|
||||
flex: 1 0 100%;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
@@ -865,6 +1022,12 @@ textarea:focus {
|
||||
}
|
||||
}
|
||||
|
||||
@media (prefers-reduced-motion: reduce) {
|
||||
.editor-layout {
|
||||
transition: none;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 520px) {
|
||||
.settings-drawer {
|
||||
width: 100vw;
|
||||
|
||||
Reference in New Issue
Block a user