inspector/textPlace#
Interfaces#
Lines#
Defined in: editor/src/inspector/textPlace.ts:16
The lines of a text holding a place, 1-based, last included.
Properties#
first#
readonlyfirst:number
Defined in: editor/src/inspector/textPlace.ts:17
last#
readonlylast:number
Defined in: editor/src/inspector/textPlace.ts:18
Type Aliases#
Span#
Span = readonly [
number,number]
Defined in: editor/src/inspector/textPlace.ts:22
A place in a text: the offset of its first character and the offset after its last.
Functions#
jsonSpan()#
jsonSpan(
text,path):Span|null
Defined in: editor/src/inspector/textPlace.ts:90
The place of path in the JSON text text: a member from its key to
the end of its value, an item its value; null where the text holds no
such place or is no JSON the scan can follow.
Parameters#
text#
string
path#
readonly PathSegment[]
Returns#
Span | null
linesOf()#
linesOf(
text,__namedParameters):Lines
Defined in: editor/src/inspector/textPlace.ts:67
The lines span covers in text, white space at its end left out.
Parameters#
text#
string
__namedParameters#
Returns#
scrollTopFor()#
scrollTopFor(
first,row):number
Defined in: editor/src/inspector/textPlace.ts:79
How far to scroll a text whose rows are row tall so that the line
first shows with one line above it: the top of the line before it,
never above the text’s top.
Parameters#
first#
number
row#
number
Returns#
number
selectionPaths()#
selectionPaths(
subjects):PathSegment[][]
Defined in: editor/src/inspector/textPlace.ts:32
The places of the selection in its block’s manifest file, in selection
order, each once: each subject’s (resolvedPath). A jump selected with
what one of its destinations leads to, as choosing that destination in
the Properties tab selects them, is placed at that destination in the
jump’s targets (every destination leading there), followed by the
places of the elements it leads to.
Parameters#
subjects#
readonly Subject[]
Returns#
PathSegment[][]
tomlLines()#
tomlLines(
text,path):Lines|null
Defined in: editor/src/inspector/textPlace.ts:313
The lines of path in the TOML text text: every stretch within it
(a table with its subtables, an element of an array of tables, a key),
from the first’s first line to the last’s last, trailing blank lines
left out; where the place lies inside a value, the lines of that key.
null where the text holds no such place.
Parameters#
text#
string
path#
readonly PathSegment[]
Returns#
Lines | null