skip to the page

@jam-overture/loom-primitives/compositions

The starter library's seventy-two bands under their own names, for assembling a page without going through the catalog.

Everything below is exported from that import. The names, the signatures and the sentences are read from the package itself rather than written here, so this page says what the copy of Loom in your node_modules says — and it changes in the same pull request the code does.

110 exports, in 82 modules. Generated from ./dist/primitives/compositions/index.d.ts, which is the declaration file this package publishes for @jam-overture/loom-primitives/compositions. Each comment inside a declaration is shown as its first paragraph. The whole of it is in that file.

Nothing to install first. Everything this import loads arrives with @jam-overture/loom-primitives itself.

No import here has everything behind it. @jam-overture/loom-primitives/compositions publishes 110 of the 2,237 names this package publishes. The other 2,127 are behind one of the 19 other imports, and 18 of those 19 publish nothing this one does. The imports do not nest: a name that is not on this page is not a name that does not exist, and the search at the top of the page says which import it comes from.

Some of these names are published elsewhere too: 35 by @jam-overture/loom-primitives — the same declarations reached through two doors, so either import gives you the same thing.

Compositions

primitives/compositions

STARTER_COMPOSITIONSvalue

Every band on offer — the phrasebook, not the page.

const STARTER_COMPOSITIONS: readonly Composition[]

CATALOGUE_TYPESvalue

Every primitive type some band in the phrasebook builds, sorted.

Shown in use on Starting from a band — Registering only what the bands need

const CATALOGUE_TYPES: readonly string[]

compositionByIdfunction

The band with this id, or undefined.

Shown in use on Starting from a band — Ask for one by name

const compositionById: (id: string) => Composition | undefined

compositionsForPartfunction

Every design of one band, in catalogue order, canonical design first.

Shown in use on Starting from a band — Parts and designs are two different words

const compositionsForPart: (part: CompositionPart) => readonly Composition[]

PAGE_SEQUENCEvalue

One design of each band, in the order a page uses them.

Shown in use on Starting from a band — A whole page to start from

const PAGE_SEQUENCE: readonly Composition[]

DOCUMENT_COMPOSITIONSvalue

Every design of every region of an interior document.

const DOCUMENT_COMPOSITIONS: readonly DocumentComposition[]

DOCUMENT_DESIGNSvalue

Which design each region of a document takes.

const DOCUMENT_DESIGNS: Readonly<Record<DocumentPart, string>>

DOCUMENT_SEQUENCEvalue

One design of each region of an interior document, in the order a reader meets them.

const DOCUMENT_SEQUENCE: readonly (Composition | DocumentComposition)[]

DOCUMENT_TYPESvalue

The primitive types the document sequence needs, which is the second half of the registry a host building both kinds of page registers:

const DOCUMENT_TYPES: readonly string[]

Articles band

primitives/compositions/articles-band

articlesBandvalue

const articlesBand: Composition

Articles index band

primitives/compositions/articles-index-band

The writing band as an archive rather than as a shop window — every piece in two columns, and the way to the rest of them underneath.

articlesIndexBandvalue

const articlesIndexBand: Composition

Banner band

primitives/compositions/banner-band

bannerBandvalue

The strip above everything — the first thing on the page and the first part this catalogue has ever had that sits above the navigation.

const bannerBand: Composition

Banner inline band

primitives/compositions/banner-inline-band

bannerInlineBandvalue

The strip whose sentence *is* the link, and the answer to the one row the designs-per-part instrument had left.

const bannerInlineBand: Composition

Bento band

primitives/compositions/bento-band

bentoBandvalue

const bentoBand: Composition

Bento mixed band

primitives/compositions/bento-mixed-band

bentoMixedBandvalue

const bentoMixedBand: Composition

Catalogue band

primitives/compositions/catalogue-band

catalogueBandvalue

const catalogueBand: Composition

Changelog band

primitives/compositions/changelog-band

changelogBandvalue

const changelogBand: Composition

Changelog notes band

primitives/compositions/changelog-notes-band

changelogNotesBandvalue

const changelogNotesBand: Composition

Changelog year band

primitives/compositions/changelog-year-band

A year of releases, with the way to follow them standing still beside them.

changelogYearBandvalue

const changelogYearBand: Composition

Code band

primitives/compositions/code-band

codeBandvalue

const codeBand: Composition

Code session band

primitives/compositions/code-session-band

codeSessionBandvalue

const codeSessionBand: Composition

Comparison band

primitives/compositions/comparison-band

comparisonBandvalue

