workspace/blocks#

Interfaces#

Block#

Defined in: workspace/blocks.ts:49

One block: its placement on the canvas and its own manifest, which carries the block’s styling in its graphical member.

Extends#

Properties#

arrangement?#

readonly optional arrangement?: ItemArrangement

Defined in: workspace/blocks.ts:69

How its items are arranged; absent where they stand at their places, as a block without the member in its file and a set of null leave it. Its items’ stated places are kept and not used while it is present.

height#

readonly height: number | null

Defined in: workspace/blocks.ts:23

Inherited from#

BlockPlacement.height

id#

readonly id: string

Defined in: workspace/blocks.ts:50

index#

readonly index: string

Defined in: workspace/blocks.ts:54

The fractional index among the blocks of the same parent.

length#

readonly length: number

Defined in: workspace/blocks.ts:16

The graphical length of the root, positive.

Inherited from#

BlockPlacement.length

manifest#

readonly manifest: Manifest

Defined in: workspace/blocks.ts:70

margin#

readonly margin: number

Defined in: workspace/blocks.ts:20

The block’s margin, empty space drawn above its first item and below its last: finite, at least 0.

Inherited from#

BlockPlacement.margin

parent#

readonly parent: string | null

Defined in: workspace/blocks.ts:52

The canvas group holding the block; null in this version.

places#

readonly places: Places

Defined in: workspace/blocks.ts:63

The stated places of the containers of its manifest’s drawing: an item’s place by its group’s or ungrouped root’s ID, and in a group’s entry the size, spacing and margin of each member’s card in its frame by member ID (places[G].cards[T]).

scale#

readonly scale: number

Defined in: workspace/blocks.ts:14

The uniform scale of the drawing on the canvas, positive.

Inherited from#

BlockPlacement.scale

spacing#

readonly spacing: number

Defined in: workspace/blocks.ts:18

The block’s spacing, the gap between its items at their default y: finite, at least 0.

Inherited from#

BlockPlacement.spacing

width#

readonly width: number | null

Defined in: workspace/blocks.ts:22

The requested block size, positive, or null for the content’s own size.

Inherited from#

BlockPlacement.width

x#

readonly x: number

Defined in: workspace/blocks.ts:55

y#

readonly y: number

Defined in: workspace/blocks.ts:56


BlockPlacement#

Defined in: workspace/blocks.ts:12

The inputs of a block’s drawing besides its manifest and the style layers.

Extended by#

Properties#

height#

readonly height: number | null

Defined in: workspace/blocks.ts:23

length#

readonly length: number

Defined in: workspace/blocks.ts:16

The graphical length of the root, positive.

margin#

readonly margin: number

Defined in: workspace/blocks.ts:20

The block’s margin, empty space drawn above its first item and below its last: finite, at least 0.

scale#

readonly scale: number

Defined in: workspace/blocks.ts:14

The uniform scale of the drawing on the canvas, positive.

spacing#

readonly spacing: number

Defined in: workspace/blocks.ts:18

The block’s spacing, the gap between its items at their default y: finite, at least 0.

width#

readonly width: number | null

Defined in: workspace/blocks.ts:22

The requested block size, positive, or null for the content’s own size.


ItemArrangement#

Defined in: workspace/blocks.ts:39

How a block’s items, its groups and ungrouped roots, are arranged instead of standing at their places: packed one under another (vertical) or side by side (horizontal, every root the groups hang on drawn once behind the row), in the order order gives (itemOrder: IDs naming no item are passed over, items it leaves out follow in drawing order).

Properties#

direction#

readonly direction: "vertical" | "horizontal"

Defined in: workspace/blocks.ts:40

order#

readonly order: readonly string[]

Defined in: workspace/blocks.ts:42

Item IDs, each once.

Type Aliases#

BlockId#

BlockId = string

Defined in: workspace/blocks.ts:7

A block id: ten characters of base 36, unique within the workspace.


ItemDirection#

ItemDirection = typeof ITEM_DIRECTIONS[number]

Defined in: workspace/blocks.ts:30

A direction a block’s items may be arranged in.

Variables#

BLOCK_ID#

const BLOCK_ID: RegExp

Defined in: workspace/blocks.ts:9

The form of a block ID: ten lowercase base-36 characters.


BLOCK_MEMBERS#

const BLOCK_MEMBERS: readonly ["id", "parent", "index", "x", "y", "scale", "length", "spacing", "margin", "width", "height", "places", "manifest"]

Defined in: workspace/blocks.ts:74

The members every block states, in the order a block is built; arrangement follows places where present.


ITEM_DIRECTIONS#

const ITEM_DIRECTIONS: readonly ["vertical", "horizontal"]

Defined in: workspace/blocks.ts:27

The directions a block’s items may be arranged in.