Reference · SemText · Data & tables
<sem-data-visualizer>
SemText element
You put one or more sem-data-source children inside, plus any joins and queries. The container owns the shared state: which data set and query are active. With JavaScript off it shows the data as plain tables.
Children
-
<sem-data-source>Children: one or more `<sem-data-source>` (each a named data bucket); optional `<sem-data-join>` and `<sem-data-query>` declaration children (phase 5). -
<sem-data-join>Children: one or more `<sem-data-source>` (each a named data bucket); optional `<sem-data-join>` and `<sem-data-query>` declaration children (phase 5). -
<sem-data-query>Children: one or more `<sem-data-source>` (each a named data bucket); optional `<sem-data-join>` and `<sem-data-query>` declaration children (phase 5).
Example
Live render boots with JavaScript — the authored source is alongside.
variant: two buckets, one tools row
The container is the enhance unit: each direct `sem-data-source` renders its own captioned table with typed sort, and the container contributes one tools row above them all. With no `sem-data-query` child the buckets render as authored and nothing else is added.
Live render boots with JavaScript — the authored source is alongside.
variant: no id — the sole source names the link
`id` is optional. With no id the container is still linkable when it has exactly one named source: `Copy link` mints `#bucket=<data-name>` instead of `#dv=<id>`. With two or more sources and no id there is no name to mint, so the `Copy link` button is absent and `Expand` stands alone.
Live render boots with JavaScript — the authored source is alongside.
variant: query chrome + results
A `sem-data-query` child turns the container into a query workspace: an editable default query, a `Run` control and a row-count status, with the results table beneath. The declaration stays the document's record of the default query — the chrome is generated around it, never a replacement for it.
Live render boots with JavaScript — the authored source is alongside.
variant: join bucket + query
Shared container state: a `sem-data-join` materializes an extra bucket from two sources and the query then addresses it by name. All three declarations live inside the one container, which is what makes the derived bucket addressable at all.
Live render boots with JavaScript — the authored source is alongside.
variant: modal viewer (deep link)
`Expand` teleports the container's own children into a modal dialog — same enhance output, still live, with Esc and a focus trap. The same state is addressable as a link: `#dv=dv-modal&modal=1` reopens the viewer on load, and `#dv=dv-modal&view=operators` pins a declared view. The Render pane shows the container closed, so this state is captured from the fixture build rather than the pane.
variant: authoring error — inline payload with source=
An inline body and a `source` attribute together are contradictory declarations. The source renders a `role=alert` naming both and keeps its place in the container; the pair is never silently resolved to one or the other.
Live render boots with JavaScript — the authored source is alongside.
Source: spec/schema/sem-data-visualizer.md