const comparisonBand: Composition

Comparison ways band

primitives/compositions/comparison-ways-band

comparisonWaysBandvalue

const comparisonWaysBand: Composition

Comparison wipe band

primitives/compositions/comparison-wipe-band

comparisonWipeBandvalue

const comparisonWipeBand: Composition

Composition

primitives/compositions/composition

COMPOSITION_PARTSvalue

The bands a page is made of, in the order a page uses them.

const COMPOSITION_PARTS: readonly ["banner", "nav", "hero", "proof", "features", "bento", "steps", "code", "integrations", "metrics", "specs", "pricing", "comparison", "testimonials", "credentials", "team", "articles", "changelog", "faq", "contact", "cta", "footer"]

CompositionParttype

type CompositionPart = (typeof COMPOSITION_PARTS)[number];

Compositiontype

A band of a page, dropped in whole as one operation.

type Composition = {
    /**
     * Lower-case words joined by hyphens, the way an anchor or a slot name is.
     */
    readonly id: string;
    /** Which band of a page this is a design of. */
    readonly part: CompositionPart;
    /** What a person choosing it from a list reads. */
    readonly label: string;
    /**
     * What lands on the page, in one clause, said before it happens.
     */
    readonly promise: string;
    /** The interpreter's own words about why this subtree answers that ask. */
    readonly rationale: string;
    /** Every primitive type the subtree uses, for the catalogue and the audit. */
    readonly uses: readonly string[];
    readonly build: (ids: IdFactory) => ElementNode;
};

Bandtype

A band of some page kind, which is all that planning one needs to know.

type Band = Omit<Composition, "part"> & {
    readonly part: string;
};

COMPOSITION_INTERPRETERvalue

What produced the delta, for Provenance.interpreter. Not a model.

const COMPOSITION_INTERPRETER = "loom/composition"

CompositionTargettype

Where the band goes.

type CompositionTarget = {
    readonly parentId?: NodeId;
    /** Clamped to the parent's current child count, never trusted as an index. */
    readonly index?: number;
};

CompositionPlantype

type CompositionPlan = {
    readonly outcome: "planned";
    readonly operations: readonly TreeOperation[];
}
/**
 * The named parent is not in this tree, so there is nowhere to put the band.
 */
 | {
    readonly outcome: "no-such-parent";
    readonly parentId: NodeId;
};

planCompositionfunction

One insert, computed against the tree as it stands.

Shown in use on Starting from a band — It goes on the page as one insert

const planComposition: (composition: Band, tree: LoomTree, ids: IdFactory, target?: CompositionTarget) => CompositionPlan

compositionInterpreterfunction

A composition as an ordinary ChangeInterpreter.

Shown in use on Starting from a band — Nothing gets to skip the Gate

const compositionInterpreter: (composition: Band, idFactory: IdFactory, clock: Clock, target?: CompositionTarget) => ChangeInterpreter

Contact band

primitives/compositions/contact-band

contactBandvalue

const contactBand: Composition

Contact details band

primitives/compositions/contact-details-band

contactDetailsBandvalue

const contactDetailsBand: Composition

Contact split band

primitives/compositions/contact-split-band

contactSplitBandvalue

const contactSplitBand: Composition

Conversation band

primitives/compositions/conversation-band

conversationBandvalue

const conversationBand: Composition

Credentials band

primitives/compositions/credentials-band

credentialsBandvalue

const credentialsBand: Composition

Credentials posture band

primitives/compositions/credentials-posture-band

credentialsPostureBandvalue

const credentialsPostureBand: Composition

Cta band

primitives/compositions/cta-band

ctaBandvalue

The last band: ask again, at a reading width, on the accent ground.

const ctaBand: Composition

Cta booking band

primitives/compositions/cta-booking-band

ctaBookingBandvalue

const ctaBookingBand: Composition

Cta overlay band

primitives/compositions/cta-overlay-band

ctaOverlayBandvalue

The closing ask as a panel the words sit inside, rather than a band they sit on.

const ctaOverlayBand: Composition

Cta signup band

primitives/compositions/cta-signup-band

ctaSignupBandvalue

const ctaSignupBand: Composition

Depiction

primitives/compositions/depiction

A band built as a **picture of a page** rather than as a page.

DEPICTION_DROPSvalue

The props a depiction does not carry, whatever holds them.

const DEPICTION_DROPS: readonly string[]

DEPICTION_SUBSTITUTIONSvalue

The one primitive a depiction renders as a different primitive.

