matches#

Interfaces#

BeliefOverlay#

Defined in: arranger/src/matches.ts:828

A part of a MatchStamp shown in one colour: its connectors by belief, with the lines in blue.

Properties#

belief#

readonly belief: "false" | "unlikely" | "undecided" | "true"

Defined in: arranger/src/matches.ts:830

The belief its connectors are drawn by; undecided holds the cross-section lines too.

overlay#

readonly overlay: MatchOverlay

Defined in: arranger/src/matches.ts:832

stroke#

readonly stroke: string

Defined in: arranger/src/matches.ts:831


FadedPath#

Defined in: arranger/src/matches.ts:974

One path of an overlay’s lines at an opacity other than 1, and that opacity.

Properties#

d#

readonly d: string

Defined in: arranger/src/matches.ts:976

opacity#

readonly opacity: number

Defined in: arranger/src/matches.ts:975


FlagGroups#

Defined in: arranger/src/matches.ts:647

How a MatchStamp’s flag reads its groupstamps: in block block, read with granularity, each coordinate groupstampAt says naming would store as a groupstamp (namedGroupstamps) read across its groups.

Properties#

block#

readonly block: string

Defined in: arranger/src/matches.ts:648

granularity#

readonly granularity: Granularity

Defined in: arranger/src/matches.ts:649

groupstampAt#

readonly groupstampAt: GroupstampAt

Defined in: arranger/src/matches.ts:650


MatchFlagGroup#

Defined in: arranger/src/matches.ts:635

One run of a MatchStamp’s flag on one timeline: its key among the groups (its first row’s), the timeline’s ID, its name and the timestamps drawn one after the other on it.

Properties#

key#

readonly key: string

Defined in: arranger/src/matches.ts:636

name#

readonly name: string

Defined in: arranger/src/matches.ts:638

rows#

readonly rows: readonly MatchFlagRow[]

Defined in: arranger/src/matches.ts:639

timeline#

readonly timeline: string

Defined in: arranger/src/matches.ts:637


MatchFlagRow#

Defined in: arranger/src/matches.ts:624

One timestamp of a MatchStamp’s flag: its key among the rows, its coordinate’s number in the index (null for a coordinate a groupstamp reads on another member of its group) and its value as the flag writes it.

Properties#

coordinate#

readonly coordinate: number | null

Defined in: arranger/src/matches.ts:626

key#

readonly key: string

Defined in: arranger/src/matches.ts:625

text#

readonly text: string

Defined in: arranger/src/matches.ts:627


MatchHit#

Defined in: arranger/src/matches.ts:537

What the pointer hovers among the potential MatchStamps of a block.

Properties#

anchor#

readonly anchor: number | null

Defined in: arranger/src/matches.ts:542

at#

readonly at: object

Defined in: arranger/src/matches.ts:546

Where the flag’s pole stands: its abscissa, its foot and its top, in block-local canvas units.

top#

readonly top: number

x#

readonly x: number

y#

readonly y: number

coordinate#

readonly coordinate: number | null

Defined in: arranger/src/matches.ts:541

The coordinate whose line is hovered, or the anchor whose connector is.

distance#

readonly distance: number

Defined in: arranger/src/matches.ts:544

The distance from the pointer to it, in block-local canvas units.

stamp#

readonly stamp: number

Defined in: arranger/src/matches.ts:539

The potential MatchStamp hovered.


MatchLayer#

Defined in: arranger/src/matches.ts:960

What the overlay draws in one block’s node: the potential MatchStamps, the hovered and the pinned one.

Properties#

block#

readonly block: string

Defined in: arranger/src/matches.ts:961

height#

readonly height: number

Defined in: arranger/src/matches.ts:964

hovered#

readonly hovered: MatchOverlay | null

Defined in: arranger/src/matches.ts:968

origin#

readonly origin: Point

Defined in: arranger/src/matches.ts:965

pinned#

readonly pinned: readonly BeliefOverlay[]

Defined in: arranger/src/matches.ts:970

The pinned MatchStamp by colour (pinnedOverlays); empty for none.

potential#

readonly potential: MatchOverlay

Defined in: arranger/src/matches.ts:967

scale#

readonly scale: number

Defined in: arranger/src/matches.ts:966

width#

readonly width: number

