Expand description
Blockworx in a browser: a Dioxus shell over the same kernel the desktop stands on.
The diagram is Canvas2D, painted imperatively by [blockworx_canvas2d] and
never entering the component tree; the chrome is HTML bound to the model
the same call answers. What is Dioxus-specific is small on purpose: one
use_hook holding the shell, one signal holding the chrome, and components
that only read it and raise commands.
The chrome is docs/cad-ui-spec.md’s: three persistent regions and only
three — a docked strip, a docked activity bar with the one panel it opens
floating over the diagram, and a floating toolbar — plus the search
palette, which is summoned rather than persistent.
Modules§
- canvas 🔒
- The diagram’s element, and everything the browser tells it.
- chords 🔒
- How a keystroke is written where the page is open.
- chrome 🔒
- The chrome model: a
Viewminus its diagram. - control 🔒
- The chrome’s one control vocabulary.
- diagrams 🔒
- The Diagrams section: everything about documents, in one place
(
docs/cad-ui-spec.md§4.1, §8). - editor 🔒
- The in-place editor: the field the kernel asked for, run over the diagram.
- exchange 🔒
- What comes into the document from outside it: an import, a block’s icon, an image of its own — picked from a dialog, or dropped on the diagram.
- frame_
rate 🔒 - The frame-rate readout, toggled from the ⌘K palette (“Diagnostics: frame rate”): frames in the last second, what the last frame spent in the kernel and on the canvas, and the slowest frame of the second.
- icons 🔒
- The chrome’s faces: the app’s own icon set, inlined.
- library 🔒
- The documents the origin holds: what a tab opens on, where a new one is born, which containers the File menu offers, and the two doors a container travels in and out through.
- log 🔒
- Where the shell’s
tracinggoes: the dev-tools console, every line stamped with the time it was written, and the Performance panel, every span a timing — so a freeze reads as a gap in the log and a bar in a recording. - meter 🔒
- The frame-rate readout’s numbers: the frames of the last second, each with what it spent in the kernel and on the canvas.
- mode 🔒
- Light and dark, read once for both halves of the page.
- notices 🔒
- What the session has to say about its document, and what the shell has to say about itself.
- overlay 🔒
- The selection overlay, anchored to what is selected, and the two pickers
it opens (
docs/cad-ui-spec.md§3). - pacing 🔒
- When the next frame runs.
- palette 🔒
- The command palette: ⌘K over the frame’s whole vocabulary
(
docs/cad-ui-spec.md§9). - prefs 🔒
- What the page remembers about how it is drawn, and who it attributes its work to.
- settings 🔒
- The preferences, as the sidebar’s Settings section.
- sheet 🔒
- Parts and History: the two sidebar sections that browse rather than act
(
docs/cad-ui-spec.md§8). - shell 🔒
- The shell as one value, and the frame it runs.
- sidebar 🔒
- The sidebar: one docked activity bar down the left edge, and the one
panel it opens floating over the diagram (
docs/cad-ui-spec.md§8). - status_
line 🔒 - The status line, in the diagram’s bottom-right corner: plain muted text,
no container (
docs/cad-ui-spec.md§2.0.1). Ambient information is not a control and must not look like one. The corner is the one nothing else claims — the sidebar’s panel opens over the left and the toolbar sits in the middle. - tool_
cluster 🔒 - The toolbar: eight parameterless tools floating at the bottom centre of
the diagram (
docs/cad-ui-spec.md§5), in three groups with a rule between each — what selects, what builds blocks, what annotates the sheet. - top_bar 🔒
- The top strip: the breadcrumb on the left, mode in the centre, undo, redo
and fit on the right, and never anything else (
docs/cad-ui-spec.md§2.0). Documents, parts, history and settings live in the sidebar.
Constants§
- OPENED 🔒
- TAILWIND 🔒
- Tailwind’s output, which
dxcompiles fromtailwind.cssat the crate root on every build.