跳到主要内容

ARC 2.0.0-beta.25

AUP layout 边界

把 AUP 用作 source-first 页面 layout 输入,同时把直接静态 tree 渲染和 layout component composition 分开。

Web Device 在两个相邻但不同的上下文读取 AUP:

上下文用来做什么不能假定什么
静态 AUP-tree renderer把受支持的语义 tree 渲染成 HTML每个 native primitive 或 widget 都受支持
页面 layout.aup通过 Web layout/component model 组织站点页面任意 native primitive 都可成为 layout section

新 Web 页面使用 pages/<name>/layout.aup 及带明确 props 的 site/theme component。layout 的读取顺序是 locale AUP、默认 AUP、locale JSON、默认 JSON、再到 convention/default fallback。JSON 形式是兼容输入;新 source 应优先 AUP。

layout validation 边界

Web layout validator 识别 component model,并拒绝不属于该 layout context 的 native primitive/widget section。这正是为什么 AUP protocol registry 中有一个 primitive,不足以证明它能直接放进 Web 页面 layout。

完整 AUP 语言、node/event/data 语义和 target capability 边界不属于本 board。本 board 只说明 Web Device site 怎样消费该语言。

任务流程见 用 AUP 建立页面;可复用呈现 contract 见 组件解析