Defined in: arranger/src/matches.ts:963

The block’s drawing’s size, in its units.


MatchLine#

Defined in: arranger/src/matches.ts:143

A line of a drawing holding a timeline of the index, as floats: where its coordinates lie and how far its cross-section lines reach.

Properties#

card#

readonly card: string

Defined in: arranger/src/matches.ts:147

The place key text of the card drawing it.

from#

readonly from: number

Defined in: arranger/src/matches.ts:169

The positions on the timeline’s own axis the line draws, from from to to, each end included unless the line’s run does not hold it: a position at a seam where the run meets another run of its line lies on one of the two alone (holdsAt, docs/drawing.md in TimeToShare, section 3.2, Seams), so a coordinate there is drawn once.

fromHeld#

readonly fromHeld: boolean

Defined in: arranger/src/matches.ts:172

Whether the line draws the position from, and the position to.

key#

readonly key: string

Defined in: arranger/src/matches.ts:145

The key of the line in lineAxes.

length#

readonly length: number

Defined in: arranger/src/matches.ts:160

The coordinates from xStart to xEnd as drawn (layout’s drawnLength); 0 where it draws none.

offset#

readonly offset: number

Defined in: arranger/src/matches.ts:162

Where the timeline’s zero lies on the line’s axis: 0, or a segment’s offset.

start#

readonly start: number

Defined in: arranger/src/matches.ts:158

The coordinate at xStart on the line’s own axis.

timeline#

readonly timeline: number

Defined in: arranger/src/matches.ts:149

The timeline’s number in the index.

to#

readonly to: number

Defined in: arranger/src/matches.ts:170

toHeld#

readonly toHeld: boolean

Defined in: arranger/src/matches.ts:173

xEnd#

readonly xEnd: number

Defined in: arranger/src/matches.ts:151

xStart#

readonly xStart: number

Defined in: arranger/src/matches.ts:150

y#

readonly y: number

Defined in: arranger/src/matches.ts:153

The line’s ordinate.

y1#

readonly y1: number

Defined in: arranger/src/matches.ts:155

The extent of its cross-section lines (crossSectionSegment): the line’s ordinate twice without one.

y2#

readonly y2: number

Defined in: arranger/src/matches.ts:156


MatchLines#

Defined in: arranger/src/matches.ts:208

The lines of a drawing for one index, all of them and by the index’s timeline number.

Properties#

all#

readonly all: readonly MatchLine[]

Defined in: arranger/src/matches.ts:213

byTimeline#

readonly byTimeline: ReadonlyMap<number, readonly MatchLine[]>

Defined in: arranger/src/matches.ts:214

drawing#

readonly drawing: Drawing

Defined in: arranger/src/matches.ts:210

The drawing they were read from.

raised#

readonly raised: string | null

Defined in: arranger/src/matches.ts:212

The root whose ancestor cards were raised as they were read (raisedRoot), else null.


MatchOverlay#

Defined in: arranger/src/matches.ts:335

What the overlay draws in one block.

Properties#

connectors#

readonly connectors: readonly OverlayConnector[]

Defined in: arranger/src/matches.ts:337

lines#

readonly lines: readonly OverlayLine[]

Defined in: arranger/src/matches.ts:336


MatchOverlayInput#

Defined in: arranger/src/matches.ts:76

What “Show matches” draws in one block: the anchor index of the MatchClaim table loaded for block block (its potential MatchStamps, under the block’s MatchClaim filter), the block’s named MatchStamps compared with the table, and the editor user’s belief in each MatchClaim of the table (per row, core’s believedBy), which the anchors of the MatchStamps shown are drawn by; without beliefs (a host without a user) every MatchClaim is undecided.

Properties#

beliefs?#

readonly optional beliefs?: Uint8Array<ArrayBufferLike>

Defined in: arranger/src/matches.ts:80

block#

readonly block: string

Defined in: arranger/src/matches.ts:77

index#

readonly index: AnchorIndex

Defined in: arranger/src/matches.ts:78

named#

readonly named: readonly NamedComparison[]

Defined in: arranger/src/matches.ts:79


MatchStampPin#

Defined in: arranger/src/matches.ts:88

A pinned potential MatchStamp: the block whose table holds it and its number in that table’s index. Every block’s table numbers its own MatchStamps from 0, so a number alone names none.

