MarkNode
Defined in: core/src/features/tokens/tree/types.ts:101
Properties
Section titled “Properties”children
Section titled “children”readonly children: Signal<readonly TreeNode[]>;Defined in: core/src/features/tokens/tree/types.ts:109
descriptor
Section titled “descriptor”readonly descriptor: MarkupDescriptor;Defined in: core/src/features/tokens/tree/types.ts:104
readonly id: number;Defined in: core/src/features/tokens/tree/types.ts:103
readonly kind: "mark";Defined in: core/src/features/tokens/tree/types.ts:102
markup
Section titled “markup”readonly markup: Markup;Defined in: core/src/features/tokens/tree/types.ts:106
The public view of the descriptor, which is not a public type.
readonly meta: Signal<string | undefined>;Defined in: core/src/features/tokens/tree/types.ts:108
position
Section titled “position”position: object;Defined in: core/src/features/tokens/tree/types.ts:117
end: number;start: number;slotRange
Section titled “slotRange”slotRange: | { end: number; start: number;} | undefined;Defined in: core/src/features/tokens/tree/types.ts:116
Live slot POSITIONS, written by adoption like position; slot() is the public read
of the slot’s TEXT, which is why the two carry different names. Slot text is
deliberately NOT stored: projection, snapshot and adoption equality all derive it from
children, so a stored copy would be an unread mirror nothing resyncs.
readonly value: Signal<string>;Defined in: core/src/features/tokens/tree/types.ts:107
Methods
Section titled “Methods”duplicate()
Section titled “duplicate()”duplicate(): boolean;Defined in: core/src/features/tokens/tree/types.ts:126
Returns
Section titled “Returns”boolean
insertAfter()
Section titled “insertAfter()”insertAfter(text): boolean;Defined in: core/src/features/tokens/tree/types.ts:127
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
text |
string |
Returns
Section titled “Returns”boolean
mergeWith()
Section titled “mergeWith()”mergeWith(next): boolean;Defined in: core/src/features/tokens/tree/types.ts:128
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
next |
TreeNode |
Returns
Section titled “Returns”boolean
moveTo()
Section titled “moveTo()”moveTo(index): boolean;Defined in: core/src/features/tokens/tree/types.ts:129
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
index |
number |
Returns
Section titled “Returns”boolean
range()
Section titled “range()”range(): object;Defined in: core/src/features/tokens/tree/types.ts:121
See TextNode.range.
Returns
Section titled “Returns”object
end: number;start: number;remove()
Section titled “remove()”remove(): boolean;Defined in: core/src/features/tokens/tree/types.ts:125
See NodeCommands.
Returns
Section titled “Returns”boolean
slot()
Section titled “slot()”slot(): string | undefined;Defined in: core/src/features/tokens/tree/types.ts:119
The slot’s TEXT, joined from the live children. undefined for a slotless markup.
Returns
Section titled “Returns”string | undefined
update()
Section titled “update()”update(patch): boolean;Defined in: core/src/features/tokens/tree/types.ts:123
Rides a transaction; false in read-only mode or off the tree.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
patch |
MarkPatch |
Returns
Section titled “Returns”boolean