Skip to content
API reference

blocks/spec-sheet

Import
import * as api from "@fungi.computer/caps/blocks/spec-sheet";
Kind Export Description
type alias SpecRulerProps Props accepted by SpecRuler.
type alias SpecFrameProps Props accepted by SpecFrame.
type alias SpecFact One fact in a SpecFacts strip.
type alias SpecFactsProps Props accepted by SpecFacts.
type alias SpecStep One step in a SpecSteps list.
type alias SpecStepsProps Props accepted by SpecSteps.
type alias SpecFaqItem One question in a SpecFaq list.
type alias SpecFaqProps Props accepted by SpecFaq.
type alias SpecDiagramMarker One labelled part of a SpecDiagram, placed in percent of the art.
type alias SpecDiagramProps Props accepted by SpecDiagram.
type alias SpecPrintFilterProps Props accepted by SpecPrintFilter.
constant SpecRuler A tick-marked rule that separates sections, with crosshairs at both ends. It is decorative: the section heading carries the accessible name.
constant SpecFrame A figure seated in a hatched band, like a plate in a printed manual.
constant SpecFacts A ruled strip of short facts: a big value over a small label.
constant SpecSteps A numbered row of steps in ruled cells, numbered 01, 02 and on.
constant SpecFaq Questions and answers as native disclosures. It works without JavaScript, and every answer stays in the document for search and find-in-page.
constant SpecDiagram A manual-style parts diagram: tags drawn on the art and a legend that names each part. The legend is the accessible text; tags are decorative.
function SpecPrintFilter() The #caps-print SVG filter, rendered once per page. It turns 1-bit art (dark ink on light paper) into the theme’s ink on a transparent ground, with a second ink printed slightly off register underneath, like a two-drum risograph. Art opts in through the theme’s --caps-print-filter; the inks come from --caps-print-ink and --caps-print-offset.

SpecRulerPropstype alias

Section titled “SpecRulerProps”
Signature
type SpecRulerProps = Omit<HTMLAttributes<HTMLDivElement>, "children"> & object;

Props accepted by SpecRuler.

Name Type Description
label ReactNode A short section label, such as 01 · Plans.

SpecFramePropstype alias

Section titled “SpecFrameProps”
Signature
type SpecFrameProps = Omit<HTMLAttributes<HTMLElement>, "children"> & object;

Props accepted by SpecFrame.

Name Type Description
children ReactNode Caller-owned media, such as an img with its own alt text.
caption? ReactNode A short printed caption under the frame.
surface? "default" | "inverse" inverse seats dark media, such as a terminal readout, in the frame.

Signature
type SpecFact = object;

One fact in a SpecFacts strip.

Signature
id: string;
Signature
value: ReactNode;
Signature
label: ReactNode;

SpecFactsPropstype alias

Section titled “SpecFactsProps”
Signature
type SpecFactsProps = Omit<HTMLAttributes<HTMLDListElement>, "children"> &
object;

Props accepted by SpecFacts.

Name Type
facts readonly SpecFact[]

Signature
type SpecStep = object;

One step in a SpecSteps list.

Signature
id: string;
Signature
title: ReactNode;
Signature
body: ReactNode;

SpecStepsPropstype alias

Section titled “SpecStepsProps”
Signature
type SpecStepsProps = Omit<HTMLAttributes<HTMLOListElement>, "children"> &
object;

Props accepted by SpecSteps.

Name Type
steps readonly SpecStep[]

SpecFaqItemtype alias

Section titled “SpecFaqItem”
Signature
type SpecFaqItem = object;

One question in a SpecFaq list.

Signature
id: string;
Signature
question: ReactNode;
Signature
answer: ReactNode;

Caller-reviewed answer content.


SpecFaqPropstype alias

Section titled “SpecFaqProps”
Signature
type SpecFaqProps = Omit<HTMLAttributes<HTMLDivElement>, "children"> & object;

