Skip to content

Commit af5dc4a

Browse files
beetlebugorgclaude
andcommitted
refactor(web): reorganize into plugins/ (core plugins) + core/ (platform)
These modules aren't "map overlays vs UI panels" — they're all PLUGINS to the chart-plotter host, built against the same contracts external plugins will use (the canvas overlay API, the settings-registry contribution, the notification bus, events). "Core" just means bundled. So the layout now says that: - web/src/components/ + web/src/map/ → web/src/plugins/ (all core plugins) - web/src/app/ → web/src/core/ (platform services the plugins plug INTO: notification-center, settings-registry/-store, core-settings) Pure file moves + import-path updates (only the two shell files imported these; everything inside imports same-dir or ../lib|../data, depth unchanged). Verified: build OK; charts/settings/dev-tools/finder + the notify/registry/store services all work end-to-end; 0 console errors. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 268b3b2 commit af5dc4a

18 files changed

Lines changed: 13 additions & 13 deletions

web/src/chartplotter.mjs

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -17,23 +17,23 @@
1717
// listCharts/setScheme/setMariner and its `map` handle) plus the shared ChartStore.
1818

1919
import "./chart-canvas/chart-canvas.mjs"; // defines <chart-canvas> (the renderer we wrap)
20-
import "./components/pick-report.mjs"; // defines <pick-report> (the ECDIS cursor-pick panel)
21-
import "./components/chart-library.mjs"; // defines <chart-library> (the "Charts library" domain)
22-
import "./components/settings-dialog.mjs"; // defines <settings-dialog> (the settings panel host)
23-
import { SettingsRegistry } from "./app/settings-registry.mjs"; // contribution registry for the settings panel
24-
import { coreSettingsContributions } from "./app/core-settings.mjs"; // the app's own display settings as contributions
25-
import { DevTools } from "./components/dev-tools.mjs"; // the slim contributed Advanced-tab dev tools (rebake + feature inspector)
26-
import { DISTRICTS, NOAA_ENC_URL } from "./components/chart-library.mjs"; // NOAA CG-district packs + ENC page (shared)
20+
import "./plugins/pick-report.mjs"; // defines <pick-report> (the ECDIS cursor-pick panel)
21+
import "./plugins/chart-library.mjs"; // defines <chart-library> (the "Charts library" domain)
22+
import "./plugins/settings-dialog.mjs"; // defines <settings-dialog> (the settings panel host)
23+
import { SettingsRegistry } from "./core/settings-registry.mjs"; // contribution registry for the settings panel
24+
import { coreSettingsContributions } from "./core/core-settings.mjs"; // the app's own display settings as contributions
25+
import { DevTools } from "./plugins/dev-tools.mjs"; // the slim contributed Advanced-tab dev tools (rebake + feature inspector)
26+
import { DISTRICTS, NOAA_ENC_URL } from "./plugins/chart-library.mjs"; // NOAA CG-district packs + ENC page (shared)
2727
import { ChartDownloader } from "./data/chart-downloader.mjs"; // chart discovery + acquisition
28-
import { NotificationCenter } from "./app/notification-center.mjs"; // app-level task-progress + banner bus
28+
import { NotificationCenter } from "./core/notification-center.mjs"; // app-level task-progress + banner bus
2929
import { ChartService } from "./data/chart-service.mjs"; // server import/bake jobs + pack registry
3030
import { AuxStore } from "./data/aux-store.mjs"; // TXTDSC/PICREP external files (companion aux zip)
3131
import { ChartStore } from "./data/chart-store.mjs";
3232
import { UNIT_DEFAULTS } from "./lib/units.mjs"; // configurable display units (categories now in core-settings.mjs)
33-
import { ChartFinder } from "./map/chart-finder.mjs"; // off-screen installed-chart edge pointers
34-
import { HudController } from "./map/hud.mjs"; // status readout + overscale zoom cap
35-
import { CoverageBoxes } from "./map/coverage-boxes.mjs"; // installed-chart coverage overlay
36-
import { SearchBox } from "./map/search-box.mjs"; // offline catalog + chart-feature search
33+
import { ChartFinder } from "./plugins/chart-finder.mjs"; // off-screen installed-chart edge pointers
34+
import { HudController } from "./plugins/hud.mjs"; // status readout + overscale zoom cap
35+
import { CoverageBoxes } from "./plugins/coverage-boxes.mjs"; // installed-chart coverage overlay
36+
import { SearchBox } from "./plugins/search-box.mjs"; // offline catalog + chart-feature search
3737
import { BANDS, BAND_LABEL, BAND_COLOR, BAND_MINZOOM, DEV_BANDS, bandForScale } from "./lib/bands.mjs";
3838
import { loadJSON, maxZoomForScaleFloor, freshness, fmtIssue, fmtMB, isShareUrl, parseViewHash, copyText, flashBtn } from "./lib/util.mjs";
3939
import { archivePut, archiveGet } from "./data/archive-store.mjs";

web/src/chartplotter.view.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
//
1010
// Convention reference: chart-library.mjs / chart-library.view.mjs.
1111

12-
import { NOAA_ENC_URL } from "./components/chart-library.mjs"; // NOAA ENC page (static attribution link)
12+
import { NOAA_ENC_URL } from "./plugins/chart-library.mjs"; // NOAA ENC page (static attribution link)
1313

1414
export const STYLE = `
1515
:host { display:block; position:relative; width:100%; height:100%; font:13px/1.4 system-ui,sans-serif;

0 commit comments

Comments
 (0)