blocks/spec-sheet
Import
Section titled “Import”import * as api from "@fungi.computer/caps/blocks/spec-sheet";Exports
Section titled “Exports”| 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”type SpecRulerProps = Omit<HTMLAttributes<HTMLDivElement>, "children"> & object;Props accepted by SpecRuler.
Type Declaration
Section titled “Type Declaration”| Name | Type | Description |
|---|---|---|
label |
ReactNode |
A short section label, such as 01 · Plans. |
SpecFramePropstype alias
Section titled “SpecFrameProps”type SpecFrameProps = Omit<HTMLAttributes<HTMLElement>, "children"> & object;Props accepted by SpecFrame.
Type Declaration
Section titled “Type Declaration”| 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. |
SpecFacttype alias
Section titled “SpecFact”type SpecFact = object;One fact in a SpecFacts strip.
Properties
Section titled “Properties”id: string;value: ReactNode;label: ReactNode;SpecFactsPropstype alias
Section titled “SpecFactsProps”type SpecFactsProps = Omit<HTMLAttributes<HTMLDListElement>, "children"> & object;Props accepted by SpecFacts.
Type Declaration
Section titled “Type Declaration”| Name | Type |
|---|---|
facts |
readonly SpecFact[] |
SpecSteptype alias
Section titled “SpecStep”type SpecStep = object;One step in a SpecSteps list.
Properties
Section titled “Properties”id: string;title: ReactNode;body: ReactNode;SpecStepsPropstype alias
Section titled “SpecStepsProps”type SpecStepsProps = Omit<HTMLAttributes<HTMLOListElement>, "children"> & object;Props accepted by SpecSteps.
Type Declaration
Section titled “Type Declaration”| Name | Type |
|---|---|
steps |
readonly SpecStep[] |
SpecFaqItemtype alias
Section titled “SpecFaqItem”type SpecFaqItem = object;One question in a SpecFaq list.
Properties
Section titled “Properties”id: string;question
Section titled “question”question: ReactNode;answer
Section titled “answer”answer: ReactNode;Caller-reviewed answer content.
SpecFaqPropstype alias
Section titled “SpecFaqProps”type SpecFaqProps = Omit<HTMLAttributes<HTMLDivElement>, "children"> & object;Props accepted by SpecFaq.
Type Declaration
Section titled “Type Declaration”| Name | Type | Description |
|---|---|---|
items |
readonly SpecFaqItem[] |
- |
defaultOpen? |
readonly string[] |
Ids of the items that start open. |
SpecDiagramMarkertype alias
Section titled “SpecDiagramMarker”type SpecDiagramMarker = object;One labelled part of a SpecDiagram, placed in percent of the art.
Properties
Section titled “Properties”id: string;tag: string;A short tag drawn on the art, such as A.
x: number;Distance from the art’s left edge, 0 to 100.
y: number;Distance from the art’s top edge, 0 to 100.
label: ReactNode;optional note?: ReactNode;SpecDiagramPropstype alias
Section titled “SpecDiagramProps”type SpecDiagramProps = Omit<HTMLAttributes<HTMLElement>, "children"> & object;Props accepted by SpecDiagram.
Type Declaration
Section titled “Type Declaration”| 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”type SpecPrintFilterProps = object;Props accepted by SpecPrintFilter.
Properties
Section titled “Properties”offset?
Section titled “offset?”optional offset?: object;Misregistration of the second ink, in CSS pixels. Defaults to 2, 1.
x: number;y: number;SpecRulerconstant
Section titled “SpecRuler”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”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”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”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”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”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()”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.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
__namedParameters |
SpecPrintFilterProps |
Returns
Section titled “Returns”Element