Skip to main content

Module view

Module view 

Source

Structs§

Mark
A mark on an image. Points run from 0 to 1 across the image’s width and height.
ViewFile
The file as the room sees it: { name, contentType, contentLength } in the TypeScript SDK.
ViewRoom
A live room for one file. Everyone in it sees everyone else, by seat; with write, edits to doc reach everyone and are saved back to the file. Pointers ride in each seat’s position (x and y from 0 to 1, z the page) and text selections in its status.

Enums§

Kind
What a file opens as in its live room: text and table are edited together, image is annotated together, and view (video, audio, PDF, anything else or too large to edit) is looked at together.
MarkKind
'pen' | 'box' | 'arrow' | 'note' | 'pin' in the TypeScript SDK.
Role
What you may do in a file room: read for share links, write for owners, group members and chat members. A repository file is write only while the machine’s agent user may write it.
Target
A file to open live: a Drive file (by path or share link), a file in a repository’s /repository, or a chat attachment.

Constants§

EDIT_MAX_BYTES
Text and tables over this size open as view.

Traits§

Hooks
File room hooks. Every method defaults to a no-op, like the optional members of the TypeScript Hooks object.

Functions§

add_column
Add a column (after after, or at the end) and return its id.
add_row
Add a row (after after, or at the end) and return its id.
connect
Join the live room for a file: a Drive file (by path or share link), a file in a repository’s /repository, or a chat attachment. Owners, group members and chat members can edit, repository files only where the machine’s agent user could; share links look.
content_of
What a document saves as: the text, the CSV, or the marks as JSON.
doc_from
A fresh document holding a file’s content: its text, its CSV, or an image’s marks as JSON.
fill_table
Fill an empty table document from rows of text.
format_csv
CSV text from rows, quoting cells that need it.
from_base64
is_text
True for files whose bytes are text.
kind_of
What a file opens as, by its type, name and size.
parse_csv
Rows of cells from CSV text: quoted fields, doubled quotes and CRLF all read right.
remove_column
remove_row
table_rows
The table’s cells in order, as rows of text.
to_base64
Base64 for document updates on the wire.