@fest-lib/icon
Phosphor <ui-icon> with OPFS + CSS-registry caches — no CDN hit per glyph after warm.
Default export is UIPhosphorIcon. Glyphs come from @phosphor-icons/core (bundled dependency). First paint can prefetch; later loads read OPFS / the CSS registry.
core · dom · object · lure · uniform
└── fest/icon ← you are here
└── fl-ui · Speed Dial · App Menu
npm install @fest-lib/core @fest-lib/dom @fest-lib/object @fest-lib/uniform @fest-lib/lure @fest-lib/iconPeers: core, dom, object, uniform. Runtime also uses LUR.E (listed as a dependency).
import UIPhosphorIcon, { prefetchIcon, getIconCacheStats } from "@fest-lib/icon";
if (!customElements.get("ui-icon")) {
customElements.define("ui-icon", UIPhosphorIcon);
}
await prefetchIcon("house");
console.log(getIconCacheStats());<ui-icon icon="house" icon-style="duotone"></ui-icon>| Export | Role |
|---|---|
UIPhosphorIcon (default) |
custom element |
prefetchIcon / invalidateIconCache / clearIconCaches |
memory loader |
initOPFSCache / clearIconCache / getIconCacheStats |
OPFS |
registerIconRule / preregisterIcons / getRegistryStats |
CSS registry |
isOPFSSupported |
feature detect |
| Path | Role |
|---|---|
src/loader/Phosphor.ts |
<ui-icon> |
src/loader/OPFSCache.ts |
OPFS |
src/loader/Loader.ts |
in-memory load |
src/loader/CSSIconRegistry.ts |
stylesheet rules |
cd modules/projects/icon.ts
npm run generate:phosphor-map
npm run dev
npm run build
npm run publishLicense: MIT.