docs: render UML diagrams and embed portable previews
Verify Tessera GUI / verify (push) Failing after 1m30s
Verify Tessera GUI / verify (push) Failing after 1m30s
This commit is contained in:
@@ -6,81 +6,9 @@
|
||||
|
||||
下面是简化 UML 类图;实线关联表示有强引用/直接持有,虚线标明弱引用或派生关系。它省略类型表、回调捕获边和桌面的内部字典,不能当成完整 GC 根枚举。
|
||||
|
||||
```mermaid
|
||||
classDiagram
|
||||
class ReplSession {
|
||||
id: u64
|
||||
candidate: Candidate
|
||||
bridge: UiBridge
|
||||
documents: Map
|
||||
faulted: bool
|
||||
}
|
||||
class Candidate {
|
||||
vm: Vm
|
||||
roots: ObjectRef[]
|
||||
globals: ObjectRef
|
||||
}
|
||||
class ManagedWindow {
|
||||
id: u64
|
||||
pages: ObjectRef[]
|
||||
closed: bool
|
||||
}
|
||||
class Block {
|
||||
state: ObjectRef
|
||||
page: bool
|
||||
}
|
||||
class Cell
|
||||
class Data {
|
||||
kind: Kind
|
||||
children: Child[]
|
||||
properties: ObjectRef
|
||||
bindings: ObjectRef[]
|
||||
}
|
||||
class Child {
|
||||
slot: u64
|
||||
block: ObjectRef
|
||||
}
|
||||
class Mount {
|
||||
block: ObjectRef
|
||||
page: WeakObjectRef
|
||||
parent: WeakObjectRef
|
||||
geometry: MountGeometry
|
||||
mounted: bool
|
||||
}
|
||||
class Presentation {
|
||||
desktop: ObjectRef
|
||||
active: ObjectRef
|
||||
mounts: MountTable
|
||||
render_cache: RenderCache
|
||||
}
|
||||
class UiNode {
|
||||
block_id: String
|
||||
slots: u64[]
|
||||
kind: UiKind
|
||||
}
|
||||
class RenderDocument {
|
||||
source: String
|
||||
ui_root: Arc
|
||||
frame: Frame
|
||||
windows: Map
|
||||
}
|
||||
ReplSession *-- Candidate
|
||||
ReplSession *-- UiBridge
|
||||
UiBridge *-- Presentation : Session 中逐窗口保存
|
||||
ManagedWindow --> Block : pages / tabs 保留 Page
|
||||
Block --> Cell : state
|
||||
Cell --> Data : 普通内容
|
||||
Cell --> Block : 共享赋值转发时
|
||||
Data *-- Child
|
||||
Child --> Block
|
||||
Mount --> Block
|
||||
Mount ..> Mount : parent / siblings 弱引用
|
||||
Presentation *-- MountTable
|
||||
Presentation ..> UiNode : 缓存派生树
|
||||
RenderDocument o-- UiNode : 不可变原生值
|
||||
RenderDocument *-- Frame
|
||||
RenderDocument *-- RenderDocument : 次级窗口
|
||||
```
|
||||

|
||||
|
||||
[放大 SVG](uml/rendered/domain.svg) · [编辑 UML 源码](uml/domain.puml)
|
||||
|
||||
可编辑来源:[domain.puml](uml/domain.puml)。`Page` 是具有 Page 行为的托管 Block,不是另一棵浏览器 DOM;`ManagedWindow` 是 VM 中的窗口语义,和 winit 的原生 Window 有对应关系,但不是同一对象。
|
||||
|
||||
|
||||
Reference in New Issue
Block a user