Merge remote-tracking branch 'origin/development' into studio/phone-place
# Conflicts: # public/dx-maps/doxa-maps-spa/doxa-maps-spa.js # public/dx-maps/doxa-maps-spa/doxa-maps-spa/app/index.html # public/dx-maps/doxa-maps-spa/doxa-maps-spa/index.html # public/dx-maps/doxa-maps-spa/manifest.json # public/dx-maps/doxa-simple-map/doxa-simple-map.js # public/dx-maps/doxa-simple-map/doxa-simple-map/adoption/index.html # public/dx-maps/doxa-simple-map/doxa-simple-map/engagement/index.html # public/dx-maps/doxa-simple-map/doxa-simple-map/index.html # public/dx-maps/doxa-simple-map/doxa-simple-map/prayer/index.html # public/dx-maps/manifest.json
This commit is contained in:
commit
e6bf86ff1e
13 changed files with 77 additions and 44 deletions
|
|
@ -1,3 +1,7 @@
|
|||
<script>
|
||||
const pointerDoneThisLoad = new Set()
|
||||
</script>
|
||||
|
||||
<script setup>
|
||||
/**
|
||||
* MapInfo.vue — a map's "what can this do for you?" button, one-time pointer and example popup.
|
||||
|
|
@ -108,6 +112,12 @@ const OFF_EVENT = 'dxmaps:mapinfo-pointer-off'
|
|||
function readStore(k) { try { return window.localStorage.getItem(k) } catch { return null } }
|
||||
function writeStore(k, v) { try { window.localStorage.setItem(k, v) } catch { /* private mode: in-memory only */ } }
|
||||
|
||||
// ★ PAGE-LOAD MEMORY: pointerDoneThisLoad, in the plain <script> block at the top of this file, is shared
|
||||
// by every MapInfo on the page, so it must live in module scope: the gallery REMOUNTS a heavy tab's MapInfo
|
||||
// on each switch back, and component state dies with the instance. It holds the storageKeys whose
|
||||
// page-load pointer (pointerKeep) is done for this load; a full reload starts empty. (It sits ABOVE
|
||||
// <script setup> so an ordering check reads it as declared before use; it carries no comment there
|
||||
// because the library index takes this component's description from the file's first comment.)
|
||||
const pointing = ref(false)
|
||||
const pointerOff = ref(false)
|
||||
const keep = ref(false)
|
||||
|
|
@ -197,7 +207,26 @@ function inert(el) {
|
|||
}
|
||||
return false
|
||||
}
|
||||
// ★ NO FLASH WHILE THE MAP LOADS. Until a control has announced itself, our button waits: the map draws
|
||||
// its column only once it is ready, so showing ours first put the floating ⓘ on screen for a moment and
|
||||
// then swapped it for the control. The wait is BOUNDED and counts only while our pane is on screen (a
|
||||
// tab that mounts hidden, or waits in an inert pane, keeps its full grace for when it is opened): if no
|
||||
// control arrives within CONTROL_GRACE_MS of visible time, our button shows (fail-open). Once a control
|
||||
// has announced itself, the measurement below decides alone, so a hidden column still gives our button.
|
||||
const CONTROL_GRACE_MS = 30000
|
||||
const awaitingControl = ref(props.trigger === 'control')
|
||||
let graceFrom = 0
|
||||
function tickGrace() {
|
||||
if (!awaitingControl.value) return
|
||||
const p = rootEl.value && rootEl.value.parentElement
|
||||
const r = p && p.getBoundingClientRect()
|
||||
const visible = !!p && !inert(p) && r.width > 0 && r.height > 0
|
||||
if (!visible) { graceFrom = 0; return }
|
||||
if (!graceFrom) graceFrom = Date.now()
|
||||
else if (Date.now() - graceFrom >= CONTROL_GRACE_MS) awaitingControl.value = false
|
||||
}
|
||||
function measureControl() {
|
||||
tickGrace()
|
||||
const c = control.value
|
||||
let shown = false
|
||||
if (c && c.isConnected && !inert(c)) {
|
||||
|
|
@ -236,6 +265,7 @@ function adopt(el) {
|
|||
if (!el || el === control.value) { measureControl(); return }
|
||||
try { io?.disconnect(); ro?.disconnect() } catch { /* already gone */ }
|
||||
control.value = el
|
||||
awaitingControl.value = false
|
||||
try { io = new IntersectionObserver(measureControl); io.observe(el) } catch { io = null }
|
||||
try { ro = new ResizeObserver(measureControl); ro.observe(el) } catch { ro = null }
|
||||
el.setAttribute('aria-expanded', String(open.value))
|
||||
|
|
@ -276,7 +306,7 @@ onBeforeUnmount(() => {
|
|||
window.removeEventListener('resize', onResize)
|
||||
})
|
||||
watch(open, (v) => { control.value?.setAttribute('aria-expanded', String(v)) })
|
||||
const floatingShown = () => props.trigger !== 'control' || !controlShown.value
|
||||
const floatingShown = () => props.trigger !== 'control' || (!awaitingControl.value && !controlShown.value)
|
||||
// The pointer beside the control has been on screen: this page load has pointed once, so a remount (the
|
||||
// gallery rebuilds a heavy tab on every switch back) does not point again. Marked on SCREEN, not on mount:
|
||||
// a tab's MapInfo can mount inside a hidden pane.
|
||||
|
|
@ -464,13 +494,6 @@ useShadowStyles(`
|
|||
`, 'map-info')
|
||||
</script>
|
||||
|
||||
<script>
|
||||
// ★ PAGE-LOAD MEMORY, shared by every MapInfo on the page, so it must live in module scope: the gallery
|
||||
// REMOUNTS a heavy tab's MapInfo on each switch back, and component state dies with the instance. It holds
|
||||
// the storageKeys whose page-load pointer (pointerKeep) is done for this load; a full reload starts empty.
|
||||
const pointerDoneThisLoad = new Set()
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div ref="rootEl" class="mi" :dir="isRtl() ? 'rtl' : 'ltr'" :lang="lang()">
|
||||
<button v-show="floatingShown()" ref="btnEl" type="button" class="mi-btn" :class="placement === 'top-left' ? 'mi-at-left' : 'mi-at-right'"
|
||||
|
|
|
|||
|
|
@ -1529,11 +1529,12 @@ onBeforeUnmount(() => {
|
|||
collapses its mobile top offset when no search pill is rendered.
|
||||
When the flag is flipped back on, the toolbar reserves space
|
||||
below the geocoder again with no further changes here. -->
|
||||
<!-- controls="square": this map's column is the engine's grouped card, not separate circles.
|
||||
<!-- Round, spaced controls (the library default) at every width: the grouped square card reads
|
||||
too compact, on phones most of all.
|
||||
The TOP control is "What can this map do?": it opens the gallery's MapInfo for this tab,
|
||||
which then hides its own floating button. It renders only where a MapInfo answers it, so a
|
||||
standalone page (DX Life's home, the leaf) has no dead button. -->
|
||||
<MapToolbar v-if="appReady" :has-geocoder="FEATURES.geocoder" controls="square">
|
||||
<MapToolbar v-if="appReady" :has-geocoder="FEATURES.geocoder">
|
||||
<MapInfoButton :is-dark="isDark" />
|
||||
<ZoomInButton :map="map" :is-dark="isDark" />
|
||||
<ZoomOutButton :map="map" :is-dark="isDark" />
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -61,7 +61,7 @@
|
|||
|
||||
<script>window.MAP_APP_API_URL = "https://pray.doxa.life";</script>
|
||||
<!-- Bundle IIFE — registers the <doxa-maps-spa> custom element. -->
|
||||
<script src="../../doxa-maps-spa.js" integrity="sha384-Wi2vWIiymDZggOuCohYrtB6Dog999pZfqqCqvtI9EQ4I28Gl2UtRarfEnAUlwM4X" crossorigin="anonymous"></script>
|
||||
<script src="../../doxa-maps-spa.js" integrity="sha384-89Pp72vZrHYxf1y2J90nwHpQAKKEcMhA9AZY7uNgnhwIjJJA+kOrHA31QgnWw2Z8" crossorigin="anonymous"></script>
|
||||
|
||||
<script>
|
||||
// Mapbox token resolution — the A3 ladder, in precedence order:
|
||||
|
|
|
|||
|
|
@ -61,7 +61,7 @@
|
|||
|
||||
<script>window.MAP_APP_API_URL = "https://pray.doxa.life";</script>
|
||||
<!-- Bundle IIFE — registers the <doxa-maps-spa> custom element. -->
|
||||
<script src="../doxa-maps-spa.js" integrity="sha384-Wi2vWIiymDZggOuCohYrtB6Dog999pZfqqCqvtI9EQ4I28Gl2UtRarfEnAUlwM4X" crossorigin="anonymous"></script>
|
||||
<script src="../doxa-maps-spa.js" integrity="sha384-89Pp72vZrHYxf1y2J90nwHpQAKKEcMhA9AZY7uNgnhwIjJJA+kOrHA31QgnWw2Z8" crossorigin="anonymous"></script>
|
||||
|
||||
<script>
|
||||
// Mapbox token resolution — the A3 ladder, in precedence order:
|
||||
|
|
|
|||
|
|
@ -361,7 +361,7 @@
|
|||
"bundle": "doxa-maps-spa",
|
||||
"scriptUrl": "./doxa-maps-spa/doxa-maps-spa.js",
|
||||
"output": "dx-maps/doxa-maps-spa/doxa-maps-spa.js",
|
||||
"integrity": "sha384-Wi2vWIiymDZggOuCohYrtB6Dog999pZfqqCqvtI9EQ4I28Gl2UtRarfEnAUlwM4X",
|
||||
"integrity": "sha384-89Pp72vZrHYxf1y2J90nwHpQAKKEcMhA9AZY7uNgnhwIjJJA+kOrHA31QgnWw2Z8",
|
||||
"elements": [
|
||||
"doxa-maps-spa"
|
||||
],
|
||||
|
|
@ -389,7 +389,7 @@
|
|||
"scriptUrl": "./doxa-maps-spa/doxa-maps-spa.js",
|
||||
"embed": {
|
||||
"iframe": "<iframe src=\"./doxa-maps-spa/doxa-maps-spa/index.html?utm_source=YOUR_SOURCE\" width=\"100%\" height=\"600\" style=\"border:none;border-radius:12px;\" allowfullscreen></iframe>",
|
||||
"script": "<script>window.MAP_APP_API_URL=\"https://pray.doxa.life\";</script>\n<script src=\"./doxa-maps-spa/doxa-maps-spa.js\" integrity=\"sha384-Wi2vWIiymDZggOuCohYrtB6Dog999pZfqqCqvtI9EQ4I28Gl2UtRarfEnAUlwM4X\" crossorigin=\"anonymous\"></script>\n<!-- provider: \"maplibre\" is the default; change it to \"mapbox\" and fill tk to use Mapbox. -->\n<doxa-maps-spa profile-config='{\"profile\":\"doxa-maps-spa\",\"provider\":\"maplibre\",\"tk\":\"YOUR_MAPBOX_TOKEN\",\"utmSource\":\"YOUR_SOURCE\",\"assetsBase\":\"YOUR_TREE_URL/assets\"}'></doxa-maps-spa>"
|
||||
"script": "<script>window.MAP_APP_API_URL=\"https://pray.doxa.life\";</script>\n<script src=\"./doxa-maps-spa/doxa-maps-spa.js\" integrity=\"sha384-89Pp72vZrHYxf1y2J90nwHpQAKKEcMhA9AZY7uNgnhwIjJJA+kOrHA31QgnWw2Z8\" crossorigin=\"anonymous\"></script>\n<!-- provider: \"maplibre\" is the default; change it to \"mapbox\" and fill tk to use Mapbox. -->\n<doxa-maps-spa profile-config='{\"profile\":\"doxa-maps-spa\",\"provider\":\"maplibre\",\"tk\":\"YOUR_MAPBOX_TOKEN\",\"utmSource\":\"YOUR_SOURCE\",\"assetsBase\":\"YOUR_TREE_URL/assets\"}'></doxa-maps-spa>"
|
||||
},
|
||||
"instances": [
|
||||
{
|
||||
|
|
@ -462,7 +462,7 @@
|
|||
"bundle": "doxa-simple-map",
|
||||
"scriptUrl": "./doxa-simple-map/doxa-simple-map.js",
|
||||
"output": "dx-maps/doxa-simple-map/doxa-simple-map.js",
|
||||
"integrity": "sha384-gwv98aSenWsXeKuHU7UJII4Hyd0719K/dRXdnpnTiMiZHtT+d7KnYn+Bb+qreg19",
|
||||
"integrity": "sha384-A1s+I+d0avERLG0kEo0+tFt1T2IpA8LsScPb1Rc0rECo8nt3e7dNxVYB5J+yzFzH",
|
||||
"elements": [
|
||||
"doxa-map",
|
||||
"doxa-simple-map"
|
||||
|
|
@ -482,8 +482,8 @@
|
|||
"scriptUrl": "./doxa-simple-map/doxa-simple-map.js",
|
||||
"embed": {
|
||||
"iframe": "<iframe src=\"./doxa-simple-map/doxa-simple-map/index.html?utm_source=YOUR_SOURCE\" width=\"100%\" height=\"600\" style=\"border:none;border-radius:12px;\" allowfullscreen></iframe>",
|
||||
"script": "<!-- MapLibre engine (the default), fetched early -->\n<link rel=\"preload\" as=\"script\" href=\"https://cdn.jsdelivr.net/npm/maplibre-gl@5.24.0/dist/maplibre-gl.js\" integrity=\"sha384-5+cfbwT0iiub6VsQAdn6yz16nr6sDiQoHx6tm4O8OVYXHYOxcffFmCJBL0dgdvGp\" crossorigin=\"anonymous\">\n<link rel=\"preload\" as=\"style\" href=\"https://cdn.jsdelivr.net/npm/maplibre-gl@5.24.0/dist/maplibre-gl.css\" integrity=\"sha384-uTttxo/aOKbdE5RlD/SPzSDoDmNvGlUYPjONi2MN/b7c9HPSvW07OIuyP7uL6jxK\" crossorigin=\"anonymous\">\n<script>window.MAP_APP_API_URL=\"https://pray.doxa.life\";</script>\n<script src=\"./doxa-simple-map/doxa-simple-map.js\" integrity=\"sha384-gwv98aSenWsXeKuHU7UJII4Hyd0719K/dRXdnpnTiMiZHtT+d7KnYn+Bb+qreg19\" crossorigin=\"anonymous\"></script>\n<!-- MapLibre draws this map and needs no token. For Mapbox, paste this map's embed.scriptMapbox from manifest.json instead: it sets \"provider\":\"mapbox\" and preloads the Mapbox engine; fill \"tk\" with your token. -->\n<doxa-map profile-config='{\"profile\":\"doxa-simple-map\",\"provider\":\"maplibre\",\"tk\":\"YOUR_MAPBOX_TOKEN\",\"utmSource\":\"YOUR_SOURCE\",\"assetsBase\":\"YOUR_TREE_URL/assets\"}'></doxa-map>",
|
||||
"scriptMapbox": "<!-- Mapbox engine, fetched early -->\n<link rel=\"preload\" as=\"script\" href=\"https://api.mapbox.com/mapbox-gl-js/v3.24.0/mapbox-gl.js\" integrity=\"sha384-tO0clamXONKwbiz7O6xJpUeyJbTSPugC+xM9clvfFvKTH3i8SmCawHGdf5quMWmZ\" crossorigin=\"anonymous\">\n<link rel=\"preload\" as=\"style\" href=\"https://api.mapbox.com/mapbox-gl-js/v3.24.0/mapbox-gl.css\" integrity=\"sha384-rp1X/jJ9MpWPef9OimfXhOaOc4Gzs87yQvF+ajwY6X2H4PTeHNycNlLWiWvj7ehV\" crossorigin=\"anonymous\">\n<script>window.MAP_APP_API_URL=\"https://pray.doxa.life\";</script>\n<script src=\"./doxa-simple-map/doxa-simple-map.js\" integrity=\"sha384-gwv98aSenWsXeKuHU7UJII4Hyd0719K/dRXdnpnTiMiZHtT+d7KnYn+Bb+qreg19\" crossorigin=\"anonymous\"></script>\n<!-- Mapbox draws this map: fill \"tk\" with your Mapbox token. -->\n<doxa-map profile-config='{\"profile\":\"doxa-simple-map\",\"provider\":\"mapbox\",\"tk\":\"YOUR_MAPBOX_TOKEN\",\"utmSource\":\"YOUR_SOURCE\",\"assetsBase\":\"YOUR_TREE_URL/assets\"}'></doxa-map>"
|
||||
"script": "<!-- MapLibre engine (the default), fetched early -->\n<link rel=\"preload\" as=\"script\" href=\"https://cdn.jsdelivr.net/npm/maplibre-gl@5.24.0/dist/maplibre-gl.js\" integrity=\"sha384-5+cfbwT0iiub6VsQAdn6yz16nr6sDiQoHx6tm4O8OVYXHYOxcffFmCJBL0dgdvGp\" crossorigin=\"anonymous\">\n<link rel=\"preload\" as=\"style\" href=\"https://cdn.jsdelivr.net/npm/maplibre-gl@5.24.0/dist/maplibre-gl.css\" integrity=\"sha384-uTttxo/aOKbdE5RlD/SPzSDoDmNvGlUYPjONi2MN/b7c9HPSvW07OIuyP7uL6jxK\" crossorigin=\"anonymous\">\n<script>window.MAP_APP_API_URL=\"https://pray.doxa.life\";</script>\n<script src=\"./doxa-simple-map/doxa-simple-map.js\" integrity=\"sha384-A1s+I+d0avERLG0kEo0+tFt1T2IpA8LsScPb1Rc0rECo8nt3e7dNxVYB5J+yzFzH\" crossorigin=\"anonymous\"></script>\n<!-- MapLibre draws this map and needs no token. For Mapbox, paste this map's embed.scriptMapbox from manifest.json instead: it sets \"provider\":\"mapbox\" and preloads the Mapbox engine; fill \"tk\" with your token. -->\n<doxa-map profile-config='{\"profile\":\"doxa-simple-map\",\"provider\":\"maplibre\",\"tk\":\"YOUR_MAPBOX_TOKEN\",\"utmSource\":\"YOUR_SOURCE\",\"assetsBase\":\"YOUR_TREE_URL/assets\"}'></doxa-map>",
|
||||
"scriptMapbox": "<!-- Mapbox engine, fetched early -->\n<link rel=\"preload\" as=\"script\" href=\"https://api.mapbox.com/mapbox-gl-js/v3.24.0/mapbox-gl.js\" integrity=\"sha384-tO0clamXONKwbiz7O6xJpUeyJbTSPugC+xM9clvfFvKTH3i8SmCawHGdf5quMWmZ\" crossorigin=\"anonymous\">\n<link rel=\"preload\" as=\"style\" href=\"https://api.mapbox.com/mapbox-gl-js/v3.24.0/mapbox-gl.css\" integrity=\"sha384-rp1X/jJ9MpWPef9OimfXhOaOc4Gzs87yQvF+ajwY6X2H4PTeHNycNlLWiWvj7ehV\" crossorigin=\"anonymous\">\n<script>window.MAP_APP_API_URL=\"https://pray.doxa.life\";</script>\n<script src=\"./doxa-simple-map/doxa-simple-map.js\" integrity=\"sha384-A1s+I+d0avERLG0kEo0+tFt1T2IpA8LsScPb1Rc0rECo8nt3e7dNxVYB5J+yzFzH\" crossorigin=\"anonymous\"></script>\n<!-- Mapbox draws this map: fill \"tk\" with your Mapbox token. -->\n<doxa-map profile-config='{\"profile\":\"doxa-simple-map\",\"provider\":\"mapbox\",\"tk\":\"YOUR_MAPBOX_TOKEN\",\"utmSource\":\"YOUR_SOURCE\",\"assetsBase\":\"YOUR_TREE_URL/assets\"}'></doxa-map>"
|
||||
},
|
||||
"instances": [
|
||||
{
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -70,7 +70,7 @@
|
|||
|
||||
<script>window.MAP_APP_API_URL = "https://pray.doxa.life";</script>
|
||||
<!-- Bundle IIFE — registers the <doxa-map> custom element. -->
|
||||
<script src="../../doxa-simple-map.js" integrity="sha384-gwv98aSenWsXeKuHU7UJII4Hyd0719K/dRXdnpnTiMiZHtT+d7KnYn+Bb+qreg19" crossorigin="anonymous"></script>
|
||||
<script src="../../doxa-simple-map.js" integrity="sha384-A1s+I+d0avERLG0kEo0+tFt1T2IpA8LsScPb1Rc0rECo8nt3e7dNxVYB5J+yzFzH" crossorigin="anonymous"></script>
|
||||
|
||||
<script>
|
||||
// Mapbox token resolution — the A3 ladder, in precedence order:
|
||||
|
|
|
|||
|
|
@ -70,7 +70,7 @@
|
|||
|
||||
<script>window.MAP_APP_API_URL = "https://pray.doxa.life";</script>
|
||||
<!-- Bundle IIFE — registers the <doxa-map> custom element. -->
|
||||
<script src="../../doxa-simple-map.js" integrity="sha384-gwv98aSenWsXeKuHU7UJII4Hyd0719K/dRXdnpnTiMiZHtT+d7KnYn+Bb+qreg19" crossorigin="anonymous"></script>
|
||||
<script src="../../doxa-simple-map.js" integrity="sha384-A1s+I+d0avERLG0kEo0+tFt1T2IpA8LsScPb1Rc0rECo8nt3e7dNxVYB5J+yzFzH" crossorigin="anonymous"></script>
|
||||
|
||||
<script>
|
||||
// Mapbox token resolution — the A3 ladder, in precedence order:
|
||||
|
|
|
|||
|
|
@ -70,7 +70,7 @@
|
|||
|
||||
<script>window.MAP_APP_API_URL = "https://pray.doxa.life";</script>
|
||||
<!-- Bundle IIFE — registers the <doxa-map> custom element. -->
|
||||
<script src="../doxa-simple-map.js" integrity="sha384-gwv98aSenWsXeKuHU7UJII4Hyd0719K/dRXdnpnTiMiZHtT+d7KnYn+Bb+qreg19" crossorigin="anonymous"></script>
|
||||
<script src="../doxa-simple-map.js" integrity="sha384-A1s+I+d0avERLG0kEo0+tFt1T2IpA8LsScPb1Rc0rECo8nt3e7dNxVYB5J+yzFzH" crossorigin="anonymous"></script>
|
||||
|
||||
<script>
|
||||
// Mapbox token resolution — the A3 ladder, in precedence order:
|
||||
|
|
|
|||
|
|
@ -70,7 +70,7 @@
|
|||
|
||||
<script>window.MAP_APP_API_URL = "https://pray.doxa.life";</script>
|
||||
<!-- Bundle IIFE — registers the <doxa-map> custom element. -->
|
||||
<script src="../../doxa-simple-map.js" integrity="sha384-gwv98aSenWsXeKuHU7UJII4Hyd0719K/dRXdnpnTiMiZHtT+d7KnYn+Bb+qreg19" crossorigin="anonymous"></script>
|
||||
<script src="../../doxa-simple-map.js" integrity="sha384-A1s+I+d0avERLG0kEo0+tFt1T2IpA8LsScPb1Rc0rECo8nt3e7dNxVYB5J+yzFzH" crossorigin="anonymous"></script>
|
||||
|
||||
<script>
|
||||
// Mapbox token resolution — the A3 ladder, in precedence order:
|
||||
|
|
|
|||
|
|
@ -361,7 +361,7 @@
|
|||
"bundle": "doxa-maps-spa",
|
||||
"scriptUrl": "./doxa-maps-spa/doxa-maps-spa.js",
|
||||
"output": "dx-maps/doxa-maps-spa/doxa-maps-spa.js",
|
||||
"integrity": "sha384-Wi2vWIiymDZggOuCohYrtB6Dog999pZfqqCqvtI9EQ4I28Gl2UtRarfEnAUlwM4X",
|
||||
"integrity": "sha384-89Pp72vZrHYxf1y2J90nwHpQAKKEcMhA9AZY7uNgnhwIjJJA+kOrHA31QgnWw2Z8",
|
||||
"elements": [
|
||||
"doxa-maps-spa"
|
||||
],
|
||||
|
|
@ -389,7 +389,7 @@
|
|||
"scriptUrl": "./doxa-maps-spa/doxa-maps-spa.js",
|
||||
"embed": {
|
||||
"iframe": "<iframe src=\"./doxa-maps-spa/doxa-maps-spa/index.html?utm_source=YOUR_SOURCE\" width=\"100%\" height=\"600\" style=\"border:none;border-radius:12px;\" allowfullscreen></iframe>",
|
||||
"script": "<script>window.MAP_APP_API_URL=\"https://pray.doxa.life\";</script>\n<script src=\"./doxa-maps-spa/doxa-maps-spa.js\" integrity=\"sha384-Wi2vWIiymDZggOuCohYrtB6Dog999pZfqqCqvtI9EQ4I28Gl2UtRarfEnAUlwM4X\" crossorigin=\"anonymous\"></script>\n<!-- provider: \"maplibre\" is the default; change it to \"mapbox\" and fill tk to use Mapbox. -->\n<doxa-maps-spa profile-config='{\"profile\":\"doxa-maps-spa\",\"provider\":\"maplibre\",\"tk\":\"YOUR_MAPBOX_TOKEN\",\"utmSource\":\"YOUR_SOURCE\",\"assetsBase\":\"YOUR_TREE_URL/assets\"}'></doxa-maps-spa>"
|
||||
"script": "<script>window.MAP_APP_API_URL=\"https://pray.doxa.life\";</script>\n<script src=\"./doxa-maps-spa/doxa-maps-spa.js\" integrity=\"sha384-89Pp72vZrHYxf1y2J90nwHpQAKKEcMhA9AZY7uNgnhwIjJJA+kOrHA31QgnWw2Z8\" crossorigin=\"anonymous\"></script>\n<!-- provider: \"maplibre\" is the default; change it to \"mapbox\" and fill tk to use Mapbox. -->\n<doxa-maps-spa profile-config='{\"profile\":\"doxa-maps-spa\",\"provider\":\"maplibre\",\"tk\":\"YOUR_MAPBOX_TOKEN\",\"utmSource\":\"YOUR_SOURCE\",\"assetsBase\":\"YOUR_TREE_URL/assets\"}'></doxa-maps-spa>"
|
||||
},
|
||||
"instances": [
|
||||
{
|
||||
|
|
@ -462,7 +462,7 @@
|
|||
"bundle": "doxa-simple-map",
|
||||
"scriptUrl": "./doxa-simple-map/doxa-simple-map.js",
|
||||
"output": "dx-maps/doxa-simple-map/doxa-simple-map.js",
|
||||
"integrity": "sha384-gwv98aSenWsXeKuHU7UJII4Hyd0719K/dRXdnpnTiMiZHtT+d7KnYn+Bb+qreg19",
|
||||
"integrity": "sha384-A1s+I+d0avERLG0kEo0+tFt1T2IpA8LsScPb1Rc0rECo8nt3e7dNxVYB5J+yzFzH",
|
||||
"elements": [
|
||||
"doxa-map",
|
||||
"doxa-simple-map"
|
||||
|
|
@ -482,8 +482,8 @@
|
|||
"scriptUrl": "./doxa-simple-map/doxa-simple-map.js",
|
||||
"embed": {
|
||||
"iframe": "<iframe src=\"./doxa-simple-map/doxa-simple-map/index.html?utm_source=YOUR_SOURCE\" width=\"100%\" height=\"600\" style=\"border:none;border-radius:12px;\" allowfullscreen></iframe>",
|
||||
"script": "<!-- MapLibre engine (the default), fetched early -->\n<link rel=\"preload\" as=\"script\" href=\"https://cdn.jsdelivr.net/npm/maplibre-gl@5.24.0/dist/maplibre-gl.js\" integrity=\"sha384-5+cfbwT0iiub6VsQAdn6yz16nr6sDiQoHx6tm4O8OVYXHYOxcffFmCJBL0dgdvGp\" crossorigin=\"anonymous\">\n<link rel=\"preload\" as=\"style\" href=\"https://cdn.jsdelivr.net/npm/maplibre-gl@5.24.0/dist/maplibre-gl.css\" integrity=\"sha384-uTttxo/aOKbdE5RlD/SPzSDoDmNvGlUYPjONi2MN/b7c9HPSvW07OIuyP7uL6jxK\" crossorigin=\"anonymous\">\n<script>window.MAP_APP_API_URL=\"https://pray.doxa.life\";</script>\n<script src=\"./doxa-simple-map/doxa-simple-map.js\" integrity=\"sha384-gwv98aSenWsXeKuHU7UJII4Hyd0719K/dRXdnpnTiMiZHtT+d7KnYn+Bb+qreg19\" crossorigin=\"anonymous\"></script>\n<!-- MapLibre draws this map and needs no token. For Mapbox, paste this map's embed.scriptMapbox from manifest.json instead: it sets \"provider\":\"mapbox\" and preloads the Mapbox engine; fill \"tk\" with your token. -->\n<doxa-map profile-config='{\"profile\":\"doxa-simple-map\",\"provider\":\"maplibre\",\"tk\":\"YOUR_MAPBOX_TOKEN\",\"utmSource\":\"YOUR_SOURCE\",\"assetsBase\":\"YOUR_TREE_URL/assets\"}'></doxa-map>",
|
||||
"scriptMapbox": "<!-- Mapbox engine, fetched early -->\n<link rel=\"preload\" as=\"script\" href=\"https://api.mapbox.com/mapbox-gl-js/v3.24.0/mapbox-gl.js\" integrity=\"sha384-tO0clamXONKwbiz7O6xJpUeyJbTSPugC+xM9clvfFvKTH3i8SmCawHGdf5quMWmZ\" crossorigin=\"anonymous\">\n<link rel=\"preload\" as=\"style\" href=\"https://api.mapbox.com/mapbox-gl-js/v3.24.0/mapbox-gl.css\" integrity=\"sha384-rp1X/jJ9MpWPef9OimfXhOaOc4Gzs87yQvF+ajwY6X2H4PTeHNycNlLWiWvj7ehV\" crossorigin=\"anonymous\">\n<script>window.MAP_APP_API_URL=\"https://pray.doxa.life\";</script>\n<script src=\"./doxa-simple-map/doxa-simple-map.js\" integrity=\"sha384-gwv98aSenWsXeKuHU7UJII4Hyd0719K/dRXdnpnTiMiZHtT+d7KnYn+Bb+qreg19\" crossorigin=\"anonymous\"></script>\n<!-- Mapbox draws this map: fill \"tk\" with your Mapbox token. -->\n<doxa-map profile-config='{\"profile\":\"doxa-simple-map\",\"provider\":\"mapbox\",\"tk\":\"YOUR_MAPBOX_TOKEN\",\"utmSource\":\"YOUR_SOURCE\",\"assetsBase\":\"YOUR_TREE_URL/assets\"}'></doxa-map>"
|
||||
"script": "<!-- MapLibre engine (the default), fetched early -->\n<link rel=\"preload\" as=\"script\" href=\"https://cdn.jsdelivr.net/npm/maplibre-gl@5.24.0/dist/maplibre-gl.js\" integrity=\"sha384-5+cfbwT0iiub6VsQAdn6yz16nr6sDiQoHx6tm4O8OVYXHYOxcffFmCJBL0dgdvGp\" crossorigin=\"anonymous\">\n<link rel=\"preload\" as=\"style\" href=\"https://cdn.jsdelivr.net/npm/maplibre-gl@5.24.0/dist/maplibre-gl.css\" integrity=\"sha384-uTttxo/aOKbdE5RlD/SPzSDoDmNvGlUYPjONi2MN/b7c9HPSvW07OIuyP7uL6jxK\" crossorigin=\"anonymous\">\n<script>window.MAP_APP_API_URL=\"https://pray.doxa.life\";</script>\n<script src=\"./doxa-simple-map/doxa-simple-map.js\" integrity=\"sha384-A1s+I+d0avERLG0kEo0+tFt1T2IpA8LsScPb1Rc0rECo8nt3e7dNxVYB5J+yzFzH\" crossorigin=\"anonymous\"></script>\n<!-- MapLibre draws this map and needs no token. For Mapbox, paste this map's embed.scriptMapbox from manifest.json instead: it sets \"provider\":\"mapbox\" and preloads the Mapbox engine; fill \"tk\" with your token. -->\n<doxa-map profile-config='{\"profile\":\"doxa-simple-map\",\"provider\":\"maplibre\",\"tk\":\"YOUR_MAPBOX_TOKEN\",\"utmSource\":\"YOUR_SOURCE\",\"assetsBase\":\"YOUR_TREE_URL/assets\"}'></doxa-map>",
|
||||
"scriptMapbox": "<!-- Mapbox engine, fetched early -->\n<link rel=\"preload\" as=\"script\" href=\"https://api.mapbox.com/mapbox-gl-js/v3.24.0/mapbox-gl.js\" integrity=\"sha384-tO0clamXONKwbiz7O6xJpUeyJbTSPugC+xM9clvfFvKTH3i8SmCawHGdf5quMWmZ\" crossorigin=\"anonymous\">\n<link rel=\"preload\" as=\"style\" href=\"https://api.mapbox.com/mapbox-gl-js/v3.24.0/mapbox-gl.css\" integrity=\"sha384-rp1X/jJ9MpWPef9OimfXhOaOc4Gzs87yQvF+ajwY6X2H4PTeHNycNlLWiWvj7ehV\" crossorigin=\"anonymous\">\n<script>window.MAP_APP_API_URL=\"https://pray.doxa.life\";</script>\n<script src=\"./doxa-simple-map/doxa-simple-map.js\" integrity=\"sha384-A1s+I+d0avERLG0kEo0+tFt1T2IpA8LsScPb1Rc0rECo8nt3e7dNxVYB5J+yzFzH\" crossorigin=\"anonymous\"></script>\n<!-- Mapbox draws this map: fill \"tk\" with your Mapbox token. -->\n<doxa-map profile-config='{\"profile\":\"doxa-simple-map\",\"provider\":\"mapbox\",\"tk\":\"YOUR_MAPBOX_TOKEN\",\"utmSource\":\"YOUR_SOURCE\",\"assetsBase\":\"YOUR_TREE_URL/assets\"}'></doxa-map>"
|
||||
},
|
||||
"instances": [
|
||||
{
|
||||
|
|
|
|||
|
|
@ -84,8 +84,17 @@ provided instance. Drop the provide and a host can no longer set your plugin's l
|
|||
- **Don't edit `library/` to customise one plugin.** A library change reaches every plugin that
|
||||
imports it, so it needs every consumer rebuilt. On a team with a build owner, hand library
|
||||
changes to that owner rather than landing them yourself.
|
||||
- **Graduate late.** Move code into `library/` only when a second plugin needs the same thing
|
||||
and it takes props instead of hard-coded specifics.
|
||||
- **Reusable by default.** If a component could serve more than one plugin, build it once in
|
||||
`library/`, driven by props rather than hard-coded to your plugin, and land it through the build owner.
|
||||
Other plugins then adopt it instead of copying it.
|
||||
- **A new pattern is piloted, approved, then rolled out.** It starts on one plugin, built by that
|
||||
plugin's owner, and a maintainer approves it on the dev server (the Plugin Studio). Only then do
|
||||
the owners of the other plugins it applies to adopt it, each in their own plugin.
|
||||
- **One shape per kind of control.** Controls on a map are round and spaced apart: put them in
|
||||
`MapToolbar`, whose default is a spaced column of round `MapControlButton`s (both in
|
||||
`library/components/map-controls/`), not its grouped square card (`controls="square"`). Buttons in
|
||||
a dashboard's header bar are rounded squares with the vertical tabs' corner radius
|
||||
(`var(--vtl-radius, 8px)` in `library/layouts/VerticalTabsLayout.vue`).
|
||||
|
||||
## 4. The universal props — every plugin honours these
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue