docs(requirements): split keyed list rows
Add explicit northstar ring fields to list requirements and split oversized keyed identity/helper obligations without changing behavior. req: list/001 req: list/002 req: list/003 req: list/004 req: list/005
This commit is contained in:
+9
-3
@@ -423,13 +423,19 @@ resources. Concrete runtime targets are addressed through `ResourceRef`
|
||||
## list
|
||||
|
||||
### req: list/001
|
||||
001 Any `data-hemx-slot` or `data-hemx-handle` inside a hemplate `h-for` scope requires a stable key. Preferred syntax: `<template h-for="item in &self.items" h-key="item.id"> ... </template>`. Without a key, hemx-addressable nodes inside the loop are rejected at build time. Keyed identity is `ResourceRef { resource: ResourceId, scope: Some(ScopeKey::KeyValue(...)) }`.
|
||||
0 001 Any `data-hemx-slot` or `data-hemx-handle` inside a hemplate `h-for` scope requires a stable key. Use syntax such as `<template h-for="item in &self.items" h-key="item.id"> ... </template>`. [north_star]
|
||||
|
||||
### req: list/004
|
||||
0 004 Without a key, hemx-addressable nodes inside a loop are rejected at build time. Keyed identity is `ResourceRef { resource: ResourceId, scope: Some(ScopeKey::KeyValue(...)) }`. [north_star]
|
||||
|
||||
### req: list/002
|
||||
002 Slots inside a keyed loop receive a composite identity. hemplate records `key_expr` in the Surface; hemx implements keyed slot lookups.
|
||||
0 002 Slots inside a keyed loop receive a composite identity. hemplate records `key_expr` in the Surface; hemx implements keyed slot lookups. [north_star]
|
||||
|
||||
### req: list/003
|
||||
003 Generated helpers for keyed slots are `append(view)`, `prepend(view)`, `replace(view)`, and `remove(key_or_view)` when the template and view type provide an unambiguous `h-key`. Compatibility functions such as `append(keyed_slot, key, view)` may exist as explicit low-level forms. Mismatch between key type and slot key type is a compile-time error, and missing/ambiguous keys are build errors with template spans.
|
||||
0 003 Generated helpers for keyed slots are `append(view)`, `prepend(view)`, `replace(view)`, and `remove(key_or_view)` when the template and view type provide an unambiguous `h-key`. [north_star]
|
||||
|
||||
### req: list/005
|
||||
0 005 Compatibility functions such as `append(keyed_slot, key, view)` may exist as explicit low-level forms. Key type mismatches are compile-time errors; missing/ambiguous keys are build errors with template spans. [north_star]
|
||||
|
||||
---
|
||||
|
||||
|
||||
Reference in New Issue
Block a user