const DEPICTION_SUBSTITUTIONS: Readonly<Record<string, PrimitiveType>>

depictedfunction

The same subtree as a picture of itself: no destinations, no addresses, and every node's ids, props and children otherwise its own.

const depicted: (node: LoomNode) => LoomNode

depictionOffunction

A band of either catalogue, built as a picture of a page.

const depictionOf: (band: Band, ids: IdFactory) => ElementNode

Details band

primitives/compositions/details-band

detailsBandvalue

Five answers that are **not a paragraph** — a list, a plan comparison, a command to run, a link to go and read — folded one at a time.

const detailsBand: Composition

Document

primitives/compositions/document

DOCUMENT_PARTSvalue

The regions of an interior document, in the order a reader meets them.

const DOCUMENT_PARTS: readonly ["nav", "trail", "document", "onward", "footer"]

DocumentParttype

type DocumentPart = (typeof DOCUMENT_PARTS)[number];

DocumentCompositiontype

A band of an interior document.

type DocumentComposition = Omit<Composition, "part"> & {
    readonly part: DocumentPart;
};

Document band

primitives/compositions/document-band

The text itself — one continuous document, with the way around it beside it.

documentBandvalue

const documentBand: DocumentComposition

Episodes band

primitives/compositions/episodes-band

episodesBandvalue

const episodesBand: Composition

Faq aside band

primitives/compositions/faq-aside-band

faqAsideBandvalue

const faqAsideBand: Composition

Faq band

primitives/compositions/faq-band

faqBandvalue

const faqBand: Composition

Faq grid band

primitives/compositions/faq-grid-band

faqGridBandvalue

const faqGridBand: Composition

Features alternating band

primitives/compositions/features-alternating-band

featuresAlternatingBandvalue

const featuresAlternatingBand: Composition

Features band

primitives/compositions/features-band

featuresBandvalue

const featuresBand: Composition

Features folded band

primitives/compositions/features-folded-band

featuresFoldedBandvalue

The features band for a product with more capability than a tile can hold: five headings a reader scans, each one opening onto what it actually does.

const featuresFoldedBand: Composition

Features tour band

primitives/compositions/features-tour-band

The product holds still, and its features go past it one at a time, each one marked on the screen it is talking about.

featuresTourBandvalue

const featuresTourBand: Composition

Feed band

primitives/compositions/feed-band

feedBandvalue

The writing band as a page that has a blog draws it: one node that asks where the posts are, and the region it shows until something answers.

const feedBand: Composition

Hero band

primitives/compositions/hero-band

heroBandvalue

The first screen: an eyebrow, a claim, a sentence, and two ways in.

Shown in use on Starting from a band — Where the names live

const heroBand: Composition

Hero shot band

primitives/compositions/hero-shot-band

heroShotBandvalue

The hero with the product shot in it, which this catalogue has never had.

const heroShotBand: Composition

Hero split band

primitives/compositions/hero-split-band

heroSplitBandvalue

const heroSplitBand: Composition

Integrations band

primitives/compositions/integrations-band

integrationsBandvalue

const integrationsBand: Composition

Integrations grid band

primitives/compositions/integrations-grid-band

integrationsGridBandvalue

const integrationsGridBand: Composition

Integrations marquee band

primitives/compositions/integrations-marquee-band

integrationsMarqueeBandvalue

const integrationsMarqueeBand: Composition

Listings band

primitives/compositions/listings-band

listingsBandvalue

const listingsBand: Composition

Metrics band

primitives/compositions/metrics-band

metricsBandvalue

const metricsBand: Composition

Metrics chart band

primitives/compositions/metrics-chart-band

metricsChartBandvalue

const metricsChartBand: Composition

Metrics live band

primitives/compositions/metrics-live-band

metricsLiveBandvalue

const metricsLiveBand: Composition

Metrics trend band

primitives/compositions/metrics-trend-band

metricsTrendBandvalue

The shape of a number over time, read rather than written.

const metricsTrendBand: Composition

Nav band

primitives/compositions/nav-band

navBandvalue

const navBand: Composition

Nav centred band

primitives/compositions/nav-centred-band

navCentredBandvalue

const navCentredBand: Composition

Nav docs band

primitives/compositions/nav-docs-band

The bar above a document: the way home, the sections of the site, what you are reading, and a way to search it.

navDocsBandvalue

const navDocsBand: Composition

Nav menus band

primitives/compositions/nav-menus-band

navMenusBandvalue

const navMenusBand: Composition

Offerings band

primitives/compositions/offerings-band

offeringsBandvalue

