Documentation menu

Documentation / Blocks & themes / blocks-local-pack

Blocks Local Pack

Package
@wabbit/tome-blocks-local-pack
Version
v0.15.0
npm install @wabbit/tome-blocks-local-pack
First install from our registry?
  1. Add our registry to the .npmrc at the root of your project. Free packages install without a token.

    @wabbit:registry=https://npm.wabbit.com/
Blocks & themesPreview

Local-business blocks for Tome — a menu or price list (photo card grid, printed ledger, home teaser), a live open-now status line, a find-us logistics band with keyless directions and today-highlighted hours, and a facilities guide with an illustrated site plan and per-facility open state — that read the site's @wabbit/tome-local business profile, with inline fields as the fallback. Free with any theme.

Overview

Local-business blocks for Tome: a menu or price list, a live "open now" status line, a find-us band, and a class timetable. The status line and the find-us band read the site's business profile from @wabbit/tome-local (hours, phone, address, service areas, credentials, an availability line), so an owner edits hours once in the admin and every block follows; each block's own fields stay as the fallback. They are built on that package's open-state utility, which handles timezones, split shifts and labeled holiday overrides. The pack is free with any theme.

Status: preview. Ten blocks and the flagged ordering island, built first for the Table theme. register() adds them as the free local-pack bundle.

Peer dependencies

PeerRangeRequired
@wabbit/tome-blocks-core>=0.35.0 <1.0.0yes
@wabbit/tome-core>=1.32.0 <2.0.0yes
@wabbit/tome-local>=0.7.0 <1.0.0yes
@wabbit/tome-blocks-house>=0.9.0 <1.0.0no
@wabbit/tome-maps>=0.1.0 <1.0.0no
@wabbit/tome-ui>=0.18.0 <1.0.0no
payload>=3.67.0yes
react>=19.0.0yes
react-dom>=19.0.0yes

Block styles read --tome-* tokens, so load the design tokens once in your global CSS, as with every Tome pack.

Register the block configs into your registries:

// payload.config.ts
import { BlockRegistry, BundleRegistry } from '@wabbit/tome-blocks-core/registry'
import { register } from '@wabbit/tome-blocks-local-pack'

const blockRegistry = new BlockRegistry()
const bundleRegistry = new BundleRegistry()

register(blockRegistry, bundleRegistry)

To feed the blocks from the business profile, register @wabbit/tome-local's layer (createLocalLayer(), see that package's README, "Setting up the business profile"). Nothing else is wired: the blocks find the profile on their own (see The business profile).

Register the renderers once at app startup:

import { registerRenderers } from '@wabbit/tome-blocks-local-pack/render/register'

registerRenderers()

Blocks

