Worksheet
<Worksheet> -- a set of named expressions and a shared view of what they draw.
Built on the same unified pieces <Notebook> is: a reactive <DynamicModule tracked-symbols="all"> of <Cell>s owns editing and evaluation; this element owns the worksheet-specific chrome (add/remove, drag to reorder, the gutter's marks) and the two things a worksheet adds on top:
- A cell that binds a plain number (s := 2) gets a slider. No separate control syntax, which is the whole point: a knob is just a binding you can move. - A cell that leaves an axis variable free gets drawn. z is the complex plane and colours as a portrait, x is a curve, x and y a surface. A cell that binds something draws nothing, so it stays off the screen without saying so.
Together those subsume Manipulate: PolyLog(s, z) over s := 2 is a portrait with a slider, and a second cell Zeta(s, z) is a second view sharing the same s — which is why there is no "which function?" control. Each drawable cell carries a visibility toggle, Desmos-style, and may override the projection its variables imply.
The knob/projection inference is read off every cell's own notatio-result event -- <Cell>'s plot option (notatio-out.ts) reports the input substituted but not evaluated, and elide-above keeps a long curve from being typeset every frame. A slider drives a cell through <Cell>'s liveValue (a property, not value): the Out re-evaluates on every frame, the editor field does not, which is what keeps a drag from re-typesetting the very field being dragged.
There is no cell history and no ordinals: every cell is defined by its name and recomputed from its dependencies, the same reactive schedule <Notebook> uses -- which is what separates a worksheet from a plain transcript, whose sequential mode is exactly the history this lacks.
Props
| Prop | Type | Default | Notes |
|---|---|---|---|
seed | string | "" | A JSON array of the worksheet's initial cells. An entry is a source string, or an object {value, locked, bind, domain, integer} -- bind/domain pin the declaration so only the value can be edited. Sources are in the syntax in-form names; a binding is s := 2. |
inForm attribute in-form | string | "epsil" | The seed's syntax: epsil (default) or latex. Cells are Epsil internally. |
screen | string | "auto" | Where the shared view sits: auto, side or below. |
readonly | boolean | false | Show the cells without allowing edits. Implies a fixed structure. |
structure | string | "open" | fixed keeps the reader from adding or removing cells; open (default) allows it. |
loop | Loop | "" | == "reflect" || this.loop === "none" ? this.loop : "cycle"),
setLoop: (loop) => (this.loop = loop),
interval: NotatioWorksheet.PLAY_INTERVAL_MS,
motion: "continuous",
update: () => this.requestUpdate(),
},
openPlaybackMenu,
LONG_PRESS_MS,
) | What a sweeping binding does at the ends: cycle (default), reflect or none.reflects |
As a web component
Plain custom elements, no framework required: import @enumeratio/frontend for the side effect and write <notatio-worksheet> in any HTML. Attributes are kebab-case and always strings; the props table above names each one's attribute where it differs from its prop.