feat(命名空间): 规范声明顺序,修复命名空间
build.yaml / build (push) Successful in 49s

This commit is contained in:
xiaoqidun committed 2026-10-12 11:20:30 +08:00
1 parent 17a9a03361
commit c4b81155a9
19 files changed
+410 -142

No files matched your search

+22 -22
View File
@@ -33,6 +33,28 @@ type editorGeneratedReferences struct {
staged *editorStagedPage
}
// editorVectorUsage 保存自产矢量资源的引用快照,内容和路径变化时失效
type editorVectorUsage struct {
name string
digest [32]byte
refs *editorResourceRefs
}
// editorReferenceScan 按XML事件收集资源和字体用字,未知内容保持完整扫描
type editorReferenceScan struct {
refs *editorResourceRefs
objects map[string]bool
name string
base string
stack []string
fonts []*editorFontUsage
text strings.Builder
resource bool
capture bool
safe bool
seen bool
}
// matches 判断条目仍为本次编码结果,空条目与暂存占位不混用
// 入参: data 当前条目数据
// 返回: bool 是否可以复用本次引用
@@ -50,13 +72,6 @@ func (r editorGeneratedReferences) stagedLeaf(data []byte) bool {
return r.staged != nil && data == nil && r.refs != nil && len(r.refs.files) == 0
}
// editorVectorUsage 保存自产矢量资源的引用快照,内容和路径变化时失效
type editorVectorUsage struct {
name string
digest [32]byte
refs *editorResourceRefs
}
// matches 核对资源路径和完整内容摘要,不以切片地址判断内容
// 入参: name 当前资源路径, data 当前资源内容
// 返回: bool 是否仍可使用编码时的引用
@@ -89,21 +104,6 @@ func (e *Editor) generatedVectorReferences(parts map[string][]byte, generated ma
return generated
}
// editorReferenceScan 按XML事件收集资源和字体用字,未知内容保持完整扫描
type editorReferenceScan struct {
refs *editorResourceRefs
objects map[string]bool
name string
base string
stack []string
fonts []*editorFontUsage
text strings.Builder
resource bool
capture bool
safe bool
seen bool
}
// vectorUsage 保留完整且限额内的自产矢量引用,超限时保存流程重新扫描
// 入参: data 本次编码内容
// 返回: *editorVectorUsage 引用快照,无法复用时为空