diff --git a/plugin-designs/country-posters/index.js b/plugin-designs/country-posters/index.js index 63032263d..0c4b93504 100644 --- a/plugin-designs/country-posters/index.js +++ b/plugin-designs/country-posters/index.js @@ -42,18 +42,9 @@ const profileModules = import.meta.glob('./*.vue') // where _registry.js discovers them for every bundle, and src/colors/ holds no .js at all. The glob // matched nothing, so leaving it would be dead code that reads as a deliberate override. -// ─── Mapbox RTL text plugin — load ONCE before any map instance ────────────── -if (typeof window !== 'undefined' && window.mapboxgl?.setRTLTextPlugin) { - try { - window.mapboxgl.setRTLTextPlugin( - 'https://api.mapbox.com/mapbox-gl-js/plugins/mapbox-gl-rtl-text/v0.3.0/mapbox-gl-rtl-text.js', - null, - true // lazy - ) - } catch (_) { - // Plugin already set in this session — ignore. - } -} +// RTL text plugin (Arabic/Hebrew/Persian shaping): installed by useMapInstance through +// library/maps/rtl-text.js, on BOTH engines, before every map is constructed. Do not re-add a +// hand-rolled mapboxgl-only block here -- it was a strict subset of that call. /** * Each instance gets its own Pinia + i18n so multiple embeds on one page never diff --git a/plugin-designs/doxa-research-map/index.js b/plugin-designs/doxa-research-map/index.js index c3c29bdaa..5f00a59ec 100644 --- a/plugin-designs/doxa-research-map/index.js +++ b/plugin-designs/doxa-research-map/index.js @@ -32,18 +32,9 @@ const profileModules = import.meta.glob('./*.vue') // where _registry.js discovers them for every bundle, and src/colors/ holds no .js at all. The glob // matched nothing, so leaving it would be dead code that reads as a deliberate override. -// ─── Mapbox RTL text plugin — load ONCE before any map instance ────────────── -if (typeof window !== 'undefined' && window.mapboxgl?.setRTLTextPlugin) { - try { - window.mapboxgl.setRTLTextPlugin( - 'https://api.mapbox.com/mapbox-gl-js/plugins/mapbox-gl-rtl-text/v0.3.0/mapbox-gl-rtl-text.js', - null, - true // lazy - ) - } catch (_) { - // Already set in this session — ignore. - } -} +// RTL text plugin (Arabic/Hebrew/Persian shaping): installed by useMapInstance through +// library/maps/rtl-text.js, on BOTH engines, before every map is constructed. Do not re-add a +// hand-rolled mapboxgl-only block here -- it was a strict subset of that call. /** * Build a fresh defineCustomElement-wrapped class. Each instance gets its own diff --git a/plugin-designs/doxa-simple-map/index.js b/plugin-designs/doxa-simple-map/index.js index b1c223d18..b59c906aa 100644 --- a/plugin-designs/doxa-simple-map/index.js +++ b/plugin-designs/doxa-simple-map/index.js @@ -48,20 +48,9 @@ const profileModules = import.meta.glob('./*.vue') // No-op today: doxa-simple-map ships no local strategies (empty glob). registerStrategies(import.meta.glob('./src/colors/*.js', { eager: true })) -// ─── Mapbox RTL text plugin — load ONCE before any map instance ────────────── -// Required for proper rendering of Arabic text on the basemap. -// Lazy = plugin loads only when RTL text is first encountered. -if (typeof window !== 'undefined' && window.mapboxgl?.setRTLTextPlugin) { - try { - window.mapboxgl.setRTLTextPlugin( - 'https://api.mapbox.com/mapbox-gl-js/plugins/mapbox-gl-rtl-text/v0.3.0/mapbox-gl-rtl-text.js', - null, - true // lazy - ) - } catch (_) { - // Plugin already set in this session — ignore. - } -} +// RTL text plugin (Arabic/Hebrew/Persian shaping): installed by useMapInstance through +// library/maps/rtl-text.js, on BOTH engines, before every map is constructed. Do not re-add a +// hand-rolled mapboxgl-only block here -- it was a strict subset of that call. /** * Build a fresh defineCustomElement-wrapped class. diff --git a/plugin-designs/my-upg-100-list/index.js b/plugin-designs/my-upg-100-list/index.js index ffd584a83..c9837a145 100644 --- a/plugin-designs/my-upg-100-list/index.js +++ b/plugin-designs/my-upg-100-list/index.js @@ -38,20 +38,9 @@ import { createAppI18n } from '@map/i18n/index.js' // app.provide('profileModules', ...) below. const profileModules = import.meta.glob('./*.vue') -// ─── Mapbox RTL text plugin — load ONCE before any map instance ────────────── -// Required for proper rendering of Arabic text on the basemap. -// Lazy = plugin loads only when RTL text is first encountered. -if (typeof window !== 'undefined' && window.mapboxgl?.setRTLTextPlugin) { - try { - window.mapboxgl.setRTLTextPlugin( - 'https://api.mapbox.com/mapbox-gl-js/plugins/mapbox-gl-rtl-text/v0.3.0/mapbox-gl-rtl-text.js', - null, - true // lazy - ) - } catch (_) { - // Plugin already set in this session — ignore. - } -} +// RTL text plugin (Arabic/Hebrew/Persian shaping): installed by useMapInstance through +// library/maps/rtl-text.js, on BOTH engines, before every map is constructed. Do not re-add a +// hand-rolled mapboxgl-only block here -- it was a strict subset of that call. /** * Build the defineCustomElement-wrapped class for this bundle. diff --git a/plugin-designs/pplr-data-maps/index.js b/plugin-designs/pplr-data-maps/index.js index 5b522efd7..7440c834c 100644 --- a/plugin-designs/pplr-data-maps/index.js +++ b/plugin-designs/pplr-data-maps/index.js @@ -12,14 +12,9 @@ import { createAppI18n } from '@map/i18n/index.js' const profileModules = import.meta.glob('./*.vue') -if (typeof window !== 'undefined' && window.mapboxgl?.setRTLTextPlugin) { - try { - window.mapboxgl.setRTLTextPlugin( - 'https://api.mapbox.com/mapbox-gl-js/plugins/mapbox-gl-rtl-text/v0.3.0/mapbox-gl-rtl-text.js', - null, true - ) - } catch (_) { /* already set this session */ } -} +// RTL text plugin (Arabic/Hebrew/Persian shaping): installed by useMapInstance through +// library/maps/rtl-text.js, on BOTH engines, before every map is constructed. Do not re-add a +// hand-rolled mapboxgl-only block here -- it was a strict subset of that call. const El = defineCustomElement(ProfileLoader, { configureApp(app) { diff --git a/plugin-designs/upg-neighbor/index.js b/plugin-designs/upg-neighbor/index.js index 675e45907..8d16a84f5 100644 --- a/plugin-designs/upg-neighbor/index.js +++ b/plugin-designs/upg-neighbor/index.js @@ -14,14 +14,9 @@ import { createAppI18n } from '@map/i18n/index.js' const profileModules = import.meta.glob('./*.vue') -if (typeof window !== 'undefined' && window.mapboxgl?.setRTLTextPlugin) { - try { - window.mapboxgl.setRTLTextPlugin( - 'https://api.mapbox.com/mapbox-gl-js/plugins/mapbox-gl-rtl-text/v0.3.0/mapbox-gl-rtl-text.js', - null, true - ) - } catch (_) { /* already set this session */ } -} +// RTL text plugin (Arabic/Hebrew/Persian shaping): installed by useMapInstance through +// library/maps/rtl-text.js, on BOTH engines, before every map is constructed. Do not re-add a +// hand-rolled mapboxgl-only block here -- it was a strict subset of that call. const El = defineCustomElement(ProfileLoader, { configureApp(app) {