11 Commits

Author SHA1 Message Date
Daniel Pupius
5242622107 Fix __publicField error with esnext esbuild target
maplibre-gl v5 bundles reference __publicField and other esbuild
class-field helpers without defining them — a known upstream bug
(maplibre-gl-js issue #6680). Setting esbuildOptions.target and
build.target to 'esnext' tells esbuild to emit native class fields
instead of helper-based transforms, eliminating the missing symbol.

Remove all previous workaround attempts (define rewrite, globalThis
polyfill in index.html).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-16 00:04:23 +00:00
Daniel Pupius
38798de9ca Fix __publicField with vite define + globalThis polyfill
The previous index.html polyfill set window.__publicField but Vite's
dep optimizer pre-bundles in Node.js where that global is never set,
so the error persisted.

Two-part fix:
- vite.config.ts define: rewrite bare __publicField identifiers to
  globalThis.__publicField (a valid entity name esbuild accepts)
- index.html: set globalThis.__publicField using the exact
  Object.defineProperty signature esbuild expects, before modules run

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-15 23:57:28 +00:00
Daniel Pupius
bd09beff40 Fix __publicField polyfill via index.html instead of vite define
esbuild's define only accepts literals/identifiers, not arrow functions.
Inject the polyfill as a plain script tag before the module entry point
so it is available when any pre-compiled dependency uses it.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-15 23:33:35 +00:00
Daniel Pupius
d95a74c1d7 refactor(web): replace Google Maps with MapLibre, clean up map components
- Migrate all three map components (Map, GoogleMap, NetworkMap) to MapLibre GL JS
- Extract shared CARTO_DARK_STYLE constants into lib/mapStyle.ts
- Move buildCircleCoords to lib/mapUtils.ts (was duplicated across components)
- Rename exports: Map → LocationMap, GoogleMap → NodeLocationMap
- Remove dead props (width, height, nightMode) from LocationMap interface
- Lazy-mount GL contexts via IntersectionObserver to prevent WebGL exhaustion
- Fix Math.spread RangeError in NetworkMap bounds calculation
- Remove showLinks conditional render in favour of visibility layout property
- Remove cursor state; set canvas cursor style directly on map interactions
- Remove Google Maps API key env vars from .env.example and .env.local
- Move Vite dev server to port 5747 (avoids cached redirect on 3000)
- Fix CORS/404: set VITE_API_BASE_URL="" so browser uses Vite proxy

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-15 20:22:12 +00:00
Daniel Pupius
c029ca1f7a Fix errors relating to lazy loading of map 2025-04-30 12:14:23 -07:00
Daniel Pupius
95800b33c7 Lazy load maps 2025-04-30 10:50:46 -07:00
Daniel Pupius
4817d31d39 More cleanup to the node details page 2025-04-25 14:42:30 -07:00
Daniel Pupius
acaeeaf495 Fix map view on node details 2025-04-25 10:27:44 -07:00
Daniel Pupius
648a5c601e Further work on web design 2025-04-22 17:17:25 -07:00
Daniel Pupius
095ff560b0 Working on UI 2025-04-22 16:42:22 -07:00
Daniel Pupius
6844d575c4 Initial skeleton for web application 2025-04-22 13:26:35 -07:00