Releases
Every release of Pattern Dump, what it added, changed and fixed, and what to change when you upgrade.
The changelog of pattern-dump 0.9.0, the version this site is built with. 0.9 is the first public release, and names and options can still change before 1.0.
0.9.0 (2026-11-23)
Added
- One graph of your components, stylesheets and pages.
pd dev,pd build,pd auditand the new commands build it from what they already read. Inpd devit follows every save. - An MCP server in
pd dev, so an agent can ask about your project. It answers athttp://mcp.localhost:<port>/, or at/mcponlocalhost. It is read-only and speaks MCP 2025-11-25. - Seven MCP tools answer from the graph. Each gives the same JSON as the command line. They are listed below.
pd mcpserves the same tools for a client that starts a process. Claude Code's.mcp.jsonand the Claude desktop app run it this way. It runs your project'spd devinside, so it follows every save.pd graph,pd describeandpd affectedprint the graph's answers. With--json, each prints what the MCP tool of that name answers.pd buildwrites the graph into the workbench asapi/graph.json.build.graph: falseleaves it out, for a project whose structure shouldn't be published.- The Relationships panel shows a component's stylesheets. It also shows whose classes its stylesheets style, and which other stylesheets style its classes.
pd auditand the Audit tab list where components share classes. These style couplings are information beside the findings. They are never counted as defects.- The workbench opens on a start item.
shell.startnames the component its root opens, inpd devand in the static build. - A component sits inside an inset in the Stage.
shell.insetsets the space in rem: 1 by default, 0 for none. The frame takes the page's background, so the inset shows the theme's ground. - Templates get
site.workbenchUrl. A site links into its workbench without repeating the address. - In a project with a site, the site's folders sit under Site in the Nav Rail. Layouts, partials and views come after your own folders, in a folder that starts closed.
mcp.hostsets the MCP server's host name. The default ismcp.localhost.- A link to a pattern inside the workbench selects it. In a preview or in a component's docs, it no longer loads a second workbench inside the Stage. A link out of the workbench opens in the top window.
The MCP tools
components: every component, its role, where it comes from, its variants, and whether it is private.contract: what a component accepts: its schema, its variants and its documentation.usage: the components that include a component, and the pages that show it.blast_radius: what breaks if a component changes, each with the path that connects it.ownership: which stylesheets style a component, and whose classes it shares.affected: everything a set of changed components or files reaches, as one list to check.checks: the latest audit results. It never runs an audit itself.
Changed
- The full-height button sits in the viewport row. The rail's minimum width is now 19.75rem, to hold its eight icons.
- The Relationships panel's "Style uses" is now "Borrows classes from". Every empty group says what its emptiness means.
- A class that
assets.cssor a template's<style>defines is no longer listed as undefined. Pattern Dump now reads both for their classes. - A site global named
workbenchUrlis a config problem. Templates getsite.workbenchUrlfrom Pattern Dump, so remove the global and use that.
Fixed
- A plain
.cssfile in the styles folder belongs to its component. Loaded with@use, its rules painted in no preview, and one that nothing loaded was never compiled. Saves to either now update the preview.
0.8.2 (2026-11-22)
Fixed
- A
pd-tag shown as code inside a placed component stays code. A fence or inline code in a tag's content was read for tags, so a<pd-…>written there as an example failed the build (is never closed). Code is text there now, as it is everywhere else on a page. - A
pd-tag can be written over several lines. Attributes on lines of their own failed withhas something it cannot read before its closing >. Line breaks between attributes work as in HTML, and that error now points at what it cannot read. - A style guide's
pd buildwrites the images its previews use. An image placed with{{pd-image}}in a preview, or in an example in a component's docs, showed inpd devbut not in the built workbench. The build now writes every image size they reference, as the site build does.
0.8.1 (2026-11-22)
Fixed
pd buildwrites only inside its output folders. A reference with an encoded slash, such as/_pd/components/x%2f..%2fevil.cssin a component's template, could make the workbench build write a file outside its output. Such a path now stops the build, naming it.- A component stylesheet address that names no component is not found.
/_pd/components/<name>.cssanswers 404 for a name that is no component. A component without styles still gets an empty stylesheet. - A data file can no longer change every object in the process. A
__proto__key in a JSON data file was merged intoObject.prototype. Keys named__proto__,constructorandprototypein data files are now ignored. - Frontmatter refuses those keys with a clearer message. In frontmatter, a key with one of those names (and any
other name every object has, like
toString) is refused as before. The message is now"<key>" cannot be a frontmatter key: choose another nameinstead ofduplicate key. --outandsite.outDirare refused on everything the build reads. The data folder, the scripts folder, the helpers file and the site's head file were not checked:pd build --out src/_datareplaced the data folder with the build. They are refused now, and--outis refused on the pages folder too.- A refused output folder's message names what the folder would hit:
overlaps the data folder <dir>. - The scratch folder is your own. The audit report, the diagnostics graph,
CONFLICTS.generated.md,FLATTENED.generated.md,BASE-LAYER.generated.mdandpd export's default output moved from the shared temp folder to your cache folder. That is~/Library/Caches/pattern-dump/on macOS,%LOCALAPPDATA%\pattern-dump\on Windows and~/.cache/pattern-dump/on Linux. - The scratch folder is created for you alone. A folder there that is a link or open to other users stops the run, naming the folder to remove. A cached audit is never reused from one.
- Old folders in the temp folder are left as they are. Delete them when you like.
- The accessibility check runs with the axe-core it was proven on. The rules decided without a browser were measured with axe-core 4.11.4, but any axe-core 4 could be installed. A fresh install got a newer one.
- Pattern Dump stops when another axe-core is installed. The package now depends on axe-core 4.11.4 and jsdom
27.4.0 exactly.
pd dev,pd buildandpd auditstop with another axe-core installed:axe-core <installed> is installed, but the accessibility rule tiers were proven on 4.11.4: install axe-core 4.11.4. - Live reload works beside a single helper file. With
helpersset to one file, every other file in its folder counted as a helper's import. Saving a template or stylesheet there asked you to restartpd devand reloaded nothing. - Only the helper file itself is a helper now. Files in your patterns, styles and other source folders reload as usual. Any other file beside the helper still asks for a restart.
- Removing a file takes effect in
pd dev. Until a restart, a removed component stylesheet's CSS stayed in the preview, and a removed theme or script was still served. They now leave as a change updates them. - A stylesheet that used a removed partial shows its error. It showed no error until a restart.
pd devkeeps handling changes after a failed send. If sending a reload to the open pages threw, every later change waited silently until a restart. The failure is reported now, and the next change is handled.- A failed
pd buildcloses its server. Some failures between the start and the writing of the files left the build's server running. A script calling the build in its own process then never exited. - A link that can't be read is a broken link. A
%that is no escape in a link a template writes (/sale/50%-off/) endedpd buildwith a bareURI malformed. It is now listed with the broken links, with its page and address:<page>: <a href="/sale/50%-off/">: not a URL that can be read. - Pages with live examples are checked faster. The accessibility check waited half a second for each page that embeds an example, for frames that can't answer. It no longer asks them; the findings are the same.
- A new website project starts without a warning about its own files.
pd init --with-sitewrote tag and category layouts that were copies of each other, so the firstpd devprintedFLATTENED: 2 cluster(s) across 5 components. They now share two partials,partials/term-indexandpartials/term-listing; the pages they make are the same. pd --version.pd --versionandpd -vprint the installed version; they answered "unknown command".- A helper called without its arguments fails, naming it.
{{defaultValue x}}with no fallback showed[object Object], andeq,ltand the other comparisons with one argument quietly gave false. They now fail with<helper> needs 2 arguments, got 1. andandorrefuse a third argument, which they ignored.- A template that showed
[object Object]or relied on such a call now fails the render. Give the helper its arguments. - Sample data stays in the workbench. A component's sample
.jsonno longer reaches a site page. The workbench, its previews and the examples a page embeds show each component with its sample data as before. - On a site page, components render with what the page gives them. The layout, its partials at any depth, its
views and cards, placed components and the head partial render that way. They also get their template's defaults
(
defaultValue) and the project's data. - Sample data may set any key. The build no longer refuses one a layout, a partial, a placed component, a view or
a card doesn't declare (
the sample data of <id> (<file>) sets "<key>", … so it would show on every page …). Every site that built before builds the same pages. - A header or footer in the frame can have sample data of its own again.
Changed
- Dependencies are updated within their ranges, for the security fixes in them. The table lists them, and their own dependencies are updated too. A fresh install already got these, and the release is now tested with them.
| Package | Version |
|---|---|
| handlebars | 4.7.10 |
| markdown-it | 14.3.3 (a crafted page could make the build slow) |
| postcss | 8.5.33 |
| postcss-selector-parser | 7.2.1 |
| html-validate | 11.21.1 |
| sass | 1.108.2 |
| shiki | 4.6.0 |
- On macOS,
XDG_CACHE_HOMEis honoured. When it is set to an absolute path, the scratch folder is created under it, as on Linux, instead of under~/Library/Caches.
0.8.0 (2026-11-19)
Upgrading from 0.7.0
- Rename your config:
storefrontis nowsite, andstorefront.siteis nowsite.globals. Templates keep reading{{site.…}}; only the config changes. - The old config names still load until 1.0, which removes them. Each key gets one warning
(
storefront.pagesDir is now site.pagesDir). Setting bothsiteandstorefrontis a config problem. - Messages name the new paths, and say "site" where they said "storefront". Examples are
site.globals.navigations.footer[0]: …andpd build: the site has problems, so nothing was written. Terminal lines about the site start with[site]instead of[storefront]. - The guide and a new project's starter files say "site" too.
pd init --storefrontis now--with-site, and--no-storefrontis--without-site. They are two flags of their own, apart from--site <package>, which still makes a website on an existing style guide. A new project's config uses the new names.- The old flags still work, with a warning, until 1.0, which removes them.
--with-sitewith--without-siteis an error. - Highlighted code has fixed class names. Each token's class is its kind (
pd-code-keyword,pd-code-stringand so on), in place of a generated name such as__shiki_17h8wv. A block is<pre class="shiki">with no inline style. - CSS written for the generated names no longer matches. Set the kinds' colours instead (below). If you link
/_pd/shiki.cssyourself, link/_pd/code.cssinstead, or code loses its token colours. - The config's types are named
Site…, besideSiteConfig. EachStorefront…name still works as a deprecated alias until 1.0, which removes them. The renamed types are these: SiteChecksSiteTermPagesSiteTagSiteCategorySiteNavEntryStorefrontConfigis deprecated too, but it is not an alias ofSiteConfig. It stays the shape of the oldstorefrontkey, so code typed with it keeps working. Moving such code toSiteConfigmeans its globals keysitebecomesglobals.
Added
- Code on site pages is highlighted, in the site's colours. A page with code links
/_pd/code.css, which colours each kind of token from a custom property. They are--pd-code-keyword,--pd-code-string,--pd-code-commentand eleven more, with Pattern Dump's colours as the defaults. - A site sets the code colours from its own tokens, with no colour values of its own. For example:
--pd-code-string: var(--color-code-string). The defaults are in their own cascade layer,pd-code, so any rule of the site's wins. - Light and dark code colours follow the page's
color-scheme. A light and dark toggle setscolor-schemetoo. pd buildwrites the code stylesheet into the site's_pd/, with or without the workbench. The workbench uses the same properties. An additive contract change carries the address:PD_ROUTES.codeCss.- A page can stay out of the navigation with
nav: falsein its frontmatter. It is left out ofnav(and of its folder'schildren) and out ofprevandnext. Its own are empty, and its neighbours link past it. - A page left out of the navigation still renders. It is searchable, is in the sitemap and
llms.txt, and is reached by its links. An example is a credits or legal page linked from the footer. - The setting works for folders too. On a folder's
index.mdit leaves out the folder's entry and the folder's pages. In a folder'schildDefaultsit applies to the folder's pages. - Any value other than
trueorfalseis a problem on the page:nav must be true or false. - A layout still gets
nav, the navigation, as before. - A design system made by
pd initis a pattern package from the start. Itspackage.jsongets thepatternDumpfield, naming the same folders as its config. A website can then use it (pd init site --site ../styleguide) without a manual step. - Only a
package.jsoninit creates gets the field. One that exists is left as it is. For a style guide in a folder without the field,pd init --siteprints the block to add, from the folders of the style guide's own config. - Images in a page's markdown work like symbol images.
on a line of its own is a<figure>with the caption as its<figcaption>. The caption used to be atitleattribute, and in a line of text the title stays an attribute. - An image can have a dark version. A file named
photo-dark.jpgnext tophoto.jpgmakes the image a<picture>with a(prefers-color-scheme: dark)source. Both are written as WebP variants with their width and height, lazy as before.
Changed
pd auditchecks every variant. Each variant is an entry of its own (atoms/button~secondary) in the report, the Audit tab and a rule's count of components. Until now only each component's default render was audited.- A data overlay is audited with its data, a variant with markup of its own from its template.
- Heads-up: an audit that passed in 0.7.0 can fail in 0.8.0 on a variant's defect, in CI too. The report names the variant.
pd auditreports a component a handle collision left out. It is an entry with aHANDLE_COLLISIONdefect (an error) naming the handle and the component that keeps it. It shows in the report and the Audit tab; before, the audit never mentioned it.- The audit's scope lists a Discovery row.
- Like a variant's defect, a handle collision can fail an audit that passed in 0.7.0.
- The remaining wording says "site" or "Pattern Dump". A key a page cannot set is
filled by Pattern Dump, not by a page(it saidfilled by the site). The layoutspd initwrites describepageas what Pattern Dump works out for it. - The Inspector and the command line use the new names too. The Inspector names a generated page's setting as
site.<kind>Pages, andpd devlogs a change tosite.globalsby that name.pd initasksInclude a website. - Code colours reach 4.5:1 contrast, in the workbench and on site pages. In light mode, strings, keywords and tags, function and attribute names, CSS properties and values, parameters and Handlebars expressions are darker. In dark mode, comments are lighter, and each colour keeps its hue.
Fixed
- The Console has a warning level. Two things are warnings now: a data variant left out for want of a base
template, and a preview whose height depends on the frame's. The line starts with
Warning:and has an orange mark at its left edge, its text in the normal colour. - A left-out data variant is no longer shown in red, like a broken build. Errors stay red.
- A failed
npm installinpd initsays what failed. It saidpattern-dump may not be published yetand suggested installing a local build, whatever the cause. It now repeats npm's error lines (npm error code E404,npm error 404 Not Found - GET …). - The message says how to install again:
cd <folder> && npm install. When npm wrote no error, it gives npm's exit code, and when npm could not be started, says so. - A placed variant no longer asks for a value its data already gives.
<pd-components-note~warning>without aheadingstopped the page with"heading" is required by components/note~warning, althoughnote~warning.jsonsets one. A required key the variant's data sets now counts as given, and the page shows the variant's value. - A key the variant's data doesn't change is still required on the tag. That is a key the variant's
.jsonleaves out, or has the same value for as the base's.json. The message is the same as before.
0.7.0 (2026-11-18)
Diagrams that follow the site's colours: symbol images, drawn once with colour tokens. They show on site pages in
light and dark, and are written as standalone files for a README. A component's icon sets now reach site pages, and
are found in a pattern package's assets too. Markdown gains definition lists. Plus the fixes where Pattern Dump did
less than its guide said. Metadata is read from the frontmatter block only, and variants with data alone get their own
docs and schema and can be placed on a page. A private folder stays out of galleries, and a pd build that stops
leaves its output folders as they were.
Upgrading from 0.6.0
- Metadata outside the frontmatter block is no longer read. In a component's
.mdor a folder'sindex.md, these keys were matched as akey:line anywhere in the file: titlestatusvisibilitydescriptiondeprecated-usepreviewoverviewrequireScriptrequireAssets- A line in the body no longer sets metadata. A code sample with
requireScript: xin the body loaded a script, and a file without a---block still had metadata. These keys now come from the block at the top only, likeorder: move any such line into the block. - A quoted metadata value loses its quotes:
title: "Button, primary". requireScript: [toggle, menu]loads two scripts. It was read as one id,toggle, menu.- A placed data variant brings its data.
<pd-components-note~warning>on a website page rendered like the base note. It now takes each key it leaves unset fromnote~warning.jsonwhere that differs fromnote.json(tone: warning). - To keep the base's look, set those keys on the tag. That applies to a page that placed a data variant and relied on its look being the base's.
- An asset folder's
symbols/folder now holds symbol images. Every SVG directly in it is a symbol, and it is checked: colours only asvar(--color-…)andcurrentColor.pd buildwrites it as/_pd/symbols/<name>.svg, with the values of the tokens it uses read from the document base layer. - A project that keeps other SVG files in a folder of that name moves them. Otherwise the build stops on their colours.
- A markdown image whose address is a
#nameis now that symbol on a site page.showed a broken image before. It is a page problem when there is none, and in component docs it shows an error. - A component's symbol sets reach site pages, and are looked up in every asset folder, yours first. A site page
whose components need a set (
requireAssets) that no asset folder has used to show blank icons. It now fails, and so doespd build, naming the component and the set. - A preview of a pattern package's component now finds the package's own sets.
- A line that starts with
:or~and a space can start a definition list. That holds right after a line of text: the line before it becomes the term. Such a line was part of a paragraph before, so check pages and docs that start a line that way.
Added
- Symbol images show on site pages. There is one SVG per symbol in an asset folder's
symbols/folder, shown with(orfor a figure). The page inlines each symbol it shows once, in a hidden sprite. - A diagram follows the site's colour tokens and its light and dark modes. Colours in a symbol are only
var(--color-…)andcurrentColor, and anything else stops the build. - A
<style>'s simple class rules in a symbol become attributes. Scripts, event attributes and links to other files are removed, with a warning. - In a component's docs in the workbench, a symbol image shows an error for now.
- Each symbol is a file too, for a README or wherever only an image file can be shown.
/_pd/symbols/<name>.svgis served bypd devand written bypd buildinto both outputs. The token values from the document base layer are written in (light, then dark byprefers-color-scheme). - In a symbol file,
currentColorbecomes--color-text, or the token the newassets.symbols.currentColornames. An additive contract change carries the address:PD_ROUTE_PREFIX.symbols. - The
pd init --storefrontskin keeps a symbol image inside its column (.site .doc-image). - Markdown has definition lists, in site pages, placed components' markdown content and component docs. A term on
its own line, then each definition on a line starting with
:, renders as plain<dl>,<dt>and<dd>. A listing's teaser never comes from a definition list. markdown-it-deflistis now a dependency, at exactly 4.0.0. Definition lists use its syntax.- A data variant with no base template is reported. A
chip~danger.jsonwith nochip.hbsbeside it (or beside a base made of own-markup variants alone) has no markup to overlay. It is still left out, butpd devnow names it in the terminal and on the Console, as it does a handle collision:Data variant left out: …/chip~danger.json needs …/chip.hbs to overlay, and there is none. - Two additive contract changes carry the report. They are
DiscoveryResult.orphanVariants(OrphanVariantEntry) and the HMR messageorphan-variant(OrphanVariantMessage).PD_PROTOCOL_VERSIONstays 1. - A data variant can have its own docs and schema,
chip~danger.mdandchip~danger.schema.json, as an own-markup variant could. Without its own.mda variant still shows the base's docs.
Changed
- A component's symbol sets reach site pages. A component that needs a set (
requireAssets) left its icons blank on a site page: only its previews inlined the set. A page now holds each set its layout and the components it shows need, once, right after its symbol images, hidden by its size. - A missing symbol set fails the page, naming the component. That is a set no asset folder has. So does an id two sets declare, or one a symbol image has.
- A symbol set is found in every asset folder, yours before packages'. The first that has it wins. Only the first folder was read, so a pattern package's sets were never found, in a preview or on a page.
pd buildreplaces its output folders only once every check has passed. The workbench and the storefront are each written into a hidden folder beside their output (.<folder>.pd-build-<process>). They are put in place at the end, so a build that stops leaves both as they were.- Leftovers of a build that was killed are removed when the next one starts.
- The build says when the workbench and the storefront are out of step. That is when the workbench has taken its place and the storefront then can't.
- A placed variant is checked against its base's schema when it has none of its own.
Fixed
- A
pd-tag for a data variant failed with "has no schema, so it cannot be placed with values". - A variant's
.schema.jsonwas also read as a data variant of its own (chip~icon.schema). visibility: privateon a folder'sindex.mdhid only the folder's node. An ancestor's gallery still listed its components, and counted them when deciding whether it has a gallery.pd buildno longer stops with both folders part old, part new. A change noticed after the workbench was written, or while the storefront was, stopped it there.pd helpand the guide no longer offerpd help <command>. It printed the same usage for every topic.- The help gives the
--basedefault asbuild.basePath, then/. It also says--brandsets the site's title with--site. - The accessibility coverage page no longer calls the rendered-page rules deferred. They run in the workbench's
Diagnostics tab and with
pd build --browser. - The guide now says what Pattern Dump does where it promised more than the code does. Among the places, it said
that
pd auditrenders every variant and reports handle collisions, and thatpd buildfails on component findings. It also said that a component can be made of data variants alone.
0.6.0 (2026-11-18)
A website can now live on its own, on an existing style guide package. pd init --site writes pages and a config, and
the components, styles and skin come from the package. Layouts preview at full height, and a folder's index.md sets
defaults for its pages. A page or template pattern can be a layout, and a class borrowed from another component is now
reported (STYLE_BORROWED). pd init pins pattern-dump exactly.
Added
pd init --site <package or folder>makes a content-only website on an existing style guide package. It writes pages, a config and apackage.json, nothing else. Components, styles, themes and skin all come from the package.- The package is an npm name, optionally with a version, or a folder next to the site. A folder becomes a
file:dependency. A package named without a version is pinned to the one installed. - After
npm install, init asks the site's dev server for every page. So a package without a skin (layouts/page,partials/base) or without apatternDumpfield is named at once. --workbench-urlsays where the style guide publishes its own workbench. The default is/workbench/.- A style guide and its site in one repository are two inits and a root
package.json. The getting started guide describes it. - A new config option,
build.workbench: false, makespd buildwrite the storefront only. It is for a site whose workbench another build publishes (its style guide's).pd init --sitesets it. - Without the workbench, the base-path check for a same-host
workbenchUrlis the other build's.outDiris not used then. pd initasks two more questions with a website. One is site search, which adds Pagefind as a devDependency sopd buildwrites the index. Its flags are--searchand--no-search, default yes.- The other asks whether the site follows the viewer's light or dark setting. Its flags are
--system-themeand--no-system-theme, default yes. Yes gives asystemtheme (color-scheme: light dark) as the default, and the skin's own colours insrc/styles/base/colors.scss. - With that default, the examples on a page follow the viewer with or without JavaScript.
- Layouts preview at full height. A component in
layouts/fills the stage's height and width in the workbench, as pages and templates do. - A schema, a folder or a component's docs can set how a component previews.
"x-pd-preview": "full"or"centered"at the top of a schema sets it for one component. An index.md'spreview:sets it for a folder, and a component.md'spreview:ranks above both. - The Full height toggle beside the viewport sizes switches the preview. It shows as
?layout=full|centeredin the address. - Folder defaults: a folder's
index.mdsets frontmatter for the pages under it once. It goes in achildDefaults:block, written as a page writes its frontmatter. It can set the layout, any key the layout declares, a query's options, and these keys: tagscategoriesdraftindextocimage- A page's own value wins, key by key and option by option. The nearest folder wins. A list is replaced, never
joined:
tags: [guide]on the folder andtags: [setup]on the page give[setup]. childLayoutstays, as the short form ofchildDefaults.layout.- A problem about a value a folder set names where it came from:
services/web.md (from the childDefaults of services/index.md, line 9): limit "two" is not a number of pages: a whole number from 1, such as 3. pd buildsays a draft default per folder, so it can't hide a section silently:[pd build] 12 pages are drafts via the childDefaults of services/index.md.- A page or template pattern can be a layout.
"x-pd-layout": "<name>"in the schema of a pattern inpages/ortemplates/makes it the layout<name>. There is no copy underlayouts/, and a page names it as any layout. - A layout pattern puts the page's markdown into the property
x-pd-contentnames. That property is atext/markdownstring. Without one, the markdown goes intobody. - Three marker mistakes are errors that name the files. They are a marker anywhere else, a marker on a
layouts/component, and one name for two layouts. They show on the components and on every page that asks for the name. - Keys a page sets for the build stay refused in a layout's schema.
- A tag or category page can use a marked layout too. The message when the skin has none now says so:
storefront.tagPages asks for tag pages, but the skin has no layout "tags" (the index of the tags): add layouts/tags, or mark a page or template pattern with "x-pd-layout": "tags", or set tagPages to false. /api/pagesgives each pagedefaultsFrom, an additive change to the pages response. It lists the keys the page took from a folder'schildDefaults, each with thatindex.md. A query's options are listed one by one ("related.limit").- A new diagnostic kind,
STYLE_BORROWED(info), says when a template borrows a class. A template that uses a class another component owns, without including that component, borrows it. The owner's stylesheet is linked too, so the class is styled. - Borrowing stays, since a design system can borrow on purpose. It is now said, once per borrowed owner on the
component's Diagnostics tab:
organisms/search uses class "search-field" from molecules/search-field, so molecules/search-field's stylesheet is linked too: include molecules/search-field if it belongs here, or rename the class. It is on the component's detail, not inpd audit. - A website page that renders a borrower gets the same line as a warning, naming the page file.
pd buildcounts the borrowed stylesheets in its summary:[pd build] styles: 3 stylesheets linked by a borrowed class (STYLE_BORROWED on the component's Diagnostics tab).- Two components that merely use the same class name for different things are the usual cause. Rename one.
- A site made with an earlier
pd init --storefrontwarns after the upgrade. Every page that uses another layout (article, doc, home, listing, tag and category pages) warns that it borrows page classes, and those layouts showSTYLE_BORROWED. The layouts share these page classes, whichlayouts/pageowns: page-titlepage-descriptionpage-tagspage-bodypage-nextpage-meta- Nothing looks different. The warning says the styling depends on another layout's stylesheet.
- Fix: move those rules into a new
src/styles/base/page.scss. Move them out ofsrc/styles/layouts/page.scss, and the three.doc-content .page-*rules out ofsrc/styles/layouts/doc.scss. The base layer (documentBase: ["base"]) links the new file on every page, as the starter now does. - Start the new file with
@use "tokens";for the spacing tokens.
Changed
pd initpinspattern-dumpexactly (0.6.0, not^0.6.0), and Pagefind with it: a patch release can change what a build writes and checks.npm install --save-dev --save-exact pattern-dump@<version>moves the pin.pd initallows Pattern Dump's own install scripts (esbuild,@parcel/watcher) in thepackage.jsonit writes (allowScripts), so npm 11.19 no longer warns about them after the install. A denial the project already has stays.pd initnames a generic folder by its parent.pd init styleguideinsideacme-web/makes the package@acme-web/styleguide, titledacme-web. The question shows it,--yestakes it, and init prints the name it wrote.- These folder names count as generic:
styleguidestyle-guidedesign-systemsitewebsitedocswww- The starter's
lightanddarkthemes declare theircolor-scheme, and its note and search styles follow it.
Fixed
- An example on a website page takes the page's theme. When the page's
<html>(or<body>) has adata-themenaming one of the workbench's themes, every live example on it shows that theme. It follows when a toggle changes it (withthemes.switch: "stylesheet"too). - Without JavaScript an example keeps the default theme.
- The workbench shows a change saved while it was opening. A save in the moment between the first view and the live-reload connection was missed until the next change. The Nav Rail and the open page now catch up on connect.
pd initwith the starter components and a website (--storefront --yes) gave clashing classes. The example page's classes (page-titleand others) were also the skin's, so the home and about pages warned that they borrowpages/example's stylesheet. The website's search field had the class ofmolecules/search-field.- The example page's classes are now
example-page-*, the search field'ssearch-input. - To upgrade a project made that way with an earlier
pd init, rename its classes. Insrc/patterns/pages/example/example.hbsandsrc/styles/pages/example.scss, rename them as the table shows.
| Class | New name |
|---|---|
page |
example-page |
page-header |
example-page-header |
page-title |
example-page-title |
page-content |
example-page-content |
- In the search component, rename the input's
search-fieldtosearch-input. That is insrc/patterns/components/search/search.hbsandsrc/styles/components/search.scss. Rename itsidand the label'sfortoo.
0.5.3
pd build of a site is up to twice as fast again: 2,000 pages in 8.2 s instead of 16.4 s with the checks left out.
pd audit no longer reports a component clean when a partial it includes has a defect, and it now fails when it finds
an error.
Performance
Measured on a generated documentation site, main and 0.5.3 back to back (median of 5):
| Build | 0.5.2 | 0.5.3 |
|---|---|---|
| 500 pages, every check | 15.6 s | 13.2 s |
500 pages, --skip-checks=a11y,html |
5.5 s | 3.6 s |
| 2,000 pages, every check | 55.1 s | 46.0 s |
2,000 pages, --skip-checks=a11y,html |
16.4 s | 8.2 s |
| hTWOo workbench | 19.1 s | 17.5 s |
- A site page reads the design system's files once. Its checks read the same templates, schemas and sample data
about 22 times per page. They are now read once per build (and in
pd dev, again only after an edit). - A page's work no longer grows with the size of the site. The nav, the page's position in it, and the site's page list were gone through in full for every page.
- A template's own checks are worked out once per template, and a page's HTML is parsed once for its classes and its images.
Changed
pd auditfails when it finds an error (exit code 1), aspd buildfails on its checks' errors. It used to exit 0 whatever it found, so a CI step that runs it now fails where it passed before. The last line says why:[pd audit] failed: 2 errors found (warnings alone don't fail it; --strict makes them fail it too).- Warnings alone leave the exit code at 0, and
--strictmakes any finding fail the audit. - To fix a failing step, correct the errors. Or, if it should only report, run
pd auditwithout failing the step (pd audit || true). - The navigation a layout gets is read-only. Every page now shares the site's nav entries. Only the current page's entry and its parent are new for each page.
- A helper that changes a nav entry it is given stops the render. The message is 0.5.2's, naming the component and
the code that made the change:
Cannot assign to read only property 'title' of object '#<Object>', while rendering layouts/page. A render's data (...) is shared by every render, so it is read-only: copy a value before changing it (changed at ...). Fix: copy the entry in the helper before changing it ({ ...item, title: "..." }).
Fixed
pd auditand the workbench's Audit tab no longer report a component clean when something it includes has a defect. A component's cached audit was reused while its own files were unchanged. A defect put into a partial left every component that includes it clean.- The audit cache now covers more than a component's own files. It covers these:
- Every partial a component includes, at any depth, and its sample data and schema.
- A partial a project helper includes by name (such as a
dynamicPartialhelper). - A dynamic partial (
{{> (expr)}}). - The project helpers' source.
- In
pd dev, an edit to a partial re-audits every component that includes it. - The cache written by 0.5.2 is not used.
--check-workers 1no longer runs out of memory. With one worker, every page was checked in the build's own thread, and a 2,000-page build stopped with a heap out of memory. One worker is also the default on a machine with two cores or little memory.- One worker now runs the same pool as several, replaced every 16 pages.
0.5.2
A performance release: pd build of a 500-page site takes 14.8 s instead of 114.9 s in 0.5.0, with every check on.
Two checks can now be left out for a quick local build.
Performance
Measured on a generated 500-page documentation site, with every check on (median of 3 runs):
| Build | 0.5.0 | 0.5.2 |
|---|---|---|
| 500 pages, every check | 114.9 s | 14.8 s |
500 pages, --skip-checks=a11y |
not available | 6.9 s |
- The storefront's pages are read once per build, and each page is assembled once. The build writes the pages as its crawl read them instead of asking for each one again.
- A build no longer slows down faster than the site grows. At 2,000 pages it takes the same time per page as at 500. That was about 0.1 s before the accessibility check moved to worker threads, 5.4x faster than 0.5.0 then.
- The renderer reads, parses and compiles each file once. It compiles a template only when a render uses it. The hTWOo workbench builds in about 20 s instead of 60 s (3x faster).
pd devre-reads a file only when it changes.- The site's pages are checked for accessibility on worker threads: by default the cores less one, at most 8, within a quarter of the memory. The findings, and their order in the report, are the same with any number.
- The same markup is validated once. A component's markup is shown in its detail, its preview and its source view; html-validate now checks it once (hTWOo: 323 validations instead of 931).
Added
--skip-checksandbuild.skipChecksleave a check out ofpd build, for a quick local build. They can skipa11y(the accessibility of the storefront's pages) andhtml(each component's markup against HTML's content model). Every check runs by default, and--skip-checks=runs every check for one build.- A name pd build doesn't know stops it:
pd build: "links" is not a check pd build can skip; it can skip "a11y", "html". --browserwitha11yskipped is refused, since it checks accessibility in Chromium.- The "NOT CHECKED" line. A build that left a check out says so as its last line:
[pd build] NOT CHECKED: the accessibility of the site's pages (a11y), as asked (--skip-checks or build.skipChecks). --check-workers <n>: the number of threads that check the site's pages for accessibility;1checks them in one.
Changed
- The page model and a component's data are read-only. Every page and every render now shares one copy.
- A helper that changes a value it is given stops the render. The message names the component and the code that
made the change:
Cannot assign to read only property 'tone' of object '#<Object>', while rendering atoms/card. A render's data (the component's data files, the global data, a site page's data) is shared by every render, so it is read-only: copy a value before changing it (changed at shout (helpers/shout.js:3:12)). Fix: copy the value in the helper before changing it ({ ...value, tone: "loud" }), or return a new one. - On a site page, a change to the page model (
site, the pages and their listings) says:... The storefront's page data is shared by every page, so it is read-only: copy a value before changing it (changed at ...). pd buildstops when the project changes while it runs. It takes the sizes and time stamps of every input when the build starts. It compares them before anything is written and after each part.- Every input counts: patterns, styles, data, helpers, scripts, themes, assets, the site's pages and head.
- A change stops the build, naming the files:
pd build: the project changed while it was being built, so nothing was written. Run pd build again once the files are saved:followed by- pages/guide.md (changed). Fix: save the files, then build again. - A build that is stopped later says what may be part old, part new.
Fixed
- A stylesheet saved before its template moves to the component in
pd devwhen the template arrives, even when a request reached the new template before the file watcher did. The stylesheet could stay in the base layer until the next change.
0.5.1
A patch release: two live-reload fixes for site pages, and four problems that showed a wrong page or wrong output with no message.
Fixed
- A component schema that isn't valid JSON stops the build. It used to read as "no schema", which turned every check of that component off without a word. A build that passed on 0.5.0 with such a file now stops; before, its output was unchecked.
- One problem names the file, line and column, and says the component isn't checked until it's fixed. It shows in
the workbench (an error on the component) and on every
pd devsite page.pd buildwrites nothing then, with or without a site:src/patterns/atoms/chip/chip.schema.json:5:5: not valid JSON (Expected ',' or '}' after property value), so atoms/chip isn't checked against its schema until it's fixed. - Tags given as strings are reported, not rendered empty. A component included without
x-pd-cardwhose template reads{{label}}while its sample data gives tags as strings showed empty list items in the workbench. A component that contradicts itself about tags is now an error, naming the fix:{{#each tags}} reads {{label}}, but the tags in the sample data are strings: a tag is an object since 0.5.0 (key, label, description, route): give each one as { "key": "design", "label": "Design" } in tag-list.json. - The same error covers a schema or a template that disagrees about tags. That is a schema that declares tags as
strings while the template reads their fields. It is also a template that writes
{{this}}while the schema declares objects. - On the site, more schemas that declare tags as strings fail the page. That is a schema that a page's layout or view includes, as a card's already did.
- Tags that are plain strings, written as strings, are left alone.
pd devstops when its port is taken on IPv6. Another server holding the port on::1letpd devstart on 127.0.0.1 anyway. A browser that resolveslocalhostnames to::1showed the other server's pages.- Both ports (the workbench's and live reload's) are now checked on IPv4 and IPv6. A taken port gets the usual
message:
Port 4000 is already in use, so the workbench cannot start. - Preview pages have a title: "Button · secondary · Acme DS" (the component, its variant, the workbench's name). Accessibility checks reported every preview without one.
- An open site page in
pd devreloads again after its connection drops. Whenpd devwas stopped and started again (or the computer slept) with a site page open, that page never reloaded again until a manual refresh. An edit to a component in a linked style guide package, or anywhere else, seemed to have no effect. - The page now connects again, and reloads once if anything changed meanwhile. The workbench already did.
- Site pages under a base path reload on every change in
pd dev. Withstorefront.urlon a path (https://example.com/docs/), some edits did not reload the open page. They were an edit to the page's markdown, a base-layer stylesheet, global data, a script or an asset.
0.5.0
Everything a documentation site needs: categories and tags with their own pages, listings with cards and views, and
queries for related and latest pages. Also search, regions with a table of contents, scheduled pages, llms.txt, and
build checks for classes and custom properties. Upgrading a 0.4 site: see Upgrading to
0.5.
Breaking changes
page.modifiedis retired. Git's last commit counted a typo fix as a change, so Pattern Dump no longer fills it.page.created(the first commit) is unchanged.- A layout that declares the retired key fails every page that uses it:
layouts/page declares "page.modified", which Pattern Dump no longer fills: git's last commit counts a typo fix as a change. Declare "page.updated" instead: the page's own updated: date, set for real changes. Fix: declarepage.updatedand setupdated: YYYY-MM-DDon a page when it really changes. - A tag is an object, not a string.
page.tagsand every listing entry'stagsare{ key, label, description, route }, as categories are (which gainroutetoo). Change the tags in sample data (.json) to objects. - A template that writes a tag as text stops the page, naming the template and line:
layouts/page (page.hbs:8): {{#each page.tags}} writes {{this}}, but a tag is an object since 0.5.0 (key, label, description, route): write {{label}} to show it ({{key}} is its URL segment, {{route}} its page). Fix: write{{label}}(or<a href="{{route}}">{{label}}</a>). - A card schema that declares
tagsas a list of strings stops its listing. That holds for a card named withx-pd-card(or a view's card):components/card (...) declares tags as a list of strings, but a tag is an object since 0.5.0 (key, label, description, route): declare its items as "type": "object", or leave items out. Fix: declare the items as objects. - A component that only receives tags through an include, without
x-pd-card, is not checked. Its template and sample data need the same change, or its workbench example shows empty tags. - Git's last commit no longer dates anything a reader or a search engine sees. There is no message, but the output changes in the ways below.
- JSON-LD
dateModified(on theWebPageand theArticle) is the page'supdated. It is left out without one. - The sitemap's
<lastmod>is the page'supdated, else itsdate, else left out.pd buildno longer runs git for the sitemap. page.modifiedis no longer filled (see above).- From a shallow clone,
pd build's note is aboutdatePublishednow:the repository is a shallow clone, so pages without a date of their own have no datePublished in their JSON-LD: build from the full history (in CI, check out with fetch-depth: 0). - Fix: set
updated:on pages whose last change should show. - A page dated after today stays out of
pd builduntil that day. That day is the UTC date of the build's clock. Every page under a folder whoseindex.mdis dated so stays out too. - The report names a held-back page:
[pd build] scheduled: 1 held back (articles/launch.md until 2026-12-01), andpd devnotesarticles/launch.md is scheduled for 2026-12-01: pd build leaves it out until then. - A link to a held-back page from a published page is then a broken link. A navigation entry naming it is a
problem (
storefront.site.navigations.footer[0]: "articles/launch.md" is not a page in the pages folder). Fix: give the page today's date or earlier, or remove the links until that day. site.collectionsis deprecated. It keeps working, and a skin whosepartials/baselists it gets one warning per build:warning: partials/base lists site.collections (articles), which is deprecated: declare a query on the layouts that show it instead (x-pd-query on a sub-key of page, such as page.latest with { "collections": ["articles"], "sort": "date", "limit": 3 }). Fix: declare a query (see Added).- The deprecated key goes in a later release.
- New frontmatter keys belong to the build. These are the keys:
updatedcategorieschildLayoutviewtoc- A layout whose schema declares one of them fails every page that uses it:
layout "article" declares "updated", which a page sets for the build, not for its layout: rename it in the layout's schema. - Fix: rename the field in the layout's schema. Show the page's values through
page.updatedandpage.categories. - A custom property nothing defines stops
pd build. That is avar(--x)without a fallback in the project's own styles folder (the skin and the component styles). It counts when there is no--xin any stylesheet of the style guide or its packages (or astyleattribute the build writes). - The build then stops with this message:
pd build: the skin reads custom properties nothing defines, so nothing was written:followed bystyles/card.scss:4: var(--card-gap) reads a custom property nothing defines: define --card-gap in the skin, give it a fallback (var(--card-gap, ...)), or, if JavaScript sets it, list it in storefront.checks.allowProperties. Only a project with a storefront is checked. - A skin with
layouts/tagorlayouts/categorygets tag or category pages without asking (see Added). Each must fit the layout. - A page of the pages folder at a generated route stops the build:
tags/index.md is the page at /tags/, which is the index of the tags as well: rename tags/, or give the tag pages another path (storefront.tagPages: { path: "..." }). AredirectFromthat claims one does too. - The layout must declare
title:layouts/tag: a tag page's title is the tag's label, so the layout declares "title". A key it requires that a generated page doesn't have fails it ("subtitle" is required by layout "tag"). - Fix: adjust the layout, or set
storefront.tagPages: false(categoryPages: false). - Search turns on when the project has Pagefind (
node_modules/pagefind), also when another package brought it. A site with a search of its own (another service): setstorefront.search: false. pd build --browserthen uses the firstinput[type="search"]it finds, at each viewport. It stops when it shows no result:/search/: searching for "..." in its search field (input[type="search"]) showed no result within 5 s, though the index has a page with it: ....regionon a placed component's tag is Pattern Dump's. A component whose schema declares a propertyregioncan no longer be given one on its tag:<pd-card>: region="..." is Pattern Dump's (the layout's region the component goes into), and components/card declares a property "region" as well: rename that property to place it in a region. Fix: rename the property.- Output also changes without a message, in the ways below.
article:tagand JSON-LDkeywordswrite a tag's label, not its key. For an undeclared tag they are the same.pd buildwrites/llms.txtfor an indexed site, over a file of the same path.storefront.llms: falseturns it off.- Shell code is highlighted where it was a plain
<pre>. That is in a component's docs, on a storefront page, and in a placed component's content. These languages count as shell code: bashshshellzshconsoleshell-session- A storefront code block's copy button is no longer in the page's HTML. The page's script adds it where the
browser can copy, with a visually hidden status line for screen readers. A skin styles
.shiki-container > button.copy-btnas before. - A test or crawler that looked for the copy button without JavaScript finds none.
pd buildprints new report lines, among themclasses:on every storefront build:[pd build] classes: every class on the site's pages is the style guide's. Others arellms.txt: N pages, and with Pagefindsearch: N pages indexed.pd devsays once that search needspd build.- In the workbench, a layout's Relationships tab lists its pages. Its detail JSON (
pages) is a union now: a generated page hassource: "generated"and nopath.
Added
- Pages can have categories, independent of folders.
storefront.categoriesdeclares them (key, label, optional description, and old keys asaliasesafter a rename). A page names them incategories:. - An undeclared category stops the page with a "did you mean". An old key builds as the new category, with a warning naming the page.
- Layouts, listing entries and the page's metadata carry the categories. Layouts get
page.categories, listing entries carry them, andsite.categorieslists every one whenpartials/baselists it.article:section(the first category's label) and theArticle'sarticleSectioncarry them. - Tags can be declared in
storefront.tags, as categories are. It is optional: without it any tag works, labelled with its key. With it, a tag that isn't declared stops the page with a "did you mean", and an old key builds with a warning. updated:on a storefront page is its last real change. It goes intopage.updated, JSON-LDdateModified,article:modified_timeon an article, and the sitemap'slastmod. It is checked: a real date, not beforedate.- A page dated after today is held back from
pd build(see Breaking changes).pd devshows it, listed withscheduled: true. childLayout:on a folder'sindex.mdsets the layout of the pages under it that name none. The nearest folder that sets one wins, and a page's ownlayout:wins over it.- A
childLayoutthat names no layout fails theindex.mdand each page that takes it. Every problem about a page's layout names where the layout came from. - The workbench lists a layout's pages in its Relationships tab, each with where its layout came from.
/api/pagesgiveslayoutFrom. - A listing can show each page as a card.
x-pd-cardnames the component each page of a listing is shown as (on a layout'spage.children, or a view'sentries). Every page in the listing is checked against the card's schema. - A field the card requires that a page doesn't have fails the listing, naming the page.
- A folder's listing can use a view.
view: gridon a folder'sindex.mdshows its listing throughviews/grid, a component in the skin's style guide. The layout writes{{{page.listing}}}, and the view gets the pages asentriesand names its card. x-pd-viewonpage.listingsets a layout's default view.- Queries are one way to list pages anywhere but a folder's own listing. Examples are related pages or a home
page's latest articles. A layout declares one as a sub-key of
pagewithx-pd-queryand its defaults: - Hand-picked
pagesfirst. - Then the pages of
collections(orsame) matchingcategoriesandtags. match: any or all;samefor the page's own.- By
sort(relevance, date or title) andorder. - To
limit, through aview. - The layout gets
{ entries, listing }. - A page changes a query's options in a block under the query's name. For example,
related:withlimit: 5indented under it. It turns the query off withrelated: false. - The current page, drafts and scheduled pages never appear, and a page never comes twice. Every value is checked, with a "did you mean" where it fits.
- Every tag and category a published page has gets a page, and each gets an index. The pages are at
/tags/<key>/and/categories/<key>/. They use the skin'slayouts/tag,layouts/tags,layouts/categoryandlayouts/categories. - A term page gets
page.termand lists its pages through a query. An index getspage.terms. storefront.tagPagesandstorefront.categoryPagesturn them off, ask for them, or set the path and the index's title.- An old key's route forwards to the new one.
- Tag and category pages are in the sitemap, with JSON-LD
CollectionPage. The workbench lists them under their layout. - Sites can have search with Pagefind (
npm install --save-dev pagefind).pd buildindexes each page's own content (never the layout's header, navigation or listings) into_pd/search/, under the site's path. The index hassection,tagandcategoryfilters. storefront.searchsets whether search is on. Left out, it is on when the project has Pagefind.truemakes a build without it stop, andfalseturns it off.pd build --browseruses the site's search field once per viewport.- A layout can declare regions besides the body. It declares them on
page.regions("x-pd-regions": ["sidebar"]) and writes each as{{{page.regions.sidebar}}}, null when empty.<body data-pd-regions="sidebar">names the filled ones. - A placed component goes into a region with
region="sidebar"on its tag or"x-pd-region"in its schema. - A page can show a table of contents. It is the skin's
components/toc, withitems: [{ text, href, level }].toc: truein a page (orx-pd-tocon its layout) shows it with the page's headings of level 2 and 3. <pd-toc>places the table of contents in the markdown, with the derived items or links of its own.- Sites get an
llms.txt(llmstxt.org). It has the site's title and description, then the top-level pages and each collection, every page with its title, link and teaser. It is on by default;storefront.llms: falseturns it off. - The file lists the same pages as the sitemap. URLs are absolute with
storefront.url, under the site's path. pd buildchecks the classes on site pages. It lists each class on a site page that no component or style of the style guide defines, naming the page's file and line:about.md:12: class "hero-big-title" isn't defined by any component or style. A finding is a warning:storefront.checks.classes: "error"stops the build,"off"skips it.- State classes (
is-,has-,js-) and Pattern Dump's own are allowed, and so isstorefront.checks.allowClasses. - The custom property check (see Breaking changes), with
storefront.checks.allowPropertiesfor properties JavaScript sets. - Shell code is highlighted, written as
bash,sh,shellorzsh.consoleorshell-sessionis for a prompt with its output.textstays plain. - A page's frontmatter takes one level of keys indented under a key, for a query's options.
- Listing entries carry
updated,categoriesandscheduled. - The website starter (
pd init --storefront) has layouts, views, queries and search. Its page layouts aredoc,articleandhome. For tags and categories it hastag,tags,categoryandcategories. - The starter has four views with their cards (
list,grid,featured,compact). - The starter has related and latest articles as queries, a search page with an accessible
components/search, and acomponents/toc.
Changed
pd init's last line suggestsnpm install --save-dev pagefindfor the site's search.- The message for an unknown
x-pd-*key in a schema lists the new ones: x-pd-cardx-pd-queryx-pd-regionx-pd-regionsx-pd-tocx-pd-view
Fixed
- A storefront code block's copy button tells screen readers too. It says "Copied" or "Not copied" in a status line, besides the button's own text.
0.4.2
Fixed
- Every code block is written the same way wherever its markdown is: a component's docs, a storefront page, and the
content of a component placed on a page. A fence and an indented code block are both highlighted, focusable and
have a copy button. Before, a code block in a placed component's content, and an indented code block anywhere,
was a plain
<pre>withouttabindex, so one that scrolled sideways failedpd build --browserat phone width. - The copy button on a storefront page's code block copies the code. It is shown by a small script of the page's own, only where the browser can copy; with scripting off there is no button to tab to.
Changed
- A folder's browser tab names the folder ("Atoms · Acme DS"), as a component's does.
- No em dash in anything Pattern Dump writes or prints. Separators are a middle dot ("Button · ghost", "Diagnostics
audit · <sha>", a docs error marker "[pattern: x · no such component]"), clauses in messages use a colon or a
period ("unknown key "x": did you mean …"), and placeholders are words in parentheses ("(no theme)"). This
includes
pd audit's headline and report lines, terminal and console messages,pd --help,pd init's notes and the files it writes, and the docs. A script or test that matches one of these strings needs the new text.
0.4.1
Fixed
- A style guide whose config uses
defineConfig()and takes its folders from itspackage.json'spatternDumpfield loads again.defineConfigfilled in default folders, which then disagreed with the manifest's ("the config and the project's own package manifest disagree"); it now returns the config unchanged, and the defaults are filled in after the manifest's folders. - A storefront page with a
datein its frontmatter, other than the home page and a listing, getsog:typearticle, witharticle:published_timeand onearticle:tagper tag, and anArticlein its JSON-LD. Every other page keepsog:typewebsite. The date git gives a page does not make it an article. - Every code block is focusable (
tabindex="0"), including one in a language without highlighting such asbash, in the workbench's docs and on storefront pages. A block that scrolls sideways no longer failspd build --browser(axescrollable-region-focusable) at phone width. - The workbench's browser tab shows
shell.brand.title("Pattern Dump" without one, instead of "Pattern Dump Dev" on every route), with the component in front on a component route ("Button · Acme DS"), inpd devand in apd buildsnapshot.
Changed
- A storefront page's <title> separates the page and the site with a middle dot ("About · Site") instead of an em dash, as do the workbench tab and the problems page.
0.4.0
Added
pd build --browseralso checks a storefront's pages in Chromium, at a desktop and a phone width: colour contrast and the other accessibility rules that need a rendered page (a critical or serious finding stops the build), and each image's variant against the box it is laid out in (a warning when its slot'ssizesdoesn't match). It uses the project's own Playwright:npm install --save-dev playwright, thennpx playwright install chromium.- Collections: a folder of storefront pages is a collection. A layout that declares
page.childrenlists the folder's pages on itsindex.md(route, title, description, date, image, tags), newest first withsort: date; a page without a description is listed with the first paragraph of its body.partials/basecan list folders undersite.collectionsto show their pages on every page, such as a home page's latest articles. Layouts can show a page's ownpage.dateandpage.tags. - A storefront can be published under a path, such as a GitHub project page:
storefront.urltakes the full address (https://example.github.io/project/). Every page, stylesheet, script and image is then served under the path, inpd devtoo, with links still written from the site's root; canonical URLs, Open Graph, JSON-LD and the sitemap carry it. Every page names its path in<meta name="pd-base-path">for a skin's own scripts, andpd build --browserstops on a request outside the path. Under a path there is norobots.txt(the build says what the host's own needs) and previews carry a robotsnoindextag, as a workbench's do when it is built with--base. - A project that is a pattern package itself (a style guide with its own workbench) describes its folders once: its
config takes each folder it doesn't name from its
package.json'spatternDumpfield (patterns, data, helpers, assets, styles withentryanddocumentBase, themes, scripts,globalScripts,exclude). A folder named in both with different values is a config error naming both files. storefront.head: a site's own additions to every page's head (an analytics script, a verification tag), a Handlebars file rendered withsiteafter the skin'spartials/headand checked like it. For a site whose skin is a shared package.- A
HELPER_SHADOWwarning on a component whose template has a bare{{name}}that calls a registered helper while its data has a field of that name, at any depth:{{id}}inside{{#each palettes}}showed theidhelper's output instead of each palette'sid, silently. Read the field as{{this.id}}, or rename it. pd init --storefrontwrites anarticles/collection (a listing page and one dated, tagged article) with alistinglayout, shows a page's date and tags in its page layout, and its config shows astorefront.urlfor a subfolder.date,tagsanddraftin a page's frontmatter.date(YYYY-MM-DD) is the page's date for listings and its JSON-LDdatePublished, which falls back to the page's first commit.draft: trueshows a page inpd devand leaves it out ofpd build, which names the drafts it left out.
Fixed
- A storefront page loads the behaviour scripts its components bring (
requireScriptof its layout's components and of the components it places, andglobalScripts), as their workbench previews do. Before, only the markup and CSS reached the page. - A code block on a storefront page, or in a component's
<pre>, keeps its lines as written when its partial is included on an indented line (as a skin's{{> @partial-block }}usually is). Handlebars indented every line after the first by the include's indentation. - A schema field named like a registered helper (
id,eq, …) is no longer an error only the workbench's Diagnostics tab shows:pd devandpd buildsay it in the terminal, a storefront page that places the component fails (as one whose layout has such a field already did), andpd auditre-audits a component when its schema changes instead of reusing a verdict cached before. - An image in a site page's markdown from a pattern package's assets, when that package's folder is the site's only asset folder, gets its variants. Before, the page failed with "is not an image in the assets" for a URL that was served.
pd devno longer keeps base-layer rules that a component's stylesheet stopped writing (through a mixin) until it is restarted.
Changed
- Breaking:
date,tags,draftandsortare now frontmatter keys of the build, likelayoutandimage. A layout whose schema declares one of them fails every page that uses it; rename the field in the layout's schema (and show the page's date or tags throughpage.dateandpage.tags). - A storefront page's JSON-LD carries
datePublished.
0.3.0
From this release Pattern Dump is published as plain 0.x versions under npm's latest tag: install it with
npx pattern-dump init, without @alpha. Being at 0.x, breaking changes are possible between minor versions, and
this changelog names them.
Added
sourceDir,patternsDirandstylesare optional. A site whose components, skin and styles all come from pattern packages names none of them; they default to./src,./src/patternsand./src/styles, and the folders don't have to exist.
Changed
pd buildnow checks every page of a storefront with axe before it writes anything, and stops on an accessibility error: a WCAG rule rated critical or serious (an image without alt text, a button with no name, a page without a language), or a page without exactly one<main>and one<h1>. Each error is printed with its page, the rule, the elements it was found on and a link to the rule's explanation; moderate and minor findings, and axe's best practices, are listed as warnings and don't stop the build. To see them before a build, runpd buildlocally: nothing is written while there are errors. Inpd dev, a page without one<main>and one<h1>is a warning in the terminal.
0.2.0-alpha.0
The storefront: a website written as markdown pages, dressed by a skin made of ordinary components, served by
pd dev on a host of its own and built by pd build next to the workbench. With it come responsive images, link
and image checks, and live examples of your components on the site's pages.
Pattern Dump now needs Node.js 22.22 or later (it was 20.10).
Workbench
- Pattern packages linked into a project (a
file:dependency or a workspace) are watched like the project's own files, and each is read from its real folder. Global data, assets and helper modules reload whilepd devruns. - A pattern package's TypeScript helpers are refused with a message naming them, and diagnostics name files by project or package path, never by an absolute path.
- Live reload is dependable: changes are handled one at a time, in the order they happen; a page or preview that
missed a change fetches it again and never shows an older one; a save the file watcher drops is still handled; a
folder added while
pd devruns (asgit checkoutorgit pulldoes) is seen with every file in it. - A component added while
pd devruns gets its own stylesheet even when the stylesheet is saved before the template. - A variant reached by its own id (
/preview/atoms/toggle-demo~alt) is the same document as?variant=alt, with its base's behaviour scripts, layout and CSS. - An overview tile picks up a stylesheet that was still empty when it rendered.
- Behaviour scripts are stamped with their content hash, so a browser fetches a script again exactly when it changed.
- Every base-layer file whose rules no component owns and no
documentBaseentry lists is named inBASE-LAYER.generated.md, with its rule count.
Storefront
- Pages: every markdown file in
storefront.pagesDiris a page, rendered with a layout from your patterns. Its frontmatter is checked against the layout's schema,storefront.siteagainstpartials/base's, and every problem names its file and line.pd devserves the site athttp://live.localhost:4000/,pd buildwrites it tostorefront.outDir. - Live examples: a
patternfence shows a component's own preview in a frame, with links to its variants. A component can declare the height its example starts at (x-pd-example-height), andpd devwarns when that height is too tall. - Placing components with values:
<pd-…>tags in a page's markdown, checked against the component's schema at every level (x-pd-component,x-pd-content,text/markdownproperties), with the file, line and column of any problem. - What a page knows about itself, for layouts that ask for it: its headings (with GitHub's anchors), section, breadcrumbs, previous and next pages, dates from git, and declared navigations.
- Search engines and link previews: canonical URLs, Open Graph, the site's language, JSON-LD,
sitemap.xml,robots.txt, a 404 page,redirectFromfor old routes,index: false, and a link-preview image per page or site. - A skin can add to every page's
<head>through apartials/headcomponent, and can be a pattern package. pd init --storefrontstarts a project with a website: pages, a plain skin, the workbench under/workbench/on the same host, and a GitHub Pages workflow.- Every file a page references (stylesheets, scripts, fonts, images) carries the content hash of the file as served, so a visitor's browser fetches it again exactly when it changed.
Images
- Every raster image is served as WebP variants of the widths it is shown at, encoded with sharp on first use and
cached in
node_modules/.cache/pattern-dump/images/.images(quality, effort) sets the encoding, andstorefront.imagesoverrides it for the site. - Image slots: a component declares where an image goes and how wide it is shown (
x-pd-image), and its template writes it with{{pd-image field alt=…}}. Alt text is required;alt=""marks a decorative image. - Images in a page's markdown get their variants in the slot the page's layout declares (
x-pd-prose-images), withsizes="auto", and the first ones can load at once (eager). - Every
<img>carries its width and height, so the page doesn't shift as images load. Photos are turned upright by their EXIF orientation.
Checks
pd buildchecks every link on every page of the site before it writes anything: pages, files,#anchors (a heading's too), the site's own address and links into the workbench. A broken link stops the build; links to other sites are listed in the build's notes.pd devwarns about a page's links to pages that don't exist.pd buildrefuses a page with an<img>that has no width and height, or a raster image served without its WebP variants, and names the fix;pd devshows the same as warnings.- A schema field named like a registered helper is an error, and so is an unknown
x-pd-key in a schema. - The shape check tells a list from an object (an array property was reported as a mismatch).
Fixes
pd devanswers only requests addressed to its own host names, accepts live-reload connections only from its own pages, binds its live-reload socket to 127.0.0.1 like its HTTP server, and serves files only from inside each route's folder.- The starter's body defaults no longer override a pattern package's document styles (hTWOo's dark themes showed dark text on a white page).
- Two config loads in the same millisecond no longer share a temporary file.
- The audit reuses a cached result only when it was made by the same version of the check.
- The live-reload socket reports the port it is actually bound to.
- A code example on a page that quotes
<img src="/assets/…">is shown as written, not with a cache stamp added.
0.1.0-alpha.4
Fixes found while moving a third PatternLab styleguide to Pattern Dump with hTWOo consumed only as
pattern packages: its templates, data, scripts and CSS all come from @n8d/htwoo-patterns and
@n8d/htwoo-core, and the project compiles only its own SCSS.
Added
styles: falseon a package reference leaves that package's stylesheets out, for a project that compiles them itself; its templates, data, themes, scripts and assets are still used. It also works for a package that another brings in as a peer: name the peer with the option.themes.diris optional:themes: { default: "<name>" }alone makes one of your packages' themes the one previews start with.pd devwarns when the default matches no theme.- A component or variant
.jsonthat does not parse is reported as aDATA_INVALIDdiagnostic, with the file and, where the parser gives one, the line and column, instead of being dropped silently. An invalid variant file no longer fails the whole render.
Fixed
- A class belongs to the rule that defines it (the class on its own, such as
.cardor.card:hover), not to every rule that mentions it. A project rule that restyles a package class in context (.tile .hoo-radio) took the class over, so the package component's CSS was never linked where the class was used. - A rule repeated after a different one (A, B, A) keeps its last position in the base layer and in component CSS, as the browser applies it. The first copy was kept, so B won.
- Included partials keep the caller's data frame, as in stock Handlebars:
@rootis the page's data, and{{#if @partial-block}}sees the block of a block call. - A configured
styles.entrylist compiles in the order given. It was sorted, which could change the cascade. - SCSS can load an installed package by its bare name (
@use '@scope/pkg/…') or apkg:URL, withoutSASS_PATH. - A data variant reached by its own id (
/preview/atoms/chip~danger) or included by its handle ({{> "atoms-chip~danger"}}) renders on top of its base component's data, as?variant=already did. pd buildcopies assets aspd devserves them: where two asset folders share a name, the first one (the project's) wins and the other is left out and reported. A package'simages/used to overwrite the project's in the snapshot.pd devwarns about such folders at startup.
0.1.0-alpha.3
Fixes found while moving a second PatternLab styleguide (n8d) to Pattern Dump.
Fixed
- A numbered
templatesorpagesfolder now gets thefullpreview layout its category promises. The category was matched with its ordering prefix still attached, so a PatternLab tree (04-templates,05-pages) could never hit the documented default. Only a per-folderpreview: fullcould. Folder labels still keep the number:2-colis a name and04-templatesa prefix, and nothing in the string tells them apart, so a numbered folder setstitle:for a clean label. - A
requireScriptorglobalScriptsid with no matching<scriptsDir>/<id>.tsis reported instead of failing inside the preview.pd devnames every unresolvable id at startup (with the component for arequireScript), and the script's URL answers 404 saying which file it expected and where, rather than embedding a rawENOENT. Scripts are TypeScript, so a.jsfile of the same name does not satisfy an id; that is the common case this hid.
0.1.0-alpha.2
Fixes found while moving a PatternLab styleguide to Pattern Dump, and the changes they needed.
Check before upgrading
These can change how an existing project loads or renders:
- The config is checked when it loads. A missing required option, an unknown option or a value
of the wrong type now stops
pdwith a list of every problem, with a suggestion for likely typos.styles.strategy: "co-located"andassets.strategy: "component-relative"were accepted but never implemented; they are now rejected as not supported yet. - Numbered folders lose their number in handles.
00-atoms/badgeis included as{{> atoms-badge }}, as in PatternLab. Its id and address keep the number (/00-atoms/badge). Includes written with the number ({{> 00-atoms-badge }}) need updating. documentBasepaths are authoritative. A file or folder listed there always goes into the base layer, even one that belongs to a component;"."makes the whole styles tree global. Rules that no component owns still join the base layer, as before.- Previews have no wrapper element. The markup sits directly in
<body>; the<main>with inline styles around it is gone. CSS or tests that targetmain.layout-centered,main.layout-fullormain[data-component-id]inside a preview need updating;data-component-idis now on<body>. /api/component/<id>returns 404 for an id that no component has.
Added
assets.cssaccepts full URLs, such as a web-font stylesheet.- References that start with an asset folder's name are rewritten to the served
/assets/…path when written root-absolute (/images/logo.svg), as PatternLab projects write them, and inurl()in compiled CSS. - A
centeredpreview frame is as wide as its content and centred in the Stage. If a width media or container query that styles the component would change at that width, the frame keeps the full width instead. Gallery tiles fit and centre the same way. - PatternLab-style links (
/#/atoms/button) open the matching view. An address that names nothing says so in the Stage and links the closest matches; a view that fails to load says so too. pd devwarns at startup about adocumentBaseentry that matches no file, and summarises the unowned rules that are global without being listed.
Fixed
- A
centeredpreview whose height comes from the viewport (height: 200vhin the base layer, a percentage chain) no longer grows without bound. Content-fitting such a height is circular (the frame's height feeds the content's), and the frame used to double every tick to the browser's layout ceiling, showing a size like785 × 33554428. The run of growth is now detected, the frame keeps its last steady height and the content scrolls inside it, and the Console says why. - SCSS edits reach the preview live when
styles.entryis set, and edits to base-layer styles update live too. @import,@charset,@layer a, band@namespacekept their;: the next rule was being swallowed and both were dropped, inpd devand inpd build.- Components in numbered pattern folders own their CSS, whatever the styles folders are called.
- Missing files return 404 instead of 200 with the workbench page, so broken asset paths show up.
- Every
hrefandsrcwritten into a preview is escaped. - The flattening and conflicts reports print their full path, and a bare wrapper element around different includes is no longer reported as a flattened copy.
styles.strategyis optional.
0.1.0-alpha.0
First public alpha.