skin library
Public runtime skin-contract kit barrel (issue #1102).
Generated Flutter apps import the auditor's pure core through
this library — the emitted kit file
(skin/skin_contract_auditor.dart) and the generated --skin
views both resolve TreeFacts, SkinContractRow,
RouteContractTable, the audit bus core, the scheduler, and the
typed anchor protocol from here. Apps already depend on
package:zuraffa for their DI tree, so the runtime contract
needs no new dependency.
Classes
- ContractPlatformRow
-
platformRows[]— one view's adaptive-slot declaration per platform. - ContractRoute
-
routes[]— one declared route: path to view. - ContractState
-
states[]— one view's declared state handling. - ContractStateRow
-
stateRows[]— one audit-row declaration for the runtime kit. - RouteContractTable
- SkinAuditController
- SkinAuditScheduler
- SkinContract
- The v1 skin contract: a spec's declared skin surface.
- SkinContractDeclaration
-
A parsed
## Skin Contract: <name>declaration: the heading name plus the parsed body. The name is declaration metadata — it never enters the JSON schema. - SkinContractFieldSpec
- One field of a contract class, shared by the parser and the schema generator.
- SkinContractRow
- SkinContractRuntimeBinding
- The runtime binding the Flutter shell mounts whole.
- SkinViolation
- One live contract breach: the row that failed, why it exists, and (for route breaches) the route that was pushed.
- StateBinding
-
One view's declared state handling, from
contract.states. - TapDisabled
-
The anchor is in the tree but refuses taps right now
(
onPressed == nullorcontractEnabled == false) — discoverable and honest about the refusal. - TapError
- The drive itself failed (connection, walk, or the handler threw).
- TapFound
-
The anchor was found in the live tree and its REAL
onPressedwas invoked (the genuine engine flow starts). - TapNotFound
-
No element carries the
zfa:<id>key — an unknown anchor never silently no-ops. - TapResult
-
The sealed verdict of a
debugTapAnchordrive. - TreeFacts
- An immutable snapshot of what the live tree renders.
- ZfaAnchorRegistry
-
The anchor → tap-handler registry backing
debugTapAnchor. - ZfaAnchors
-
The
zfa:anchor key vocabulary — the mapping between a component's contract id and theValueKeyit carries in the live tree.
Enums
- SkinContractFieldType
- The kind of value a contract field carries.
- SkinTargetPlatform
-
The platform vocabulary of the adaptive skin contract — the labels
the SKIN lane's
adaptive_slotsdeclare (issue #1000). - SkinViolationKind
- Which half of the runtime contract was breached.
- StateErrorKind
- How a view's error state surfaces (v1 vocabulary: none | toaster | inline).
Functions
-
parseSkinContract(
Map< String, dynamic> json) → SkinContract - Parses decoded contract JSON into a SkinContract.
-
parseSkinContractDeclaration(
String markdown) → SkinContractDeclaration -
Parses a full
## Skin Contract: <name>declaration from a spec markdown: the heading supplies the contract NAME (declaration metadata, never schema data) and the fenced JSON body the contract. -
parseSkinContractJson(
String source) → SkinContract - Parses contract JSON text into a SkinContract.
-
skinContractDefName(
String section) → String -
skinContractSchema(
) → Map< String, dynamic> - Builds the JSON Schema (draft 2020-12) for skin-contract.v1.
Typedefs
- SkinContractCheck = bool Function(TreeFacts facts)
- The check signature: pure function of the audited facts.
Exceptions / Errors
- SkinContractParseException
- A parse failure naming the offending section and key.