Expand description
The Studio’s workbench: the toolbar, the Files tree, the editor and output columns, the Socratic guide and the status bar, with every mode’s handlers.
Two pages draw it. The Studio page (Host::Page) wraps it with its head, its nav, the reader’s own
store and the address bar, which the workbench never reaches. The front page (Host::Frame)
frames it over a shelf of shipped examples. Its state is WorkbenchState, which the host holds
(use_workbench), so both pages show one Studio: one markup, one stylesheet, one set of handlers.
Re-exports§
pub use StudioFrame_completions::Component::StudioFrame;pub use Workbench_completions::Component::Workbench;
Structs§
- Shelf
- The files a frame shows: shipped examples, in the Studio’s own folders, and the one it opens on.
- Store
Note - What the reader’s store says beside the files: an error reading it, whether it lasts only for the browser session, and why New file cannot make a file yet.
- Studio
Frame Props - Properties for the
StudioFramecomponent. - Workbench
Props - Properties for the
Workbenchcomponent. - Workbench
State - Everything the workbench shows and edits: what is open, each mode’s editor and what each mode last
made, and how the columns are laid out. The host holds it (
use_workbench), so the Studio page’s own effects, its store and its address bar, and the workbench’s handlers work on one state; it is signals, so it isCopy.
Enums§
- Host
- Where a workbench is drawn, and so what it may reach beyond itself.
Constants§
- FRAME_
ID - The Studio in a frame on another page: the workbench with the Studio’s own stylesheet, and
FRAME_STYLEfor what a frame lays out itself. The id of the frame’s element on its page: what a Try it button names, and scrolls to. - FRAME_
STYLE - What a frame lays out itself, every rule inside the frame: its box on the page and its height in each band, its columns in the proportions the Studio first opens with, which hold until the reader drags a column bar (from then on the frame draws the columns as the Studio page does, in its own width), and the link into the Studio.
- PREVIEW_
CENTERING_ STYLE - What the Studio adds to a page’s preview document, in its head: the page stands in the middle of
the frame, across and down, however small it is, and from the top once it is taller than the
frame (
safe center). A page served by largo gets none of this: it is the Studio’s frame, not the page, that centers. - PREVIEW_
TITLE - The Web preview’s name, for a screen reader.
Functions§
- Studio
Frame - Props
- Workbench
- The Studio’s working area for
state, drawn forhost. - prebuilt_
preview_ path - Where the site serves a shipped Web page’s prebuilt preview document:
/previews/<path>.htmlfor a page under/examples/, written at release byweb_previews_lock’s regenerator frompreview_document.Nonefor anything that is not a shipped page, so a reader’s own file or an edited page is built in the browser as before. - preview_
document - The document the Studio’s Web preview frames for
source: the page aslargo servewould paint it, first paint included, withPREVIEW_CENTERING_STYLEin its head; or, when the page does not build, the themed overlay that says why. - use_
shelf - The state of a frame over
shelf, for a page to hold: opened onshelf.opens, its tree the shelf’s files. A page calls it once, as it calls any hook, and hands it toStudioFrame. - use_
workbench - The workbench’s state, for a host to hold: what
openingopens on, over the filestreelists. The host calls it once, as it calls any hook, and hands what it returns toWorkbench.