From 4c45d76c684bd09fb6a59df371554b56badb0ac3 Mon Sep 17 00:00:00 2001 From: Doxa Maps Date: Sat, 26 Sep 2026 02:01:27 +0000 Subject: [PATCH] PPLR data maps: d3 is pinned, integrity-checked and kept off the host page's window The critic fact-check (CRITIC-9 / CRITIC-5): the ROP Sunburst loaded d3@7 (a floating range, no SRI) as window.d3, overwriting a host's own d3, or running on whatever d3 the host already had. ensureD3() now loads d3@7.9.0 exactly with integrity + crossorigin, keeps it in the module (pplrD3()) and puts the host's window.d3 back (or leaves none). SemanticSunburst reads pplrD3(), and if a caller forgot to await ensureD3 it loads it and builds instead of asking for a refresh. Headless proof: the stubbed-DOM loader test, 6/6 (host d3 restored, none leaked, exact version + integrity + crossorigin, a failure rejects). BUNDLE=pplr-data-maps builds. Plugin-only. needs eyes: PPLR > ROP Sunburst draws; on a host page with its own window.d3 it is untouched. --- .../src/components/SemanticSunburst.vue | 8 +++--- .../pplr-data-maps/src/utils/pplrData.js | 27 ++++++++++++++++--- 2 files changed, 28 insertions(+), 7 deletions(-) diff --git a/plugin-designs/pplr-data-maps/src/components/SemanticSunburst.vue b/plugin-designs/pplr-data-maps/src/components/SemanticSunburst.vue index fb7947006..0c43a3a1e 100644 --- a/plugin-designs/pplr-data-maps/src/components/SemanticSunburst.vue +++ b/plugin-designs/pplr-data-maps/src/components/SemanticSunburst.vue @@ -11,7 +11,7 @@ * at least `LABEL_MIN_RADIANS` of arc, and font scales up at higher zoom * (label visibility re-evaluated on each zoom event). * - * D3 is loaded from CDN globally — see index.html `