flowEditor.svelte#

Classes#

FlowEditorSession#

Defined in: arranger/src/flowEditor.svelte.ts:82

The flow editor of one canvas. Its state is the edited row, whether a recompute runs, and the findings known.

Constructors#

Constructor#

new FlowEditorSession(host): FlowEditorSession

Defined in: arranger/src/flowEditor.svelte.ts:89

Parameters#
host#

FlowEditorHost

Returns#

FlowEditorSession

Accessors#

recomputing#
Get Signature#

get recomputing(): boolean

Defined in: arranger/src/flowEditor.svelte.ts:100

Whether the computed FlowMaps are being recomputed.

Returns#

boolean

Methods#

add()#

add(target): void

Defined in: arranger/src/flowEditor.svelte.ts:133

Add +: the open flow editor target gets a new, empty FlowMap row; one edited row at a time.

Parameters#
target#

FlowTarget

Returns#

void

askFindings()#

askFindings(target): Promise<void>

Defined in: arranger/src/flowEditor.svelte.ts:120

Ask the server what playing the flow control of the target’s root finds per convention, in the manifest as stored now: when the flow editor opens and after Recompute. Its answer replaces the one kept; a failure keeps none. Nothing without a server.

Parameters#
target#

FlowTarget

Returns#

Promise<void>

cancel()#

cancel(target): void

Defined in: arranger/src/flowEditor.svelte.ts:164

The edited row’s Cancel: every step taken since Add + or since the row became the edited one is undone (its entries, and the Regions and virtual timelines written for them), and the new row goes.

Parameters#
target#

FlowTarget

Returns#

void

done()#

done(target): void

Defined in: arranger/src/flowEditor.svelte.ts:155

The edited row’s Done: the FlowMap stays as written; the row becomes one of the others.

Parameters#
target#

FlowTarget

Returns#

void

draftOf()#

draftOf(target): Draft | null

Defined in: arranger/src/flowEditor.svelte.ts:94

The edited row of the open flow editor target; null where it has none.

Parameters#
target#

FlowTarget | null

Returns#

Draft | null

edit()#

edit(target, flowMap): boolean

Defined in: arranger/src/flowEditor.svelte.ts:144

Edit the hand-made FlowMap flowMap of the target’s root in its own row, as the new row is edited, with its own Done and Cancel: one row at a time, and never a computed FlowMap, which is read only. Whether it is now the edited row.

Parameters#
target#

FlowTarget

flowMap#

string

Returns#

boolean

entriesOf()#

entriesOf(draft): readonly (string | { })[]

Defined in: arranger/src/flowEditor.svelte.ts:182

The edited FlowMap’s entries as stored: none before a new one’s first is written.

Parameters#
draft#

Draft

Returns#

readonly (string | { })[]

findingsOf()#

findingsOf(target): FlowFindings

Defined in: arranger/src/flowEditor.svelte.ts:110

What playing the flow control of the target’s root found per convention, as the server last answered (askFindings); none without a server, before it answers, or where it failed. Reads the answers kept; never asks.

Parameters#
target#

FlowTarget

Returns#

FlowFindings

gap()#

gap(target, text): string | null

Defined in: arranger/src/flowEditor.svelte.ts:261

“+ Gap”: a gap of the length typed as text (exact, in the root’s number type) at the edited FlowMap’s end; the message saying why where the text is no such length, else null.

Parameters#
target#

FlowTarget

text#

string

Returns#

string | null

land()#

land(target, dragged, index?): boolean

Defined in: arranger/src/flowEditor.svelte.ts:208

Land dragged in the edited FlowMap of target before entry index (at its end without one): what it needs written first is written (a Region over the whole root or swept, a row’s virtual timeline), then the entries are stored. A swept stretch opens the new row where none is open. Whether it landed.

Parameters#
target#

FlowTarget

dragged#

Dragged

index?#

number

Returns#

boolean

move()#

move(target, from, to, duplicate): boolean

Defined in: arranger/src/flowEditor.svelte.ts:239

Move the edited FlowMap’s entry from to land before to, or copy it there (duplicate).

Parameters#
target#

FlowTarget

from#

number

to#

number

duplicate#

boolean

Returns#

boolean

place()#

place(target, flowMap, x, y): boolean

Defined in: arranger/src/flowEditor.svelte.ts:299

Place the row of the FlowMap flowMap as a card of its own: its virtual timeline written where none gives its axis, then its card placed at (x, y) of the block’s places, held by the block. Whether it was placed.

