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.8.0, the version this site is built with.
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 names still load, with one warning per key (storefront.pagesDir is now site.pagesDir), until 1.0, which removes them; setting bothsiteandstorefrontis a config problem. Messages name the new paths (site.globals.navigations.footer[0]: …) and say "site" where they said "storefront" (pd build: the site has problems, so nothing was written), and 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: two flags of their own, apart from--site <package>, which still makes a website on an existing style guide. The old flags still work, with a warning, until 1.0, which removes them;--with-sitewith--without-siteis an error. A new project's config uses the new names.- 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, and 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…:SiteChecks,SiteTermPages,SiteTag,SiteCategoryandSiteNavEntry, besideSiteConfig. EachStorefront…name still works as a deprecated alias until 1.0, which removes them.StorefrontConfigis 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,--pd-code-keyword,--pd-code-string,--pd-code-commentand eleven more, with Pattern Dump's colours as the defaults. A site sets them from its own tokens (--pd-code-string: var(--color-code-string)), with no colour values of its own; the defaults are in their own cascade layer,pd-code, so any rule of the site's wins. Light and dark follow the page'scolor-scheme: a light and dark toggle setscolor-schemetoo.pd buildwrites the file 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:
nav: falsein its frontmatter. The page is left out ofnav(and of its folder'schildren) and out ofprevandnext: its own are empty, and its neighbours link past it. It still renders, is searchable, is in the sitemap andllms.txt, and is reached by its links, such as a credits or legal page linked from the footer. On a folder'sindex.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 thantrueorfalseis a problem on the page,nav must be true or false. A layout still getsnav, 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, so a website can use it (pd init site --site ../styleguide) without a manual step. Only apackage.jsoninit creates gets it; 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, like symbol images.
on a line of its own is a<figure>with the caption as its<figcaption>, instead of atitleattribute (in a line of text, the title stays an attribute). A file namedphoto-dark.jpgnext tophoto.jpgmakes the image a<picture>with a(prefers-color-scheme: dark)source, both 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: a data overlay with its data, a variant with markup of its own from its template. Until now only each component's default render was audited. 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, 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, it 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), and the layoutspd initwrites describepageas what Pattern Dump works out for it. The Inspector names a generated page's setting assite.<kind>Pages,pd devlogs a change tosite.globalsby that name, andpd 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. Each keeps its hue.
Fixed
- The Console has a warning level. A data variant left out for want of a base template, and a preview whose
height depends on the frame's, are warnings now: the line starts with
Warning:and has an orange mark at its left edge, its text in the normal colour. The variant was 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 …) and 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.jsonleaves out, or has the same value for as the base's.json, is still required on the tag, with the same message as before.
0.7.0 (2026-11-18)
Diagrams that follow the site's colours: symbol images, drawn once with colour tokens, shown on site pages in light
and dark, and 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, 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.
title,status,visibility,description,deprecated-use,preview,overview,requireScriptandrequireAssetsin a component's.mdor a folder'sindex.mdwere matched as akey:line anywhere in the file, so a line in the body (a code sample withrequireScript: x) loaded a script, and a file without a---block still had metadata. They now come from the block at the top only, likeorder: move any such line into the block. A quoted value loses its quotes (title: "Button, primary"), andrequireScript: [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); a page that placed a data variant and relied on its look being the base's sets those keys on the tag. - An asset folder's
symbols/folder now holds symbol images. Every SVG directly in it is a symbol: it is checked (colours only asvar(--color-…)andcurrentColor), andpd 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, or the build stops on their colours. A markdown image whose address is a#name(), which showed a broken image, is now that symbol on a site page, and a page problem when there is none; 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, right after a line of text, starts a definition list: the line before it becomes the term. Such a line was part of a paragraph before. Check pages and docs that start a line that way.
Added
- Symbol images. One SVG per symbol in an asset folder's
symbols/folder, shown on a site page with(orfor a figure). The page inlines each symbol it shows once, in a hidden sprite, so a diagram follows the site's colour tokens and its light and dark modes. Colours in a symbol are onlyvar(--color-…)andcurrentColor; anything else stops the build. A<style>'s simple class rules 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. - A symbol as a file:
/_pd/symbols/<name>.svg, served bypd devand written bypd buildinto both outputs, with the token values from the document base layer written in (light, then dark byprefers-color-scheme), for a README or anywhere else only an image file can be shown.currentColorbecomes--color-textthere, 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). - Definition lists in markdown. A term on its own line, then each definition on a line starting with
:, renders as plain<dl>,<dt>and<dd>, in site pages, placed components' markdown content and component docs (the syntax ofmarkdown-it-deflist, now a dependency at exactly 4.0.0). A listing's teaser never comes from a definition list. - 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 it: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 set no asset folder has fails the page, naming the component; 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 winning; 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>) and 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. If the workbench has taken its place and the storefront then can't, the build says the two are out of step.- 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.- A change noticed after the workbench was written, or while the storefront was, stopped
pd buildwith both folders part old, part new. pd helpand the guide no longer offerpd help <command>, which printed the same usage for every topic. The help gives the--basedefault asbuild.basePath, then/, and says--brandsets the site's title with--site.- The accessibility coverage page called the rendered-page rules deferred; they run in the workbench's Diagnostics
tab and with
pd build --browser. - The guide promised more than the code does in several places, among them that
pd auditrenders every variant and reports handle collisions, thatpd buildfails on component findings, and that a component can be made of data variants alone. Each now says what Pattern Dump does.
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, 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>: a content-only website on an existing style guide package. It writes pages, a config and apackage.json, nothing else: no components, styles, themes or skin, which all come from the package (an npm name, optionally with a version, or a folder next to the site as afile:dependency). Afternpm installit 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; a package named without a version is pinned to the one installed.--workbench-urlsays where the style guide publishes its own workbench (default/workbench/). A style guide and its site in one repository are two inits and a rootpackage.json, described in the getting started guide. -
build.workbench: false(a new config option):pd buildwrites the storefront only, for a site whose workbench another build publishes (its style guide's). The base-path check for a same-hostworkbenchUrlis then the other build's, andoutDiris not used.pd init --sitesets it. -
pd initasks two more questions with a website: site search, which adds Pagefind as a devDependency sopd buildwrites the index (--search/--no-search, default yes), and whether the site follows the viewer's light or dark setting (--system-theme/--no-system-theme, default yes): asystemtheme (color-scheme: light dark) as the default, so the examples on a page follow the viewer with or without JavaScript, and the skin's own colours insrc/styles/base/colors.scss. -
Layouts preview at full height. A component in
layouts/fills the stage's height and width in the workbench, as pages and templates do."x-pd-preview": "full"or"centered"at the top of a schema sets it for one component (an index.md'spreview:for a folder, a component.md'spreview:above both), and the Full height toggle beside the viewport sizes switches it, as?layout=full|centeredin the address. -
Folder defaults. A folder's
index.mdsets frontmatter for the pages under it once, in achildDefaults:block written as a page writes its frontmatter: the layout, any key the layout declares, a query's options,tags,categories,draft,index,toc,image. 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. A draft default is said per folder bypd build, so it can't hide a section silently:[pd build] 12 pages are drafts via the childDefaults of services/index.md. -
Page and template patterns as layouts.
"x-pd-layout": "<name>"in the schema of a pattern inpages/ortemplates/makes it the layout<name>, with no copy underlayouts/; a page names it as any layout. The page's markdown goes into the propertyx-pd-contentnames (atext/markdownstring), elsebody. A marker anywhere else, a marker on alayouts/component, and one name for two layouts are errors that name the files, 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): the keys it took from a folder'schildDefaults, each with thatindex.md, a query's options one by one ("related.limit"). -
A new diagnostic kind,
STYLE_BORROWED(info). 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. That stays, since a design system can borrow on purpose, and 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. A website page that renders a borrower gets the same line as a warning, naming the page file, andpd 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. It is on the component's detail, not inpd audit.Upgrading a site made with an earlier
pd init --storefront: its layouts share the page classes (page-title,page-description,page-tags,page-body,page-next,page-meta) thatlayouts/pageowns, so after the upgrade every page that uses another layout (article, doc, home, listing, tag and category pages) warns that it borrows them, and those layouts showSTYLE_BORROWED. Nothing looks different; the warning says the styling depends on another layout's stylesheet. Fix: move those rules out ofsrc/styles/layouts/page.scss(and the three.doc-content .page-*rules out ofsrc/styles/layouts/doc.scss) into a newsrc/styles/base/page.scss, which the base layer (documentBase: ["base"]) links on every page, as the starter now does. Start it 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(styleguide,style-guide,design-system,site,website,docs,www). The question shows it,--yestakes it, and init prints the name it wrote.- 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, and 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): 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; and the website's search field had the class ofmolecules/search-field. The example page's classes are nowexample-page-*, the search field'ssearch-input.Upgrading a project made that way with an earlier
pd init: rename the classes insrc/patterns/pages/example/example.hbsandsrc/styles/pages/example.scss(page,page-header,page-title,page-contenttoexample-page,example-page-header,example-page-title,example-page-content), and insrc/patterns/components/search/search.hbsandsrc/styles/components/search.scssthe input'ssearch-fieldtosearch-input(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):
| 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. Warnings alone leave it at 0;--strictmakes any finding fail it. The last line says why:[pd audit] failed: 2 errors found (warnings alone don't fail it; --strict makes them fail it too).Fix: correct the errors, or runpd auditwithout failing the step (pd audit || true) if it should only report.- 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, with
0.5.2's message 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, so a defect put into a partial left every component that includes it clean. The cache now covers every partial a component includes, at any depth, and its sample data and schema; a partial a project helper includes by name (such as adynamicPartialhelper); a dynamic partial ({{> (expr)}}); and the project helpers' source. Inpd 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 (and the default on a machine with two cores or little memory) 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 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):
| 0.5.0 | 0.5.2 | |
|---|---|---|
| 500 pages, every check | 114.9 s | 14.8 s |
500 pages, --skip-checks=a11y |
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 (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, and 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:a11y(the accessibility of the storefront's pages) andhtml(each component's markup against HTML's content model). Every check runs by default;--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, so a
helper that changes a value it is given stops the render, naming 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)). 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 ...). Fix: copy the value in the helper before changing it ({ ...value, tone: "loud" }), or return a new one. pd buildstops when the project changes while it runs. The sizes and time stamps of every input (patterns, styles, data, helpers, scripts, themes, assets, the site's pages and head) are taken when the build starts and compared before anything is written and after each part. 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. Now one problem names the file, line and column and says the component
isn't checked until it's fixed: in the workbench (an error on the component), on every
pd devsite page, and inpd build, which writes nothing, 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. A build that passed on 0.5.0 with such a file now stops; before, its output was unchecked. - 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 for a schema that declares tags as strings while the template reads their fields, and a template that writes{{this}}while the schema declares objects. On the site, a schema that a page's layout or view includes and that declares tags as strings fails the page, 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, and 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, with 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, as 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/), an edit to the page's markdown, a base-layer stylesheet, global data, a script or an asset did not reload the open page.
0.5.0
Everything a documentation site needs: categories and tags with their own pages, listings with cards and views,
queries for related and latest pages, 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. A layout that declares it 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.page.created(the first commit) is unchanged. -
A tag is an object, not a string.
page.tagsand every listing entry'stagsare{ key, label, description, route }, as categories are (which gainroutetoo). 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). A card named withx-pd-card(or a view's card) whose schema declarestagsas a list of strings stops its listing: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: write{{label}}(or<a href="{{route}}">{{label}}</a>), declare the items as objects, and change the tags in sample data (.json) to objects. A component that only receives tags through an include, withoutx-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. No message; the output changes:
- JSON-LD
dateModified(on theWebPageand theArticle) is the page'supdated, and 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. - JSON-LD
-
A page dated after today stays out of
pd builduntil that day (the UTC date of the build's clock), with every page under a folder whoseindex.mdis dated so. The report names it:[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 it from a published page is then a broken link, and 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). It goes in a later release. -
New frontmatter keys belong to the build:
updated,categories,childLayout,viewandtoc. A layout whose schema declares one 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 throughpage.updatedandpage.categories. -
A custom property nothing defines stops
pd build. Avar(--x)without a fallback in the project's own styles folder (the skin and the component styles), with no--xin any stylesheet of the style guide or its packages (or astyleattribute the build writes):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 (see Added), without asking. 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"), and 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). - A page of the pages folder at a generated route stops the build:
-
Search turns on when the project has Pagefind (
node_modules/pagefind, also when another package brought it).pd build --browserthen uses the firstinput[type="search"]it finds, at each viewport, and 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: .... A site with a search of its own (another service): setstorefront.search: false. -
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 that changes without a message:
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 (
bash,sh,shell,zsh,console,shell-session) is highlighted where it was a plain<pre>: in a component's docs, on a storefront page, and in a placed component's content. - 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 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,llms.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
- Categories, independent of folders:
storefront.categoriesdeclares them (key, label, optional description, and old keys asaliasesafter a rename), and a page names them incategories:. An undeclared value stops the page with a "did you mean"; an old key builds as the new category, with a warning naming the page. Layouts getpage.categories, listing entries carry them, andsite.categorieslists every one whenpartials/baselists it.article:section(the first category's label) and theArticle'sarticleSectioncarry them. - Tag declarations:
storefront.tags, declared as categories are. 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, its last real change:page.updated, JSON-LDdateModified,article:modified_timeon an article, and the sitemap'slastmod. Checked: a real date, not beforedate.- Scheduled pages: 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.md: 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. AchildLayoutthat names no layout fails theindex.mdand each page that takes it, and 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, and/api/pagesgiveslayoutFrom.- A listing's 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. - Listing views:
view: gridon a folder'sindex.mdshows its listing throughviews/grid, a component in the skin's style guide. The layout writes{{{page.listing}}}; the view gets the pages asentriesand names its card.x-pd-viewonpage.listingsets a layout's default view. - Queries: one way to list pages anywhere but a folder's own listing, such as related pages or a home page's
latest articles. A layout declares one as a sub-key of
pagewithx-pd-queryand its defaults: hand-pickedpagesfirst, then the pages ofcollections(orsame) matchingcategoriesandtags(match: any or all;samefor the page's own), bysort(relevance, date or title) andorder, tolimit, through aview. The layout gets{ entries, listing }. A page changes options in a block under the query's name (related:withlimit: 5indented under it), or turns it 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. - Tag and category pages: a page for every tag and category a published page has (
/tags/<key>/,/categories/<key>/), and an index of each, through the skin'slayouts/tag,layouts/tags,layouts/categoryandlayouts/categories. A term page getspage.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. They are in the sitemap, with JSON-LDCollectionPage, and the workbench lists them under their layout. - 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, withsection,tagandcategoryfilters.storefront.search: left out, on when the project has Pagefind;truemakes a build without it stop;falseturns it off.pd build --browseruses the site's search field once per viewport. - Regions: a layout declares regions besides the body on
page.regions("x-pd-regions": ["sidebar"]) and writes each as{{{page.regions.sidebar}}}, null when empty. A placed component goes into one withregion="sidebar"on its tag or"x-pd-region"in its schema.<body data-pd-regions="sidebar">names the filled ones. - The table of contents: 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 it in the markdown, with the derived items or links of its own. llms.txt(llmstxt.org): the site's title and description, then the top-level pages and each collection, every page with its title, link and teaser. The same pages as the sitemap; absolute URLs withstorefront.url, under the site's path. On by default;storefront.llms: falseturns it off.- The class check:
pd buildlists 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. State classes (is-,has-,js-) and Pattern Dump's own are allowed, and so isstorefront.checks.allowClasses. A warning;storefront.checks.classes: "error"stops the build,"off"skips it. - The custom property check (see Breaking changes), with
storefront.checks.allowPropertiesfor properties JavaScript sets. - Shell highlighting:
bash,sh,shellandzsh, andconsoleorshell-sessionfor 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) hasdoc,article,home,tag,tags,categoryandcategorieslayouts, four views with their cards (list,grid,featured,compact), related and latest articles as queries, a search page with an accessiblecomponents/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-card,x-pd-query,x-pd-region,x-pd-regions,x-pd-toc,x-pd-view).
Fixed
- A storefront code block's copy button tells screen readers too: "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.