workspace/address#

Interfaces#

Address#

Defined in: workspace/address.ts:49

The workspace-wide address of the workspace ({}), a block ({block}), or an element or part of a block’s manifest ({block, id?, facet?, part?}).

Extends#

Properties#

block?#

readonly optional block?: string

Defined in: workspace/address.ts:50

facet?#

readonly optional facet?: Facet

Defined in: manifest/address.ts:79

Inherited from#

ElementAddress.facet

id?#

readonly optional id?: string

Defined in: manifest/address.ts:78

Inherited from#

ElementAddress.id

part?#

readonly optional part?: readonly PartItem[]

Defined in: manifest/address.ts:80

Inherited from#

ElementAddress.part


AnchorFound#

Defined in: workspace/address.ts:316

An alignment anchor of a named MatchStamp, found with the MatchStamp holding it.

Extends#

Extended by#

Properties#

anchor#

readonly anchor: object

Defined in: workspace/address.ts:319

index#

readonly index: number

Defined in: workspace/address.ts:260

Its index in the manifest’s graphical.matchstamps.

Inherited from#

MatchStampFound.index

matchstamp#

readonly matchstamp: object

Defined in: workspace/address.ts:261

Inherited from#

MatchStampFound.matchstamp

position#

readonly position: number

Defined in: workspace/address.ts:318

Its index in the MatchStamp’s alignment_anchors.


ChunkFound#

Defined in: workspace/address.ts:300

An entry of the FlowMap drawn on the line of a virtual timeline or of a timeline whose card is switched (docs/drawing.md section 8.10), in its regions band: the brace of a chunk, or a gap, which draws no brace and is reached by its label; addressed {id, facet: "regions", part: [k]} by the ID of that line, its label [k, "label"] and its boundary [k, "start"] its parts.

Properties#

chunk#

readonly chunk: number

Defined in: workspace/address.ts:302

The entry’s index in the FlowMap’s chunks, from 0.

flowMap#

readonly flowMap: FlowMapFound

Defined in: workspace/address.ts:304

The FlowMap drawn, and its index in the manifest’s flow_maps.

line#

readonly line: ChunkLine

Defined in: workspace/address.ts:306

The line it is drawn on: the virtual timeline, or the switched card’s timeline.


ElisionFound#

Defined in: workspace/address.ts:249

A stored elision, found in a manifest’s graphical.elisions with the timeline it lies on.

Extended by#

Properties#

at#

readonly at: Located

Defined in: workspace/address.ts:251

The timeline it lies on, a virtual timeline located as its axis (locateVirtual).

elision#

readonly elision: object

Defined in: workspace/address.ts:254

index#

readonly index: number

Defined in: workspace/address.ts:253

Its index in the manifest’s graphical.elisions.


FlowMapFound#

Defined in: workspace/address.ts:265

A FlowMap, found in a manifest’s flow_maps.

Extended by#

Properties#

flowMap#

readonly flowMap: object

Defined in: workspace/address.ts:268

index#

readonly index: number

Defined in: workspace/address.ts:267

Its index in the manifest’s flow_maps.


ManifestIndex#

Defined in: workspace/address.ts:986

What a manifest’s readers need once per manifest, memoised by identity.

Properties#

ancestry#

readonly ancestry: ReadonlyMap<string, readonly string[]>

Defined in: workspace/address.ts:992

Every timeline’s ID mapped to the IDs from its root down to itself; a virtual timeline’s to itself alone.

containers#

readonly containers: Containers

Defined in: workspace/address.ts:987

drawn#

readonly drawn: ReadonlySet<string>

Defined in: workspace/address.ts:1001

The addressKey of every element’s address in elements, once each.

elements#

readonly elements: readonly ElementKey[]

Defined in: workspace/address.ts:999

Every element of the manifest’s drawing (manifestElements).

owners#

readonly owners: ReadonlyMap<string, string>

Defined in: workspace/address.ts:997

Every timeline’s, virtual timeline’s, entry’s, named timestamp’s and stored elision’s ID, mapped to the timeline it belongs to.


MatchStampFound#

Defined in: workspace/address.ts:258

A named MatchStamp, found in a manifest’s graphical.matchstamps.

Extended by#

Properties#

index#

readonly index: number

Defined in: workspace/address.ts:260

Its index in the manifest’s graphical.matchstamps.

matchstamp#

readonly matchstamp: object

Defined in: workspace/address.ts:261


VirtualBandFound#

Defined in: workspace/address.ts:287

A band of a virtual timeline’s cards: its facet and every drawing of it, in drawing order.

Extends#

Properties#

cards#