Parameters#
target#

FlowTarget

flowMap#

string

x#

number

y#

number

Returns#

boolean

recompute()#

recompute(target): Promise<void>

Defined in: arranger/src/flowEditor.svelte.ts:319

Recompute: the server writes the flows of the root into the manifest, and what changed is stored (recomputeCommands), command by command, stopping at the first refusal; a notice where nothing changed, the server’s message where it fails. Then the findings are asked again (askFindings).

Parameters#
target#

FlowTarget

Returns#

Promise<void>

regap()#

regap(target, index, text): string | null

Defined in: arranger/src/flowEditor.svelte.ts:276

A gap’s length changed: the edited FlowMap’s entry index, a gap, given the length typed as text (exact, in the root’s number type), in one set of its chunks; the message saying why where the entry is no gap or the text no such length, else null.

Parameters#
target#

FlowTarget

index#

number

text#

string

Returns#

string | null

remove()#

remove(target, index): boolean

Defined in: arranger/src/flowEditor.svelte.ts:250

Remove the edited FlowMap’s entry index.

Parameters#
target#

FlowTarget

index#

number

Returns#

boolean

Interfaces#

Draft#

Defined in: arranger/src/flowEditor.svelte.ts:68

The edited row of an open flow editor: its FlowMap (a new one’s once its first entry has been written, null before; a hand-made one’s from the start), and how many entries the editor’s session held when Add + made it or the hand-made row became the edited one, which its Cancel undoes down to.

Extends#

Properties#

block#

readonly block: string

Defined in: arranger/src/flowEditor.svelte.ts:57

Inherited from#

FlowTarget.block

flowMap#

readonly flowMap: string | null

Defined in: arranger/src/flowEditor.svelte.ts:69

mark#

readonly mark: number

Defined in: arranger/src/flowEditor.svelte.ts:70

root#

readonly root: string

Defined in: arranger/src/flowEditor.svelte.ts:58

Inherited from#

FlowTarget.root

session#

readonly session: string

Defined in: arranger/src/flowEditor.svelte.ts:56

Inherited from#

FlowTarget.session


FlowEditorHost#

Defined in: arranger/src/flowEditor.svelte.ts:42

What the flow editor reads from the canvas and does through it.

Methods#

dispatch()#

dispatch(command): boolean

Defined in: arranger/src/flowEditor.svelte.ts:45

Runs a command; reports a refusal and answers false.

Parameters#
command#

Command

Returns#

boolean

drawing()#

drawing(block): Drawing | undefined

Defined in: arranger/src/flowEditor.svelte.ts:49

The drawing of block block as the canvas shows it; undefined where it shows none.

Parameters#
block#

string

Returns#

Drawing | undefined

refuse()#

refuse(message): void

Defined in: arranger/src/flowEditor.svelte.ts:47

Reports a refusal or a notice to the canvas’s host.

Parameters#
message#

string

Returns#

void

server()#

server(): FlowServer | undefined

Defined in: arranger/src/flowEditor.svelte.ts:51

The server’s flow routes; undefined without a server.

Returns#

FlowServer | undefined

store()#

store(): Store

Defined in: arranger/src/flowEditor.svelte.ts:43

Returns#

Store


FlowServer#

Defined in: arranger/src/flowEditor.svelte.ts:36

The flow routes of a server, as the flow editor asks them: the manifest with the flows of a root written (POST /api/flows/flow-maps), and what playing its flow control finds per convention (POST /api/flows).

Methods#

findings()#

findings(manifest, timeline): Promise<FlowFindings>

Defined in: arranger/src/flowEditor.svelte.ts:38

Parameters#
manifest#

Manifest

timeline#

string

Returns#

Promise<FlowFindings>

withFlowMaps()#

withFlowMaps(manifest, timeline): Promise<Manifest>

Defined in: arranger/src/flowEditor.svelte.ts:37

Parameters#
manifest#

Manifest

timeline#

string

Returns#

Promise<Manifest>


FlowTarget#

Defined in: arranger/src/flowEditor.svelte.ts:55

The flow editor open: its session, block and root.

Extended by#

Properties#

block#

readonly block: string

Defined in: arranger/src/flowEditor.svelte.ts:57

root#

readonly root: string

Defined in: arranger/src/flowEditor.svelte.ts:58

session#

readonly session: string

Defined in: arranger/src/flowEditor.svelte.ts:56