<talos-spacecraft> is the deepest magnification of the drill-down: one
satellite drawn as its physical parts. The central bus, the GPU payload, two
solar wings, two radiator panels and the downlink antenna are each a selectable
hotspot whose colour is that subsystem’s band. The form of the object is the
readout.
Default — .parts
<talos-spacecraft label="sat P03-S11"></talos-spacecraft>
<script type="module">
const el = document.querySelector("talos-spacecraft");
el.parts = {
bus: { band: 0 }, gpu: { value: 91, band: 2 },
solarL: { band: 0 }, solarR: { band: 1 },
radL: { band: 0 }, radR: { band: 0 }, antenna: { band: 0 },
};
el.addEventListener("talos:part", (e) => el.setAttribute("selected", e.detail.part));
</script>
The demo re-assigns .parts every second and toggles eclipse every few
seconds. In eclipse the solar wings dim: they make no power in shadow, which is
a state, not a style.
Data
| Property | Shape | Effect |
|---|---|---|
parts | { [id]: { value?, band } } | ids bus, gpu, solarL, solarR, radL, radR, antenna; unset parts read nominal |
A click on a part emits talos:part with { part }.
Keyboard focus goes to a role="listbox" inside the shadow root, not to the
host: arrow keys move between parts and Enter or Space emits talos:part for
the focused one. The host carries no role, aria-label or tabindex.
Attributes
Generated from custom-elements.json in the installed package.
Shared attributes (state, format, static…) behave as the
instrument contract describes.
| Attribute | Type | Default | Description |
|---|---|---|---|
selected | string | — | the highlighted part id. |
eclipse | boolean | — | solar wings dark (no sun) |
label | string | — | accessible label. |
state | string | — | live | loading | stale | offline | unknown; sets data-state on the host |
updated-at | string | — | time of the last sample (ISO or epoch ms); drives the age caption |
stale-after | string | — | seconds after updated-at at which the element reads stale |
format | string | — | number | compact | percent | bytes | duration | currency; the readout's number format |
precision | string | — | fraction digits of the formatted value |
currency | string | — | ISO 4217 code when format=currency |
locale | string | — | BCP 47 locale for formatting; defaults to the page locale |
Properties and methods
| Member | Type | Description |
|---|---|---|
.parts | Parts |
Events
| Event | Type | Description |
|---|---|---|
talos:part | CustomEvent<{ part }> | Bubbles and is composed. |
CSS parts
::part(svg)