- cmms-bridge.js: wipeProjectData() clears the project object stores (devices,
boards, components, images, overlappedImages, nets, schemas, schemaComponents
— not the KiCad symbol library) and resets studio.js's shared globals before
the CMMS attachment ZIP is imported. The ZIP is the single source of truth for
a CMMS board, so restoreDevice()'s merge path (which only de-dupes on a newer
meta.lastModified, absent on CMMS-created boards) no longer accretes duplicate
image/net rows across repeated opens. init() also stamps data-theme=light as
well as =dark. All gated on PCBRETRACE_CONFIG — standalone untouched.
- schema.html: inline head script mirrors ?theme=light|dark (passed by studio.js
on the iframe src) onto <html> and, for light, injects cmms-schema-light.css.
Full no-op with no ?theme=.
- cmms-schema-light.css (new): [data-theme="light"]-gated override of
schema.html's :root palette for the CMMS light theme. Canvas stays dark.
- studio.js: append ?theme=<active> to the schema.html iframe src.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Upstream loads zip.js, OpenCV.js, WireBender (JS+WASM) and Google Fonts
from CDNs at runtime, and includes a Google Tag / gtag.js snippet. The
CMMS deployment forbids external requests. Changes:
- docs/vendor/ — local copies of opencv.js (Apache-2.0), zip.min.js
(BSD-3-Clause), WireBender.{js,wasm} (AGPL-3.0/commercial, source at
github.com/dev-lab/WireBender), and the three Google fonts (OFL, latin
subset). SOURCE.txt records provenance.
- studio.html / schema.html — zip.js + opencv.js + fonts @import point at
docs/vendor/.
- inspect-traces.js / schema/layout.js — WireBender import() + locateFile
point at docs/vendor/wirebender/.
- every *.html — Google Tag / gtag.js snippet removed.
No behaviour change; kicad-symbols zip was already bundled + local.
CMMS embedding hooks (window.PCBRETRACE_CONFIG, save-back, AI bridge)
land in a later commit.