2.6 KiB
Superseded in v1.6.1: the 192×192
bi-logo-header.webpis no longer used or shipped. The default BI source is now the unchangedsrc/assets/bi-logo.webp(500×500), andoptimizeoperates on that full original through the sameprocessImagepipeline asAppHeader.Logo. SeeAPPHEADER_BI_ORIGINAL_1.6.1.mdfor deployment instructions.
UI Kit v1.6.0 — AppHeader.Bi optimization + remote JS size reduction
Base: uikit-v1.5.0-watermark-wmv3-complete.zip (all previous components retained unchanged).
API
<AppHeader.Bi optimize />
<AppHeader.Bi src="/bi-logo.png" alt="BI" optimize />
<AppHeader biLogoOptimize biLogoSrc="/bi-logo.png" />
optimizeis opt-in (falseby default), just as forAppHeader.Logo.- Uses existing
processImage, actual rendered image width,q:100, WebP, resize observation, host origin for relative external sources, and original-source fallback. - The default BI logo also works with
optimize, because it is now a proper HTTP URL resolved fromimport.meta.url. - Main logo and BI logo optimization lifecycles are independent. Cleanups run on rerender and custom-element disconnect.
- Default BI logo is a 192×192 optimized WebP (
bi-logo-header.webp) while the original 500×500 source remains intact.
Before/after payload (uncompressed bytes; before shipping gzip/brotli)
dist/remote/AppHeader.jspreviously: 96,897 B (94.6 KiB).- Embedded default logo: 86,048 Base64 characters / 64,536 original WebP bytes.
dist/remote/AppHeader.jsnow: 11,809 B (11.5 KiB).- Separate
dist/remote/bi-logo-header.webp: 13,118 B (12.8 KiB); fetched only when BI logo is shown.
Deployment — required
Upload both files from this ZIP to the same Remote server directory:
AppHeader.js
bi-logo-header.webp
For the source build with vite build --mode remote, Vite rewrites static
new URL("./bi-logo-header.webp", import.meta.url) to an emitted asset URL.
Deploy its emitted remote/assets/...webp together with the new JS instead.
Remote JS and the image asset must be served over HTTP(S). Old deployments
that only replace AppHeader.js but do not provide its referenced asset
will display a broken default BI logo.
For the new optimize prop to reach remote JS, the destination project
needs the v1.6.0 React wrapper (or newer); upgrading remote JS alone is not enough.
Existing destinations not passing the new prop retain unoptimized behavior.
Tested: JS syntax, wrapper prop propagation, default asset packaging, optimization fallback, resize + cleanup, headless browser tests if available.