@jean-is/render 0.0.0-stage → 0.8.0-ra7be83a699f8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +2 -2
- package/caps/charts/charts.css +12 -0
- package/caps/charts/charts.js +154 -0
- package/caps/charts/option.js +141 -0
- package/caps/interactive/diagram.js +415 -0
- package/caps/interactive/interactive.css +21 -0
- package/caps/interactive/interactive.js +345 -0
- package/caps/interactive/map.js +183 -0
- package/caps/interactive/mode.js +54 -0
- package/caps/layouts/layouts.css +179 -0
- package/caps/layouts/layouts.js +147 -0
- package/caps/layouts/shapes.js +159 -0
- package/caps/math/latex.js +88 -0
- package/caps/math/math.css +24 -0
- package/caps/math/math.js +117 -0
- package/caps/scores/notes.js +30 -0
- package/caps/scores/scores.css +22 -0
- package/caps/scores/scores.js +287 -0
- package/caps/scores/sound-worker.js +12 -0
- package/caps/scores/sound.js +72 -0
- package/caps/share/seal.js +86 -0
- package/caps/share/view.js +153 -0
- package/caps/skills/directory.js +57 -0
- package/caps/skills/sources.js +281 -0
- package/caps/slides/deck.js +69 -0
- package/caps/slides/slides.css +38 -0
- package/caps/slides/slides.js +122 -0
- package/core/anthropic.js +253 -0
- package/core/deferred.js +48 -0
- package/core/events.js +166 -0
- package/core/files.js +277 -0
- package/core/fs.js +186 -0
- package/core/hooks.js +53 -0
- package/core/i18n.js +151 -0
- package/core/llm.js +383 -0
- package/core/loop.js +452 -0
- package/core/rules.js +52 -0
- package/core/search.js +158 -0
- package/core/settings.js +221 -0
- package/core/skills.js +90 -0
- package/core/sse.js +51 -0
- package/core/ulid.js +17 -0
- package/core/zip.js +165 -0
- package/fonts/OFL.txt +94 -0
- package/fonts/display.woff2 +0 -0
- package/locales/am.json +395 -0
- package/locales/ar.json +427 -0
- package/locales/ask/am.json +8 -0
- package/locales/ask/ar.json +8 -0
- package/locales/ask/bn.json +8 -0
- package/locales/ask/de.json +8 -0
- package/locales/ask/en.json +8 -0
- package/locales/ask/es.json +8 -0
- package/locales/ask/fa.json +8 -0
- package/locales/ask/fr.json +8 -0
- package/locales/ask/ha.json +8 -0
- package/locales/ask/he.json +8 -0
- package/locales/ask/hi.json +8 -0
- package/locales/ask/id.json +8 -0
- package/locales/ask/it.json +8 -0
- package/locales/ask/ja.json +8 -0
- package/locales/ask/ko.json +8 -0
- package/locales/ask/mr.json +8 -0
- package/locales/ask/ms.json +8 -0
- package/locales/ask/nl.json +8 -0
- package/locales/ask/pl.json +8 -0
- package/locales/ask/pt.json +8 -0
- package/locales/ask/ru.json +8 -0
- package/locales/ask/sw.json +8 -0
- package/locales/ask/ta.json +8 -0
- package/locales/ask/te.json +8 -0
- package/locales/ask/th.json +8 -0
- package/locales/ask/tl.json +8 -0
- package/locales/ask/tr.json +8 -0
- package/locales/ask/uk.json +8 -0
- package/locales/ask/ur.json +8 -0
- package/locales/ask/vi.json +8 -0
- package/locales/ask/yo.json +8 -0
- package/locales/ask/zh-Hans.json +8 -0
- package/locales/ask/zh-Hant.json +8 -0
- package/locales/backup/am.json +8 -0
- package/locales/backup/ar.json +12 -0
- package/locales/backup/bn.json +8 -0
- package/locales/backup/de.json +8 -0
- package/locales/backup/en.json +8 -0
- package/locales/backup/es.json +9 -0
- package/locales/backup/fa.json +8 -0
- package/locales/backup/fr.json +9 -0
- package/locales/backup/ha.json +8 -0
- package/locales/backup/he.json +10 -0
- package/locales/backup/hi.json +8 -0
- package/locales/backup/id.json +7 -0
- package/locales/backup/it.json +9 -0
- package/locales/backup/ja.json +7 -0
- package/locales/backup/ko.json +7 -0
- package/locales/backup/mr.json +8 -0
- package/locales/backup/ms.json +7 -0
- package/locales/backup/nl.json +8 -0
- package/locales/backup/pl.json +10 -0
- package/locales/backup/pt.json +9 -0
- package/locales/backup/ru.json +10 -0
- package/locales/backup/sw.json +8 -0
- package/locales/backup/ta.json +8 -0
- package/locales/backup/te.json +8 -0
- package/locales/backup/th.json +7 -0
- package/locales/backup/tl.json +8 -0
- package/locales/backup/tr.json +8 -0
- package/locales/backup/uk.json +10 -0
- package/locales/backup/ur.json +8 -0
- package/locales/backup/vi.json +7 -0
- package/locales/backup/yo.json +7 -0
- package/locales/backup/zh-Hans.json +7 -0
- package/locales/backup/zh-Hant.json +7 -0
- package/locales/bn.json +395 -0
- package/locales/brain-local/am.json +13 -0
- package/locales/brain-local/ar.json +13 -0
- package/locales/brain-local/bn.json +13 -0
- package/locales/brain-local/de.json +13 -0
- package/locales/brain-local/en.json +13 -0
- package/locales/brain-local/es.json +13 -0
- package/locales/brain-local/fa.json +13 -0
- package/locales/brain-local/fr.json +13 -0
- package/locales/brain-local/ha.json +13 -0
- package/locales/brain-local/he.json +13 -0
- package/locales/brain-local/hi.json +13 -0
- package/locales/brain-local/id.json +13 -0
- package/locales/brain-local/it.json +13 -0
- package/locales/brain-local/ja.json +13 -0
- package/locales/brain-local/ko.json +13 -0
- package/locales/brain-local/mr.json +13 -0
- package/locales/brain-local/ms.json +13 -0
- package/locales/brain-local/nl.json +13 -0
- package/locales/brain-local/pl.json +13 -0
- package/locales/brain-local/pt.json +13 -0
- package/locales/brain-local/ru.json +13 -0
- package/locales/brain-local/sw.json +13 -0
- package/locales/brain-local/ta.json +13 -0
- package/locales/brain-local/te.json +13 -0
- package/locales/brain-local/th.json +13 -0
- package/locales/brain-local/tl.json +13 -0
- package/locales/brain-local/tr.json +13 -0
- package/locales/brain-local/uk.json +13 -0
- package/locales/brain-local/ur.json +13 -0
- package/locales/brain-local/vi.json +13 -0
- package/locales/brain-local/yo.json +13 -0
- package/locales/brain-local/zh-Hans.json +13 -0
- package/locales/brain-local/zh-Hant.json +13 -0
- package/locales/browser/am.json +29 -0
- package/locales/browser/ar.json +29 -0
- package/locales/browser/bn.json +29 -0
- package/locales/browser/de.json +29 -0
- package/locales/browser/en.json +29 -0
- package/locales/browser/es.json +29 -0
- package/locales/browser/fa.json +29 -0
- package/locales/browser/fr.json +29 -0
- package/locales/browser/ha.json +29 -0
- package/locales/browser/he.json +29 -0
- package/locales/browser/hi.json +29 -0
- package/locales/browser/id.json +29 -0
- package/locales/browser/it.json +29 -0
- package/locales/browser/ja.json +29 -0
- package/locales/browser/ko.json +29 -0
- package/locales/browser/mr.json +29 -0
- package/locales/browser/ms.json +29 -0
- package/locales/browser/nl.json +29 -0
- package/locales/browser/pl.json +29 -0
- package/locales/browser/pt.json +29 -0
- package/locales/browser/ru.json +29 -0
- package/locales/browser/sw.json +29 -0
- package/locales/browser/ta.json +29 -0
- package/locales/browser/te.json +29 -0
- package/locales/browser/th.json +29 -0
- package/locales/browser/tl.json +29 -0
- package/locales/browser/tr.json +29 -0
- package/locales/browser/uk.json +29 -0
- package/locales/browser/ur.json +29 -0
- package/locales/browser/vi.json +29 -0
- package/locales/browser/yo.json +29 -0
- package/locales/browser/zh-Hans.json +29 -0
- package/locales/browser/zh-Hant.json +29 -0
- package/locales/certificates/am.json +54 -0
- package/locales/certificates/ar.json +54 -0
- package/locales/certificates/bn.json +54 -0
- package/locales/certificates/de.json +54 -0
- package/locales/certificates/en.json +54 -0
- package/locales/certificates/es.json +54 -0
- package/locales/certificates/fa.json +54 -0
- package/locales/certificates/fr.json +54 -0
- package/locales/certificates/ha.json +54 -0
- package/locales/certificates/he.json +54 -0
- package/locales/certificates/hi.json +54 -0
- package/locales/certificates/id.json +54 -0
- package/locales/certificates/it.json +54 -0
- package/locales/certificates/ja.json +54 -0
- package/locales/certificates/ko.json +54 -0
- package/locales/certificates/mr.json +54 -0
- package/locales/certificates/ms.json +54 -0
- package/locales/certificates/nl.json +54 -0
- package/locales/certificates/pl.json +54 -0
- package/locales/certificates/pt.json +54 -0
- package/locales/certificates/ru.json +54 -0
- package/locales/certificates/sw.json +54 -0
- package/locales/certificates/ta.json +54 -0
- package/locales/certificates/te.json +54 -0
- package/locales/certificates/th.json +54 -0
- package/locales/certificates/tl.json +54 -0
- package/locales/certificates/tr.json +54 -0
- package/locales/certificates/uk.json +54 -0
- package/locales/certificates/ur.json +54 -0
- package/locales/certificates/vi.json +54 -0
- package/locales/certificates/yo.json +54 -0
- package/locales/certificates/zh-Hans.json +54 -0
- package/locales/certificates/zh-Hant.json +54 -0
- package/locales/charts/am.json +5 -0
- package/locales/charts/ar.json +5 -0
- package/locales/charts/bn.json +5 -0
- package/locales/charts/de.json +5 -0
- package/locales/charts/en.json +5 -0
- package/locales/charts/es.json +5 -0
- package/locales/charts/fa.json +5 -0
- package/locales/charts/fr.json +5 -0
- package/locales/charts/ha.json +5 -0
- package/locales/charts/he.json +5 -0
- package/locales/charts/hi.json +5 -0
- package/locales/charts/id.json +5 -0
- package/locales/charts/it.json +5 -0
- package/locales/charts/ja.json +5 -0
- package/locales/charts/ko.json +5 -0
- package/locales/charts/mr.json +5 -0
- package/locales/charts/ms.json +5 -0
- package/locales/charts/nl.json +5 -0
- package/locales/charts/pl.json +5 -0
- package/locales/charts/pt.json +5 -0
- package/locales/charts/ru.json +5 -0
- package/locales/charts/sw.json +5 -0
- package/locales/charts/ta.json +5 -0
- package/locales/charts/te.json +5 -0
- package/locales/charts/th.json +5 -0
- package/locales/charts/tl.json +5 -0
- package/locales/charts/tr.json +5 -0
- package/locales/charts/uk.json +5 -0
- package/locales/charts/ur.json +5 -0
- package/locales/charts/vi.json +5 -0
- package/locales/charts/yo.json +5 -0
- package/locales/charts/zh-Hans.json +5 -0
- package/locales/charts/zh-Hant.json +5 -0
- package/locales/compact/am.json +7 -0
- package/locales/compact/ar.json +7 -0
- package/locales/compact/bn.json +7 -0
- package/locales/compact/de.json +7 -0
- package/locales/compact/en.json +7 -0
- package/locales/compact/es.json +7 -0
- package/locales/compact/fa.json +7 -0
- package/locales/compact/fr.json +7 -0
- package/locales/compact/ha.json +7 -0
- package/locales/compact/he.json +7 -0
- package/locales/compact/hi.json +7 -0
- package/locales/compact/id.json +7 -0
- package/locales/compact/it.json +7 -0
- package/locales/compact/ja.json +7 -0
- package/locales/compact/ko.json +7 -0
- package/locales/compact/mr.json +7 -0
- package/locales/compact/ms.json +7 -0
- package/locales/compact/nl.json +7 -0
- package/locales/compact/pl.json +7 -0
- package/locales/compact/pt.json +7 -0
- package/locales/compact/ru.json +7 -0
- package/locales/compact/sw.json +7 -0
- package/locales/compact/ta.json +7 -0
- package/locales/compact/te.json +7 -0
- package/locales/compact/th.json +7 -0
- package/locales/compact/tl.json +7 -0
- package/locales/compact/tr.json +7 -0
- package/locales/compact/uk.json +7 -0
- package/locales/compact/ur.json +7 -0
- package/locales/compact/vi.json +7 -0
- package/locales/compact/yo.json +7 -0
- package/locales/compact/zh-Hans.json +7 -0
- package/locales/compact/zh-Hant.json +7 -0
- package/locales/computer/am.json +61 -0
- package/locales/computer/ar.json +69 -0
- package/locales/computer/bn.json +61 -0
- package/locales/computer/de.json +61 -0
- package/locales/computer/en.json +61 -0
- package/locales/computer/es.json +63 -0
- package/locales/computer/fa.json +61 -0
- package/locales/computer/fr.json +63 -0
- package/locales/computer/ha.json +61 -0
- package/locales/computer/he.json +63 -0
- package/locales/computer/hi.json +61 -0
- package/locales/computer/id.json +59 -0
- package/locales/computer/it.json +63 -0
- package/locales/computer/ja.json +59 -0
- package/locales/computer/ko.json +59 -0
- package/locales/computer/mr.json +61 -0
- package/locales/computer/ms.json +59 -0
- package/locales/computer/nl.json +61 -0
- package/locales/computer/pl.json +65 -0
- package/locales/computer/pt.json +63 -0
- package/locales/computer/ru.json +65 -0
- package/locales/computer/sw.json +61 -0
- package/locales/computer/ta.json +61 -0
- package/locales/computer/te.json +61 -0
- package/locales/computer/th.json +59 -0
- package/locales/computer/tl.json +61 -0
- package/locales/computer/tr.json +61 -0
- package/locales/computer/uk.json +65 -0
- package/locales/computer/ur.json +61 -0
- package/locales/computer/vi.json +59 -0
- package/locales/computer/yo.json +59 -0
- package/locales/computer/zh-Hans.json +59 -0
- package/locales/computer/zh-Hant.json +59 -0
- package/locales/connections/am.json +14 -0
- package/locales/connections/ar.json +14 -0
- package/locales/connections/bn.json +14 -0
- package/locales/connections/de.json +14 -0
- package/locales/connections/en.json +14 -0
- package/locales/connections/es.json +14 -0
- package/locales/connections/fa.json +14 -0
- package/locales/connections/fr.json +14 -0
- package/locales/connections/ha.json +14 -0
- package/locales/connections/he.json +14 -0
- package/locales/connections/hi.json +14 -0
- package/locales/connections/id.json +14 -0
- package/locales/connections/it.json +14 -0
- package/locales/connections/ja.json +14 -0
- package/locales/connections/ko.json +14 -0
- package/locales/connections/mr.json +14 -0
- package/locales/connections/ms.json +14 -0
- package/locales/connections/nl.json +14 -0
- package/locales/connections/pl.json +14 -0
- package/locales/connections/pt.json +14 -0
- package/locales/connections/ru.json +14 -0
- package/locales/connections/sw.json +14 -0
- package/locales/connections/ta.json +14 -0
- package/locales/connections/te.json +14 -0
- package/locales/connections/th.json +14 -0
- package/locales/connections/tl.json +14 -0
- package/locales/connections/tr.json +14 -0
- package/locales/connections/uk.json +14 -0
- package/locales/connections/ur.json +14 -0
- package/locales/connections/vi.json +14 -0
- package/locales/connections/yo.json +14 -0
- package/locales/connections/zh-Hans.json +14 -0
- package/locales/connections/zh-Hant.json +14 -0
- package/locales/de.json +395 -0
- package/locales/dialogs/am.json +347 -0
- package/locales/dialogs/ar.json +359 -0
- package/locales/dialogs/bn.json +347 -0
- package/locales/dialogs/de.json +347 -0
- package/locales/dialogs/en.json +347 -0
- package/locales/dialogs/es.json +350 -0
- package/locales/dialogs/fa.json +347 -0
- package/locales/dialogs/fr.json +350 -0
- package/locales/dialogs/ha.json +347 -0
- package/locales/dialogs/he.json +352 -0
- package/locales/dialogs/hi.json +347 -0
- package/locales/dialogs/id.json +344 -0
- package/locales/dialogs/it.json +350 -0
- package/locales/dialogs/ja.json +344 -0
- package/locales/dialogs/ko.json +344 -0
- package/locales/dialogs/mr.json +347 -0
- package/locales/dialogs/ms.json +344 -0
- package/locales/dialogs/nl.json +347 -0
- package/locales/dialogs/pl.json +353 -0
- package/locales/dialogs/pt.json +350 -0
- package/locales/dialogs/ru.json +353 -0
- package/locales/dialogs/sw.json +347 -0
- package/locales/dialogs/ta.json +347 -0
- package/locales/dialogs/te.json +347 -0
- package/locales/dialogs/th.json +344 -0
- package/locales/dialogs/tl.json +347 -0
- package/locales/dialogs/tr.json +347 -0
- package/locales/dialogs/uk.json +353 -0
- package/locales/dialogs/ur.json +347 -0
- package/locales/dialogs/vi.json +344 -0
- package/locales/dialogs/yo.json +344 -0
- package/locales/dialogs/zh-Hans.json +344 -0
- package/locales/dialogs/zh-Hant.json +344 -0
- package/locales/en.json +395 -0
- package/locales/enterprise/am.json +20 -0
- package/locales/enterprise/ar.json +20 -0
- package/locales/enterprise/bn.json +20 -0
- package/locales/enterprise/de.json +20 -0
- package/locales/enterprise/en.json +20 -0
- package/locales/enterprise/es.json +20 -0
- package/locales/enterprise/fa.json +20 -0
- package/locales/enterprise/fr.json +20 -0
- package/locales/enterprise/ha.json +20 -0
- package/locales/enterprise/he.json +20 -0
- package/locales/enterprise/hi.json +20 -0
- package/locales/enterprise/id.json +20 -0
- package/locales/enterprise/it.json +20 -0
- package/locales/enterprise/ja.json +20 -0
- package/locales/enterprise/ko.json +20 -0
- package/locales/enterprise/mr.json +20 -0
- package/locales/enterprise/ms.json +20 -0
- package/locales/enterprise/nl.json +20 -0
- package/locales/enterprise/pl.json +20 -0
- package/locales/enterprise/pt.json +20 -0
- package/locales/enterprise/ru.json +20 -0
- package/locales/enterprise/sw.json +20 -0
- package/locales/enterprise/ta.json +20 -0
- package/locales/enterprise/te.json +20 -0
- package/locales/enterprise/th.json +20 -0
- package/locales/enterprise/tl.json +20 -0
- package/locales/enterprise/tr.json +20 -0
- package/locales/enterprise/uk.json +20 -0
- package/locales/enterprise/ur.json +20 -0
- package/locales/enterprise/vi.json +20 -0
- package/locales/enterprise/yo.json +20 -0
- package/locales/enterprise/zh-Hans.json +20 -0
- package/locales/enterprise/zh-Hant.json +20 -0
- package/locales/es.json +403 -0
- package/locales/fa.json +395 -0
- package/locales/first/am.json +26 -0
- package/locales/first/ar.json +26 -0
- package/locales/first/bn.json +26 -0
- package/locales/first/de.json +26 -0
- package/locales/first/en.json +26 -0
- package/locales/first/es.json +26 -0
- package/locales/first/fa.json +26 -0
- package/locales/first/fr.json +26 -0
- package/locales/first/ha.json +26 -0
- package/locales/first/he.json +26 -0
- package/locales/first/hi.json +26 -0
- package/locales/first/id.json +26 -0
- package/locales/first/it.json +26 -0
- package/locales/first/ja.json +26 -0
- package/locales/first/ko.json +26 -0
- package/locales/first/mr.json +26 -0
- package/locales/first/ms.json +26 -0
- package/locales/first/nl.json +26 -0
- package/locales/first/pl.json +26 -0
- package/locales/first/pt.json +26 -0
- package/locales/first/ru.json +26 -0
- package/locales/first/sw.json +26 -0
- package/locales/first/ta.json +26 -0
- package/locales/first/te.json +26 -0
- package/locales/first/th.json +26 -0
- package/locales/first/tl.json +26 -0
- package/locales/first/tr.json +26 -0
- package/locales/first/uk.json +26 -0
- package/locales/first/ur.json +26 -0
- package/locales/first/vi.json +26 -0
- package/locales/first/yo.json +26 -0
- package/locales/first/zh-Hans.json +26 -0
- package/locales/first/zh-Hant.json +26 -0
- package/locales/flows/am.json +51 -0
- package/locales/flows/ar.json +51 -0
- package/locales/flows/bn.json +51 -0
- package/locales/flows/de.json +51 -0
- package/locales/flows/en.json +51 -0
- package/locales/flows/es.json +51 -0
- package/locales/flows/fa.json +51 -0
- package/locales/flows/fr.json +51 -0
- package/locales/flows/ha.json +51 -0
- package/locales/flows/he.json +51 -0
- package/locales/flows/hi.json +51 -0
- package/locales/flows/id.json +51 -0
- package/locales/flows/it.json +51 -0
- package/locales/flows/ja.json +51 -0
- package/locales/flows/ko.json +51 -0
- package/locales/flows/mr.json +51 -0
- package/locales/flows/ms.json +51 -0
- package/locales/flows/nl.json +51 -0
- package/locales/flows/pl.json +51 -0
- package/locales/flows/pt.json +51 -0
- package/locales/flows/ru.json +51 -0
- package/locales/flows/sw.json +51 -0
- package/locales/flows/ta.json +51 -0
- package/locales/flows/te.json +51 -0
- package/locales/flows/th.json +51 -0
- package/locales/flows/tl.json +51 -0
- package/locales/flows/tr.json +51 -0
- package/locales/flows/uk.json +51 -0
- package/locales/flows/ur.json +51 -0
- package/locales/flows/vi.json +51 -0
- package/locales/flows/yo.json +51 -0
- package/locales/flows/zh-Hans.json +51 -0
- package/locales/flows/zh-Hant.json +51 -0
- package/locales/folders/am.json +40 -0
- package/locales/folders/ar.json +44 -0
- package/locales/folders/bn.json +40 -0
- package/locales/folders/de.json +40 -0
- package/locales/folders/en.json +40 -0
- package/locales/folders/es.json +41 -0
- package/locales/folders/fa.json +40 -0
- package/locales/folders/fr.json +41 -0
- package/locales/folders/ha.json +40 -0
- package/locales/folders/he.json +41 -0
- package/locales/folders/hi.json +40 -0
- package/locales/folders/id.json +39 -0
- package/locales/folders/it.json +41 -0
- package/locales/folders/ja.json +39 -0
- package/locales/folders/ko.json +39 -0
- package/locales/folders/mr.json +40 -0
- package/locales/folders/ms.json +39 -0
- package/locales/folders/nl.json +40 -0
- package/locales/folders/pl.json +42 -0
- package/locales/folders/pt.json +41 -0
- package/locales/folders/ru.json +42 -0
- package/locales/folders/sw.json +40 -0
- package/locales/folders/ta.json +40 -0
- package/locales/folders/te.json +40 -0
- package/locales/folders/th.json +39 -0
- package/locales/folders/tl.json +40 -0
- package/locales/folders/tr.json +40 -0
- package/locales/folders/uk.json +42 -0
- package/locales/folders/ur.json +40 -0
- package/locales/folders/vi.json +39 -0
- package/locales/folders/yo.json +39 -0
- package/locales/folders/zh-Hans.json +39 -0
- package/locales/folders/zh-Hant.json +39 -0
- package/locales/fr.json +403 -0
- package/locales/ha.json +395 -0
- package/locales/he.json +410 -0
- package/locales/hi.json +395 -0
- package/locales/id.json +387 -0
- package/locales/interactive/am.json +7 -0
- package/locales/interactive/ar.json +7 -0
- package/locales/interactive/bn.json +7 -0
- package/locales/interactive/de.json +7 -0
- package/locales/interactive/en.json +7 -0
- package/locales/interactive/es.json +7 -0
- package/locales/interactive/fa.json +7 -0
- package/locales/interactive/fr.json +7 -0
- package/locales/interactive/ha.json +7 -0
- package/locales/interactive/he.json +7 -0
- package/locales/interactive/hi.json +7 -0
- package/locales/interactive/id.json +7 -0
- package/locales/interactive/it.json +7 -0
- package/locales/interactive/ja.json +7 -0
- package/locales/interactive/ko.json +7 -0
- package/locales/interactive/mr.json +7 -0
- package/locales/interactive/ms.json +7 -0
- package/locales/interactive/nl.json +7 -0
- package/locales/interactive/pl.json +7 -0
- package/locales/interactive/pt.json +7 -0
- package/locales/interactive/ru.json +7 -0
- package/locales/interactive/sw.json +7 -0
- package/locales/interactive/ta.json +7 -0
- package/locales/interactive/te.json +7 -0
- package/locales/interactive/th.json +7 -0
- package/locales/interactive/tl.json +7 -0
- package/locales/interactive/tr.json +7 -0
- package/locales/interactive/uk.json +7 -0
- package/locales/interactive/ur.json +7 -0
- package/locales/interactive/vi.json +7 -0
- package/locales/interactive/yo.json +7 -0
- package/locales/interactive/zh-Hans.json +7 -0
- package/locales/interactive/zh-Hant.json +7 -0
- package/locales/it.json +403 -0
- package/locales/ja.json +387 -0
- package/locales/ko.json +387 -0
- package/locales/layouts/am.json +9 -0
- package/locales/layouts/ar.json +9 -0
- package/locales/layouts/bn.json +9 -0
- package/locales/layouts/de.json +9 -0
- package/locales/layouts/en.json +9 -0
- package/locales/layouts/es.json +9 -0
- package/locales/layouts/fa.json +9 -0
- package/locales/layouts/fr.json +9 -0
- package/locales/layouts/ha.json +9 -0
- package/locales/layouts/he.json +9 -0
- package/locales/layouts/hi.json +9 -0
- package/locales/layouts/id.json +9 -0
- package/locales/layouts/it.json +9 -0
- package/locales/layouts/ja.json +9 -0
- package/locales/layouts/ko.json +9 -0
- package/locales/layouts/mr.json +9 -0
- package/locales/layouts/ms.json +9 -0
- package/locales/layouts/nl.json +9 -0
- package/locales/layouts/pl.json +9 -0
- package/locales/layouts/pt.json +9 -0
- package/locales/layouts/ru.json +9 -0
- package/locales/layouts/sw.json +9 -0
- package/locales/layouts/ta.json +9 -0
- package/locales/layouts/te.json +9 -0
- package/locales/layouts/th.json +9 -0
- package/locales/layouts/tl.json +9 -0
- package/locales/layouts/tr.json +9 -0
- package/locales/layouts/uk.json +9 -0
- package/locales/layouts/ur.json +9 -0
- package/locales/layouts/vi.json +9 -0
- package/locales/layouts/yo.json +9 -0
- package/locales/layouts/zh-Hans.json +9 -0
- package/locales/layouts/zh-Hant.json +9 -0
- package/locales/lock/am.json +32 -0
- package/locales/lock/ar.json +32 -0
- package/locales/lock/bn.json +32 -0
- package/locales/lock/de.json +32 -0
- package/locales/lock/en.json +32 -0
- package/locales/lock/es.json +32 -0
- package/locales/lock/fa.json +32 -0
- package/locales/lock/fr.json +32 -0
- package/locales/lock/ha.json +32 -0
- package/locales/lock/he.json +32 -0
- package/locales/lock/hi.json +32 -0
- package/locales/lock/id.json +32 -0
- package/locales/lock/it.json +32 -0
- package/locales/lock/ja.json +32 -0
- package/locales/lock/ko.json +32 -0
- package/locales/lock/mr.json +32 -0
- package/locales/lock/ms.json +32 -0
- package/locales/lock/nl.json +32 -0
- package/locales/lock/pl.json +32 -0
- package/locales/lock/pt.json +32 -0
- package/locales/lock/ru.json +32 -0
- package/locales/lock/sw.json +32 -0
- package/locales/lock/ta.json +32 -0
- package/locales/lock/te.json +32 -0
- package/locales/lock/th.json +32 -0
- package/locales/lock/tl.json +32 -0
- package/locales/lock/tr.json +32 -0
- package/locales/lock/uk.json +32 -0
- package/locales/lock/ur.json +32 -0
- package/locales/lock/vi.json +32 -0
- package/locales/lock/yo.json +32 -0
- package/locales/lock/zh-Hans.json +32 -0
- package/locales/lock/zh-Hant.json +32 -0
- package/locales/machine/am.json +19 -0
- package/locales/machine/ar.json +19 -0
- package/locales/machine/bn.json +19 -0
- package/locales/machine/de.json +19 -0
- package/locales/machine/en.json +19 -0
- package/locales/machine/es.json +19 -0
- package/locales/machine/fa.json +19 -0
- package/locales/machine/fr.json +19 -0
- package/locales/machine/ha.json +19 -0
- package/locales/machine/he.json +19 -0
- package/locales/machine/hi.json +19 -0
- package/locales/machine/id.json +19 -0
- package/locales/machine/it.json +19 -0
- package/locales/machine/ja.json +19 -0
- package/locales/machine/ko.json +19 -0
- package/locales/machine/mr.json +19 -0
- package/locales/machine/ms.json +19 -0
- package/locales/machine/nl.json +19 -0
- package/locales/machine/pl.json +19 -0
- package/locales/machine/pt.json +19 -0
- package/locales/machine/ru.json +19 -0
- package/locales/machine/sw.json +19 -0
- package/locales/machine/ta.json +19 -0
- package/locales/machine/te.json +19 -0
- package/locales/machine/th.json +19 -0
- package/locales/machine/tl.json +19 -0
- package/locales/machine/tr.json +19 -0
- package/locales/machine/uk.json +19 -0
- package/locales/machine/ur.json +19 -0
- package/locales/machine/vi.json +19 -0
- package/locales/machine/yo.json +19 -0
- package/locales/machine/zh-Hans.json +19 -0
- package/locales/machine/zh-Hant.json +19 -0
- package/locales/made/am.json +16 -0
- package/locales/made/ar.json +16 -0
- package/locales/made/bn.json +16 -0
- package/locales/made/de.json +16 -0
- package/locales/made/en.json +16 -0
- package/locales/made/es.json +16 -0
- package/locales/made/fa.json +16 -0
- package/locales/made/fr.json +16 -0
- package/locales/made/ha.json +16 -0
- package/locales/made/he.json +16 -0
- package/locales/made/hi.json +16 -0
- package/locales/made/id.json +16 -0
- package/locales/made/it.json +16 -0
- package/locales/made/ja.json +16 -0
- package/locales/made/ko.json +16 -0
- package/locales/made/mr.json +16 -0
- package/locales/made/ms.json +16 -0
- package/locales/made/nl.json +16 -0
- package/locales/made/pl.json +16 -0
- package/locales/made/pt.json +16 -0
- package/locales/made/ru.json +16 -0
- package/locales/made/sw.json +16 -0
- package/locales/made/ta.json +16 -0
- package/locales/made/te.json +16 -0
- package/locales/made/th.json +16 -0
- package/locales/made/tl.json +16 -0
- package/locales/made/tr.json +16 -0
- package/locales/made/uk.json +16 -0
- package/locales/made/ur.json +16 -0
- package/locales/made/vi.json +16 -0
- package/locales/made/yo.json +16 -0
- package/locales/made/zh-Hans.json +16 -0
- package/locales/made/zh-Hant.json +16 -0
- package/locales/mr.json +395 -0
- package/locales/ms.json +387 -0
- package/locales/nl.json +395 -0
- package/locales/notifications/am.json +6 -0
- package/locales/notifications/ar.json +6 -0
- package/locales/notifications/bn.json +6 -0
- package/locales/notifications/de.json +6 -0
- package/locales/notifications/en.json +6 -0
- package/locales/notifications/es.json +6 -0
- package/locales/notifications/fa.json +6 -0
- package/locales/notifications/fr.json +6 -0
- package/locales/notifications/ha.json +6 -0
- package/locales/notifications/he.json +6 -0
- package/locales/notifications/hi.json +6 -0
- package/locales/notifications/id.json +6 -0
- package/locales/notifications/it.json +6 -0
- package/locales/notifications/ja.json +6 -0
- package/locales/notifications/ko.json +6 -0
- package/locales/notifications/mr.json +6 -0
- package/locales/notifications/ms.json +6 -0
- package/locales/notifications/nl.json +6 -0
- package/locales/notifications/pl.json +6 -0
- package/locales/notifications/pt.json +6 -0
- package/locales/notifications/ru.json +6 -0
- package/locales/notifications/sw.json +6 -0
- package/locales/notifications/ta.json +6 -0
- package/locales/notifications/te.json +6 -0
- package/locales/notifications/th.json +6 -0
- package/locales/notifications/tl.json +6 -0
- package/locales/notifications/tr.json +6 -0
- package/locales/notifications/uk.json +6 -0
- package/locales/notifications/ur.json +6 -0
- package/locales/notifications/vi.json +6 -0
- package/locales/notifications/yo.json +6 -0
- package/locales/notifications/zh-Hans.json +6 -0
- package/locales/notifications/zh-Hant.json +6 -0
- package/locales/pictures/am.json +36 -0
- package/locales/pictures/ar.json +36 -0
- package/locales/pictures/bn.json +36 -0
- package/locales/pictures/de.json +36 -0
- package/locales/pictures/en.json +36 -0
- package/locales/pictures/es.json +36 -0
- package/locales/pictures/fa.json +36 -0
- package/locales/pictures/fr.json +36 -0
- package/locales/pictures/ha.json +36 -0
- package/locales/pictures/he.json +36 -0
- package/locales/pictures/hi.json +36 -0
- package/locales/pictures/id.json +36 -0
- package/locales/pictures/it.json +36 -0
- package/locales/pictures/ja.json +36 -0
- package/locales/pictures/ko.json +36 -0
- package/locales/pictures/mr.json +36 -0
- package/locales/pictures/ms.json +36 -0
- package/locales/pictures/nl.json +36 -0
- package/locales/pictures/pl.json +36 -0
- package/locales/pictures/pt.json +36 -0
- package/locales/pictures/ru.json +36 -0
- package/locales/pictures/sw.json +36 -0
- package/locales/pictures/ta.json +36 -0
- package/locales/pictures/te.json +36 -0
- package/locales/pictures/th.json +36 -0
- package/locales/pictures/tl.json +36 -0
- package/locales/pictures/tr.json +36 -0
- package/locales/pictures/uk.json +36 -0
- package/locales/pictures/ur.json +36 -0
- package/locales/pictures/vi.json +36 -0
- package/locales/pictures/yo.json +36 -0
- package/locales/pictures/zh-Hans.json +36 -0
- package/locales/pictures/zh-Hant.json +36 -0
- package/locales/pl.json +411 -0
- package/locales/plan/am.json +13 -0
- package/locales/plan/ar.json +13 -0
- package/locales/plan/bn.json +13 -0
- package/locales/plan/de.json +13 -0
- package/locales/plan/en.json +13 -0
- package/locales/plan/es.json +13 -0
- package/locales/plan/fa.json +13 -0
- package/locales/plan/fr.json +13 -0
- package/locales/plan/ha.json +13 -0
- package/locales/plan/he.json +13 -0
- package/locales/plan/hi.json +13 -0
- package/locales/plan/id.json +13 -0
- package/locales/plan/it.json +13 -0
- package/locales/plan/ja.json +13 -0
- package/locales/plan/ko.json +13 -0
- package/locales/plan/mr.json +13 -0
- package/locales/plan/ms.json +13 -0
- package/locales/plan/nl.json +13 -0
- package/locales/plan/pl.json +13 -0
- package/locales/plan/pt.json +13 -0
- package/locales/plan/ru.json +13 -0
- package/locales/plan/sw.json +13 -0
- package/locales/plan/ta.json +13 -0
- package/locales/plan/te.json +13 -0
- package/locales/plan/th.json +13 -0
- package/locales/plan/tl.json +13 -0
- package/locales/plan/tr.json +13 -0
- package/locales/plan/uk.json +13 -0
- package/locales/plan/ur.json +13 -0
- package/locales/plan/vi.json +13 -0
- package/locales/plan/yo.json +13 -0
- package/locales/plan/zh-Hans.json +13 -0
- package/locales/plan/zh-Hant.json +13 -0
- package/locales/plugins/am.json +40 -0
- package/locales/plugins/ar.json +40 -0
- package/locales/plugins/bn.json +40 -0
- package/locales/plugins/de.json +40 -0
- package/locales/plugins/en.json +40 -0
- package/locales/plugins/es.json +40 -0
- package/locales/plugins/fa.json +40 -0
- package/locales/plugins/fr.json +40 -0
- package/locales/plugins/ha.json +40 -0
- package/locales/plugins/he.json +40 -0
- package/locales/plugins/hi.json +40 -0
- package/locales/plugins/id.json +40 -0
- package/locales/plugins/it.json +40 -0
- package/locales/plugins/ja.json +40 -0
- package/locales/plugins/ko.json +40 -0
- package/locales/plugins/mr.json +40 -0
- package/locales/plugins/ms.json +40 -0
- package/locales/plugins/nl.json +40 -0
- package/locales/plugins/pl.json +40 -0
- package/locales/plugins/pt.json +40 -0
- package/locales/plugins/ru.json +40 -0
- package/locales/plugins/sw.json +40 -0
- package/locales/plugins/ta.json +40 -0
- package/locales/plugins/te.json +40 -0
- package/locales/plugins/th.json +40 -0
- package/locales/plugins/tl.json +40 -0
- package/locales/plugins/tr.json +40 -0
- package/locales/plugins/uk.json +40 -0
- package/locales/plugins/ur.json +40 -0
- package/locales/plugins/vi.json +40 -0
- package/locales/plugins/yo.json +40 -0
- package/locales/plugins/zh-Hans.json +40 -0
- package/locales/plugins/zh-Hant.json +40 -0
- package/locales/policy/am.json +39 -0
- package/locales/policy/ar.json +39 -0
- package/locales/policy/bn.json +39 -0
- package/locales/policy/de.json +39 -0
- package/locales/policy/en.json +39 -0
- package/locales/policy/es.json +39 -0
- package/locales/policy/fa.json +39 -0
- package/locales/policy/fr.json +39 -0
- package/locales/policy/ha.json +39 -0
- package/locales/policy/he.json +39 -0
- package/locales/policy/hi.json +39 -0
- package/locales/policy/id.json +39 -0
- package/locales/policy/it.json +39 -0
- package/locales/policy/ja.json +39 -0
- package/locales/policy/ko.json +39 -0
- package/locales/policy/mr.json +39 -0
- package/locales/policy/ms.json +39 -0
- package/locales/policy/nl.json +39 -0
- package/locales/policy/pl.json +39 -0
- package/locales/policy/pt.json +39 -0
- package/locales/policy/ru.json +39 -0
- package/locales/policy/sw.json +39 -0
- package/locales/policy/ta.json +39 -0
- package/locales/policy/te.json +39 -0
- package/locales/policy/th.json +39 -0
- package/locales/policy/tl.json +39 -0
- package/locales/policy/tr.json +39 -0
- package/locales/policy/uk.json +39 -0
- package/locales/policy/ur.json +39 -0
- package/locales/policy/vi.json +39 -0
- package/locales/policy/yo.json +39 -0
- package/locales/policy/zh-Hans.json +39 -0
- package/locales/policy/zh-Hant.json +39 -0
- package/locales/profiles/am.json +59 -0
- package/locales/profiles/ar.json +59 -0
- package/locales/profiles/bn.json +59 -0
- package/locales/profiles/de.json +59 -0
- package/locales/profiles/en.json +59 -0
- package/locales/profiles/es.json +59 -0
- package/locales/profiles/fa.json +59 -0
- package/locales/profiles/fr.json +59 -0
- package/locales/profiles/ha.json +59 -0
- package/locales/profiles/he.json +59 -0
- package/locales/profiles/hi.json +59 -0
- package/locales/profiles/id.json +59 -0
- package/locales/profiles/it.json +59 -0
- package/locales/profiles/ja.json +59 -0
- package/locales/profiles/ko.json +59 -0
- package/locales/profiles/mr.json +59 -0
- package/locales/profiles/ms.json +59 -0
- package/locales/profiles/nl.json +59 -0
- package/locales/profiles/pl.json +59 -0
- package/locales/profiles/pt.json +59 -0
- package/locales/profiles/ru.json +59 -0
- package/locales/profiles/sw.json +59 -0
- package/locales/profiles/ta.json +59 -0
- package/locales/profiles/te.json +59 -0
- package/locales/profiles/th.json +59 -0
- package/locales/profiles/tl.json +59 -0
- package/locales/profiles/tr.json +59 -0
- package/locales/profiles/uk.json +59 -0
- package/locales/profiles/ur.json +59 -0
- package/locales/profiles/vi.json +59 -0
- package/locales/profiles/yo.json +59 -0
- package/locales/profiles/zh-Hans.json +59 -0
- package/locales/profiles/zh-Hant.json +59 -0
- package/locales/pt.json +403 -0
- package/locales/receipt/am.json +32 -0
- package/locales/receipt/ar.json +32 -0
- package/locales/receipt/bn.json +32 -0
- package/locales/receipt/de.json +32 -0
- package/locales/receipt/en.json +32 -0
- package/locales/receipt/es.json +32 -0
- package/locales/receipt/fa.json +32 -0
- package/locales/receipt/fr.json +32 -0
- package/locales/receipt/ha.json +32 -0
- package/locales/receipt/he.json +32 -0
- package/locales/receipt/hi.json +32 -0
- package/locales/receipt/id.json +32 -0
- package/locales/receipt/it.json +32 -0
- package/locales/receipt/ja.json +32 -0
- package/locales/receipt/ko.json +32 -0
- package/locales/receipt/mr.json +32 -0
- package/locales/receipt/ms.json +32 -0
- package/locales/receipt/nl.json +32 -0
- package/locales/receipt/pl.json +32 -0
- package/locales/receipt/pt.json +32 -0
- package/locales/receipt/ru.json +32 -0
- package/locales/receipt/sw.json +32 -0
- package/locales/receipt/ta.json +32 -0
- package/locales/receipt/te.json +32 -0
- package/locales/receipt/th.json +32 -0
- package/locales/receipt/tl.json +32 -0
- package/locales/receipt/tr.json +32 -0
- package/locales/receipt/uk.json +32 -0
- package/locales/receipt/ur.json +32 -0
- package/locales/receipt/vi.json +32 -0
- package/locales/receipt/yo.json +32 -0
- package/locales/receipt/zh-Hans.json +32 -0
- package/locales/receipt/zh-Hant.json +32 -0
- package/locales/ru.json +411 -0
- package/locales/scores/am.json +8 -0
- package/locales/scores/ar.json +8 -0
- package/locales/scores/bn.json +8 -0
- package/locales/scores/de.json +8 -0
- package/locales/scores/en.json +8 -0
- package/locales/scores/es.json +8 -0
- package/locales/scores/fa.json +8 -0
- package/locales/scores/fr.json +8 -0
- package/locales/scores/ha.json +8 -0
- package/locales/scores/he.json +8 -0
- package/locales/scores/hi.json +8 -0
- package/locales/scores/id.json +8 -0
- package/locales/scores/it.json +8 -0
- package/locales/scores/ja.json +8 -0
- package/locales/scores/ko.json +8 -0
- package/locales/scores/mr.json +8 -0
- package/locales/scores/ms.json +8 -0
- package/locales/scores/nl.json +8 -0
- package/locales/scores/pl.json +8 -0
- package/locales/scores/pt.json +8 -0
- package/locales/scores/ru.json +8 -0
- package/locales/scores/sw.json +8 -0
- package/locales/scores/ta.json +8 -0
- package/locales/scores/te.json +8 -0
- package/locales/scores/th.json +8 -0
- package/locales/scores/tl.json +8 -0
- package/locales/scores/tr.json +8 -0
- package/locales/scores/uk.json +8 -0
- package/locales/scores/ur.json +8 -0
- package/locales/scores/vi.json +8 -0
- package/locales/scores/yo.json +8 -0
- package/locales/scores/zh-Hans.json +8 -0
- package/locales/scores/zh-Hant.json +8 -0
- package/locales/search/am.json +26 -0
- package/locales/search/ar.json +34 -0
- package/locales/search/bn.json +26 -0
- package/locales/search/de.json +26 -0
- package/locales/search/en.json +26 -0
- package/locales/search/es.json +28 -0
- package/locales/search/fa.json +26 -0
- package/locales/search/fr.json +28 -0
- package/locales/search/ha.json +26 -0
- package/locales/search/he.json +30 -0
- package/locales/search/hi.json +26 -0
- package/locales/search/id.json +24 -0
- package/locales/search/it.json +28 -0
- package/locales/search/ja.json +24 -0
- package/locales/search/ko.json +24 -0
- package/locales/search/mr.json +26 -0
- package/locales/search/ms.json +24 -0
- package/locales/search/nl.json +26 -0
- package/locales/search/pl.json +30 -0
- package/locales/search/pt.json +28 -0
- package/locales/search/ru.json +30 -0
- package/locales/search/sw.json +26 -0
- package/locales/search/ta.json +26 -0
- package/locales/search/te.json +26 -0
- package/locales/search/th.json +24 -0
- package/locales/search/tl.json +26 -0
- package/locales/search/tr.json +26 -0
- package/locales/search/uk.json +30 -0
- package/locales/search/ur.json +26 -0
- package/locales/search/vi.json +24 -0
- package/locales/search/yo.json +24 -0
- package/locales/search/zh-Hans.json +24 -0
- package/locales/search/zh-Hant.json +24 -0
- package/locales/share/am.json +61 -0
- package/locales/share/ar.json +65 -0
- package/locales/share/bn.json +61 -0
- package/locales/share/de.json +61 -0
- package/locales/share/en.json +61 -0
- package/locales/share/es.json +62 -0
- package/locales/share/fa.json +61 -0
- package/locales/share/fr.json +62 -0
- package/locales/share/ha.json +61 -0
- package/locales/share/he.json +62 -0
- package/locales/share/hi.json +61 -0
- package/locales/share/id.json +60 -0
- package/locales/share/it.json +62 -0
- package/locales/share/ja.json +60 -0
- package/locales/share/ko.json +60 -0
- package/locales/share/mr.json +61 -0
- package/locales/share/ms.json +60 -0
- package/locales/share/nl.json +61 -0
- package/locales/share/pl.json +63 -0
- package/locales/share/pt.json +62 -0
- package/locales/share/ru.json +63 -0
- package/locales/share/sw.json +61 -0
- package/locales/share/ta.json +61 -0
- package/locales/share/te.json +61 -0
- package/locales/share/th.json +60 -0
- package/locales/share/tl.json +61 -0
- package/locales/share/tr.json +61 -0
- package/locales/share/uk.json +63 -0
- package/locales/share/ur.json +61 -0
- package/locales/share/vi.json +60 -0
- package/locales/share/yo.json +60 -0
- package/locales/share/zh-Hans.json +60 -0
- package/locales/share/zh-Hant.json +60 -0
- package/locales/signin/am.json +6 -0
- package/locales/signin/ar.json +6 -0
- package/locales/signin/bn.json +6 -0
- package/locales/signin/de.json +6 -0
- package/locales/signin/en.json +6 -0
- package/locales/signin/es.json +6 -0
- package/locales/signin/fa.json +6 -0
- package/locales/signin/fr.json +6 -0
- package/locales/signin/ha.json +6 -0
- package/locales/signin/he.json +6 -0
- package/locales/signin/hi.json +6 -0
- package/locales/signin/id.json +6 -0
- package/locales/signin/it.json +6 -0
- package/locales/signin/ja.json +6 -0
- package/locales/signin/ko.json +6 -0
- package/locales/signin/mr.json +6 -0
- package/locales/signin/ms.json +6 -0
- package/locales/signin/nl.json +6 -0
- package/locales/signin/pl.json +6 -0
- package/locales/signin/pt.json +6 -0
- package/locales/signin/ru.json +6 -0
- package/locales/signin/sw.json +6 -0
- package/locales/signin/ta.json +6 -0
- package/locales/signin/te.json +6 -0
- package/locales/signin/th.json +6 -0
- package/locales/signin/tl.json +6 -0
- package/locales/signin/tr.json +6 -0
- package/locales/signin/uk.json +6 -0
- package/locales/signin/ur.json +6 -0
- package/locales/signin/vi.json +6 -0
- package/locales/signin/yo.json +6 -0
- package/locales/signin/zh-Hans.json +6 -0
- package/locales/signin/zh-Hant.json +6 -0
- package/locales/slides/am.json +10 -0
- package/locales/slides/ar.json +10 -0
- package/locales/slides/bn.json +10 -0
- package/locales/slides/de.json +10 -0
- package/locales/slides/en.json +10 -0
- package/locales/slides/es.json +10 -0
- package/locales/slides/fa.json +10 -0
- package/locales/slides/fr.json +10 -0
- package/locales/slides/ha.json +10 -0
- package/locales/slides/he.json +10 -0
- package/locales/slides/hi.json +10 -0
- package/locales/slides/id.json +10 -0
- package/locales/slides/it.json +10 -0
- package/locales/slides/ja.json +10 -0
- package/locales/slides/ko.json +10 -0
- package/locales/slides/mr.json +10 -0
- package/locales/slides/ms.json +10 -0
- package/locales/slides/nl.json +10 -0
- package/locales/slides/pl.json +10 -0
- package/locales/slides/pt.json +10 -0
- package/locales/slides/ru.json +10 -0
- package/locales/slides/sw.json +10 -0
- package/locales/slides/ta.json +10 -0
- package/locales/slides/te.json +10 -0
- package/locales/slides/th.json +10 -0
- package/locales/slides/tl.json +10 -0
- package/locales/slides/tr.json +10 -0
- package/locales/slides/uk.json +10 -0
- package/locales/slides/ur.json +10 -0
- package/locales/slides/vi.json +10 -0
- package/locales/slides/yo.json +10 -0
- package/locales/slides/zh-Hans.json +10 -0
- package/locales/slides/zh-Hant.json +10 -0
- package/locales/sw.json +395 -0
- package/locales/sync/am.json +13 -0
- package/locales/sync/ar.json +13 -0
- package/locales/sync/bn.json +13 -0
- package/locales/sync/de.json +13 -0
- package/locales/sync/en.json +13 -0
- package/locales/sync/es.json +13 -0
- package/locales/sync/fa.json +13 -0
- package/locales/sync/fr.json +13 -0
- package/locales/sync/ha.json +13 -0
- package/locales/sync/he.json +13 -0
- package/locales/sync/hi.json +13 -0
- package/locales/sync/id.json +13 -0
- package/locales/sync/it.json +13 -0
- package/locales/sync/ja.json +13 -0
- package/locales/sync/ko.json +13 -0
- package/locales/sync/mr.json +13 -0
- package/locales/sync/ms.json +13 -0
- package/locales/sync/nl.json +13 -0
- package/locales/sync/pl.json +13 -0
- package/locales/sync/pt.json +13 -0
- package/locales/sync/ru.json +13 -0
- package/locales/sync/sw.json +13 -0
- package/locales/sync/ta.json +13 -0
- package/locales/sync/te.json +13 -0
- package/locales/sync/th.json +13 -0
- package/locales/sync/tl.json +13 -0
- package/locales/sync/tr.json +13 -0
- package/locales/sync/uk.json +13 -0
- package/locales/sync/ur.json +13 -0
- package/locales/sync/vi.json +13 -0
- package/locales/sync/yo.json +13 -0
- package/locales/sync/zh-Hans.json +13 -0
- package/locales/sync/zh-Hant.json +13 -0
- package/locales/ta.json +395 -0
- package/locales/te.json +395 -0
- package/locales/th.json +387 -0
- package/locales/tl.json +395 -0
- package/locales/tr.json +395 -0
- package/locales/uk.json +411 -0
- package/locales/ur.json +395 -0
- package/locales/vi.json +387 -0
- package/locales/yo.json +387 -0
- package/locales/zh-Hans.json +387 -0
- package/locales/zh-Hant.json +387 -0
- package/package.json +9 -4
- package/preview.html +75 -0
- package/ui/caps.js +148 -0
- package/ui/csp.js +82 -0
- package/ui/export.js +214 -0
- package/ui/icons.js +31 -0
- package/ui/looks/blueprint.css +72 -0
- package/ui/looks/classic.css +105 -0
- package/ui/looks/fjord.css +56 -0
- package/ui/looks/human.css +232 -0
- package/ui/looks/mail.css +61 -0
- package/ui/looks/minimal.css +62 -0
- package/ui/looks/mondrian.css +90 -0
- package/ui/looks/neon.css +100 -0
- package/ui/looks/notebook.css +82 -0
- package/ui/looks/paper.css +51 -0
- package/ui/looks/swiss.css +64 -0
- package/ui/looks/terminal.css +84 -0
- package/ui/looks/tilde.css +61 -0
- package/ui/looks/velvet.css +61 -0
- package/ui/markdown.js +188 -0
- package/ui/menu-icons.js +64 -0
- package/ui/model.js +70 -0
- package/ui/reader-state.js +38 -0
- package/ui/reader.js +68 -0
- package/ui/save.js +53 -0
- package/ui/sheet.js +13 -0
- package/ui/style.css +813 -0
- package/ui/trusted.js +13 -0
- package/ui/weights.js +37 -0
- package/vendor/LICENSES/abcjs.txt +21 -0
- package/vendor/LICENSES/base64-js.txt +21 -0
- package/vendor/LICENSES/buffer.txt +21 -0
- package/vendor/LICENSES/diff.txt +29 -0
- package/vendor/LICENSES/echarts.txt +229 -0
- package/vendor/LICENSES/fflate.txt +21 -0
- package/vendor/LICENSES/huggingface-transformers.txt +202 -0
- package/vendor/LICENSES/ieee754.txt +11 -0
- package/vendor/LICENSES/jean-is-sounds.txt +92 -0
- package/vendor/LICENSES/jitl-quickjs-ffi-types.txt +21 -0
- package/vendor/LICENSES/jitl-quickjs-wasmfile-release-sync.txt +47 -0
- package/vendor/LICENSES/just-bash.txt +201 -0
- package/vendor/LICENSES/lit-html.txt +28 -0
- package/vendor/LICENSES/maplibre-gl.txt +2 -0
- package/vendor/LICENSES/marked.txt +44 -0
- package/vendor/LICENSES/onnxruntime-web.txt +2 -0
- package/vendor/LICENSES/pdfjs-dist.txt +177 -0
- package/vendor/LICENSES/preact-signals-core.txt +21 -0
- package/vendor/LICENSES/pyodide.txt +2 -0
- package/vendor/LICENSES/quickjs-emscripten-core.txt +21 -0
- package/vendor/LICENSES/silurus-ooxml.txt +21 -0
- package/vendor/LICENSES/spessasynth_core.txt +202 -0
- package/vendor/LICENSES/sprintf-js.txt +24 -0
- package/vendor/LICENSES/stb-vorbis.txt +202 -0
- package/vendor/LICENSES/temml.txt +21 -0
- package/vendor/LICENSES/turndown.txt +21 -0
- package/vendor/LICENSES/zrender.txt +29 -0
- package/vendor/abcjs/abcjs.mjs +6 -0
- package/vendor/echarts/echarts.mjs +45 -0
- package/vendor/lit-html/async-directive.js +6 -0
- package/vendor/lit-html/directive-helpers.js +6 -0
- package/vendor/lit-html/directive.js +6 -0
- package/vendor/lit-html/directives/ref.js +6 -0
- package/vendor/lit-html/lit-html.js +6 -0
- package/vendor/maplibre/maplibre-gl-worker.js +9 -0
- package/vendor/maplibre/maplibre-gl.css +1 -0
- package/vendor/maplibre/maplibre-gl.mjs +818 -0
- package/vendor/marked.esm.js +79 -0
- package/vendor/signals-core.mjs +1 -0
- package/vendor/spessasynth/spessasynth.mjs +20764 -0
- package/vendor/spessasynth/stb-vorbis.mjs +1 -0
- package/vendor/temml/Temml.woff2 +0 -0
- package/vendor/temml/temml.css +372 -0
- package/vendor/temml/temml.mjs +2 -0
|
@@ -0,0 +1,345 @@
|
|
|
1
|
+
// Pages in answers (D196, D289): a ```html block is a page that runs where it is, in every room, in a
|
|
2
|
+
// frame of the preview's kind (preview.html, D126): an opaque origin, scripts and forms, under the
|
|
3
|
+
// policy Settings give web pages (D143), so by default nothing comes from the internet or goes to
|
|
4
|
+
// it. It comes as the answer writes it: its frame begins with the first lines and is given the rest
|
|
5
|
+
// as it comes, so its markup shows at once and its script, written last, runs once it is whole. It is
|
|
6
|
+
// given the user's language and its direction, the room's colours and type as MCP Apps' standard
|
|
7
|
+
// variables (`--color-text-primary`…), a few base styles, and ECharts as `import * as echarts from
|
|
8
|
+
// 'echarts'`: a stand-in that asks Jean for the library, sent only to a page that imports it, whose
|
|
9
|
+
// charts take the room's light or dark. It is as tall as what it shows, or, made to fill a screen
|
|
10
|
+
// (its root or body as tall as its frame, 100% or 100vh), as tall as a page may be; it speaks to Jean on a click
|
|
11
|
+
// of the user's only: `sendPrompt(text)` sends the text as the user's next message, as a follow-up
|
|
12
|
+
// does, and a link opens in a new tab. With Run its code off, it is code. Copy puts its source on the
|
|
13
|
+
// clipboard. Loaded with the first message, for its rule, then at each visit, so that pages written
|
|
14
|
+
// before show again, or by the first page a conversation holds. Written again under a new policy,
|
|
15
|
+
// which a page keeps from its start; a new theme, look or language is put on the page as it is
|
|
16
|
+
// (`room`), its charts, diagrams and maps following, so that what was typed in it stays.
|
|
17
|
+
// Components (D291): a ```mermaid block is a diagram, drawn here (./diagram.js); a ```geojson block,
|
|
18
|
+
// a page made of a map (./map.js). A page is lent both when it holds one (<app-diagram>, <app-map>,
|
|
19
|
+
// their text what the blocks hold), and lays out its <main> and an <aside> side by side, so that a
|
|
20
|
+
// form and a map beside it are one page, in step through its own code. A map's library and every
|
|
21
|
+
// address it reaches come through Jean, from the map service Settings name, once maps are allowed.
|
|
22
|
+
import { html, nothing, render } from 'lit-html'
|
|
23
|
+
import { computed, effect, signal } from '@preact/signals-core'
|
|
24
|
+
import { app, effective, theme, notify, send, updateSettings } from '../../ui/state.js'
|
|
25
|
+
import { register, drawnActions } from '../../ui/caps.js'
|
|
26
|
+
import { declared, drawn, PAGES } from '../../ui/markdown.js'
|
|
27
|
+
import { pageRights, pagePolicy, pageAllow, mapStyles, PAGE_SANDBOX } from '../../ui/csp.js'
|
|
28
|
+
import { copyDrawing } from '../../ui/save.js'
|
|
29
|
+
import { icons } from '../../ui/icons.js'
|
|
30
|
+
import { styleSheet } from '../../ui/sheet.js'
|
|
31
|
+
import { t, locale, dir, useStrings } from '../../core/i18n.js'
|
|
32
|
+
import { row, chip, notes } from './mode.js'
|
|
33
|
+
|
|
34
|
+
await Promise.all([useStrings('interactive'), styleSheet(new URL('interactive.css', import.meta.url))])
|
|
35
|
+
|
|
36
|
+
register({
|
|
37
|
+
id: 'interactive',
|
|
38
|
+
rules: ["Bills, loans, recipes, timezones, quizzes, science: end with a working ```html tool, not code: offline, var(--color-*), import 'echarts', sendPrompt(text)."],
|
|
39
|
+
// Visual answers as a mode of the box (./mode.js, D300): a row of +, then pressed at the box's foot while it is on.
|
|
40
|
+
slots: { add: { at: 6, draw: row }, modes: { at: 0, draw: chip, notes } },
|
|
41
|
+
})
|
|
42
|
+
// A page, a diagram or a map needs no skill to declare it (D289, D291): they stay among the kinds drawn, however often the room's skills are read again.
|
|
43
|
+
effect(() => { if (PAGES.some((kind) => !declared.value.has(kind))) declared.value = new Set([...declared.value, ...PAGES]) })
|
|
44
|
+
|
|
45
|
+
const FRAME = new URL('../../preview.html', import.meta.url).href
|
|
46
|
+
// A task saved as a web page (D305) has it from the render package, whose server sends it as text: there its relay is written in the frame.
|
|
47
|
+
const RELAY = new URL(FRAME).origin === location.origin ? null : await fetch(FRAME).then((response) => response.text())
|
|
48
|
+
const rights = computed(() => pageRights(effective.value.settings, app.policy))
|
|
49
|
+
|
|
50
|
+
/** MCP Apps' standard variables (its host context's `styles.variables`), from the room's own. */
|
|
51
|
+
const VARIABLES = Object.entries({
|
|
52
|
+
'color-text-primary': 'ink', 'color-text-secondary': 'ink-soft', 'color-text-tertiary': 'ink-faint', 'color-text-danger': 'danger', 'color-text-inverse': 'on-flame',
|
|
53
|
+
'color-border-primary': 'line-strong', 'color-border-secondary': 'line', 'color-background-secondary': 'glass', 'color-background-inverse': 'flame',
|
|
54
|
+
'color-ring-primary': 'flame', 'font-sans': 'sans', 'font-mono': 'mono', 'border-radius-lg': 'radius',
|
|
55
|
+
})
|
|
56
|
+
/**
|
|
57
|
+
* The names brains give them when they guess, as Claude's do, often with light colours to fall back
|
|
58
|
+
* on: the room's colours too, so a page they write is readable in the dark. Its background is the answer's,
|
|
59
|
+
* and its accent the room's, as dark in light and dark alike, as brains write white on it.
|
|
60
|
+
*/
|
|
61
|
+
const ALIASES = Object.entries({
|
|
62
|
+
'color-text': 'var(--color-text-primary)', 'color-text-muted': 'var(--color-text-secondary)', 'color-muted': 'var(--color-text-secondary)',
|
|
63
|
+
'color-border': 'var(--color-border-primary)', 'color-surface': 'var(--color-background-secondary)', 'color-primary': 'oklch(from var(--color-ring-primary) 0.55 c h)',
|
|
64
|
+
'color-accent': 'var(--color-primary)', 'color-on-primary': 'white', 'color-danger': 'var(--color-text-danger)',
|
|
65
|
+
'color-background-primary': 'transparent', 'color-background': 'transparent', 'color-bg': 'transparent',
|
|
66
|
+
})
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* ECharts for pages, read when the first one is written: the stand-in that `echarts` names in a page,
|
|
70
|
+
* whose exports are the library's, and the library itself, sent to a page whose stand-in asks for it.
|
|
71
|
+
* Its charts take the page's light or dark, on no background of their own.
|
|
72
|
+
* @type {Promise<{ text: string, url: string }> | undefined}
|
|
73
|
+
*/
|
|
74
|
+
let echarts
|
|
75
|
+
const library = () => (echarts ??= fetch(new URL('../../vendor/echarts/echarts.mjs', import.meta.url)).then((response) => response.text()).then((text) => {
|
|
76
|
+
const names = (/export\s*\{([^}]*)\}\s*;?\s*$/.exec(text)?.[1] ?? '').split(',').map((name) => name.trim().split(/\s+as\s+/).pop()).filter((name) => /^\w+$/.test(String(name)) && name !== 'init')
|
|
77
|
+
const stand = `const text = await new Promise((resolve) => { addEventListener('message', function got({ data, source }) { if (source === parent && typeof data?.echarts === 'string') removeEventListener('message', got), resolve(data.echarts) }); parent.postMessage({ need: 'echarts' }, '*') })
|
|
78
|
+
const m = await import(URL.createObjectURL(new Blob([text], { type: 'text/javascript' })))
|
|
79
|
+
const dark = () => getComputedStyle(document.documentElement).colorScheme === 'dark'
|
|
80
|
+
// Charts in the page's light or dark; on a new one, what was set on each since it last began afresh, which
|
|
81
|
+
// setTheme forgets, is set again (up to 500 times, beyond which a chart keeps its colours).
|
|
82
|
+
const own = new Map()
|
|
83
|
+
addEventListener('message', ({ data, source }) => {
|
|
84
|
+
if (source === parent && data?.room) for (const [chart, { set, calls }] of own) {
|
|
85
|
+
if (chart.isDisposed()) { own.delete(chart); continue }
|
|
86
|
+
chart.setTheme(dark() ? 'dark' : {}, { silent: true })
|
|
87
|
+
calls.slice(1).forEach(([option, opts], i, rest) => set(option, { replaceMerge: opts?.replaceMerge, lazyUpdate: i < rest.length - 1, silent: true }))
|
|
88
|
+
}
|
|
89
|
+
})
|
|
90
|
+
export const init = (element, theme, options) => {
|
|
91
|
+
const chart = m.init(element, theme ?? (dark() ? 'dark' : null), options), set = chart.setOption.bind(chart), calls = []
|
|
92
|
+
if (theme == null) own.set(chart, { set, calls })
|
|
93
|
+
chart.setOption = (option, ...rest) => {
|
|
94
|
+
const given = { backgroundColor: 'transparent', ...option }
|
|
95
|
+
if (rest[0] === true || rest[0]?.notMerge) calls.length = 0
|
|
96
|
+
if (own.has(chart) && calls.push([given, typeof rest[0] === 'object' ? rest[0] : null]) > 500) own.delete(chart)
|
|
97
|
+
return set(given, ...rest)
|
|
98
|
+
}
|
|
99
|
+
return chart
|
|
100
|
+
}
|
|
101
|
+
export const { ${names.join(', ')} } = m
|
|
102
|
+
export default { ...m, init }`
|
|
103
|
+
return { text, url: `data:text/javascript;charset=utf-8,${encodeURIComponent(stand)}` }
|
|
104
|
+
}, () => ({ text: '', url: 'data:text/javascript,' })))
|
|
105
|
+
|
|
106
|
+
/** What a page is lent when it holds one, each read once: Jean's diagrams and maps, and MapLibre for the maps. @type {Map<string, Promise<string>>} */
|
|
107
|
+
const parts = new Map()
|
|
108
|
+
/** @param {string} path */
|
|
109
|
+
const part = (path) => parts.get(path) ?? /** @type {Promise<string>} */ (parts.set(path, fetch(new URL(path, import.meta.url)).then((response) => response.text())).get(path))
|
|
110
|
+
const LENT = /** @type {Record<string, string>} */ ({ diagram: './diagram.js', map: './map.js' })
|
|
111
|
+
|
|
112
|
+
/** The map service's styles, light and dark, and the addresses that may be fetched for a map: theirs. */
|
|
113
|
+
const styles = () => mapStyles(/** @type {any} */ (effective.peek().settings), app.policy)
|
|
114
|
+
const mapSites = () => Object.values(styles()).map((address) => new URL(address).origin)
|
|
115
|
+
|
|
116
|
+
// Each component a page holds is asked for as it appears, and lent then; the rest isn't.
|
|
117
|
+
const LOADER = `<script>{const want={'app-diagram':'diagram','app-map':'map'},got=new Set()
|
|
118
|
+
const look=()=>{for(const[tag,need]of Object.entries(want))if(!got.has(need)&&document.querySelector(tag)){got.add(need);const id=Math.random()
|
|
119
|
+
addEventListener('message',function on({data,source}){if(source===parent&&data?.id===id)removeEventListener('message',on),import(URL.createObjectURL(new Blob([data.text],{type:'text/javascript'})))})
|
|
120
|
+
parent.postMessage({need,id},'*')}};new MutationObserver(look).observe(document,{childList:true,subtree:true})}</script>`
|
|
121
|
+
|
|
122
|
+
// The room put on the page as it is: the style sheet before it, the root's language, direction, light or
|
|
123
|
+
// dark and look, which diagrams and maps watch.
|
|
124
|
+
const ROOM = `<script>{const sheet=document.currentScript.previousElementSibling,root=document.documentElement
|
|
125
|
+
addEventListener('message',({data,source})=>{const room=data?.room;if(source!==parent||!room)return
|
|
126
|
+
sheet.textContent=room.css;Object.assign(root,{lang:room.lang,dir:room.dir});Object.assign(root.dataset,{theme:room.theme,look:room.look})})}</script>`
|
|
127
|
+
|
|
128
|
+
/**
|
|
129
|
+
* The room as a page wears it: the user's language and its direction, light or dark, the look, and its
|
|
130
|
+
* colours and type, which the page's own root can't give other colours. A frame whose colour scheme
|
|
131
|
+
* isn't the room's would be opaque.
|
|
132
|
+
* @param {CSSStyleDeclaration} style
|
|
133
|
+
*/
|
|
134
|
+
function room(style) {
|
|
135
|
+
const lang = locale.peek()
|
|
136
|
+
const variables = [...VARIABLES.map(([name, own]) => [name, style.getPropertyValue(`--${own}`).trim()]), ...ALIASES].map(([name, value]) => `--${name}: ${value} !important;`).join(' ')
|
|
137
|
+
return { lang, dir: dir(lang), theme: theme.peek(), look: app.look.peek(), css: `:root { color-scheme: ${theme.peek()}; ${variables} }` }
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
/**
|
|
141
|
+
* What goes ahead of the page: the room, ECharts, its components' loader, controls in its style, and
|
|
142
|
+
* its <main> and <aside> side by side on a wide screen.
|
|
143
|
+
* @param {CSSStyleDeclaration} style @param {string} charts the address of ECharts' stand-in
|
|
144
|
+
*/
|
|
145
|
+
function head(style, charts) {
|
|
146
|
+
const { lang, dir, theme, look, css } = room(style)
|
|
147
|
+
return `<html lang="${lang}" dir="${dir}" data-theme="${theme}" data-look="${look}"><script type="importmap">${JSON.stringify({ imports: { echarts: charts } })}</script>${LOADER}<style>${css}</style>${ROOM}<style>
|
|
148
|
+
:root { --border-radius-md: calc(var(--border-radius-lg) / 2) !important; accent-color: var(--color-ring-primary); }
|
|
149
|
+
body { margin: 0; padding: 0.25rem; color: var(--color-text-primary); font: 1rem/1.5 var(--font-sans); overflow-wrap: anywhere; }
|
|
150
|
+
button, input, select, textarea { font: inherit; color: inherit; }
|
|
151
|
+
button, select, textarea, input:not([type=range], [type=checkbox], [type=radio], [type=color]) { padding: 0.4em 0.8em; border: 1px solid var(--color-border-primary); border-radius: var(--border-radius-md); background: var(--color-background-secondary); }
|
|
152
|
+
button { cursor: pointer; }
|
|
153
|
+
:focus-visible { outline: 2px solid var(--color-ring-primary); outline-offset: 2px; }
|
|
154
|
+
@media (prefers-reduced-motion: reduce) { *, ::before, ::after { animation: none !important; transition: none !important; } }
|
|
155
|
+
@media (min-width: 36rem) { body:has(> main + aside) { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 1rem; align-items: start; } }
|
|
156
|
+
app-map, app-diagram { display: block; }
|
|
157
|
+
</style>`
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
class AppPage extends HTMLElement {
|
|
161
|
+
/** `open` while its block's closing fence isn't written yet. */
|
|
162
|
+
static observedAttributes = ['source', 'open']
|
|
163
|
+
/** What its frame was made for: the policy. */
|
|
164
|
+
made = ''
|
|
165
|
+
/** The theme, look and language its page wears. */
|
|
166
|
+
worn = ''
|
|
167
|
+
/** What starts its page once its frame has loaded. @type {{ once: true, handleEvent: (event: Event) => Promise<void> } | undefined} */
|
|
168
|
+
begin
|
|
169
|
+
/** What of its source its page has been given; null while its frame loads. @type {string | null} */
|
|
170
|
+
written = null
|
|
171
|
+
/** Its page is closed: nothing more goes in. */
|
|
172
|
+
whole = false
|
|
173
|
+
/** @type {(() => void) | undefined} */
|
|
174
|
+
unwatch
|
|
175
|
+
|
|
176
|
+
connectedCallback() {
|
|
177
|
+
addEventListener('message', this.heard)
|
|
178
|
+
this.unwatch = effect(() => {
|
|
179
|
+
void [theme.value, app.look.value, locale.value, rights.value]
|
|
180
|
+
requestAnimationFrame(() => this.draw())
|
|
181
|
+
})
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
disconnectedCallback() {
|
|
185
|
+
removeEventListener('message', this.heard)
|
|
186
|
+
this.unwatch?.()
|
|
187
|
+
this.made = ''
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
attributeChangedCallback() {
|
|
191
|
+
if (this.isConnected) this.draw()
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
/**
|
|
195
|
+
* What its page is: its source, or a map's GeoJSON in <app-map>, closed once whole. While it is
|
|
196
|
+
* written, whole lines alone: its last may be the closing fence coming, which isn't the page's.
|
|
197
|
+
*/
|
|
198
|
+
text() {
|
|
199
|
+
const open = this.hasAttribute('open')
|
|
200
|
+
const source = this.getAttribute('source') ?? ''
|
|
201
|
+
const lines = open ? source.slice(0, source.lastIndexOf('\n') + 1) : source
|
|
202
|
+
return this.hasAttribute('map') ? `<app-map>${lines.replaceAll('&', '&').replaceAll('<', '<')}${open ? '' : '</app-map>'}` : lines
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
draw() {
|
|
206
|
+
const source = this.text()
|
|
207
|
+
const { allows, sites } = rights.peek()
|
|
208
|
+
if (!allows.scripts) {
|
|
209
|
+
this.made = ''
|
|
210
|
+
return render(html`<pre dir="ltr"><code>${this.getAttribute('source')}</code></pre>`, this)
|
|
211
|
+
}
|
|
212
|
+
const policy = pagePolicy(allows, sites, true)
|
|
213
|
+
const made = [policy, pageAllow(allows)].join('\n')
|
|
214
|
+
const worn = [theme.peek(), app.look.peek(), locale.peek()].join('\n')
|
|
215
|
+
if (made === this.made) {
|
|
216
|
+
// A new theme, look or language, put on the page as it is; one still loading takes them as it starts.
|
|
217
|
+
if (worn !== this.worn) {
|
|
218
|
+
this.worn = worn
|
|
219
|
+
this.shell(allows)
|
|
220
|
+
if (this.written !== null) this.querySelector('iframe')?.contentWindow?.postMessage({ room: room(getComputedStyle(this)) }, '*')
|
|
221
|
+
}
|
|
222
|
+
// More of a page being written goes on the page begun; a frame still loading takes what there is
|
|
223
|
+
// then; a step back, as the answer settles, waits for it to come again.
|
|
224
|
+
if (this.written === null || (this.whole && source === this.written)) return
|
|
225
|
+
const kept = this.written.trimEnd()
|
|
226
|
+
if (!this.whole && (source.startsWith(kept) || kept.startsWith(source.trimEnd()))) return this.feed()
|
|
227
|
+
}
|
|
228
|
+
this.made = made
|
|
229
|
+
this.worn = worn
|
|
230
|
+
this.written = null
|
|
231
|
+
this.whole = false
|
|
232
|
+
// A new page in a new frame: the one before is let go.
|
|
233
|
+
render(nothing, this)
|
|
234
|
+
this.begin = { once: true, handleEvent: async (/** @type {Event} */ event) => {
|
|
235
|
+
const frame = /** @type {HTMLIFrameElement} */ (event.target)
|
|
236
|
+
const { url } = await library()
|
|
237
|
+
const now = this.text()
|
|
238
|
+
const open = this.hasAttribute('open')
|
|
239
|
+
frame.contentWindow?.postMessage({ page: head(getComputedStyle(this), url) + now, policy, open }, '*')
|
|
240
|
+
this.written = now
|
|
241
|
+
this.whole = !open
|
|
242
|
+
} }
|
|
243
|
+
this.shell(allows)
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
/**
|
|
247
|
+
* Its frame and Copy, named in the user's language; drawn again, the frame stays as it is.
|
|
248
|
+
* @param {Record<import('../../ui/csp.js').PageRight, boolean>} allows
|
|
249
|
+
*/
|
|
250
|
+
shell(allows) {
|
|
251
|
+
render(html`<iframe sandbox=${PAGE_SANDBOX} allow=${pageAllow(allows)} loading="lazy" src=${RELAY === null ? FRAME : nothing} srcdoc=${RELAY ?? nothing} title=${t(this.hasAttribute('map') ? 'interactive.map' : 'interactive.page')} @load=${this.begin}></iframe>
|
|
252
|
+
<div class="drawn-foot">
|
|
253
|
+
<button class="icon-button subtle" aria-label=${t('action.copy')}
|
|
254
|
+
@click=${() => navigator.clipboard.writeText(this.getAttribute('source') ?? '').then(() => notify(t('toast.copied')), () => notify(t('made.copyFailed')))}>${icons.copy}</button>
|
|
255
|
+
${this.hasAttribute('map') ? nothing : drawnActions('html', this.getAttribute('source') ?? '')}
|
|
256
|
+
</div>`, this)
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
/** Gives the page what has come of it beyond what it was given, never twice, and closes it once it is whole. */
|
|
260
|
+
feed() {
|
|
261
|
+
const source = this.text()
|
|
262
|
+
const open = this.hasAttribute('open')
|
|
263
|
+
const written = /** @type {string} */ (this.written)
|
|
264
|
+
const more = source.length > written.length ? source.slice(written.length) : ''
|
|
265
|
+
if (!more && open) return
|
|
266
|
+
this.querySelector('iframe')?.contentWindow?.postMessage({ page: more, open }, '*')
|
|
267
|
+
if (more) this.written = source
|
|
268
|
+
this.whole = !open
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
/**
|
|
272
|
+
* What its page says (preview.html's relay, ECharts' stand-in, its components): how tall it is, that
|
|
273
|
+
* it imports ECharts or holds a component, what a map of it would fetch; and, on a click of the
|
|
274
|
+
* user's, that maps are allowed, text to send or a link to open. Anything else, or from another
|
|
275
|
+
* frame, is ignored.
|
|
276
|
+
* @param {MessageEvent} event
|
|
277
|
+
*/
|
|
278
|
+
heard = ({ source, data }) => {
|
|
279
|
+
const frame = this.querySelector('iframe')
|
|
280
|
+
if (!frame || !source || source !== frame.contentWindow) return
|
|
281
|
+
const answer = (/** @type {Record<string, unknown>} */ reply, /** @type {Transferable[]} */ transfer = []) => frame.contentWindow?.postMessage({ ...reply, id: data.id }, '*', transfer)
|
|
282
|
+
if (Number.isFinite(data?.height)) frame.style.blockSize = `${Math.max(32, data.fills ? innerHeight * 0.85 : Math.min(data.height, innerHeight * 0.85))}px`
|
|
283
|
+
else if (data?.need === 'echarts') void library().then(({ text }) => frame.contentWindow?.postMessage({ echarts: text }, '*'))
|
|
284
|
+
else if (Object.hasOwn(LENT, data?.need)) void part(LENT[data.need]).then((text) => answer({ text }))
|
|
285
|
+
else if (data?.need === 'maplibre') void this.maps().then(answer)
|
|
286
|
+
else if (typeof data?.fetch === 'string') void this.fetched(data.fetch).then(({ bytes, error }) => answer({ bytes, error }, bytes ? [bytes.buffer] : []))
|
|
287
|
+
else if (navigator.userActivation?.isActive === false) return
|
|
288
|
+
else if (data?.allow === 'maps') void this.allow().then((allowed) => answer({ allowed }))
|
|
289
|
+
else if (typeof data?.prompt === 'string' && data.prompt.trim() && !app.busy.peek()) send(data.prompt.trim().slice(0, 2000))
|
|
290
|
+
else if (typeof data?.open === 'string' && /^https:\/\//i.test(data.open)) window.open(data.open, '_blank', 'noopener')
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
/** MapLibre, its worker and its style sheet, the styles for light and dark, and whether maps are allowed; the words its card asks with. */
|
|
294
|
+
async maps() {
|
|
295
|
+
const [library, worker, css] = await Promise.all(['maplibre-gl.mjs', 'maplibre-gl-worker.js', 'maplibre-gl.css'].map((file) => part(`../../vendor/maplibre/${file}`)))
|
|
296
|
+
const site = new URL(styles()[theme.peek() === 'dark' ? 'dark' : 'light']).hostname
|
|
297
|
+
return { library, worker, css, styles: styles(), allowed: rights.peek().allows.maps, strings: { show: t('interactive.mapShow'), from: t('interactive.mapFrom', { site }) } }
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
/** Maps allowed, from now on, unless the organisation says otherwise. */
|
|
301
|
+
async allow() {
|
|
302
|
+
const { allows, locked } = rights.peek()
|
|
303
|
+
if (!allows.maps && !locked.has('maps')) await updateSettings({ pages: /** @type {any} */ ({ ...app.settings.peek().pages, maps: true }) })
|
|
304
|
+
return rights.peek().allows.maps
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
/** An address a map needs, once maps are allowed, from the map service alone. @param {string} address */
|
|
308
|
+
async fetched(address) {
|
|
309
|
+
try {
|
|
310
|
+
if (!rights.peek().allows.maps || !mapSites().includes(new URL(address).origin)) return { error: 'Not a map' }
|
|
311
|
+
const response = await fetch(address, { credentials: 'omit', referrerPolicy: 'no-referrer' })
|
|
312
|
+
return response.ok ? { bytes: new Uint8Array(await response.arrayBuffer()) } : { error: `HTTP ${response.status}` }
|
|
313
|
+
} catch (error) {
|
|
314
|
+
return { error: String(error) }
|
|
315
|
+
}
|
|
316
|
+
}
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
customElements.define('app-page', AppPage)
|
|
320
|
+
|
|
321
|
+
/** The diagrams' module, loaded with the first: until then, a diagram is its code. @type {import('@preact/signals-core').Signal<typeof import('./diagram.js') | null>} */
|
|
322
|
+
const diagrams = signal(null)
|
|
323
|
+
|
|
324
|
+
/** A diagram, with Copy; one that can't be read once written is its code. @param {string} source @param {boolean} open */
|
|
325
|
+
function diagram(source, open) {
|
|
326
|
+
const module = diagrams.value
|
|
327
|
+
if (!module) return void import('./diagram.js').then((loaded) => { diagrams.value = loaded }), null
|
|
328
|
+
if (!open && !module.parse(source)) return null
|
|
329
|
+
/** @param {Event} event */
|
|
330
|
+
const copy = (event) => {
|
|
331
|
+
const shown = /** @type {HTMLElement & { picture: () => Promise<Blob> }} */ (/** @type {HTMLElement} */ (event.currentTarget).closest('figure')?.querySelector('app-diagram'))
|
|
332
|
+
copyDrawing(source, shown.picture()).then(() => notify(t('toast.copied')), () => notify(t('made.copyFailed')))
|
|
333
|
+
}
|
|
334
|
+
return html`<figure class="diagram"><app-diagram source=${source} role="img" aria-label=${t('interactive.diagram')}></app-diagram>
|
|
335
|
+
<div class="drawn-foot"><button class="icon-button subtle" aria-label=${t('action.copy')} @click=${copy}>${icons.copy}</button>${drawnActions('mermaid', source)}</div></figure>`
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
/** Whether a whole block is GeoJSON. @param {string} source */
|
|
339
|
+
const isGeo = (source) => { try { return typeof JSON.parse(source)?.type === 'string' } catch { return false } }
|
|
340
|
+
|
|
341
|
+
drawn.value = { ...drawn.peek(),
|
|
342
|
+
html: (source, open) => html`<app-page source=${source} ?open=${open}></app-page>`,
|
|
343
|
+
geojson: (source, open) => (open || isGeo(source) ? html`<app-page map source=${source} ?open=${open}></app-page>` : null),
|
|
344
|
+
mermaid: diagram,
|
|
345
|
+
}
|
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
// Maps (D291): <app-map> in a page, its GeoJSON as its text, which the page may change to move it (a
|
|
2
|
+
// form beside it, say); a place, a route or an area clicked tells the page (`pick`, with what it
|
|
3
|
+
// says of itself). Lent to a page that holds one, as a ```geojson block in an answer is a page made of
|
|
4
|
+
// one. Drawn by MapLibre GL, which Jean lends too, once, its worker a classic one (scripts/vendor.js). Its style, tiles, fonts and icons come from the map
|
|
5
|
+
// service Settings name, through Jean, which fetches them once the user has said yes to maps: the
|
|
6
|
+
// page itself reaches nothing. Until then, the map says where it would come from and asks. Its places
|
|
7
|
+
// in the room's accent, each named, its routes and areas too, the whole framed to fit.
|
|
8
|
+
// Self-contained, the DOM's own calls only: it runs in a page's frame.
|
|
9
|
+
|
|
10
|
+
/** Asks Jean, and waits for its answer. @param {Record<string, unknown>} message @returns {Promise<any>} */
|
|
11
|
+
const ask = (message) => new Promise((resolve) => {
|
|
12
|
+
const id = Math.random()
|
|
13
|
+
addEventListener('message', function heard({ data, source }) {
|
|
14
|
+
if (source === parent && data?.id === id) removeEventListener('message', heard), resolve(data)
|
|
15
|
+
})
|
|
16
|
+
parent.postMessage({ ...message, id }, '*')
|
|
17
|
+
})
|
|
18
|
+
|
|
19
|
+
/** An address as MapLibre asks Jean for it, its scheme kept, and back. @param {string} url */
|
|
20
|
+
const routed = (url) => url.replace(/^(https?):\/\//, 'jean://$1/')
|
|
21
|
+
/** @param {string} url */
|
|
22
|
+
const direct = (url) => url.replace(/^jean:\/\/(https?)\//, '$1://')
|
|
23
|
+
|
|
24
|
+
/** MapLibre, made ready once: its worker classic, and every address it reaches fetched by Jean. @type {Promise<any> | undefined} */
|
|
25
|
+
let lent
|
|
26
|
+
const lend = () => (lent ??= ask({ need: 'maplibre' }).then(async (given) => {
|
|
27
|
+
const maplibregl = await import(URL.createObjectURL(new Blob([given.library], { type: 'text/javascript' })))
|
|
28
|
+
maplibregl.setWorkerUrl(URL.createObjectURL(new Blob([given.worker], { type: 'text/javascript' })))
|
|
29
|
+
maplibregl.addProtocol('jean', async (/** @type {{ url: string, type: string }} */ { url, type }) => {
|
|
30
|
+
const { bytes, error } = await ask({ fetch: direct(url) })
|
|
31
|
+
if (error) throw new Error(error)
|
|
32
|
+
const text = () => new TextDecoder().decode(bytes)
|
|
33
|
+
return { data: type === 'json' ? JSON.parse(text()) : type === 'string' ? text() : bytes.buffer }
|
|
34
|
+
})
|
|
35
|
+
return { ...given, maplibregl }
|
|
36
|
+
}))
|
|
37
|
+
|
|
38
|
+
// The map in its box, its consent card over it until maps are allowed.
|
|
39
|
+
const OWN = `:host { position: relative; display: block; block-size: 22rem; overflow: hidden; border-radius: var(--border-radius-md, 0.6rem); }
|
|
40
|
+
.box { position: absolute; inset: 0; }
|
|
41
|
+
.ask { position: absolute; inset: 0; display: grid; place-content: center; gap: 0.6rem; padding: 1rem; text-align: center; background: var(--color-background-secondary); color: var(--color-text-secondary); font: 0.9rem/1.4 var(--font-sans); }
|
|
42
|
+
.ask button { justify-self: center; padding: 0.45em 1em; border: 0; border-radius: 99px; background: var(--color-primary, #2a6fdb); color: var(--color-on-primary, white); font: inherit; font-weight: 600; cursor: pointer; }`
|
|
43
|
+
|
|
44
|
+
/** A colour of the page as MapLibre reads colours: rgba(). @param {string} colour */
|
|
45
|
+
function rgba(colour) {
|
|
46
|
+
const pen = /** @type {CanvasRenderingContext2D} */ (document.createElement('canvas').getContext('2d', { willReadFrequently: true }))
|
|
47
|
+
pen.fillStyle = colour
|
|
48
|
+
pen.fillRect(0, 0, 1, 1)
|
|
49
|
+
const [r, g, b, a] = pen.getImageData(0, 0, 1, 1).data
|
|
50
|
+
return `rgba(${r}, ${g}, ${b}, ${a / 255})`
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
/** Features of a kind, one or many (MultiPoint is points too). @param {string} type */
|
|
54
|
+
const kind = (type) => ['in', ['geometry-type'], ['literal', [type, `Multi${type}`]]]
|
|
55
|
+
|
|
56
|
+
/** Every position in some GeoJSON. @param {any} value @returns {number[][]} */
|
|
57
|
+
const positions = (value) => (Array.isArray(value) && typeof value[0] === 'number' ? [value] : Array.isArray(value) ? value.flatMap(positions)
|
|
58
|
+
: value && typeof value === 'object' ? Object.entries(value).flatMap(([key, inner]) => (key === 'properties' ? [] : positions(inner))) : [])
|
|
59
|
+
|
|
60
|
+
class AppMap extends HTMLElement {
|
|
61
|
+
shown = this.attachShadow({ mode: 'open' })
|
|
62
|
+
changed = new MutationObserver(() => this.update())
|
|
63
|
+
room = new MutationObserver(() => this.restyle())
|
|
64
|
+
/** @type {any} */
|
|
65
|
+
map = null
|
|
66
|
+
/** What Jean lent it. @type {any} */
|
|
67
|
+
given = null
|
|
68
|
+
/** The address of the style it shows. */
|
|
69
|
+
base = ''
|
|
70
|
+
|
|
71
|
+
connectedCallback() {
|
|
72
|
+
this.changed.observe(this, { childList: true, characterData: true, subtree: true })
|
|
73
|
+
void this.start()
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
disconnectedCallback() {
|
|
77
|
+
this.changed.disconnect()
|
|
78
|
+
this.room.disconnect()
|
|
79
|
+
this.map?.remove()
|
|
80
|
+
this.map = null
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
/** Its GeoJSON, from its text: null while it isn't whole. */
|
|
84
|
+
get data() {
|
|
85
|
+
try {
|
|
86
|
+
const data = JSON.parse(this.textContent ?? '')
|
|
87
|
+
return data && typeof data.type === 'string' ? data : null
|
|
88
|
+
} catch {
|
|
89
|
+
return null
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
async start() {
|
|
94
|
+
const given = this.given = await lend()
|
|
95
|
+
const box = Object.assign(document.createElement('div'), { className: 'box' })
|
|
96
|
+
this.shown.replaceChildren(Object.assign(document.createElement('style'), { textContent: given.css + OWN }), box)
|
|
97
|
+
if (!given.allowed) {
|
|
98
|
+
const button = Object.assign(document.createElement('button'), { type: 'button', textContent: given.strings.show })
|
|
99
|
+
const card = Object.assign(document.createElement('div'), { className: 'ask' })
|
|
100
|
+
card.append(Object.assign(document.createElement('p'), { textContent: given.strings.from }), button)
|
|
101
|
+
this.shown.append(card)
|
|
102
|
+
await new Promise((resolve) => button.addEventListener('click', () => ask({ allow: 'maps' }).then(({ allowed }) => allowed && resolve(card.remove()))))
|
|
103
|
+
}
|
|
104
|
+
this.base = this.basemap()
|
|
105
|
+
const map = this.map = new given.maplibregl.Map({ container: box, style: routed(this.base), center: [0, 20], zoom: 1, attributionControl: { compact: true },
|
|
106
|
+
transformRequest: (/** @type {string} */ url) => ({ url: routed(url) }) })
|
|
107
|
+
map.addControl(new given.maplibregl.NavigationControl({ showCompass: false }))
|
|
108
|
+
// Its places, routes and areas on each style the map takes: the first, then the room's light or dark.
|
|
109
|
+
map.on('style.load', () => this.own())
|
|
110
|
+
map.on('load', () => {
|
|
111
|
+
// Its credits folded to their button, so that they hide no place.
|
|
112
|
+
box.querySelector('.maplibregl-compact-show')?.classList.remove('maplibregl-compact-show')
|
|
113
|
+
for (const layer of ['areas', 'routes', 'places']) {
|
|
114
|
+
map.on('click', layer, (/** @type {any} */ event) => this.dispatchEvent(new CustomEvent('pick', { bubbles: true, detail: { ...event.features[0]?.properties } })))
|
|
115
|
+
map.on('mouseenter', layer, () => { map.getCanvas().style.cursor = 'pointer' })
|
|
116
|
+
map.on('mouseleave', layer, () => { map.getCanvas().style.cursor = '' })
|
|
117
|
+
}
|
|
118
|
+
this.update(true)
|
|
119
|
+
})
|
|
120
|
+
// The room's light or dark, or look, put on the page: the map service's other style, or its own colours.
|
|
121
|
+
this.room.observe(document.documentElement, { attributes: true, attributeFilter: ['data-theme', 'data-look'] })
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
/** The map service's style for the page's light or dark. */
|
|
125
|
+
basemap() {
|
|
126
|
+
return this.given.styles[getComputedStyle(this).colorScheme === 'dark' ? 'dark' : 'light']
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
/** Its colours, from the page's, as MapLibre reads them. */
|
|
130
|
+
colours() {
|
|
131
|
+
const style = getComputedStyle(this)
|
|
132
|
+
return {
|
|
133
|
+
accent: rgba(style.getPropertyValue('--color-primary').trim() || '#2a6fdb'),
|
|
134
|
+
halo: rgba(style.colorScheme === 'dark' ? '#1b1b1d' : '#ffffff'),
|
|
135
|
+
ink: rgba(style.getPropertyValue('--color-text-primary').trim() || '#222'),
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
/** Its own layers on the map's style, in the room's accent, each place named. */
|
|
140
|
+
own() {
|
|
141
|
+
const map = this.map
|
|
142
|
+
const { accent, halo, ink } = this.colours()
|
|
143
|
+
map.addSource('own', { type: 'geojson', data: this.data ?? { type: 'FeatureCollection', features: [] } })
|
|
144
|
+
map.addLayer({ id: 'areas', type: 'fill', source: 'own', filter: kind('Polygon'), paint: { 'fill-color': accent, 'fill-opacity': 0.18 } })
|
|
145
|
+
map.addLayer({ id: 'edges', type: 'line', source: 'own', filter: kind('Polygon'), paint: { 'line-color': accent, 'line-width': 2 } })
|
|
146
|
+
map.addLayer({ id: 'under', type: 'line', source: 'own', filter: kind('LineString'), layout: { 'line-cap': 'round', 'line-join': 'round' }, paint: { 'line-color': halo, 'line-width': 8 } })
|
|
147
|
+
map.addLayer({ id: 'routes', type: 'line', source: 'own', filter: kind('LineString'), layout: { 'line-cap': 'round', 'line-join': 'round' }, paint: { 'line-color': accent, 'line-width': 4 } })
|
|
148
|
+
map.addLayer({ id: 'places', type: 'circle', source: 'own', filter: kind('Point'), paint: { 'circle-radius': 7, 'circle-color': accent, 'circle-stroke-width': 2.5, 'circle-stroke-color': halo } })
|
|
149
|
+
map.addLayer({ id: 'names', type: 'symbol', source: 'own', filter: kind('Point'),
|
|
150
|
+
layout: { 'text-field': ['coalesce', ['get', 'name'], ['get', 'title'], ''], 'text-font': ['Noto Sans Bold'], 'text-size': 13, 'text-offset': [0, 1.1], 'text-anchor': 'top', 'text-optional': true },
|
|
151
|
+
paint: { 'text-color': ink, 'text-halo-color': halo, 'text-halo-width': 1.6 } })
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
/** The room changed: the other style for the other light or dark, else its own layers in the new colours. */
|
|
155
|
+
restyle() {
|
|
156
|
+
const map = this.map
|
|
157
|
+
if (!map) return
|
|
158
|
+
const base = this.basemap()
|
|
159
|
+
if (base !== this.base) {
|
|
160
|
+
this.base = base
|
|
161
|
+
return map.setStyle(routed(base), { diff: false })
|
|
162
|
+
}
|
|
163
|
+
if (!map.getSource('own')) return
|
|
164
|
+
const { accent, halo, ink } = this.colours()
|
|
165
|
+
for (const [layer, property, colour] of /** @type {const} */ ([['areas', 'fill-color', accent], ['edges', 'line-color', accent], ['under', 'line-color', halo], ['routes', 'line-color', accent],
|
|
166
|
+
['places', 'circle-color', accent], ['places', 'circle-stroke-color', halo], ['names', 'text-color', ink], ['names', 'text-halo-color', halo]])) map.setPaintProperty(layer, property, colour)
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
/** Its GeoJSON on the map, framed to fit, gently unless motion is better left out. @param {boolean} [first] */
|
|
170
|
+
update(first = false) {
|
|
171
|
+
const data = this.data
|
|
172
|
+
const source = this.map?.getSource('own')
|
|
173
|
+
if (!data || !source) return
|
|
174
|
+
source.setData(data)
|
|
175
|
+
const all = positions(data)
|
|
176
|
+
if (!all.length) return
|
|
177
|
+
const bounds = all.reduce(([west, south, east, north], [x, y]) => [Math.min(west, x), Math.min(south, y), Math.max(east, x), Math.max(north, y)], [180, 90, -180, -90])
|
|
178
|
+
const still = first || matchMedia('(prefers-reduced-motion: reduce)').matches
|
|
179
|
+
this.map.fitBounds([[bounds[0], bounds[1]], [bounds[2], bounds[3]]], { padding: 48, maxZoom: 13, duration: still ? 0 : 600 })
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
if (!customElements.get('app-map')) customElements.define('app-map', AppMap)
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
// Visual answers as a mode of the box (D300): a row of + turns it on, and it shows at the foot of the box,
|
|
2
|
+
// pressed, until pressed again. While it is on, each message comes with a note that asks the brain to
|
|
3
|
+
// follow the steps of Jean's own ready-made skill Visual answers (caps/skills/directory/visual),
|
|
4
|
+
// read from its file whether or not the room has the skill: in full the first time in a task,
|
|
5
|
+
// then by its name. Its name and icon are the skill's own (D222), so the mode needs no words of its own.
|
|
6
|
+
import { html, nothing } from 'lit-html'
|
|
7
|
+
import { signal } from '@preact/signals-core'
|
|
8
|
+
import { notify } from '../../ui/state.js'
|
|
9
|
+
import { icons } from '../../ui/menu-icons.js'
|
|
10
|
+
import { parseSkill } from '../../core/skills.js'
|
|
11
|
+
import { noteRecord } from '../../core/events.js'
|
|
12
|
+
import { t, locale } from '../../core/i18n.js'
|
|
13
|
+
import { DIRECTORY, shownIn } from '../skills/directory.js'
|
|
14
|
+
|
|
15
|
+
const NAME = 'visual'
|
|
16
|
+
const ICON = html`<svg class="icon" viewBox="0 0 24 24" aria-hidden="true" focusable="false"><path d=${DIRECTORY.find((entry) => entry.name === NAME)?.icon ?? ''}></path></svg>`
|
|
17
|
+
|
|
18
|
+
/** The skill, once read. @type {import('@preact/signals-core').Signal<NonNullable<ReturnType<typeof parseSkill>> | null>} */
|
|
19
|
+
const skill = signal(null)
|
|
20
|
+
/** Whether the mode is on. */
|
|
21
|
+
const on = signal(false)
|
|
22
|
+
|
|
23
|
+
fetch(new URL(`../skills/directory/${NAME}/SKILL.md`, import.meta.url))
|
|
24
|
+
.then(async (response) => { skill.value = response.ok ? parseSkill(await response.text(), response.url) : null })
|
|
25
|
+
.catch((error) => console.warn(error))
|
|
26
|
+
|
|
27
|
+
const title = () => (skill.value ? shownIn(skill.value, locale.value).title : '')
|
|
28
|
+
|
|
29
|
+
/** Turns it on or off, the keyboard back in the box. */
|
|
30
|
+
function toggle() {
|
|
31
|
+
if (!skill.peek()) return notify(t('error.unknown'))
|
|
32
|
+
on.value = !on.peek()
|
|
33
|
+
document.getElementById('prompt')?.focus()
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/** Its row in +, checked while it is on. */
|
|
37
|
+
export const row = () => (skill.value ? html`<button type="button" popovertarget="add-menu" popovertargetaction="hide" aria-pressed=${on.value} @click=${toggle}>
|
|
38
|
+
${ICON}<span dir="auto">${title()}</span>${on.value ? icons.check : nothing}</button>` : nothing)
|
|
39
|
+
|
|
40
|
+
/** At the foot of the box while it is on: pressed, it goes. */
|
|
41
|
+
export const chip = () => (on.value && skill.value ? html`<button type="button" class="mode-chip" aria-pressed="true" @click=${toggle}>
|
|
42
|
+
${ICON}<span dir="auto">${title()}</span>${icons.close}</button>` : nothing)
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* The note a message comes with while it is on: the skill's steps, unless the task was given them already.
|
|
46
|
+
* @param {import('../../core/types.js').Envelope[]} records
|
|
47
|
+
*/
|
|
48
|
+
export function notes(records) {
|
|
49
|
+
const steps = skill.peek()
|
|
50
|
+
if (!on.peek() || !steps) return []
|
|
51
|
+
const given = records.some(({ update }) => update?.sessionUpdate === '_system_note' && update.data.kind === 'mode' && update.data.mode === NAME)
|
|
52
|
+
const text = `The user turned on visual answers: for this message, follow the steps of the skill ${NAME}${given ? ', given above.' : `:\n\n${steps.body}`}`
|
|
53
|
+
return [noteRecord(text, { kind: 'mode', mode: NAME })]
|
|
54
|
+
}
|