manifest/containers#

Interfaces#

AncestorCardRef#

Defined in: manifest/containers.ts:250

An ancestor card’s container beside what it draws (memberDrawings): one entry, never two lists.

Properties#

card#

readonly card: AncestorCard

Defined in: manifest/containers.ts:252

ref#

readonly ref: ContainerRef

Defined in: manifest/containers.ts:251


CardPlace#

Defined in: manifest/containers.ts:79

The stated size, spacing (the gap between its rows and its bands) and margin (the empty space above its first and below its last) of a frame-held card.

Properties#

height?#

readonly optional height?: number

Defined in: manifest/containers.ts:81

margin?#

readonly optional margin?: number

Defined in: manifest/containers.ts:83

spacing?#

readonly optional spacing?: number

Defined in: manifest/containers.ts:82

width?#

readonly optional width?: number

Defined in: manifest/containers.ts:80


ContainerDescriptor#

Defined in: manifest/containers.ts:189

The fixed properties of one kind of drawing container.

Properties#

element#

readonly element: ElementType

Defined in: manifest/containers.ts:193

The schema element type the container is styled as.

kind#

readonly kind: "block" | "card" | "frame" | "band"

Defined in: manifest/containers.ts:190

level#

readonly level: ContainerLevel

Defined in: manifest/containers.ts:191

place#

readonly place: { ancestor: readonly (keyof ItemPlace)[]; block: readonly (keyof ItemPlace)[]; frame: readonly (keyof ItemPlace)[]; } | null

Defined in: manifest/containers.ts:199

The place members a container of the kind may state, by how it is held (a frame-held card’s are a subset of an item’s, an ancestor card states none); null for none.


ContainerRef#

Defined in: manifest/containers.ts:228

One drawing of a container of a manifest. A frame is drawn once; a card once per frame holding it, or once on the block, and a root’s ancestor card once behind each frame holding a member below it; a band once in each card that draws its timeline, never in an ancestor card. Every drawing of a container carries its container’s address, so the cards of one timeline share theirs: the key tells them apart.

Properties#

address#

readonly address: ElementAddress

Defined in: manifest/containers.ts:240

The element address: {} for the block, {id: G} for a frame, {id: T, part: ["card"]} for every card of T, {id: T, facet} for a band.

facet#

readonly facet: Facet | null

Defined in: manifest/containers.ts:246

The facet a band draws, or null for another kind.

holder#

readonly holder: ContainerRef | null

Defined in: manifest/containers.ts:242

The container directly holding this one, or null for the block.

key#

readonly key: PlaceKey | null

Defined in: manifest/containers.ts:235

Where its place lies in places: a frame’s and a card’s; null for the block and a band. An ancestor card has no place: its key {item: G, member: R}, the frame G it lies behind and its root R, only tells it apart, and places never states it.

kind#

readonly kind: "block" | "card" | "frame" | "band"

Defined in: manifest/containers.ts:229

timeline#

readonly timeline: string | null

Defined in: manifest/containers.ts:244

The timeline of a card or band, or null for another kind.


Containers#

Defined in: manifest/containers.ts:256

Every container of a manifest, indexed by its place key and its timeline.

Properties#

all#

readonly all: readonly ContainerRef[]

Defined in: manifest/containers.ts:259

Every frame and card, and every drawing of a band, in drawing order.

ancestorCards#

readonly ancestorCards: readonly AncestorCardRef[]

Defined in: manifest/containers.ts:263

The ancestor cards, in drawing order, each with its root, its member and its group.

bands#

readonly bands: ReadonlyMap<string, ReadonlyMap<Facet, readonly ContainerRef[]>>

Defined in: manifest/containers.ts:269

Every drawing of every band, by timeline ID and then facet, in drawing order.

block#

readonly block: ContainerRef

Defined in: manifest/containers.ts:257

byKey#

readonly byKey: ReadonlyMap<string, ContainerRef>

Defined in: manifest/containers.ts:261

Every frame and card that has a place, by its place key (placeKeyText): no ancestor card.

cards#

readonly cards: ReadonlyMap<string, readonly ContainerRef[]>

Defined in: manifest/containers.ts:267

The cards of every timeline drawn in one, ancestor cards included, by timeline ID, in drawing order.

frames#

readonly frames: ReadonlyMap<string, ContainerRef>

Defined in: manifest/containers.ts:265

Every frame by its group’s ID.


ItemPlace#

Defined in: manifest/containers.ts:61

The stated placement members of a freely placed frame or block-held card.

Extended by#

Properties#

height?#

readonly optional height?: number

Defined in: manifest/containers.ts:71

length?#

readonly optional length?: number

Defined in: manifest/containers.ts:64

margin?#

readonly optional margin?: number

Defined in: manifest/containers.ts:69

