Expand description
VAPP-200 (spec apps.md §9.2): a READ-ONLY surface (src/read-only.ts).
A host whose viewer may read but not write (an app at app access
read) sets crate::surface::SurfaceSettings::read_only; the build
then gives every WRITING control disabled: true, as if its author had
written it (the components’ own disabled look, nothing new). Pure;
fixtures/read-only.json locks it.
A writing control: a node with an on.<event> action calling a write
(records.*, actions.*; a Form whose submit writes disables its
fields and buttons through the Form’s cascade), or a form field with no
action of its own. A node whose own actions are all pure or host calls
(a bind, a set) is a view control and stays live.
Constants§
- READ_
ONLY_ FIELDS - The components that edit a value (
crate::layout_tree::FORM_FIELDS). - READ_
ONLY_ WRITE_ PREFIXES - The call prefixes that write at app access
read.
Functions§
- action_
writes - Does this action (
{functionCall: {call}}) call a write? - call_
writes - Does this function name write (
records.*,actions.*)? - disabled_
ids - The ids a read-only surface disables, pre-order (slots before children): the conformance check.
- disables
- Is
nodea writing control of a read-only surface? - read_
only_ tree nodewith every writing control disabled (props.disabled: true), at any depth (slots and children). A host runs it over the root AND each lifted template; the surface does the same per node while it builds.