v1.5.0
First release since 1.4.0. Nothing in the public API changed.
Fixed
mode="overlay" now always shows an indicator. Overlay makes the block fill transparent on purpose so your content shows through and only a light glint is drawn on top. That glint was the only thing it painted, and animation="pulse", "breathe", "solid" and the reduced motion media query each suppressed it. With a transparent fill there was nothing left, so a refresh rendered no indication at all beyond the dim. Measured across the matrix, overlay painted something in 1 of its 8 combinations.
It now keeps a flat veil at --shimmer-color whenever the glint is suppressed. pulse and breathe animate the block, so they animate the veil with it. solid and reduced motion hold it static, so nothing moves and WCAG 2.3.3 is unaffected. Reported by @hshahi in #46.
pierce-shadow re-measures when a pierced component re-renders. Shadow roots reached by piercing are now observed, so a component that rebuilds its own internals gets measured again instead of leaving stale blocks behind. The documentation listed this as a limitation, and that entry is gone.
A broken link in the docs. The SSR Frameworks link on the TypeScript reference page was missing the site base path and returned a 404.
Added
@aejkatappaja/phantom-ui/standalone, an ES module with Lit bundled in. 34 kB minified, 11.5 kB gzipped, no runtime dependency and no bare imports.
import "@aejkatappaja/phantom-ui/standalone";Vendoring without a registry. If you cannot install from npm at all, copy two files into your project and import by path:
phantom-ui.standalone.js # the component, Lit included
phantom-ui.standalone.d.ts # its types, no imports of any kind
import "./phantom-ui.standalone.js";
import type { PhantomUi } from "./phantom-ui.standalone.js";That is the whole install. The declarations reference nothing external, so a project with no node_modules still type-checks under strict with skipLibCheck: false. Both files are also reachable over a CDN if your proxy allows one:
https://cdn.jsdelivr.net/npm/@aejkatappaja/phantom-ui@1.5.0/dist/phantom-ui.standalone.js
https://cdn.jsdelivr.net/npm/@aejkatappaja/phantom-ui@1.5.0/dist/phantom-ui.standalone.d.ts
Changed
A large internal refactor: duplication removed, the four shimmer keyframe sets folded into two, the SSR stylesheet generated from a single source, type assertions replaced with runtime narrowing. No public API change.
Three attribute types that had gone missing from custom-elements.json are restored, with a check so they cannot drift again.
Testing
99 tests with a coverage floor enforced in CI. The built bundle is also smoke tested in a real page, the six example apps are rebuilt on every pull request, and the published tarball is installed and type-checked in a throwaway project.
Thanks
@hshahi, whose report turned into the overlay fix and the standalone build, and whose earlier suggestion is why mode="overlay" exists at all.