Empty space drawn above a frame’s first card and below its last, or a block-held card’s first and last row or band.

scale?#

readonly optional scale?: number

Defined in: manifest/containers.ts:65

spacing?#

readonly optional spacing?: number

Defined in: manifest/containers.ts:67

A frame’s gap between its cards; a block-held card’s between its rows and its bands.

width?#

readonly optional width?: number

Defined in: manifest/containers.ts:70

x?#

readonly optional x?: number

Defined in: manifest/containers.ts:62

y?#

readonly optional y?: number

Defined in: manifest/containers.ts:63


Place#

Defined in: manifest/containers.ts:91

The entry of places under an item’s ID: the item’s place and, for a group’s frame, the places of its members’ cards by member ID (places[G].cards[T], drawing.md section 8.6).

Extends#

Properties#

cards?#

readonly optional cards?: object

Defined in: manifest/containers.ts:92

Index Signature#

[member: string]: CardPlace

height?#

readonly optional height?: number

Defined in: manifest/containers.ts:71

Inherited from#

ItemPlace.height

length?#

readonly optional length?: number

Defined in: manifest/containers.ts:64

Inherited from#

ItemPlace.length

margin?#

readonly optional margin?: number

Defined in: manifest/containers.ts:69

Empty space drawn above a frame’s first card and below its last, or a block-held card’s first and last row or band.

Inherited from#

ItemPlace.margin

scale?#

readonly optional scale?: number

Defined in: manifest/containers.ts:65

Inherited from#

ItemPlace.scale

spacing?#

readonly optional spacing?: number

Defined in: manifest/containers.ts:67

A frame’s gap between its cards; a block-held card’s between its rows and its bands.

Inherited from#

ItemPlace.spacing

width?#

readonly optional width?: number

Defined in: manifest/containers.ts:70

Inherited from#

ItemPlace.width

x?#

readonly optional x?: number

Defined in: manifest/containers.ts:62

Inherited from#

ItemPlace.x

y?#

readonly optional y?: number

Defined in: manifest/containers.ts:63

Inherited from#

ItemPlace.y


PlaceKey#

Defined in: manifest/containers.ts:103

Where the place of a frame or a card lies in places: under the ID of the item (a group’s frame, or an ungrouped root’s card), and for a member’s card under the member’s ID in that frame’s cards.

Properties#

item#

readonly item: string

Defined in: manifest/containers.ts:104

member?#

readonly optional member?: string

Defined in: manifest/containers.ts:105

Type Aliases#

ContainerKind#

ContainerKind = typeof CONTAINER_KINDS[number]

Defined in: manifest/containers.ts:41

A kind of container in a drawing.


ContainerLevel#

ContainerLevel = typeof CONTAINER_LEVELS[ContainerKind]

Defined in: manifest/containers.ts:52

The semantic level represented by a container kind.


Holding#

Holding = "block" | "frame" | "ancestor"

Defined in: manifest/containers.ts:58

How a card is held: by the block (an ungrouped root), by a frame (a group member), or by the block behind a frame (an ancestor card, which has no place).


Places#

Places = object

Defined in: manifest/containers.ts:96

A block’s places: by the ID of a group (its frame) or of an ungrouped root (its card).

Index Signature#

[item: string]: Place

Variables#

CARD_PLACE_MEMBERS#

const CARD_PLACE_MEMBERS: readonly ["width", "height", "spacing", "margin"]

Defined in: manifest/containers.ts:181

The members of a frame-held card place, in the order a place is written.


CONTAINER_KINDS#

const CONTAINER_KINDS: readonly ["block", "frame", "card", "band"]

Defined in: manifest/containers.ts:38

The kinds of container in a drawing, the boxes, from the block to a band.


CONTAINER_LEVELS#

const CONTAINER_LEVELS: object

Defined in: manifest/containers.ts:44

The semantic level each container kind draws: bundle, group, timeline, facet.

Type Declaration#

band#

readonly band: "facet" = "facet"

block#

readonly block: "bundle" = "bundle"

card#

readonly card: "timeline" = "timeline"

frame#

readonly frame: "group" = "group"


CONTAINERS#

const CONTAINERS: { readonly [kind in ContainerKind]: ContainerDescriptor }

Defined in: manifest/containers.ts:203

The registry of drawing container kinds and their semantic and placement properties.


ITEM_PLACE_MEMBERS#

const ITEM_PLACE_MEMBERS: readonly ["x", "y", "length", "scale", "spacing", "margin", "width", "height"]

Defined in: manifest/containers.ts:169

The members of an item place, in the order a place is written.

Functions#

containersOf()#

containersOf(manifest): Containers

Defined in: manifest/containers.ts:305