Properties#

block#

readonly block: string

Defined in: arranger/src/matches.ts:89

matchStamp#

readonly matchStamp: number

Defined in: arranger/src/matches.ts:90


NamedComparison#

Defined in: arranger/src/matches.ts:62

A named MatchStamp of a block’s manifest compared with the current table (core’s checkMatchStamp): stated follows the order of its alignment_anchors.

Properties#

comparison#

readonly comparison: MatchStampCheck

Defined in: arranger/src/matches.ts:64

id#

readonly id: string

Defined in: arranger/src/matches.ts:63


OverlayConnector#

Defined in: arranger/src/matches.ts:326

An anchor’s connector as the overlay draws it, in block-local canvas units.

Properties#

anchor#

readonly anchor: number

Defined in: arranger/src/matches.ts:327

x1#

readonly x1: number

Defined in: arranger/src/matches.ts:328

x2#

readonly x2: number

Defined in: arranger/src/matches.ts:330

y1#

readonly y1: number

Defined in: arranger/src/matches.ts:329

y2#

readonly y2: number

Defined in: arranger/src/matches.ts:331


OverlayLine#

Defined in: arranger/src/matches.ts:317

A coordinate’s cross-section line as the overlay draws it, in block-local canvas units, and its opacity: 1 on a line holding the coordinate, a groupstamp’s piece’s own across a frame (layout’s groupCrossSections: faded over a member card where the group gives the coordinate no value), drawn in place of the overlay’s.

Properties#

coordinate#

readonly coordinate: number

Defined in: arranger/src/matches.ts:318

opacity#

readonly opacity: number

Defined in: arranger/src/matches.ts:322

x#

readonly x: number

Defined in: arranger/src/matches.ts:319

y1#

readonly y1: number

Defined in: arranger/src/matches.ts:320

y2#

readonly y2: number

Defined in: arranger/src/matches.ts:321


Paint#

Defined in: arranger/src/matches.ts:883

How a drawn part of a named MatchStamp is painted over its style.

Properties#

attribute#

readonly attribute: "fill" | "stroke"

Defined in: arranger/src/matches.ts:885

What it sets: a line’s stroke, a label’s fill.

colour#

readonly colour: string

Defined in: arranger/src/matches.ts:886

marked#

readonly marked: boolean

Defined in: arranger/src/matches.ts:888

Whether its text begins with OUT_OF_DATE_MARK.


Placed#

Defined in: arranger/src/matches.ts:351

A block’s node on the canvas: its top-left corner and its scale.

Properties#

origin#

readonly origin: Point

Defined in: arranger/src/matches.ts:352

scale#

readonly scale: number

Defined in: arranger/src/matches.ts:353


Screen#

Defined in: arranger/src/matches.ts:341

The canvas as seen: the viewport, the canvas’s size in CSS pixels and the device pixels per CSS pixel.

Properties#

height#

readonly height: number

Defined in: arranger/src/matches.ts:346

ratio#

readonly ratio: number

Defined in: arranger/src/matches.ts:347

width#

readonly width: number

Defined in: arranger/src/matches.ts:345

x#

readonly x: number

Defined in: arranger/src/matches.ts:342

y#

readonly y: number

Defined in: arranger/src/matches.ts:343

zoom#

readonly zoom: number

Defined in: arranger/src/matches.ts:344


ScreenCoordinate#

Defined in: arranger/src/matches.ts:654

A coordinate as screen order reads it: a timeline’s ID and a value on that timeline’s own axis.

Properties#

timeline#

readonly timeline: string

Defined in: arranger/src/matches.ts:655

value#

readonly value: CoordinateValue

Defined in: arranger/src/matches.ts:656

Type Aliases#

GroupstampAt#

GroupstampAt = (coordinate) => boolean

Defined in: arranger/src/matches.ts:486

Whether naming would store a coordinate of an index as a groupstamp, by the coordinate’s number.

Parameters#

coordinate#

number

Returns#

boolean


MatchPaint#

MatchPaint = ReadonlyMap<string, Paint>

Defined in: arranger/src/matches.ts:892

The paint of a block’s named MatchStamps’ drawn parts, by the key of each part’s address.

Variables#

BELIEF_STROKES#

const BELIEF_STROKES: Readonly<Record<AnchorBelief, string>>

