|
| 1 | +# Renderer Field Inventory |
| 2 | + |
| 3 | +Updated: 2026-08-01 |
| 4 | + |
| 5 | +This inventory is the cutover contract between the existing semantic runtime |
| 6 | +and the self-drawn A3S Graphics path. A field being parsed into `PortableStyle` |
| 7 | +or `NativeProps` is not evidence that layout or paint implements it. |
| 8 | + |
| 9 | +`src/render_contract.rs` is the executable source of truth. It enumerates all |
| 10 | +504 current top-level `PortableStyle` fields from their serialized shape and |
| 11 | +assigns each one to its first complete delivery milestone. Its tests pin the |
| 12 | +field count, so adding or removing a field requires an intentional inventory |
| 13 | +update. `NativeRole` and `NativeEventKind` use exhaustive matches, so new enum |
| 14 | +variants cannot compile without an assignment. |
| 15 | + |
| 16 | +## Milestone assignments |
| 17 | + |
| 18 | +| Assignment | Owned projection | |
| 19 | +| --- | --- | |
| 20 | +| Semantic | Raw declarations, custom properties, interaction-variant declarations, cascade bookkeeping, and the parser's explicit unsupported map | |
| 21 | +| M3 layout/scene | Box sizing, block and row/column flex flow, explicit and constrained size, padding, margin, gap, inset, solid background and border rectangles, radius, opacity, overflow clipping, z-order, visibility, and pointer hit eligibility | |
| 22 | +| M4 interaction/text | Font and text fields, writing direction, editing, caret and selection, focus visuals, normalized input, IME, clipboard, overlays, speech semantics, and accessibility bridges | |
| 23 | +| P1 components | Grid, tables, columns, lists, containment, assets, images, advanced backgrounds, SVG component paint, scrolling policy, themes, and complete collection/component projection | |
| 24 | +| P2 advanced Graphics | Transforms, masks, filters, blend/isolation, paths and shapes, advanced SVG paint, animation, transitions, and view transitions | |
| 25 | + |
| 26 | +M3 may carry any `NativeRole` through generic box layout. The role assignment |
| 27 | +records when its visible content and behavior become complete: structural |
| 28 | +containers are M3; text and basic controls are M4; assets, collections, |
| 29 | +overlays, and tables are P1; Canvas is P2. Metadata-only roles remain semantic. |
| 30 | + |
| 31 | +## Native tree fields |
| 32 | + |
| 33 | +The `NativeElement` identity, role, props, and ordered children remain the |
| 34 | +shared input. The renderer uses a path-qualified identity derived from stable |
| 35 | +sibling keys; it must not use a platform handle or a tree index as identity. |
| 36 | + |
| 37 | +`NativeProps` fields are owned as follows: |
| 38 | + |
| 39 | +| Field group | Owner/gate | |
| 40 | +| --- | --- | |
| 41 | +| `web.class_name`, `web.style`, visibility, orientation | M3 style resolution and layout | |
| 42 | +| label, value, placeholder, range values, input hints, editing constraints | M4 text/input/IME; sensitive values are never copied into paint diagnostics | |
| 43 | +| action, disabled, required, invalid, read-only, selected, checked, expanded, focus flags | Existing semantic runtime plus M4 hit/focus/action projection | |
| 44 | +| accessibility name, description, relationships, structure, and state | Existing semantic truth plus parallel M4 OS bridges; never inferred from paint | |
| 45 | +| popover/anchor and overlay metadata | Existing overlay policy plus M4 layout/layer projection | |
| 46 | +| resource URLs, intrinsic media size, loading/decoding policy, HTML resource groups | P1 asset and component projection; product I/O remains outside GUI | |
| 47 | +| HTML activation, form, collection, dialog, shadow, microdata, and metadata groups | Semantic-only unless a listed M4/P1 projection consumes the field | |
| 48 | + |
| 49 | +## Input, focus, overlay, text, and accessibility |
| 50 | + |
| 51 | +- Input inventory covers every `NativeEventKind`, modality, modifier, position, |
| 52 | + delta, repeat, click count, handled-activation marker, related target, and |
| 53 | + optional value. All belong to M4; coordinates feed GUI-owned hit testing. |
| 54 | +- Focus inventory covers node identity, containment, restoration, autofocus, |
| 55 | + disabled state, tab order, focusability, input modality, focus-visible, and |
| 56 | + focus-within. Semantic state exists today; geometry integration is M4. |
| 57 | +- Overlay inventory covers modal/underlay/dismiss policies, blur and Escape |
| 58 | + behavior, autofocus, anchor and boundary rectangles, placement, direction, |
| 59 | + offsets, flip policy, container padding, arrow geometry, and maximum height. |
| 60 | + M4 owns the self-drawn layer and focus containment. |
| 61 | +- Text inventory includes label/value/placeholder content, font selection and |
| 62 | + fallback, size/weight/style/features, shaping direction and writing mode, |
| 63 | + line layout, wrapping, alignment, decoration, selection, caret, composition, |
| 64 | + and password redaction. Embedded reference fonts are mandatory for fixtures. |
| 65 | +- Accessibility inventory includes role, name, value sensitivity, description, |
| 66 | + relationships, structural indices/spans, live state, control state, focus, |
| 67 | + selection, checked/expanded state, children, actions, and announcements. It |
| 68 | + is a parallel product of semantic state and must not be reconstructed from |
| 69 | + Graphics commands. |
| 70 | + |
| 71 | +## Diagnostic rule |
| 72 | + |
| 73 | +The layout/scene adapter reports every requested field whose assigned |
| 74 | +milestone has not landed. A field assigned to a later milestone is deferred |
| 75 | +with its owner; a field present in `PortableStyle::unsupported` is rejected. |
| 76 | +No adapter may treat a parsed field as implemented merely by ignoring it. |
0 commit comments