readonly cards: readonly ContainerRef[]

Defined in: workspace/address.ts:283

Inherited from#

VirtualFound.cards

containers#

readonly containers: readonly ContainerRef[]

Defined in: workspace/address.ts:289

facet#

readonly facet: Facet

Defined in: workspace/address.ts:288

index#

readonly index: number

Defined in: workspace/address.ts:281

Its index in the manifest’s virtual_timelines.

Inherited from#

VirtualFound.index

virtual#

readonly virtual: object

Defined in: workspace/address.ts:282

Inherited from#

VirtualFound.virtual


VirtualFound#

Defined in: workspace/address.ts:279

A virtual timeline, found in a manifest’s virtual_timelines, with its cards in drawing order: one in the frame of each group that has it as a member, or its one block-held card in no group (containersOf). The address {id: V} names the virtual timeline, {id: V, part: ["card"]} its cards (virtual_card) and {id: V, facet} the drawings of one of its bands, markers or regions (virtual_band).

Extended by#

Properties#

cards#

readonly cards: readonly ContainerRef[]

Defined in: workspace/address.ts:283

index#

readonly index: number

Defined in: workspace/address.ts:281

Its index in the manifest’s virtual_timelines.

virtual#

readonly virtual: object

Defined in: workspace/address.ts:282

Type Aliases#

ChunkLine#

ChunkLine = Extract<ResolvedElement, { kind: "virtual_timeline" | "timeline"; }>

Defined in: workspace/address.ts:310

The line a chunk is drawn on: a virtual timeline, or a timeline whose card is switched.


ResolvedAddress#

ResolvedAddress = { kind: "workspace"; } | { block: Block; kind: "block"; } | { block: Block; kind: "title"; } | { block: Block; container: ContainerRef; group: Group; kind: "frame"; } | { at: Located; block: Block; cards: readonly ContainerRef[]; kind: "timeline"; } | { at: Located; block: Block; cards: readonly ContainerRef[]; kind: "card"; } | { at: Located; block: Block; containers: readonly ContainerRef[]; facet: Facet; kind: "band"; } | { at: Located; block: Block; element: ListedElement; entry: EntryKind; index: number; kind: "entry"; } | { block: Block; index: number; kind: "measure_map"; map: MeasureMap; } | { at: Located; block: Block; index: number; kind: "timestamp"; timestamp: NamedTimestamp; } | object & ElisionFound | object & MatchStampFound | object & AnchorFound | object & FlowMapFound | object & VirtualFound | object & VirtualFound | object & VirtualBandFound | object & ChunkFound | { block: Block; kind: "part"; owner: ResolvedAddress; word: Part; }

Defined in: workspace/address.ts:135

What a valid workspace address resolves to in a view.

Union Members#

Type Literal#

{ kind: "workspace"; }


Type Literal#

{ block: Block; kind: "block"; }


Type Literal#

{ block: Block; kind: "title"; }


Type Literal#

{ block: Block; container: ContainerRef; group: Group; kind: "frame"; }


Type Literal#

{ at: Located; block: Block; cards: readonly ContainerRef[]; kind: "timeline"; }

at#

readonly at: Located

block#

readonly block: Block

cards#

readonly cards: readonly ContainerRef[]

The timeline’s cards in drawing order: one per group that has it as a member, or its one card as an ungrouped root; none for a timeline drawn in no card.

kind#

readonly kind: "timeline"


Type Literal#

{ at: Located; block: Block; cards: readonly ContainerRef[]; kind: "card"; }

at#

readonly at: Located

block#

readonly block: Block

cards#

readonly cards: readonly ContainerRef[]

Every card of the timeline, in drawing order; at least one.

kind#

readonly kind: "card"


Type Literal#

{ at: Located; block: Block; containers: readonly ContainerRef[]; facet: Facet; kind: "band"; }

at#

readonly at: Located

block#

readonly block: Block

containers#

readonly containers: readonly ContainerRef[]

Every drawing of the band, one per card drawing its timeline, in drawing order.

facet#

readonly facet: Facet

kind#

readonly kind: "band"


Type Literal#

{ at: Located; block: Block; element: ListedElement; entry: EntryKind; index: number; kind: "entry"; }

at#

readonly at: Located

The timeline holding the entry.

block#

readonly block: Block

element#

readonly element: ListedElement

entry#

readonly entry: EntryKind

index#

readonly index: number

Its index in its timeline’s list of entries of its kind.

kind#

readonly kind: "entry"


Type Literal#

{ block: Block; index: number; kind: "measure_map"; map: MeasureMap; }

block#

readonly block: Block

index#

