@fest-lib/icon 0.1.9 → 0.1.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/README.md +27 -1
  2. package/dist/icon.js +727 -561
  3. package/package.json +2 -2
package/README.md CHANGED
@@ -1,3 +1,29 @@
1
1
  # Icon.TS
2
2
 
3
- Dedicated Icon loader for other components (just for reduce CDN offloads)
3
+ `@fest-lib/icon` Phosphor `ui-icon` web component plus OPFS / CSS-registry caches so apps do not hit a CDN per glyph.
4
+
5
+ Default export is `UIPhosphorIcon`. Also exposes cache stats, prefetch, and stylesheet rule registration.
6
+
7
+ ## Install
8
+
9
+ ```bash
10
+ npm install @fest-lib/icon
11
+ ```
12
+
13
+ ```ts
14
+ import UIPhosphorIcon, { prefetchIcon, getIconCacheStats } from "@fest-lib/icon";
15
+
16
+ customElements.define("ui-icon", UIPhosphorIcon);
17
+ await prefetchIcon("house");
18
+ ```
19
+
20
+ ## Layout
21
+
22
+ | Path | Role |
23
+ | --- | --- |
24
+ | `src/loader/Phosphor.ts` | `<ui-icon>` element |
25
+ | `src/loader/OPFSCache.ts` | OPFS glyph cache |
26
+ | `src/loader/Loader.ts` | in-memory load / invalidate |
27
+ | `src/loader/CSSIconRegistry.ts` | CSS rule registry |
28
+
29
+ Peers: `@fest-lib/core`, `dom`, `object`, `uniform`. Runtime also uses LUR.E. Build: `npm run build`. Publish: `npm run publish`.