Props accepted by SpecFaq.

Name Type Description
items readonly SpecFaqItem[] -
defaultOpen? readonly string[] Ids of the items that start open.

SpecDiagramMarkertype alias

Section titled “SpecDiagramMarker”
Signature
type SpecDiagramMarker = object;

One labelled part of a SpecDiagram, placed in percent of the art.

Signature
id: string;
Signature
tag: string;

A short tag drawn on the art, such as A.

Signature
x: number;

Distance from the art’s left edge, 0 to 100.

Signature
y: number;

Distance from the art’s top edge, 0 to 100.

Signature
label: ReactNode;
Signature
optional note?: ReactNode;

SpecDiagramPropstype alias

Section titled “SpecDiagramProps”
Signature
type SpecDiagramProps = Omit<HTMLAttributes<HTMLElement>, "children"> & object;

Props accepted by SpecDiagram.

Name Type Description
art ReactNode Caller-owned art, such as an img with its own alt text.
markers readonly SpecDiagramMarker[] -

SpecPrintFilterPropstype alias

Section titled “SpecPrintFilterProps”
Signature
type SpecPrintFilterProps = object;

Props accepted by SpecPrintFilter.

Signature
optional offset?: object;

Misregistration of the second ink, in CSS pixels. Defaults to 2, 1.

Signature
x: number;
Signature
y: number;

SpecRulerconstant

Section titled “SpecRuler”
Signature
const SpecRuler: ForwardRefExoticComponent<
Omit<HTMLAttributes<HTMLDivElement>, "children"> &
object &
RefAttributes<HTMLDivElement>
>;

A tick-marked rule that separates sections, with crosshairs at both ends. It is decorative: the section heading carries the accessible name.


SpecFrameconstant

Section titled “SpecFrame”
Signature
const SpecFrame: ForwardRefExoticComponent<
Omit<HTMLAttributes<HTMLElement>, "children"> &
object &
RefAttributes<HTMLElement>
>;

A figure seated in a hatched band, like a plate in a printed manual.


SpecFactsconstant

Section titled “SpecFacts”
Signature
const SpecFacts: ForwardRefExoticComponent<
Omit<HTMLAttributes<HTMLDListElement>, "children"> &
object &
RefAttributes<HTMLDListElement>
>;

A ruled strip of short facts: a big value over a small label.


SpecStepsconstant

Section titled “SpecSteps”
Signature
const SpecSteps: ForwardRefExoticComponent<
Omit<HTMLAttributes<HTMLOListElement>, "children"> &
object &
RefAttributes<HTMLOListElement>
>;

A numbered row of steps in ruled cells, numbered 01, 02 and on.


SpecFaqconstant

Section titled “SpecFaq”
Signature
const SpecFaq: ForwardRefExoticComponent<
Omit<HTMLAttributes<HTMLDivElement>, "children"> &
object &
RefAttributes<HTMLDivElement>
>;

Questions and answers as native disclosures. It works without JavaScript, and every answer stays in the document for search and find-in-page.


SpecDiagramconstant

Section titled “SpecDiagram”
Signature
const SpecDiagram: ForwardRefExoticComponent<
Omit<HTMLAttributes<HTMLElement>, "children"> &
object &
RefAttributes<HTMLElement>
>;

A manual-style parts diagram: tags drawn on the art and a legend that names each part. The legend is the accessible text; tags are decorative.

SpecPrintFilter()function

Section titled “SpecPrintFilter()”
Signature
function SpecPrintFilter(__namedParameters): Element;

The #caps-print SVG filter, rendered once per page. It turns 1-bit art (dark ink on light paper) into the theme’s ink on a transparent ground, with a second ink printed slightly off register underneath, like a two-drum risograph. Art opts in through the theme’s --caps-print-filter; the inks come from --caps-print-ink and --caps-print-offset.

Parameter Type
__namedParameters SpecPrintFilterProps

Element