List every container of manifest, memoised by manifest identity, in drawing order: the ancestor cards behind the frames (memberDrawings), each held by the block, keyed {item: G, member: R} and holding no band; then per group in canonical order its frame, then per member in display order the member’s card followed by the bands of the timelines the card holds; then the same for every ungrouped root’s card. A timeline that several groups have as a member has a card in each of their frames, each followed by its own drawing of the same bands. A card holds the bands of its timeline and of every descendant down to, not into, a descendant drawn in a card of its own (a member of another group); each timeline’s five bands follow in FACETS order, the timelines in pre-order, children by offset then ID. A timeline drawn in no card (a root that holds a member, and the descendants of such a root that hold none) has no bands here: nothing draws them. A virtual timeline a group has as a member has its card in the frame at its place in the display order; every virtual timeline in no group has a block-held card after the ungrouped roots’, by ID, keyed by its ID: the block draws it where its places states that key, and a set of its place states it. A virtual card holds its markers and regions bands (VIRTUAL_FACETS).

Parameters#

manifest#

Manifest

Returns#

Containers


holdingOf()#

holdingOf(ref): Holding | null

Defined in: manifest/containers.ts:435

How ref is held when it is a frame or a card: by a frame (a member’s card), by the block (a frame, or an ungrouped root’s card), or by the block behind a frame (an ancestor card, the one block-held card keyed by a member); null for the block and a band, which have no place.

Parameters#

ref#

ContainerRef

Returns#

Holding | null


isMember()#

isMember(manifest, id): boolean

Defined in: manifest/containers.ts:485

Whether the timeline id is a group member: a frame holds a card of it.

Parameters#

manifest#

Manifest

id#

string

Returns#

boolean


keptPlace()#

keptPlace(ref, place): ItemPlace | CardPlace | undefined

Defined in: manifest/containers.ts:454

place with only the members ref may state (placeMembersOf): place itself when it states no other, undefined when it states none of them. A timeline that becomes a group member so keeps its card’s requested size, spacing and margin, and loses its position, length and scale.

Parameters#

ref#

ContainerRef

place#

ItemPlace | CardPlace

Returns#

ItemPlace | CardPlace | undefined


placeAt()#

placeAt(places, key): ItemPlace | CardPlace | undefined

Defined in: manifest/containers.ts:119

The place stated under key in places: an item’s without its cards, or a member’s card’s.

Parameters#

places#

Places

key#

PlaceKey

Returns#

ItemPlace | CardPlace | undefined


placedCards()#

placedCards(manifest, id): readonly ContainerRef[]

Defined in: manifest/containers.ts:479

The cards of the timeline id that have a place, in drawing order: its cards less its ancestor cards.

Parameters#

manifest#

Manifest

id#

string

Returns#

readonly ContainerRef[]


placedContainer()#

placedContainer(manifest, key): ContainerRef | undefined

Defined in: manifest/containers.ts:425

The frame or card whose place lies under key in the drawing of manifest, if any.

Parameters#

manifest#

Manifest

key#

PlaceKey

Returns#

ContainerRef | undefined


placedElement()#

placedElement(manifest, key): string | undefined

Defined in: manifest/containers.ts:469

The element a set of place aims at to state the place under key in the drawing of manifest: a frame’s group, a card’s timeline; undefined for a key naming no frame and no card.

Parameters#

manifest#

Manifest

key#

PlaceKey

Returns#

string | undefined


placeEntries()#

placeEntries(places): readonly (readonly [PlaceKey, ItemPlace | CardPlace])[]

Defined in: manifest/containers.ts:155

Every place places states, with its key: each item’s own, then its members’ cards.

Parameters#

places#

Places

Returns#

readonly (readonly [PlaceKey, ItemPlace | CardPlace])[]


placeKeyText()#

placeKeyText(key): string

Defined in: manifest/containers.ts:109

The one string form of a place key, a map key: its item and member as a JSON array.

Parameters#

key#

PlaceKey

Returns#

string


placeMembersOf()#

placeMembersOf(ref): readonly (keyof ItemPlace)[]

Defined in: manifest/containers.ts:442

The place members ref may state, as selected by its kind and holder.

Parameters#

ref#

ContainerRef

Returns#

readonly (keyof ItemPlace)[]


samePlaceKey()#

samePlaceKey(left, right): boolean

Defined in: manifest/containers.ts:114

Whether two place keys name the same place.

Parameters#

left#

PlaceKey

Returns#

boolean


withPlaceAt()#

withPlaceAt(places, key, place): Places

Defined in: manifest/containers.ts:135

places with the place under key replaced by place, or removed when place is undefined; an item’s cards are kept after its own members, and an entry left with neither is removed.

Parameters#

places#

Places

key#

PlaceKey

place#

ItemPlace | CardPlace | undefined

Returns#

Places