canvas 是 AUP 跨设备 primitive,不是 Web Device 的 layout 组件,也不是 Web-only widget。它属于 AUP_PRIMITIVES 中的 18 个名称之一,并出现在每个 target 的 DeviceCaps.primitives map 中(取值为 native、webview、partial 或 unsupported)。
合同
| 字段 | 值 |
|---|---|
| Primitive 名称 | canvas |
| 层级 | AUP 跨设备 primitive(AUP_PRIMITIVES) |
| 公共状态 | unsupported (document) |
| Document 能力 | unsupported |
| 共享 degradation chain | canvas → media → text |
| 作者入口 | 交互/视觉 target 上的 AUP |
| Document renderer / 备注 | No document native canvas path; chain applies |
| Showcase 证据 | Interactive runtime / visual demos (not document sample) |
何时使用
在有能力的设备上做自由绘制或像素表面。
何时不要使用
不要把 canvas demo 当作静态文档能力发布。
Document sample
不提供。 document 能力为 unsupported。共享 chain:canvas → media → text。
证据锚点
| 项 | 值 |
|---|---|
| 注册表 | packages/aup/src/aup-types.ts · AUP_PRIMITIVES |
| Document caps | providers/runtime/web-device/src/device-caps.ts · DEVICE_CAPS_DOCUMENT |
| Degradation | packages/aup/src/degradation.ts · DEGRADATION_CHAINS |
| 内部矩阵 | docs/aup/capability-matrix.md(内部,不对外路由) |
| Taxonomy hub | Primitive 类型分类与证据 |
| Sample 合同规则 | Live 示例:范围与合同 |