const offeringsBand: Composition

Onward band

primitives/compositions/onward-band

Where this page sits in the run the reader is walking — back one, on one, and the way up.

onwardBandvalue

const onwardBand: DocumentComposition

Outline

primitives/compositions/outline

**The second register: a band's words, replaced by the part each one plays.**

BandOutlinetype

A band's second set of words, and the words of its own it keeps.

type BandOutline = {
    /** The band this re-words, by its catalogue id. */
    readonly band: string;
    /** Each of the band's own strings, and what the outline says instead. */
    readonly words: CopyRegister;
    /**
     * The band's own strings this outline leaves alone, grouped by the reason.
     */
    readonly keeps: readonly {
        readonly words: readonly string[];
        readonly why: string;
    }[];
};

OUTLINE_REGISTERvalue

const OUTLINE_REGISTER: readonly BandOutline[]

outlineForfunction

The outline for a band, or undefined where none has been written.

const outlineFor: (band: string) => BandOutline | undefined

OUTLINED_BANDSvalue

The bands this register can re-word, in page order.

const OUTLINED_BANDS: readonly string[]

outlineOffunction

A band built and then re-worded, or built unchanged where no outline exists.

const outlineOf: (band: Band, ids: IdFactory, declarations: CopyDeclarations) => ElementNode

Pricing band

primitives/compositions/pricing-band

pricingBandvalue

Shown in use on Starting from a band — Where the names live

const pricingBand: Composition

Pricing matrix band

primitives/compositions/pricing-matrix-band

pricingMatrixBandvalue

const pricingMatrixBand: Composition

Proof band

primitives/compositions/proof-band

proofBandvalue

const proofBand: Composition

Proof faces band

primitives/compositions/proof-faces-band

proofFacesBandvalue

const proofFacesBand: Composition

Proof story band

primitives/compositions/proof-story-band

proofStoryBandvalue

const proofStoryBand: Composition

Rephrase

primitives/compositions/rephrase

A band's words replaced, and nothing else about it touched.

CopyRegistertype

What each of a band's own strings becomes, keyed by the string it replaces.

type CopyRegister = Readonly<Record<string, string>>;

CopyFieldtype

One of a band's strings, and the field of the subtree that holds it.

type CopyField = {
    /**
     * `loom.heading#text` for a text child, `loom.feature.title` for a declared
     * copy prop.
     */
    readonly field: string;
    readonly text: string;
};

copyFieldsfunction

Every string a reader reads, in reading order, with the field that holds it.

const copyFields: (node: LoomNode, declarations: CopyDeclarations) => readonly CopyField[]

rephrasedfunction

The same subtree with its words replaced where the register has an entry.

const rephrased: (node: LoomNode, register: CopyRegister, declarations: CopyDeclarations) => LoomNode

Shelf band

primitives/compositions/shelf-band

shelfBandvalue

const shelfBand: Composition

Specs band

primitives/compositions/specs-band

specsBandvalue

const specsBand: Composition

Specs sheet band

primitives/compositions/specs-sheet-band

specsSheetBandvalue

const specsSheetBand: Composition

Steps band

primitives/compositions/steps-band

stepsBandvalue

const stepsBand: Composition

Steps cards band

primitives/compositions/steps-cards-band

stepsCardsBandvalue

const stepsCardsBand: Composition

Team band

primitives/compositions/team-band

teamBandvalue

const teamBand: Composition

Team leads band

primitives/compositions/team-leads-band

teamLeadsBandvalue

const teamLeadsBand: Composition

Testimonials band

primitives/compositions/testimonials-band

testimonialsBandvalue

const testimonialsBand: Composition

Testimonials collected band

primitives/compositions/testimonials-collected-band

testimonialsCollectedBandvalue

The wall of testimonials, read from wherever they were collected — and the one band in this catalogue whose authored designs were always placeholders.

const testimonialsCollectedBand: Composition

Testimonials wall band

primitives/compositions/testimonials-wall-band

testimonialsWallBandvalue

const testimonialsWallBand: Composition

Trail band

primitives/compositions/trail-band

Where the reader is, under the header and above the text.

trailBandvalue

const trailBand: DocumentComposition

Voice

primitives/compositions/voice

The checkable half of the house voice, read over a register's own words.

ASSERTS_A_FACTvalue

The primitives whose whole purpose is to assert a fact about a business.

const ASSERTS_A_FACT: readonly string[]

Whats on band

primitives/compositions/whats-on-band

whatsOnBandvalue

const whatsOnBand: Composition