readonly index: number

Its index in the manifest’s measure_maps.

kind#

readonly kind: "measure_map"

map#

readonly map: MeasureMap


Type Literal#

{ at: Located; block: Block; index: number; kind: "timestamp"; timestamp: NamedTimestamp; }

at#

readonly at: Located

The timeline the timestamp lies on.

block#

readonly block: Block

index#

readonly index: number

Its index in the manifest’s graphical.timestamps.

kind#

readonly kind: "timestamp"

timestamp#

readonly timestamp: NamedTimestamp


object & ElisionFound


object & MatchStampFound


object & AnchorFound


object & FlowMapFound


object & VirtualFound


object & VirtualFound


object & VirtualBandFound


object & ChunkFound


Type Literal#

{ block: Block; kind: "part"; owner: ResolvedAddress; word: Part; }


ResolvedElement#

ResolvedElement = { kind: "title"; } | { container: ContainerRef; group: Group; kind: "frame"; } | { at: Located; cards: readonly ContainerRef[]; kind: "timeline"; } | { at: Located; cards: readonly ContainerRef[]; kind: "card"; } | { at: Located; containers: readonly ContainerRef[]; facet: Facet; kind: "band"; } | { at: Located; element: ListedElement; entry: EntryKind; index: number; kind: "entry"; } | { index: number; kind: "measure_map"; map: MeasureMap; } | { at: Located; index: number; kind: "timestamp"; timestamp: NamedTimestamp; } | object & ElisionFound | object & MatchStampFound | object & AnchorFound | object & FlowMapFound | object & VirtualFound | object & VirtualFound | object & VirtualBandFound | object & ChunkFound | { kind: "part"; owner: ResolvedElement; word: Part; }

Defined in: workspace/address.ts:213

A resolved element address without the block that holds its manifest.

Variables#

WORKSPACE#

const WORKSPACE: Address = {}

Defined in: workspace/address.ts:54

The address of the workspace itself.

Functions#

addressWords()#

addressWords(view, address): string

Defined in: workspace/address.ts:965

An address as a message names it to a reader: the workspace, a bundle by its manifest’s name or id (bundle 'Mixed', the anonymous bundle), an element by its kind and its name, else its ID (timeline 'Score', region 'region_1'), a band and a card by their timeline (the regions band of timeline 'Score'), a part by its owner, innermost first (the coordinate of timestamp 'Downbeat', a bundle’s or a group’s name its title). An element of a manifest is followed by its bundle (in bundle 'Mixed') unless the view holds that block alone. An address naming nothing is worded from its members: its ID quoted ('gone'), its block by its bundle, or by its ID (block '0000000009') when the view does not hold it. addressKey, not this, is an address’s string form.

Parameters#

view#

View

address#

Address

Returns#

string


bundleWords()#

bundleWords(manifest): string

Defined in: workspace/address.ts:841

A bundle by its manifest’s name, else its id, else as the anonymous bundle. Takes the two members alone, so a manifest not yet held by a block (the one an add carries) is worded the same way.

Parameters#

manifest#
id?#

string | null

name?#

string | null

Returns#

string


elementAddressOf()#

elementAddressOf(address): ElementAddress

Defined in: workspace/address.ts:124

The element address an address holds without its block ({} for the workspace and a block).

Parameters#

address#

Address

Returns#

ElementAddress


entryWord()#

entryWord(kind, element): string

Defined in: workspace/address.ts:827

The word of an element a timeline holds in a list, lowercase: conversion map, region, or a flow-control element’s by its role (jump, jump target, break, section break, barline).

Parameters#

kind#

keyof EntryTypes

element#

ListedElement

Returns#

string


facetWord()#

facetWord(facet): string

Defined in: workspace/address.ts:803

The word of a facet, lowercase: markers, conversion maps, children, regions, flow control.

Parameters#

facet#

Facet

Returns#

string


idPath()#

idPath(manifest, id): readonly PathSegment[] | undefined

Defined in: workspace/address.ts:458

Where an ID of a manifest’s tree of timelines lies in the manifest, its id member: a timeline’s, an entry’s or a held conversion map’s; undefined for any other ID and an ID the manifest lacks.

Parameters#

manifest#

Manifest

id#

string

Returns#

readonly PathSegment[] | undefined


inBlock()#

inBlock(block, element): Address

Defined in: workspace/address.ts:119

The address, in the block block, of the element of its manifest addressed element.

Parameters#

block#

string

element#

ElementAddress

Returns#

Address


indexOf()#

indexOf(manifest): ManifestIndex

Defined in: workspace/address.ts:1010

