Update from source 6d7da1c0
This commit is contained in:
parent
b624452cf7
commit
70c29013ba
8 changed files with 16 additions and 14 deletions
|
|
@ -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)
|
├── overview.vue ← one .vue = one PROFILE (flat in the folder — no profiles/ subfolder)
|
||||||
└── detail.vue ← another profile in the SAME bundle
|
└── 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).
|
- **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:
|
- **Pick the profile at embed time** with the `profile` field — every profile shares one bundle:
|
||||||
|
|
||||||
```html
|
```html
|
||||||
<script src="/doxa-maps/<your-map>/<your-map>.js"></script>
|
<script src="/dx-maps/<your-map>/<your-map>.js"></script>
|
||||||
<doxa-map profile-config='{"profile":"overview","tk":"pk.eyJ..."}'></doxa-map>
|
<your-map profile-config='{"profile":"overview","tk":"pk.eyJ..."}'></your-map>
|
||||||
<doxa-map profile-config='{"profile":"detail","tk":"pk.eyJ..."}'></doxa-map>
|
<your-map profile-config='{"profile":"detail","tk":"pk.eyJ..."}'></your-map>
|
||||||
```
|
```
|
||||||
|
|
||||||
## Add a map — three steps
|
## 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)
|
# <name>.vue ← your screen, built from @map/* blocks (flat in the folder)
|
||||||
|
|
||||||
# 2. build
|
# 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)
|
# (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)
|
# 3. embed the script tag + element (dev staging at `npm run dev` shows a paste-ready snippet)
|
||||||
|
|
|
||||||
|
|
@ -50,7 +50,9 @@ const urlLang = (() => {
|
||||||
try { const q = new URLSearchParams(window.location.search); return q.get('lang') || q.get('locale') || '' } catch { return '' }
|
try { const q = new URLSearchParams(window.location.search); return q.get('lang') || q.get('locale') || '' } catch { return '' }
|
||||||
})()
|
})()
|
||||||
const locale = computed(() => {
|
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()
|
const base = raw.split('-')[0].toLowerCase()
|
||||||
return STRINGS[raw] ? raw : (STRINGS[base] ? base : 'en')
|
return STRINGS[raw] ? raw : (STRINGS[base] ? base : 'en')
|
||||||
})
|
})
|
||||||
|
|
|
||||||
|
|
@ -492,7 +492,7 @@
|
||||||
"bundle": "doxa-vision-card",
|
"bundle": "doxa-vision-card",
|
||||||
"scriptUrl": "./doxa-vision-card/doxa-vision-card.js",
|
"scriptUrl": "./doxa-vision-card/doxa-vision-card.js",
|
||||||
"output": "dx-maps/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": [
|
"elements": [
|
||||||
"doxa-vision-card"
|
"doxa-vision-card"
|
||||||
],
|
],
|
||||||
|
|
@ -508,7 +508,7 @@
|
||||||
"scriptUrl": "./doxa-vision-card/doxa-vision-card.js",
|
"scriptUrl": "./doxa-vision-card/doxa-vision-card.js",
|
||||||
"embed": {
|
"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>",
|
"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": [
|
"instances": [
|
||||||
{
|
{
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
|
|
@ -26,7 +26,7 @@
|
||||||
|
|
||||||
<script>window.MAP_APP_API_URL = "https://pray.doxa.life";</script>
|
<script>window.MAP_APP_API_URL = "https://pray.doxa.life";</script>
|
||||||
<!-- Bundle IIFE — registers the <doxa-vision-card> custom element. -->
|
<!-- 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>
|
<script>
|
||||||
// Mapbox token resolution — the A3 ladder, in precedence order:
|
// Mapbox token resolution — the A3 ladder, in precedence order:
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,7 @@
|
||||||
|
|
||||||
<script>window.MAP_APP_API_URL = "https://pray.doxa.life";</script>
|
<script>window.MAP_APP_API_URL = "https://pray.doxa.life";</script>
|
||||||
<!-- Bundle IIFE — registers the <doxa-vision-card> custom element. -->
|
<!-- 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>
|
<script>
|
||||||
// Mapbox token resolution — the A3 ladder, in precedence order:
|
// Mapbox token resolution — the A3 ladder, in precedence order:
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,7 @@
|
||||||
|
|
||||||
<script>window.MAP_APP_API_URL = "https://pray.doxa.life";</script>
|
<script>window.MAP_APP_API_URL = "https://pray.doxa.life";</script>
|
||||||
<!-- Bundle IIFE — registers the <doxa-vision-card> custom element. -->
|
<!-- 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>
|
<script>
|
||||||
// Mapbox token resolution — the A3 ladder, in precedence order:
|
// Mapbox token resolution — the A3 ladder, in precedence order:
|
||||||
|
|
|
||||||
|
|
@ -492,7 +492,7 @@
|
||||||
"bundle": "doxa-vision-card",
|
"bundle": "doxa-vision-card",
|
||||||
"scriptUrl": "./doxa-vision-card/doxa-vision-card.js",
|
"scriptUrl": "./doxa-vision-card/doxa-vision-card.js",
|
||||||
"output": "dx-maps/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": [
|
"elements": [
|
||||||
"doxa-vision-card"
|
"doxa-vision-card"
|
||||||
],
|
],
|
||||||
|
|
@ -508,7 +508,7 @@
|
||||||
"scriptUrl": "./doxa-vision-card/doxa-vision-card.js",
|
"scriptUrl": "./doxa-vision-card/doxa-vision-card.js",
|
||||||
"embed": {
|
"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>",
|
"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": [
|
"instances": [
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue