@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,153 @@
|
|
|
1
|
+
// A share, opened (D361, docs/sharing.md): the host's viewer, which the render package carries. It
|
|
2
|
+
// reads the share's id from the address and its secret from after the `#`, which never left the
|
|
3
|
+
// browser, asks for the password when there is one, opens the sealed copy, and draws it as a task
|
|
4
|
+
// saved as a web page draws itself (D305), in the host's frame, an opaque origin, with nothing from the
|
|
5
|
+
// internet but the render package, a score's instruments and the host's map service. A share reaches
|
|
6
|
+
// nothing its sharer chose. Continue in Jean brings it into the person's own Jean.
|
|
7
|
+
import { html, render, nothing } from 'lit-html'
|
|
8
|
+
import { t, useLocale, useStrings, setLoader, pickLocale, LOCALES, locale, dir } from '../../core/i18n.js'
|
|
9
|
+
import { pageOf, readerAt } from '../../ui/export.js'
|
|
10
|
+
import { openValue, materialOf, keysOf, bytesOf, base64url, isPart } from './seal.js'
|
|
11
|
+
|
|
12
|
+
/** What the host says of itself (host/host.js): where shares' packages are, the map service, where Continue opens, the legal notice, its name. */
|
|
13
|
+
const host = JSON.parse(document.getElementById('host')?.textContent || '{}')
|
|
14
|
+
setLoader(async (lang, part) => {
|
|
15
|
+
const response = await fetch(new URL(`../../locales/${part && `${part}/`}${lang}.json`, import.meta.url))
|
|
16
|
+
return response.ok ? response.json() : null
|
|
17
|
+
})
|
|
18
|
+
await useLocale(pickLocale(LOCALES, navigator.languages))
|
|
19
|
+
await useStrings('share')
|
|
20
|
+
const root = document.documentElement
|
|
21
|
+
root.lang = locale.value
|
|
22
|
+
root.dir = dir()
|
|
23
|
+
|
|
24
|
+
const id = location.pathname.slice(1)
|
|
25
|
+
const secret = location.hash.slice(1)
|
|
26
|
+
/**
|
|
27
|
+
* Where the viewer is: opening; asking for the password, after a wrong one perhaps; the share drawn,
|
|
28
|
+
* with what opens it again, until when, and what its certificates showed; or what went wrong; and
|
|
29
|
+
* whether a report is being written or was sent.
|
|
30
|
+
* @typedef {{ count: number, kept: boolean, seals: string[] }} Sealed
|
|
31
|
+
* @typedef {{ at: 'opening' } | { at: 'password', wrong?: boolean } | { at: 'shown', material: Uint8Array, expires: string, sealed?: Sealed | null } | { at: 'error', error: string }} Step
|
|
32
|
+
*/
|
|
33
|
+
let step = /** @type {Step} */ ({ at: 'opening' })
|
|
34
|
+
let reporting = /** @type {'' | 'writing' | 'sent'} */ ('')
|
|
35
|
+
const main = document.body.appendChild(document.createElement('main'))
|
|
36
|
+
const frame = Object.assign(document.createElement('iframe'), { title: '', src: '/frame' })
|
|
37
|
+
frame.setAttribute('sandbox', 'allow-scripts allow-forms allow-popups allow-popups-to-escape-sandbox')
|
|
38
|
+
// The page goes to the frame once both are ready: the frame's relay says when it is.
|
|
39
|
+
let page = ''
|
|
40
|
+
let ready = false
|
|
41
|
+
const send = () => { if (ready && page) frame.contentWindow?.postMessage(page, '*') }
|
|
42
|
+
addEventListener('message', ({ source, data }) => { if (source === frame.contentWindow && data === 'ready') ready = true, send() })
|
|
43
|
+
|
|
44
|
+
const STYLE = ':root{color-scheme:light dark;font:1rem/1.5 system-ui,sans-serif}body{margin:0;display:flex;flex-direction:column;height:100dvh}header{display:flex;flex-wrap:wrap;gap:.5rem 1rem;align-items:center;padding:.5rem 1rem;border-block-end:1px solid #8884}header strong{margin-inline-end:auto}main{flex:1;display:flex;flex-direction:column}iframe{flex:1;border:0;width:100%}form,.said{max-width:28rem;margin:3rem auto;padding-inline:1rem;display:grid;gap:.75rem}button,a.button{font:inherit;padding:.4rem .9rem;border-radius:.6rem;border:1px solid #8886;background:none;color:inherit;text-decoration:none;cursor:pointer}.primary{background:CanvasText;color:Canvas}input,textarea{font:inherit;padding:.4rem;border-radius:.4rem;border:1px solid #8886}small{opacity:.75}[hidden]{display:none}'
|
|
45
|
+
|
|
46
|
+
/** The sealed copy, with the proof a password's share asks for. @param {string} [access] */
|
|
47
|
+
async function fetchCopy(access) {
|
|
48
|
+
const response = await fetch(`/v1/${id}`, { headers: access ? { authorization: `Share ${access}` } : {} })
|
|
49
|
+
if (response.ok) return { sealed: new Uint8Array(await response.arrayBuffer()), expires: response.headers.get('share-expires') ?? '' }
|
|
50
|
+
return { status: response.status, said: await response.json().catch(() => ({})) }
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
/** Opens the share, with its password when it has one. @param {string} [password] */
|
|
54
|
+
async function open(password) {
|
|
55
|
+
if (!isPart(id) || !isPart(secret)) return show({ at: 'error', error: 'share.broken' })
|
|
56
|
+
let material = /** @type {Uint8Array} */ (bytesOf(secret))
|
|
57
|
+
let got = await fetchCopy().catch(() => ({ status: 0, said: {} }))
|
|
58
|
+
if ('status' in got && got.status === 401 && typeof got.said.salt === 'string') {
|
|
59
|
+
if (!password) return show({ at: 'password' })
|
|
60
|
+
const salt = bytesOf(got.said.salt)
|
|
61
|
+
material = await materialOf(material, salt, password)
|
|
62
|
+
got = await fetchCopy((await keysOf(material, salt)).access).catch(() => ({ status: 0, said: {} }))
|
|
63
|
+
if ('status' in got && got.status === 401) return show({ at: 'password', wrong: true })
|
|
64
|
+
}
|
|
65
|
+
if ('status' in got) return show({ at: 'error', error: /** @type {Record<number, string>} */ ({ 404: 'share.gone', 410: 'share.removed', 429: 'share.tooMany' })[got.status ?? 0] ?? 'share.unreachable' })
|
|
66
|
+
const value = await openValue(got.sealed, material).catch(() => null)
|
|
67
|
+
if (value?.format !== 1) return show({ at: 'error', error: 'share.broken' })
|
|
68
|
+
show({ at: 'shown', material, expires: got.expires })
|
|
69
|
+
await drawn(value)
|
|
70
|
+
if (step.at === 'shown') show({ ...step, sealed: await sealedOf(value) })
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* What its answers' certificates show (D274): each intact, its seal's, proving the words of a request
|
|
75
|
+
* and its answer as the share shows them. Null when it carries none. @param {any} value @returns {Promise<Sealed | null>}
|
|
76
|
+
*/
|
|
77
|
+
async function sealedOf(value) {
|
|
78
|
+
const proofs = /** @type {string[]} */ ((Array.isArray(value.certificates) ? value.certificates : []).filter((/** @type {unknown} */ one) => typeof one === 'string'))
|
|
79
|
+
if (!proofs.length) return null
|
|
80
|
+
const [{ check }, { foldTurns, splitSuggestions }] = await Promise.all([import('../receipt/certificate.js'), import('../../core/events.js')])
|
|
81
|
+
const turns = foldTurns(String(value.file ?? '').split('\n').slice(1).flatMap((line) => { try { return [JSON.parse(line)] } catch { return [] } }))
|
|
82
|
+
const read = await Promise.all(proofs.map((proof) => check({ proof }).catch(() => null)))
|
|
83
|
+
const kept = read.every((one) => {
|
|
84
|
+
const turn = turns.find((each) => each.at === one?.says?.credentialSubject?.request?.at)
|
|
85
|
+
return Boolean(one?.intact && one.proven && turn) && one?.words?.request === (turn?.user?.text ?? '')
|
|
86
|
+
&& one?.words?.answer === splitSuggestions(turn?.steps.map((each) => each.text).filter(Boolean).join('\n\n') ?? '').text
|
|
87
|
+
})
|
|
88
|
+
return { count: read.length, kept, seals: [...new Set(read.flatMap((one) => (one ? [one.fingerprint] : [])))] }
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* The share's page, as its saved copy would be (D305), drawn with the render package at the host's
|
|
93
|
+
* address for the version it names, its pages offline whatever the sharer allowed, maps through the
|
|
94
|
+
* host's own service; then sent to the frame once it is ready. @param {any} value
|
|
95
|
+
*/
|
|
96
|
+
async function drawn(value) {
|
|
97
|
+
const { drawing } = value
|
|
98
|
+
const known = drawing && host.render && /^[\w.+-]+$/.test(drawing.render?.version ?? '')
|
|
99
|
+
const reader = known ? readerAt(host.render.replace('{version}', drawing.render.version), { ...drawing, settings: { ...drawing.settings, pages: { ...drawing.settings?.pages, web: false, network: false } } }, {
|
|
100
|
+
instruments: host.sounds && /^[\w.+-]+$/.test(drawing.sounds ?? '') ? host.sounds.replace('{version}', drawing.sounds) : null,
|
|
101
|
+
styles: drawing.maps && host.maps ? host.maps : null,
|
|
102
|
+
}) : null
|
|
103
|
+
frame.title = String(value.title ?? '')
|
|
104
|
+
document.title = String(value.title || host.name)
|
|
105
|
+
page = await pageOf(String(value.file ?? ''), String(value.title ?? ''), LOCALES.includes(value.lang) ? value.lang : 'en', { reader, pictures: value.pictures ?? {} })
|
|
106
|
+
send()
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
/** @param {Step} next */
|
|
110
|
+
const show = (next) => { step = next; draw() }
|
|
111
|
+
|
|
112
|
+
/** A report: what is wrong, and the whole link when the reporter agrees, so whoever runs the host can see it. @param {SubmitEvent} event */
|
|
113
|
+
async function report(event) {
|
|
114
|
+
event.preventDefault()
|
|
115
|
+
const typed = new FormData(/** @type {HTMLFormElement} */ (event.target))
|
|
116
|
+
const sent = await fetch(`/v1/${id}/report`, { method: 'POST', headers: { 'content-type': 'application/json' }, body: JSON.stringify({ words: typed.get('words'), ...(typed.get('link') && { link: location.href }) }) }).catch(() => null)
|
|
117
|
+
reporting = sent?.ok ? 'sent' : 'writing'
|
|
118
|
+
draw()
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
/** Continue in Jean: the person's own Jean brings it in, with what opens it, after `#` again. */
|
|
122
|
+
const elsewhere = () => (step.at === 'shown' && host.app ? `${host.app.replace(/#.*$/, '')}#/shared/${id}/${base64url(step.material)}` : '')
|
|
123
|
+
|
|
124
|
+
function draw() {
|
|
125
|
+
const when = step.at === 'shown' && step.expires ? new Intl.DateTimeFormat(locale.value, { dateStyle: 'long' }).format(new Date(step.expires)) : ''
|
|
126
|
+
render(html`<style>${STYLE}</style>
|
|
127
|
+
<header>
|
|
128
|
+
<strong>${t('share.from', { name: host.name ?? '' })}</strong>
|
|
129
|
+
${when ? html`<small>${t('share.until', { date: when })}</small>` : nothing}
|
|
130
|
+
${step.at === 'shown' && step.sealed ? html`<small role="status">${step.sealed.kept ? t('share.sealed', { count: step.sealed.count }) : t('share.unsealed')}
|
|
131
|
+
${step.sealed.seals.map((seal) => html`<code dir="ltr" title=${t('share.seal')}>${seal.slice(0, 16).match(/.{1,4}/g)?.join(' ')}</code>`)}</small>` : nothing}
|
|
132
|
+
${elsewhere() ? html`<a class="button primary" href=${elsewhere()} target="_blank" rel="noopener noreferrer">${t('share.continue', { name: host.name ?? '' })}</a>` : nothing}
|
|
133
|
+
${step.at === 'shown' ? html`<button @click=${() => { reporting = reporting ? '' : 'writing'; draw() }}>${t('share.report')}</button>` : nothing}
|
|
134
|
+
${host.legal ? html`<a href=${host.legal} target="_blank" rel="noopener noreferrer">${t('share.legal')}</a>` : nothing}
|
|
135
|
+
</header>
|
|
136
|
+
${reporting === 'writing' ? html`<form @submit=${report}>
|
|
137
|
+
<label for="words">${t('share.reportWhat')}</label>
|
|
138
|
+
<textarea id="words" name="words" rows="4" required maxlength="5000" dir="auto"></textarea>
|
|
139
|
+
<label><input type="checkbox" name="link" checked> ${t('share.reportLink')}</label>
|
|
140
|
+
<button class="primary">${t('share.reportSend')}</button>
|
|
141
|
+
</form>` : reporting === 'sent' ? html`<p class="said" role="status">${t('share.reportSent')}</p>` : nothing}
|
|
142
|
+
${step.at === 'password' ? html`<form @submit=${(/** @type {SubmitEvent} */ event) => { event.preventDefault(); show({ at: 'opening' }); open(String(new FormData(/** @type {HTMLFormElement} */ (event.target)).get('password'))) }}>
|
|
143
|
+
<label for="password">${t('share.password')}</label>
|
|
144
|
+
<input id="password" name="password" type="password" autocomplete="off" required autofocus>
|
|
145
|
+
${step.wrong ? html`<p role="alert">${t('share.wrong')}</p>` : nothing}
|
|
146
|
+
<button class="primary">${t('share.open')}</button>
|
|
147
|
+
</form>` : step.at === 'error' ? html`<p class="said" role="alert">${t(step.error)}</p>` : step.at === 'opening' ? html`<p class="said" role="status">${t('share.opening')}</p>` : nothing}`, document.body, { renderBefore: main })
|
|
148
|
+
main.hidden = step.at !== 'shown'
|
|
149
|
+
if (step.at === 'shown' && !frame.isConnected) main.append(frame)
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
draw()
|
|
153
|
+
await open()
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
// Jean's own directory of ready-made skills (D196), for what people ask of it: each a SKILL.md
|
|
2
|
+
// beside this module, shipped and kept offline with the skills capability, read when the directory
|
|
3
|
+
// is shown or a request is compared with it, and added as a skill from elsewhere is, once the
|
|
4
|
+
// user has read its steps. Each has an icon, drawn here, and in every language a name and a few
|
|
5
|
+
// words, in its own metadata (`title-<lang>`, `text-<lang>`, D222); its steps are in English, for the brain.
|
|
6
|
+
// Host-agnostic: no DOM.
|
|
7
|
+
import { parseSkill } from '../../core/skills.js'
|
|
8
|
+
|
|
9
|
+
/** @typedef {import('./sources.js').Entry & { icon: string }} Ready digest '': Jean's own, read from its own files */
|
|
10
|
+
|
|
11
|
+
/** The skills, by name, with their icon's path (24×24, drawn with a line). */
|
|
12
|
+
export const DIRECTORY = Object.freeze([
|
|
13
|
+
{ name: 'plain-words', icon: 'M4.5 5.5h15v10h-8l-4 3.5v-3.5h-3zM8 9h8M8 12h5' },
|
|
14
|
+
{ name: 'letter', icon: 'M3.5 6.5h17v11h-17zM3.5 7l8.5 6 8.5-6' },
|
|
15
|
+
{ name: 'budget', icon: 'M5 7a7 2.5 0 1 0 14 0 7 2.5 0 1 0-14 0v10c0 1.4 3.1 2.5 7 2.5s7-1.1 7-2.5V7M5 12c0 1.4 3.1 2.5 7 2.5s7-1.1 7-2.5' },
|
|
16
|
+
{ name: 'compare', icon: 'M12 3.5v16M8 19.5h8M4.5 7.5h15M4.5 7.5l-2.5 6h5zM19.5 7.5l-2.5 6h5z' },
|
|
17
|
+
{ name: 'calendar-event', icon: 'M4.5 6h15v13.5h-15zM4.5 10h15M8.5 3.5V8M15.5 3.5V8M8 13.5h2M14 13.5h2M8 16.5h2' },
|
|
18
|
+
{ name: 'quiz', icon: 'M3.5 12a8.5 8.5 0 1 0 17 0 8.5 8.5 0 1 0-17 0M9.5 9.5a2.5 2.5 0 1 1 3.5 2.3c-.6.3-1 .9-1 1.6v.6M12 16.5v.5' },
|
|
19
|
+
{ name: 'learn-it', icon: 'M12 6.5c-2-1.5-5-2-8.5-1.5v13c3.5-.5 6.5 0 8.5 1.5 2-1.5 5-2 8.5-1.5v-13C17 4.5 14 5 12 6.5zM12 6.5v13' },
|
|
20
|
+
{ name: 'flash-cards', icon: 'M4 9.5h12v10H4zM8 9.5v-4h12v10h-4' },
|
|
21
|
+
{ name: 'study-plan', icon: 'M3.5 12a8.5 8.5 0 1 0 17 0 8.5 8.5 0 1 0-17 0M12 7v5l3.5 2' },
|
|
22
|
+
{ name: 'relations', icon: 'M4 6a2 2 0 1 0 4 0 2 2 0 1 0-4 0M16 6a2 2 0 1 0 4 0 2 2 0 1 0-4 0M10 18a2 2 0 1 0 4 0 2 2 0 1 0-4 0M8 6h8M6.9 7.8l4.2 8.4M17.1 7.8l-4.2 8.4' },
|
|
23
|
+
{ name: 'project-plan', icon: 'M4 4.5v15h16M7 7.5h6M9.5 11.5h7M12.5 15.5h5.5' },
|
|
24
|
+
{ name: 'goals', icon: 'M3.5 12a8.5 8.5 0 1 0 17 0 8.5 8.5 0 1 0-17 0M7.5 12a4.5 4.5 0 1 0 9 0 4.5 4.5 0 1 0-9 0M11 12a1 1 0 1 0 2 0 1 1 0 1 0-2 0' },
|
|
25
|
+
{ name: 'problem-solving', icon: 'M4 6.5h4.5M4 12h4.5M4 17.5h4.5M8.5 6.5 12 12l-3.5 5.5M12 12h8.5M17 9l3.5 3-3.5 3' },
|
|
26
|
+
{ name: 'process-improvement', icon: 'M3.5 8.5h5v7h-5zM15.5 8.5h5v7h-5zM8.5 12h7M13 9.5l2.5 2.5-2.5 2.5' },
|
|
27
|
+
{ name: 'risk-analysis', icon: 'M12 4 21 19.5H3zM12 10v4.5M12 17v.5' },
|
|
28
|
+
{ name: 'design-thinking', icon: 'M9.5 17.5h5M10.5 20.5h3M12 3.5a5.5 5.5 0 0 0-3.4 9.8c.6.5.9 1.2.9 1.9v.3h5v-.3c0-.7.3-1.4.9-1.9A5.5 5.5 0 0 0 12 3.5z' },
|
|
29
|
+
{ name: 'chart', icon: 'M3.5 19.5h17M6.5 19.5v-6M10.5 19.5V9M14.5 19.5v-8M18.5 19.5V5.5' },
|
|
30
|
+
{ name: 'visual', icon: 'M3.5 6.5l5-2 7 2 5-2v13l-5 2-7-2-5 2zM8.5 4.5v13M15.5 6.5v13' },
|
|
31
|
+
{ name: 'music-score', icon: 'M9 18.5V6l10-2v12.5M4 18.5a2.5 2.5 0 1 0 5 0 2.5 2.5 0 1 0-5 0M14 16.5a2.5 2.5 0 1 0 5 0 2.5 2.5 0 1 0-5 0' },
|
|
32
|
+
{ name: 'slides', icon: 'M3.5 4.5h17v11h-17zM12 15.5v4M8 19.5h8' },
|
|
33
|
+
{ name: 'pptx', icon: 'M6.5 3.5h8l4 4v13h-12zM14.5 3.5v4h4M9 14a3 3 0 1 0 6 0 3 3 0 1 0-6 0M12 11v3h3' },
|
|
34
|
+
])
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* What a skill is called and when it is used: in this language when its metadata gives it (D222), else in English, else as
|
|
38
|
+
* written. @param {{ name: string, description: string, title?: string, metadata?: Record<string, any> }} skill @param {string} lang
|
|
39
|
+
*/
|
|
40
|
+
export function shownIn({ name, description, title = name, metadata = {} }, lang) {
|
|
41
|
+
const tag = [lang, 'en'].find((each) => typeof metadata[`title-${each}`] === 'string')
|
|
42
|
+
return tag ? { title: String(metadata[`title-${tag}`]), text: String(metadata[`text-${tag}`] ?? description) } : { title, text: description }
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* The directory's skills, each as its SKILL.md says (one that can't be read is left out).
|
|
47
|
+
* @param {{ fetch?: typeof globalThis.fetch, base?: string | URL }} [options] base: where the directory is
|
|
48
|
+
* @returns {Promise<Ready[]>}
|
|
49
|
+
*/
|
|
50
|
+
export async function readDirectory({ fetch = globalThis.fetch, base = new URL('directory/', import.meta.url) } = {}) {
|
|
51
|
+
const read = await Promise.all(DIRECTORY.map(async ({ name, icon }) => {
|
|
52
|
+
const url = new URL(`${name}/SKILL.md`, base).href
|
|
53
|
+
const skill = await fetch(url).then(async (response) => (response.ok ? parseSkill(await response.text(), url) : null)).catch(() => null)
|
|
54
|
+
return skill?.name === name ? [{ name, type: /** @type {const} */ ('skill-md'), description: skill.description, url, digest: '', source: '', icon, metadata: skill.metadata }] : []
|
|
55
|
+
}))
|
|
56
|
+
return read.flat()
|
|
57
|
+
}
|
|
@@ -0,0 +1,281 @@
|
|
|
1
|
+
// Skills from elsewhere (D116, D121, D207): Agent Skills discovery indexes, the format's own way to
|
|
2
|
+
// publish skills (https://github.com/cloudflare/agent-skills-discovery-rfc, schema 0.2.0), and
|
|
3
|
+
// repositories on GitHub. Jean reads them whole and compares their descriptions with the user's
|
|
4
|
+
// requests here, on the device, so a request never goes anywhere. A skill comes in only when the
|
|
5
|
+
// user adds it, after reading its steps, once what was downloaded matches the digest its index
|
|
6
|
+
// lists, or git's hash of each file, and holds only instructions: SKILL.md and text, never programs.
|
|
7
|
+
// Host-agnostic: no DOM, tested under node --test.
|
|
8
|
+
import { readZip } from '../../core/zip.js'
|
|
9
|
+
import { sha256Hex } from '../../core/files.js'
|
|
10
|
+
import { blocksOf } from '../../core/skills.js'
|
|
11
|
+
import { readJSON, writeJSON } from '../../core/fs.js'
|
|
12
|
+
import { parseFrontMatter } from '../../core/settings.js'
|
|
13
|
+
import { alike } from '../../core/search.js'
|
|
14
|
+
|
|
15
|
+
/** @typedef {import('../../core/types.js').FS} FS */
|
|
16
|
+
/**
|
|
17
|
+
* A skill an index or a repository offers. url: absolute (a folder's SKILL.md); source: where it is listed; files: a folder's, with git's hashes;
|
|
18
|
+
* metadata: its SKILL.md's, for one of Jean's own (D222).
|
|
19
|
+
* @typedef {{ name: string, type: 'skill-md' | 'archive' | 'folder', description: string, url: string, digest: string, source: string, files?: { path: string, sha: string, size: number }[], metadata?: Record<string, any> }} Entry
|
|
20
|
+
*/
|
|
21
|
+
/** What a source held when last read, or why it couldn't be, and until when (GitHub's limit). @typedef {{ url: string, at: string, skills: Entry[], error?: string, until?: string }} Index */
|
|
22
|
+
|
|
23
|
+
export const SCHEMA = 'https://schemas.agentskills.io/discovery/0.2.0/schema.json'
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* The sources read unless the user or policy changes the list, checked from a browser's point of view
|
|
27
|
+
* by `npm run directory` (D207): the indexes that answer browsers are developers', so these are the
|
|
28
|
+
* folders of Anthropic's skills for knowledge work (Apache 2.0) about people's work rather than code.
|
|
29
|
+
*/
|
|
30
|
+
export const DEFAULT_SOURCES = Object.freeze(['small-business', 'marketing', 'sales', 'human-resources', 'legal', 'customer-support']
|
|
31
|
+
.map((folder) => `https://github.com/anthropics/knowledge-work-plugins/tree/main/${folder}`))
|
|
32
|
+
|
|
33
|
+
const NAME = /^(?=.{1,64}$)[a-z0-9]+(-[a-z0-9]+)*$/
|
|
34
|
+
const DIGEST = /^sha256:[0-9a-f]{64}$/
|
|
35
|
+
// Instructions: Markdown and other text, never code. A file without an extension is a LICENSE or a README.
|
|
36
|
+
const TEXT = /(^|\/)[^./]+$|\.(md|markdown|txt|csv|tsv|json|ya?ml)$/i
|
|
37
|
+
// What one skill may weigh, downloaded or unpacked.
|
|
38
|
+
const MAX_BYTES = 2 * 1024 * 1024
|
|
39
|
+
// An index is read again after a day.
|
|
40
|
+
const FRESH_MS = 24 * 3600_000
|
|
41
|
+
|
|
42
|
+
/** Why a skill can't be added: `digest` (not what the index lists), `programs` (more than instructions), `invalid`. */
|
|
43
|
+
export class SkillError extends Error {
|
|
44
|
+
/** @param {'digest' | 'programs' | 'invalid'} code @param {string} message */
|
|
45
|
+
constructor(code, message) {
|
|
46
|
+
super(message)
|
|
47
|
+
this.code = code
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
/** A source's address from what the user typed: a site (its .well-known index), the index itself, or a repository on GitHub or one of its folders. @param {string} address */
|
|
52
|
+
export function indexURL(address) {
|
|
53
|
+
const text = address.trim()
|
|
54
|
+
const url = new URL(/^https?:\/\//i.test(text) ? text : `https://${text}`)
|
|
55
|
+
const repo = url.host === 'github.com' && `https://github.com${url.pathname.replace(/\.git$|\/+$/g, '')}`
|
|
56
|
+
if (repo && !repoOf(repo)) throw new Error('Not a repository.')
|
|
57
|
+
if (repo) return repo
|
|
58
|
+
if (!url.pathname.endsWith('.json')) url.pathname = `${url.pathname.replace(/\/+$/, '')}/.well-known/agent-skills/index.json`
|
|
59
|
+
return url.href
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
/** Where a skill or a source comes from, for people: its site, or its repository on GitHub, with a source's folder. @param {string} url */
|
|
63
|
+
export function siteOf(url) {
|
|
64
|
+
const { host, pathname } = new URL(url)
|
|
65
|
+
const [owner, repo, tree, , ...folder] = pathname.slice(1).split('/')
|
|
66
|
+
if (host === 'raw.githubusercontent.com') return `github.com/${owner}/${repo}`
|
|
67
|
+
return host === 'github.com' ? ['github.com', owner, repo, ...(tree === 'tree' ? folder : [])].join('/') : host
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
/** A repository on GitHub, or one of its folders (…/tree/<branch>/<folder>). @param {string} url */
|
|
71
|
+
function repoOf(url) {
|
|
72
|
+
const [, owner, repo, ref = 'HEAD', folder = ''] = /^https:\/\/github\.com\/([\w.-]+)\/([\w.-]+)(?:\/tree\/([^/]+)(?:\/(.+))?)?$/.exec(url) ?? []
|
|
73
|
+
return owner ? { owner, repo, ref, folder: folder && `${folder}/` } : null
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* The skills an index lists, with their addresses made absolute. An index of another version
|
|
78
|
+
* isn't read: its shape may have changed (the specification says so).
|
|
79
|
+
* @param {any} json @param {string} source the index's address
|
|
80
|
+
* @returns {Entry[]}
|
|
81
|
+
*/
|
|
82
|
+
export function parseIndex(json, source) {
|
|
83
|
+
if (json?.$schema !== SCHEMA) throw new Error(`Not a skills index Jean can read (${String(json?.$schema ?? 'no $schema')}).`)
|
|
84
|
+
return (Array.isArray(json.skills) ? json.skills : []).flatMap((/** @type {any} */ skill) => {
|
|
85
|
+
const { name, type, description, digest } = skill ?? {}
|
|
86
|
+
if (!NAME.test(name) || (type !== 'skill-md' && type !== 'archive') || typeof description !== 'string' || !description.trim() || !DIGEST.test(digest)) return []
|
|
87
|
+
try {
|
|
88
|
+
const url = new URL(String(skill.url), source)
|
|
89
|
+
return /^https?:$/.test(url.protocol) ? [{ name, type, description: description.trim().slice(0, 1024), url: url.href, digest, source }] : []
|
|
90
|
+
} catch {
|
|
91
|
+
return []
|
|
92
|
+
}
|
|
93
|
+
})
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
/** @param {Uint8Array} bytes */
|
|
97
|
+
export const sha256 = async (bytes) => `sha256:${await sha256Hex(bytes)}`
|
|
98
|
+
|
|
99
|
+
/** git's name for a file's content, which GitHub lists: a blob's SHA-1. @param {Uint8Array} bytes */
|
|
100
|
+
export const gitHash = async (bytes) => [...new Uint8Array(await crypto.subtle.digest('SHA-1', new Uint8Array([...new TextEncoder().encode(`blob ${bytes.length}\0`), ...bytes])))]
|
|
101
|
+
.map((byte) => byte.toString(16).padStart(2, '0')).join('')
|
|
102
|
+
|
|
103
|
+
/** A path inside a skill, or null when it would leave it (absolute, `..`, a backslash). @param {string} path */
|
|
104
|
+
function inside(path) {
|
|
105
|
+
const clean = path.replace(/^(\.\/)+/, '')
|
|
106
|
+
return !clean || clean.startsWith('/') || clean.includes('\\') || clean.split('/').includes('..') ? null : clean
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
/**
|
|
110
|
+
* A tar's files. Links and devices make it invalid; long names (GNU and pax) are followed.
|
|
111
|
+
* @param {Uint8Array} bytes @returns {{ path: string, bytes: Uint8Array }[]}
|
|
112
|
+
*/
|
|
113
|
+
export function untar(bytes) {
|
|
114
|
+
const decode = (/** @type {Uint8Array} */ part) => new TextDecoder().decode(part).replace(/\0[\s\S]*$/, '')
|
|
115
|
+
const files = []
|
|
116
|
+
let long = ''
|
|
117
|
+
for (let at = 0; at + 512 <= bytes.length;) {
|
|
118
|
+
const head = bytes.subarray(at, at + 512)
|
|
119
|
+
if (head.every((byte) => byte === 0)) break
|
|
120
|
+
const size = parseInt(decode(head.subarray(124, 136)).trim() || '0', 8)
|
|
121
|
+
const type = String.fromCharCode(head[156] || 48)
|
|
122
|
+
const body = bytes.subarray(at + 512, at + 512 + size)
|
|
123
|
+
at += 512 + Math.ceil(size / 512) * 512
|
|
124
|
+
const prefix = decode(head.subarray(257, 262)) === 'ustar' ? decode(head.subarray(345, 500)) : ''
|
|
125
|
+
const name = long || (prefix ? `${prefix}/` : '') + decode(head.subarray(0, 100))
|
|
126
|
+
long = ''
|
|
127
|
+
if (type === 'L') long = decode(body)
|
|
128
|
+
else if (type === 'x') long = /(?:^|\n)\d+ path=([^\n]*)\n/.exec(decode(body))?.[1] ?? ''
|
|
129
|
+
else if (type === '0' || type === '7') files.push({ path: name, bytes: body.slice() })
|
|
130
|
+
else if (type !== '5' && type !== 'g') throw new SkillError('invalid', `The archive holds a link or a device (${name}).`)
|
|
131
|
+
}
|
|
132
|
+
return files
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
/** @param {Uint8Array} bytes */
|
|
136
|
+
export async function gunzip(bytes) {
|
|
137
|
+
const stream = new Blob([/** @type {BlobPart} */ (bytes)]).stream().pipeThrough(new DecompressionStream('gzip'))
|
|
138
|
+
return new Uint8Array(await new Response(stream).arrayBuffer())
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
/**
|
|
142
|
+
* What a download holds, once it matches its digest: the steps (SKILL.md's body), the text files
|
|
143
|
+
* beside them, the kinds of block it declares (D196) and its metadata (D222). Anything that isn't text (a script, a
|
|
144
|
+
* program, a picture) means the skill needs more than instructions, and it isn't added (D116).
|
|
145
|
+
* @param {Entry} entry @param {Uint8Array} bytes
|
|
146
|
+
* @returns {Promise<{ body: string, files: { path: string, text: string }[], blocks: string[], metadata?: Record<string, any> }>}
|
|
147
|
+
*/
|
|
148
|
+
export async function unpack(entry, bytes) {
|
|
149
|
+
if (bytes.length > MAX_BYTES) throw new SkillError('invalid', 'The skill is too large.')
|
|
150
|
+
if (await sha256(bytes) !== entry.digest) throw new SkillError('digest', 'What was downloaded doesn’t match the digest its index lists.')
|
|
151
|
+
const zipped = bytes[0] === 0x50 && bytes[1] === 0x4b
|
|
152
|
+
return instructions(entry.type === 'skill-md' ? [{ path: 'SKILL.md', bytes }]
|
|
153
|
+
: zipped ? await Promise.all(readZip(bytes).map(async (file) => ({ path: file.name, bytes: await file.read() })))
|
|
154
|
+
: bytes[0] === 0x1f && bytes[1] === 0x8b ? untar(await gunzip(bytes)) : [])
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
/**
|
|
158
|
+
* Downloads a skill and checks it (SkillError when it can't be added): against the digest its index
|
|
159
|
+
* lists, or each file of a repository's, text alone, against git's hash of it. Jean's own (no digest)
|
|
160
|
+
* is read from its file. @param {Entry} entry @param {typeof globalThis.fetch} [fetch]
|
|
161
|
+
*/
|
|
162
|
+
export async function fetchSkill(entry, fetch = globalThis.fetch) {
|
|
163
|
+
const bytesOf = async (/** @type {string} */ url) => new Uint8Array(await (await answer(fetch, url)).arrayBuffer())
|
|
164
|
+
if (!entry.digest) {
|
|
165
|
+
const { data, body } = parseFrontMatter(new TextDecoder().decode(await bytesOf(entry.url)))
|
|
166
|
+
return { body: body.trim(), files: [], blocks: blocksOf(data.metadata?.blocks), metadata: data.metadata }
|
|
167
|
+
}
|
|
168
|
+
if (!entry.files) return unpack(entry, await bytesOf(entry.url))
|
|
169
|
+
const odd = entry.files.find((file) => !TEXT.test(file.path))
|
|
170
|
+
if (odd) throw new SkillError('programs', `The skill holds more than instructions (${odd.path}).`)
|
|
171
|
+
if (entry.files.reduce((sum, file) => sum + file.size, 0) > MAX_BYTES) throw new SkillError('invalid', 'The skill is too large.')
|
|
172
|
+
const folder = entry.url.slice(0, -'SKILL.md'.length)
|
|
173
|
+
return instructions(await Promise.all(entry.files.map(async ({ path, sha }) => {
|
|
174
|
+
const bytes = await bytesOf(folder + path)
|
|
175
|
+
if (await gitHash(bytes) !== sha) throw new SkillError('digest', `${path} isn’t what the repository lists.`)
|
|
176
|
+
return { path, bytes }
|
|
177
|
+
})))
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
/** What a skill's files hold, as unpack() says. @param {{ path: string, bytes: Uint8Array }[]} listed */
|
|
181
|
+
function instructions(listed) {
|
|
182
|
+
const strict = new TextDecoder('utf-8', { fatal: true })
|
|
183
|
+
/** @type {{ path: string, text: string }[]} */
|
|
184
|
+
const files = []
|
|
185
|
+
let size = 0
|
|
186
|
+
for (const file of listed) {
|
|
187
|
+
const path = inside(file.path)
|
|
188
|
+
if (path === null) throw new SkillError('invalid', `The archive reaches outside its folder (${file.path}).`)
|
|
189
|
+
if (path.startsWith('__MACOSX/') || path.endsWith('.DS_Store')) continue
|
|
190
|
+
if ((size += file.bytes.length) > MAX_BYTES) throw new SkillError('invalid', 'The skill is too large.')
|
|
191
|
+
if (!TEXT.test(path)) throw new SkillError('programs', `The skill holds more than instructions (${path}).`)
|
|
192
|
+
try {
|
|
193
|
+
files.push({ path, text: strict.decode(file.bytes) })
|
|
194
|
+
} catch {
|
|
195
|
+
throw new SkillError('programs', `The skill holds more than instructions (${path}).`)
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
const steps = files.find((file) => file.path === 'SKILL.md')
|
|
199
|
+
if (!steps) throw new SkillError('invalid', 'There is no SKILL.md at the root.')
|
|
200
|
+
const { data, body } = parseFrontMatter(steps.text)
|
|
201
|
+
if (!body.trim()) throw new SkillError('invalid', 'SKILL.md has no steps.')
|
|
202
|
+
return { body: body.trim(), files: files.filter((file) => file !== steps), blocks: blocksOf(data.metadata?.blocks), metadata: data.metadata }
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
/** @param {string} url */
|
|
206
|
+
const cachePath = (url) => `.cache/skills/${[...url].reduce((hash, char) => Math.imul(hash ^ char.charCodeAt(0), 16777619) >>> 0, 2166136261).toString(36)}.json`
|
|
207
|
+
|
|
208
|
+
/**
|
|
209
|
+
* Every source, as last read: from .cache/ when it was read less than a day ago, otherwise
|
|
210
|
+
* fetched again (a source that can't be read keeps what was read before, and says why, and waits
|
|
211
|
+
* for GitHub's limit to reset). The folders of a repository share one call to GitHub's API.
|
|
212
|
+
* @param {FS} fs @param {string[]} urls the indexes' and repositories' addresses
|
|
213
|
+
* @param {{ fetch?: typeof globalThis.fetch, now?: Date, again?: boolean }} [options] again: whatever the cache holds
|
|
214
|
+
* @returns {Promise<Index[]>}
|
|
215
|
+
*/
|
|
216
|
+
export function readIndexes(fs, urls, { fetch = globalThis.fetch, now = new Date(), again = false } = {}) {
|
|
217
|
+
const trees = new Map()
|
|
218
|
+
return Promise.all(urls.map(async (url) => {
|
|
219
|
+
const path = cachePath(url)
|
|
220
|
+
const kept = /** @type {Index | null} */ (await readJSON(fs, path, null))
|
|
221
|
+
if (kept && !again && now.getTime() < (kept.error ? Date.parse(kept.until ?? kept.at) : Date.parse(kept.at) + FRESH_MS)) return kept
|
|
222
|
+
/** @type {Index} */
|
|
223
|
+
let read
|
|
224
|
+
try {
|
|
225
|
+
read = { url, at: now.toISOString(), skills: repoOf(url) ? await readRepo(url, fetch, trees) : parseIndex(await (await answer(fetch, url)).json(), url) }
|
|
226
|
+
} catch (error) {
|
|
227
|
+
const { message, until } = /** @type {Error & { until?: string }} */ (error)
|
|
228
|
+
read = { url, at: now.toISOString(), skills: kept?.skills ?? [], error: message || 'unreachable', ...(until && { until }) }
|
|
229
|
+
}
|
|
230
|
+
await writeJSON(fs, path, read)
|
|
231
|
+
return read
|
|
232
|
+
}))
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
/** What an address answered, when it answered well; GitHub's API says when its limit resets. @param {typeof globalThis.fetch} fetch @param {string} url */
|
|
236
|
+
async function answer(fetch, url) {
|
|
237
|
+
const response = await fetch(url)
|
|
238
|
+
const reset = response.headers.get('x-ratelimit-remaining') === '0' && Number(response.headers.get('x-ratelimit-reset'))
|
|
239
|
+
if (!response.ok) throw Object.assign(new Error(`${new URL(url).host} answered ${response.status}.`), reset ? { until: new Date(reset * 1000).toISOString() } : {})
|
|
240
|
+
return response
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
/**
|
|
244
|
+
* The skills of a repository on GitHub, or of one of its folders: each folder with a SKILL.md (one inside
|
|
245
|
+
* another's is part of it) and git's hash of each file, from one call to GitHub's API (sixty an hour without
|
|
246
|
+
* an account), then each SKILL.md from its files' host for its description.
|
|
247
|
+
* @param {string} url @param {typeof globalThis.fetch} fetch @param {Map<string, Promise<any>>} [trees] the calls already made, by address
|
|
248
|
+
*/
|
|
249
|
+
async function readRepo(url, fetch, trees = new Map()) {
|
|
250
|
+
const { owner, repo, ref, folder } = /** @type {NonNullable<ReturnType<typeof repoOf>>} */ (repoOf(url))
|
|
251
|
+
const api = `https://api.github.com/repos/${owner}/${repo}/git/trees/${ref}?recursive=1`
|
|
252
|
+
/** @type {{ sha: string, tree: { path: string, type: string, sha: string, size: number }[] }} */
|
|
253
|
+
const { sha, tree } = await (trees.get(api) ?? trees.set(api, answer(fetch, api).then((response) => response.json())).get(api))
|
|
254
|
+
const within = tree.filter((item) => `${item.path}/`.startsWith(folder))
|
|
255
|
+
const homes = within.filter((item) => item.type === 'blob' && /(^|\/)SKILL\.md$/.test(item.path)).map((item) => item.path.slice(0, -'SKILL.md'.length))
|
|
256
|
+
const raw = `https://raw.githubusercontent.com/${owner}/${repo}/${ref}/`
|
|
257
|
+
return (await Promise.all(homes.filter((home) => !homes.some((other) => other !== home && home.startsWith(other))).map(async (home) => {
|
|
258
|
+
const { name, description } = parseFrontMatter(await fetch(raw + home + 'SKILL.md').then((response) => (response.ok ? response.text() : ''), () => '')).data
|
|
259
|
+
const digest = (home && tree.find((item) => `${item.path}/` === home)?.sha) || sha
|
|
260
|
+
const files = within.filter((item) => item.type === 'blob' && item.path.startsWith(home)).map((item) => ({ path: item.path.slice(home.length), sha: item.sha, size: item.size }))
|
|
261
|
+
return typeof name === 'string' && NAME.test(name) && typeof description === 'string' && description.trim()
|
|
262
|
+
? [{ name, type: /** @type {const} */ ('folder'), description: description.trim().slice(0, 1024), url: `${raw}${home}SKILL.md`, digest: `git:${digest}`, source: url, files }] : []
|
|
263
|
+
}))).flat()
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
/** What a request is compared with: the name's words and the description. @param {Entry} entry */
|
|
267
|
+
const about = (entry) => `${entry.name.replace(/-/g, ' ')} ${entry.description}`
|
|
268
|
+
|
|
269
|
+
/**
|
|
270
|
+
* The skill that fits a request best, if one is alike enough (alike(), D83), and the user doesn't
|
|
271
|
+
* already have one by that name.
|
|
272
|
+
* @param {string} request @param {Entry[]} entries @param {string[]} have names of the skills the user has
|
|
273
|
+
* @param {number} enough the score past which a request and a description are of a kind
|
|
274
|
+
* @returns {Entry | null}
|
|
275
|
+
*/
|
|
276
|
+
export function bestFit(request, entries, have, enough) {
|
|
277
|
+
const open = entries.filter((entry) => !have.includes(entry.name))
|
|
278
|
+
const scores = alike(request, open.map(about))
|
|
279
|
+
const best = scores.reduce((top, score, i) => (score > (scores[top] ?? -1) ? i : top), -1)
|
|
280
|
+
return best >= 0 && scores[best] >= enough ? open[best] : null
|
|
281
|
+
}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
// Slides (D200): a ```marp block read as Marp writes a deck (Marpit's Markdown): slides between
|
|
2
|
+
// rules (`---`), settings in its front matter and in HTML comments, and colours as pictures
|
|
3
|
+
// (`` for the background, `` for the text). A setting holds from its slide
|
|
4
|
+
// on, or on that slide only when it starts with `_`. Other comments are the speaker's notes, and
|
|
5
|
+
// pictures show as their words, as answers show them (ui/markdown.js): neither is drawn.
|
|
6
|
+
// Host-agnostic: marked's tokens, lexed by whoever reads the deck.
|
|
7
|
+
|
|
8
|
+
/** @typedef {{ tokens: any[], settings: Record<string, string> }} Slide */
|
|
9
|
+
|
|
10
|
+
const SETTING = /^\s*(_?)(\w+)\s*:\s*(.*?)\s*$/
|
|
11
|
+
/** Marp's settings: those drawn here, then those a deck may hold that the room's look stands for. */
|
|
12
|
+
const KNOWN = new Set(['class', 'paginate', 'header', 'footer', 'backgroundColor', 'color',
|
|
13
|
+
'marp', 'theme', 'style', 'size', 'headingDivider', 'math', 'lang', 'title', 'description', 'author',
|
|
14
|
+
'backgroundImage', 'backgroundPosition', 'backgroundRepeat', 'backgroundSize'])
|
|
15
|
+
const COLOUR = /^(?:#[\da-f]{3,8}|(?:rgb|hsl|hwb|lab|lch|oklab|oklch)a?\(.*\)|[a-z]+)$/i
|
|
16
|
+
/** The words of a picture that tell Marp how to lay it out, never shown. */
|
|
17
|
+
const LAYOUT = /^(?:bg|left|right|contain|cover|fit|auto|vertical|blur|grayscale|sepia|invert|[\d.]+%|[a-z-]+:\S+)$/i
|
|
18
|
+
|
|
19
|
+
/** @param {string} source @param {(source: string) => any[]} lex @returns {Slide[]} */
|
|
20
|
+
export function readDeck(source, lex) {
|
|
21
|
+
/** @typedef {{ tokens: any[], own: Record<string, string>, only: Record<string, string> }} Read */
|
|
22
|
+
/** @type {Read[]} */
|
|
23
|
+
const slides = [{ tokens: [], own: {}, only: {} }]
|
|
24
|
+
const front = /^---[ \t]*\n([\s\S]*?)\n---[ \t]*(?:\n|$)/.exec(source)
|
|
25
|
+
const fronted = front !== null && settings(front[1], slides[0])
|
|
26
|
+
for (const token of lex(fronted ? source.slice(front[0].length) : source)) {
|
|
27
|
+
const slide = /** @type {Read} */ (slides.at(-1))
|
|
28
|
+
if (token.type === 'hr') slides.push({ tokens: [], own: {}, only: {} })
|
|
29
|
+
else if (token.type === 'html') {
|
|
30
|
+
for (const [, comment] of token.raw.matchAll(/<!--([\s\S]*?)-->/g)) settings(comment, slide)
|
|
31
|
+
const rest = token.raw.replace(/<!--[\s\S]*?(?:-->|$)/g, '').trim()
|
|
32
|
+
if (rest) slide.tokens.push({ ...token, raw: rest })
|
|
33
|
+
} else if (token.type === 'paragraph') {
|
|
34
|
+
const kept = paragraph(token, slide)
|
|
35
|
+
if (kept) slide.tokens.push(kept)
|
|
36
|
+
} else if (token.type !== 'space') slide.tokens.push(token)
|
|
37
|
+
}
|
|
38
|
+
/** @type {Record<string, string>} */
|
|
39
|
+
let held = {}
|
|
40
|
+
return slides.map(({ tokens, own, only }) => ({ tokens, settings: { ...(held = { ...held, ...own }), ...only } }))
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* A comment's settings, kept on its slide: false when it holds something else, the speaker's notes.
|
|
45
|
+
* @param {string} text @param {{ own: Record<string, string>, only: Record<string, string> }} slide
|
|
46
|
+
*/
|
|
47
|
+
function settings(text, slide) {
|
|
48
|
+
const lines = text.split('\n').filter((line) => line.trim())
|
|
49
|
+
const found = lines.map((line) => SETTING.exec(line))
|
|
50
|
+
if (!lines.length || !found.every((match) => match && KNOWN.has(match[2]))) return false
|
|
51
|
+
for (const [, only, key, value] of /** @type {RegExpExecArray[]} */ (found)) (only ? slide.only : slide.own)[key] = value.replace(/^(['"])(.*)\1$/, '$2')
|
|
52
|
+
return true
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* A paragraph without its comments and colours, which go to its slide, and its pictures' layout
|
|
57
|
+
* words; null when nothing of it is left to show. @param {any} token @param {{ own: Record<string, string>, only: Record<string, string> }} slide
|
|
58
|
+
*/
|
|
59
|
+
function paragraph(token, slide) {
|
|
60
|
+
const tokens = token.tokens.filter((/** @type {any} */ part) => {
|
|
61
|
+
if (part.type === 'html' && part.raw.startsWith('<!--')) return void settings(part.raw.slice(4, -3), slide)
|
|
62
|
+
if (part.type !== 'image') return true
|
|
63
|
+
const words = /** @type {string[]} */ (part.text.split(/\s+/))
|
|
64
|
+
if (COLOUR.test(part.href)) slide.only[words.includes('bg') ? 'backgroundColor' : 'color'] = part.href
|
|
65
|
+
else if (!words.includes('bg')) return Object.assign(part, { text: words.filter((word) => !LAYOUT.test(word)).join(' ') })
|
|
66
|
+
return false
|
|
67
|
+
})
|
|
68
|
+
return tokens.some((/** @type {any} */ part) => part.type !== 'br' && (part.type !== 'text' || part.text.trim())) ? { ...token, tokens } : null
|
|
69
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/* Slides (D200): a slide at a time, 16:9, its type sized with its width (cqi), in the room's colours
|
|
2
|
+
or its own, the others laid out behind it, unseen; then its bar. Presented, it fills the screen,
|
|
3
|
+
black around it; printed, its slides follow one another. */
|
|
4
|
+
app-slides .slides-stage { position: relative; border-radius: var(--radius); }
|
|
5
|
+
app-slides .slide {
|
|
6
|
+
container-type: inline-size; position: relative; display: flex; flex-direction: column; aspect-ratio: 16 / 9; overflow: hidden;
|
|
7
|
+
border: 1px solid var(--line); border-radius: var(--radius); background: var(--slide-paper, var(--room-2)); color: var(--slide-ink, var(--ink)); line-height: 1.4;
|
|
8
|
+
}
|
|
9
|
+
app-slides .slide:not(.is-shown) { position: absolute; inset-block-start: 0; inline-size: 100%; visibility: hidden; }
|
|
10
|
+
app-slides .slide.invert { background: var(--slide-paper, var(--ink)); color: var(--slide-ink, var(--room)); }
|
|
11
|
+
app-slides .slide-body { flex: 1; display: flex; flex-direction: column; justify-content: center; padding: 6cqi 7cqi; font-size: 2.6cqi; }
|
|
12
|
+
app-slides .lead .slide-body { align-items: center; text-align: center; }
|
|
13
|
+
app-slides .slide .heading { margin: 0 0 0.5em; font-size: 1.3em; font-weight: 650; line-height: 1.2; text-wrap: balance; }
|
|
14
|
+
app-slides .slide .h1 { font-size: 2em; }
|
|
15
|
+
app-slides .slide .h2 { font-size: 1.6em; }
|
|
16
|
+
app-slides .slide-body :is(p, ul, ol, blockquote, pre, .table) { margin-block: 0 0.6em; }
|
|
17
|
+
app-slides .slide :is(pre, th, td) { padding: 0.4em 0.7em; }
|
|
18
|
+
app-slides .slide :is(pre code, table) { font-size: 0.8em; }
|
|
19
|
+
app-slides .slide app-chart .chart { block-size: 28cqi; }
|
|
20
|
+
app-slides .slide app-chart .drawn-foot { display: none; }
|
|
21
|
+
app-slides .slide :is(header, footer, .slide-number) { position: absolute; inset-inline: 7cqi; font-size: 1.6cqi; opacity: 0.7; }
|
|
22
|
+
app-slides .slide header { inset-block-start: 2cqi; }
|
|
23
|
+
app-slides .slide :is(footer, .slide-number) { inset-block-end: 2cqi; }
|
|
24
|
+
app-slides .slide .slide-number { inset-inline-start: auto; }
|
|
25
|
+
app-slides .slide :is(header, footer) p { margin: 0; }
|
|
26
|
+
app-slides .slides-stage:fullscreen { display: grid; place-items: center; background: #000; }
|
|
27
|
+
app-slides .slides-stage:fullscreen .slide { inline-size: min(100vw, 100vh * 16 / 9); border: 0; border-radius: 0; }
|
|
28
|
+
app-slides .slides-bar { display: flex; align-items: center; gap: 0.3rem; margin-block-start: 0.4rem; }
|
|
29
|
+
app-slides .slides-where { color: var(--ink-soft); font-size: 0.85rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
|
|
30
|
+
app-slides .slides-bar .end { margin-inline-start: auto; }
|
|
31
|
+
app-slides .slides-bar .end + .end { margin-inline-start: 0; }
|
|
32
|
+
/* While the answer is written, the deck's place; once it's written, why there is none. */
|
|
33
|
+
app-slides .drawn-status { margin: 0 0 0.6rem; }
|
|
34
|
+
.is-streaming app-slides .drawn-status { display: grid; place-items: center; aspect-ratio: 16 / 9; margin: 0; }
|
|
35
|
+
app-slides .while, .is-streaming app-slides :is(.failed, pre) { display: none; }
|
|
36
|
+
.is-streaming app-slides .while { display: inline; }
|
|
37
|
+
/* On paper, every slide, in ink on white (a slide's own colours, or swapped ones, may print without their background), and no bar. */
|
|
38
|
+
@media print { app-slides .slides-bar { display: none; } app-slides :is(.slide, .slide.invert) { position: relative; visibility: visible; break-inside: avoid; margin-block-end: 0.6rem; background: none; color: var(--ink); } }
|