The index of a manifest, memoised by identity; each member is computed on its first read, so a reader of containment never builds the elements.

Parameters#

manifest#

Manifest

Returns#

ManifestIndex


isElementAddress()#

isElementAddress(address): boolean

Defined in: workspace/address.ts:130

Whether an address names an element or part of a block’s manifest, not a block or the workspace.

Parameters#

address#

Address

Returns#

boolean


isId()#

isId(value): value is string

Defined in: workspace/address.ts:60

Whether value is an ID as the schema allows it: a non-empty string without control characters.

Parameters#

value#

unknown

Returns#

value is string


manifestIds()#

manifestIds(manifest): Set<string>

Defined in: workspace/address.ts:447

Every ID a manifest holds, each unique across the manifest: the IDs of its catalogue (its timelines at any depth, their conversion maps at any depth, regions and flow-control elements, its groups, MeasureMaps, resources, FlowMaps, virtual timelines, named timestamps, elisions, named MatchStamps and their alignment anchors) and the manifest’s own, which is neither drawn nor addressed.

Parameters#

manifest#

Manifest

Returns#

Set<string>


namesNothing()#

namesNothing(view, address): Problem

Defined in: workspace/address.ts:770

unknown_target for an address naming nothing in view: <address words> names nothing (addressWords, worded from its members), at [<address key>].

Parameters#

view#

View

address#

Address

Returns#

Problem


readAddress()#

readAddress(value, path): Problem | Address

Defined in: workspace/address.ts:76

value read as an address, or invalid_address at path: an object of only block, id, facet and part; block a block id; id an ID; facet one of the five facets, standing with an id, and with a part only where the part holds a chunk index; part a non-empty array of part words and chunk indices (integers from 0), as the schema’s Address reads it; and any of id, facet and part only with a block.

Parameters#

value#

unknown

path#

readonly PathSegment[]

Returns#

Problem | Address


resolveAddress()#

resolveAddress(view, address): Problem | ResolvedAddress

Defined in: workspace/address.ts:782

Resolve an address once against its workspace view: the workspace, a block, or an element of a block’s manifest (resolveElement). A malformed address is invalid_address, one naming nothing unknown_target, both at [<address key>]. The manifest’s own ID addresses nothing.

Parameters#

view#

View

address#

Address

Returns#

Problem | ResolvedAddress


resolvedPath()#

resolvedPath(resolved): readonly PathSegment[] | null

Defined in: workspace/address.ts:496

Where a resolved address lies in its block’s manifest, as a path from the manifest’s top (bare IDs; idFormPath leads it into the file form): the manifest’s title its name; a frame its group in groups; a timeline and its cards the timeline; a band the list of its facet in the timeline (children, conversion_maps, regions, flow_control), the markers band, which no list of the timeline holds, the timeline; an entry its place in its timeline’s list; a measure map, a named timestamp, a stored elision and a named MatchStamp their places in measure_maps and in graphical; an alignment anchor its place in its MatchStamp; a part the place of what it belongs to (a derived elision’s, its timeline’s). null for the workspace and a block, which lie in no manifest’s place.

Parameters#

resolved#

ResolvedAddress

Returns#

readonly PathSegment[] | null


resolveElement()#

resolveElement(manifest, element): ResolvedElement | undefined

Defined in: workspace/address.ts:625

Resolve an element address against a manifest: a frame, a measure map, a timeline, a timeline’s cards, a band (of a timeline drawn in a card), an entry, or a part that the manifest’s drawing draws (ManifestIndex.drawn, docs/drawing.md section 2.2): the manifest’s title (of a named manifest), a group’s title, the name of a timeline drawn with one, the wedges of a member drawing’s named timestamps with their labels, a segment’s boundary (of every segment but the first) and label, the label of a region, a break, a section break, a barline or a jump, a named timestamp’s label and cross-section line (line), a stored elision’s ellipsis and labels, and the cards. A named timestamp and a stored elision themselves resolve with the timeline they lie on, drawn or not; a named MatchStamp and an alignment anchor, which belong to no timeline, resolve by their IDs, the anchor with the MatchStamp holding it. A derived elision, which the drawing derives and which has no ID, resolves as the part elision of the timeline T it lies on ({id: T, part: ["elision"]}, its ellipsis ["elision", "ellipsis"], its labels ["elision", "name"] and ["elision", "coordinate"]) wherever T may carry one (defaultElisionTimelines), never as an invented ID. undefined for anything else, the bundle’s address {} included (the workspace resolver reads it as the block).

Parameters#

manifest#

Manifest

element#

ElementAddress

Returns#

ResolvedElement | undefined