Repository navigation
v0.12.0
A circuit is a ```schematic fence: a netlist that pack places, wires and draws as one SVG.
A page with a Chart is about 500 KB smaller: pack carries ECharts compressed and the page unpacks it as it loads.
A page where the reader must judge every item now has what it needs: each Records row can carry the reader's answer, groups can start open, the block can use the window's width, and the reply lists answers with their notes.
What an author does differently
- Write each part on a line, nets by name, and where it goes:
Q1 c b e BC547 @0,0,R_C vcc c 4.7k b@Q1.c 0,-1 v(this resistor'sbpin one unit above Q1's collector).packroutes the nets on a grid, adds ground symbols, junction dots and labels, and fails with the line and what to change on a part with no place, an unknown pin, parts on top of each other, a net it cannot route, a label with no room, an IC pin written twice, anncpin that touches anything, or a net that joins one pin or touches another (a part's lead counts as part of its pin). Symbols: resistor, capacitor, electrolytic, inductor, diode, zener, LED, switch, battery, voltage and current source, potentiometer, NPN and PNP, N and P MOSFET, op-amp, IC with named pins, terminals, supply rails and ground.kit schematichas the reference. - Parts link to the prose with
data-ref="R_C"; a net's name (vcc,gnd) lights its wires and junctions. Grounds always hang down: a pin on ground that faces up failspackand tells you to turn the part. A label must be nearer its own part than any other. The drawing follows light, dark and a page's tokens, fills the column up to part names at 16 px, shrinks to 10 px text and then scrolls sideways on a phone, and fits the paper in print. - A page with charts needs no change. The examples with charts go from 1.3 to 1.5 MB to 0.8 to 1.0 MB. ECharts is ready about 100 ms after the page loads (headless Chrome); until then the charts
packdrew stay in place and the live charts replace them as before. It needsDecompressionStream(Chrome 103, Firefox 113, Safari 16.4); an older browser keeps the drawn charts, and a chartpackcould not draw stays empty. - Client code that calls
Charts.makeneeds no change. Code that reads theechartsglobal directly (not through a chart'ssetup) runs before ECharts exists: wait forwindow.echartsReady. Recordstakesreply: { options: ["Agree", "Change", "Need context"], note: true }(the choices as a list of labels orvalue: labelpairs, asQuestion'soptions): every record gets those choices and an optional note beside its row, in the tree, table and board. The answers are kept across reloads like any control, and join the reply under the record's label (its leading text columns). No choice starts chosen, so a row the reader skipped shows. An answer stays when the reader changes view or a filter hides its row and brings it back. A block withreplycarrieskeepandreplyscripts, also when a client component of yours renders it later (one whose props are written out with noreplyand no spread brings neither). New label keysrecordsAnswerandrecordsNote.open: trueopens every group and every record's detail at load;open: 1(or another number up to the depth ofgroupBy) opens that many group levels. The hash writes only what the reader changed from there.width: "full"spans the window from gutter to gutter, beside the contents rail from the rail to the gutter, centred on the column and with the breadcrumbs where they were; it has no maximum width. Phones are unchanged.- Records is keyboard-navigable: one Tab stop on the rows, Up, Down, Home and End between rows, Right and Left to open, close and leave a group in the tree, Enter to follow a row's link or fold,
/to search. A block with areplyis always an island, so the keys work there. - Every reply, from
Questions and row answers alike, lists the answered items with their choice and note together, and folds the unanswered into one line,Not answered: .... An untouched default is still marked(default). Adata-notefield inside adata-replyelement is that element's note. - A
Recordsblock with no field that hassum: truedraws no Total row. - Code blocks wrap on phones, keeping their indentation; wide screens still scroll them.
guide.mdandSKILL.mdsay to show every item whole when the reader must judge each one, and to ask the person who asked for the page when the source cannot say what a reader needs.