feat: enhance Milkdown editor and file system functionality

- Normalize line endings in Markdown export for DOCX files.
- Improve selection serialization to Markdown with better handling of empty documents.
- Add a new `updateFile` function to the file system for updating file properties.
- Introduce video transcoding capabilities using FFmpeg, supporting various video formats.
- Update AGENTS.md for clearer plugin structure and responsibilities.
- Add scoped styles for TreeNodeItem component to improve UI consistency.
- Implement cross-origin isolation headers in Vite configuration for enhanced security.
- Remove obsolete test_cross.py file.
This commit is contained in:
2026-05-01 20:55:02 +08:00
parent 52ade88840
commit 70152c61b1
43 changed files with 3911 additions and 1373 deletions
+161
View File
@@ -180,3 +180,164 @@ function forwardDragOver(event, id) {
/>
</template>
</template>
<style scoped>
.tree-node {
display: flex;
align-items: center;
gap: 6px;
height: 30px;
padding-right: 8px;
font-size: 13px;
color: var(--github-text);
cursor: pointer;
user-select: none;
}
.tree-node:hover {
background: var(--github-hover);
}
.tree-node.selected {
background: var(--github-selected);
color: var(--github-text);
}
.tree-node.clipped {
opacity: 0.55;
}
.tree-node-new {
margin: 2px 8px;
border: 1px dashed var(--github-border);
border-radius: 8px;
}
.chevron,
.chevron-placeholder {
width: 20px;
height: 20px;
flex-shrink: 0;
}
.icon-folder,
.icon-file {
display: inline-flex;
align-items: center;
justify-content: center;
width: 16px;
height: 16px;
flex-shrink: 0;
}
.icon-folder::before {
content: '📁';
font-size: 14px;
}
.icon-file::before {
content: '📄';
font-size: 13px;
}
.icon-markdown::before { content: 'Ⓜ'; font-size: 12px; font-weight: 700; color: #0969da; }
.icon-json::before { content: '{ }'; font-size: 8px; font-weight: 700; color: #8250df; }
.icon-javascript::before { content: 'JS'; font-size: 9px; font-weight: 700; color: #9a6700; }
.icon-typescript::before { content: 'TS'; font-size: 9px; font-weight: 700; color: #0969da; }
.icon-css::before { content: 'CSS'; font-size: 7px; font-weight: 700; color: #1f883d; }
.icon-html::before { content: 'HTML'; font-size: 6px; font-weight: 700; color: #bc4c00; }
.icon-python::before { content: 'PY'; font-size: 9px; font-weight: 700; color: #0969da; }
.icon-vue::before { content: 'Vue'; font-size: 8px; font-weight: 700; color: #1f883d; }
.icon-yaml::before { content: 'YML'; font-size: 8px; font-weight: 700; color: #0969da; }
.icon-xml::before { content: '</>'; font-size: 8px; font-weight: 700; color: #bc4c00; }
.icon-csv::before { content: 'CSV'; font-size: 8px; font-weight: 700; color: #1f883d; }
.icon-log::before { content: 'LOG'; font-size: 7px; font-weight: 700; color: #6e7781; }
.icon-sql::before { content: 'SQL'; font-size: 8px; font-weight: 700; color: #8250df; }
.icon-image::before { content: '🖼'; font-size: 13px; }
.icon-pdf::before { content: 'PDF'; font-size: 8px; font-weight: 700; color: #cf222e; }
.icon-word::before { content: 'DOC'; font-size: 7px; font-weight: 700; color: #0969da; }
.icon-ppt::before { content: 'PPT'; font-size: 7px; font-weight: 700; color: #bc4c00; }
.icon-excel::before { content: 'XLS'; font-size: 7px; font-weight: 700; color: #1f883d; }
.icon-zip::before { content: 'ZIP'; font-size: 7px; font-weight: 700; color: #6f42c1; }
.icon-text::before { content: 'TXT'; font-size: 8px; font-weight: 700; color: #6e7781; }
.node-name {
flex: 1;
min-width: 0;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.rename-input {
flex: 1;
min-width: 0;
height: 24px;
padding: 0 8px;
border: 1px solid #0969da;
border-radius: 6px;
outline: none;
background: var(--github-bg);
color: var(--github-text);
font-size: 13px;
}
.node-actions {
display: flex;
gap: 4px;
margin-left: 4px;
opacity: 0;
transition: opacity 0.15s ease;
}
.tree-node:hover .node-actions,
.tree-node.selected .node-actions {
opacity: 1;
}
.action-btn,
.chevron {
appearance: none;
-webkit-appearance: none;
display: inline-flex;
align-items: center;
justify-content: center;
padding: 0;
border-radius: 6px;
color: var(--github-text-secondary);
cursor: pointer;
flex-shrink: 0;
line-height: 0;
}
.chevron {
margin-left: -2px;
border: 1px solid transparent;
background: transparent;
}
.action-btn {
width: 20px;
height: 20px;
border: 1px solid transparent;
background: transparent;
}
.action-btn svg,
.chevron svg {
display: block;
}
.action-btn:hover,
.tree-node:hover .chevron,
.tree-node.selected .chevron {
background: rgba(9, 105, 218, 0.08);
color: var(--github-text);
}
.action-btn:focus-visible,
.chevron:focus-visible {
outline: none;
box-shadow: 0 0 0 2px rgba(9, 105, 218, 0.18);
}
</style>