Defined in: arranger/src/matches.ts:120

The stroke of an alignment anchor for each belief.


FALSE_STROKE#

const FALSE_STROKE: "#E51400" = "#E51400"

Defined in: arranger/src/matches.ts:118

The stroke of an anchor the user believes false: red.


HOVERED_STROKE#

const HOVERED_STROKE: "#6E6E6E" = "#6E6E6E"

Defined in: arranger/src/matches.ts:101

The hovered MatchStamp’s.


MATCH_DASH#

const MATCH_DASH: "3 3" = "3 3"

Defined in: arranger/src/matches.ts:137

The dash pattern of the MatchStamp lines the overlay draws.


MATCH_STROKE_WIDTH#

const MATCH_STROKE_WIDTH: 1 = 1

Defined in: arranger/src/matches.ts:135

The stroke width of the MatchStamp lines the overlay draws: potential, hovered and pinned.


NO_PAINT#

const NO_PAINT: MatchPaint

Defined in: arranger/src/matches.ts:895

No paint: a block without a table.


NO_TABLES#

const NO_TABLES: readonly MatchOverlayInput[] = []

Defined in: arranger/src/matches.ts:94

No block with a table: what the canvas draws from by default.


OUT_OF_DATE_MARK#

const OUT_OF_DATE_MARK: "! " = "! "

Defined in: arranger/src/matches.ts:133

The text an out-of-date named MatchStamp’s name label begins with.


OUT_OF_DATE_STROKE#

const OUT_OF_DATE_STROKE: "#E51400" = FALSE_STROKE

Defined in: arranger/src/matches.ts:131

A named MatchStamp out of date (core’s checkMatchStamp): its anchors’ lines, its match timestamps’ lines and its name label, whatever their style; the label begins with OUT_OF_DATE_MARK.


PINNED_STROKE#

const PINNED_STROKE: "#1BA1E2" = "#1BA1E2"

Defined in: arranger/src/matches.ts:103

The pinned MatchStamp’s: the blue of a cross-section line (TimeToShare’s docs/drawing.md, section 6.6).


POTENTIAL_OPACITY#

const POTENTIAL_OPACITY: 0.7 = 0.7

Defined in: arranger/src/matches.ts:99

The opacity of the potential MatchStamps’ lines and connectors.


POTENTIAL_STROKE#

const POTENTIAL_STROKE: "#C8C8C8" = "#C8C8C8"

Defined in: arranger/src/matches.ts:97

The potential MatchStamps’ lines and connectors: light grey, 70 % opaque, width 1, dash 3 3.


TRUE_STROKE#

const TRUE_STROKE: "#339933" = "#339933"

Defined in: arranger/src/matches.ts:114

The stroke of an anchor the user believes true: green.


UNDECIDED_STROKE#

const UNDECIDED_STROKE: "#1BA1E2" = PINNED_STROKE

Defined in: arranger/src/matches.ts:112

An alignment anchor of a shown MatchStamp (the pinned one, a named one) by the editor user’s belief in the MatchClaims stating it (core’s anchorBelief): undecided the cross-section blue, true green, unlikely dark orange, false red, whatever the anchor’s style. The green and the orange lie between the blue and the red in luminance, each at least 3:1 against the white of a card and the canvas’s dark #1A1D23.


UNLIKELY_STROKE#

const UNLIKELY_STROKE: "#E07000" = "#E07000"

Defined in: arranger/src/matches.ts:116

The stroke of an anchor the user believes unlikely: dark orange.

Functions#

abscissa()#

abscissa(line, position): number

Defined in: arranger/src/matches.ts:190

The abscissa of position, on line’s timeline’s own axis, in block-local canvas units, as layout’s abscissaOf computes it in doubles: xStart + (position + offset − start) / length × (xEnd − xStart); xStart on a line of no drawn length.

Parameters#

line#

MatchLine

position#

number

Returns#

number


fadedPathsOf()#

fadedPathsOf(overlay): readonly FadedPath[]

Defined in: arranger/src/matches.ts:1035

The paths of an overlay’s lines at each opacity other than 1, in the order first met (pathsOf).

Parameters#

overlay#

MatchOverlay

Returns#

readonly FadedPath[]


inScreenOrder()#

