v1.6.0
Vendoring for people who cannot reach a registry, and an accessibility fix for React.
Fixed
aria-busy carried the string "undefined" in React. React assigns properties rather than attributes on custom elements, so the common loading={cond || undefined} binding hands the element undefined, and that went straight into the attribute. An unrecognised value is treated as false by assistive technology, so nobody was stuck with a permanently busy region, but the attribute was wrong in the framework most consumers use. Solid was never affected, since attr:loading goes through the attribute converter.
This predates the refactor: 1.4.0 behaves the same.
Added
An unminified standalone bundle, for anyone who has to read what they are vendoring before approving it.
phantom-ui.standalone.js 34.7 kB minified
phantom-ui.standalone.dev.js 51.5 kB about 1500 lines, readable
phantom-ui.standalone.d.ts 8.7 kB types, no imports of any kind
Same code either way, both with Lit inlined and no external imports. Drop the .js and the .d.ts in a folder and import by path:
import "./phantom-ui.standalone.dev.js";
import type { PhantomUi } from "./phantom-ui.standalone.dev.js";No package manager, no node_modules, and it still type-checks under strict with skipLibCheck: false.
All three files are attached to this release, so they can be downloaded from GitHub without touching npm. They are also on the CDNs, which are different hosts from the registry and often get through where it does not:
https://cdn.jsdelivr.net/npm/@aejkatappaja/phantom-ui@1.6.0/dist/phantom-ui.standalone.dev.js
One limit worth stating: these are bundled output, not the authored TypeScript. The sources import Lit, so they cannot be compiled by a project that cannot install anything. The sources are still the better thing to read for a review, and they are in the repository.
Testing
A new CI job drives two built example apps in a real browser and asserts that every shimmer block lands on an element that actually exists, that all text and media are hidden while loading, and that the overlay, the inert attributes and the hiding are all gone on reveal. The examples were previously only built, never rendered.
Thanks
@hshahi, who pushed back when the first answer did not work for his setup, and whose report is why both the overlay fix in 1.5.0 and the vendoring path exist.