Skip to main content

Module read_only

Module read_only 

Source
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 node a writing control of a read-only surface?
read_only_tree
node with 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.