inScreenOrder<T>(drawing, items, coordinateOf, raised?): T[]

Defined in: arranger/src/matches.ts:702

items in screen order (screenOrder of each one’s screenPlace in drawing with raised, coordinateOf giving its coordinate); items at one place, or none drawn, keep their given order. The one screen order of the flag of a potential MatchStamp and of the coordinates and alignment anchors of a MatchStamp wherever it is listed or named.

Type Parameters#

T#

T

Parameters#

drawing#

Drawing

items#

readonly T[]

coordinateOf#

(item) => ScreenCoordinate

raised?#

string | null = null

Returns#

T[]


matchFlag()#

matchFlag(index, manifest, lines, stamp, decimals, groups?): MatchFlagGroup[]

Defined in: arranger/src/matches.ts:734

The flag of the potential MatchStamp stamp: every coordinate of it, and with groups (above a timeline editor) every coordinate its groupstamps read on the other members of their groups (groups.groupstampAt: the scaled members of the coordinate’s GroupStamp pin, the arranger’s timelinePin read by the group, as the Matchstamp tab’s Coordinates read it), each value once per timeline. Each coordinate is a row written as core’s prettyText with decimals places, in the timeline’s unit, but a member the group gives no value (a length of the group not known: the pin’s member valueless), written core’s VALUELESS_TEXT, as the coordinate flag and the stamp tabs write it; rows in the order they are drawn, top to bottom, then left to right (a coordinate of the stamp at its screenPlace over the drawing lines were read from, with the root raised as they were read; a groupstamp’s at the ordinate its pin reads the member at, on its coordinate’s abscissa), what the block does not draw last, in the index’s order. The rows are grouped by runs: one group for each run of rows on one timeline, named as manifest names it (its ID where it holds none), so the flag reads top to bottom exactly as drawn, a timeline whose rows lie apart in that order heading each run, and one whose rows are adjacent heading them once.

Parameters#

index#

AnchorIndex

manifest#

Manifest

lines#

MatchLines

stamp#

number

decimals#

number

groups?#

FlagGroups | null = null

Returns#

MatchFlagGroup[]


matchHitAt()#

matchHitAt(index, lines, connectors, point, tolerance): MatchHit | null

Defined in: arranger/src/matches.ts:571

What point (block-local) hovers within tolerance canvas units: of every line’s nearest coordinate (core’s coordinateNear, whatever was drawn) lying on the part of the line lines holds (matchLinesOf: where the timeline is seen, so never where its line is covered) whose cross-section line, from y1 to y2, lies within the tolerance, and of every connector drawn (connectors, the overlay’s), the nearest by Euclidean distance, a line before a connector and an earlier one before a later on a tie; null where none is near.

Parameters#

index#

AnchorIndex

lines#

MatchLines

connectors#

readonly OverlayConnector[]

point#

Point

tolerance#

number

Returns#

MatchHit | null


matchLinesOf()#

matchLinesOf(drawing, index, raised?): MatchLines

Defined in: arranger/src/matches.ts:238

The lines of drawing holding a timeline of index (matched by ID), once per drawing, index and raised root: for every timeline the parts of the lines it is seen on (seenOn, raised the root whose ancestor cards are raised, raisedRoot of the block’s editor, none by default: every line of the timeline, an ancestor card’s below the frames only beyond the frames and cards drawn over it, its ancestor lines in its members’ cards in between), in the drawing’s order of its lines, a timeline of the index before a later one on one line, the parts of one line left to right. A line of its own draws its drawn span; a segment’s line the part of it the segment covers; a part of a line the positions from its left end to its right end, an end at a seam its run does not hold left out (holdsAt). On an ancestor line a coordinate’s line spans the cross-section of the member’s line it belongs to, which reaches the ancestor line on whichever side it lies.

Parameters#

drawing#

Drawing

index#

AnchorIndex

raised?#

string | null = null

Returns#

MatchLines


namedGroupstamps()#

namedGroupstamps(manifest, index): GroupstampAt

Defined in: arranger/src/matches.ts:494

Whether naming a MatchStamp in manifest would store each coordinate of index as a groupstamp (core’s namedAsGroupstamp: the groupstamp of the match timestamp manifest holds there, else whether its timeline is a member of a group).

Parameters#

manifest#

Manifest

index#

AnchorIndex

Returns#

