flowEditor#
Interfaces#
FlowChip#
Defined in: arranger/src/flowEditor.ts:56
A chip on a row’s head: its kind, its text and the sentence it stands for.
Properties#
kind#
readonlykind:ChipKind
Defined in: arranger/src/flowEditor.ts:57
text#
readonlytext:string
Defined in: arranger/src/flowEditor.ts:58
title#
readonlytitle:string
Defined in: arranger/src/flowEditor.ts:59
FlowRow#
Defined in: arranger/src/flowEditor.ts:72
One row of the pane: a FlowMap of the edited root.
Properties#
chips#
readonlychips: readonlyFlowChip[]
Defined in: arranger/src/flowEditor.ts:79
computed#
readonlycomputed:boolean
Defined in: arranger/src/flowEditor.ts:78
Computed from flow control (a convention and an inferred provenance): read only, recomputed on request.
entries#
readonlyentries: readonly (string| { })[]
Defined in: arranger/src/flowEditor.ts:86
id#
readonlyid:string
Defined in: arranger/src/flowEditor.ts:74
The FlowMap’s ID.
name#
readonlyname:string
Defined in: arranger/src/flowEditor.ts:76
Its name; else its convention; else its ID.
virtual#
readonlyvirtual:string|null
Defined in: arranger/src/flowEditor.ts:85
The virtual timeline giving its axis to the root, the first in the
manifest’s order that applies it to the root without through; null
where none does.
Type Aliases#
ChipKind#
ChipKind =
"convention"|"canonical"|"provenance"|"findings"
Defined in: arranger/src/flowEditor.ts:53
What a chip on a row’s head says: its convention, that it is canonical, how it was made, its findings.
Dragged#
Defined in: arranger/src/flowEditor.ts:243
What is dragged into the new FlowMap: an entry of a row (it lands as itself, its source), a Region or child timeline of the root’s tree from the card, the card’s own line (the whole root), a whole row (the virtual timeline its FlowMap gives), or a stretch swept on a line of the card (a new Region of that line’s timeline).
FlowEntry#
FlowEntry =
FlowMap["chunks"][number]
Defined in: arranger/src/flowEditor.ts:50
One entry of a FlowMap’s chunks: the ID of a Region, a child or a virtual timeline, or a gap.
FlowFindings#
FlowFindings =
ReadonlyMap<string, readonlystring[]>
Defined in: arranger/src/flowEditor.ts:66
What playing flow control found for each convention, by convention: the
server’s sentences (POST /api/flows). Without a server none is known.
Variables#
NO_FINDINGS#
constNO_FINDINGS:FlowFindings
Defined in: arranger/src/flowEditor.ts:69
No findings known.
Functions#
addedId()#
addedId(
before,after):string|null
Defined in: arranger/src/flowEditor.ts:354
The one ID after lists that before does not: the element a command
added, read through its result; null where there is not exactly one.
Parameters#
before#
readonly object[]
after#
readonly object[]
Returns#
string | null
blockOfView()#
blockOfView(
view,block):Block
Defined in: arranger/src/flowEditor.ts:566
The view’s block block; throws where the view holds none.
Parameters#
view#
block#
string
Returns#
cardPress()#
cardPress(
manifest,root,source,sweep):Dragged| {kind:"line";timeline:string; } |null
Defined in: arranger/src/flowEditor.ts:595
What a press on the drawn element source of the edited card carries
into the new FlowMap, root the edited root: a Region of its tree (its
brace or its label) that Region; a child’s line that child; the root’s
own line the whole root; with sweep (Shift) the root’s or a child’s
line a stretch swept on it, read by sweptValue as the pointer moves
({kind: "line"}); null for anything else, which the canvas keeps.
Parameters#
manifest#
root#
string
source#
DescriptorSource | null
sweep#
boolean
Returns#
Dragged | { kind: "line"; timeline: string; } | null
draftCommand()#
draftCommand(
block,root,flowMap,entries):Command
Defined in: arranger/src/flowEditor.ts:437
The command that stores the new FlowMap’s entries: its add into the
root, for a FlowMap not yet written (flowMap null), its ID given by the
store; a set of its chunks once it is.
Parameters#
block#
string
root#
string
flowMap#
string | null
entries#
readonly (string | { })[]
Returns#
entryText()#
entryText(
manifest,entry):string
Defined in: arranger/src/flowEditor.ts:225
The text naming an entry: a Region’s name, else its ID; a timeline’s or
a virtual timeline’s name, else its ID; a gap gap <length>.
Parameters#
manifest#
entry#
string | { }
Returns#
string
exactValue()#
exactValue(
value,numberType):Rational
Defined in: arranger/src/flowEditor.ts:264
The exact value of value, a value of an axis of number type
numberType as a manifest writes it there, in any of its spellings
([2, 4] and [1, 2] alike): compared by value, never by spelling.
Parameters#
value#
JsonNumber | readonly [JsonNumber, JsonNumber]
numberType#
NumberType
Returns#
flowMapsOf()#
flowMapsOf(
manifest,root): readonlyobject[]
Defined in: arranger/src/flowEditor.ts:90
The FlowMaps of manifest whose timeline is root, in the manifest’s order.
Parameters#
manifest#
root#
string
Returns#
readonly object[]
flowRows()#
flowRows(
manifest,root,findings?): readonlyFlowRow[]
Defined in: arranger/src/flowEditor.ts:161
The rows of the pane of the flow editor of root: one per FlowMap of
root, the computed ones first, each part by name (by code point), then
by ID. While the editor is open, its pane keeps the order it first
showed (keptOrder).
Parameters#
manifest#
root#
string
findings?#
FlowFindings = NO_FINDINGS
Returns#
readonly FlowRow[]
gapText()#
gapText(
entry):string
Defined in: arranger/src/flowEditor.ts:212
A gap entry’s length as text, as typedValue reads it back; empty for any other entry.
Parameters#
entry#
string | { }
Returns#
string
gapValue()#
gapValue(
text,root):string|JsonNumber| readonly [JsonNumber,JsonNumber]
Defined in: arranger/src/flowEditor.ts:474
The gap length typed as text on the axis of root, exact, as the
manifest writes it there (typedValue); a message where none fits or
the length is not positive.
Parameters#
text#
string
root#
{ }
Returns#
string | JsonNumber | readonly [JsonNumber, JsonNumber]
inserted()#
inserted(
entries,index,entry): readonly (string| { })[]
Defined in: arranger/src/flowEditor.ts:400
entries with entry inserted before index index (at the end beyond it).
Parameters#
entries#
readonly (string | { })[]
index#
number
entry#
string | { }
Returns#
readonly (string | { })[]
keptOrder()#
keptOrder(
shown,ids): readonlystring[]
Defined in: arranger/src/flowEditor.ts:190
The IDs ids in the order a pane keeps while its editor is open:
those of shown, the order shown before, in that order, then the ones
shown lacks in the order of ids; an ID ids lacks is dropped. So a
row created or renamed while the editor is open keeps its place.
Parameters#
shown#
readonly string[]
ids#
readonly string[]
Returns#
readonly string[]
landedEntry()#
landedEntry(
before,after,root,dragged):string| { } |null
Defined in: arranger/src/flowEditor.ts:375
The entry dragged lands as, read in after, the manifest once
writeFor’s command (if any) has been stored on before: an entry as
itself, a Region or child by its ID, the root as the Region spanning it,
a swept stretch as the Region written for it, a row as the virtual
timeline giving its axis. null where nothing was written for it.
Parameters#
before#
after#
root#
string
dragged#
Returns#
string | { } | null
moved()#
moved(
entries,from,to,duplicate): readonly (string| { })[]
Defined in: arranger/src/flowEditor.ts:414
entries with the entry at from moved to land before index to
(counted in entries as they are, so to = from or from + 1 leaves
them as they are), or copied there where duplicate (Alt).
Parameters#
entries#
readonly (string | { })[]
from#
number
to#
number
duplicate#
boolean
Returns#
readonly (string | { })[]
placeVirtualCommand()#
placeVirtualCommand(
block,drawing,virtual,x,y):Command
Defined in: arranger/src/flowEditor.ts:459
The set placing the card of the virtual timeline virtual of block
at (x, y), place coordinates of the block, drawn as drawing: its
place alone (placeCommand). The flow editor changes no other item’s
place; the card is drawn after the ungrouped roots, so none of them
moves.
Parameters#
block#
drawing#
virtual#
string
x#
number
y#
number
Returns#
proposedGap()#
proposedGap(
manifest,flowMap):string
Defined in: arranger/src/flowEditor.ts:488
The text “+ Gap” proposes on the row of the FlowMap flowMap: the
length its last chunk plays, exact in its root’s number type, as
typedValue reads it back; empty for a FlowMap not yet written
(null), one without chunks, or one that does not resolve.
Parameters#
manifest#
flowMap#
string | null
Returns#
string
recomputeCommands()#
recomputeCommands(
manifest,block,root,answer): readonlyCommand[]
Defined in: arranger/src/flowEditor.ts:516
The commands writing the flows the server computed for root (the
manifest answer of POST /api/flows/flow-maps) into manifest, block
block’s: each atomic section of answer’s root that manifest lacks
(by ID) added as a Region; for each computed FlowMap of answer’s root,
nothing where manifest holds a computed FlowMap of that convention with
the same chunks, else that one given answer’s chunks and provenance
(set {computed}, which writes the length of every virtual timeline
playing it), and where it holds none, answer’s added with its own ID,
name, convention, canonical and provenance.
Parameters#
manifest#
block#
string
root#
string
answer#
Returns#
readonly Command[]
removedAt()#
removedAt(
entries,index): readonly (string| { })[]
Defined in: arranger/src/flowEditor.ts:428
entries without the entry at index.
Parameters#
entries#
readonly (string | { })[]
index#
number
Returns#
readonly (string | { })[]
rowName()#
rowName(
flowMap):string
Defined in: arranger/src/flowEditor.ts:140
The name a FlowMap’s row shows: its name, else its convention, else its ID.
Parameters#
flowMap#
{ }
Returns#
string
sameEntries()#
sameEntries(
left,right,numberType):boolean
Defined in: arranger/src/flowEditor.ts:273
Whether two lists of FlowMap entries are the same: the same IDs and gaps
of the same length by value, in the same order, on an axis of number type
numberType.
Parameters#
left#
readonly (string | { })[]
right#
readonly (string | { })[]
numberType#
NumberType
Returns#
boolean
sweptValue()#
sweptValue(
block,drawing,card,timeline,x,pixel,granularity):JsonNumber| readonly [JsonNumber,JsonNumber] |null
Defined in: arranger/src/flowEditor.ts:624
The value of timeline’s own axis at the abscissa x of the card card
of block, drawn as drawing, exact in the timeline’s number type: the
simplest value within half a screen pixel (pixel, block units per
screen pixel) at granularity (core’s snapOnRow), as the manifest
writes it; null off the axis or inside a gap.
Parameters#
block#
drawing#
card#
timeline#
string
x#
number
pixel#
number
granularity#
Returns#
JsonNumber | readonly [JsonNumber, JsonNumber] | null
timelineIn()#
timelineIn(
manifest,id): { } |undefined
Defined in: arranger/src/flowEditor.ts:501
The timeline id of manifest at any depth; undefined where none is.
Parameters#
manifest#
id#
string
Returns#
{ } | undefined
virtualOf()#
virtualOf(
manifest,root,flowMap):string|null
Defined in: arranger/src/flowEditor.ts:99
The virtual timeline of manifest that gives the FlowMap flowMap its
axis on its root root: the first applying it to root without
through; null where none does.
Parameters#
manifest#
root#
string
flowMap#
string
Returns#
string | null
writeFor()#
writeFor(
block,root,dragged):Command|null
Defined in: arranger/src/flowEditor.ts:314
What a drop of dragged writes before it lands, in block block’s
manifest, root the edited root: a Region over the whole root for the
root’s line (none where one spans it already: it lands as that one), the
swept Region, the virtual timeline of a row (none where one gives its
axis); null where it lands as it is. A root of unknown length has no
Region over it, and nothing lands.
Parameters#
block#
root#
string
dragged#
Returns#
Command | null