the blocks of a version 6 page as the file stores them, and what they resolve to
BlocksPage.read keeps every block of a file in order, and BlocksPage.resolve gives the Scene they show. A CrdtId names an item in every copy of a page. To edit a page, use a Page, which Page.fromBlocks makes of blocks.
Every value here is a plain object: an id's counter is a bigint, bytes are a Uint8Array, a pen, color or paragraph style is its code, and a choice of forms is an object of a type and a value.
bigint
Uint8Array
type
value
const page = blocks.BlocksPage.read(Page.blank("RM110").toBytes());const scene = page.resolve();console.log(scene.layers().length); Copy
const page = blocks.BlocksPage.read(Page.blank("RM110").toBytes());const scene = page.resolve();console.log(scene.layers().length);
the blocks of a version 6 page as the file stores them, and what they resolve to
BlocksPage.read keeps every block of a file in order, and BlocksPage.resolve gives the Scene they show. A CrdtId names an item in every copy of a page. To edit a page, use a Page, which Page.fromBlocks makes of blocks.
Every value here is a plain object: an id's counter is a
bigint, bytes are aUint8Array, a pen, color or paragraph style is its code, and a choice of forms is an object of atypeand avalue.Example