=== Trunk Component Library ===
Contributors: trunk
Tags: components, design system, library
Requires at least: 6.4
Tested up to: 7.0
Requires PHP: 8.1
Stable tag: 0.4.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

A reusable library of design system components for WordPress.

== Description ==

Describe the plugin here. This file follows the WordPress.org readme format;
keep it even for private plugins, as many update servers and tools parse it.

== Installation ==

1. Upload the `trunk-component-library` folder to `/wp-content/plugins/`.
2. Run `composer install --no-dev` inside the plugin folder (optional — a
   fallback autoloader ships with the plugin).
3. Activate the plugin through the "Plugins" screen in WordPress.

== Changelog ==

= 0.4.0 =
* Added bin/install-mu-fallback.php, so a site that deploys its files read-only
  can install the fallback guard from a Composer hook. The plugin cannot write
  to mu-plugins on such a site and never will be able to, but Composer runs
  while the release is still being built and the directory is still writable.
  See the README for the two lines to add to a site's composer.json.

= 0.3.5 =
* Removed the temporary logging added in 0.3.4. The guard's version was bumped
  past the diagnostic copy, so any site still holding that one replaces it.
* A guard that arrived with the deploy is now recognised as installed. A site
  that ships the file itself was previously left retrying the write, and
  failing, on every admin request for good.
* The notice shown when the fallback cannot be installed now says why, and what
  to do about it. Where mu-plugins is read-only to WordPress no amount of
  retrying will help — the file has to arrive with the deploy — and the notice
  now names the file to copy rather than reporting a failure and stopping there.

= 0.3.4 =
* Temporary diagnostic release. Installing the mu-plugin fallback now writes a
  line to the error log at every step, and the guard itself logs when it loads,
  so a site where it will not install can say which step is refusing rather
  than being guessed at. No behaviour has changed. Both are to be removed once
  that is understood — do not leave this version running.

= 0.3.3 =
* The mu-plugin fallback now falls back to a direct write when WordPress's
  filesystem API declines to pick a transport. That refusal is about what the
  API is willing to trust, not about whether mu-plugins can be written to, and
  on a site with no FTP credentials configured it left the guard uninstalled
  over a question nobody had asked. The directory is still checked as writable
  first, so a genuinely read-only one fails exactly as before.

= 0.3.2 =
* The mu-plugin fallback now installs on a site whose files are not owned by
  the user PHP runs as. WordPress will only write directly when new files come
  out owned by whoever owns core, which is not true of a containerised or
  release-directory deployment however writable mu-plugins itself is, and the
  strict test handed those sites to an FTP transport they have no credentials
  for. Relaxed the ownership requirement, as core does for its own automatic
  updates.

= 0.3.1 =
* Fixed a fatal error on activation. Installing the mu-plugin fallback read
  FS_CHMOD_FILE, which WordPress defines only once WP_Filesystem() has
  connected — and on a site where it cannot, the object it assigns on the way
  past was enough to reach that constant and nothing else. The write is now
  decided by what WP_Filesystem() returns, and it asks about the directory
  being written to rather than wp-content, so a deployment whose release
  directory is read-only is not sent looking for FTP credentials it has no
  reason to need.
* The plugin no longer boots when ACF is missing, and says so on screen
  instead. Every service it registers is a layer over ACF's flexible content
  fields, so without it the first call into one was a fatal rather than an
  absent feature.
* The mu-plugin fallback now stands down once the plugin has booted rather than
  once its classes can be loaded. An active plugin that stopped short leaves
  exactly the same unresolved rows behind as a deleted one, and the old test
  could not tell the two apart.

= 0.3.0 =
* Added a component filter to the Pages, Posts and other list tables. Choosing a
  component narrows the list to the posts using it — including the posts using it
  through a synced library entry, which store a reference rather than the
  component's own name and would otherwise be the ones left out.
* The filter offers only the components the builders on that post type define,
  and is hidden entirely on post types with no builder.

= 0.2.0 =
* Fixed saving a component whose layout name is not lowercase. Layout names
  were run through sanitize_key(), which lowercases, so on a project naming
  its layouts in PascalCase no row could be saved at all.
* Failures now report the reason the server gave. The endpoints answer a
  refusal with a 4xx, which jQuery routes to fail() rather than done(), so
  every distinct error read as the same generic message.
* The library no longer appears on ACF options pages. It is postmeta work
  throughout, and an options page stores elsewhere; a builder cloned onto one
  renders wearing the original's field key, so the heart and the insert picker
  both turned up where neither could work.

= 0.1.0 =
* Initial scaffold.
