From 2f458033b6caeb2b10c3b6d0dde2e46c87ae7182 Mon Sep 17 00:00:00 2001 From: doxa-maps Date: Wed, 16 Sep 2026 02:53:38 +0000 Subject: [PATCH] MapLibre pages: token-free embeds, no Mapbox peer, no token gate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit A profile/instance whose config says provider:'maplibre' now generates a page that loads the MapLibre peer (jsdelivr, same versions as useMapInstance) and mounts IMMEDIATELY — the token ladder is skipped entirely. Mapbox pages are unchanged. demo-map (the example vibe coders copy) is now provider-aware via resolveMapProvider, and ships a 'maplibre' instance as the living token-free demo. embed-smoke covers instance pages; verified 2/2 with live canvases — including the maplibre one with NO token anywhere. --- app-profiles/demo-map/demo-map.instances.json | 7 + app-profiles/demo-map/demo-map.vue | 4 + internal/embed-smoke.mjs | 5 + internal/generate-tree.mjs | 35 +++-- .../connectivity-list/index.html | 7 +- .../connectivity-map/index.html | 7 +- .../cities-internet/data-tables/index.html | 7 +- .../country-posters/countries-map/index.html | 7 +- .../country-poster-wall/index.html | 7 +- public/doxa-maps/demo-map/demo-map.js | 38 +++--- public/doxa-maps/demo-map/demo-map/index.html | 9 +- .../demo-map/demo-map/maplibre/index.html | 124 ++++++++++++++++++ public/doxa-maps/demo-map/index.html | 2 +- .../doxa-research-map/research-map/index.html | 7 +- .../doxa-simple-map/adoption/index.html | 7 +- .../doxa-simple-map/engagement/index.html | 7 +- .../doxa-simple-map/index.html | 7 +- .../doxa-simple-map/prayer/index.html | 7 +- .../gospel-resources/charts/index.html | 7 +- .../gospel-resources/data-tables/index.html | 7 +- .../resources-list/index.html | 7 +- .../gospel-resources/resources-map/index.html | 7 +- public/doxa-maps/index.html | 2 +- public/doxa-maps/manifest.json | 21 ++- .../my-upg-100-list/poster-wall/index.html | 7 +- .../my-upg-100-list/upg-100-list/index.html | 7 +- .../research-dashboard/index.html | 7 +- .../template-bundle/template-map-a/index.html | 7 +- .../template-bundle/template-map-b/index.html | 7 +- 29 files changed, 306 insertions(+), 74 deletions(-) create mode 100644 app-profiles/demo-map/demo-map.instances.json create mode 100644 public/doxa-maps/demo-map/demo-map/maplibre/index.html diff --git a/app-profiles/demo-map/demo-map.instances.json b/app-profiles/demo-map/demo-map.instances.json new file mode 100644 index 000000000..4d57e86e9 --- /dev/null +++ b/app-profiles/demo-map/demo-map.instances.json @@ -0,0 +1,7 @@ +{ + "_comment": "Preconfigured instances of the demo profile. 'maplibre' is the token-free engine demo: provider:'maplibre' makes the generated page load MapLibre instead of Mapbox and skip the token ladder entirely (no account, no key — embeds anywhere).", + "instances": [ + { "id": "maplibre", "title": "Demo map — MapLibre (token-free)", + "props": { "profile": "demo-map", "provider": "maplibre", "instanceId": "demo-maplibre" } } + ] +} diff --git a/app-profiles/demo-map/demo-map.vue b/app-profiles/demo-map/demo-map.vue index ee15f4f29..bd3b38b89 100644 --- a/app-profiles/demo-map/demo-map.vue +++ b/app-profiles/demo-map/demo-map.vue @@ -23,6 +23,7 @@ import { inject, provide, ref, computed, onMounted, onBeforeUnmount } from 'vue' import { useMapInstance } from '@map/composables/useMapInstance.js' +import { resolveMapProvider } from '@map/composables/useMapProvider.js' import { useMapData } from '@map/composables/useMapData.js' import { useMapLayers } from '@map/composables/useMapLayers.js' import { useShadowStyles } from '@map/composables/useShadowStyles.js' @@ -132,6 +133,9 @@ const dsm = new DataSourceManager() const { map, initializeMap, destroy } = useMapInstance({ containerRef: mapContainer, accessToken: mapboxToken.value, + // Engine per profile-config.provider ('mapbox' default | 'maplibre' token-free). + // Under maplibre, useMapInstance swaps this mapbox:// style for its free basemap. + provider: resolveMapProvider(profileConfig), style: 'mapbox://styles/mapbox/light-v11', center: [20, 10], zoom: 1.8, diff --git a/internal/embed-smoke.mjs b/internal/embed-smoke.mjs index 68d4275c4..36e0246b3 100644 --- a/internal/embed-smoke.mjs +++ b/internal/embed-smoke.mjs @@ -52,6 +52,11 @@ for (const b of manifest.bundles) for (const p of b.profiles) { // iframeUrl is ./-relative to the tree root const url = p.iframeUrl.replace(/^\.\//, '/doxa-maps/') targets.push({ bundle: b.bundle, profile: p.profile, element: p.element, url }) + // Preconfigured instances are embeddable pages too — verify them the same way. + for (const inst of (p.instances || [])) { + targets.push({ bundle: b.bundle, profile: `${p.profile}/${inst.id}`, element: inst.element || p.element, + url: inst.iframeUrl.replace(/^\.\//, '/doxa-maps/') }) + } } const list = GREP ? targets.filter(t => (t.bundle + '/' + t.profile).includes(GREP)) : targets diff --git a/internal/generate-tree.mjs b/internal/generate-tree.mjs index 0e1859ed4..04cc4f6e1 100644 --- a/internal/generate-tree.mjs +++ b/internal/generate-tree.mjs @@ -373,6 +373,24 @@ function mapPageHtml(opts) { : '' // Bake the QA corner widget onto the go-base embed surface (opt-out via build-config qaWidget:false). const pageConfig = DEST_CONFIG.qaWidget ? { ...config, qa: true } : config + // PROVIDER-AWARE PAGE (see library/composables/useMapProvider.js): a profile or + // instance whose config says provider:'maplibre' gets the MapLibre peer (token- + // free, no Mapbox account) and SKIPS the token ladder entirely — the map mounts + // immediately. Default stays Mapbox, byte-for-byte unchanged. + const isMapLibre = !!(config && config.provider === 'maplibre') + const peerBlock = isMapLibre + ? ` + + + ` + : ` + + + + + ` return ` @@ -380,13 +398,7 @@ function mapPageHtml(opts) { ${esc(title)} - - - - - - + ${peerBlock} + + +
+
loading map…
+ + + + + + + + diff --git a/public/doxa-maps/demo-map/index.html b/public/doxa-maps/demo-map/index.html index 04abbbf01..18d47c509 100644 --- a/public/doxa-maps/demo-map/index.html +++ b/public/doxa-maps/demo-map/index.html @@ -130,7 +130,7 @@ header.top .sub { margin-top: 3px; font: 12px/1.4 var(--sans); color: var(--mut) + window.FORGE.manifest = {"schema":"doxa-maps-manifest@1","generatedFrom":"app-profiles/*/*.vue","embedBase":".","bundleCount":9,"profileCount":17,"bundles":[{"bundle":"demo-map","scriptUrl":"./demo-map/demo-map.js","output":"doxa-maps/demo-map/demo-map.js","integrity":"sha384-B+SyViDxVGRi34FHMkYac/xvZ43ATdtjC581+MYPyim2Z8wk+6uAWj7DNt6GA+C2","elements":["demo-map"],"profiles":[{"profile":"demo-map","file":"demo-map.vue","description":"Simple two-tab demo map. Tab 1 colors pins by religion (shared","element":"demo-map","iframeUrl":"./demo-map/demo-map/index.html","scriptUrl":"./demo-map/demo-map.js","embed":{"iframe":"\u003ciframe src=\"./demo-map/demo-map/index.html\" width=\"100%\" height=\"600\" style=\"border:none;border-radius:12px;\" allowfullscreen>\u003c/iframe>","script":"\u003cscript src=\"./demo-map/demo-map.js\" integrity=\"sha384-B+SyViDxVGRi34FHMkYac/xvZ43ATdtjC581+MYPyim2Z8wk+6uAWj7DNt6GA+C2\" crossorigin=\"anonymous\">\u003c/script>\n\u003cdemo-map profile-config='{\"profile\":\"demo-map\",\"tk\":\"YOUR_MAPBOX_TOKEN\"}'>\u003c/demo-map>"},"instances":[{"id":"maplibre","title":"Demo map — MapLibre (token-free)","apiBaseUrl":"","props":{"profile":"demo-map","provider":"maplibre","instanceId":"demo-maplibre"},"element":"demo-map","iframeUrl":"./demo-map/demo-map/maplibre/index.html","embed":{"iframe":"\u003ciframe src=\"./demo-map/demo-map/maplibre/index.html\" width=\"100%\" height=\"600\" style=\"border:none;border-radius:12px;\" allowfullscreen>\u003c/iframe>"}}],"bundle":"demo-map"}]}]}; + window.FORGE.manifest = {"schema":"doxa-maps-manifest@1","generatedFrom":"app-profiles/*/*.vue","embedBase":".","bundleCount":9,"profileCount":17,"bundles":[{"bundle":"cities-internet","scriptUrl":"./cities-internet/cities-internet.js","output":"doxa-maps/cities-internet/cities-internet.js","integrity":"sha384-rJEeD6vD8BPEh2Ab2sprUPjIYzkledq5jMjNzpVXJNDlnDzX8ejRbACR4xRQaxAg","elements":["cities-internet-map"],"profiles":[{"profile":"connectivity-list","file":"connectivity-list.vue","description":"","element":"cities-internet-map","iframeUrl":"./cities-internet/connectivity-list/index.html","scriptUrl":"./cities-internet/cities-internet.js","embed":{"iframe":"\u003ciframe src=\"./cities-internet/connectivity-list/index.html\" width=\"100%\" height=\"600\" style=\"border:none;border-radius:12px;\" allowfullscreen>\u003c/iframe>","script":"\u003cscript src=\"./cities-internet/cities-internet.js\" integrity=\"sha384-rJEeD6vD8BPEh2Ab2sprUPjIYzkledq5jMjNzpVXJNDlnDzX8ejRbACR4xRQaxAg\" crossorigin=\"anonymous\">\u003c/script>\n\u003ccities-internet-map profile-config='{\"profile\":\"connectivity-list\",\"tk\":\"YOUR_MAPBOX_TOKEN\"}'>\u003c/cities-internet-map>"}},{"profile":"connectivity-map","file":"connectivity-map.vue","description":"","element":"cities-internet-map","iframeUrl":"./cities-internet/connectivity-map/index.html","scriptUrl":"./cities-internet/cities-internet.js","embed":{"iframe":"\u003ciframe src=\"./cities-internet/connectivity-map/index.html\" width=\"100%\" height=\"600\" style=\"border:none;border-radius:12px;\" allowfullscreen>\u003c/iframe>","script":"\u003cscript src=\"./cities-internet/cities-internet.js\" integrity=\"sha384-rJEeD6vD8BPEh2Ab2sprUPjIYzkledq5jMjNzpVXJNDlnDzX8ejRbACR4xRQaxAg\" crossorigin=\"anonymous\">\u003c/script>\n\u003ccities-internet-map profile-config='{\"profile\":\"connectivity-map\",\"tk\":\"YOUR_MAPBOX_TOKEN\"}'>\u003c/cities-internet-map>"}},{"profile":"data-tables","file":"data-tables.vue","description":"","element":"cities-internet-map","iframeUrl":"./cities-internet/data-tables/index.html","scriptUrl":"./cities-internet/cities-internet.js","embed":{"iframe":"\u003ciframe src=\"./cities-internet/data-tables/index.html\" width=\"100%\" height=\"600\" style=\"border:none;border-radius:12px;\" allowfullscreen>\u003c/iframe>","script":"\u003cscript src=\"./cities-internet/cities-internet.js\" integrity=\"sha384-rJEeD6vD8BPEh2Ab2sprUPjIYzkledq5jMjNzpVXJNDlnDzX8ejRbACR4xRQaxAg\" crossorigin=\"anonymous\">\u003c/script>\n\u003ccities-internet-map profile-config='{\"profile\":\"data-tables\",\"tk\":\"YOUR_MAPBOX_TOKEN\"}'>\u003c/cities-internet-map>"}}]},{"bundle":"country-posters","scriptUrl":"./country-posters/country-posters.js","output":"doxa-maps/country-posters/country-posters.js","integrity":"sha384-FBtv267lu0P9eg9CMAttrXz1NOkbktgrwvUDjBJvRIEkpqxHCy1UD7ceJeIfAvjX","elements":["country-posters-map"],"profiles":[{"profile":"countries-map","file":"countries-map.vue","description":"","element":"country-posters-map","iframeUrl":"./country-posters/countries-map/index.html","scriptUrl":"./country-posters/country-posters.js","embed":{"iframe":"\u003ciframe src=\"./country-posters/countries-map/index.html\" width=\"100%\" height=\"600\" style=\"border:none;border-radius:12px;\" allowfullscreen>\u003c/iframe>","script":"\u003cscript src=\"./country-posters/country-posters.js\" integrity=\"sha384-FBtv267lu0P9eg9CMAttrXz1NOkbktgrwvUDjBJvRIEkpqxHCy1UD7ceJeIfAvjX\" crossorigin=\"anonymous\">\u003c/script>\n\u003ccountry-posters-map profile-config='{\"profile\":\"countries-map\",\"tk\":\"YOUR_MAPBOX_TOKEN\"}'>\u003c/country-posters-map>"}},{"profile":"country-poster-wall","file":"country-poster-wall.vue","description":"","element":"country-posters-map","iframeUrl":"./country-posters/country-poster-wall/index.html","scriptUrl":"./country-posters/country-posters.js","embed":{"iframe":"\u003ciframe src=\"./country-posters/country-poster-wall/index.html\" width=\"100%\" height=\"600\" style=\"border:none;border-radius:12px;\" allowfullscreen>\u003c/iframe>","script":"\u003cscript src=\"./country-posters/country-posters.js\" integrity=\"sha384-FBtv267lu0P9eg9CMAttrXz1NOkbktgrwvUDjBJvRIEkpqxHCy1UD7ceJeIfAvjX\" crossorigin=\"anonymous\">\u003c/script>\n\u003ccountry-posters-map profile-config='{\"profile\":\"country-poster-wall\",\"tk\":\"YOUR_MAPBOX_TOKEN\"}'>\u003c/country-posters-map>"}}]},{"bundle":"demo-map","scriptUrl":"./demo-map/demo-map.js","output":"doxa-maps/demo-map/demo-map.js","integrity":"sha384-B+SyViDxVGRi34FHMkYac/xvZ43ATdtjC581+MYPyim2Z8wk+6uAWj7DNt6GA+C2","elements":["demo-map"],"profiles":[{"profile":"demo-map","file":"demo-map.vue","description":"Simple two-tab demo map. Tab 1 colors pins by religion (shared","element":"demo-map","iframeUrl":"./demo-map/demo-map/index.html","scriptUrl":"./demo-map/demo-map.js","embed":{"iframe":"\u003ciframe src=\"./demo-map/demo-map/index.html\" width=\"100%\" height=\"600\" style=\"border:none;border-radius:12px;\" allowfullscreen>\u003c/iframe>","script":"\u003cscript src=\"./demo-map/demo-map.js\" integrity=\"sha384-B+SyViDxVGRi34FHMkYac/xvZ43ATdtjC581+MYPyim2Z8wk+6uAWj7DNt6GA+C2\" crossorigin=\"anonymous\">\u003c/script>\n\u003cdemo-map profile-config='{\"profile\":\"demo-map\",\"tk\":\"YOUR_MAPBOX_TOKEN\"}'>\u003c/demo-map>"},"instances":[{"id":"maplibre","title":"Demo map — MapLibre (token-free)","apiBaseUrl":"","props":{"profile":"demo-map","provider":"maplibre","instanceId":"demo-maplibre"},"element":"demo-map","iframeUrl":"./demo-map/demo-map/maplibre/index.html","embed":{"iframe":"\u003ciframe src=\"./demo-map/demo-map/maplibre/index.html\" width=\"100%\" height=\"600\" style=\"border:none;border-radius:12px;\" allowfullscreen>\u003c/iframe>"}}],"bundle":"demo-map"}]},{"bundle":"doxa-research-map","scriptUrl":"./doxa-research-map/doxa-research-map.js","output":"doxa-maps/doxa-research-map/doxa-research-map.js","integrity":"sha384-ucQyb81oBIScE6DAnHkfssGlIPACxSPP/BoC6mtdkuRn/XNSgyGDssUDTKtodUCL","elements":["doxa-research-map"],"profiles":[{"profile":"research-map","file":"research-map.vue","description":"","element":"doxa-research-map","iframeUrl":"./doxa-research-map/research-map/index.html","scriptUrl":"./doxa-research-map/doxa-research-map.js","embed":{"iframe":"\u003ciframe src=\"./doxa-research-map/research-map/index.html\" width=\"100%\" height=\"600\" style=\"border:none;border-radius:12px;\" allowfullscreen>\u003c/iframe>","script":"\u003cscript src=\"./doxa-research-map/doxa-research-map.js\" integrity=\"sha384-ucQyb81oBIScE6DAnHkfssGlIPACxSPP/BoC6mtdkuRn/XNSgyGDssUDTKtodUCL\" crossorigin=\"anonymous\">\u003c/script>\n\u003cdoxa-research-map profile-config='{\"profile\":\"research-map\",\"tk\":\"YOUR_MAPBOX_TOKEN\"}'>\u003c/doxa-research-map>"}}]},{"bundle":"doxa-simple-map","scriptUrl":"./doxa-simple-map/doxa-simple-map.js","output":"doxa-maps/doxa-simple-map/doxa-simple-map.js","integrity":"sha384-bhqFr7F7wpWDfWVigz0L7MH4tqQObm/W3xhcuzx82x9C64JFGpHDO8QgCRojX56a","elements":["doxa-map","doxa-simple-map"],"profiles":[{"profile":"doxa-simple-map","file":"doxa-simple-map.vue","description":"","element":"doxa-map","iframeUrl":"./doxa-simple-map/doxa-simple-map/index.html","scriptUrl":"./doxa-simple-map/doxa-simple-map.js","embed":{"iframe":"\u003ciframe src=\"./doxa-simple-map/doxa-simple-map/index.html\" width=\"100%\" height=\"600\" style=\"border:none;border-radius:12px;\" allowfullscreen>\u003c/iframe>","script":"\u003cscript src=\"./doxa-simple-map/doxa-simple-map.js\" integrity=\"sha384-bhqFr7F7wpWDfWVigz0L7MH4tqQObm/W3xhcuzx82x9C64JFGpHDO8QgCRojX56a\" crossorigin=\"anonymous\">\u003c/script>\n\u003cdoxa-map profile-config='{\"profile\":\"doxa-simple-map\",\"tk\":\"YOUR_MAPBOX_TOKEN\"}'>\u003c/doxa-map>"},"instances":[{"id":"prayer","title":"Prayer Map","apiBaseUrl":"https://pray.doxa.life","props":{"profile":"doxa-simple-map","instanceId":"embed-prayer","dataSource":"pray-tools","tabs":[{"id":"prayer","colorStrategy":"prayer","legend":"prayer","popup":"prayer"}]},"element":"doxa-map","iframeUrl":"./doxa-simple-map/doxa-simple-map/prayer/index.html","embed":{"iframe":"\u003ciframe src=\"./doxa-simple-map/doxa-simple-map/prayer/index.html\" width=\"100%\" height=\"600\" style=\"border:none;border-radius:12px;\" allowfullscreen>\u003c/iframe>"}},{"id":"engagement","title":"Engagement Map","apiBaseUrl":"https://pray.doxa.life","props":{"profile":"doxa-simple-map","instanceId":"embed-engagement","dataSource":"pray-tools","tabs":[{"id":"engagement","colorStrategy":"engagement","legend":"engagement","popup":"engagement"}]},"element":"doxa-map","iframeUrl":"./doxa-simple-map/doxa-simple-map/engagement/index.html","embed":{"iframe":"\u003ciframe src=\"./doxa-simple-map/doxa-simple-map/engagement/index.html\" width=\"100%\" height=\"600\" style=\"border:none;border-radius:12px;\" allowfullscreen>\u003c/iframe>"}},{"id":"adoption","title":"Adoption Map","apiBaseUrl":"https://pray.doxa.life","props":{"profile":"doxa-simple-map","instanceId":"embed-adoption","dataSource":"pray-tools","tabs":[{"id":"adoption","colorStrategy":"adoption","legend":"adoption","popup":"adoption"}]},"element":"doxa-map","iframeUrl":"./doxa-simple-map/doxa-simple-map/adoption/index.html","embed":{"iframe":"\u003ciframe src=\"./doxa-simple-map/doxa-simple-map/adoption/index.html\" width=\"100%\" height=\"600\" style=\"border:none;border-radius:12px;\" allowfullscreen>\u003c/iframe>"}}]}]},{"bundle":"gospel-resources","scriptUrl":"./gospel-resources/gospel-resources.js","output":"doxa-maps/gospel-resources/gospel-resources.js","integrity":"sha384-0njmRPwldwfw1NeqYab3u/cQVuoqBH67iFau1BeBrR81ouB32h8nTw7CbRktgvtx","elements":["gospel-resources-map"],"profiles":[{"profile":"charts","file":"charts.vue","description":"","element":"gospel-resources-map","iframeUrl":"./gospel-resources/charts/index.html","scriptUrl":"./gospel-resources/gospel-resources.js","embed":{"iframe":"\u003ciframe src=\"./gospel-resources/charts/index.html\" width=\"100%\" height=\"600\" style=\"border:none;border-radius:12px;\" allowfullscreen>\u003c/iframe>","script":"\u003cscript src=\"./gospel-resources/gospel-resources.js\" integrity=\"sha384-0njmRPwldwfw1NeqYab3u/cQVuoqBH67iFau1BeBrR81ouB32h8nTw7CbRktgvtx\" crossorigin=\"anonymous\">\u003c/script>\n\u003cgospel-resources-map profile-config='{\"profile\":\"charts\",\"tk\":\"YOUR_MAPBOX_TOKEN\"}'>\u003c/gospel-resources-map>"}},{"profile":"data-tables","file":"data-tables.vue","description":"","element":"gospel-resources-map","iframeUrl":"./gospel-resources/data-tables/index.html","scriptUrl":"./gospel-resources/gospel-resources.js","embed":{"iframe":"\u003ciframe src=\"./gospel-resources/data-tables/index.html\" width=\"100%\" height=\"600\" style=\"border:none;border-radius:12px;\" allowfullscreen>\u003c/iframe>","script":"\u003cscript src=\"./gospel-resources/gospel-resources.js\" integrity=\"sha384-0njmRPwldwfw1NeqYab3u/cQVuoqBH67iFau1BeBrR81ouB32h8nTw7CbRktgvtx\" crossorigin=\"anonymous\">\u003c/script>\n\u003cgospel-resources-map profile-config='{\"profile\":\"data-tables\",\"tk\":\"YOUR_MAPBOX_TOKEN\"}'>\u003c/gospel-resources-map>"}},{"profile":"resources-list","file":"resources-list.vue","description":"","element":"gospel-resources-map","iframeUrl":"./gospel-resources/resources-list/index.html","scriptUrl":"./gospel-resources/gospel-resources.js","embed":{"iframe":"\u003ciframe src=\"./gospel-resources/resources-list/index.html\" width=\"100%\" height=\"600\" style=\"border:none;border-radius:12px;\" allowfullscreen>\u003c/iframe>","script":"\u003cscript src=\"./gospel-resources/gospel-resources.js\" integrity=\"sha384-0njmRPwldwfw1NeqYab3u/cQVuoqBH67iFau1BeBrR81ouB32h8nTw7CbRktgvtx\" crossorigin=\"anonymous\">\u003c/script>\n\u003cgospel-resources-map profile-config='{\"profile\":\"resources-list\",\"tk\":\"YOUR_MAPBOX_TOKEN\"}'>\u003c/gospel-resources-map>"}},{"profile":"resources-map","file":"resources-map.vue","description":"","element":"gospel-resources-map","iframeUrl":"./gospel-resources/resources-map/index.html","scriptUrl":"./gospel-resources/gospel-resources.js","embed":{"iframe":"\u003ciframe src=\"./gospel-resources/resources-map/index.html\" width=\"100%\" height=\"600\" style=\"border:none;border-radius:12px;\" allowfullscreen>\u003c/iframe>","script":"\u003cscript src=\"./gospel-resources/gospel-resources.js\" integrity=\"sha384-0njmRPwldwfw1NeqYab3u/cQVuoqBH67iFau1BeBrR81ouB32h8nTw7CbRktgvtx\" crossorigin=\"anonymous\">\u003c/script>\n\u003cgospel-resources-map profile-config='{\"profile\":\"resources-map\",\"tk\":\"YOUR_MAPBOX_TOKEN\"}'>\u003c/gospel-resources-map>"}}]},{"bundle":"my-upg-100-list","scriptUrl":"./my-upg-100-list/my-upg-100-list.js","output":"doxa-maps/my-upg-100-list/my-upg-100-list.js","integrity":"sha384-EmL+y2EzMjdr+l2gPQNQ0WVmiSatcqpr50yMftD6vTaYYnkHyZL90vN2OIb4XXfi","elements":["my-upg-100-list-map"],"profiles":[{"profile":"poster-wall","file":"poster-wall.vue","description":"","element":"my-upg-100-list-map","iframeUrl":"./my-upg-100-list/poster-wall/index.html","scriptUrl":"./my-upg-100-list/my-upg-100-list.js","embed":{"iframe":"\u003ciframe src=\"./my-upg-100-list/poster-wall/index.html\" width=\"100%\" height=\"600\" style=\"border:none;border-radius:12px;\" allowfullscreen>\u003c/iframe>","script":"\u003cscript src=\"./my-upg-100-list/my-upg-100-list.js\" integrity=\"sha384-EmL+y2EzMjdr+l2gPQNQ0WVmiSatcqpr50yMftD6vTaYYnkHyZL90vN2OIb4XXfi\" crossorigin=\"anonymous\">\u003c/script>\n\u003cmy-upg-100-list-map profile-config='{\"profile\":\"poster-wall\",\"tk\":\"YOUR_MAPBOX_TOKEN\"}'>\u003c/my-upg-100-list-map>"}},{"profile":"upg-100-list","file":"upg-100-list.vue","description":"","element":"my-upg-100-list-map","iframeUrl":"./my-upg-100-list/upg-100-list/index.html","scriptUrl":"./my-upg-100-list/my-upg-100-list.js","embed":{"iframe":"\u003ciframe src=\"./my-upg-100-list/upg-100-list/index.html\" width=\"100%\" height=\"600\" style=\"border:none;border-radius:12px;\" allowfullscreen>\u003c/iframe>","script":"\u003cscript src=\"./my-upg-100-list/my-upg-100-list.js\" integrity=\"sha384-EmL+y2EzMjdr+l2gPQNQ0WVmiSatcqpr50yMftD6vTaYYnkHyZL90vN2OIb4XXfi\" crossorigin=\"anonymous\">\u003c/script>\n\u003cmy-upg-100-list-map profile-config='{\"profile\":\"upg-100-list\",\"tk\":\"YOUR_MAPBOX_TOKEN\"}'>\u003c/my-upg-100-list-map>"}}]},{"bundle":"research-dashboard","scriptUrl":"./research-dashboard/research-dashboard.js","output":"doxa-maps/research-dashboard/research-dashboard.js","integrity":"sha384-lZ7gBho2rDVPcokskvREISv+36u3aHZnZZ/cX9sy180aP+qyCxdgmnd8VacYOfqq","elements":["research-dashboard-map"],"profiles":[{"profile":"research-dashboard","file":"research-dashboard.vue","description":"Coordinated-Multiple-Views research dashboard for 10/40-window UPGs (live pray.doxa.life): docked facet rail + map-as-hero + linked table/charts, brushing-and-linking over one in-memory store.","element":"research-dashboard-map","iframeUrl":"./research-dashboard/research-dashboard/index.html","scriptUrl":"./research-dashboard/research-dashboard.js","embed":{"iframe":"\u003ciframe src=\"./research-dashboard/research-dashboard/index.html\" width=\"100%\" height=\"600\" style=\"border:none;border-radius:12px;\" allowfullscreen>\u003c/iframe>","script":"\u003cscript src=\"./research-dashboard/research-dashboard.js\" integrity=\"sha384-lZ7gBho2rDVPcokskvREISv+36u3aHZnZZ/cX9sy180aP+qyCxdgmnd8VacYOfqq\" crossorigin=\"anonymous\">\u003c/script>\n\u003cresearch-dashboard-map profile-config='{\"profile\":\"research-dashboard\",\"tk\":\"YOUR_MAPBOX_TOKEN\"}'>\u003c/research-dashboard-map>"},"bundle":"research-dashboard"}]},{"bundle":"template-bundle","scriptUrl":"./template-bundle/template-bundle.js","output":"doxa-maps/template-bundle/template-bundle.js","integrity":"sha384-ThNZrcpzvq928ggsPM27BNm0El0/e8ZLi2Gf8XdzQFWUPxdiP/LmBbq9np5+SZDI","elements":["template-bundle"],"profiles":[{"profile":"template-map-a","file":"template-map-a.vue","description":"Minimal example profile A — a colored placeholder, no Mapbox or data.","element":"template-bundle","iframeUrl":"./template-bundle/template-map-a/index.html","scriptUrl":"./template-bundle/template-bundle.js","embed":{"iframe":"\u003ciframe src=\"./template-bundle/template-map-a/index.html\" width=\"100%\" height=\"600\" style=\"border:none;border-radius:12px;\" allowfullscreen>\u003c/iframe>","script":"\u003cscript src=\"./template-bundle/template-bundle.js\" integrity=\"sha384-ThNZrcpzvq928ggsPM27BNm0El0/e8ZLi2Gf8XdzQFWUPxdiP/LmBbq9np5+SZDI\" crossorigin=\"anonymous\">\u003c/script>\n\u003ctemplate-bundle profile-config='{\"profile\":\"template-map-a\",\"tk\":\"YOUR_MAPBOX_TOKEN\"}'>\u003c/template-bundle>"},"bundle":"template-bundle"},{"profile":"template-map-b","file":"template-map-b.vue","description":"Minimal example profile B — a second profile in the same bundle.","element":"template-bundle","iframeUrl":"./template-bundle/template-map-b/index.html","scriptUrl":"./template-bundle/template-bundle.js","embed":{"iframe":"\u003ciframe src=\"./template-bundle/template-map-b/index.html\" width=\"100%\" height=\"600\" style=\"border:none;border-radius:12px;\" allowfullscreen>\u003c/iframe>","script":"\u003cscript src=\"./template-bundle/template-bundle.js\" integrity=\"sha384-ThNZrcpzvq928ggsPM27BNm0El0/e8ZLi2Gf8XdzQFWUPxdiP/LmBbq9np5+SZDI\" crossorigin=\"anonymous\">\u003c/script>\n\u003ctemplate-bundle profile-config='{\"profile\":\"template-map-b\",\"tk\":\"YOUR_MAPBOX_TOKEN\"}'>\u003c/template-bundle>"},"bundle":"template-bundle"}]}]}; \n" + "script": "\n" }, + "instances": [ + { + "id": "maplibre", + "title": "Demo map — MapLibre (token-free)", + "apiBaseUrl": "", + "props": { + "profile": "demo-map", + "provider": "maplibre", + "instanceId": "demo-maplibre" + }, + "element": "demo-map", + "iframeUrl": "./demo-map/demo-map/maplibre/index.html", + "embed": { + "iframe": "" + } + } + ], "bundle": "demo-map" } ] diff --git a/public/doxa-maps/my-upg-100-list/poster-wall/index.html b/public/doxa-maps/my-upg-100-list/poster-wall/index.html index ec5f9adf1..b072a94de 100644 --- a/public/doxa-maps/my-upg-100-list/poster-wall/index.html +++ b/public/doxa-maps/my-upg-100-list/poster-wall/index.html @@ -46,6 +46,8 @@ var slot = document.getElementById('slot'); var status = document.getElementById('status'); var BASE_CONFIG = {"profile":"poster-wall","dataSource":"pray-tools","instanceId":"my-upg-100-list-poster-wall","assetsBase":"../../../assets","qa":true}; + // MapLibre pages need NO token: the ladder below is skipped entirely. + var TOKEN_FREE = false; var TOKEN_SRC = "/api/maps/token.json"; var BAKED_TOKEN = ""; var DEFAULT_TOKEN_URL = '/api/maps/token'; @@ -70,9 +72,9 @@ function done() { if (status && status.parentNode) { status.parentNode.removeChild(status); } } function mount(token) { - if (!token) { return askToken(); } + if (!token && !TOKEN_FREE) { return askToken(); } try { - var cfg = Object.assign({}, BASE_CONFIG, { tk: token }); + var cfg = token ? Object.assign({}, BASE_CONFIG, { tk: token }) : BASE_CONFIG; var el = document.createElement("my-upg-100-list-map"); el.setAttribute('profile-config', JSON.stringify(cfg)); slot.innerHTML = ''; @@ -100,6 +102,7 @@ var urlTk = qp('tk'); if (urlTk) { try { localStorage.setItem('MAPS_STAGING_TK', urlTk); } catch (e) {} } var directToken = (BASE_CONFIG && BASE_CONFIG.tk) || urlTk || stored || BAKED_TOKEN; + if (TOKEN_FREE) { return mount(''); } if (directToken) { return mount(directToken); } // Rungs 4-6: resolve a token endpoint and fetch it. diff --git a/public/doxa-maps/my-upg-100-list/upg-100-list/index.html b/public/doxa-maps/my-upg-100-list/upg-100-list/index.html index 7ef5d0b20..62abd3d95 100644 --- a/public/doxa-maps/my-upg-100-list/upg-100-list/index.html +++ b/public/doxa-maps/my-upg-100-list/upg-100-list/index.html @@ -46,6 +46,8 @@ var slot = document.getElementById('slot'); var status = document.getElementById('status'); var BASE_CONFIG = {"profile":"upg-100-list","dataSource":"pray-tools","instanceId":"my-upg-100-list-upg-100-list","assetsBase":"../../../assets","qa":true}; + // MapLibre pages need NO token: the ladder below is skipped entirely. + var TOKEN_FREE = false; var TOKEN_SRC = "/api/maps/token.json"; var BAKED_TOKEN = ""; var DEFAULT_TOKEN_URL = '/api/maps/token'; @@ -70,9 +72,9 @@ function done() { if (status && status.parentNode) { status.parentNode.removeChild(status); } } function mount(token) { - if (!token) { return askToken(); } + if (!token && !TOKEN_FREE) { return askToken(); } try { - var cfg = Object.assign({}, BASE_CONFIG, { tk: token }); + var cfg = token ? Object.assign({}, BASE_CONFIG, { tk: token }) : BASE_CONFIG; var el = document.createElement("my-upg-100-list-map"); el.setAttribute('profile-config', JSON.stringify(cfg)); slot.innerHTML = ''; @@ -100,6 +102,7 @@ var urlTk = qp('tk'); if (urlTk) { try { localStorage.setItem('MAPS_STAGING_TK', urlTk); } catch (e) {} } var directToken = (BASE_CONFIG && BASE_CONFIG.tk) || urlTk || stored || BAKED_TOKEN; + if (TOKEN_FREE) { return mount(''); } if (directToken) { return mount(directToken); } // Rungs 4-6: resolve a token endpoint and fetch it. diff --git a/public/doxa-maps/research-dashboard/research-dashboard/index.html b/public/doxa-maps/research-dashboard/research-dashboard/index.html index 49dae2442..b05df899a 100644 --- a/public/doxa-maps/research-dashboard/research-dashboard/index.html +++ b/public/doxa-maps/research-dashboard/research-dashboard/index.html @@ -46,6 +46,8 @@ var slot = document.getElementById('slot'); var status = document.getElementById('status'); var BASE_CONFIG = {"profile":"research-dashboard","dataSource":"pray-tools","instanceId":"research-dashboard-research-dashboard","assetsBase":"../../../assets","qa":true}; + // MapLibre pages need NO token: the ladder below is skipped entirely. + var TOKEN_FREE = false; var TOKEN_SRC = "/api/maps/token.json"; var BAKED_TOKEN = ""; var DEFAULT_TOKEN_URL = '/api/maps/token'; @@ -70,9 +72,9 @@ function done() { if (status && status.parentNode) { status.parentNode.removeChild(status); } } function mount(token) { - if (!token) { return askToken(); } + if (!token && !TOKEN_FREE) { return askToken(); } try { - var cfg = Object.assign({}, BASE_CONFIG, { tk: token }); + var cfg = token ? Object.assign({}, BASE_CONFIG, { tk: token }) : BASE_CONFIG; var el = document.createElement("research-dashboard-map"); el.setAttribute('profile-config', JSON.stringify(cfg)); slot.innerHTML = ''; @@ -100,6 +102,7 @@ var urlTk = qp('tk'); if (urlTk) { try { localStorage.setItem('MAPS_STAGING_TK', urlTk); } catch (e) {} } var directToken = (BASE_CONFIG && BASE_CONFIG.tk) || urlTk || stored || BAKED_TOKEN; + if (TOKEN_FREE) { return mount(''); } if (directToken) { return mount(directToken); } // Rungs 4-6: resolve a token endpoint and fetch it. diff --git a/public/doxa-maps/template-bundle/template-map-a/index.html b/public/doxa-maps/template-bundle/template-map-a/index.html index c195a2de2..d8c2e98d0 100644 --- a/public/doxa-maps/template-bundle/template-map-a/index.html +++ b/public/doxa-maps/template-bundle/template-map-a/index.html @@ -46,6 +46,8 @@ var slot = document.getElementById('slot'); var status = document.getElementById('status'); var BASE_CONFIG = {"profile":"template-map-a","dataSource":"pray-tools","instanceId":"template-bundle-template-map-a","assetsBase":"../../../assets","qa":true}; + // MapLibre pages need NO token: the ladder below is skipped entirely. + var TOKEN_FREE = false; var TOKEN_SRC = "/api/maps/token.json"; var BAKED_TOKEN = ""; var DEFAULT_TOKEN_URL = '/api/maps/token'; @@ -70,9 +72,9 @@ function done() { if (status && status.parentNode) { status.parentNode.removeChild(status); } } function mount(token) { - if (!token) { return askToken(); } + if (!token && !TOKEN_FREE) { return askToken(); } try { - var cfg = Object.assign({}, BASE_CONFIG, { tk: token }); + var cfg = token ? Object.assign({}, BASE_CONFIG, { tk: token }) : BASE_CONFIG; var el = document.createElement("template-bundle"); el.setAttribute('profile-config', JSON.stringify(cfg)); slot.innerHTML = ''; @@ -100,6 +102,7 @@ var urlTk = qp('tk'); if (urlTk) { try { localStorage.setItem('MAPS_STAGING_TK', urlTk); } catch (e) {} } var directToken = (BASE_CONFIG && BASE_CONFIG.tk) || urlTk || stored || BAKED_TOKEN; + if (TOKEN_FREE) { return mount(''); } if (directToken) { return mount(directToken); } // Rungs 4-6: resolve a token endpoint and fetch it. diff --git a/public/doxa-maps/template-bundle/template-map-b/index.html b/public/doxa-maps/template-bundle/template-map-b/index.html index 575baf0fe..3b38ab657 100644 --- a/public/doxa-maps/template-bundle/template-map-b/index.html +++ b/public/doxa-maps/template-bundle/template-map-b/index.html @@ -46,6 +46,8 @@ var slot = document.getElementById('slot'); var status = document.getElementById('status'); var BASE_CONFIG = {"profile":"template-map-b","dataSource":"pray-tools","instanceId":"template-bundle-template-map-b","assetsBase":"../../../assets","qa":true}; + // MapLibre pages need NO token: the ladder below is skipped entirely. + var TOKEN_FREE = false; var TOKEN_SRC = "/api/maps/token.json"; var BAKED_TOKEN = ""; var DEFAULT_TOKEN_URL = '/api/maps/token'; @@ -70,9 +72,9 @@ function done() { if (status && status.parentNode) { status.parentNode.removeChild(status); } } function mount(token) { - if (!token) { return askToken(); } + if (!token && !TOKEN_FREE) { return askToken(); } try { - var cfg = Object.assign({}, BASE_CONFIG, { tk: token }); + var cfg = token ? Object.assign({}, BASE_CONFIG, { tk: token }) : BASE_CONFIG; var el = document.createElement("template-bundle"); el.setAttribute('profile-config', JSON.stringify(cfg)); slot.innerHTML = ''; @@ -100,6 +102,7 @@ var urlTk = qp('tk'); if (urlTk) { try { localStorage.setItem('MAPS_STAGING_TK', urlTk); } catch (e) {} } var directToken = (BASE_CONFIG && BASE_CONFIG.tk) || urlTk || stored || BAKED_TOKEN; + if (TOKEN_FREE) { return mount(''); } if (directToken) { return mount(directToken); } // Rungs 4-6: resolve a token endpoint and fetch it.