SlugNameWhat it renders
local-price-listLocal Price ListA menu or price list in five arrangements: a photo card grid (the default) with a featured lead, numbered category rail and in-card details; a printed ledger; a home-page teaser; term-fee cards (a free trial beside a term fee with a classes-a-week picker, one height, buttons on one line); and package cards (a priced bundle with its headcount, the price of each extra, length, deposit and inclusions, add-ons on the same card). Prices are stored in minor units and formatted with Intl.NumberFormat. Ordering is an opt-in flag.
local-live-statusLocal Live StatusOne line of live proof: "Open now · kitchen closes at 10", "Opens tomorrow at 11" or "Closed today · holiday hours", or in availability mode the profile's status line ("Booking this week") or rating citation. The server renders the value and the client recomputes it, so cached pages stay true. Renders nothing without something true to say.
local-logisticsLocal LogisticsAddress, keyless Google and Apple directions links, phone, an optional map image, and weekly hours grouped by identical days with today highlighted in the business timezone. Also visit notes, and the profile's service areas and credentials. A cards variant lays the same facts out as equal cards and adds link cards (a waiver, a booking page).
local-class-scheduleLocal Class ScheduleA class timetable as structured data, in three variants: week (day columns from 768px), list (a band per day) and board (today only, as ticket rows with a state chip). Each class shows its time, age range, level, teacher and room, an optional "spots left" or "Waitlist open" line that hides itself at its expiry, an enroll link and a per-class calendar (.ics) download. Phones get a sticky day strip and an age filter.
local-class-finderLocal Class FinderA hero that answers "which class do we start in?" in place, in two variants: ask (two pill questions, age band and experience, resolve through your rules to one result card with the class, its level stripe, this week's times, a spots line that hides itself at its expiry, a trial button and a link to the timetable preset to that age) and level (a program page hero for one fixed level). It works without script.
local-class-pathwayLocal Class PathwayThe levels of a class program for a parent, in three variants: bands (age band pills over that band's levels as cards, each with its level stripe, "Who it's for", "Moves up when" and this week's times; every band shows without script), cards (chosen levels as cards with a trial action, after up to two photos at one height) and ladder (the levels as rungs with "You're here" on the current one, then exactly one card for the next level on the same track). Reads the same shared timetable as the finder and the schedule.
local-credentialsLocal CredentialsWhat a business can prove, in two variants: strip (short checkable lines; a line bound to a credential kind hides when no unexpired credential of that kind exists) and panel (ratios as numerals, up to two policy lists, a credentials ledger of kind, issuer, what it covers, valid and verify, and a "policy last reviewed" line). Reads the business profile's credentials, drops any past its expiry date, and labels a sample credential as a sample.
local-facilitiesLocal FacilitiesThe places at a venue (fields, courts, rooms, units, lots, restrooms) as a keyed list beside an illustrated site plan, in three variants: plan (the list beside the plan, with scroll-spy, a phone card and a full-screen sheet with zoom), list (the list only) and locator (one place and its marker). Each place can show its open state from a named schedule in the business profile, an access line, a dated status, and details, keyless directions and inquiry links. The plan is an image with percent-positioned markers, not a map.
local-locationsLocal LocationsThe places a business serves from, as a list: each with its name, a live open-or-closed status in its own time zone, a summary, address, phone, hours with today marked, a directions link and a book action, and an optional map that loads only when the visitor asks. With one place it renders as that one place. Hooks only; the theme owns the look.
local-desk-stripLocal Desk StripA strip with every location and whether it is open right now (each in its own time zone), the central desk's phone number and one book action. Recomputes in the browser. Hooks only; the theme owns the look.

All ten are listed in the block catalog under the local-pack bundle.

Public API

EntryExportsRuntime
@wabbit/tome-blocks-local-pack (.)register(blockRegistry, bundleRegistry), localPackBlocks, the block descriptors (localPriceListBlock, localLiveStatusBlock, localLogisticsBlock, localClassScheduleBlock, localClassFinderBlock, localClassPathwayBlock, localCredentialsBlock), the option presets (LOCAL_TAG_PRESETS, LOCAL_ATTRIBUTE_PRESETS), the LocalPriceListConfig, LocalPriceListOption and LocalPriceListData types, getDemoProps, localPackDemoProps, the hours types (OpenStateSource, LocalWeeklyHours, LocalHoursOverride, …) re-exported from @wabbit/tome-local/hours, and the profile binding: profileFields(kind), makeProfileReadHook(kind), loadProfileForRequest(req), buildBlockProfile(profile), activeProfile(block), applyProfileToLiveStatus(data), applyProfileToLogistics(data) and the LocalBlockProfile / LocalBlockDataSource typesPayload config (block descriptors)
@wabbit/tome-blocks-local-pack/renderlocalPackRenders (slug → renderer), the renderers LocalPriceList, LocalLiveStatus, LocalLogistics, LocalClassSchedule, LocalClassFinder, LocalClassPathway and LocalCredentials, the LocalNextSessions server component (not a block) with DEFAULT_NEXT_SESSIONS_LABELS, LocalLiveStatusAnnouncement (for chrome's announcement slot), toSerializableSource, and the LocalLiveStatusData, LocalLiveStatusAnnouncementProps, LocalLogisticsData and LocalClassScheduleData types; importing it registers the renderers as a side effectReact
@wabbit/tome-blocks-local-pack/render/registerrenderers, registerRenderers(): the explicit, server-guaranteed registration pathReact
@wabbit/tome-blocks-local-pack/serverLocalLiveStatusAnnouncementFromProfile (an async server component: the Now Bar read from the business profile), getLiveStatusAnnouncementProps(payload, props), LocalClassFinderFromSchedule with getClassFinderData(payload, data) (the class finder with its shared timetable and profile read on the server), and LocalNextSessionsFromSchedule (the next sessions of a level, with the timetable and the profile's closed dates read on the server)Server only (reads @wabbit/tome-local/server)
@wabbit/tome-blocks-local-pack/live-mapImport once, on the server, to turn on mapMode: 'live': it registers LocalLiveMapIsland, a client island over @wabbit/tome-maps, into the live-map slot (registerLocalLiveMap, getLocalLiveMap in /render). Needs the optional @wabbit/tome-maps peer and, for its default MapLibre provider, maplibre-glClient island
@wabbit/tome-blocks-local-pack/orderingThe flagged ordering island (OrderProvider, OrderButton, OrderPill, OrderDrawer, useOrder). Mounted only when a list sets ordering.enabledClient
@wabbit/tome-blocks-local-pack/metalocalPackBlockMeta: each block's gallery meta and variants, payload-freeIsomorphic
@wabbit/tome-blocks-local-pack/demogetDemoProps(blockSlug, variant?) and localPackDemoProps, with realistic, neutral demo data for the galleryIsomorphic
import { localPackBlockMeta } from '@wabbit/tome-blocks-local-pack/meta'
import { getDemoProps } from '@wabbit/tome-blocks-local-pack/demo'
import { renderers } from '@wabbit/tome-blocks-local-pack/render/register'

The business profile

local-live-status and local-logistics read the site's business profile (@wabbit/tome-local's local-business-profile global) and use their own fields as the fallback.

  • `dataSource` on each block: profile (the default, and what a block stored before the field existed means) uses the profile first and fills anything it leaves empty from the block's fields; inline uses the block's fields only, for a page about a second venue or a fixed example.
  • What comes from the profile: facts. The hours (timezone, weekly rows, overrides, named schedules) move as one unit, as do the address and its coordinates; the phone number (the call link uses its E.164 form); visit notes; service areas and credentials (logistics only); and the availability line (live status only). What stays the block's: presentation, meaning labels, headings, copy, actions and display options, plus an explicit directions URL typed into the live status.
  • Hidden address. When the profile hides the street, the logistics band shows the locality only and neither block builds a directions link from the address.
  • How it gets there. Each of the two blocks carries a virtual, hidden profile field whose afterRead hook reads the profile through req.payload whenever Payload returns the block (Local API, REST, GraphQL, live preview) and writes the block's slice of it. Nothing is stored. The renderers stay pure, in a server component and a client island alike. One profile read per request serves every block on the page; a site without the layer, or with an unsaved profile, runs no query and renders the inline fields exactly as before. A failed read logs a warning and falls back to the inline fields.
  • Caching. Saving the profile revalidates LOCAL_PROFILE_TAG and the root layout. If your site caches its own page queries, add LOCAL_PROFILE_TAG (from @wabbit/tome-local/server) to their tags, because the blocks embed profile data at read time.
  • Database names. local-live-status stores its rows under <collection>_lls (dbName): its slug-derived names nest five levels deep and passed Postgres's 63-character identifier limit, so earlier releases could not build a SQL schema with it at all. MongoDB is unaffected. Local Price List names its featured-lead heading-level enum enum_<table>_hl for the same reason (the slug-derived name passed the limit in a drafts-enabled collection's version tables).

Locations (opt-in)

A site with one address needs none of this: with the local layer's locations option off, no block's schema, markup or database changes. Turn it on (createLocalLayer({ locations: true }), see @wabbit/tome-local's "Locations") and three things become available.

1. A location as the data source. Build local-logistics, local-live-status and local-credentials with the collection's slug and their dataSource gains location plus a location pick:

localLogisticsBlock.block({ mediaCollection: 'media', locationsSlug: local.slugs.locations })
localLiveStatusBlock.block({ locationsSlug: local.slugs.locations })
localCredentialsBlock.block({ locationsSlug: local.slugs.locations })

The block then reads that place's own address, phone, hours, visit notes, availability and credentials through the same virtual profile field, so nothing about how it renders changes. A place that is archived, unpublished or gone reads as no slice, and the block falls back to its own fields rather than to another place's address. local-price-list is inline only and has no dataSource, so it gains none. Without locationsSlug the blocks (and the hook they run) are exactly what they were.

2. The `local-locations` index and the `local-desk-strip`. Registered with the pack, they read every published, unarchived place through a virtual locationData field and render hooks only (the theme owns the look). Each place's status is its own: the zone, the hours and the closure dates of that place, in words next to a shape (open, closing, closed, closed-today), recomputed in the browser so a cached page stays true. source: 'inline' uses the typed offices rows only, and the typed rows fill in when the collection is empty. The desk strip's number is the one typed on the block, else the business profile's phone (the central desk's), else the primary place's; its book action is the one typed, else the primary place's. A place that hides its address shows its town only, with no directions link and no map pin.

  • local-locations hooks: root data-local-locations with data-office-count="1|n"; data-locations-heading, data-locations-intro; data-office-list; per place data-office (data-office-slug, data-office-primary, data-practice-sample), data-office-photo (its caption is data-compliance-label), data-office-name, data-office-summary, data-office-address, data-office-phone, data-office-hours (a dl, data-today), data-office-actions, data-office-directions, data-office-book; the map data-office-map and data-office-map-fallback.
  • local-desk-strip hooks: root data-local-desk-strip; data-desk-offices, data-desk-office (data-office-slug, data-office-state), data-desk-office-name; data-desk-call with data-desk-call-label and data-desk-call-number; data-desk-book.
  • The status chip, shared by both: data-practice-status with data-state, data-status-dot (data-shape="filled|hollow", aria-hidden) and data-status-text. Phone numbers and times carry data-practice-figure.

3. A live map. Build local-logistics or local-locations with liveMap: true and mapMode gains live. The map is a client island over @wabbit/tome-maps (MapLibre and OpenFreeMap styles by default: no key, no per-view charge), registered by importing @wabbit/tome-blocks-local-pack/live-map once on the server:

import '@wabbit/tome-blocks-local-pack/live-map'

It loads with loadOn: 'interaction': nothing is requested from a map host until the visitor presses "Show map", and the directions links stand in until then and if the map cannot load. Once the visitor asks, their browser contacts the tile host; the style URL stays swappable through configureMaplibreProvider in @wabbit/tome-maps/maplibre. A place that hides its address never gets a pin. A site that never imports live-map renders the directions links where the map would be, and needs neither @wabbit/tome-maps nor maplibre-gl.

Local Price List

One data shape, five arrangements, chosen with the block's variant:

  • card-grid (default): a featured lead band (kicker, the item as the page h1, description, display price beside the action, a round stamp over the photo), then a numbered category rail beside the categories (sticky from 768px; a horizontal sticky row on phones), a masthead per category, photo cards three, two and one across, and one item that breaks the grid with its details always open. Each card's details (ingredients, allergens, nutrition, a shared note) open inside the card over its photo, so the card never changes size.
  • ledger: the printed list. Ruled rows, attribute codes, right-aligned tabular prices, every size or measure listed, and an optional featured lead. Each row carries the card's action (below); a row's details open in place under it.
  • teaser: a photo panel beside a numbered list of the first teaser.count items (default 6). Hovering or focusing a row brings it forward and swaps the photo; phones show a thumbnail per row instead of the panel.
  • term-fee: fee cards for a business that sells a term of classes. Each item is a card (kicker, name, price with its per line, includes and excludes, one action); the cards share one grid and one height, with their buttons on one line. The recommended item (emphasis: 'primary') is marked by its surface, padding, weight and the only filled button, never a colored rule. An item with two or more priced variants gets a classes-a-week picker (a radiogroup named pickerLabel; a variant's label is the choice, its per the words after the price) that swaps the price and the per line; without script the choices read as a plain list. Block fields: kicker, heading, intro, pickerLabel, includesLabel, excludesLabel, objections[] and note. Whole amounts print without cents ("$238"). Hooks: data-fee-card (data-fee-emphasis), data-fee-kicker, data-fee-name, data-fee-price (tabular; text in data-fee-price-text, spoken currency in data-fee-price-spoken), data-fee-per (tabular), data-fee-picker (role="radiogroup", with data-fee-picker-label), data-fee-option (aria-checked), data-fee-ladder (the no-script list), data-fee-includes, data-fee-excludes, data-fee-action, data-fee-objections, data-fee-objection, data-fee-note, and on the opener data-fee-header, data-local-label and data-fee-heading. Optional knobs: --tome-fee-card-bg, --tome-fee-price-size, --tome-fee-action-min-h.
  • package: priced bundles, and add-ons on the same card. Each item is a card with the same grid, one height and buttons on one line as the fee cards. Item fields: the price (variants[0], in minor units, through the same formatter; whole amounts print without cents), variants[0].per (the words after the price, such as "a person, 15 or more"), headcount { count, noun } (printed as "for 10 guests" when the price has no per line of its own), extra { price, noun } ("Each extra guest $17", printed only with a price), duration ("Length"), deposit { mode, amount, note } (none prints "None"; amount prints the amount; an unset deposit prints nothing, so none is ever implied; the note is the refund or credit line and prints only with a deposit set), inclusions[] { text }, kicker, emphasis and one action (a plain link: a planner preset rides on its query string, for example ?type=party&pkg=Name#planner). An add-on is an item that sets only a name, a line (description) and a price: no fact row, list, note or button prints. Pricing is complete on the card and no field carries scarcity wording. Block fields: kicker, heading, intro and note; the fact names and the headcount sentence are fields under labels (packageLength, packageExtra, packageDeposit, packageNoDeposit, packageHeadcount). Hooks: root data-block-variant="package"; data-package-card (data-package-emphasis), data-package-kicker, data-package-name, data-package-description, data-package-price (text in data-package-price-text, spoken currency in data-package-price-spoken), data-package-per, data-package-facts (a dl) with data-package-fact="length|extra|deposit" on each row, data-package-inclusions, data-package-deposit-note, data-package-action, and on the opener data-package-header, data-local-label and data-package-heading; data-package-note. Optional knobs: --tome-package-card-bg, --tome-package-price-size, --tome-package-action-min-h.

Data. Inline only for now (source: 'inline'): sections[] { anchor, title, tagline, description, note, items[] }, each item { key, name, description, image, tags[], attributes[], nutrition[] { label, value }, modifiers[] { label, price }, details { ingredients, allergens }, courses[] { text }, breaker, availabilityLine, metaLine, priceMode, variants[] { label, price, priceMax }, available }. Keys and anchors are generated from the name or title on first save and then stay put; ordering and the featured lead refer to items by key.

Featured lead (featuredLead, card grid and ledger): itemKey names the item; kicker, stamp { ring, core } and moreLabel dress it. description is the lead's own text (empty: the item's description, the one its card shows). headingLevel sets the featured name's heading: auto (default) is the page h1 on card-grid, and on ledger an h1 only when the block is the page's first (the renderer's index is 0) and an h2 otherwise; h1 or h2 force it. Pick h1 when a ledger opens a page whose host does not pass index.

Meta line. Under each card and row: attribute codes, then the first nutritionInMeta nutrition pairs (default 2) and the modifiers, in metaOrder: nutrition-first (default, "120 kcal · Oat +0.50") or modifiers-first ("Oat +0.50 · 120 kcal"). A section can set its own (sections[].nutritionInMeta, sections[].metaOrder), which override the list's for that section's items, so a drinks section can read "Oat +0.50 · 120 kcal" while the dishes lead with protein; left empty, a section uses the list's. A ledger row adds its metaLine parts. At most one item per list may set breaker, and keys must be unique (the sections field validates both). The shape equals the price-list collection planned for @wabbit/tome-local, so a list moves to it without re-entry.

Prices are integer minor units (1700 is 17.00), formatted with Intl.NumberFormat in the block's locale (default en-US) and currency (ISO 4217, default USD). With showCurrency off (the default) the amount prints without a symbol ("17.00") and a visually hidden currency name follows it, so a screen reader hears "17.00 US dollars". priceMode gives a fixed price, "from" the lowest variant, a range (price to priceMax), "Market price" or "On request"; the wording is editable in priceLabels. Aligned prices set in the text face with tabular lining figures.

Tags and attribute codes are free text by default. Pass option lists to the block factory to make them typed selects; the presets are data only:

import { LOCAL_ATTRIBUTE_PRESETS, LOCAL_TAG_PRESETS, localPriceListBlock } from '@wabbit/tome-blocks-local-pack'

localPriceListBlock.block({ tags: LOCAL_TAG_PRESETS.menu, attributes: LOCAL_ATTRIBUTE_PRESETS.dietary })

A known code prints with its expansion (<abbr title="Vegetarian">V</abbr>). The block adds no dietary or allergen wording of its own.

Actions. Each item's action sits in the same spot in every state:

  • With ordering.enabled and a checkoutUrl, each priced, available item gets an add button and a stepper rendered hidden, inside data-menu-action. Mount the ordering island on the page (@wabbit/tome-blocks-local-pack/ordering) to make them work. Without both settings no add action renders, and data-menu-action does not appear.
  • With ordering off, askLabel gives each card or ledger row that has details a control opening them (a ledger row renders its details panel only with that control). primaryAction gives the featured lead a link (a booking anchor, say), and the breaker too unless breakerAction gives it its own (for example "Reserve the tasting menu"). In the ledger the breaker's row carries the breaker's action. These sit in data-menu-foot.

Without JavaScript the rail is a plain list of in-page anchors, every details panel shows in place under its photo, and the controls that need script are hidden. The small client island adds the details toggles (Esc closes an open panel wherever focus is, and returns focus to the control that opened it unless the visitor has moved on), the rail scroll-spy (scrollSpy: 'auto' runs it with four or more sections) and the teaser hover. It animates nothing itself, so the block's cards still take part in the platform reveal, and every transition is dropped under prefers-reduced-motion: reduce. Sticky parts and section anchors clear an announcement bar through --tome-announcement-height.

Local Price List hooks. Root: data-block-variant, data-local-price-list, data-menu-ordering="on" when ordering renders, data-menu-teaser on the teaser. Featured: data-menu-featured, data-menu-featured-copy, data-menu-kicker, data-menu-more, data-menu-item-media; stamp data-menu-stamp with data-stamp-disc, data-stamp-ring (the inner circle), data-stamp-text (the ring text) and data-stamp-core. Rail: data-menu-rail, data-menu-rail-link (aria-current="true" on the current one), data-menu-rail-num, data-menu-rail-count. Category: data-menu-section (its id is the anchor), data-menu-masthead, data-menu-section-num, data-menu-tagline, data-menu-section-description, data-menu-section-note. Item: data-menu-item="<key>" (plus data-available="false"), data-menu-item-media, data-menu-item-head, data-menu-item-name, data-menu-item-desc, data-menu-tag, data-menu-leader, data-price with data-price-mode, data-menu-variants, data-menu-meta, data-menu-info, data-menu-details (data-open="true" when open), data-menu-details-note, data-menu-ask, data-menu-action, data-menu-foot, data-menu-primary, data-menu-unavailable. Breaker: data-menu-breaker, data-menu-breaker-panel, data-menu-breaker-availability, data-menu-courses, data-menu-course, data-menu-course-num. Ledger: data-menu-row. Teaser: data-local-label, data-teaser-panel, data-teaser-photo (data-active on the shown one), data-teaser-caption, data-teaser-list (data-engaged="true" while hovered or focused), data-teaser-row (data-active="true"), data-teaser-thumb, data-menu-item-num, data-menu-item-line, data-teaser-actions. Ordering: data-order-add="<key>", data-order-stepper="<key>", data-order-dec, data-order-inc, data-order-qty. Reveal: the featured copy and photo, each card, the breaker and each teaser row carry data-tome-reveal-item. Optional knobs: --tome-menu-leader, --tome-menu-stamp, --tome-menu-stamp-ink, --tome-menu-meta-size.

Theme hooks

Every block root carries data-block-type (the kebab-case catalog slug, such as local-price-list) and data-block-variant. Its parts carry documented data-* hooks (data-menu-*, data-teaser-*, data-order-*, data-live-*, data-logistics-*), so a theme can restyle them without keying off hashed class names. Each block's section in this README lists its hooks; they are the Table theme's hook contract (Wabbit/products/tome/themes/table/HOOK-CONTRACT.md in the Wabbit workspace).

Local Credentials

local-credentials shows what a business can prove. strip is a row of short lines with a check mark; panel is a rounded chapter with an opener (kicker, heading, intro), ratios[] { value, caption } as large tabular numerals with a ratiosNote, up to two policies[] { title, items[] { text } }, the credentials ledger and a reviewed line (reviewedLabel, reviewedOn, reviewedLinks[]).

Data. dataSource: 'profile' (the default) reads the credentials in the business profile through the block's virtual profile field (the same read hook as the other profile-aware blocks), and the block's own credentials[] { kind, label, issuer, covers, validFrom, expiresOn, verifyUrl, validNote, sample } fill in when the profile has none; 'inline' uses the block's rows only. A credential past its expiresOn date never renders (checked at render time in the profile's timezone, UTC for inline rows). The Covers column and the validNote wording come from the block's rows only, since the profile has no such fields; a ledger column with no value in any row is dropped.

Spelling aliases. A claim bound to the kind licence matches a license credential and the other way round. The price list tag house-favorite is offered next to the older house-favourite, and both show "House favorite". The old spelling is still accepted while stored data moves; writers store the new one.

Strip lines. claims[] { text, kind, sample }. A line with a kind shows only while an unexpired credential of that kind exists; a line without one is your own statement and always shows. label names the strip for screen readers.

Samples are labeled. A profile credential ticked "Sample (a demo or placeholder credential)" carries sample, and so does an inline row. A sample ledger row shows the label (sampleLabel, default "Sample") beside its name; a strip line shows it when the line is ticked Sample itself or when every credential of its kind is a sample, so a placeholder is never presented as a verified one.

Local Credentials hooks. Root: data-local-credentials, data-block-variant. Strip: data-cred-claim, data-cred-sample. Panel: data-cred-opener, data-local-label, data-cred-panel, data-cred-ratios, data-cred-ratio, data-cred-ratio-value (tabular), data-cred-ratio-caption, data-cred-ratios-note, data-cred-policies, data-cred-policy, data-cred-ledger (a table with a caption and column and row headers), data-cred-row, data-cred-kind, data-cred-issuer, data-cred-covers, data-cred-valid, data-cred-verify (named "Verify {credential}"), data-cred-reviewed. Below 768px the ledger stacks, each value led by its column name. Optional knobs: --tome-cred-check, --tome-cred-panel-bg, --tome-cred-ratio-size. No script, no motion.

Local Live Status

local-live-status has two variants. bar is a band, one row from 640px while the status and the links fit side by side (the links move under the status where they do not, so the detail never truncates) and a 124px block with three equal buttons on phones. line is inline.

It reads the business profile's hours, else source, an OpenStateSource: a timezone, weekly rows (two rows on one day for a split shift, and a close earlier than the open runs past midnight), labeled holiday and special-hours overrides, and named schedules. The status has two parts:

  • A lead: "Open now", "Closed now" or "Closed today".
  • A detail: "kitchen closes at 10", "opens tomorrow at 11" or "holiday hours: back Wednesday at 5:30".

Every string is overridable. timeStyle: 'compact' drops AM/PM ("2:30", "10", "midnight"). Each state (open, closed, closedToday) has its own action. A call link and a keyless directions link sit beside it. An action of kind directions hides the separate Directions link.

mode chooses the question. open-state answers "are you open?" from the hours. availability shows the first answer of @wabbit/tome-local's live-status chain, resolved when the block is read: a booking engine's next opening when one is installed, else the profile's manual availability message while it has not expired ("Two tables left tonight"), else its rating citation ("4.8 on Google · 120 reviews"), else nothing. auto (the default) is the open state when there are hours and the availability line otherwise. An availability line carries the open action and stops showing at its expiry, also on a cached page.

The server renders the status. A small client island then recomputes it after mount, on a timer aligned to the next opening or closing, and when the tab becomes visible again. It announces through role="status" only when the state really changes.

To put the bar above the header, render it in chrome's announcementSlot. LocalLiveStatusAnnouncement takes the block's fields as props:

import { LocalLiveStatusAnnouncement } from '@wabbit/tome-blocks-local-pack/render'

<HeaderRenderer
  announcementSlot={
    <LocalLiveStatusAnnouncement
      source={hours}
      schedule="kitchen"
      scheduleWord="kitchen"
      timeStyle="compact"
      actions={{ open: { label: 'Reserve', href: '/reserve' }, closed: { label: 'Reserve', href: '/reserve' } }}
      call={{ phone: '(555) 555-0100' }}
      directions={{ address: '1 Example Street, Springfield' }}
    />
  }
/>

It returns null when there is nothing true to say, so the slot collapses.

To take the hours, phone and address from the business profile instead of props, use the server component in @wabbit/tome-blocks-local-pack/server. Every flat prop above still works and fills what the profile leaves empty:

import { LocalLiveStatusAnnouncementFromProfile } from '@wabbit/tome-blocks-local-pack/server'

<HeaderRenderer
  announcementSlot={<LocalLiveStatusAnnouncementFromProfile payload={payload} schedule="kitchen" scheduleWord="kitchen" timeStyle="compact" />}
/>

getLiveStatusAnnouncementProps(payload, props) returns the same props with the profile slice added, for a layout that renders LocalLiveStatusAnnouncement itself.

Hooks:

  • Root: data-live-state (open, closed, closed-today or availability), data-live-tone (positive, neutral or caution; availability only) and data-live-dup="directions". Optional knob: --tome-live-dot-caution.
  • Status: data-live-region, data-status-dot (with data-state), data-live-lead and data-live-detail. No separator is rendered between the lead and the detail, so a theme draws its own.
  • Links: data-live-actions, data-live-call (with data-live-call-label and data-live-phone-number), data-live-directions and data-live-action.

Local Logistics

local-logistics has two variants, split and cards. split shows:

  • the section label (data-local-label) and the heading
  • a map image, always captioned with the illustrative-map label (data-compliance-label)
  • the address, with a keyless Google or Apple directions link and a call link
  • the hours, grouped by identical consecutive days ("Wed – Thu")
  • an hours note
  • titled visit notes
  • the profile's service areas, as chips, and its current credentials (label, issuer and number, the number only where the profile shows it)

schedule names a profile schedule (a kitchen, a service desk) to show instead of the main hours. The profile's visit notes (parking, getting here, accessibility; one item per line) take the titles in visitNoteTitles. show toggles each part, including serviceAreas and credentials.

Today's group is marked data-today="true" on its <dt> and <dd>, computed in the business timezone. The server renders it, and the hours island corrects it after mount and at midnight. Today's holiday or special hours show as their own "Today" row. There is no live provider map and no API key.

Hooks: data-logistics-map, data-logistics-address, data-logistics-actions, data-logistics-directions, data-logistics-call, data-logistics-hours, data-logistics-hours-note, data-visit-notes, data-visit-group, data-logistics-areas and data-logistics-credentials.

cards shows the same facts as equal cards in one grid, with no map: find us (the address and its actions; the heading is findLabel, default "Find us"), one card per visit-note group (parking, access), the hours (today marked, with the hours note), the profile's service areas and credentials, and then the link cards. A link card is a row of links[] { title, text, label, href, newTab }: a heading, a line and one button, such as a waiver the visitor signs before they come. A button that opens a new tab carries a screen-reader notice (newTabNotice, default "(opens in a new tab)"). A link row with an unsafe or missing link keeps its title and line and drops the button. Hooks: data-logistics-cards on the grid; data-logistics-card="find|note|hours|link" on each cell, each opening with data-logistics-card-heading; data-logistics-link-action on a link card's button. The existing address, actions, hours, hours-note, areas, credentials and data-visit-group hooks stay inside their cells. Optional knob: --tome-logistics-card-bg.

Local Class Schedule

local-class-schedule is the timetable for a business that runs classes: gyms, dance and martial arts schools, swim and music schools, preschools, camps. It has three variants over one data shape. week lays the days out as columns from 768px, each class a compact card with its time first. list makes a band per day with the classes as ruled rows. Phones get the same markup one day at a time. board is today only (below).

Data. Inline classes[] rows: name, level, ageMin and ageMax (years, inclusive; an empty end is open), an optional ageLabel that replaces the built text ("Ages 5–7"), days (a multi-select, so a class that meets on two days is one row at one time; a class with different times on another day is a second row), start and end (HH:mm, the end after the start), instructor, location, note, and an optional enrollLabel and enrollHref (older enrolLabel, enrolHref). A row shows once it has a name, a day and valid times.

Enroll links. enroll { label, href, newTab } (a block saved earlier holds it as enrol; the new key is read first, field by field, the old fields are hidden in the admin, and a save moves any old value to the new key and empties the old one). The same applies to a row's enrollLabel and enrollHref (older enrolLabel, enrolHref) and the labels.enroll copy key (older labels.enrol). The old spelling is still accepted while stored data moves; writers store the new one. enroll is the default for every class; a class can set its own. {class}, {day} and {start} in a link fill in from the row, URL-encoded, so a trial form can arrive with the class chosen (/trial?class={class}). Links open in a new tab through the link adapter by default (newTab), with a screen-reader notice. Only http(s), mailto, tel and relative links render; the field validates the same rule.

Spots. Each class can carry availability { status, spotsLeft, expiresAt }: spots ("3 spots left"), waitlist ("Waitlist open"), full ("Class full") or nothing. The value is typed by hand and must carry an expiry, the rule the business profile's availability line already follows. Past its expiry, or incomplete (no expiry, a count below one), it renders nothing: the server drops it at render time and the browser island removes it from a cached page, so a stale claim never shows. It never animates, pulses or counts down. Capacity from a live events collection comes later; the trigger is an events collection with a per-session capacity that a class row can name.

Timezone, term and breaks. timezone is the IANA zone the times are in; when it is blank the business profile's is used (with dataSource on profile, the default). "Today", the finished-class dimming and the calendar files follow it. With no timezone at all the times are floating: no "today" mark on the server, and calendar entries at the same wall-clock time wherever they are opened. term { label, startsOn, endsOn, note } prints a masthead line ("Autumn term · Sep 8 to Dec 12 · Join any week.") and ends each calendar series on the last day. breaks[] (label, from, to) print as dashed bands and are left out of the calendar files; a break that has ended stops showing. Unless breaksFromProfile is off, the profile's hours overrides marked closed join the breaks, consecutive dates with one label becoming one range.

Calendar download. Every class has an "Add to calendar" link: a data: URL with a download name (starters-tue.ics), so it needs no route and no script. The file is a weekly event with a TZID, the class's day and times, the room as the location, and an EXDATE for each break date that falls on the class's day. The series length is the weeks from the first class date to the term's last day (COUNT); with no term end it runs 52 weeks. show.calendar turns the links off.

Phones. Below 768px the browser island turns the day strip into a tablist (arrow keys, Home and End; today first, else the next day with classes), shows the selected day's panel only, and adds the age select ("My child is") and a level select. The age select lists every whole age the classes span; a class matches when the age is inside its range. A day with nothing left after filtering shows its own message. From 768px every day shows again and the strip is hidden; the filters stay. Without JavaScript every day shows, stacked on a phone, and the controls stay hidden; every class keeps its enroll link and its calendar download. Finished classes today dim (data-finished="true"); nothing else animates.

Shared timetable. When the site builds the class-schedules collection (createLocalLayer({ classSchedules: true }) in @wabbit/tome-local), source: 'collection' and a schedule relationship make the block read one timetable document instead of its own rows, so a finder, a pathway and this timetable show the same classes. Pass the collection's slug when you build the block (localClassScheduleBlock.block({ classSchedulesSlug: local.slugs.classSchedules })); without it the block stays inline-only and holds no relationship to a collection the site may not have. The document wins for facts (classes, term, breaks, timezone, week start, age bands and levels); the block keeps its copy and display options. "This week" and "finished" come from sessionsThisWeek in @wabbit/tome-local/classes, so every reader of the document agrees on what has ended. A document that is missing, unpublished or unreadable leaves the block on its own inline rows. source defaults to inline, and a block that never sets it renders exactly as before.

Options for a booking-led timetable. Every one is off or empty by default. intro is one supporting sentence under the heading. ageFilter: 'bands' lists age bands (the document's, or the block's own ageBands[]) instead of single ages; a class shows in a band when its ages overlap it, and ?age=5-7 (a band key; a single age picks the band that holds it) and ?level= in the page address, else the block's preset, choose the starting filters. levels[] (the document's, or the block's own) gives each class its place on its track: order within a track is the step order, and the level stripe is drawn as markup with its text beside it ("Step 2 of 5"). summary adds a line that says what the filters show with a button to clear the age filter. emptyDays: 'note' keeps a day with nothing left after filtering and says so ("No classes for Ages 5–7 on Fridays"). markNext marks the soonest unfinished class with room among the classes on show, recomputed when the filter changes; actionEmphasis: 'next' also fills only that class's enroll button and outlines the rest. showDates puts each day's date in its heading and on the phone tabs. labels.finished adds the word "Finished" to a class that has ended, labels.calendarRow names each calendar link after its class, day and time, and calendarWhenFull: false drops the calendar link from a full class. calendarLink adds one download under the week with every class on show: a weekly series per class day to the term's end, a skipped date for each break. moreLink adds a link under the week and printLabel adds a print button.

Options for a compact, dated timetable. Also off or empty by default. timeSplit marks each class time up as a start and an end ([data-schedule-time-start], [data-schedule-time-end], the end carrying the dash: "4:30" and "–5:15") so a theme can stack or restyle the halves; the words read the same, and it pairs with timeStyle: 'compact'. dayNameStyle: 'short' sets each day heading in the locale's short weekday ("Mon 19") and keeps the full name for screen readers ([data-schedule-day-short], [data-schedule-day-long]). labels.today (placeholder "Today") puts that word in today's day heading ([data-schedule-today-label], hidden on every other day and kept current after mount) and in today's phone tab name ("Tuesday, October 20, Today"). The "No classes for {age} on {day}s" line also fills {ageLower} ("ages 5–7") for a copy that reads mid-sentence.

Options for a short, narrowed list. Four more, each off or at today's behavior by default, for a rolling list (range: 'next') that is already filtered to one level. timeMinutes: 'always' keeps the minutes on the hour with timeStyle: 'compact' ("9:00"); the default 'auto' drops them ("9"), and the locale clock is unchanged. showControls: false leaves out the age and level filters, the filter summary, the print button and the phone day strip. showTerm: false leaves out the term line and the break notes. calendarStyle: 'icon' draws each class's calendar link as an icon button (data-ics-style="icon", an aria-hidden SVG, data-schedule-ics-icon) that keeps its accessible name: the labels.calendarRow text when set, else the link word and the class, day and time; the default 'link' is the text link. The per-row age, level and level-stripe repeat is already hidden with show: { age: false, level: false, levelStripe: false }, so a list filtered to one level needs no further switch.

Next term. nextTerm { label, line } (both optional, empty by default) adds one cell after the term and the breaks, for the term that comes next: a label ("Winter term") and a line ("Times announced Dec 1"). It is hand-typed copy, so it works with inline data and with a shared timetable. The cell is <p data-schedule-next-term> with data-schedule-next-term-label and data-schedule-next-term-line spans; a label or a line alone is enough, and with neither nothing renders.

A rolling list. On the list variant, range: 'next' with a limit (default 4) shows the next dated sessions across this week and next instead of this week's days: one section per date (data-date, with the date in a <time>), each row dated (data-schedule-date), no day strip, and nothing past the term's end or inside a break. Narrow it with the starting filters (preset.level, or preset.age with ageFilter: 'bands'), which is how a program page lists "Level 1 this week and next". It reads tome-local's nextSessions, so it agrees with the finder and the program card on what is next. calendarLink on a rolling list downloads every slot of the filtered classes (a weekly series each, to the term's end), not only the few rows on show. The root carries data-schedule-range="next".

Phones, in detail. The day strip sticks to the whole block (below 768px the controls box steps aside, so a theme's frame around the block is the strip's container) on a ground set by --tome-schedule-strip-bg; a tab that carries its date is at least 55 by 62px (--tome-schedule-tab-min-w, --tome-schedule-tab-min-h); today is selected first; a day emptied by the filter has a struck tab and, with emptyDays: 'note', a card ("No classes for ages 5–7 on Fridays": {ageLower} is the age text with its first letter lower-cased, {age} as typed). A finished class keeps a solid border, the muted ink, the word "Finished" and an outline pill. The filter and its select shrink with the container and clip a long option with an ellipsis, so nothing overflows a 320px screen. Printing shows the whole week whatever the screen: the island shows every day again for the print (beforeprint) and restores the phone view after it (afterprint); the controls, the strip and the links under the week are not printed. The age tag has no rule of its own while an age is chosen: the root's data-schedule-age-fixed is the hook for a theme to hide it.

Hooks: root data-local-class-schedule, data-block-variant (week or list) and data-schedule-timezone; data-local-label and data-schedule-heading; data-schedule-term, data-schedule-breaks and data-schedule-break; data-schedule-controls, data-schedule-filter (age or level), data-schedule-daystrip and data-schedule-tab (data-selected, data-today, data-empty); data-schedule-days, data-schedule-day="<0-6>" (data-today, data-filtered-empty), data-schedule-day-name, data-schedule-sessions, data-schedule-empty and data-schedule-none; per class data-schedule-class (data-day, data-start, data-end, data-age-min, data-age-max, data-level, data-finished), data-schedule-time, data-schedule-name, data-schedule-meta, data-schedule-age, data-schedule-level, data-schedule-instructor, data-schedule-location, data-schedule-note, data-schedule-spots (data-spots-state of spots, waitlist or full, and data-expires), data-schedule-actions, data-schedule-enroll and data-schedule-ics. Opt-in hooks: data-schedule-intro; on the root data-empty-days="note", data-action-emphasis="next", data-schedule-mark-next, data-schedule-finished-word, and, while a filter has a value, data-schedule-age-fixed and data-schedule-level-fixed; data-schedule-summary (a polite live region) and data-schedule-summary-reset; data-schedule-day-date and data-schedule-tab-date; per class data-schedule-date, data-schedule-next, data-schedule-finished-label and the level stripe (data-level-stripe with data-level-step and data-level-steps, data-level-segment with data-filled, data-level-text, data-stripe-fill); data-schedule-print, data-schedule-calendar-all, data-schedule-calendar-note and data-schedule-more. Optional knobs: --tome-schedule-col-min, --tome-schedule-today, --tome-schedule-tag-bg, --tome-schedule-tag-ink, --tome-schedule-action-bg, --tome-schedule-action-ink, --tome-schedule-row-bg. The rolling list adds root data-schedule-range="next" and data-date on each day section.

The board. board lists today's sessions as ticket rows: the time, then the class name with its age rule, room and note, then the session price, then a state chip ("On now, until 7:00 PM", "Starts 7:30 PM", "Finished", or "Sold out"). The rows come from tome-local's sessionsThisWeek, filtered to today's date in the schedule's timezone (not nextSessions, which drops finished sessions, so a finished row keeps its place, dimmed, unless showFinished is off). It works with inline rows and with the shared timetable. A clock line sits above the rows (sessionLine, default {date} · it's {time}; {closes} reads today's closing time from the business profile hours, and the part of the line that holds it is left out when the profile has none) and an optional footnote { text, linkLabel, href, newTab } below them (put {link} in the text to place the link mid-sentence). The chip words are fields under labels: now ({end} fills), starts ({start} fills), finished and full. Times print in the block's clock style (timeStyle, timeMinutes).

The board is honest by construction. It renders nothing with no timezone and nothing on a day with no sessions: never an empty card. "Sold out" appears only from a row's hand-entered availability line (status: full) and only while its expiry is in the future; the board never counts spots, and a session that is full and has ended reads Finished. show.spots off leaves the claim out. A small client island keeps the chips and the clock true at session boundaries on a cached page, speaks a real change once through a polite region, and animates nothing (so reduced motion needs no special case). The root carries data-board-date; once that date is no longer today in the schedule's timezone the island hides the board, which is the honest failure for a cached page.

Board hooks: root data-local-class-schedule, data-block-variant="board", data-schedule-board, data-board-date, data-schedule-timezone, data-board-hide-finished; data-local-label, data-schedule-heading, data-schedule-intro; data-board-line with data-board-clock; data-board-rows (the ol); per row data-schedule-class (data-day, data-start, data-end, data-starts-at, data-ends-at, data-schedule-date, data-finished, data-board-state of on, soon, finished or full) with data-schedule-time (data-schedule-time-start and -end with timeSplit), data-schedule-name, data-schedule-meta, data-class-price (data-price-mode) and data-board-chip (data-expires while sold out); data-board-note; data-board-live. Optional knobs: --tome-board-row-bg, --tome-board-row-out-bg, --tome-board-on-bg, --tome-board-on-ink, --tome-board-soon-bg, --tome-board-out-bg, --tome-board-out-ink.

Local Class Finder

local-class-finder is the first screen for a business that places children (or adults) by age and level: gyms, dance and swim schools, music schools, preschools, camps. It has two variants. ask is the home hero: a heading and two pill questions (an age band, then experience) that answer in place with one result card. level is a program page's hero for one fixed level.

The answer. The result card holds the said-back line ("You told us: 5–7, new to gymnastics"), "Start in {class}", the class's level stripe with its text ("Level 1 of 5 · 45 minutes · 1 coach to 8"), this week's remaining times as tags, a spots line, the trial button and a link to the timetable. The server renders the default answer, so the page works without script. A small island answers a tap in place (the pressed pill moves and the card changes; nothing animates, and the card is a polite live region), re-reads the clock after mount and at each expiry, and arms the stripe's once-in-view fill only when motion is allowed. Both questions are always on screen; it never becomes a multi-step quiz.

Matching rules. rules[] maps (ageBand, experience) to a level name; the first match in array order wins. experience is any or a key from experienceOptions[]. With no experience question only any rules can match. A choice no rule resolves keeps the previous answer and says nothing new. defaults { ageBand, experience } is the answer before anyone taps. The editor checks the rules at save (every band, level and experience must exist and the default must resolve); with the shared timetable the bands and levels are in that document, so the check cannot run until render, and a rule set that resolves to nothing renders nothing.

Data. source: 'collection' reads the shared local-class-schedules document through the block's read hook (the virtual scheduleData, memoised per request); pass localClassFinderBlock.block({ classSchedulesSlug: localLayer.slugs.classSchedules }) when @wabbit/tome-local built the collection, otherwise the block offers only inline data and adds no relationship. source: 'inline' (also the fallback when the collection cannot be read) uses the block's own ageBands, levels and classes (the finder keeps the fields it needs: a level, ages, days, times and the spots group), with timezone, term and breaks. Times come from sessionsThisWeek (unfinished sessions only, at most four), the spots line from the soonest unfinished session with room and only while its hand-entered claim has not expired, and the level line from the ladder (levels[], order within a track is the step) with the class length worked out from the classes when they agree. Nothing is invented: no expiry, no claim.

The live line. Under the lede, a dot and a message from the business profile's expiring availability (liveLine.source: 'profile', a manual message only) or an inline one (source: 'inline', with its own state and expiresAt), then a second clause: the term ("Fall term · Sep 8 – Dec 13 · Join any week") or, while one is under way, the break. A state other than none needs an unexpired expiresAt; an expired message renders nothing, on the server and after mount.

Links. cta { label, hrefPattern } fills {class} (the level's label), {age} (the band's key) and {program} (the level's name), URL-encoded, and refuses a scheme other than http(s), mailto and tel. timetableLink { label, anchor } carries ?age=<band key> before the anchor's hash, so #timetable becomes ?age=5-7#timetable.

A class today in the spots line. The spots, waitlist and full lines fill {when} as well as {n} and {day}. It reads labels.whenToday (default "today's {time} class") when the soonest class with room is today in the timetable's timezone, and labels.whenDay (default "{day}") on any other day; {time} and {day} fill in both. Set labels.spotsMany to "{n} spots left in {when}" for "3 spots left in today's 4:30 class", and labels.whenDay to "{day}'s {time} class" for "3 spots left in Thursday's 4:30 class" on the other days. The default lines still say "on {day}".

The `level` variant. Breadcrumb (crumbs[], with the level itself as the current page), an h1 (the level's label unless heading is set), tags (the band, the stripe with "Level 1 of 5", then extraTags[]), the lede, a plain GET form (ask { action, ageLabel, classLabel, notSureLabel, submitLabel }) that sends age and class to the trial page with the class preselected, and the spots line.

Photo. media { image, layout: 'tall' | 'none', label } adds one photo after the copy (the right-hand lane from 1024px, after the result card below it); label is the data-compliance-label ("Illustrative photo") and should be set for a stock photo.

Hooks: root data-class-finder and data-block-variant (ask or level); data-finder-copy; data-finder-media (data-finder-media-layout="tall"); data-finder-eyebrow; data-finder-live (data-live-state) and data-finder-live-clause; data-finder-question (age or experience, role="group", with a <legend>) and data-finder-option (aria-pressed, an optional <small>); data-finder-result (aria-live="polite"), data-finder-said, data-finder-class, data-finder-level-line, data-finder-times and data-finder-time, data-finder-spots (data-spots-state of spots, waitlist or full, and data-expires), data-finder-cta and data-finder-timetable-link; the shared level stripe data-level-stripe (data-level-step, data-level-steps, data-stripe-fill), data-level-segment (data-filled) and data-level-text. level: data-finder-crumbs, data-finder-tags, data-finder-tag, data-finder-ask, data-finder-field and data-finder-submit. Optional knobs: --tome-finder-pad-y, --tome-finder-accent, --tome-finder-pill-h, --tome-finder-card-bg, --tome-finder-cta-min-h (the trial button's minimum height, default 3rem, never below 44px) and, shared with the schedule's stripe, --tome-level-stripe-w, --tome-level-stripe-h and --tome-level-stripe-gap (default the old rem sizes). Opt-in wording: ageBands[].pillLabel, selectLabel and saidLabel (the pill, the timetable filter option and the said line's {age}, each falling back to label; the schedule reads selectLabel; with source: 'collection' the shared timetable's bands carry the same three and the document wins), liveLine.clauseTemplate ({term}, {start}, {end}, {note}), and trackLabels[] (track, levelOf, the level position per track).

Local Class Pathway

local-class-pathway answers "where does my child start, and where do they go next?" with the levels of a class program in plain words. It has three variants over one data shape, and it reads the same shared timetable as the finder and the schedule, so the three agree.

Variants. bands: a pill for each age band that has a level (aria-pressed), and under them that band's levels as cards in ladder order; initialBand starts one selected, and with script off every band shows. cards: the levels named in levelNames[] (in that order; a name the timetable does not hold is skipped) as cards with an action (action { label, hrefPattern }, {class}, {age} and {program} URL-encoded), after up to two photos (media[] { image, alt }) at one height; this is the "little movers" band, so a page needs no split view. ladder: the current level's track as rungs (current), preceded by the one step that feeds it when that step sits on another track, with "You're here" on the current rung (aria-current="step"), then exactly one card for the next level on the same track (kicker teaserLabel, its line, its times and a link to its program page) and an optional aside { title, text }. At the top of a track there is no next card.

Next band. bandTeaser (off by default) adds, under the selected band's cards, one card for the next age band's entry level (the first level levelsForBand returns): a kicker from labels.nextBand (default "Next, from age {minAge}", the next band's youngest age; a band with no min shows just its pill text), the level's name, its line, forWho and an "About {class}" link when the level has an href. It follows the pills, and the last band has none. Hook data-pathway-next-band.

A card holds the level's name, its stripe with the position text ("Level 1 of 5", or "Step 1 of 2" through trackLabels[]), "Who it's for" and "Moves up when" (the level's forWho and movesUpWhen, each shown only when it has text) and this week's unfinished sessions as tags. Nothing is invented: a level with no text and no sessions is a name and a stripe.

Optional level text. Three more optional fields on a level (the shared timetable's levels[], or the block's inline levels), each empty by default and each changing no markup until set. teaser is one or two sentences a next-level card shows in place of "Who it's for": the bands variant's next-band card and the ladder's next-level card (the sentence carries data-pathway-teaser-text). blurb is one line on the level's card in place of the "Who it's for" and "Moves up when" pair, and ageTag is a short tag beside the name ("Walking–3"); both are read by the cards variant only, which wraps the name, tag and stripe in one data-pathway-card-head row when a level has a tag, and marks the line data-pathway-blurb and the tag data-pathway-age-tag. The ladder variant also takes teaserLink { label, href } for its next-level card: href replaces the level's program page and label ({class} fills in the level's name) replaces the labels.aboutLevel copy; with neither, the link is the level's href with "About {class}" as before.

Data. source: 'collection' reads the shared local-class-schedules document through the block's read hook (the virtual scheduleData, memoised per request); pass localClassPathwayBlock.block({ classSchedulesSlug: localLayer.slugs.classSchedules }) when @wabbit/tome-local built the collection, otherwise the block offers only inline data and adds no relationship. source: 'inline' (also the fallback when the collection cannot be read) uses the block's own ageBands, levels (with forWho and movesUpWhen) and classes, with timezone and breaks. The cards variant's level names are stored as levelNames[], because an inline pathway also carries the full levels[] ladder and one block cannot hold two fields with one name.

Server first. The server renders every band's cards; a small client island shows the pills, narrows to a band, re-reads the clock after mount (sessions that have started drop out) and arms the stripe's once-in-view fill only when motion is allowed. A stripe already in view when the page hydrates stays drawn and is never armed, so it never blanks and springs back; one below the fold, or in a band not yet shown, arms and fills when it enters view.

Hooks: root data-class-pathway and data-block-variant (bands, cards or ladder); data-pathway-copy; data-pathway-bands (role="group") and data-pathway-band (aria-pressed, an optional <small>); data-pathway-group (data-band on bands); data-pathway-next-band; data-pathway-card, data-pathway-step (the shared level stripe and its data-level-text), data-pathway-for, data-pathway-moves-up, data-pathway-times and data-pathway-time, data-pathway-action; cards: data-pathway-media; ladder: data-pathway-ladder, data-pathway-rung (aria-current="step"), data-pathway-here, data-pathway-teaser and data-pathway-aside. Cards, rungs and photos carry data-tome-reveal-item. Optional knobs: --tome-pathway-pad-y, --tome-pathway-accent, --tome-pathway-pill-h, --tome-pathway-card-bg, --tome-pathway-media-h and, shared with the finder and the schedule, --tome-level-stripe-w, --tome-level-stripe-h and --tome-level-stripe-gap.

Local Facilities

local-facilities answers "where is it?" for a venue with several places to find. plan (the default) sets the list of places beside an illustrated site plan; list is the list alone; locator shows one place, its card and the plan with only its marker (an event page's "where it is" inset).

Fields. eyebrow (a short line above the heading, printed only when set), heading (printed only when set), headingLevel (h2 or h3), intro, dataSource (profile, the default, or inline), timezone (blank uses the profile's), groupBy (type, the default, or none), showGroupNav (a row of category links, on by default) and groupNavLabel, showGroupCounts (off by default: each category link also shows how many places it holds, as span[data-facilities-group-count] inside the link, so a screen reader reads "Fields and courts 10"), plan { image, alt, label, credit } (the label defaults to "Illustrative plan" and always prints), showOpenState (default on), inquiryHrefTemplate ({key} fills, for example /book?facility={key}), showOnPlanHrefTemplate (where "Show on plan" goes, {key} filled, for example /site#plan-{key} to send a locator inset to the full plan on another page; blank, the default, links to the marker on this page), idPrefix (only when a page holds two facilities blocks), locateKey (locator: the key to show; blank shows the first row) and labels (every word the block prints). The four row actions (showOnPlan, directions, inquire, details) fill {name} and {plate}: "See {name} on the full plan" prints "See Field 4 on the full plan", and a label with {name} is the link's accessible name by itself; a label without it prints as written, with ", <name>" appended to the accessible name ("Show on plan, Field 4"). facilities[] holds 1 to 60 places: name and key (both required), plate (the marker text; blank uses the key in capitals), type (the group), scheduleKey, hoursText, accessibility, status (normal, limited or closed), statusNote, statusExpires, lat and lng, x and y (the marker position, a percent of the plan image's width and height), image and imageAlt, blurb, href and bookable. Pass localFacilitiesBlock.block({ mediaCollection }) when your uploads collection is not media.

The key. ^[a-z0-9][a-z0-9-]{0,23}$, unique within the block (the array refuses a duplicate) and never renamed once events refer to it. Rows are id="<idPrefix>facility-<key>" and markers id="<idPrefix>plan-<key>", so another block links to a place with #plan-<key> or #facility-<key>; the org pack's event rows use the same key and id forms.

Field rules. A limited or closed status needs statusExpires, and after it the status no longer prints (on the server, and the browser removes it from a cached page). lat and lng come as a pair (latitude -90 to 90, longitude -180 to 180); with both, the row offers a keyless Directions link. Alt text is required with a photo and with the plan image. A row renders only with a name and a valid key; the block renders nothing without one.

Open state. With scheduleKey naming a schedule in the business profile, the row says "Open now · closes at 9:00 PM" or "Closed now · opens tomorrow at 6:00 AM", in the block's timezone. A live closed status replaces that line, so a closed row never says "Open now" and "Closed" together (the status chip and note speak for it; the open state comes back when the status expires, server and island alike). A limited status keeps both. Without a schedule key the row makes no claim (the profile's main hours are never assumed for a place), and a key that names no schedule is unknown, never "closed". showOpenState: false drops the line and its hook, for a locator beside an event on another day.

Behavior. Server first: without script the list and the full plan both show, each marker is a link to its row and "Show on plan" is a link to its marker. The client island adds scroll-spy (the row crossing a band below the header lights its marker), marker activation (the row scrolls to the middle and its heading takes focus), landing on #plan-<key> or #facility-<key> (the row and marker light, the marker flashes, scroll-spy waits for the visitor's next input), and below 48rem a short card pinned to the bottom of the screen with the active marker and an "Open full plan" button for the full-screen sheet (stepped zoom, pan by scrolling, the key list, focus kept inside until Escape or Close, then returned). A landing on a phone shows the card, not the sheet. It also keeps each open state and status true on a cached page: a recompute at mount (silent), then at the next opening, closing, status expiry or local midnight and on visibilitychange; a change after load is announced once in a polite live region. Under prefers-reduced-motion every scroll is an instant jump and the sheet does not animate.

Local Facilities hooks. Root: data-local-facilities, data-variant, data-block-variant (plan, list or locator), data-has-plan, data-locate, data-facilities-enhanced (set by the island). Opener: data-facilities-header, p[data-facilities-eyebrow] (only when eyebrow is set, above the heading), data-facilities-heading, data-facilities-intro. Categories: nav[data-facilities-groups] with a[data-facilities-group-link] (aria-current set by the island; with showGroupCounts the link ends in span[data-facilities-group-count], the number of places in that group). List: div[data-facilities-list], div[data-facilities-group] (id="<idPrefix>group-<slug>"), [data-facilities-group-name]. Rows: article[data-facility] with data-facility-key, data-facility-status, data-facility-open (open, closed or unknown; absent without a schedule key) and data-active; parts figure[data-facility-media], p[data-facility-plate], [data-facility-name], p[data-facility-type] (ungrouped lists), p[data-facility-hours] with span[data-facility-open-state] (data-state) and span[data-facility-hours-text], p[data-facility-access] with span[data-facility-access-label], p[data-facility-status-note] with span[data-facility-status-chip] (data-status) and span[data-facility-status-text], p[data-facility-blurb], div[data-facility-actions] with a[data-facility-link], a[data-facility-directions], a[data-facility-inquire] and a[data-facility-show]. Plan: figure[data-facilities-plan], div[data-facilities-plan-image] (the image and the markers only; no text), button[data-facilities-open-sheet], figcaption[data-facilities-plan-caption] with span[data-facilities-plan-label][data-compliance-label] and span[data-facilities-plan-credit]. Markers: a[data-facilities-marker] with data-facility-key, data-plate (the plate is drawn from it by CSS, so the plan holds no text), data-facility-name (the plain name, so a callout can read "Field 4" while the accessible name keeps the plate), data-facility-status (limited or closed while a status is live; absent otherwise, and dropped by the island at expiry; the sheet's marker buttons carry both), inline --facility-x and --facility-y, aria-current and data-flash. Sheet: dialog[data-facilities-sheet], [data-facilities-sheet-title], button[data-facilities-sheet-close], div[data-facilities-sheet-viewport], div[data-facilities-sheet-canvas] (--facilities-zoom), div[data-facilities-zoom] with button[data-facilities-zoom="in|out|fit"], ol[data-facilities-sheet-key] with button[data-facilities-sheet-key-item]; <html data-facilities-sheet-open> while it is open. div[data-facilities-live] is the visually hidden live region. Optional knobs: --tome-facilities-plate-bg, --tome-facilities-plate-ink, --tome-facilities-active, --tome-facilities-plan-top, --tome-facilities-column (the header's and the layout's grid column; default content-start / content-end, which needs the page grid's named lines. A host whose page grid has none sets it to 1 / -1; a browser without subgrid already falls back to 1 / -1). When the plan image's upload stores both width and height, the plan figure carries --fc-plan-ratio: <width> / <height> and the image takes that aspect ratio, so an SVG with no intrinsic size keeps its height in WebKit.

Local Next Sessions

LocalNextSessions is a server component, not a block: the next few sessions of one level, for a program page's sticky next-step card (a slot in editorial-pack's info-panel). Pass the shared timetable document and the level name: <LocalNextSessions schedule={doc} level="Level 1" limit={3} />. It lists each session with a day word ("Today", "Tomorrow" or the weekday), the date and time, and the spots line while it is still true; the first session with room carries data-schedule-next. It renders nothing when there is no document or no session left, unless labels.none is set. labels (heading, spotsOne, spotsMany, waitlist, full, none, today, tomorrow), locale, timeStyle (locale, compact, 12h or 24h), timeMinutes (always keeps ":00" with the compact clock: "9:00"; default auto drops it), dateOrder (weekday-month-day, the default, reads "Tue, Oct 20"; weekday-day-month reads "Tue 20 Oct"), now, fallbackTimezone and profileOverrides are optional. From @wabbit/tome-blocks-local-pack/server, LocalNextSessionsFromSchedule reads the document by id (scheduleId) and the business profile's timezone and closed dates for you. Hooks: data-next-sessions, data-next-sessions-heading, data-next-session (data-date), data-next-session-date, data-next-session-time, data-schedule-next, data-schedule-spots (data-spots-state, data-expires) and data-next-sessions-none. There is no client island and no motion.

Honesty rules

  • Live Status renders nothing rather than guess. Without hours, there is no status; an availability line past its expiry is not shown, and a profile status without an expiry is never shown.
  • The class schedule reads a shared timetable only when the document is published, and falls back to its own rows when it cannot; a spots line on the shared source speaks only for sessions that start before its expiry.
  • The class schedule shows a spots, waitlist or full line only while its hand-entered expiry is ahead; an entry without an expiry shows nothing, and the browser drops an expired one from a cached page.
  • The class pathway shows only what the timetable holds: a level's own lines, this week's unfinished sessions and, on the ladder, the next level of the same track. It draws nothing for a level it cannot find.
  • The class finder shows a times, spots or live line only from data that is still true: this week's unfinished sessions, a spots claim or live message with an unexpired expiry. It re-checks on mount and at each expiry, and a choice no rule resolves changes nothing.
  • Local Facilities says a place is open or closed only from a named schedule it can read, prints a status only before its expiry, and labels the plan as illustrative. It is not a map and claims no route.
  • A hidden profile address, or a hidden location address, never reaches the page: no street line, no coordinates, no directions link, no map pin.
  • A location is open or closed by its own clock. A list across time zones shows each place its own answer, and a place with no hours claims nothing.
  • A live map contacts a third-party map host only after the visitor asks for it, and falls back to directions links if it cannot load.
  • The ordering island holds item keys and quantities in the browser and hands them to an external checkoutUrl. It takes no payment, creates no order record and renders no add action without both ordering.enabled and a checkoutUrl.
  • The layer adds no allergen or dietary claim of its own. That wording comes from your content.

Server / client posture

The . entry, @wabbit/tome-blocks-local-pack/meta and @wabbit/tome-blocks-local-pack/demo are server-safe and contain no 'use client'. @wabbit/tome-blocks-local-pack/server is server only: it reads the cached profile through @wabbit/tome-local/server, which carries the server-only guard. @wabbit/tome-blocks-local-pack/meta and @wabbit/tome-blocks-local-pack/demo are also payload-free, so a browser gallery can import them. The renderers are server components. The live-status recompute, the class schedule's filter and day-strip island, the class finder's pill and clock island, the facilities island and the ordering island are small 'use client' islands that receive serializable props, and the server value renders first so there is no hydration mismatch.

License

Commercial, see LICENSE.md. Family block-packs, tier free.

Block reference

local-price-list

A local business's menu or price list. One data shape (sections of items, prices in minor units) renders as a photo card grid, a printed ledger or a short home-page teaser.

When to use
  • A restaurant, cafe or bakery menu where each item has its own photograph (card-grid)
  • A drinks list, salon or trades price list sold by the line rather than by sight (ledger)
  • A home-page preview of a few items that links to the full menu (teaser)
  • A class business that sells a free trial and then a term: two or three fee cards of one height, the term fee with a classes-a-week picker (term-fee)
  • A venue or studio that sells bundles for a group (a party, a class, a corporate booking): cards with the headcount, the price of each extra, the length, the deposit and what is included, and the small add-ons beside them (package)
Page types
  • landing
  • pricing
  • marketing
How to use

Add sections (title, optional tagline and note), then items with a stable key, name, description, photo and one or more prices in minor units (1700 = 17.00). Name one item in featuredLead.itemKey to open the card grid with it, and mark at most one item as the breaker. Ordering renders an add action only when ordering.enabled is on AND a checkoutUrl is set; mount the pack's ordering island on the page to make it work. With ordering off, askLabel turns each card's action into a control that opens its details. For term-fee, put the cards in one section as items: mark the recommended one emphasis primary, give each an optional kicker, what it includes and excludes, and an action; give the term fee one price per classes-a-week choice (label "1", "2", "3", with a per line such as "for the term · 14 weeks · $17 a class") and name the picker in pickerLabel. For package, give each item a price (variants[0]), then optionally a headcount, the price of each extra, a length, a deposit (none or an amount, with a refund note) and an inclusions list; mark the recommended one emphasis primary and give it an action link, which may carry a planner preset such as ?type=party&pkg=Name#planner. Add-ons are items that set only a name, a line and a price.

Avoid when
  • Selling products with cart and payment (use the catalog blocks; the ordering flag only hands off to an external URL)
  • A text-only list of 40+ items in one column (a two-column printed variant is not built yet)
Register in

marketing-landing

local-live-status

A live open-now status computed from the business hours in its own timezone (split shifts, windows past midnight, holidays and special hours, a named secondary schedule such as a kitchen or a service desk), worded as a bold lead and a detail, with call, directions and one state action.

When to use
  • A sticky bar above the header on a local-business site (mount it in the chrome announcement slot)
  • A status line under a hero or beside a contact block, so visitors see whether you are open before they call or travel
Page types
  • landing
  • marketing
  • about
How to use

Enter the timezone and weekly hours (one row per window; two rows on one day for a split shift; a close earlier than the open runs past midnight), any dated holidays or special hours with a label, and optionally a named schedule whose closing time the open detail names ("kitchen closes at 10"). Set an action for open, closed and closed-today (an action of kind Directions hides the separate Directions link). `bar` is the band (one row from 640px, a 124px block with three equal buttons on phones); `line` sits inline on the page. `timeStyle: compact` drops AM/PM ("2:30", "midnight").

Pairs with
  • local-logistics
  • local-price-list
Avoid when
  • The hours are not kept current: a wrong "Open now" costs more than no status
  • The business has no fixed opening hours (appointments only)
Register in

structural

local-logistics

Everything a visitor needs to arrive: where you are, how to get directions or call, when you are open (today marked, holidays shown), and practical notes for getting there.

When to use
  • The closing band of a local-business home page ("Find us")
  • A contact or visit page for a shop, studio, clinic or venue with fixed opening hours
  • A "plan your visit" band of equal cards (address, parking, hours and a required form such as a waiver) for a venue that people visit for a session (cards)
Page types
  • landing
  • marketing
  • about
How to use

Enter the address lines and locality (and coordinates for a precise directions pin), the phone number, the timezone and weekly hours (two rows on one day for a split shift; a close earlier than the open runs past midnight), any dated holidays or special hours, an optional note, and up to a few visit-note groups (a title and short items). `hoursDisplay` shows the week (identical consecutive days grouped), today only, or a compact week without closed days. For a map, upload an image and keep the illustrative-map label. Untick a part under Show to hide it; hiding the address keeps the locality and drops the directions link.

Pairs with
  • local-live-status
  • local-price-list
  • contact
Avoid when
  • The business has no public address and no opening hours (a service-area business): use a contact block instead
Register in

marketing-landing

local-class-schedule

The timetable for a business that runs classes: when each class meets, who it is for, whether there is room, and a one-tap way to enroll or add it to a calendar.

When to use
  • The classes or programs page of a gym, dance studio, martial arts school, swim school, music school, preschool or camp
  • A home page band that answers "is there a class for my child, and when?"
  • A "what is on today" board for a venue that runs timed sessions all day (the board variant): each row with its time, price and whether it is on now, still to come or finished
Page types
  • landing
  • marketing
How to use

Add one row per class: name, optional level, an age range, the days it meets (a class on two days is one row), start and end as HH:mm, and optionally a teacher and room. Set the timezone (blank uses the business profile's) so today, the calendar files and expiry are right. Give a default enroll link, or one per class; {class}, {day} and {start} in a link fill in from the row. To show room, set a status (spots left, waitlist open or full) and the date and time it stops being true: an expired status shows nothing. Add the term dates and any breaks; the profile's closed dates are added as breaks unless you turn that off. Untick a part under Show to hide it. The board variant lists only today's sessions: set the timezone, enter each session's price, and optionally a clock line, a footnote with a link and the chip wording under Copy; it shows nothing on a day with no sessions.

Pairs with
  • local-logistics
  • local-live-status
  • contact
Avoid when
  • The business sells one-off appointments rather than recurring classes: use a booking or contact block
  • Capacity must come from a live booking system: this block shows a hand-entered value with an expiry
Register in

marketing-landing

local-class-finder

The first screen for a business that runs classes by age and level: the visitor answers two quick questions and is shown the one class to start in, when it runs this week and whether there is room.

When to use
  • The home page hero of a gym, dance studio, swim school, martial arts school, music school, preschool or camp
  • A program page hero for one level (variant level), with the class and age preselected on a trial form
Page types
  • landing
  • marketing
How to use

Point the block at the shared timetable (Source: the shared timetable) or fill the age bands, levels and classes inline. Add the experience options, then one rule per (age band, experience) that names the level to start in; the first matching rule wins, and an experience of "any" matches every answer. Set the defaults, which is the answer shown before anyone taps (and with script off). Give the trial button a link pattern such as /trial?class={class}&age={age}. The live line shows the business profile's expiring availability message; the spots line comes from the class rows' spots, which carry an expiry. Add a photo with a label such as "Illustrative photo" if it is stock.

Pairs with
  • local-class-schedule
  • local-live-status
  • local-logistics
Avoid when
  • The business sells one-off appointments rather than recurring classes by age and level
  • A visitor needs more than two questions to be placed: use a contact or booking form
Register in

marketing-landing

local-class-pathway

Answers "where does my child start, and where do they go next?" for a business that runs classes by age and level: each level in plain words, with its times and a stripe that shows how far up the ladder it sits.

When to use
  • The pathway band of a gym, dance, swim, martial arts or music school home page (variant bands)
  • A band for one age group with a trial action on each level, such as the youngest children (variant cards)
  • The end of a program page, to show where this level leads (variant ladder)
Page types
  • landing
  • marketing
How to use

Point the block at the shared timetable (Source: the shared timetable) or fill the age bands, levels and classes inline. Give each level its "Who it's for" and "Moves up when" lines: they are what the cards show. For bands, optionally name the starting band. For cards, list the level names in the order you want and add up to two photos and the action. For the ladder, name the current level; the next level on its track becomes the one teaser card, and a level at the top of its track shows none.

Pairs with
  • local-class-finder
  • local-class-schedule
  • local-credentials
Avoid when
  • The business has one class and no levels to explain
  • The levels need more than a few sentences each: link to a program page instead
Register in

marketing-landing

local-credentials

The proof that sits near the ask: your licenses, checks, memberships and ratios, stated plainly with a way to verify each one. Nothing is shown past its expiry date, and a placeholder is always labeled.

When to use
  • A band under the hero listing the three or four things a parent or client checks first (variant strip)
  • A trust section for a childcare, coaching, trades, clinic or care business with ratios, policies and credentials to verify (variant panel)
Page types
  • landing
  • marketing
  • about
How to use

Keep Data on the business profile and add your credentials there (Site, Business profile, Credentials): a license, an insurance policy, a first-aid certificate, each with an issuer, an expiry date and a verify link. Expired rows drop out on their own. For the strip, write each line and, where the line rests on a credential, pick its kind: the line then shows only while an unexpired credential of that kind exists. Tick Sample on a placeholder and the block says so. For the panel, add the ratios, up to two policy lists and the date the policy was last reviewed. Set Data to the fields below to show credentials that belong to a second venue or a fixed example.

Pairs with
  • local-logistics
  • team-roster
  • faq
  • local-class-finder
Avoid when
  • You have nothing you can stand behind yet: leave the band out rather than show invented credentials without a Sample label
Register in

marketing-landing

local-facilities

Where everything is: every place at the venue as a row with its key plate, its hours or open state and what to know, next to a drawn plan with the same plates. The list is the plan’s text alternative, so it works without script and for a screen reader.

When to use
  • A park, sports complex, campus, market hall or venue with several places a visitor has to find (variant plan)
  • The same places without a plan image yet (variant list)
  • An event or booking page that shows where one place is (variant locator)
Page types
  • landing
  • marketing
  • about
How to use

Add one row per place with a name and a short key (field-1, lot-a); the key is what events and links refer to, so never rename it once used. Upload the site plan and place each marker by its x and y as a percent of the image. Put open hours in the business profile as named schedules (gates, fieldhouse) and give each row its schedule key. Use a status with an expiry for a temporary closure. Other blocks link to a place with #plan-<key> or #facility-<key>.

Pairs with
  • local-logistics
  • local-live-status
  • event-list
Avoid when
  • You need a pannable map or driving routes; a plan image is not a map.
Register in

marketing-landing

local-locations

Find-a-place for a business with more than one address: every location with whether it is open right now, how to get there and how to book. A site with one location uses the same block and it shows that one place.

When to use
  • A "Find an office" or "Our locations" section for a group practice, a clinic, a studio or a trade with several sites
  • A visit page for a business that is growing from one address to several, without changing the page later
Page types
  • landing
  • marketing
  • about
How to use

Turn on locations in the local layer, add each place under Site, Locations (name, address, timezone, hours, phone, an optional book link), and keep Data on the locations. Each place is open or closed by its own clock, so a list across two time zones is right in both. A place that hides its address shows its town only, with no directions link and no map pin. Choose a live map if the site is set up for one: it loads only after the visitor presses Show map, and the directions links stand in until then. Set Data to the fields below to list places that are not in the collection.

Pairs with
  • local-live-status
  • local-logistics
  • local-credentials
  • faq
Avoid when
  • The business has a single address and nothing more to say about it: local-logistics is the lighter find-us band
Register in

marketing-landing

local-desk-strip

The line a visitor reads before anything else on a multi-location site: which offices are open, one number to call, one way to book.

When to use
  • Under the hero of a group practice, clinic or multi-site service business ("Open now: Millbrook until 5:30 PM, Cedar Flats until 7 PM")
  • A band above the footer that gives the desk number and the book action next to the offices
Page types
  • landing
  • marketing
  • about
How to use

Keep Data on the site’s locations (Site, Locations). The desk number is the business profile’s phone, unless you type one here; the book action is the primary location’s, unless you set one here. Each office reads open or closed by its own clock and always says so in words. Set Data to the fields below for a fixed example.

Pairs with
  • local-locations
  • local-live-status
  • local-credentials
Avoid when
  • The site has one address: local-live-status is the single-line version
Register in

marketing-landing

Exports

Import path
@wabbit/tome-blocks-local-pack
@wabbit/tome-blocks-local-pack/render
@wabbit/tome-blocks-local-pack/render/register
@wabbit/tome-blocks-local-pack/ordering
@wabbit/tome-blocks-local-pack/server
@wabbit/tome-blocks-local-pack/live-map
@wabbit/tome-blocks-local-pack/demo
@wabbit/tome-blocks-local-pack/meta

Changelog

0.15.xMinor

  • local-facilities gains two opt-in options: an eyebrow line above the heading and place counts on the category links.

    Both are off by default, and every existing variant renders exactly as before.

    New field eyebrow prints a short line above the heading as p[data-facilities-eyebrow] inside the header, and nothing when it is empty. New checkbox showGroupCounts adds span[data-facilities-group-count] to each category link with the number of places in that group; the count sits inside the link text, so a screen reader reads it with the category name.

    Counts need the category links (groupBy set to type and showGroupNav on). Both hooks are listed in the package README.

0.14.xMinor

  • Three new variants for the local blocks: a Session Board for the class schedule, a package card for the price list, and a cards layout for logistics.

    Every existing variant renders exactly as before.

    local-class-schedule gains a board variant: today's sessions as ticket rows (time, name with its age rule and note, the session price, and a state chip: "On now, until 7:00 PM", "Starts 7:30 PM", "Finished" or "Sold out"). Sessions come from tome-local's sessionsThisWeek filtered to today in the schedule's timezone, so finished sessions stay (dimmed) unless showFinished is off.

    New fields: sessionLine (a clock line with {date}, {time} and {closes}), footnote (text with an optional link), showFinished, and the copy fields labels.now and labels.starts. The board renders nothing without a timezone or without a session today.

    "Sold out" shows only from a hand-entered availability line that has not expired. A small client island keeps the chips and the clock true at session boundaries and hides a cached board once its date has passed (data-board-date).

    local-price-list gains a package variant built on the fee card: a headline price with the headcount ("for 10 guests"), the price of each extra, the length, a deposit with its refund note, and an inclusions list, all optional, with prices in minor units through the existing formatter. Add-ons are items that set only a name, a line and a price.

    Item fields: headcount, extra, duration, deposit, inclusions. The fee-card fields per, emphasis, kicker and action and the block opener now also show for package; the opener group in the admin is renamed "Fee cards".

    Fact names live under labels (packageLength, packageExtra, packageDeposit, packageNoDeposit, packageHeadcount).

    local-logistics gains a cards variant: the address, one card per visit-note group, the hours and the profile's service areas and credentials as equal cards, then link cards (links[] with a title, a line and a button, such as a waiver). New fields: links, findLabel and newTabNotice.

    The variant shows no map.

    Hooks are listed in the package README: data-board-* (and data-schedule-board), data-package-*, and data-logistics-cards, data-logistics-card and data-logistics-link-action. Needs @wabbit/tome-local 0.7.0 or later for the session price.

0.13.xMinor

  • The class schedule block shows a session price when a row has one.

    The price prints on its own line under the time and age line, with a data-class-price hook and tabular figures: "$18", "From $12", "$12–$20", "Free" or "Price on request", followed by the row's "per" text. Nothing renders for a row with no price, and the calendar download never includes the price.

    The inline class rows gain the same price group as the shared timetable, the block gains a currency field (the shared timetable's currency wins when the block reads it), and the block's copy gains priceFrom, priceFree and priceRequest labels. Prices use the price list's minor-units rule and formatter.

    Needs @wabbit/tome-local 0.7.0 or later.

0.12.xMinor

  • A save now moves renamed keys to their American names and empties the old ones.

    This is the second of three steps toward American spelling in stored values.

    On the class schedule block and collection, enrolLabel, enrolHref, enrol and labels.enrol move to enrollLabel, enrollHref, enroll and labels.enroll. On the event list board, labels.cancelled moves to labels.canceled.

    Anything that still writes an old key lands in the new one.

    This fixes clearing a field: a value sent for the new key, even a blank one, wins and the old value is emptied, so it no longer comes back on the next read or shows on the public page.

    The old group and label no longer have default values, so a new block stores nothing under them. Renderers still read the old keys, so a block that hasn't been saved or backfilled looks the same.

    The class schedule and event calendar demos use the new names.

    BREAKING: @wabbit/tome-blocks-local-pack now needs @wabbit/tome-local 0.6.0 or later, which exports these save hooks from @wabbit/tome-local/classes.

0.11.xMinor

  • BREAKING: the class-schedule enroll button hook is now data-schedule-enroll (was data-schedule-enrol).

    Update any site CSS or script that targets the old attribute. The block tags now read enrollment and license.

    Stored field names are unchanged.

  • Admin labels, field descriptions, demo content and messages now use American spellings.

1 fix (0.11.1)
  • 0.11.1
    The enrol names and two option values now accept their American spellings.

    This is the first of three steps, and nothing that gets written changes yet.

    Class schedule rows and the class schedule block gain enrollLabel, enrollHref, the enroll link group and the labels.enroll copy key. The renderer reads each new key first and falls back to the old enrol key, field by field.

    The old fields are hidden in the admin, not removed, so a save never drops a stored value, and the new fields show the stored value while the new key is empty.

    The credential kind license joins licence, and the price list tag house-favorite joins house-favourite. A credentials strip claim bound to either spelling of the kind matches both, and both tag values show the same label.

    The admin shows both options, because Payload cannot hide one select option; the old one is labeled "(legacy spelling)".

0.10.xMinor

  • The locations block now labels sample places once on the map instead of on every card, and can write hours as "Mon to Fri 7:30 AM to 5:30 PM".

    When a live map is shown, the sample label is printed on the map (data-map-sample) and the cards stay clean; with no map each sample place still carries its own label. The new optional hoursRangeWord field (for example "to") replaces the en dash between days and between times; empty keeps the dash.

0.9.xMinor

  • LocalLocations takes an optional renderOfficeExtra(office) prop: what it returns is appended inside each place, after its actions.

    A wrapper that knows more about a place, such as who is seen there, adds it through the slot instead of reworking the returned markup. Unset, or returning nothing, the output is byte for byte what it was.

    It is a server-side function prop and is never passed to a client island.

0.8.xMinor

  • BREAKING: requires @wabbit/tome-local 0.4 or newer; adds two location blocks, a location data source on three existing blocks, and an optional live map.

    Migration: upgrade @wabbit/tome-local to 0.4 or newer. Nothing else is required: with the local layer's locations option off, the existing blocks' schema, hook and output are unchanged (goldens hold this), and the two new blocks simply appear in the pack.

    New blocks local-locations (the places as a list, each with a live open-or-closed status in its own time zone, one place renders as that one place) and local-desk-strip (every office's status, the desk phone and one book action). Build local-logistics, local-live-status and local-credentials with locationsSlug and their dataSource gains location.

    Build local-logistics or local-locations with liveMap: true and mapMode gains live; import @wabbit/tome-blocks-local-pack/live-map once on the server to register the map island over @wabbit/tome-maps (a new optional peer). The map loads only after the visitor presses "Show map", the directions links stand in until then and if it cannot load, and a place that hides its address is never pinned.

    local-price-list gains no location source. The new blocks render hooks only; the theme owns the look.

  • safeHref now comes from @wabbit/tome-core/utilities/safeHref; the pack re-exports it from its existing internal path.

    Behavior is unchanged. The @wabbit/tome-core peer range is raised to >=1.32.0, the release that exports the new subpath.

0.7.xMinor

  • New block: local-facilities, the places at a venue as a keyed list beside an illustrated site plan, free in the local pack.

    Additive: no existing block changes, and a page without the new block renders exactly as before.

    • Three variants. plan (the default) sets the list of places beside a site plan image with a key-plate marker for each place; list is the list alone; locator shows one place (locateKey, else the first row) with only its marker, for an event page's "where it is" inset.
    • Places. facilities[] holds 1 to 60 rows: name, key, plate, type (rows group under it, with a row of category links, showGroupNav), scheduleKey, hoursText, accessibility, status with statusNote and statusExpires, lat and lng, the marker's x and y (percent of the plan image), a photo with its alt text, blurb, href and bookable.
    • The key. ^[a-z0-9][a-z0-9-]{0,23}$, unique in the block (a duplicate is refused). Rows are #<idPrefix>facility-<key> and markers #<idPrefix>plan-<key>, the same id forms the org pack's event rows link to.
    • Honest states. The open state comes only from a named schedule in the business profile ("Open now · closes at 9:00 PM"); a row without one makes no claim, and a schedule that cannot be read is never shown as closed. A limited or closed status requires an expiry and stops printing after it. lat and lng are both-or-neither and give a keyless Directions link. Alt text is required with a photo and with the plan. The plan always carries its "Illustrative plan" label.
    • Works without script. The list comes first in the page, the full plan follows it, every marker is a link to its row and "Show on plan" is a link to its marker.
    • The island. Scroll-spy lights the marker of the row in view; a marker click scrolls its row to the middle and focuses its heading; the open state and the status stay true on a cached page (a silent correction at mount, then one polite announcement for a change after load); reduced motion turns every scroll into an instant jump.
    • Plan marker hooks. Each plan marker carries data-facility-name (the plain name, so a callout can read "Field 4" while the accessible name keeps the plate) and data-facility-status (limited or closed while a status is live, absent otherwise; the island drops it at expiry, and the phone sheet's marker buttons carry both).
    • Landing on a link. A page opened at, or moved to, #plan-<key> or #facility-<key> lights that place, flashes its marker briefly, centers the row and focuses its heading, and holds scroll-spy until the visitor's next input. idPrefix namespaces every id when a page holds two facilities blocks.
    • Phones. Below 48rem the plan becomes a short card pinned to the bottom of the screen with the active marker and an "Open full plan" button. "Show on plan" opens a full-screen sheet titled "Plan of {place}" (the profile's business name) with zoom in, zoom out and "Fit", pan by scrolling, and the key list; focus stays inside until Escape or Close and then returns. A link landing on a phone shows the card, not the sheet.
    • Locator open state. showOpenState: false drops the open-state line and its data-facility-open hook, for a locator beside an event on another day.
    • US spelling. The booking link is inquiryHrefTemplate ({key} fills), its default label is "Inquire" and its hook is a[data-facility-inquire].
    • Every word is a label. labels covers the actions, the open-state words, the status chips, the category nav, "Open full plan", the sheet title, Close, the zoom controls and "Fit", the pan area, the key heading, the list and marker names and the plan's alt text.

    Public hooks for themes are listed in the README under Local Facilities. On a SQL database the new block adds its own tables when a site regenerates its migrations; nothing existing changes.

    Checkpoint A fixes. The facilities changes below are defaults of the new block; local-live-status gains two opt-in options and its default output is unchanged.

    • Facilities: a closure replaces the open-state line. A live closed status (unexpired) now replaces "Open now · closes at 9:00 PM", so a closed row never says both. limited keeps both. The island does the same on a cached page and writes the open state back at expiry; a closed row has no data-facility-open while the closure is live.
    • Facilities: layout column hook. The header and layout read --tome-facilities-column (default content-start / content-end, as before). A host whose page grid has no named lines sets it to 1 / -1; a browser without subgrid falls back to 1 / -1.
    • Facilities: plan aspect ratio. When the stored plan upload has both width and height, the figure carries --fc-plan-ratio and the image takes that aspect ratio, so an SVG with no intrinsic size is not 0px tall in WebKit. Nothing changes without both.
    • Live status: two opt-in options. showSeparator (checkbox, off) renders span[data-live-sep], an aria-hidden middle dot between the lead and the detail ("Open now · closes at 9:00 PM"); leave it off when the theme draws its own. clockMinutes (auto, the default, or always) keeps the minutes on the hour ("9:00 PM" in the locale style, "9:00" in compact). Unset, both render exactly as before. local-logistics already shows minutes in its hours table and has no open-now sentence, and the facilities open-state line is unchanged by default.
1 fix (0.7.1)
  • 0.7.1
    Facility row actions can name their place, and "Show on plan" can link to the full plan on another page.

    The four row action labels (Show on plan, Directions, Inquire, Details) on local-facilities now fill {name} and {plate}. A label that carries {name} is the link's accessible name by itself, so a screen reader no longer hears the name twice ("See Field 4 on the full plan, Field 4").

    Labels without the token print exactly as before, with the name appended to the accessible name.

    showOnPlanHrefTemplate (optional, {key} filled, for example /site#plan-{key}) sets where "Show on plan" goes, which lets a locator inset on an event page link to the site's full plan. Blank keeps the link on the marker on the same page, as before.

0.6.xMinor

  • BREAKING: local-class-schedule can now read the shared class timetable and gains opt-in controls for a booking-led timetable; the @wabbit/tome-local peer floor rises to >=0.3.0.

    Migration: upgrade @wabbit/tome-local to ^0.3.0 alongside this package. To use the shared timetable, build it with createLocalLayer({ classSchedules: true }) and pass its slug when you build the block: localClassScheduleBlock.block({ classSchedulesSlug: local.slugs.classSchedules }).

    A site that does nothing renders exactly as before.

    • Shared source. source: 'collection' with a schedule relationship (and a virtual scheduleData filled by a per-request read hook) shows one local-class-schedules document, so a finder, a pathway and this timetable agree. The document wins for classes, term, breaks, timezone, week start, age bands and levels; the block keeps its copy and display options. "This week" and "finished" come from sessionsThisWeek. A missing, unpublished or unreadable document falls back to the block's own rows. source defaults to inline, and a stored block without it renders byte for byte as before.
    • Age bands and the URL. ageFilter: 'bands' lists age bands (the document's, or the block's own ageBands[]), matched by overlap. ?age=5-7 and ?level= in the page address, else preset, choose the starting filters.
    • Level stripe. levels[] (the document's, or the block's own) places each class on its track, and the stripe is rendered as markup with its text beside it (data-level-stripe, data-level-segment, data-level-step, data-level-steps, data-level-text). Switch it off with show.levelStripe.
    • Opt-in options, each off or empty by default: intro; summary (a polite live region with a clear button); emptyDays: 'note' (the day keeps its column and says "No classes for {age} on {day}s"); markNext and actionEmphasis: 'next' (data-schedule-next on the soonest unfinished class with room, recomputed when the filter changes, and one filled enroll button); data-schedule-age-fixed and data-schedule-level-fixed on the root while a filter has a value; showDates (dates in the day headings and phone tabs); labels.finished (the word "Finished"), labels.calendarRow (a calendar link named for its class, day and time) and calendarWhenFull: false; calendarLink (one calendar file of the classes on show, a weekly series to the term's end with a skipped date per break); moreLink; printLabel.
    • For consumers. The package exports scheduleFields, makeScheduleReadHook, loadScheduleForRequest and DEFAULT_CLASS_SCHEDULES_SLUG for blocks that read the same document, and the shared LevelStripe markup is a server component with no new client island.

    New block: `local-class-finder`. A hero that answers "which class do we start in?" in place.

    Variant ask is the home hero: two pill questions (an age band, then experience) resolve through rules[] (first match wins) to one result card with the said-back line, "Start in {class}", the class's level stripe and level line ("Level 1 of 5 · 45 minutes · 1 coach to 8"), this week's remaining times, a spots line, the trial button and a timetable link that carries ?age=<band>. The server renders the default answer, so it works without script; a small island answers taps in place (a polite live region, no motion), re-reads the clock after mount and at each expiry, and arms the stripe's once-in-view fill only when motion is allowed.

    Variant level is a program page's hero for one level: breadcrumb, h1, tags with the stripe, a lede, a plain GET form that carries the age and class to the trial page, and the spots line.

    It reads the shared local-class-schedules timetable (source: 'collection', through the same read hook and virtual scheduleData field as the schedule, memoised per request) or its own inline ageBands, levels, classes, timezone, term and breaks. Pass localClassFinderBlock.block({ classSchedulesSlug }) when @wabbit/tome-local built the collection; without it the block offers inline data only and adds no relationship.

    A spots claim or live-line message shows only while its expiry is ahead, on the server and after mount.

    New public surface: localClassFinderBlock, LocalClassFinder, the LocalClassFinderData types, and from ./server LocalClassFinderFromSchedule and getClassFinderData. A stored page without the new block renders as before.

    New block: `local-class-pathway`. The levels of a class program for a parent, reading the same shared local-class-schedules timetable as the finder and the schedule (source: 'inline' | 'collection', the same read hook and virtual scheduleData; pass localClassPathwayBlock.block({ classSchedulesSlug })).

    • Variants. bands: age band pills (aria-pressed) over that band's levels as cards, each with its stripe and "Step 1 of 2" / "Level 1 of 5" text, "Who it's for", "Moves up when" and this week's unfinished times; every band shows without script, and initialBand starts one selected. cards: the levels named in levelNames[] (the step-0 rename: an inline pathway also carries the full levels[]) as cards with action { label, hrefPattern } after up to two media[] photos at one height, which is the "little movers" band, so no split view is needed. ladder: the current level's track as rungs with "You're here" (aria-current="step"), then exactly one card for the next level on the same track (none at the top), plus an optional aside { title, text }.
    • Next band. bands takes an opt-in bandTeaser: under the selected band, one card (data-pathway-next-band) for the next age band's entry level, with a kicker from labels.nextBand ("Next, from age {minAge}"), its level line, forWho and an "About {class}" link when it has an href. It follows the pills; the last band has none.
    • Fields and wording. kicker, heading, intro; teaserLabel; labels for every fixed phrase; trackLabels[] for per-track position wording; locale and timeStyle. The inline source adds forWho and movesUpWhen to each level.
    • Hooks. data-class-pathway, data-pathway-bands / -band, -group, -card, -step, -for, -moves-up, -times / -time, -action, -media, -ladder, -rung, -here, -teaser and -aside. Cards, rungs and photos carry data-tome-reveal-item.
    • Public surface. localClassPathwayBlock, LocalClassPathway, the LocalClassPathwayData types.
    • New columns. The block adds tables and columns, so a site with migrations generates one.

    Fix: the level stripe no longer flashes empty at load. A stripe already in view when the island hydrates used to be drawn by the server, blanked for about 41ms when the island armed it, then sprung back in. The shared armStripeFill now leaves a stripe that is in view at hydration drawn and never arms it; only a stripe below the fold (or in a band not yet shown) arms and fills when it enters view.

    This applies to the finder's ask and level variants and to the pathway; reduced motion is unchanged (always drawn).

    Per-context wording and theme tokens (all opt-in; a stored block without them renders byte for byte as before).

    • `ageBands[].pillLabel`, `selectLabel`, `saidLabel` on the finder's own bands: the pill ("5–7"), the timetable's filter option ("Ages 5–7") and the said-back line's {age} ("5 to 7"). Each falls back to label. local-class-schedule gains ageBands[].selectLabel for its filter option. With source: 'collection' the shared timetable's bands carry them too (@wabbit/tome-local stores and normalizes the three fields): the document wins, and a band without them falls back to its label. trackLabels[] stays a block field.
    • `liveLine.clauseTemplate` on the finder: wording for the term clause with {term}, {start}, {end} and {note}, e.g. "{term} runs {start} to {end}, {note}". A token with no value drops with the separator beside it, and a template that needs dates on a term without them falls back to the default clause.
    • `trackLabels[]` on the finder (track, levelOf): the level position wording per track, so preschool reads "Step 1 of 2" while gymnastics keeps "Level 1 of 5". A track not listed uses labels.levelOf. A track with one level still shows no stripe.
    • `timeStyle` was already stored on the finder (compact drops AM/PM, "Tue 4:30"); it needs only to be set.
    • Theme tokens. The level stripe's segments read --tome-level-stripe-w, --tome-level-stripe-h and --tome-level-stripe-gap (finder and schedule), and the trial button reads --tome-finder-cta-min-h (never below the 44px target). Each has the old rem value as its fallback, so a theme's px sizes win over the root-relative ones.
    • New columns. The new fields add columns to the block's tables, so a site with migrations generates one.

    A rolling list, the next-sessions card list, and the phone timetable (all opt-in; a stored block without the new fields renders byte for byte as before).

    • `range: 'next'` with `limit` on the list variant shows the next dated sessions (default 4) across this week and next: one section per date, each row dated, no day strip, breaks skipped and the term's end respected, narrowed by preset.level or preset.age. The root carries data-schedule-range="next" and each day section data-date. calendarLink on it downloads every slot of the filtered classes. The two new fields add range and limit columns to the block's tables, so a site with migrations generates one.
    • `LocalNextSessions`, a server component (not a block), lists a level's next sessions for a program page's next-step card: data-next-sessions, data-next-session, data-next-session-date, data-next-session-time, data-schedule-next, data-schedule-spots. ./server adds LocalNextSessionsFromSchedule, which reads the document and the profile's closed dates. Both read tome-local's nextSessions, so the card, the finder and the timetable agree on what is next.
    • The phone timetable. The day strip now sticks to the whole block (the controls box steps aside below 768px) on a ground set by --tome-schedule-strip-bg; a tab that shows its date is at least 55 by 62px (--tome-schedule-tab-min-w, --tome-schedule-tab-min-h); labels.noClassesBand can use {ageLower} ("No classes for ages 5–7 on Fridays"); a finished class (with labels.finished set) keeps an outline pill; printing shows the whole week whatever the screen, and the controls and strip are not printed.
    • Fix: the age filter overflowed below 374px. .filter and .select now shrink (min-width: 0, max-width: 100%) and clip a long option such as "Under 3, with a grown-up" with an ellipsis, so nothing overflows at 320px.

    New block: `local-credentials`. What a business can prove, in two variants. strip is a row of short checkable lines; panel is a rounded chapter with ratios as large tabular numerals, up to two policy lists, a credentials ledger (kind, issuer, what it covers, valid, verify) and a "policy last reviewed" line.

    • Reads the business profile. dataSource: 'profile' (the default) takes the credentials from @wabbit/tome-local's profile through a virtual profile field and the same read hook as the other profile-aware blocks; the block's own credentials[] fill in when the profile has none, and dataSource: 'inline' uses them alone. A credential past its expiresOn date never renders. The profile slice now carries each credential's validFrom, expiresOn, verifyUrl and sample; the keys already there are unchanged.
    • Strip lines can be bound to a credential. A line with a kind shows only while an unexpired credential of that kind exists; a line without one is your own statement.
    • Samples are labeled. A credential ticked Sample in the profile (tome-local's P-13 checkbox) or in the block's rows shows the label ("Sample" by default, sampleLabel) in the ledger, and a strip line reads Sample when it is ticked itself or when every credential of its kind is a sample.
    • Accessible by construction. A real table with a caption, column and row headers, a "Verify {credential}" link per row, decorative check marks beside text, and a ledger that stacks below 768px with each value led by its column name. No script, no motion, no colored rules.

    New public surface: localCredentialsBlock, LocalCredentials, the LocalCredentialsData types and LocalBlockCredential. A stored page without the new block renders as before.

    New variant: `local-price-list` `term-fee`. Fee cards for a business that sells a free trial and then a term. The cards share one grid and one height with their buttons on one line; the recommended card (emphasis: 'primary') is marked by its surface, padding, weight and the only filled button, never by a colored rule.

    A card with two or more priced variants gets a classes-a-week picker (a radiogroup) that swaps the price and its "per" line; without script the choices read as a plain list. Prices and the "per" text use tabular figures, and whole amounts print without cents.

    • New fields, all optional and shown only for this variant: on the list kicker, heading, intro, pickerLabel, includesLabel, excludesLabel, objections[] and note; on each item emphasis, kicker, includes, excludes, includesLabel, excludesLabel and action { label, href }; on each price per. The other three variants never read them, and their stored renders are byte for byte as before (the pack's golden covers card-grid, ledger and teaser).
    • Hooks: data-fee-card (data-fee-emphasis), data-fee-kicker, data-fee-name, data-fee-price, data-fee-per, data-fee-picker, data-fee-option, data-fee-ladder, data-fee-includes, data-fee-excludes, data-fee-action, data-fee-objections, data-fee-objection, data-fee-note.
    • New columns. The new fields add columns to the block's tables, so a site with migrations generates one.
  • local-class-schedule gains three opt-in display options for a compact, dated timetable: a split time, short day names and a "today" word.
    • `timeSplit` (checkbox, off by default). Marks each class time up as [data-schedule-time-start] and [data-schedule-time-end], the end carrying the dash with no spaces ("4:30" and "–5:15"), so a theme can stack or restyle the halves. The text reads the same and the screen-reader names still use the whole time. Pairs with timeStyle: 'compact'.
    • `dayNameStyle` (long default, or short). With short each day heading shows the short weekday ("Mon 19", in the locale's own short form) and keeps the full name for screen readers ([data-schedule-day-short], [data-schedule-day-long]).
    • `labels.today` (text, empty by default). Set it and today's day heading carries that word ([data-schedule-today-label], hidden on every other day, kept current after mount for a cached page) and today's phone tab takes it into its accessible name ("Tuesday, October 20, Today"). Placeholder Today.

    A block that sets none of them renders exactly as before.

  • local-class-schedule gains four opt-in options for a short rolling list, and LocalNextSessions gains two format options.
    • `timeMinutes` (auto default, or always). With timeStyle: 'compact', always keeps the minutes on the hour ("9:00" rather than "9"). The locale clock is unchanged.
    • `showControls` (checkbox, on by default). Off leaves out the age and level filters, the filter summary, the print button and the phone day strip.
    • `showTerm` (checkbox, on by default). Off leaves out the term line and the break notes.
    • `calendarStyle` (link default, or icon). icon draws each row's calendar link as an icon button (data-ics-style="icon") with an aria-hidden SVG and an accessible name: the labels.calendarRow text when set, else the link word and the class, day and time.
    • `LocalNextSessions`: timeMinutes (auto or always, as above) and dateOrder (weekday-month-day default, "Tue, Oct 20"; or weekday-day-month, "Tue 20 Oct").

    The per-row age, level and level-stripe repeat is already hidden with show.age, show.level and show.levelStripe. A block or card that sets none of the new options renders the markup it did before; the new select fields add columns, so a site with migrations generates one.

  • local-class-pathway gains a level teaser, a card blurb, an age tag and a ladder link; local-class-schedule gains a next-term cell; local-class-finder gains a {when} token in its spots lines.

    Every addition is optional and off or empty by default, and a block that sets none of them renders the markup it did before:

    • Pathway, per level (the shared timetable's level, or the block's inline levels): teaser replaces "Who it's for" on a next-level card (data-pathway-teaser-text), in the bands next-band card and the ladder card. blurb replaces the "Who it's for" and "Moves up when" pair on a cards card (data-pathway-blurb), and ageTag adds a tag beside its name (data-pathway-age-tag), the name, tag and stripe sharing one data-pathway-card-head row.
    • Pathway, ladder: teaserLink { label, href } sets the next-level card's link. href replaces the level's program page and label ({class} fills in) replaces the labels.aboutLevel copy.
    • Schedule: nextTerm { label, line } adds a cell after the term and the breaks, for example "Winter term" and "Times announced Dec 1" (data-schedule-next-term, with -label and -line parts). It works with inline data and with a shared timetable.
    • Finder: the spots, waitlist and full lines fill {when}. It reads labels.whenToday (default "today's {time} class") when the class is today and labels.whenDay (default "{day}") on any other day, so "{n} spots left in {when}" says "3 spots left in today's 4:30 class". The default lines still say "on {day}".

    The chosen fee option's keyboard focus ring now uses the theme's ring color (--tome-color-ring) instead of the button's text color, which was the page ground on the chosen option and left no visible ring.

    The new level and block fields add columns, so a site with migrations generates one. The @wabbit/tome-local peer floor is unchanged at >=0.3.0: with an older tome-local the level fields are simply never filled in the shared timetable.

2 fixes (0.6.1 – 0.6.2)
  • 0.6.2

    The local-class-finder and local-class-pathway demos' trial links and the finder's ask form point at #, not an invented /trial route.

  • 0.6.1
    Gallery and preview demo props no longer invent site paths.

    A demo link is now the caller's placeholderHref or #, so rendered demos stop emitting real <a href>s to pages that exist on no site. README: subpath and file mentions are written package-qualified (for example @wabbit/tome-x/render) or as code text, so crawlers no longer resolve them as site URLs.

0.5.xMinor

  • Adds Local Class Schedule (local-class-schedule), a timetable block for gyms, studios, schools and camps, with spots lines that expire, enroll links and per-class calendar downloads.

    week and list layouts; phones get a sticky day strip and an age filter.

    • Classes as data. Each row holds a name, level, age range, one or more days, start and end times, a teacher and a room, and an enroll link (a default for all, or one per class; {class}, {day} and {start} fill in from the row). Links open in a new tab through the link adapter.
    • Spots that cannot go stale. A hand-entered "spots left", "Waitlist open" or "Class full" status needs an expiry. An expired or incomplete entry renders nothing, on the server and, after mount, on a cached page.
    • Timezone, term and breaks. The timezone falls back to the business profile's. A term masthead and breaks print above the timetable; the profile's closed dates are added as breaks unless turned off.
    • Calendar files. Each class downloads a weekly .ics (a data: link, no route) that ends with the term and skips the breaks.
    • Phones. Below 768px a small client island turns the day strip into an accessible tablist and adds age and level filters. Without script every day shows.
    • Hooks. Neutral data-schedule-* attributes and theme-neutral default CSS; the existing blocks are unchanged.
1 fix (0.5.1)
  • 0.5.1
    Accessibility fix: finished classes and empty days in local-class-schedule keep AA text contrast instead of fading below it.

    A finished row was dimmed with opacity: 0.55, and an empty day tab with opacity: 0.5, which took their text below 4.5:1. A finished row now paints its time and name in --tome-color-on-surface-muted at full strength, strikes the time and dashes its border; an empty day tab keeps the muted color and reads as empty through a lighter weight and a strike.

    Themes that targeted [data-finished] or [data-empty] keep the same hooks.

0.4.xMinor

  • Local Live Status and Local Logistics now read the site's business profile, so an owner sets hours, phone and address once in the admin and every block (and the Now Bar) follows.

    BREAKING: the @wabbit/tome-local peer floor rises to >=0.2.0 <1.0.0, the release that ships the business profile. Local Live Status also stores its SQL rows under <collection>_lls: its slug-derived table and enum names passed Postgres's 63-character identifier limit, so no SQL site could build a schema with it before, and no stored data moves.

    MongoDB sites are unaffected.

    • Profile first, inline fallback. Both blocks gain dataSource: profile (the default, also for blocks saved before this release) uses the profile's hours, phone, address and coordinates, visit notes, service areas and credentials wherever it has them and the block's own fields for the rest; inline uses the block's fields only (a second venue, a fixed example). A block on a site without a profile renders exactly as before. No content migration.
    • How: a virtual, hidden profile field on each block reads the profile when Payload returns the block (one read per request, inside the request's transaction), so the renderers stay pure and nothing new is stored. A failed read falls back to the inline fields with a warning.
    • Call links use the profile's E.164 number. A hidden profile address shows the locality only and no directions link.
    • Local Live Status availability mode now renders: the first answer of the live-status chain (a booking engine when installed, the profile's expiring status message, then its rating citation), with data-live-state="availability" and data-live-tone. auto falls back to it when there are no hours. An expired line is not shown, also on a cached page.
    • Local Logistics shows the profile's service areas as chips and its current credentials (data-logistics-areas, data-logistics-credentials, toggled by show.serviceAreas / show.credentials), can show a named profile schedule (schedule), and titles the profile's visit notes with visitNoteTitles.
    • New `./server` entry: LocalLiveStatusAnnouncementFromProfile puts the Now Bar in chrome's announcementSlot with no hours in code; getLiveStatusAnnouncementProps(payload, props) returns the props with the profile added. LocalLiveStatusAnnouncement is unchanged.
    • Root exports: profileFields, makeProfileReadHook, loadProfileForRequest, buildBlockProfile, activeProfile, applyProfileToLiveStatus, applyProfileToLogistics and the LocalBlockProfile / LocalBlockDataSource types.
  • Phone links in the contact, high-impact-hero and local-logistics code now use the shared core tel: helper, so a site can qualify national numbers to E.164.

    The exported toTelHref helpers (and resolveContactValueLink, resolveInlineCall) accept an optional { defaultCallingCode }. The high-impact-hero reads defaultCallingCode from the render context passed to RenderBlocks({ context }); without it, hrefs stay digits-only as before.

    Requires @wabbit/tome-core 1.22.0 or later as a peer.

  • Fix: Local Price List now builds its SQL schema on Postgres and SQLite when the collection that holds it has drafts on.

    The featured lead's heading-level select produced the enum enum__pages_v_blocks_local_price_list_featured_lead_heading_level (65 characters) on a drafts-enabled pages collection, past the 63-character identifier limit, so the schema failed to build. The field now sets enumName to enum_<table>_hl, where <table> is the enclosing table (main or version):

    • enum_pages_blocks_local_price_list_featured_lead_heading_level becomes enum_pages_blocks_local_price_list_featured_lead_hl
    • enum__pages_v_blocks_local_price_list_featured_lead_heading_level becomes enum__pages_v_blocks_local_price_list_featured_lead_hl

    No other identifier in the pack passes the limit for a drafts-enabled pages collection; two version-table enums sit exactly at 63 (…_sections_items_price_mode, …_teaser_actions_appearance), so a longer collection name with drafts on still needs its own dbName.

    Migration: a SQL site WITHOUT drafts that already stored this block has the old enum enum_<collection>_blocks_local_price_list_featured_lead_heading_level. Generate and run a migration after upgrading (payload migrate:create, then payload migrate); it renames the enum type and the stored values are unchanged.

    Sites with drafts on could not store the block before, and MongoDB sites are unaffected.

0.3.xMinor

  • local-price-list sections can set their own nutritionInMeta and metaOrder, overriding the list's for that section's items.
    • A drinks section can read "Oat +0.50 · 120 kcal" (metaOrder: 'modifiers-first') while the dishes keep leading with protein. Both fields are optional with no default; left empty, a section uses the list's setting, so existing lists render exactly as before.
    • Two optional fields are added to each sections[] row (nutritionInMeta, a number from 0 to 6, and metaOrder, a select). On a Postgres site, generate and run a migration for the new columns.
    • The view model resolves the settings per section and per item (SectionModel.nutritionInMeta / .metaOrder, ItemModel.nutritionInMeta / .metaOrder); the list-level PriceListModel values are unchanged.
  • BREAKING: these packs now need @wabbit/tome-blocks-core 0.35.0 or later, because they read the wrapper's new data-block-placement instead of its inline style text.

    Migration: upgrade @wabbit/tome-blocks-core to 0.35.0 or later alongside these packs. A site that renders its own block wrapper (with data-tome-block-wrapper) on a span other than 1 / -1 should add data-block-placement={blockPlacementFor(span)} to it; a wrapper without the attribute is read as full width.

    • @wabbit/tome-blocks-local-pack: in Safari, the price list's teaser list and the logistics block's content touched the viewport edges once the page had scrolled. Their side padding depended on matching the wrapper's style text, which WebKit rewrites as grid-column-start/grid-column-end longhands as soon as the scroll reveal writes to it. The padding rule now reads data-block-placement. Chromium and Firefox render as before.
    • @wabbit/tome-blocks-house: LaneGrid decides whether to subgrid its block wrapper (full row, content column, or its own tracks for any other span) from data-block-placement, so the decision no longer changes in Safari after the scroll reveal runs.
    • @wabbit/tome-blocks-marketing-starter: exhibit's nested block wrappers carry data-block-placement, matching RenderBlocks.
1 fix (0.3.1)
  • 0.3.1
    The Now Bar (local-live-status, variant bar) now lays its row out on chrome's shared container contract, so its status and links land on the same edges as the header, the footer and the page content.
    • The row reads --tome-chrome-content-max (its max width) and --tome-chrome-content-inline (its inline padding), the tokens every navbar and footer already reads. The bar lives in chrome's announcement slot, a chrome surface, so it follows the same box.
    • On the Table theme, which sets the tokens to 100% and clamp(1rem, 4vw, 3rem), the row now runs from the page grid's outer lane to the other: at a 1857px window the status starts at 54px and the links end 54px from the right, in line with the wordmark, the menu rail and the footer. Before this it sat in a centered 1280px box (status at 281px).
    • A site whose theme sets neither token renders exactly as before: the row falls back to --tome-container (else min(100% - 2rem, 1280px)) with no inline padding. Phones keep the 124px block.

0.2.xMinor

  • Local Price List: options the Table demo needed, each defaulting to the existing output.
    • featuredLead.description: the featured lead's own text; empty keeps the item's description (the card's short one).
    • featuredLead.headingLevel (auto | h1 | h2, default auto): auto stays the page h1 on card-grid, and on ledger is now an h1 when the block is the page's first (index 0) and an h2 otherwise; h1 gives a menu page that opens with a ledger its one h1 when the host does not pass index.
    • breakerAction { label, href }: the grid-breaking item's own link (for example "Reserve the tasting menu"); empty falls back to primaryAction, as before.
    • metaOrder (nutrition-first | modifiers-first, default nutrition-first): modifiers-first prints "Oat +0.50 · 120 kcal".
    • Ledger rows now carry the card's action: with ordering off and askLabel set, a row with details gets the "ask" control and its details panel opens in place under the row (shown in place without JavaScript); the breaker's row carries the breaker's action. Ordering on is unchanged (the add button).
  • Local Price List details: Esc now closes an open panel wherever focus is.

    The handler listened on the list root, so it fired only with focus inside the panel or on its control, and Safari does not focus a button on click. A document listener now runs while any panel in the list is open (and only then); Esc closes the panel holding focus, else the one whose control has focus, else the one opened last, and returns focus to the control that opened it (unless the visitor has moved focus elsewhere).

    Esc inside an open modal dialog elsewhere (the order drawer) is left to the dialog.

  • Local Logistics split lays out on the same grid as the price list's bands.

    Its root was a subgrid of the page grid, which has no gap, so the map and the details touched with no gutter and its heading sat a few px left of the other bands' reading-start (theirs is a 16-column grid with gutters). The root is now its own grid with --tome-grid-gap gutters (4, 8, then 16 columns with the marginalia and reading lane names), padded to the content column like the teaser; the inner subgrid sets no gap of its own.

  • Local Live Status bar: the detail never truncates.

    From 640px the band was one row with the status text clipped by an ellipsis, so at tablet widths the detail read "opens toda…". The row now wraps: when the status and the links do not fit side by side, the links move under the status (the status's flex basis is its one-line width, so the links wrap before the text is squeezed), and a status longer than the row wraps its own text.

    A band that fits stays one 44px row; phones are unchanged.

  • Ordering island styles now beat tome-ui's element resets.

    Every rule in ordering.tome-css sat inside :where() (zero specificity), so a { color } and button, select { background: none; border: none } won: Checkout's label went ink on ink, the floating pill lost its fill and shape, and the pickup select lost its edge. Each rule now weighs exactly one hook attribute (0,1,0), qualifiers inside :where(), so a theme's [data-tome-theme] [data-order-*] (0,2,0) still wins; Checkout's :hover ink answers tome-ui's a:hover.

    The price list's visually hidden currency name ("17.00 US dollars") now uses the full visually-hidden recipe (margin: -1px, zero padding and border), so it no longer overflows 1px in WebKit.

  • Local Price List: on phones the featured stamp keeps its top-left corner over the photo and only shrinks to 92px.

    The phone rule had moved it to the top-right (a generic placement); the featured figure's stamp sits top-left at every width.

0.1.xMinor

  • New package: @wabbit/tome-blocks-local-pack, the block pack for local businesses, built on @wabbit/tome-local's open-state utility and free with any theme.
    • Entries: register() at the root, plus ./render, ./render/register, ./meta, ./demo and ./ordering. The registries are in place and the local-pack bundle registers with tier free.
    • The pack exports the hours types (OpenStateSource, LocalWeeklyHours, LocalHoursOverride and others) from @wabbit/tome-local/hours, so its blocks and your data share one shape.
    • Requires @wabbit/tome-blocks-core 0.31.0 or later and @wabbit/tome-local 0.1.1 or later. @wabbit/tome-ui and @wabbit/tome-blocks-house are optional peers.
  • New blocks: Local Live Status (local-live-status), a live open-now line or bar, and Local Logistics (local-logistics), a find-us band with keyless directions and today-highlighted hours.
    • Local Live Status (bar, line) words your opening hours as a lead and a detail: "Open now · kitchen closes at 10", "Closed now · opens tomorrow at 11", "Closed today · holiday hours: back Wednesday at 5:30". It handles split shifts, hours past midnight, holidays and special hours, and a named secondary schedule, all in the business timezone. You set one action per state and add a call link and a keyless directions link. timeStyle: 'compact' drops AM/PM. The server renders the status. The browser then recomputes it after load, at the next opening or closing, and when the tab returns, and it announces only real changes. It renders nothing without hours.
    • `LocalLiveStatusAnnouncement` renders the bar outside the block registry, for example in the chrome header's announcement slot.
    • Local Logistics (split) shows the address with a Google or Apple directions link (no API key), a call link, and an optional map image that is always labeled as illustrative. It groups identical days in the hours and marks today in the business timezone, server-side and then refreshed in the browser. Today's holiday or special hours appear as their own row, and visit notes such as parking and access can follow.
  • The ./ordering entry now ships the ordering island: OrderProvider, OrderButton (for chrome's accountSlot), OrderPill, OrderDrawer (a native modal <dialog>) and useOrder(), plus the toOrderItems, buildCheckoutUrl and createPriceFormatter helpers.
    • It keeps the order in the browser only, in sessionStorage under tome-local-order:<listKey>. If storage is unavailable, the island renders empty.
    • It hydrates a price list's data-order-add and data-order-stepper markup and keeps every element that shares an item key in sync. It also opens the drawer from any [data-order-open] control and sets <html data-order-state="empty | has-items | open">.
    • Checkout is a link to checkoutUrl with item=<key>:<qty> params. It never posts a cart or takes payment. A demoLabel renders beside it with data-compliance-label.
  • Adds the local-price-list block: a menu or price list as a photo card grid (default), a printed ledger or a home-page teaser, from one data shape.
    • card-grid: a featured lead with a round stamp, a numbered category rail (sticky, with an optional scroll-spy), a masthead per category, photo cards with details that open inside the card, and one item that breaks the grid with its details always open.
    • ledger: ruled rows, attribute codes and right-aligned tabular prices, every size or measure listed. teaser: a photo panel beside a numbered list whose rows swap the photo on hover or focus, with a thumbnail per row on phones.
    • Prices are integer minor units formatted with Intl.NumberFormat; by default they print without a symbol and a visually hidden currency name follows. Price modes: fixed, from, range, market price, on request.
    • Ordering is off by default. With ordering.enabled and a checkoutUrl, each priced item gets an add button and a stepper for the pack's ordering island; otherwise no add action renders.
    • tags and attributes are free text unless option lists are passed to the block factory (LOCAL_TAG_PRESETS, LOCAL_ATTRIBUTE_PRESETS). Without JavaScript the rail is a list of anchors and every details panel shows in place.

Full changelog across all packages