Update from source 6d7da1c0
Some checks are pending
Deploy to GitHub Pages / build (push) Waiting to run
Deploy to GitHub Pages / deploy (push) Blocked by required conditions

This commit is contained in:
Doxa Maps 2026-09-26 01:39:45 +00:00
parent b624452cf7
commit 70c29013ba
8 changed files with 16 additions and 14 deletions

View file

@ -47,7 +47,7 @@ plugin-designs/<your-map>/ ← one FOLDER = one BUNDLE, named after the fold
├── overview.vue ← one .vue = one PROFILE (flat in the folder — no profiles/ subfolder)
└── detail.vue ← another profile in the SAME bundle
builds to ─────────────► public/doxa-maps/<your-map>/<your-map>.js (one file)
builds to ─────────────► public/dx-maps/<your-map>/<your-map>.js (one file)
```
- **Folder name = bundle name.** Folders starting with `_` or `.` are skipped (handy for WIP).
@ -55,9 +55,9 @@ plugin-designs/<your-map>/ ← one FOLDER = one BUNDLE, named after the fold
- **Pick the profile at embed time** with the `profile` field — every profile shares one bundle:
```html
<script src="/doxa-maps/<your-map>/<your-map>.js"></script>
<doxa-map profile-config='{"profile":"overview","tk":"pk.eyJ..."}'></doxa-map>
<doxa-map profile-config='{"profile":"detail","tk":"pk.eyJ..."}'></doxa-map>
<script src="/dx-maps/<your-map>/<your-map>.js"></script>
<your-map profile-config='{"profile":"overview","tk":"pk.eyJ..."}'></your-map>
<your-map profile-config='{"profile":"detail","tk":"pk.eyJ..."}'></your-map>
```
## Add a map — three steps
@ -69,7 +69,7 @@ mkdir -p plugin-designs/<your-map>
# <name>.vue ← your screen, built from @map/* blocks (flat in the folder)
# 2. build
npm run build # → public/doxa-maps/<your-map>/<your-map>.js
npm run build # → public/dx-maps/<your-map>/<your-map>.js
# (just this one: BUNDLE=<your-map> npm run build:bundle)
# 3. embed the script tag + element (dev staging at `npm run dev` shows a paste-ready snippet)

View file

@ -50,7 +50,9 @@ const urlLang = (() => {
try { const q = new URLSearchParams(window.location.search); return q.get('lang') || q.get('locale') || '' } catch { return '' }
})()
const locale = computed(() => {
const raw = String(config.value.locale || urlLang || (typeof document !== 'undefined' && document.documentElement.lang) || 'en')
// profile-config `locale` OR `lang`: composites forward the page language as `lang`, so a card
// nested in one missed it and fell back to English (documentation/reference-universal-props.md).
const raw = String(config.value.locale || config.value.lang || urlLang || (typeof document !== 'undefined' && document.documentElement.lang) || 'en')
const base = raw.split('-')[0].toLowerCase()
return STRINGS[raw] ? raw : (STRINGS[base] ? base : 'en')
})

View file

@ -492,7 +492,7 @@
"bundle": "doxa-vision-card",
"scriptUrl": "./doxa-vision-card/doxa-vision-card.js",
"output": "dx-maps/doxa-vision-card/doxa-vision-card.js",
"integrity": "sha384-ga7XpXFyxJDd8VrtMejKuLRx8YFuxJoT+DXkcpehJXptsM4phiKamyTBYJpudSSj",
"integrity": "sha384-ZChtIPhUBbNtPSWFmaGfEJWMn/LnEJWC+/qyPGAOYSRenGdrx+ZjoOchfsLg0Epr",
"elements": [
"doxa-vision-card"
],
@ -508,7 +508,7 @@
"scriptUrl": "./doxa-vision-card/doxa-vision-card.js",
"embed": {
"iframe": "<iframe src=\"./doxa-vision-card/doxa-vision-card/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-vision-card/doxa-vision-card.js\" integrity=\"sha384-ga7XpXFyxJDd8VrtMejKuLRx8YFuxJoT+DXkcpehJXptsM4phiKamyTBYJpudSSj\" crossorigin=\"anonymous\"></script>\n<doxa-vision-card profile-config='{\"profile\":\"doxa-vision-card\",\"tk\":\"YOUR_MAPBOX_TOKEN\",\"utmSource\":\"YOUR_SOURCE\",\"assetsBase\":\"YOUR_TREE_URL/assets\"}'></doxa-vision-card>"
"script": "<script>window.MAP_APP_API_URL=\"https://pray.doxa.life\";</script>\n<script src=\"./doxa-vision-card/doxa-vision-card.js\" integrity=\"sha384-ZChtIPhUBbNtPSWFmaGfEJWMn/LnEJWC+/qyPGAOYSRenGdrx+ZjoOchfsLg0Epr\" crossorigin=\"anonymous\"></script>\n<doxa-vision-card profile-config='{\"profile\":\"doxa-vision-card\",\"tk\":\"YOUR_MAPBOX_TOKEN\",\"utmSource\":\"YOUR_SOURCE\",\"assetsBase\":\"YOUR_TREE_URL/assets\"}'></doxa-vision-card>"
},
"instances": [
{

File diff suppressed because one or more lines are too long

View file

@ -26,7 +26,7 @@
<script>window.MAP_APP_API_URL = "https://pray.doxa.life";</script>
<!-- Bundle IIFE — registers the <doxa-vision-card> custom element. -->
<script src="../../doxa-vision-card.js" integrity="sha384-ga7XpXFyxJDd8VrtMejKuLRx8YFuxJoT+DXkcpehJXptsM4phiKamyTBYJpudSSj" crossorigin="anonymous"></script>
<script src="../../doxa-vision-card.js" integrity="sha384-ZChtIPhUBbNtPSWFmaGfEJWMn/LnEJWC+/qyPGAOYSRenGdrx+ZjoOchfsLg0Epr" crossorigin="anonymous"></script>
<script>
// Mapbox token resolution — the A3 ladder, in precedence order:

View file

@ -26,7 +26,7 @@
<script>window.MAP_APP_API_URL = "https://pray.doxa.life";</script>
<!-- Bundle IIFE — registers the <doxa-vision-card> custom element. -->
<script src="../../doxa-vision-card.js" integrity="sha384-ga7XpXFyxJDd8VrtMejKuLRx8YFuxJoT+DXkcpehJXptsM4phiKamyTBYJpudSSj" crossorigin="anonymous"></script>
<script src="../../doxa-vision-card.js" integrity="sha384-ZChtIPhUBbNtPSWFmaGfEJWMn/LnEJWC+/qyPGAOYSRenGdrx+ZjoOchfsLg0Epr" crossorigin="anonymous"></script>
<script>
// Mapbox token resolution — the A3 ladder, in precedence order:

View file

@ -26,7 +26,7 @@
<script>window.MAP_APP_API_URL = "https://pray.doxa.life";</script>
<!-- Bundle IIFE — registers the <doxa-vision-card> custom element. -->
<script src="../doxa-vision-card.js" integrity="sha384-ga7XpXFyxJDd8VrtMejKuLRx8YFuxJoT+DXkcpehJXptsM4phiKamyTBYJpudSSj" crossorigin="anonymous"></script>
<script src="../doxa-vision-card.js" integrity="sha384-ZChtIPhUBbNtPSWFmaGfEJWMn/LnEJWC+/qyPGAOYSRenGdrx+ZjoOchfsLg0Epr" crossorigin="anonymous"></script>
<script>
// Mapbox token resolution — the A3 ladder, in precedence order:

View file

@ -492,7 +492,7 @@
"bundle": "doxa-vision-card",
"scriptUrl": "./doxa-vision-card/doxa-vision-card.js",
"output": "dx-maps/doxa-vision-card/doxa-vision-card.js",
"integrity": "sha384-ga7XpXFyxJDd8VrtMejKuLRx8YFuxJoT+DXkcpehJXptsM4phiKamyTBYJpudSSj",
"integrity": "sha384-ZChtIPhUBbNtPSWFmaGfEJWMn/LnEJWC+/qyPGAOYSRenGdrx+ZjoOchfsLg0Epr",
"elements": [
"doxa-vision-card"
],
@ -508,7 +508,7 @@
"scriptUrl": "./doxa-vision-card/doxa-vision-card.js",
"embed": {
"iframe": "<iframe src=\"./doxa-vision-card/doxa-vision-card/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-vision-card/doxa-vision-card.js\" integrity=\"sha384-ga7XpXFyxJDd8VrtMejKuLRx8YFuxJoT+DXkcpehJXptsM4phiKamyTBYJpudSSj\" crossorigin=\"anonymous\"></script>\n<doxa-vision-card profile-config='{\"profile\":\"doxa-vision-card\",\"tk\":\"YOUR_MAPBOX_TOKEN\",\"utmSource\":\"YOUR_SOURCE\",\"assetsBase\":\"YOUR_TREE_URL/assets\"}'></doxa-vision-card>"
"script": "<script>window.MAP_APP_API_URL=\"https://pray.doxa.life\";</script>\n<script src=\"./doxa-vision-card/doxa-vision-card.js\" integrity=\"sha384-ZChtIPhUBbNtPSWFmaGfEJWMn/LnEJWC+/qyPGAOYSRenGdrx+ZjoOchfsLg0Epr\" crossorigin=\"anonymous\"></script>\n<doxa-vision-card profile-config='{\"profile\":\"doxa-vision-card\",\"tk\":\"YOUR_MAPBOX_TOKEN\",\"utmSource\":\"YOUR_SOURCE\",\"assetsBase\":\"YOUR_TREE_URL/assets\"}'></doxa-vision-card>"
},
"instances": [
{