GroupstampAt


namedPaint()#

namedPaint(manifest, named, beliefs): MatchPaint

Defined in: arranger/src/matches.ts:919

How the named MatchStamps of manifest are painted, named each one compared with the table by ID: one out of date all red (OUT_OF_DATE_STROKE), its alignment anchors’ lines, its match timestamps’ lines and its name labels, which take OUT_OF_DATE_MARK; of any other, each anchor’s line by the belief in the MatchClaims stating it (statedBy, anchorBelief over beliefs, undecided without them). A match timestamp of an out-of-date MatchStamp is red whatever another MatchStamp holding it is. Keyed by the address key of each part: an anchor’s line {id: A}, its label {id: A, part: ["name"]}, a match timestamp’s line {id: T, part: ["line"]}. Once per comparisons, manifest and beliefs.

Parameters#

manifest#

Manifest

named#

readonly NamedComparison[]

beliefs#

Uint8Array<ArrayBufferLike> | undefined

Returns#

MatchPaint


overlayOf()#

overlayOf(index, lines, placed, screen): MatchOverlay

Defined in: arranger/src/matches.ts:417

What the overlay draws of index in a block, its lines lines (matchLinesOf) and its node placed, on screen: on every line, the coordinates whose abscissa lies in view on the line’s drawn part, the line’s cross-section extent meeting the view, at most one per device pixel column of the card (the first in the drawing’s order of lines, then by position, takes the column); then every anchor of a drawn coordinate, each once, joined to its other coordinate wherever the block draws it. A column is `⌊(screen.x

  • (origin.x + x · scale) · zoom) · ratio⌋`; after a coordinate the next one looked at is the first at or past the next column.

Parameters#

index#

AnchorIndex

lines#

MatchLines

placed#

Placed

screen#

Screen

Returns#

MatchOverlay


pathOf()#

pathOf(overlay): string

Defined in: arranger/src/matches.ts:1030

The path of an overlay’s lines at opacity 1 and its connectors (pathsOf).

Parameters#

overlay#

MatchOverlay

Returns#

string


pinnedOverlays()#

pinnedOverlays(index, overlay, beliefs): readonly BeliefOverlay[]

Defined in: arranger/src/matches.ts:850

The pinned MatchStamp overlay (stampOverlay of index) by colour: its cross-section lines in the cross-section blue, each connector by the belief in the MatchClaims stating its anchor (anchorBelief over beliefs, every one undecided without them); a part per colour that has anything, true first and false last. Once per overlay and beliefs.

Parameters#

index#

AnchorIndex

overlay#

MatchOverlay

beliefs#

Uint8Array<ArrayBufferLike> | undefined

Returns#

readonly BeliefOverlay[]


screenOrder()#

screenOrder(left, right): number

Defined in: arranger/src/matches.ts:690

Screen order of two places (screenPlace): top to bottom, then left to right; a place not drawn (null) after every drawn one. Negative where left comes first, positive where right does, 0 for one place.

Parameters#

left#

Point | null

Returns#

number


screenPlace()#

screenPlace(drawing, coordinate, raised?): Point | null

Defined in: arranger/src/matches.ts:666

Where coordinate shows first in drawing, in block-local canvas units, raised naming the root whose ancestor cards are raised (raisedRoot), else null: of its places (placesAt: where the user sees a line of its timeline at its value, the parts “Show matches” draws it on), the topmost, then the leftmost; null where it has none.

Parameters#

drawing#

Drawing

coordinate#

ScreenCoordinate

raised?#

string | null = null

Returns#

Point | null


stampOverlay()#

stampOverlay(index, lines, stamp, groupstampAt?): MatchOverlay

Defined in: arranger/src/matches.ts:513

Every line and connector of the potential MatchStamp stamp in a block, as a named one would draw them: each of its coordinates on every line holding it, and where groupstampAt says naming would store it as a groupstamp, after each such line the lines layout’s groupCrossSections draws across the frame holding that line’s card (none on a line in no frame), each at its piece’s opacity; then each of its anchors. Without groupstampAt no coordinate is taken for a groupstamp. Nothing for a number the index does not have.

Parameters#

index#

AnchorIndex

lines#

MatchLines

stamp#

number

groupstampAt?#

GroupstampAt

Returns#

MatchOverlay