MarkController
Defined in: core/src/features/tokens/MarkController.ts:26
Id-backed mark command surface. The controller holds a stable token id (not a
frozen {address, snapshot} capture and not an eager handle) plus the
render-tree token it was built from, used ONLY as a read fallback.
Reads (value/meta/slot) prefer the LIVE handle: store.tokens.handle(id)
is re-resolved on every access, so they track text-path commits (and the
controller’s own updates after re-bind) without re-capture. That id lookup is
latch-gated — it serves undefined while a structural apply awaits its bind
(the routine pending window hit on EVERY render before the freshly-painted DOM
binds). In that window a read falls back to the construction-time token, which
the adapter just handed in fresh for this very render: the rendered mark shows
its value immediately instead of flashing empty until a re-render that the
adapter never schedules.
Writes (update/remove) stay strictly latch-gated: they resolve the LIVE
handle only and never act on the captured token (whose position can be a
generation stale). Against a pending (mid-window) or dead handle, or in
read-only mode, they are a fail-closed no-op returning false.
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new MarkController( store, id, captured): MarkController;Defined in: core/src/features/tokens/MarkController.ts:27
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
store |
Store |
id |
number |
captured |
MarkToken |
Returns
Section titled “Returns”MarkController
Accessors
Section titled “Accessors”Get Signature
Section titled “Get Signature”get meta(): string | undefined;Defined in: core/src/features/tokens/MarkController.ts:61
Returns
Section titled “Returns”string | undefined
readOnly
Section titled “readOnly”Get Signature
Section titled “Get Signature”get readOnly(): boolean;Defined in: core/src/features/tokens/MarkController.ts:69
Returns
Section titled “Returns”boolean
Get Signature
Section titled “Get Signature”get slot(): string | undefined;Defined in: core/src/features/tokens/MarkController.ts:65
Returns
Section titled “Returns”string | undefined
Get Signature
Section titled “Get Signature”get value(): string;Defined in: core/src/features/tokens/MarkController.ts:57
Returns
Section titled “Returns”string
Methods
Section titled “Methods”remove()
Section titled “remove()”remove(): boolean;Defined in: core/src/features/tokens/MarkController.ts:73
Returns
Section titled “Returns”boolean
update()
Section titled “update()”update(patch): boolean;Defined in: core/src/features/tokens/MarkController.ts:80
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
patch |
MarkPatch |
Returns
Section titled “Returns”boolean
fromToken()
Section titled “fromToken()”static fromToken(store, token): MarkController;Defined in: core/src/features/tokens/MarkController.ts:33
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
store |
Store |
token |
MarkToken |
Returns
Section titled “Returns”MarkController