The elements
tickwave puts a capture into a web page with three custom elements. <tickwave-view> shows a whole
recording. <tickwave-inset> shows one annotated stretch of it, magnified. <tickwave-ref> turns a
phrase in the text into a reference: pointing at it opens an inset beside the text. A fourth,
<tickwave-chart>, in a module of its own, draws measurements against a setting. None of them
answers a key held with Alt, Ctrl or Cmd: those are the browser's, such as Alt with an arrow to go
back or forward.
Loading#
Include one module, and the three elements are defined:
<script type="module" src="tickwave.js"></script>
tickwave.js reads recordings through a decoder in a worker. The first time a page needs a
recording, it loads tickwave-worker.js and tickwave.wasm from beside itself, so keep the three
files together. They can be on another site, such as a release's directory on tickwave's site.
That site has to send them with Access-Control-Allow-Origin, as GitHub Pages does. The worker
then starts from a small script the page makes, which imports tickwave-worker.js from that site.
A page opened from disk can load them from a site this way, and its recordings too, by their full
URLs.
A page with a Content-Security-Policy has to allow 'unsafe-inline' in style-src, for the
styles in the elements' shadow roots. The decoder needs 'wasm-unsafe-eval' in script-src of
the policy its worker runs under. On the files' own site, that is the policy sent with
tickwave-worker.js, if there is one. When the files are on another site, it is the page's
policy, which then also has to allow blob: in worker-src, and that site in connect-src.
Recordings are fetched by byte range: the footer first, then only the channels and the span a view
shows. A server that ignores ranges still works, as long as it sends the whole file. A recording on
another site needs that site to send Access-Control-Allow-Origin, as GitHub Pages does. The
decoder then asks for the whole file and stops the read once the answer gives the file's size. So
a recording larger than the first read, 32 KiB by default, takes one more request to open.
A page that shows a closed view can write the view's title and facts into it. The view then lays
out before tickwave.js has loaded, and keeps its height once it has:
<link rel="stylesheet" href="tickwave.css">
<tickwave-view src="reads.tickwave">
<span slot="title">SWD reads</span>
<span slot="facts">524 ms; 2 channels: SWCLK, SWDIO; 4.7 KiB</span>
</tickwave-view>
tickwave.css lays out a view that is not defined yet the way the view lays out its summary, from
the two spans, with an empty cell where the button goes, and where the download links go too on a
view with download. Without scripts, that is what the reader sees. Put nothing else inside the
view. The sheet's rules carry no specificity, so any rule of the page's wins. So leave the view's
display alone: the sheet sets its own.
<tickwave-view>#
A whole recording. Closed, it shows the recording's title and, under it, the recording's length to three significant figures, its channels and its size, with an Open button beside them. A view of some of the channels names those out of the recording's, "2 of 3 channels: TCKC, TMSC", and gives the length they span. Once it scrolls into view, it fetches the recording's footer and, where the page names no channels, the stored view a sidecar or a bundle may give; nothing else. Open, all of that stays, and the button reads Close. Below it come the time axis, one row a channel, the annotations above the rows, and a readout under the rows. The button keeps the focus, and names its recording to a screen reader.
A page can write the title and the facts itself, as spans with slot="title" and slot="facts"
(see Loading). The view shows the page's text in place of its own. Once the footer is in, it compares
the two, taking any run of spaces as one, and warns in the console of each that differs. Where the
page names no channels and the recording has a sidecar, named or bundled, the facts count the
channels its stored view names. So the view reads that first, and only then fills in its own
facts, compares and sends its summary. A sidecar that doesn't read leaves the facts on every
channel. summary and the tickwave-summary event say that it has compared, so a page's check can
tell a match from a view whose footer never came.
| Attribute | Means |
|---|---|
src |
the recording's URL |
annotations |
its sidecar's TOML file. Without it, a recording with a bundled sidecar shows that |
channels |
the channels to show, by name, in order. Without it, those the sidecar's stored view names (ANNOTATIONS.md, "The stored view"), or else all of them. The view then goes as far as the furthest of them ends |
window |
what an open view shows first: two times ("317.8 ms 318.0 ms"), or an annotation's id. Without it, the stored view's span, or else the whole capture |
open |
open the view |
series |
a series name, such as verge: the traces take --series-verge. Without it, or where the page doesn't set that, the stored view's colour on the page's face, or else ink |
download |
a link in the summary that downloads the recording and, with annotations, a button that lists its sidecar's files to download (below) |
shaping |
shape the recording, as the Open page's converter does: a grip at each row's name moves its channel in time (sideways) or among the rows (up or down), and bars at its data's ends trim it. A move up or down rewrites channels. A group's head has a grip that moves the whole group in time (see groups). A derived channel has no grip or bars: it moves and trims with its first operand. Without it, there are no grips or bars, and no room kept for them |
Times in attributes are a decimal with a unit (s, ms, us, ns, ps), or a whole number of
ticks.
A sidecar's stored view applies once its sidecar is in: the view opens on the recording's footer,
then shows the stored channels and span. A bundled recording opened with no annotations,
channels or window reads its bundle first and draws its first frame in the stored view, so a
downloaded file looks as its page showed it.
With download, "Download" and, where the view has annotations, "Annotations" sit beside Open,
in its look. Download is a link that saves the recording as served, so a bundled file carries its
sidecar. Annotations is a button that opens a list over the page, under the button: a link to each
file of the sidecar, the hand-written file first, then each file it includes, in its order, each
under its own name. Pressed again, or with Escape, the list closes, and the focus going anywhere
else closes it too. The list takes the focus at its first link, and Escape gives it back to the
button. Each is named for its recording to a screen reader, as Open is: "Download SWD reads",
"Download the annotations of SWD reads", and in the list "Download swd.jsonl, from the annotations
of SWD reads".
Nothing is fetched until a link is clicked, with one exception. The list reads the hand-written file for the files it includes when it first opens, unless the view has read the sidecar already. Where that file doesn't read, the list offers it alone and says why. A browser takes a link's file name only for a file on the page's own site: one on another site downloads under the name its server gives it, or opens in the tab. A local file the page registered downloads under its own name, and lists the sidecar files it was registered with, under theirs. A merge preview, which no file holds, has no links.
The reader zooms with Ctrl or Cmd and the wheel, a trackpad pinch, or two fingers. The plain wheel scrolls the page, and the view says how to zoom. Shift with the wheel, a sideways swipe, a drag or the left and right arrow keys move along the capture: an arrow an eighth of the span shown, or half of it with Shift. With the view focused, the up and down arrows or plus and minus zoom in and out. Home and Fit show the whole capture, or all of the channels the view shows, with each analog channel's whole range. Escape clears the cursors and the selection, and so does Clear, at the end of the readout's first line while either is placed. A zoom step, and an arrow key's move, eases into place over about 150 ms, and the rows read for where it goes at once. A key pressed during an ease goes on from where the last one was going, and the view eases there from where it is drawn, so a held arrow key glides. A reader who prefers reduced motion sees each step jump there. So does any reader while the view's last three draws each took longer than a frame at 60 Hz, and an ease under way then ends. A drag, a swipe and the wheel move the view at once, and so do Home, Fit and stepping to an annotation. A window the page sets ends an ease there, unless it is the window the ease is going to.
Over an analog row's scale, Ctrl or Cmd with the wheel, or two fingers, zoom its values about the pointer instead, a drag moves them, and a double click fits them to the values in view. A scale takes the focus: up and down move it, plus and minus zoom it, Enter fits it and Home shows its whole range. Once a row's values are zoomed in, a drag over its traces with a mouse or a pen moves them too, as well as along the capture.
An analog row's whole range is the least and greatest value in its channel's coarsest overview, which are those of all its samples; the row reads that overview first. The plot draws nothing until every analog row's overview has landed, come back empty or failed, so the names column, which the scales' labels widen, is in place from the first frame. When the channels shown change, it keeps its last frame until the new rows' overviews are in. A channel with no overview, as in a merge preview whose recording's ticks don't fall on whole merged ticks, shows its name alone, with no scale, until the view has read all of it; its range then widens the names column.
A mouse over a row reads it at the pointer. An analog channel gives the value of the sample there in a label, or the smallest and largest value where one pixel covers several samples. On a digital channel, two spans mark the pulse there: one between its edges for its width, and one over its period to the next edge the same way. A label under the pulse gives its duty, its frequency and 1/width, the width's reciprocal as a rate (one UART bit's gives the baud rate). The width and the period sit on their spans once the row is tall enough for them. Until then the label gives them too, with the pulse's level. A pulse's edges can lie far past what the row has read, as on a quiet line zoomed in close. Once the pointer rests, the view finds them through the overview and reads just those. Moving within the pulse lets the search go on, and once found, the pulse reads at once anywhere in it. Where one pixel holds several edges, the label asks for a closer look. The label keeps to the edge of the rows away from the row it reads, so it never covers the wave there. In a plot too short for it, it runs past the plot's edge.
Each row's lower edge, in the names column, is a handle that sets the row's height. Drag it, or focus it and press the up and down arrows (Shift for bigger steps). Home and End give the row its least and greatest height, and Enter or a double click its default. The view grows and shrinks with its rows. Another recording starts every row at its default height.
A click places cursor A, and the next click cursor B; with the view focused, Enter places them at the middle of the view. A click's cursor snaps to an edge within 6 pixels on the row clicked. The readout gives both times, the interval between them, and each analog channel's value at each. That value is the last sample at or before the cursor, to the digit one code step carries. It also gives each digital channel's pulse at cursor A, with the figures the pointer gives.
A drag along the time axis selects a span. The readout gives its length and each channel's edges
in it. For one channel it gives the periods' count, minimum, median and maximum, and the running
clock. The running clock is the mean of the periods inside Tukey's fences, as the sidecar's
measures define it: it keeps a clock's jitter and quantisation, and drops pauses. The figures come
from a count of each distinct period, so their memory grows with how many different periods the
span holds, not with how many periods. Past 2,097,152 distinct periods, far more than a clock's,
the count, minimum and maximum stay exact, the median is null (the readout shows a dash in its
place), and the running clock is the mean of every period, the pauses included. The note says so.
tickwave-select's periods carries the same figures.
A menu beside the zoom buttons steps through one kind of annotation, "3 of 16". It starts with the kind of the annotation the view opened at, else the kind of the sidecar's first annotation. Clicking an annotation's label shows its span.
An annotation's paint draws its channels over its span in its role's look (ANNOTATIONS.md,
"Roles"). Between the zoom buttons and the menu, a key lists every role the sidecar declares, in
its order: each its label and a short line drawn as the role's lines are. It is the recording's
key, not the window's: it changes when the roles or the page's colours do, not as the reader moves.
It keeps to one line, cut where the toolbar runs out of room.
| Method or property | Does |
|---|---|
show(id, span?) |
opens the view at an annotation, over span ({start, end} in ticks) if one is given. Resolves once it has drawn |
reveal(id, span?) |
show(id, span), then brings the view into sight and puts the focus on its plot, as a reference, an inset or a chart's point does |
focus() |
puts the focus on the plot, or on the Open button while the view is closed |
setWindow(start, end) |
shows a span: ticks, or times such as "317.8 ms". Called before the footer arrives, it shows the span once it has |
settled() |
resolves once the view has drawn everything it shows |
tickAt(clientX) |
the tick under a point in the window, or null before the view has drawn |
open |
whether the view is open; setting it opens or closes it |
window |
where the view is going, {start, end} in ticks: the span shown, or while a zoom step eases, the span it eases to |
cursors |
cursors A and B, {a, b} in ticks; null where one is not placed |
selection |
the selected span, {start, end} in ticks, or null |
shaping |
the attribute, as a boolean |
shape |
each channel's shape, by its name: offset, the ticks it is moved by, and keep, the part of its own data kept ({from, to} in its ticks before the move), or null for all of it. A group's alignment is not in the offset. Setting it moves and trims the channels it names. Nothing changes the recording |
groups |
channels that belong together, such as the recordings of a merge: [{name, channels}], the channels by name. Each group's rows sit under a head row with its name. While the view shapes, a channel's grip moves its row only among its own group's rows |
aligns |
each group's alignment, by its name: the ticks all its channels are moved by, later when positive, on top of each channel's own offset. Setting it moves the groups it names |
annotationsText |
the sidecar's hand-written file as text, in place of the file at annotations, whose includes it still reads. The view redraws the annotations and keeps its place, cursors and selection. While it is set, the annotation lane shows even with nothing in it, so the first annotation added moves nothing. Null goes back to the file |
summary |
the recording's own title and facts, the facts as one line, and matches: whether the text the page slotted matches them. Null until the footer is in, and any stored view the facts wait on (above) |
| Event | When, and its detail |
|---|---|
tickwave-open |
the view opens: {src} |
tickwave-window |
the span shown changes: {start, end} |
tickwave-select |
a span is selected: its start, end, duration, edges by channel, and periods for the measured channel |
tickwave-cursor |
a cursor is placed or cleared: {a, b} in ticks, and {aTime, bTime}, each a time at the recording's resolution as text; null where a cursor is not placed |
tickwave-annotation |
an annotation's label is clicked: {id} |
tickwave-shape |
the reader moves, trims or reorders a channel, or moves a group: {shape, aligns, channels, change, channel}: the whole shape and aligns, the rows' names in order, what changed ("move", "trim", "order" or "align"), and the channel's name, or group and its name for "align" |
tickwave-ready |
the view has first drawn: {height} |
tickwave-summary |
the view has the footer, and any stored view the facts wait on, and has compared the page's title and facts with it: the summary. Again if the page slots other text |
tickwave-error |
something failed: {message, error}. The view also shows it, and logs it to the console |
<tickwave-inset>#
One annotation's span, magnified, with the annotation's label and text above it. The annotations
inside the span show as notes, and an annotation's paint draws a line in its role's look where
the role drives it.
An inset sweeps in from the left when it appears. Shown again within 800 ms of hiding, it doesn't
sweep again. A reader who prefers reduced motion sees it drawn at once.
| Attribute | Means |
|---|---|
src, annotations, channels, series |
as for <tickwave-view> |
annotation |
the annotation to show, by id. Set it to switch |
pad |
room either side of the span: a share of it ("10%", 6% by default) or a time |
scale |
a fixed time scale, such as "50 ns/px", so insets side by side compare |
sweep |
off to draw at once |
for |
the id of a <tickwave-view> to open at a note |
href |
a page to open the recording on at a note, such as tickwave's Open page |
An annotation's measure puts a reading under the trace, taken from the channel's own edges:
rateorperiod: the running clock over the span. The note says how many periods it used, such as "mean of 31 of 32 periods".duration: the time from the channel's first edge in the span to its last.
A reading shows only the digits its ticks support. The key to the roles' lines sits on a line of its own, under the reading: the roles painted within the annotation's span on the inset's channels, in the order the sidecar declares them, each its label and a short line in its look.
A reader can point at the inset. Pointing at a note lights its span, and the line under the trace gives the note's label, its length and who drives it, in place of the measure. That names a note too narrow to label. Pointing at a trace reads the pulse there, as the view's label does: its level and width, where it starts in the span, then its period, frequency and duty, as many of them as fit on the line. On an analog channel it reads the value. Moving away puts the measure back.
A reader can zoom in within the inset's span, as close as the view goes. Ctrl or Cmd with the wheel, a trackpad pinch, or two fingers zoom it. Zoomed in, a drag with the mouse or a finger moves along the span, as do Shift with the wheel and a sideways swipe. A drag opens nothing. The inset zooms out as far as its span and moves no further than its ends. A zoom step eases as the view's does. Where one pixel holds several edges, the line says how to zoom in. Shown again after 800 ms, or at another annotation, the inset shows its whole span.
The inset is one Tab stop, named by its label. The up and down arrow keys zoom in and out, about the lit note or else the middle. The left and right arrows move along the span. Shift with left or right steps through the notes, and a screen reader says each. Zoomed in, the span moves to take in the note stepped to. Escape lights none. On a touch screen, a tap lights a note or reads a pulse.
With for or href, the inset opens the recording at a note. A click on a note, Enter on the
note the keys lit, or a second tap on a lit note opens it there. A click elsewhere on the plot
opens it at the inset's own annotation. Open, at the end of the line under the trace, opens it as a
click on the plot does: at the lit note, or else at the annotation. On a touch screen it is how a
finger opens the inset with no note lit. Zoomed in, the recording opens over the span the inset
shows. for opens a view on the page, and wins where it names one. Otherwise href makes the
inset a link to that page: tickwave's Open page, or any page that reads the same parameters. The
inset sets src, annotations and annotation in the page's query, and window while zoomed in:
the span shown, in whole ticks. It keeps the page's other parameters. While the whole span shows,
it drops any window the address had. A recording on the same site goes in by its path, and
another site's whole. As a link, the inset opens a new tab on a middle click or a Ctrl or Cmd
click, and shows its address on hover.
Such an inset marks where it opens, with a small "Opens here" over the plot that moves nothing. It sits on the note lit by the pointer, a tap or the keys. With no note lit, it sits at the start of the span shown while the keys' focus is on the inset, where Enter opens, or the pointer is on Open.
An inset the pointer passes through, as in a chart's popover, where pointer-events is none,
does none of this. Inside a popover the inset is no Tab stop, and the element that opened it keeps
the focus. A reference passes its arrow keys to arrowKey(event), which answers them as the
inset's own and says whether it did. It reads the lit note from lit and the zoomed span from
zoomed only while its popover is open, and lights none with clear() as the popover closes.
An inset takes its final height once its recording's footer and sidecar are in. The line under the
trace is held from then, where the annotation asks for a measure or a reader can point at the
inset, so neither the data's arrival nor the pointer moves anything below it. Before then it has
no label and no rows to size by. A page that wants nothing to move at all gives the inset its height, as
tickwave's main page does for the figure beside its name. settled() and the tickwave-ready
event ({annotation, height}) work as on the view, so a page can lay itself out around an inset's
final height. sweeping says whether the sweep is playing. window gives the span shown,
{start, end} in ticks, and zoomed the span the reader has zoomed to, or null while the whole
span shows, as it does again when the inset is shown after 800 ms hidden. While a zoom step eases,
window gives the span drawn on the way and zoomed where it is going.
<tickwave-ref>#
A phrase that cites an annotation. Pointing at it, or reaching it with Tab, opens an inset in a popover beside the text, so nothing on the page moves. The pointer can move into the popover to read the inset, and has 300 ms to cross between the text and the popover. Moving the pointer or the focus away, or Escape, closes the popover. With the focus on the reference, the arrow keys work the inset as they do an inset with the focus. A click, Enter or Space opens its view at the note the pointer or the keys lit, or else at the annotation, and over the span the reader zoomed the popover to. With a view to open, the popover's inset has Open, which does the same.
A finger has no hover. On a touch screen, a tap on the phrase opens the popover and nothing else, and the next tap on the phrase closes it. The inset's Open opens the view. A finger held on the phrase that turns into a scroll closes the popover. With the popover closed, as after Escape, the view opens at the annotation's own span. A screen reader cannot reach into the drawn inset, so the annotation's label and text describe the reference itself.
| Attribute | Means |
|---|---|
annotation |
the annotation it cites |
for |
the id of a <tickwave-view> to share a recording with. The reference takes its src, annotations, channels and series |
src, annotations, series |
the recording, sidecar and series, for a reference without a view |
A reference fetches nothing until it scrolls into view. Then it fetches the recording's footer and the sidecar, and the inset fetches the data when it opens.
<tickwave-chart>#
Measurements against a setting, such as throughput against the clock asked for: a line through
each series' points. It is its own module, tickwave-chart.js, and loads nothing else:
<script type="module" src="tickwave-chart.js"></script>
<figure>
<tickwave-chart src="figure1.chart.json" legend="above" end-labels table="table-1"></tickwave-chart>
<figcaption>Figure 1. 4 KiB writes against the SWD clock asked for.</figcaption>
</figure>
The chart draws SVG into its own children, not a shadow root, and writes its colours as
attributes. So Firefox's reader view, and a page without its CSS, still show the figure. Its
caption names it, and the table it names describes it. A reader picks a setting by pointing at it,
tapping it or stepping to it with the arrow keys, and picks a series from the legend or a line's
end label. A point can name a recording and one of its annotations. Pointing at it opens an inset
of that annotation, and a click opens the page's view of the recording there. On a touch screen, a
tap shows the inset, and its popover's Open opens the view. Only once an inset opens does the chart
load tickwave.js, from beside itself.
CHARTS.md, at the repository's root, specifies the data format, tickwave-chart/1, and every
attribute, property and event. tickwave.css reserves a chart's room before the module defines it,
from --tickwave-chart-height and --tickwave-chart-readout-lines, as it lays out a closed view. Besides the properties below, the chart reads the line patterns
(--dash-second-build, --dash-reference, --dash-capture-second, --dash-misread),
--capture-width, --capture-opacity and --fault-ink.
Styling#
The elements draw in the page's own colours and fonts. They read the page's CSS custom properties and fall back to system colours on a page without them:
| Property | Draws |
|---|---|
--ink, --ink-2 |
text, traces, cursors; secondary text |
--page, --surface, --raised |
the backgrounds under the elements and their controls |
--hair, --rule |
dividers; control outlines |
--wash |
what the pointer is on |
--attention-ink |
a notice of a problem |
--series-<name> |
the traces, with series="<name>". Where the page doesn't set it, the recording's stored colour |
--tickwave-role-<name> |
the lines paint role <name> draws, over the colour its declaration gives (ANNOTATIONS.md, "Roles") |
--tickwave-role-<name>-weight |
CSS pixels the role's lines add to the line weight, from 0 to 4, with or without px |
--tickwave-role-<name>-dash |
the role's dash and gap lengths, in line widths, as its declaration gives them: numbers apart by spaces or commas, in pairs, together at least 1. none draws a dashed role solid |
--tickwave-line-weight |
the traces' lines in a view and an inset: an analog trace, and a digital row's levels and edges. A number of CSS pixels, with or without px; 1.5 where it is unset or not a positive number. A role's weight adds to it. Rules, axes, the selection and markers stay a pixel wide. The chart doesn't read it |
--font-text, --font-figures |
labels; the readouts' figures |
A digital row reads at most 2,097,152 edges for a view, the view's and a view's width either side. Where the overview it holds can't rule more out, it counts them from the recording's index first. Where those hold more, as a burst far busier than the rest of a long capture can, the row draws its finest overview level, each bucket across the columns it spans, until the view narrows enough.
While a zoom's finer data loads, a row draws the coarser data it has. Where that data shows a change it cannot yet place, the row draws it in the trace's colour, faded. A read still going after 5 s puts "Still loading" in the element's notice until it lands. A read that fails puts "Data did not load" there, with the cause, and the stretch stays faded. The row asks again when the view next redraws, 3 s or more later, and the notice goes once the read lands.
Each field of a role's look comes from the page's property where it sets one, then from the role's
declaration. A colour neither gives comes from the role's place in the order of declarations: the
first role in the trace's colour, the rest in ink. A dash neither gives is a solid line. A role's
value that doesn't read, such as a weight of 5, is left to the declaration. The elements follow a
change of face as it happens: a data-face, a class or a style on <html> that changes the tokens,
or the system's preference. A change there that leaves the tokens alone, such as a header marking
the page scrolled, redraws nothing. A declared colour takes the face's: the day colour while the
page is lighter than its ink, the night colour while it is darker.
The elements take a new face in the frame after it changes. A view's and an inset's panels and text follow the page's CSS, and their canvas redraws in that frame. A chart's colours follow the page's CSS without a redraw.
Each element exposes its pieces to ::part(). On the view: summary, title, facts,
open-button (Open, or Close while the view is open), download-button (Download and
Annotations), annotations-download-button (Annotations), annotations-download-list (the list it
opens), annotations-download-link (each link in the list), annotations-download-note (why the
list holds the hand-written file alone), viewer, toolbar, key, plot, hint, reading (the
label at the pointer), row-handle, readout, steps, notice and button (each button, and
the Download link).
Inside facts, each fact is a fact and also fact-length, fact-channels or fact-size, with
a fact-separator ("; ") between two. On the inset: inset, label, text, frame, canvas,
plot (over the canvas, what the pointer and the keys reach), foot, measure, reading (what
the pointer or the keys lit), key and notice. On the reference: popover.
A part an element hides stays hidden, whatever display a page's rule gives it. A page's slotted
spans sit inside title and facts, and take the page's own rules.
A page sets the view's summary through these properties, set on the view or above it. tickwave.css
reads them too, which ::part() cannot reach, so a view styled this way keeps its height when it
is defined:
| Property | Sets | Without it |
|---|---|---|
--tickwave-summary-padding |
the summary's padding | 8px 10px 8px 14px |
--tickwave-summary-gap |
the gap between its rows, and between the text and the button | 2px 12px |
--tickwave-summary-border-width |
its border's widths | 1px |
--tickwave-summary-border-color |
its border's colour | var(--hair) |
--tickwave-summary-background |
its background | var(--surface) |
--tickwave-summary-radius |
its corners' radius | 10px |
--tickwave-title-size |
the title's font size | the view's |
--tickwave-facts-size |
the facts' font size | 13px |
--tickwave-open-button-size |
the Open button's font size | 13px |
--tickwave-open-button-padding |
its padding | 3px 9px |
--tickwave-open-button-height |
its least height | 26px |
The title and the facts take the view's font-size and line-height. The title is weight 600 and
breaks anywhere it must; a page that changes that, or the facts' colour, styles its own spans.
Nothing moves under the reader. A readout's figures are tabular, and an inset's reading sets a pulse's level as wide as "high" either way, so what follows it holds still as the pointer crosses edges. A line of a readout, or of an inset's foot, is as tall from the first as once its figures come: a selection's counts and periods show "…" in the figures' font, and the periods' menu, while they are worked out. The label at a view's pointer keeps off the row it reads. An inset takes its final height once its footer and sidecar are in, so the data arriving moves nothing below it. A control stays where the reader pressed it. One that opens or switches something undoes it when pressed again: a view's Open button reads Close while the view is open, and is as wide either way.
From the module#
tickwave.js also exports these functions:
| Function | Does |
|---|---|
registerFile(file, sidecar) |
makes a local File a src. The sidecar's .toml and .jsonl files can come with it |
registerLoader(loader) |
reads recordings at the URLs loader.accepts, asked before the loaders registered earlier |
recordingInfo(src) |
what a recording holds, from its footer: title, length, channels, size, content id |
previewMerge(inputs) |
several recordings on one time axis, as tickwave merge would put them: inputs is [{src, stem}], each with its file's name without the extension. Resolves to {src, merged}: a src a view draws, and the preview, whose mergedInfo gives each channel's name (a later recording's clashing name takes its stem, as stem/name), origin(channel) the recording it comes from, and ratios the merged ticks in one of each recording's, as {num, den}. The preview ticks at the least common multiple of the recordings' rates, or at the fastest of them where the multiple has a term past 2^53, as tickwave merge does. Every recording starts at tick 0; a view moves them with aligns |
resolveSidecar(src, text, annotations) |
the annotations of a sidecar whose hand-written file is text, checked against the recording as tickwave annotations check checks them. Its includes are read beside annotations, the sidecar's address, or from the files registered with the recording when that is null. Rejects with every problem, one a line |
readSidecar(src, text, annotations) |
as resolveSidecar, resolving to {annotations, roles, view}: the annotations, the roles the sidecar declares in their order, and its stored view, in ticks, or null |
configure({firstRead, maxDecodedBytes, cacheBytes}) |
the size of the first read, from a recording's end, 32 KiB by default; the most the decoder takes from one block, overview block or strip, 64 MiB, past which it refuses the recording; and the size of the cache of decoded blocks and index pages, 192 MiB |
From tickwave, where changes to this page go.