manifest/tree#

Interfaces#

Located#

Defined in: manifest/tree.ts:25

A timeline inside a manifest: its value, its path from the manifest’s top, its parent.

Extends#

Properties#

parent#

readonly parent: Located | undefined

Defined in: manifest/tree.ts:26

path#

readonly path: readonly PathSegment[]

Defined in: manifest/tree.ts:16

Inherited from#

RootPath.path

timeline#

readonly timeline: object

Defined in: manifest/tree.ts:15

Inherited from#

RootPath.timeline


RootPath#

Defined in: manifest/tree.ts:14

A root timeline of a manifest and its path from the manifest’s top.

Extended by#

Properties#

path#

readonly path: readonly PathSegment[]

Defined in: manifest/tree.ts:16

timeline#

readonly timeline: object

Defined in: manifest/tree.ts:15

Type Aliases#

Roots#

Roots = Pick<Manifest, "timelines">

Defined in: manifest/tree.ts:11

What the search reads of a manifest: its root timelines.

Functions#

findTimeline()#

findTimeline(manifest, id): { } | undefined

Defined in: manifest/tree.ts:92

The timeline carrying id among a manifest’s roots and their descendants; undefined for an id no timeline carries, such as a group’s, the manifest’s or an element address <root>/<id>.

Parameters#

manifest#

Roots

id#

string

Returns#

{ } | undefined


groupsHolding()#

groupsHolding(manifest, timeline, ancestry?): readonly object[]

Defined in: manifest/tree.ts:132

The groups of manifest having the timeline timeline as a member, in the order of groups: those whose members list it or one of its ancestors, since a member’s descendants are drawn inside the member’s card in the group’s frame; a virtual timeline, which has no ancestors, is in those listing it. An ancestor of a listed member is in none of them; a timeline the manifest does not hold is in none. ancestry is the manifest’s memberAncestry, given where the caller holds it.

Parameters#

manifest#

Manifest

timeline#

string

ancestry?#

ReadonlyMap<string, readonly string[]> = ...

Returns#

readonly object[]


isSegment()#

isSegment(manifest, id): boolean

Defined in: manifest/tree.ts:82

Whether timeline id of manifest is a segment (isSegmentAt); false for an id no timeline carries.

Parameters#

manifest#

Manifest

id#

string

Returns#

boolean


isSegmentAt()#

isSegmentAt(at): boolean

Defined in: manifest/tree.ts:77

Whether the timeline at at is a segment: a child of a segment line.

Parameters#

at#

Located

Returns#

boolean


locateTimeline()#

locateTimeline(manifest, id): Located | undefined

Defined in: manifest/tree.ts:72

The timeline carrying id among a manifest’s roots and their descendants, located: the first in timelinesInOrder.

Parameters#

manifest#

Roots

id#

string

Returns#

Located | undefined


memberAncestry()#

memberAncestry(manifest): Map<string, readonly string[]>

Defined in: manifest/tree.ts:116

timelineAncestry with every virtual timeline of manifest added as its own ancestry: it lies in no tree, so it contains what belongs to it and nothing holds it, and a group naming it holds it as any member.

Parameters#

manifest#

Manifest

Returns#

Map<string, readonly string[]>


rootPaths()#

rootPaths(manifest): RootPath[]

Defined in: manifest/tree.ts:20

The root timelines of a manifest with their paths, ["timelines", <index>].

Parameters#

manifest#

Roots

Returns#

RootPath[]


timelineAncestry()#

timelineAncestry(manifest): Map<string, readonly string[]>

Defined in: manifest/tree.ts:100

Every timeline id mapped to the ids from its root down to it, for every root of the manifest; the length of the list is the timeline’s depth.

Parameters#

manifest#

Manifest

Returns#

Map<string, readonly string[]>


timelinesInOrder()#

timelinesInOrder(manifest): readonly Located[]

Defined in: manifest/tree.ts:64

Every timeline of a manifest, located: root by root, each timeline before its children, in children order.

Parameters#

manifest#

Roots

Returns#

readonly Located[]