towerops/lib/towerops_web/components
Graham McIntire e97748437c build(assets): split coverage hooks into a lazy-loaded chunk
Switch esbuild to ESM with --splitting and load app.js as type=module.
Heavy hooks now ship in their own chunk and only download when their
LiveView mounts.

- assets/js/lib/leaflet.ts: extract ensureLeaflet (vendored Leaflet
  loader) into a shared module with a typed window.L declaration.
- assets/js/hooks/coverage_hooks.ts: extract CoverageMap,
  MultiCoverageMap, and CoverageLocationPicker (~510 lines) with
  proper interface types for hook context and tightened typing on
  payloads / event handlers (CoveragePayload is now a real type).
- app.ts: replace those three inline hook bodies with lazyHook
  stubs that call import('./hooks/coverage_hooks') on first mount,
  forwarding lifecycle hooks once the chunk resolves. Also adds a
  scoped `declare const L: any` so the remaining Leaflet hooks
  type-check.
- root.html.heex: switch the script tag to type=module so the
  emitted ESM bundle can use dynamic import().
- esbuild config: add --splitting --format=esm.

Build output now produces:
  app.js                      1.2 MB
  coverage_hooks-<hash>.js   16  KB  (lazy)
  chunk-<hash>.js             2.4 KB  (shared, lazy)
2026-05-06 16:11:32 -05:00
..
layouts build(assets): split coverage hooks into a lazy-loaded chunk 2026-05-06 16:11:32 -05:00
breadcrumbs.ex feat: add global CSS polish — transitions, hover effects, scrollbar styling, status pulse 2026-02-13 19:17:38 -06:00
consent_prompt.ex Prevent Oban polling/monitoring job stacking per device 2026-02-16 16:37:48 -06:00
cookie_consent.ex mib update from librenms 2026-01-28 13:38:31 -06:00
core_components.ex ux: improve mobile responsiveness across all pages 2026-03-12 16:49:59 -05:00
layouts.ex feat: add /coverage RF prediction feature scaffold 2026-05-06 13:44:14 -05:00
marketing_layouts.ex fix: add dark mode support to marketing site 2026-03-04 13:57:12 -06:00
skeletons.ex ui: polish auth pages, core components, and visual consistency 2026-02-14 21:11:33 -06:00