skip to the page

@jam-overture/loom-primitives/compositions

The starter library's fifty-seven bands under their own names, for assembling a page without going through the catalogue.

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.

70 exports, in 59 modules. Generated from ./dist/primitives/compositions/index.d.ts, which is the declaration file this package publishes for @jam-overture/loom-primitives/compositions.

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 70 of the 1,298 names this package publishes. The other 1,228 are behind one of the 16 other imports, and 15 of those 16 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: 13 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[]

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

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

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.
     *
     * **A part's canonical design has the part's own name as its id**, and every
     * other design of that part is the part name plus what makes it different —
     * `hero` and `hero-split`. That convention is not cosmetic: it is what lets
     * the page sequence be *derived* rather than maintained as a second hand-kept
     * list that could disagree with the first. There is a test on it.
     */
    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.
     *
     * About the page and never about the verdict, for the reason the demo's
     * presets give: whether the Gate applies a band or holds it is computed from
     * the tree at assessment time, so a promise about the outcome would be a
     * surface predicting a decision it does not make.
     */
    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;
};

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.
 *
 * A distinct outcome rather than a silent append at the root: a band that
 * quietly landed somewhere other than where it was asked for is worse than
 * one that did not land, because the second is visible.
 */
 | {
    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: Composition, 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: Composition, 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

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 signup band

primitives/compositions/cta-signup-band

ctaSignupBandvalue

const ctaSignupBand: Composition

Episodes band

primitives/compositions/episodes-band

episodesBandvalue

const episodesBand: 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

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

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

Offerings band

primitives/compositions/offerings-band

offeringsBandvalue

const offeringsBand: Composition

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

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

Whats on band

primitives/compositions/whats-on-band

whatsOnBandvalue

const whatsOnBand: Composition