DepartureDatePicker instead of group.
name and selector are required. See Schema reference for the full field list, including description, source, memory, and properties.
Selectors
selector accepts a single CSS selector string or an array of strings:
The data-component convention
The recommended pattern is to render a data-component="<Name>" attribute on the root element of each named component, then select on that attribute:
data-component is the recommended convention.
Children are scoped
Selectors insidechildren are evaluated within their parent’s matched subtree instead of against the whole document. Two card components can therefore each contain a child selected by button.primary without colliding.
Scoping inside views vs at file level
Components at the file root are global and match on every view. Components nested inside a view apply only to that view. Both forms are additive, except that a view-scoped$ref subsumes a global component with the same name. See Views for the full rule.
Referencing shared components
When a component such as a site header, persistent footer, or chat widget appears across views, acomponents: array can contain a reference object instead of another inline definition:
$ref entries in its children: expand recursively. Names resolve against a registry built from the root-level components: arrays of all loaded files; nested children and view-scoped definitions are not addressable. For duplicate registry names, the first definition in source-file path order wins. Implementations SHOULD emit a merge-collision-component warning.
.sightmap/components.yaml
.sightmap/views/plp.yaml
$ref for reuse and attestation:
- Reuse. Update the header’s selector or memory entries in one definition; every referencing view receives the change.
- Attestation. A view’s
components:lists what it expects to contain. Drift-detection tools can report an attested component that matches zero elements separately from a component the view never referenced.
- A
$refentry MUST contain exactly one key ($ref); overrides are not allowed in v1. - A
$refto a name that isn’t in the registry is aref-unresolvederror. - A self-referential chain (
A→B→A) is aref-circularerror. - When a view-scoped
$refand a file-root global share a name, the view-scoped expansion subsumes the global for that view — implementations MUST NOT produce two matches.
Properties
A component can declareproperties: — named values pulled from its matched element and shown alongside the name in enriched snapshots, so an agent sees not just what matched but what state it is in:
name (the annotation key), an extract directive (text, inner_text, text_only, inner_html, attr=NAME, exists:SEL, or a CSS sub-selector), and an optional transform (first_word, last_word, first_number, first_dollar, number, slug). Extraction runs on the exact matched element, from the live DOM at snapshot time — offline tools omit the values. A value that comes back empty (or an exists:/sub-selector that finds nothing) is dropped silently. See the schema reference and SEP-0003.
Dependencies
A component can list supplementary files whose changes should prompt re-curation, such as style modules, hooks, or shared utilities:dependencies is curation-time metadata. Each string is a project-root-anchored minimatch glob; prefix it with ! to negate it. Runtime consumers MUST NOT add page-load cost based on this field. See the schema reference for usage rules.